From ba3d148c5454aaf3b34a9866c928ecd4d97372ba Mon Sep 17 00:00:00 2001 From: Rohit Ramkumar Date: Wed, 11 Apr 2018 08:15:12 -0700 Subject: [PATCH 1/2] Vendor in Cluster Registry code --- Gopkg.lock | 16 +- Gopkg.toml | 4 + .../apis/clusterregistry/v1alpha1/BUILD.bazel | 26 + .../apis/clusterregistry/v1alpha1/defaults.go | 25 + .../pkg/apis/clusterregistry/v1alpha1/doc.go | 25 + .../clusterregistry/v1alpha1/generated.pb.go | 1837 ++++++++++++++++ .../clusterregistry/v1alpha1/generated.proto | 152 ++ .../apis/clusterregistry/v1alpha1/register.go | 61 + .../apis/clusterregistry/v1alpha1/types.go | 150 ++ .../v1alpha1/validation/BUILD.bazel | 24 + .../v1alpha1/validation/validation.go | 49 + .../v1alpha1/validation/validation_test.go | 111 + .../v1alpha1/zz_generated.deepcopy.go | 235 +++ .../v1alpha1/zz_generated.defaults.go | 32 + .../v1alpha1/zz_generated.openapi.go | 1871 +++++++++++++++++ .../clientset_generated/clientset/BUILD.bazel | 18 + .../clientset/clientset.go | 98 + .../clientset_generated/clientset/doc.go | 18 + .../clientset/fake/BUILD.bazel | 26 + .../clientset/fake/clientset_generated.go | 71 + .../clientset_generated/clientset/fake/doc.go | 18 + .../clientset/fake/register.go | 53 + .../clientset/scheme/BUILD.bazel | 18 + .../clientset/scheme/doc.go | 18 + .../clientset/scheme/register.go | 53 + .../clusterregistry/v1alpha1/BUILD.bazel | 22 + .../typed/clusterregistry/v1alpha1/cluster.go | 161 ++ .../v1alpha1/clusterregistry_client.go | 88 + .../typed/clusterregistry/v1alpha1/doc.go | 18 + .../clusterregistry/v1alpha1/fake/BUILD.bazel | 23 + .../clusterregistry/v1alpha1/fake/doc.go | 18 + .../v1alpha1/fake/fake_cluster.go | 129 ++ .../fake/fake_clusterregistry_client.go | 38 + .../v1alpha1/generated_expansion.go | 19 + .../externalversions/BUILD.bazel | 21 + .../clusterregistry/BUILD.bazel | 12 + .../clusterregistry/interface.go | 46 + .../clusterregistry/v1alpha1/BUILD.bazel | 21 + .../clusterregistry/v1alpha1/cluster.go | 88 + .../clusterregistry/v1alpha1/interface.go | 45 + .../externalversions/factory.go | 131 ++ .../externalversions/generic.go | 62 + .../internalinterfaces/BUILD.bazel | 14 + .../internalinterfaces/factory_interfaces.go | 38 + .../clusterregistry/v1alpha1/BUILD.bazel | 17 + .../clusterregistry/v1alpha1/cluster.go | 65 + .../v1alpha1/expansion_generated.go | 23 + 47 files changed, 6107 insertions(+), 1 deletion(-) create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/defaults.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/doc.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.pb.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.proto create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/register.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/types.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/validation.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/validation_test.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.defaults.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.openapi.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/clientset.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/doc.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/clientset_generated.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/doc.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/register.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/doc.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/register.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/cluster.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/clusterregistry_client.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/doc.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/doc.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/fake_cluster.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/fake_clusterregistry_client.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/generated_expansion.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/interface.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/cluster.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/interface.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/factory.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/generic.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/BUILD.bazel create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/cluster.go create mode 100644 vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/expansion_generated.go diff --git a/Gopkg.lock b/Gopkg.lock index 33a0c5bb22..dfff32bf2c 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -319,6 +319,20 @@ packages = ["discovery","discovery/fake","informers","informers/admissionregistration","informers/admissionregistration/v1alpha1","informers/admissionregistration/v1beta1","informers/apps","informers/apps/v1","informers/apps/v1beta1","informers/apps/v1beta2","informers/autoscaling","informers/autoscaling/v1","informers/autoscaling/v2beta1","informers/batch","informers/batch/v1","informers/batch/v1beta1","informers/batch/v2alpha1","informers/certificates","informers/certificates/v1beta1","informers/core","informers/core/v1","informers/events","informers/events/v1beta1","informers/extensions","informers/extensions/v1beta1","informers/internalinterfaces","informers/networking","informers/networking/v1","informers/policy","informers/policy/v1beta1","informers/rbac","informers/rbac/v1","informers/rbac/v1alpha1","informers/rbac/v1beta1","informers/scheduling","informers/scheduling/v1alpha1","informers/settings","informers/settings/v1alpha1","informers/storage","informers/storage/v1","informers/storage/v1alpha1","informers/storage/v1beta1","kubernetes","kubernetes/fake","kubernetes/scheme","kubernetes/typed/admissionregistration/v1alpha1","kubernetes/typed/admissionregistration/v1alpha1/fake","kubernetes/typed/admissionregistration/v1beta1","kubernetes/typed/admissionregistration/v1beta1/fake","kubernetes/typed/apps/v1","kubernetes/typed/apps/v1/fake","kubernetes/typed/apps/v1beta1","kubernetes/typed/apps/v1beta1/fake","kubernetes/typed/apps/v1beta2","kubernetes/typed/apps/v1beta2/fake","kubernetes/typed/authentication/v1","kubernetes/typed/authentication/v1/fake","kubernetes/typed/authentication/v1beta1","kubernetes/typed/authentication/v1beta1/fake","kubernetes/typed/authorization/v1","kubernetes/typed/authorization/v1/fake","kubernetes/typed/authorization/v1beta1","kubernetes/typed/authorization/v1beta1/fake","kubernetes/typed/autoscaling/v1","kubernetes/typed/autoscaling/v1/fake","kubernetes/typed/autoscaling/v2beta1","kubernetes/typed/autoscaling/v2beta1/fake","kubernetes/typed/batch/v1","kubernetes/typed/batch/v1/fake","kubernetes/typed/batch/v1beta1","kubernetes/typed/batch/v1beta1/fake","kubernetes/typed/batch/v2alpha1","kubernetes/typed/batch/v2alpha1/fake","kubernetes/typed/certificates/v1beta1","kubernetes/typed/certificates/v1beta1/fake","kubernetes/typed/core/v1","kubernetes/typed/core/v1/fake","kubernetes/typed/events/v1beta1","kubernetes/typed/events/v1beta1/fake","kubernetes/typed/extensions/v1beta1","kubernetes/typed/extensions/v1beta1/fake","kubernetes/typed/networking/v1","kubernetes/typed/networking/v1/fake","kubernetes/typed/policy/v1beta1","kubernetes/typed/policy/v1beta1/fake","kubernetes/typed/rbac/v1","kubernetes/typed/rbac/v1/fake","kubernetes/typed/rbac/v1alpha1","kubernetes/typed/rbac/v1alpha1/fake","kubernetes/typed/rbac/v1beta1","kubernetes/typed/rbac/v1beta1/fake","kubernetes/typed/scheduling/v1alpha1","kubernetes/typed/scheduling/v1alpha1/fake","kubernetes/typed/settings/v1alpha1","kubernetes/typed/settings/v1alpha1/fake","kubernetes/typed/storage/v1","kubernetes/typed/storage/v1/fake","kubernetes/typed/storage/v1alpha1","kubernetes/typed/storage/v1alpha1/fake","kubernetes/typed/storage/v1beta1","kubernetes/typed/storage/v1beta1/fake","listers/admissionregistration/v1alpha1","listers/admissionregistration/v1beta1","listers/apps/v1","listers/apps/v1beta1","listers/apps/v1beta2","listers/autoscaling/v1","listers/autoscaling/v2beta1","listers/batch/v1","listers/batch/v1beta1","listers/batch/v2alpha1","listers/certificates/v1beta1","listers/core/v1","listers/events/v1beta1","listers/extensions/v1beta1","listers/networking/v1","listers/policy/v1beta1","listers/rbac/v1","listers/rbac/v1alpha1","listers/rbac/v1beta1","listers/scheduling/v1alpha1","listers/settings/v1alpha1","listers/storage/v1","listers/storage/v1alpha1","listers/storage/v1beta1","pkg/version","plugin/pkg/client/auth/gcp","rest","rest/watch","testing","third_party/forked/golang/template","tools/auth","tools/cache","tools/clientcmd","tools/clientcmd/api","tools/clientcmd/api/latest","tools/clientcmd/api/v1","tools/metrics","tools/pager","tools/record","tools/reference","transport","util/buffer","util/cert","util/flowcontrol","util/homedir","util/integer","util/jsonpath","util/retry","util/workqueue"] revision = "kubernetes-1.9.0" +[[projects]] + branch = "master" + name = "k8s.io/cluster-registry" + packages = [ + "pkg/apis/clusterregistry/v1alpha1", + "pkg/client/clientset_generated/clientset", + "pkg/client/clientset_generated/clientset/scheme", + "pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1", + "pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1", + "pkg/client/informers_generated/externalversions/internalinterfaces", + "pkg/client/listers_generated/clusterregistry/v1alpha1" + ] + revision = "0309542bf91ca34c577e19769418561f65af5226" + [[projects]] branch = "master" name = "k8s.io/kube-openapi" @@ -339,6 +353,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "26bb8be4d39b9d22c64d67a816370a44a3e59cadbba946e4e8596d3fd067d9c9" + inputs-digest = "be35c28d01485c9d48cba15a847f2f6756c6bfd0ac3dae612d3c522566b2b48f" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 40c2018ba1..00cb1bd3f7 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -49,3 +49,7 @@ ignored = ["k8s.io/kubernetes/pkg/api"] [[constraint]] name = "github.com/opencontainers/go-digest" version = "1.0.0-rc1" + +[[constraint]] + branch = "master" + name = "k8s.io/cluster-registry" diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/BUILD.bazel new file mode 100644 index 0000000000..a313858659 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/BUILD.bazel @@ -0,0 +1,26 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "defaults.go", + "doc.go", + "generated.pb.go", + "register.go", + "types.go", + "zz_generated.deepcopy.go", + "zz_generated.defaults.go", + "zz_generated.openapi.go", + ], + importpath = "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/go-openapi/spec:go_default_library", + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/defaults.go b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/defaults.go new file mode 100644 index 0000000000..8949bb87cd --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/defaults.go @@ -0,0 +1,25 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/doc.go b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/doc.go new file mode 100644 index 0000000000..e04e51e957 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/doc.go @@ -0,0 +1,25 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1alpha1 is the v1alpha1 version of the clusterregistry API, whose +// internal version is defined in +// k8s.io/cluster-registry/pkg/apis/clusterregistry. +// +// +k8s:conversion-gen=k8s.io/cluster-registry/pkg/apis/clusterregistry +// +k8s:deepcopy-gen=package,register +// +k8s:openapi-gen=true +// +groupName=clusterregistry.k8s.io +package v1alpha1 // import "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.pb.go b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.pb.go new file mode 100644 index 0000000000..35ce815745 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.pb.go @@ -0,0 +1,1837 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.proto + +/* + Package v1alpha1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.proto + + It has these top-level messages: + AuthInfo + AuthProviderConfig + AuthProviderType + Cluster + ClusterList + ClusterSpec + ClusterStatus + KubernetesAPIEndpoints + ServerAddressByClientCIDR +*/ +package v1alpha1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import strings "strings" +import reflect "reflect" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *AuthInfo) Reset() { *m = AuthInfo{} } +func (*AuthInfo) ProtoMessage() {} +func (*AuthInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *AuthProviderConfig) Reset() { *m = AuthProviderConfig{} } +func (*AuthProviderConfig) ProtoMessage() {} +func (*AuthProviderConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *AuthProviderType) Reset() { *m = AuthProviderType{} } +func (*AuthProviderType) ProtoMessage() {} +func (*AuthProviderType) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + +func (m *Cluster) Reset() { *m = Cluster{} } +func (*Cluster) ProtoMessage() {} +func (*Cluster) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *ClusterList) Reset() { *m = ClusterList{} } +func (*ClusterList) ProtoMessage() {} +func (*ClusterList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func (m *ClusterSpec) Reset() { *m = ClusterSpec{} } +func (*ClusterSpec) ProtoMessage() {} +func (*ClusterSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *ClusterStatus) Reset() { *m = ClusterStatus{} } +func (*ClusterStatus) ProtoMessage() {} +func (*ClusterStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func (m *KubernetesAPIEndpoints) Reset() { *m = KubernetesAPIEndpoints{} } +func (*KubernetesAPIEndpoints) ProtoMessage() {} +func (*KubernetesAPIEndpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + +func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } +func (*ServerAddressByClientCIDR) ProtoMessage() {} +func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{8} +} + +func init() { + proto.RegisterType((*AuthInfo)(nil), "k8s.io.cluster_registry.pkg.apis.clusterregistry.v1alpha1.AuthInfo") + proto.RegisterType((*AuthProviderConfig)(nil), "k8s.io.cluster_registry.pkg.apis.clusterregistry.v1alpha1.AuthProviderConfig") + proto.RegisterType((*AuthProviderType)(nil), "k8s.io.cluster_registry.pkg.apis.clusterregistry.v1alpha1.AuthProviderType") + proto.RegisterType((*Cluster)(nil), "k8s.io.cluster_registry.pkg.apis.clusterregistry.v1alpha1.Cluster") + proto.RegisterType((*ClusterList)(nil), "k8s.io.cluster_registry.pkg.apis.clusterregistry.v1alpha1.ClusterList") + proto.RegisterType((*ClusterSpec)(nil), "k8s.io.cluster_registry.pkg.apis.clusterregistry.v1alpha1.ClusterSpec") + proto.RegisterType((*ClusterStatus)(nil), "k8s.io.cluster_registry.pkg.apis.clusterregistry.v1alpha1.ClusterStatus") + proto.RegisterType((*KubernetesAPIEndpoints)(nil), "k8s.io.cluster_registry.pkg.apis.clusterregistry.v1alpha1.KubernetesAPIEndpoints") + proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.cluster_registry.pkg.apis.clusterregistry.v1alpha1.ServerAddressByClientCIDR") +} +func (m *AuthInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AuthInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Providers) > 0 { + for _, msg := range m.Providers { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *AuthProviderConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AuthProviderConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Type.Size())) + n1, err := m.Type.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + if len(m.Config) > 0 { + keysForConfig := make([]string, 0, len(m.Config)) + for k := range m.Config { + keysForConfig = append(keysForConfig, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForConfig) + for _, k := range keysForConfig { + dAtA[i] = 0x1a + i++ + v := m.Config[string(k)] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *AuthProviderType) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AuthProviderType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + return i, nil +} + +func (m *Cluster) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Cluster) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) + n2, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) + n3, err := m.Spec.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + if m.Status != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) + n4, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} + +func (m *ClusterList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ClusterList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) + n5, err := m.ListMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + if len(m.Items) > 0 { + for _, msg := range m.Items { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ClusterSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ClusterSpec) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.KubernetesAPIEndpoints.Size())) + n6, err := m.KubernetesAPIEndpoints.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.AuthInfo.Size())) + n7, err := m.AuthInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} + +func (m *ClusterStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ClusterStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *KubernetesAPIEndpoints) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KubernetesAPIEndpoints) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ServerEndpoints) > 0 { + for _, msg := range m.ServerEndpoints { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.CABundle != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) + i += copy(dAtA[i:], m.CABundle) + } + return i, nil +} + +func (m *ServerAddressByClientCIDR) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServerAddressByClientCIDR) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClientCIDR))) + i += copy(dAtA[i:], m.ClientCIDR) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServerAddress))) + i += copy(dAtA[i:], m.ServerAddress) + return i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *AuthInfo) Size() (n int) { + var l int + _ = l + if len(m.Providers) > 0 { + for _, e := range m.Providers { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *AuthProviderConfig) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Type.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Config) > 0 { + for k, v := range m.Config { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + return n +} + +func (m *AuthProviderType) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Cluster) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ClusterList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ClusterSpec) Size() (n int) { + var l int + _ = l + l = m.KubernetesAPIEndpoints.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.AuthInfo.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ClusterStatus) Size() (n int) { + var l int + _ = l + return n +} + +func (m *KubernetesAPIEndpoints) Size() (n int) { + var l int + _ = l + if len(m.ServerEndpoints) > 0 { + for _, e := range m.ServerEndpoints { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.CABundle != nil { + l = len(m.CABundle) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ServerAddressByClientCIDR) Size() (n int) { + var l int + _ = l + l = len(m.ClientCIDR) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ServerAddress) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *AuthInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AuthInfo{`, + `Providers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Providers), "AuthProviderConfig", "AuthProviderConfig", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *AuthProviderConfig) String() string { + if this == nil { + return "nil" + } + keysForConfig := make([]string, 0, len(this.Config)) + for k := range this.Config { + keysForConfig = append(keysForConfig, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForConfig) + mapStringForConfig := "map[string]string{" + for _, k := range keysForConfig { + mapStringForConfig += fmt.Sprintf("%v: %v,", k, this.Config[k]) + } + mapStringForConfig += "}" + s := strings.Join([]string{`&AuthProviderConfig{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Type:` + strings.Replace(strings.Replace(this.Type.String(), "AuthProviderType", "AuthProviderType", 1), `&`, ``, 1) + `,`, + `Config:` + mapStringForConfig + `,`, + `}`, + }, "") + return s +} +func (this *AuthProviderType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AuthProviderType{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *Cluster) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Cluster{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterSpec", "ClusterSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "ClusterStatus", "ClusterStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Cluster", "Cluster", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterSpec{`, + `KubernetesAPIEndpoints:` + strings.Replace(strings.Replace(this.KubernetesAPIEndpoints.String(), "KubernetesAPIEndpoints", "KubernetesAPIEndpoints", 1), `&`, ``, 1) + `,`, + `AuthInfo:` + strings.Replace(strings.Replace(this.AuthInfo.String(), "AuthInfo", "AuthInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterStatus{`, + `}`, + }, "") + return s +} +func (this *KubernetesAPIEndpoints) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&KubernetesAPIEndpoints{`, + `ServerEndpoints:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ServerEndpoints), "ServerAddressByClientCIDR", "ServerAddressByClientCIDR", 1), `&`, ``, 1) + `,`, + `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, + `}`, + }, "") + return s +} +func (this *ServerAddressByClientCIDR) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServerAddressByClientCIDR{`, + `ClientCIDR:` + fmt.Sprintf("%v", this.ClientCIDR) + `,`, + `ServerAddress:` + fmt.Sprintf("%v", this.ServerAddress) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *AuthInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Providers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Providers = append(m.Providers, AuthProviderConfig{}) + if err := m.Providers[len(m.Providers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AuthProviderConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthProviderConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthProviderConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Type.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Config[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AuthProviderType) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthProviderType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthProviderType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Cluster) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Cluster: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Cluster: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &ClusterStatus{} + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Cluster{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KubernetesAPIEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.KubernetesAPIEndpoints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AuthInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KubernetesAPIEndpoints) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KubernetesAPIEndpoints: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KubernetesAPIEndpoints: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServerEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServerEndpoints = append(m.ServerEndpoints, ServerAddressByClientCIDR{}) + if err := m.ServerEndpoints[len(m.ServerEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...) + if m.CABundle == nil { + m.CABundle = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServerAddressByClientCIDR) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServerAddressByClientCIDR: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServerAddressByClientCIDR: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientCIDR", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientCIDR = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.proto", fileDescriptorGenerated) +} + +var fileDescriptorGenerated = []byte{ + // 795 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x3d, 0x6f, 0xdb, 0x46, + 0x18, 0xd6, 0x49, 0xb2, 0x2b, 0x9d, 0xac, 0xda, 0x3d, 0xb4, 0xae, 0xaa, 0x81, 0x16, 0x38, 0x69, + 0x31, 0x59, 0xab, 0x46, 0x61, 0xb7, 0x93, 0xa8, 0xba, 0xa8, 0xe0, 0xba, 0x75, 0xce, 0x5e, 0x12, + 0x04, 0x48, 0x4e, 0xd4, 0x99, 0x62, 0x24, 0x7e, 0x84, 0x77, 0x14, 0xa0, 0x25, 0x48, 0xd6, 0x20, + 0x43, 0xb6, 0xfc, 0x86, 0x00, 0xf9, 0x17, 0x59, 0x3c, 0x7a, 0xc8, 0xe0, 0x21, 0x30, 0x62, 0x25, + 0x3f, 0x24, 0x20, 0x79, 0x24, 0xf5, 0x11, 0xc1, 0x41, 0xe4, 0x49, 0xbc, 0xbb, 0xf7, 0xf9, 0x78, + 0x9f, 0x3b, 0xbd, 0xb0, 0xdd, 0xdf, 0x63, 0x8a, 0xe9, 0xa8, 0xfa, 0xc0, 0x67, 0x9c, 0x7a, 0xdb, + 0x1e, 0x35, 0x4c, 0xc6, 0xbd, 0x91, 0xea, 0xf6, 0x0d, 0x95, 0xb8, 0x26, 0x8b, 0x4f, 0x92, 0x83, + 0xe1, 0x0e, 0x19, 0xb8, 0x3d, 0xb2, 0xa3, 0x1a, 0xd4, 0xa6, 0x1e, 0xe1, 0xb4, 0xab, 0xb8, 0x9e, + 0xc3, 0x1d, 0xb4, 0x1f, 0x51, 0x29, 0x02, 0xf0, 0x20, 0x46, 0x28, 0x6e, 0xdf, 0x50, 0x02, 0x2a, + 0x65, 0x86, 0x4a, 0x89, 0xa9, 0xaa, 0xdb, 0x86, 0xc9, 0x7b, 0x7e, 0x47, 0xd1, 0x1d, 0x4b, 0x35, + 0x1c, 0xc3, 0x51, 0x43, 0xc6, 0x8e, 0x7f, 0x16, 0xae, 0xc2, 0x45, 0xf8, 0x15, 0x29, 0x55, 0x77, + 0x85, 0x69, 0xe2, 0x9a, 0x16, 0xd1, 0x7b, 0xa6, 0x4d, 0x27, 0x0d, 0x5b, 0x94, 0x13, 0x75, 0x38, + 0xe7, 0xaf, 0xaa, 0x2e, 0x42, 0x79, 0xbe, 0xcd, 0x4d, 0x8b, 0xce, 0x01, 0x7e, 0xbf, 0x09, 0xc0, + 0xf4, 0x1e, 0xb5, 0xc8, 0x1c, 0xee, 0xb7, 0x45, 0x38, 0x9f, 0x9b, 0x03, 0xd5, 0xb4, 0x39, 0xe3, + 0xde, 0x2c, 0x48, 0x7e, 0x0e, 0x60, 0xa1, 0xe9, 0xf3, 0x5e, 0xdb, 0x3e, 0x73, 0xd0, 0x13, 0x58, + 0x74, 0x3d, 0x67, 0x68, 0x76, 0xa9, 0xc7, 0x2a, 0xa0, 0x96, 0xab, 0x97, 0x1a, 0x47, 0xca, 0x37, + 0xc7, 0xab, 0x04, 0xbc, 0xc7, 0x82, 0xaf, 0xe5, 0xd8, 0x67, 0xa6, 0xa1, 0xfd, 0x70, 0x7e, 0xb5, + 0x95, 0x19, 0x5f, 0x6d, 0x15, 0xe3, 0x7d, 0x86, 0x53, 0x49, 0xf9, 0x53, 0x16, 0xa2, 0x79, 0x10, + 0xaa, 0xc1, 0xbc, 0x4d, 0x2c, 0x5a, 0x01, 0x35, 0x50, 0x2f, 0x6a, 0x6b, 0x82, 0x22, 0xff, 0x1f, + 0xb1, 0x28, 0x0e, 0x4f, 0x90, 0x05, 0xf3, 0x7c, 0xe4, 0xd2, 0x4a, 0xb6, 0x06, 0xea, 0xa5, 0xc6, + 0xe1, 0x2d, 0x79, 0x3e, 0x1d, 0xb9, 0x34, 0x95, 0x0b, 0x56, 0x38, 0x94, 0x41, 0xcf, 0x00, 0x5c, + 0xd5, 0x43, 0x6f, 0x95, 0x5c, 0x98, 0xd2, 0xdd, 0x5b, 0x4d, 0x49, 0x89, 0x7e, 0x0e, 0x6c, 0xee, + 0x8d, 0xb4, 0xef, 0x85, 0xfe, 0x6a, 0xb4, 0x89, 0x85, 0x70, 0x75, 0x1f, 0x96, 0x26, 0xca, 0xd0, + 0x06, 0xcc, 0xf5, 0xe9, 0x28, 0x8a, 0x08, 0x07, 0x9f, 0xe8, 0x47, 0xb8, 0x32, 0x24, 0x03, 0x3f, + 0x0a, 0xa5, 0x88, 0xa3, 0xc5, 0x1f, 0xd9, 0x3d, 0x20, 0xef, 0xc2, 0x8d, 0xd9, 0x36, 0x6f, 0xce, + 0x58, 0x7e, 0x9b, 0x85, 0xdf, 0xb5, 0xa2, 0x26, 0xd0, 0x43, 0x58, 0x08, 0x9e, 0x7b, 0x97, 0x70, + 0x12, 0x22, 0x4a, 0x8d, 0x5f, 0xe3, 0x04, 0x26, 0x5f, 0x5f, 0xda, 0x7d, 0x50, 0xad, 0x0c, 0x77, + 0x94, 0xff, 0x3b, 0x8f, 0xa8, 0xce, 0x8f, 0x28, 0x27, 0x1a, 0x12, 0x1a, 0x30, 0xdd, 0xc3, 0x09, + 0x2b, 0xea, 0xc1, 0x3c, 0x73, 0xa9, 0x2e, 0x6e, 0xf4, 0xef, 0x25, 0xf2, 0x15, 0x9e, 0x4f, 0x5c, + 0xaa, 0xa7, 0x7d, 0x05, 0x2b, 0x1c, 0x2a, 0xa0, 0x01, 0x5c, 0x65, 0x9c, 0x70, 0x9f, 0x55, 0x72, + 0xa1, 0xd6, 0x3f, 0xb7, 0xa0, 0x15, 0xf2, 0x69, 0x30, 0xb8, 0xb6, 0xe8, 0x1b, 0x0b, 0x0d, 0xf9, + 0x1d, 0x80, 0x25, 0x51, 0xf5, 0xaf, 0xc9, 0x38, 0xba, 0x3f, 0x97, 0xa4, 0xf2, 0x75, 0x49, 0x06, + 0xe8, 0x30, 0xc7, 0x0d, 0xd1, 0x53, 0x21, 0xde, 0x99, 0x48, 0xd1, 0x80, 0x2b, 0x26, 0xa7, 0x16, + 0xab, 0x64, 0xc3, 0x67, 0xaa, 0x2d, 0xdf, 0x9a, 0x56, 0x16, 0x72, 0x2b, 0xed, 0x80, 0x18, 0x47, + 0xfc, 0xf2, 0x9b, 0x6c, 0xd2, 0x56, 0x10, 0x2d, 0x7a, 0x0d, 0xe0, 0x66, 0xdf, 0xef, 0x50, 0xcf, + 0xa6, 0x9c, 0xb2, 0xa6, 0x6b, 0x1e, 0xd8, 0x5d, 0xd7, 0x09, 0x66, 0x90, 0xe8, 0xf2, 0xce, 0x12, + 0x56, 0x0e, 0x53, 0xe2, 0xe3, 0x76, 0x42, 0xac, 0x49, 0xc2, 0xd9, 0xe6, 0x97, 0xcf, 0xf1, 0x02, + 0x43, 0xe8, 0x31, 0x2c, 0x10, 0x31, 0x01, 0xc5, 0x73, 0x6b, 0x2d, 0xf9, 0x77, 0x0e, 0xa8, 0xd2, + 0x7b, 0x89, 0x77, 0x70, 0x22, 0x23, 0xaf, 0xc3, 0xf2, 0xd4, 0x53, 0x91, 0xdf, 0x03, 0xb8, 0xc0, + 0x36, 0x7a, 0x05, 0xe0, 0x3a, 0xa3, 0xde, 0x90, 0x7a, 0x93, 0x19, 0x06, 0xd7, 0x79, 0xba, 0x84, + 0xcd, 0x93, 0x90, 0xb1, 0xd9, 0xed, 0x7a, 0x94, 0x31, 0x6d, 0xd4, 0x1a, 0x98, 0xd4, 0xe6, 0xad, + 0xf6, 0x5f, 0x58, 0xfb, 0x59, 0xf8, 0x5e, 0x3f, 0x99, 0x16, 0xc5, 0xb3, 0x2e, 0x50, 0x1d, 0x16, + 0x74, 0xa2, 0xf9, 0x76, 0x77, 0x10, 0x0d, 0x99, 0x35, 0x6d, 0x2d, 0xe8, 0xb7, 0xd5, 0x8c, 0xf6, + 0x70, 0x72, 0x2a, 0xbf, 0x00, 0xf0, 0x97, 0x85, 0x8a, 0xa8, 0x01, 0xa1, 0x9e, 0xac, 0xc4, 0x04, + 0x4a, 0xa6, 0x43, 0x5a, 0x87, 0x27, 0xaa, 0xd0, 0x9f, 0xb0, 0xcc, 0x26, 0x09, 0xa3, 0x29, 0xa7, + 0xfd, 0x24, 0x60, 0xe5, 0x29, 0x35, 0x3c, 0x5d, 0xab, 0x29, 0xe7, 0xd7, 0x52, 0xe6, 0xe2, 0x5a, + 0xca, 0x5c, 0x5e, 0x4b, 0x99, 0xa7, 0x63, 0x09, 0x9c, 0x8f, 0x25, 0x70, 0x31, 0x96, 0xc0, 0xe5, + 0x58, 0x02, 0x1f, 0xc6, 0x12, 0x78, 0xf9, 0x51, 0xca, 0xdc, 0x2b, 0xc4, 0x61, 0x7d, 0x0e, 0x00, + 0x00, 0xff, 0xff, 0xba, 0x72, 0xe4, 0xce, 0xae, 0x08, 0x00, 0x00, +} diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.proto b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.proto new file mode 100644 index 0000000000..b8c66e3f1e --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/generated.proto @@ -0,0 +1,152 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.cluster_registry.pkg.apis.clusterregistry.v1alpha1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1alpha1"; + +// AuthInfo holds public information that describes how a client can get +// credentials to access the cluster. For example, OAuth2 client registration +// endpoints and supported flows, or Kerberos servers locations. +// +// It should not hold any private or sensitive information. +message AuthInfo { + // AuthProviders is a list of configurations for auth providers. + // +optional + repeated AuthProviderConfig providers = 1; +} + +// AuthProviderConfig contains the information necessary for a client to +// authenticate to a Kubernetes API server. It is modeled after +// k8s.io/client-go/tools/clientcmd/api/v1.AuthProviderConfig. +message AuthProviderConfig { + // Name is the name of this configuration. + // +optional + optional string name = 1; + + // Type contains type information about this auth provider. Clients of the + // cluster registry should use this field to differentiate between different + // kinds of authentication providers. + // +optional + optional AuthProviderType type = 2; + + // Config is a map of values that contains the information necessary for a + // client to determine how to authenticate to a Kubernetes API server. + // +optional + map config = 3; +} + +// AuthProviderType contains metadata about the auth provider. It should be used +// by clients to differentiate between different kinds of auth providers, and to +// select a relevant provider for the client's configuration. For example, a +// controller would look for a provider type that denotes a service account +// that it should use to access the cluster, whereas a user would look for a +// provider type that denotes an authentication system from which they should +// request a token. +message AuthProviderType { + // Name is the name of the auth provider. + // +optional + optional string name = 1; +} + +// Cluster contains information about a cluster in a cluster registry. +// +k8s:openapi-gen=x-kubernetes-print-columns:custom-columns=NAME:.metadata.name,CIDR:.spec.kubernetesApiEndpoints.serverEndpoints[].clientCIDR,SERVER:.spec.kubernetesApiEndpoints.serverEndpoints[].serverAddress,CREATION TIME:.metadata.creationTimestamp +message Cluster { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec is the specification of the cluster. This may or may not be + // reconciled by an active controller. + // +optional + optional ClusterSpec spec = 2; + + // Status is the status of the cluster. It is optional, and can be left nil + // to imply that the cluster status is not being reported. + // +optional + optional ClusterStatus status = 3; +} + +// ClusterList is a list of Kubernetes clusters in the cluster registry. +message ClusterList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // List of Cluster objects. + repeated Cluster items = 2; +} + +// ClusterSpec contains the specification of a cluster. +message ClusterSpec { + // KubernetesAPIEndpoints represents the endpoints of the API server for this + // cluster. + // +optional + optional KubernetesAPIEndpoints kubernetesApiEndpoints = 1; + + // AuthInfo contains public information that can be used to authenticate + // to and authorize with this cluster. It is not meant to store private + // information (e.g., tokens or client certificates) and cluster registry + // implementations are not expected to provide hardened storage for + // secrets. + // +optional + optional AuthInfo authInfo = 2; +} + +// ClusterStatus contains the status of a cluster. +message ClusterStatus { +} + +// KubernetesAPIEndpoints represents the endpoints for one and only one +// Kubernetes API server. +message KubernetesAPIEndpoints { + // ServerEndpoints specifies the address(es) of the Kubernetes API server’s + // network identity or identities. + // +optional + repeated ServerAddressByClientCIDR serverEndpoints = 1; + + // CABundle contains the certificate authority information. + // +optional + optional bytes caBundle = 2; +} + +// ServerAddressByClientCIDR helps clients determine the server address that +// they should use, depending on the ClientCIDR that they match. +message ServerAddressByClientCIDR { + // The CIDR with which clients can match their IP to figure out if they should + // use the corresponding server address. + // +optional + optional string clientCIDR = 1; + + // Address of this server, suitable for a client that matches the above CIDR. + // This can be a hostname, hostname:port, IP or IP:port. + // +optional + optional string serverAddress = 2; +} + diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/register.go b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/register.go new file mode 100644 index 0000000000..936bb7a4fd --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/register.go @@ -0,0 +1,61 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "clusterregistry.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + // SchemeBuilder builds runtime.Scheme objects for the Cluster API objects. See + // https://godoc.org/k8s.io/apimachinery/pkg/runtime#Scheme for more info. + SchemeBuilder runtime.SchemeBuilder + + localSchemeBuilder = &SchemeBuilder + + // AddToScheme is a function that adds objects to the Cluster API scheme builder. + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &Cluster{}, + &ClusterList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/types.go b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/types.go new file mode 100644 index 0000000000..ba4e211caf --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/types.go @@ -0,0 +1,150 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Cluster contains information about a cluster in a cluster registry. +// +k8s:openapi-gen=x-kubernetes-print-columns:custom-columns=NAME:.metadata.name,CIDR:.spec.kubernetesApiEndpoints.serverEndpoints[].clientCIDR,SERVER:.spec.kubernetesApiEndpoints.serverEndpoints[].serverAddress,CREATION TIME:.metadata.creationTimestamp +type Cluster struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec is the specification of the cluster. This may or may not be + // reconciled by an active controller. + // +optional + Spec ClusterSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + // Status is the status of the cluster. It is optional, and can be left nil + // to imply that the cluster status is not being reported. + // +optional + Status *ClusterStatus `json:"status" protobuf:"bytes,3,opt,name=status"` +} + +// ClusterSpec contains the specification of a cluster. +type ClusterSpec struct { + // KubernetesAPIEndpoints represents the endpoints of the API server for this + // cluster. + // +optional + KubernetesAPIEndpoints KubernetesAPIEndpoints `json:"kubernetesApiEndpoints,omitempty" protobuf:"bytes,1,opt,name=kubernetesApiEndpoints"` + + // AuthInfo contains public information that can be used to authenticate + // to and authorize with this cluster. It is not meant to store private + // information (e.g., tokens or client certificates) and cluster registry + // implementations are not expected to provide hardened storage for + // secrets. + // +optional + AuthInfo AuthInfo `json:"authInfo,omitempty" protobuf:"bytes,2,opt,name=authInfo"` +} + +// ClusterStatus contains the status of a cluster. +type ClusterStatus struct { + // TODO https://github.com/kubernetes/cluster-registry/issues/28 +} + +// KubernetesAPIEndpoints represents the endpoints for one and only one +// Kubernetes API server. +type KubernetesAPIEndpoints struct { + // ServerEndpoints specifies the address(es) of the Kubernetes API server’s + // network identity or identities. + // +optional + ServerEndpoints []ServerAddressByClientCIDR `json:"serverEndpoints,omitempty" protobuf:"bytes,1,rep,name=serverEndpoints"` + + // CABundle contains the certificate authority information. + // +optional + CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,2,opt,name=caBundle"` +} + +// ServerAddressByClientCIDR helps clients determine the server address that +// they should use, depending on the ClientCIDR that they match. +type ServerAddressByClientCIDR struct { + // The CIDR with which clients can match their IP to figure out if they should + // use the corresponding server address. + // +optional + ClientCIDR string `json:"clientCIDR,omitempty" protobuf:"bytes,1,opt,name=clientCIDR"` + // Address of this server, suitable for a client that matches the above CIDR. + // This can be a hostname, hostname:port, IP or IP:port. + // +optional + ServerAddress string `json:"serverAddress,omitempty" protobuf:"bytes,2,opt,name=serverAddress"` +} + +// AuthInfo holds public information that describes how a client can get +// credentials to access the cluster. For example, OAuth2 client registration +// endpoints and supported flows, or Kerberos servers locations. +// +// It should not hold any private or sensitive information. +type AuthInfo struct { + // AuthProviders is a list of configurations for auth providers. + // +optional + Providers []AuthProviderConfig `json:"providers" protobuf:"bytes,1,rep,name=providers"` +} + +// AuthProviderConfig contains the information necessary for a client to +// authenticate to a Kubernetes API server. It is modeled after +// k8s.io/client-go/tools/clientcmd/api/v1.AuthProviderConfig. +type AuthProviderConfig struct { + // Name is the name of this configuration. + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` + + // Type contains type information about this auth provider. Clients of the + // cluster registry should use this field to differentiate between different + // kinds of authentication providers. + // +optional + Type AuthProviderType `json:"type,omitempty" protobuf:"bytes,2,opt,name=type"` + + // Config is a map of values that contains the information necessary for a + // client to determine how to authenticate to a Kubernetes API server. + // +optional + Config map[string]string `json:"config,omitempty" protobuf:"bytes,3,rep,name=config"` +} + +// AuthProviderType contains metadata about the auth provider. It should be used +// by clients to differentiate between different kinds of auth providers, and to +// select a relevant provider for the client's configuration. For example, a +// controller would look for a provider type that denotes a service account +// that it should use to access the cluster, whereas a user would look for a +// provider type that denotes an authentication system from which they should +// request a token. +type AuthProviderType struct { + // Name is the name of the auth provider. + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterList is a list of Kubernetes clusters in the cluster registry. +type ClusterList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // List of Cluster objects. + Items []Cluster `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/BUILD.bazel new file mode 100644 index 0000000000..0ea22caa24 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/BUILD.bazel @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["validation.go"], + importpath = "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/clusterregistry/v1alpha1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/validation:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = ["validation_test.go"], + embed = [":go_default_library"], + importpath = "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation", + deps = [ + "//pkg/apis/clusterregistry/v1alpha1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/validation.go b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/validation.go new file mode 100644 index 0000000000..67c5f305d5 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/validation.go @@ -0,0 +1,49 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package validation defines validation routines for the clusterregistry API. +package validation + +import ( + "k8s.io/apimachinery/pkg/api/validation" + "k8s.io/apimachinery/pkg/util/validation/field" + clusterregistry "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" +) + +// ValidateCluster ensures that a newly-created Cluster is valid. +func ValidateCluster(cluster *clusterregistry.Cluster) field.ErrorList { + allErrs := validation.ValidateObjectMeta(&cluster.ObjectMeta, false, validation.ValidateClusterName, field.NewPath("metadata")) + allErrs = append(allErrs, validateClusterName(cluster)...) + return allErrs +} + +// ValidateClusterUpdate ensures that an update to a Cluster is valid. +func ValidateClusterUpdate(cluster, oldCluster *clusterregistry.Cluster) field.ErrorList { + allErrs := validation.ValidateObjectMetaUpdate(&cluster.ObjectMeta, &oldCluster.ObjectMeta, field.NewPath("metadata")) + if cluster.Name != oldCluster.Name { + allErrs = append(allErrs, field.Invalid(field.NewPath("metadata", "name"), + cluster.Name+" != "+oldCluster.Name, "cannot change cluster name")) + } + allErrs = append(allErrs, validateClusterName(cluster)...) + return allErrs +} + +func validateClusterName(cluster *clusterregistry.Cluster) field.ErrorList { + if len(cluster.ClusterName) > 0 { + return field.ErrorList{field.Invalid(field.NewPath("metadata", "clusterName"), "len(ClusterName) > 0", "clusterName is not used and must not be set.")} + } + return field.ErrorList{} +} diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/validation_test.go b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/validation_test.go new file mode 100644 index 0000000000..b2b11a7ec1 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/validation/validation_test.go @@ -0,0 +1,111 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + clusterregistry "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" +) + +func TestValidateCluster(t *testing.T) { + successCases := []clusterregistry.Cluster{ + {ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}}, + } + for _, successCase := range successCases { + errs := ValidateCluster(&successCase) + if len(errs) != 0 { + t.Errorf("expect success: %v", errs) + } + } + + errorCases := map[string]clusterregistry.Cluster{ + "invalid label": { + ObjectMeta: metav1.ObjectMeta{ + Name: "cluster-f", + Labels: map[string]string{ + "NoUppercaseOrSpecialCharsLike=Equals": "bar", + }, + }, + }, + "invalid cluster name (is a subdomain)": { + ObjectMeta: metav1.ObjectMeta{Name: "mycluster.mycompany"}, + }, + "clusterName is set": { + ObjectMeta: metav1.ObjectMeta{Name: "mycluster", ClusterName: "nonEmpty"}, + }, + } + for testName, errorCase := range errorCases { + errs := ValidateCluster(&errorCase) + if len(errs) == 0 { + t.Errorf("expected failure for %s", testName) + } + } +} + +func TestValidateClusterUpdate(t *testing.T) { + type clusterUpdateTest struct { + old clusterregistry.Cluster + update clusterregistry.Cluster + } + successCases := []clusterUpdateTest{ + { + old: clusterregistry.Cluster{ + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, + }, + update: clusterregistry.Cluster{ + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, + }, + }, + } + for _, successCase := range successCases { + successCase.old.ObjectMeta.ResourceVersion = "1" + successCase.update.ObjectMeta.ResourceVersion = "1" + errs := ValidateClusterUpdate(&successCase.update, &successCase.old) + if len(errs) != 0 { + t.Errorf("expect success: %v", errs) + } + } + + errorCases := map[string]clusterUpdateTest{ + "cluster name changed": { + old: clusterregistry.Cluster{ + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, + }, + update: clusterregistry.Cluster{ + ObjectMeta: metav1.ObjectMeta{Name: "cluster-newname"}, + }, + }, + "clusterName is set": { + old: clusterregistry.Cluster{ + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, + }, + update: clusterregistry.Cluster{ + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s", ClusterName: "nonEmpty"}, + }, + }, + } + for testName, errorCase := range errorCases { + errorCase.old.ObjectMeta.ResourceVersion = "1" + errorCase.update.ObjectMeta.ResourceVersion = "1" + errs := ValidateClusterUpdate(&errorCase.update, &errorCase.old) + if len(errs) == 0 { + t.Errorf("expected failure: %s", testName) + } + } +} diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..b7f54cff84 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,235 @@ +// +build !ignore_autogenerated + +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthInfo) DeepCopyInto(out *AuthInfo) { + *out = *in + if in.Providers != nil { + in, out := &in.Providers, &out.Providers + *out = make([]AuthProviderConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthInfo. +func (in *AuthInfo) DeepCopy() *AuthInfo { + if in == nil { + return nil + } + out := new(AuthInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthProviderConfig) DeepCopyInto(out *AuthProviderConfig) { + *out = *in + out.Type = in.Type + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthProviderConfig. +func (in *AuthProviderConfig) DeepCopy() *AuthProviderConfig { + if in == nil { + return nil + } + out := new(AuthProviderConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthProviderType) DeepCopyInto(out *AuthProviderType) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthProviderType. +func (in *AuthProviderType) DeepCopy() *AuthProviderType { + if in == nil { + return nil + } + out := new(AuthProviderType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Cluster) DeepCopyInto(out *Cluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + if *in == nil { + *out = nil + } else { + *out = new(ClusterStatus) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. +func (in *Cluster) DeepCopy() *Cluster { + if in == nil { + return nil + } + out := new(Cluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Cluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterList) DeepCopyInto(out *ClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Cluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. +func (in *ClusterList) DeepCopy() *ClusterList { + if in == nil { + return nil + } + out := new(ClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { + *out = *in + in.KubernetesAPIEndpoints.DeepCopyInto(&out.KubernetesAPIEndpoints) + in.AuthInfo.DeepCopyInto(&out.AuthInfo) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. +func (in *ClusterSpec) DeepCopy() *ClusterSpec { + if in == nil { + return nil + } + out := new(ClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. +func (in *ClusterStatus) DeepCopy() *ClusterStatus { + if in == nil { + return nil + } + out := new(ClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesAPIEndpoints) DeepCopyInto(out *KubernetesAPIEndpoints) { + *out = *in + if in.ServerEndpoints != nil { + in, out := &in.ServerEndpoints, &out.ServerEndpoints + *out = make([]ServerAddressByClientCIDR, len(*in)) + copy(*out, *in) + } + if in.CABundle != nil { + in, out := &in.CABundle, &out.CABundle + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesAPIEndpoints. +func (in *KubernetesAPIEndpoints) DeepCopy() *KubernetesAPIEndpoints { + if in == nil { + return nil + } + out := new(KubernetesAPIEndpoints) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerAddressByClientCIDR) DeepCopyInto(out *ServerAddressByClientCIDR) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerAddressByClientCIDR. +func (in *ServerAddressByClientCIDR) DeepCopy() *ServerAddressByClientCIDR { + if in == nil { + return nil + } + out := new(ServerAddressByClientCIDR) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.defaults.go new file mode 100644 index 0000000000..5e24d22cac --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.openapi.go b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.openapi.go new file mode 100644 index 0000000000..604d0fb037 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1/zz_generated.openapi.go @@ -0,0 +1,1871 @@ +// +build !ignore_autogenerated + +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +package v1alpha1 + +import ( + spec "github.com/go-openapi/spec" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + common "k8s.io/kube-openapi/pkg/common" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{ + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIGroup contains the name, the supported versions, and the preferred version of a group.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the group.", + Type: []string{"string"}, + Format: "", + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions are the versions supported in this group.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + }, + }, + }, + }, + }, + "preferredVersion": { + SchemaProps: spec.SchemaProps{ + Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + }, + }, + "serverAddressByClientCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "versions", "serverAddressByClientCIDRs"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "groups": { + SchemaProps: spec.SchemaProps{ + Description: "groups is a list of APIGroup.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), + }, + }, + }, + }, + }, + }, + Required: []string{"groups"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIResource specifies the name of a resource and whether it is namespaced.", + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the plural name of the resource.", + Type: []string{"string"}, + Format: "", + }, + }, + "singularName": { + SchemaProps: spec.SchemaProps{ + Description: "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespaced": { + SchemaProps: spec.SchemaProps{ + Description: "namespaced indicates if a resource is namespaced or not.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + Type: []string{"string"}, + Format: "", + }, + }, + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "shortNames": { + SchemaProps: spec.SchemaProps{ + Description: "shortNames is a list of suggested short names of the resource.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "categories": { + SchemaProps: spec.SchemaProps{ + Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"name", "singularName", "namespaced", "kind", "verbs"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "groupVersion": { + SchemaProps: spec.SchemaProps{ + Description: "groupVersion is the group and version this APIResourceList is for.", + Type: []string{"string"}, + Format: "", + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "resources contains the name of the resources and if they are namespaced.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), + }, + }, + }, + }, + }, + }, + Required: []string{"groupVersion", "resources"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions are the api versions that are available.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "serverAddressByClientCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + }, + }, + }, + }, + }, + }, + Required: []string{"versions", "serverAddressByClientCIDRs"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeleteOptions may be provided when deleting an API object.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "gracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "preconditions": { + SchemaProps: spec.SchemaProps{ + Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + }, + }, + "orphanDependents": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "propagationPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", + Properties: map[string]spec.Schema{ + "Duration": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"Duration"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.ExportOptions": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExportOptions is the query options to the standard REST get call.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "export": { + SchemaProps: spec.SchemaProps{ + Description: "Should this value be exported. Export strips fields that a user can not specify.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "exact": { + SchemaProps: spec.SchemaProps{ + Description: "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"export", "exact"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GetOptions is the standard query options to the standard REST get call.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + Type: []string{"string"}, + Format: "", + }, + }, + "includeUninitialized": { + SchemaProps: spec.SchemaProps{ + Description: "If true, partially initialized resources are included in the response.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "kind"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "resource"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.", + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "version"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", + Properties: map[string]spec.Schema{ + "groupVersion": { + SchemaProps: spec.SchemaProps{ + Description: "groupVersion specifies the API group and version in the form \"group/version\"", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"groupVersion", "version"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "version", "kind"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "version", "resource"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.Initializer": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Initializer is information about an initializer that has not yet completed.", + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name of the process that is responsible for initializing this object.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.Initializers": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Initializers tracks the progress of initialization.", + Properties: map[string]spec.Schema{ + "pending": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Initializer"), + }, + }, + }, + }, + }, + "result": { + SchemaProps: spec.SchemaProps{ + Description: "If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), + }, + }, + }, + Required: []string{"pending"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Initializer", "k8s.io/apimachinery/pkg/apis/meta/v1.Status"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalEvent makes watch.Event versioned", + Properties: map[string]spec.Schema{ + "Type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "Object": { + SchemaProps: spec.SchemaProps{ + Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), + }, + }, + }, + Required: []string{"Type", "Object"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.Object"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + Properties: map[string]spec.Schema{ + "matchLabels": { + SchemaProps: spec.SchemaProps{ + Description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "matchExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + Properties: map[string]spec.Schema{ + "key": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "key", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "key is the label key that the selector applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"key", "operator"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.List": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "List holds a list of objects, which may not be known by the server.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + Properties: map[string]spec.Schema{ + "selfLink": { + SchemaProps: spec.SchemaProps{ + Description: "selfLink is a URL representing this object. Populated by the system. Read-only.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", + Type: []string{"string"}, + Format: "", + }, + }, + "continue": { + SchemaProps: spec.SchemaProps{ + Description: "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ListOptions is the query options to a standard REST list call.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + Type: []string{"string"}, + Format: "", + }, + }, + "includeUninitialized": { + SchemaProps: spec.SchemaProps{ + Description: "If true, partially initialized resources are included in the response.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "watch": { + SchemaProps: spec.SchemaProps{ + Description: "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Timeout for the list/watch call.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "limit": { + SchemaProps: spec.SchemaProps{ + Description: "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "continue": { + SchemaProps: spec.SchemaProps{ + Description: "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": v1.MicroTime{}.OpenAPIDefinition(), + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", + }, + }, + "generateName": { + SchemaProps: spec.SchemaProps{ + Description: "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + Type: []string{"string"}, + Format: "", + }, + }, + "selfLink": { + SchemaProps: spec.SchemaProps{ + Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", + Type: []string{"string"}, + Format: "", + }, + }, + "generation": { + SchemaProps: spec.SchemaProps{ + Description: "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "creationTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deletionTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deletionGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "ownerReferences": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + }, + }, + }, + }, + }, + "initializers": { + SchemaProps: spec.SchemaProps{ + Description: "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Initializers"), + }, + }, + "finalizers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "clusterName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Initializers", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API version of the referent.", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "controller": { + SchemaProps: spec.SchemaProps{ + Description: "If true, this reference points to the managing controller.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "blockOwnerDeletion": { + SchemaProps: spec.SchemaProps{ + Description: "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"apiVersion", "kind", "name", "uid"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the target UID.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", + Properties: map[string]spec.Schema{ + "paths": { + SchemaProps: spec.SchemaProps{ + Description: "paths are the paths available at root.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"paths"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + Properties: map[string]spec.Schema{ + "clientCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", + Type: []string{"string"}, + Format: "", + }, + }, + "serverAddress": { + SchemaProps: spec.SchemaProps{ + Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"clientCIDR", "serverAddress"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.Status": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Status is a return value for calls that don't return other objects.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable description of the status of this operation.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + Type: []string{"string"}, + Format: "", + }, + }, + "details": { + SchemaProps: spec.SchemaProps{ + Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), + }, + }, + "code": { + SchemaProps: spec.SchemaProps{ + Description: "Suggested HTTP return code for this status, 0 if not set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + Properties: map[string]spec.Schema{ + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "A machine-readable description of the cause of the error. If this value is empty there is no information available.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + Type: []string{"string"}, + Format: "", + }, + }, + "field": { + SchemaProps: spec.SchemaProps{ + Description: "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", + Type: []string{"string"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "The group attribute of the resource associated with the status StatusReason.", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "causes": { + SchemaProps: spec.SchemaProps{ + Description: "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), + }, + }, + }, + }, + }, + "retryAfterSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time": v1.Time{}.OpenAPIDefinition(), + "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.", + Properties: map[string]spec.Schema{ + "seconds": { + SchemaProps: spec.SchemaProps{ + Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "nanos": { + SchemaProps: spec.SchemaProps{ + Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"seconds", "nanos"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event represents a single event to a watched resource.", + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"type", "object"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + }, + "k8s.io/apimachinery/pkg/runtime.RawExtension": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", + Properties: map[string]spec.Schema{ + "Raw": { + SchemaProps: spec.SchemaProps{ + Description: "Raw is the underlying serialization of this object.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + Required: []string{"Raw"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/runtime.TypeMeta": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this: type MyAwesomeAPIObject struct {\n runtime.TypeMeta `json:\",inline\"`\n ... // other fields\n} func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind\n\nTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.", + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/runtime.Unknown": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.", + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "Raw": { + SchemaProps: spec.SchemaProps{ + Description: "Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.", + Type: []string{"string"}, + Format: "byte", + }, + }, + "ContentEncoding": { + SchemaProps: spec.SchemaProps{ + Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", + Type: []string{"string"}, + Format: "", + }, + }, + "ContentType": { + SchemaProps: spec.SchemaProps{ + Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"Raw", "ContentEncoding", "ContentType"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/apimachinery/pkg/version.Info": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Info contains versioning information. how we'll want to distribute that information.", + Properties: map[string]spec.Schema{ + "major": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "minor": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "gitVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "gitCommit": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "gitTreeState": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "buildDate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "goVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "compiler": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "platform": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.AuthInfo": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AuthInfo holds public information that describes how a client can get credentials to access the cluster. For example, OAuth2 client registration endpoints and supported flows, or Kerberos servers locations.\n\nIt should not hold any private or sensitive information.", + Properties: map[string]spec.Schema{ + "providers": { + SchemaProps: spec.SchemaProps{ + Description: "AuthProviders is a list of configurations for auth providers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.AuthProviderConfig"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.AuthProviderConfig"}, + }, + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.AuthProviderConfig": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AuthProviderConfig contains the information necessary for a client to authenticate to a Kubernetes API server. It is modeled after k8s.io/client-go/tools/clientcmd/api/v1.AuthProviderConfig.", + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of this configuration.", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type contains type information about this auth provider. Clients of the cluster registry should use this field to differentiate between different kinds of authentication providers.", + Ref: ref("k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.AuthProviderType"), + }, + }, + "config": { + SchemaProps: spec.SchemaProps{ + Description: "Config is a map of values that contains the information necessary for a client to determine how to authenticate to a Kubernetes API server.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.AuthProviderType"}, + }, + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.AuthProviderType": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AuthProviderType contains metadata about the auth provider. It should be used by clients to differentiate between different kinds of auth providers, and to select a relevant provider for the client's configuration. For example, a controller would look for a provider type that denotes a service account that it should use to access the cluster, whereas a user would look for a provider type that denotes an authentication system from which they should request a token.", + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the auth provider.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.Cluster": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Cluster contains information about a cluster in a cluster registry.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec is the specification of the cluster. This may or may not be reconciled by an active controller.", + Ref: ref("k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.ClusterSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the status of the cluster. It is optional, and can be left nil to imply that the cluster status is not being reported.", + Ref: ref("k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.ClusterStatus"), + }, + }, + }, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-print-columns": "custom-columns=NAME:.metadata.name,CIDR:.spec.kubernetesApiEndpoints.serverEndpoints[].clientCIDR,SERVER:.spec.kubernetesApiEndpoints.serverEndpoints[].serverAddress,CREATION TIME:.metadata.creationTimestamp", + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.ClusterSpec", "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.ClusterStatus"}, + }, + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.ClusterList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterList is a list of Kubernetes clusters in the cluster registry.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of Cluster objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.Cluster"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.Cluster"}, + }, + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.ClusterSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterSpec contains the specification of a cluster.", + Properties: map[string]spec.Schema{ + "kubernetesApiEndpoints": { + SchemaProps: spec.SchemaProps{ + Description: "KubernetesAPIEndpoints represents the endpoints of the API server for this cluster.", + Ref: ref("k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.KubernetesAPIEndpoints"), + }, + }, + "authInfo": { + SchemaProps: spec.SchemaProps{ + Description: "AuthInfo contains public information that can be used to authenticate to and authorize with this cluster. It is not meant to store private information (e.g., tokens or client certificates) and cluster registry implementations are not expected to provide hardened storage for secrets.", + Ref: ref("k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.AuthInfo"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.AuthInfo", "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.KubernetesAPIEndpoints"}, + }, + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.ClusterStatus": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterStatus contains the status of a cluster.", + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.KubernetesAPIEndpoints": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubernetesAPIEndpoints represents the endpoints for one and only one Kubernetes API server.", + Properties: map[string]spec.Schema{ + "serverEndpoints": { + SchemaProps: spec.SchemaProps{ + Description: "ServerEndpoints specifies the address(es) of the Kubernetes API server’s network identity or identities.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.ServerAddressByClientCIDR"), + }, + }, + }, + }, + }, + "caBundle": { + SchemaProps: spec.SchemaProps{ + Description: "CABundle contains the certificate authority information.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.ServerAddressByClientCIDR"}, + }, + "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1.ServerAddressByClientCIDR": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServerAddressByClientCIDR helps clients determine the server address that they should use, depending on the ClientCIDR that they match.", + Properties: map[string]spec.Schema{ + "clientCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "The CIDR with which clients can match their IP to figure out if they should use the corresponding server address.", + Type: []string{"string"}, + Format: "", + }, + }, + "serverAddress": { + SchemaProps: spec.SchemaProps{ + Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + } +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/BUILD.bazel new file mode 100644 index 0000000000..a3c1080216 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/BUILD.bazel @@ -0,0 +1,18 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset.go", + "doc.go", + ], + importpath = "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset", + visibility = ["//visibility:public"], + deps = [ + "//pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1:go_default_library", + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/clientset.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/clientset.go new file mode 100644 index 0000000000..b988a5c46b --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/clientset.go @@ -0,0 +1,98 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientset + +import ( + glog "github.com/golang/glog" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" + clusterregistryv1alpha1 "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + ClusterregistryV1alpha1() clusterregistryv1alpha1.ClusterregistryV1alpha1Interface + // Deprecated: please explicitly pick a version if possible. + Clusterregistry() clusterregistryv1alpha1.ClusterregistryV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + clusterregistryV1alpha1 *clusterregistryv1alpha1.ClusterregistryV1alpha1Client +} + +// ClusterregistryV1alpha1 retrieves the ClusterregistryV1alpha1Client +func (c *Clientset) ClusterregistryV1alpha1() clusterregistryv1alpha1.ClusterregistryV1alpha1Interface { + return c.clusterregistryV1alpha1 +} + +// Deprecated: Clusterregistry retrieves the default version of ClusterregistryClient. +// Please explicitly pick a version. +func (c *Clientset) Clusterregistry() clusterregistryv1alpha1.ClusterregistryV1alpha1Interface { + return c.clusterregistryV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.clusterregistryV1alpha1, err = clusterregistryv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + glog.Errorf("failed to create the DiscoveryClient: %v", err) + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.clusterregistryV1alpha1 = clusterregistryv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.clusterregistryV1alpha1 = clusterregistryv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/doc.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/doc.go new file mode 100644 index 0000000000..05edbcd1c2 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package has the automatically generated clientset. +package clientset diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/BUILD.bazel new file mode 100644 index 0000000000..69a5128325 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/BUILD.bazel @@ -0,0 +1,26 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset_generated.go", + "doc.go", + "register.go", + ], + importpath = "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/clusterregistry/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/discovery/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/clientset_generated.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/clientset_generated.go new file mode 100644 index 0000000000..d7e068828e --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/clientset_generated.go @@ -0,0 +1,71 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" + clientset "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset" + clusterregistryv1alpha1 "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1" + fakeclusterregistryv1alpha1 "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + fakePtr := testing.Fake{} + fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) + fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil)) + + return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +var _ clientset.Interface = &Clientset{} + +// ClusterregistryV1alpha1 retrieves the ClusterregistryV1alpha1Client +func (c *Clientset) ClusterregistryV1alpha1() clusterregistryv1alpha1.ClusterregistryV1alpha1Interface { + return &fakeclusterregistryv1alpha1.FakeClusterregistryV1alpha1{Fake: &c.Fake} +} + +// Clusterregistry retrieves the ClusterregistryV1alpha1Client +func (c *Clientset) Clusterregistry() clusterregistryv1alpha1.ClusterregistryV1alpha1Interface { + return &fakeclusterregistryv1alpha1.FakeClusterregistryV1alpha1{Fake: &c.Fake} +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/doc.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/doc.go new file mode 100644 index 0000000000..8a3101e398 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/register.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/register.go new file mode 100644 index 0000000000..241b554ece --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/fake/register.go @@ -0,0 +1,53 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + clusterregistryv1alpha1 "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) +var parameterCodec = runtime.NewParameterCodec(scheme) + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + AddToScheme(scheme) +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kuberentes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +func AddToScheme(scheme *runtime.Scheme) { + clusterregistryv1alpha1.AddToScheme(scheme) + +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel new file mode 100644 index 0000000000..351d899825 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel @@ -0,0 +1,18 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "register.go", + ], + importpath = "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/clusterregistry/v1alpha1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/doc.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/doc.go new file mode 100644 index 0000000000..3d3ab5f4ed --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/register.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/register.go new file mode 100644 index 0000000000..40c36bf3d7 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme/register.go @@ -0,0 +1,53 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package scheme + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + clusterregistryv1alpha1 "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + AddToScheme(Scheme) +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kuberentes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +func AddToScheme(scheme *runtime.Scheme) { + clusterregistryv1alpha1.AddToScheme(scheme) + +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/BUILD.bazel new file mode 100644 index 0000000000..66ea0fce5d --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "cluster.go", + "clusterregistry_client.go", + "doc.go", + "generated_expansion.go", + ], + importpath = "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/clusterregistry/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset/scheme:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/cluster.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/cluster.go new file mode 100644 index 0000000000..c078341123 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/cluster.go @@ -0,0 +1,161 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + v1alpha1 "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" + scheme "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme" +) + +// ClustersGetter has a method to return a ClusterInterface. +// A group's client should implement this interface. +type ClustersGetter interface { + Clusters() ClusterInterface +} + +// ClusterInterface has methods to work with Cluster resources. +type ClusterInterface interface { + Create(*v1alpha1.Cluster) (*v1alpha1.Cluster, error) + Update(*v1alpha1.Cluster) (*v1alpha1.Cluster, error) + UpdateStatus(*v1alpha1.Cluster) (*v1alpha1.Cluster, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.Cluster, error) + List(opts v1.ListOptions) (*v1alpha1.ClusterList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Cluster, err error) + ClusterExpansion +} + +// clusters implements ClusterInterface +type clusters struct { + client rest.Interface +} + +// newClusters returns a Clusters +func newClusters(c *ClusterregistryV1alpha1Client) *clusters { + return &clusters{ + client: c.RESTClient(), + } +} + +// Get takes name of the cluster, and returns the corresponding cluster object, and an error if there is any. +func (c *clusters) Get(name string, options v1.GetOptions) (result *v1alpha1.Cluster, err error) { + result = &v1alpha1.Cluster{} + err = c.client.Get(). + Resource("clusters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Clusters that match those selectors. +func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err error) { + result = &v1alpha1.ClusterList{} + err = c.client.Get(). + Resource("clusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusters. +func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("clusters"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a cluster and creates it. Returns the server's representation of the cluster, and an error, if there is any. +func (c *clusters) Create(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { + result = &v1alpha1.Cluster{} + err = c.client.Post(). + Resource("clusters"). + Body(cluster). + Do(). + Into(result) + return +} + +// Update takes the representation of a cluster and updates it. Returns the server's representation of the cluster, and an error, if there is any. +func (c *clusters) Update(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { + result = &v1alpha1.Cluster{} + err = c.client.Put(). + Resource("clusters"). + Name(cluster.Name). + Body(cluster). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *clusters) UpdateStatus(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { + result = &v1alpha1.Cluster{} + err = c.client.Put(). + Resource("clusters"). + Name(cluster.Name). + SubResource("status"). + Body(cluster). + Do(). + Into(result) + return +} + +// Delete takes name of the cluster and deletes it. Returns an error if one occurs. +func (c *clusters) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusters"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Resource("clusters"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched cluster. +func (c *clusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Cluster, err error) { + result = &v1alpha1.Cluster{} + err = c.client.Patch(pt). + Resource("clusters"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/clusterregistry_client.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/clusterregistry_client.go new file mode 100644 index 0000000000..19626af5bf --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/clusterregistry_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" + v1alpha1 "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" + "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/scheme" +) + +type ClusterregistryV1alpha1Interface interface { + RESTClient() rest.Interface + ClustersGetter +} + +// ClusterregistryV1alpha1Client is used to interact with features provided by the clusterregistry.k8s.io group. +type ClusterregistryV1alpha1Client struct { + restClient rest.Interface +} + +func (c *ClusterregistryV1alpha1Client) Clusters() ClusterInterface { + return newClusters(c) +} + +// NewForConfig creates a new ClusterregistryV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*ClusterregistryV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &ClusterregistryV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new ClusterregistryV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ClusterregistryV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ClusterregistryV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *ClusterregistryV1alpha1Client { + return &ClusterregistryV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *ClusterregistryV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/doc.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/doc.go new file mode 100644 index 0000000000..08a9c7ceba --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/BUILD.bazel new file mode 100644 index 0000000000..47f9cc8c78 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/BUILD.bazel @@ -0,0 +1,23 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "fake_cluster.go", + "fake_clusterregistry_client.go", + ], + importpath = "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/clusterregistry/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/doc.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..63e2c8a082 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/fake_cluster.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/fake_cluster.go new file mode 100644 index 0000000000..b7531e5117 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/fake_cluster.go @@ -0,0 +1,129 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" + v1alpha1 "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" +) + +// FakeClusters implements ClusterInterface +type FakeClusters struct { + Fake *FakeClusterregistryV1alpha1 +} + +var clustersResource = schema.GroupVersionResource{Group: "clusterregistry.k8s.io", Version: "v1alpha1", Resource: "clusters"} + +var clustersKind = schema.GroupVersionKind{Group: "clusterregistry.k8s.io", Version: "v1alpha1", Kind: "Cluster"} + +// Get takes name of the cluster, and returns the corresponding cluster object, and an error if there is any. +func (c *FakeClusters) Get(name string, options v1.GetOptions) (result *v1alpha1.Cluster, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clustersResource, name), &v1alpha1.Cluster{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Cluster), err +} + +// List takes label and field selectors, and returns the list of Clusters that match those selectors. +func (c *FakeClusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clustersResource, clustersKind, opts), &v1alpha1.ClusterList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ClusterList{} + for _, item := range obj.(*v1alpha1.ClusterList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusters. +func (c *FakeClusters) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clustersResource, opts)) +} + +// Create takes the representation of a cluster and creates it. Returns the server's representation of the cluster, and an error, if there is any. +func (c *FakeClusters) Create(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clustersResource, cluster), &v1alpha1.Cluster{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Cluster), err +} + +// Update takes the representation of a cluster and updates it. Returns the server's representation of the cluster, and an error, if there is any. +func (c *FakeClusters) Update(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clustersResource, cluster), &v1alpha1.Cluster{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Cluster), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeClusters) UpdateStatus(cluster *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(clustersResource, "status", cluster), &v1alpha1.Cluster{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Cluster), err +} + +// Delete takes name of the cluster and deletes it. Returns an error if one occurs. +func (c *FakeClusters) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(clustersResource, name), &v1alpha1.Cluster{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clustersResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1alpha1.ClusterList{}) + return err +} + +// Patch applies the patch and returns the patched cluster. +func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Cluster, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clustersResource, name, data, subresources...), &v1alpha1.Cluster{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Cluster), err +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/fake_clusterregistry_client.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/fake_clusterregistry_client.go new file mode 100644 index 0000000000..292e2b633a --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/fake/fake_clusterregistry_client.go @@ -0,0 +1,38 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + v1alpha1 "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1" +) + +type FakeClusterregistryV1alpha1 struct { + *testing.Fake +} + +func (c *FakeClusterregistryV1alpha1) Clusters() v1alpha1.ClusterInterface { + return &FakeClusters{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeClusterregistryV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/generated_expansion.go b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/generated_expansion.go new file mode 100644 index 0000000000..393ce5a039 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/clientset_generated/clientset/typed/clusterregistry/v1alpha1/generated_expansion.go @@ -0,0 +1,19 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +type ClusterExpansion interface{} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/BUILD.bazel new file mode 100644 index 0000000000..25a428e031 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/BUILD.bazel @@ -0,0 +1,21 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "factory.go", + "generic.go", + ], + importpath = "k8s.io/cluster-registry/pkg/client/informers_generated/externalversions", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/clusterregistry/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/informers_generated/externalversions/clusterregistry:go_default_library", + "//pkg/client/informers_generated/externalversions/internalinterfaces:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/BUILD.bazel new file mode 100644 index 0000000000..8c8a0d23fc --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/BUILD.bazel @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["interface.go"], + importpath = "k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry", + visibility = ["//visibility:public"], + deps = [ + "//pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1:go_default_library", + "//pkg/client/informers_generated/externalversions/internalinterfaces:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/interface.go b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/interface.go new file mode 100644 index 0000000000..3e7c0d2960 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/interface.go @@ -0,0 +1,46 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package clusterregistry + +import ( + v1alpha1 "k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1" + internalinterfaces "k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface +} + +type group struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// V1alpha1 returns a new v1alpha1.Interface. +func (g *group) V1alpha1() v1alpha1.Interface { + return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/BUILD.bazel new file mode 100644 index 0000000000..dfbfd54899 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/BUILD.bazel @@ -0,0 +1,21 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "cluster.go", + "interface.go", + ], + importpath = "k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/clusterregistry/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/informers_generated/externalversions/internalinterfaces:go_default_library", + "//pkg/client/listers_generated/clusterregistry/v1alpha1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/cluster.go b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/cluster.go new file mode 100644 index 0000000000..cbba0df2ab --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/cluster.go @@ -0,0 +1,88 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1alpha1 + +import ( + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" + clusterregistry_v1alpha1 "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" + clientset "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset" + internalinterfaces "k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces" + v1alpha1 "k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1" +) + +// ClusterInformer provides access to a shared informer and lister for +// Clusters. +type ClusterInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ClusterLister +} + +type clusterInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewClusterInformer constructs a new informer for Cluster type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewClusterInformer(client clientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredClusterInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredClusterInformer constructs a new informer for Cluster type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredClusterInformer(client clientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ClusterregistryV1alpha1().Clusters().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ClusterregistryV1alpha1().Clusters().Watch(options) + }, + }, + &clusterregistry_v1alpha1.Cluster{}, + resyncPeriod, + indexers, + ) +} + +func (f *clusterInformer) defaultInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredClusterInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *clusterInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&clusterregistry_v1alpha1.Cluster{}, f.defaultInformer) +} + +func (f *clusterInformer) Lister() v1alpha1.ClusterLister { + return v1alpha1.NewClusterLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/interface.go b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/interface.go new file mode 100644 index 0000000000..edb6d6a3f0 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry/v1alpha1/interface.go @@ -0,0 +1,45 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package v1alpha1 + +import ( + internalinterfaces "k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // Clusters returns a ClusterInformer. + Clusters() ClusterInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// Clusters returns a ClusterInformer. +func (v *version) Clusters() ClusterInformer { + return &clusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/factory.go b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/factory.go new file mode 100644 index 0000000000..7ecbe922e3 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/factory.go @@ -0,0 +1,131 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package externalversions + +import ( + reflect "reflect" + sync "sync" + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" + clientset "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset" + clusterregistry "k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/clusterregistry" + internalinterfaces "k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces" +) + +type sharedInformerFactory struct { + client clientset.Interface + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc + lock sync.Mutex + defaultResync time.Duration + + informers map[reflect.Type]cache.SharedIndexInformer + // startedInformers is used for tracking which informers have been started. + // This allows Start() to be called multiple times safely. + startedInformers map[reflect.Type]bool +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +func NewSharedInformerFactory(client clientset.Interface, defaultResync time.Duration) SharedInformerFactory { + return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil) +} + +// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. +// Listers obtained via this SharedInformerFactory will be subject to the same filters +// as specified here. +func NewFilteredSharedInformerFactory(client clientset.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { + return &sharedInformerFactory{ + client: client, + namespace: namespace, + tweakListOptions: tweakListOptions, + defaultResync: defaultResync, + informers: make(map[reflect.Type]cache.SharedIndexInformer), + startedInformers: make(map[reflect.Type]bool), + } +} + +// Start initializes all requested informers. +func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.lock.Lock() + defer f.lock.Unlock() + + for informerType, informer := range f.informers { + if !f.startedInformers[informerType] { + go informer.Run(stopCh) + f.startedInformers[informerType] = true + } + } +} + +// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + informers := func() map[reflect.Type]cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informers := map[reflect.Type]cache.SharedIndexInformer{} + for informerType, informer := range f.informers { + if f.startedInformers[informerType] { + informers[informerType] = informer + } + } + return informers + }() + + res := map[reflect.Type]bool{} + for informType, informer := range informers { + res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) + } + return res +} + +// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// client. +func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informerType := reflect.TypeOf(obj) + informer, exists := f.informers[informerType] + if exists { + return informer + } + informer = newFunc(f.client, f.defaultResync) + f.informers[informerType] = informer + + return informer +} + +// SharedInformerFactory provides shared informers for resources in all known +// API group versions. +type SharedInformerFactory interface { + internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + + Clusterregistry() clusterregistry.Interface +} + +func (f *sharedInformerFactory) Clusterregistry() clusterregistry.Interface { + return clusterregistry.New(f, f.namespace, f.tweakListOptions) +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/generic.go b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/generic.go new file mode 100644 index 0000000000..ff042cf2b1 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/generic.go @@ -0,0 +1,62 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package externalversions + +import ( + "fmt" + + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" + v1alpha1 "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" +) + +// GenericInformer is type of SharedIndexInformer which will locate and delegate to other +// sharedInformers based on type +type GenericInformer interface { + Informer() cache.SharedIndexInformer + Lister() cache.GenericLister +} + +type genericInformer struct { + informer cache.SharedIndexInformer + resource schema.GroupResource +} + +// Informer returns the SharedIndexInformer. +func (f *genericInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +// Lister returns the GenericLister. +func (f *genericInformer) Lister() cache.GenericLister { + return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) +} + +// ForResource gives generic access to a shared informer of the matching type +// TODO extend this to unknown resources with a client pool +func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { + switch resource { + // Group=clusterregistry.k8s.io, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("clusters"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Clusterregistry().V1alpha1().Clusters().Informer()}, nil + + } + + return nil, fmt.Errorf("no informer found for %v", resource) +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces/BUILD.bazel new file mode 100644 index 0000000000..b2cee4c34c --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces/BUILD.bazel @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["factory_interfaces.go"], + importpath = "k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces", + visibility = ["//visibility:public"], + deps = [ + "//pkg/client/clientset_generated/clientset:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go new file mode 100644 index 0000000000..2624454cc3 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go @@ -0,0 +1,38 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen + +package internalinterfaces + +import ( + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + cache "k8s.io/client-go/tools/cache" + clientset "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset" +) + +type NewInformerFunc func(clientset.Interface, time.Duration) cache.SharedIndexInformer + +// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +type SharedInformerFactory interface { + Start(stopCh <-chan struct{}) + InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer +} + +type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/BUILD.bazel b/vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/BUILD.bazel new file mode 100644 index 0000000000..7a41886289 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/BUILD.bazel @@ -0,0 +1,17 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "cluster.go", + "expansion_generated.go", + ], + importpath = "k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/clusterregistry/v1alpha1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/cluster.go b/vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/cluster.go new file mode 100644 index 0000000000..8aedc93f14 --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/cluster.go @@ -0,0 +1,65 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" + v1alpha1 "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" +) + +// ClusterLister helps list Clusters. +type ClusterLister interface { + // List lists all Clusters in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.Cluster, err error) + // Get retrieves the Cluster from the index for a given name. + Get(name string) (*v1alpha1.Cluster, error) + ClusterListerExpansion +} + +// clusterLister implements the ClusterLister interface. +type clusterLister struct { + indexer cache.Indexer +} + +// NewClusterLister returns a new ClusterLister. +func NewClusterLister(indexer cache.Indexer) ClusterLister { + return &clusterLister{indexer: indexer} +} + +// List lists all Clusters in the indexer. +func (s *clusterLister) List(selector labels.Selector) (ret []*v1alpha1.Cluster, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.Cluster)) + }) + return ret, err +} + +// Get retrieves the Cluster from the index for a given name. +func (s *clusterLister) Get(name string) (*v1alpha1.Cluster, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("cluster"), name) + } + return obj.(*v1alpha1.Cluster), nil +} diff --git a/vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/expansion_generated.go b/vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/expansion_generated.go new file mode 100644 index 0000000000..eb1d7d218d --- /dev/null +++ b/vendor/k8s.io/cluster-registry/pkg/client/listers_generated/clusterregistry/v1alpha1/expansion_generated.go @@ -0,0 +1,23 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen + +package v1alpha1 + +// ClusterListerExpansion allows custom methods to be added to +// ClusterLister. +type ClusterListerExpansion interface{} From 89d5c99e91ef2c4eb7636514539b421bd650f96e Mon Sep 17 00:00:00 2001 From: Rohit Ramkumar Date: Wed, 11 Apr 2018 08:33:43 -0700 Subject: [PATCH 2/2] Update Gopkg.lock --- Gopkg.lock | 1 - 1 file changed, 1 deletion(-) diff --git a/Gopkg.lock b/Gopkg.lock index 9519108a9b..a7a2775691 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -757,6 +757,5 @@ analyzer-name = "dep" analyzer-version = 1 inputs-digest = "be35c28d01485c9d48cba15a847f2f6756c6bfd0ac3dae612d3c522566b2b48f" -"089799a9a9cec255b716e2950b4edc28fd978d85561dd2f95cc380e275b6bad1" solver-name = "gps-cdcl" solver-version = 1