aboutsummaryrefslogtreecommitdiff
path: root/vendor/k8s.io/client-go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-06-01 18:11:50 +0100
committerGravatar GitHub <noreply@github.com> 2017-06-01 18:11:50 +0100
commit3752a97135e93ca32f052375f22e6c2419e2ce4c (patch)
tree4d37dc1139b8b9eabafc804b243aea69c8a625b9 /vendor/k8s.io/client-go
parent30ecb83dce02491a22eb64674354dbd9b1fa08c7 (diff)
downloadcoredns-3752a97135e93ca32f052375f22e6c2419e2ce4c.tar.gz
coredns-3752a97135e93ca32f052375f22e6c2419e2ce4c.tar.zst
coredns-3752a97135e93ca32f052375f22e6c2419e2ce4c.zip
update deps (#686)
Diffstat (limited to 'vendor/k8s.io/client-go')
-rw-r--r--vendor/k8s.io/client-go/.github/PULL_REQUEST_TEMPLATE.md4
-rw-r--r--vendor/k8s.io/client-go/1.5/Godeps/Godeps.json318
-rw-r--r--vendor/k8s.io/client-go/1.5/Godeps/Readme5
-rw-r--r--vendor/k8s.io/client-go/1.5/discovery/fake/discovery.go82
-rw-r--r--vendor/k8s.io/client-go/1.5/dynamic/client.go289
-rw-r--r--vendor/k8s.io/client-go/1.5/dynamic/client_pool.go122
-rw-r--r--vendor/k8s.io/client-go/1.5/dynamic/client_test.go550
-rw-r--r--vendor/k8s.io/client-go/1.5/dynamic/dynamic_util.go94
-rw-r--r--vendor/k8s.io/client-go/1.5/dynamic/dynamic_util_test.go78
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/fake/clientset_generated.go138
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/fake_apps_client.go37
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/fake_petset.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go37
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go22
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go45
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go23
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go22
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go22
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview_expansion.go28
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go37
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/fake_batch_client.go37
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/fake_job.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/fake_certificates_client.go37
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest.go118
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_componentstatus.go109
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_configmap.go117
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_core_client.go97
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_endpoints.go117
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_event.go117
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_event_expansion.go89
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_limitrange.go117
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_namespace.go118
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go37
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_node.go118
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_persistentvolume.go118
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_pod.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_pod_expansion.go58
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_podtemplate.go117
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_resourcequota.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_secret.go117
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_service.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_service_expansion.go26
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_serviceaccount.go117
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go33
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go65
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_job.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go109
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_scale.go23
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_scale_expansion.go47
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go109
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go127
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go37
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go109
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go109
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go49
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go117
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go117
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go37
-rw-r--r--vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go109
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/api/testapi/testapi.go456
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/helpers.go97
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/install/install.go41
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/register.go57
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/types.generated.go11182
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/types.go714
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/defaults.go362
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/doc.go21
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/register.go46
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/types.go491
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go556
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go436
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/zz_generated.deepcopy.go408
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/doc.go21
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/install/install.go43
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/register.go56
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/types.generated.go2194
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/types.go67
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/doc.go22
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/generated.pb.go1059
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/generated.proto74
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/register.go46
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types.generated.go1208
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types.go67
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types_swagger_doc_generated.go70
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go169
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go105
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/zz_generated.deepcopy.go105
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/doc.go19
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/install/install.go134
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/register.go57
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/types.generated.go2954
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/types.go139
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/conversion.go36
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/defaults.go25
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/generated.pb.go1540
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/generated.proto115
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/register.go49
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types.generated.go2334
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types.go110
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types_swagger_doc_generated.go96
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/zz_generated.conversion.go300
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/zz_generated.deepcopy.go159
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/zz_generated.deepcopy.go200
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/doc.go25
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/policy.go71
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/qos.go143
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/types.go29
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/kubelet/server/portforward/constants.go21
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/kubelet/types/constants.go22
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/kubelet/types/doc.go18
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/kubelet/types/labels.go40
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/kubelet/types/pod_update.go133
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/kubelet/types/types.go93
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/master/ports/doc.go19
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/master/ports/ports.go40
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/third_party/forked/golang/json/fields.go501
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/util/config/config.go140
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/util/config/configuration_map.go53
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/util/config/doc.go20
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/util/config/feature_gate.go223
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/util/diff/diff.go267
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/util/httpstream/doc.go19
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/util/httpstream/httpstream.go149
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/util/strategicpatch/patch.go1265
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/util/testing/fake_handler.go120
-rw-r--r--vendor/k8s.io/client-go/1.5/pkg/util/testing/tmpdir.go44
-rw-r--r--vendor/k8s.io/client-go/1.5/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go200
-rw-r--r--vendor/k8s.io/client-go/1.5/testing/actions.go487
-rw-r--r--vendor/k8s.io/client-go/1.5/testing/fake.go251
-rw-r--r--vendor/k8s.io/client-go/1.5/testing/fixture.go490
-rw-r--r--vendor/k8s.io/client-go/1.5/tools/cache/testing/fake_controller_source.go262
-rw-r--r--vendor/k8s.io/client-go/1.5/tools/cache/testing/fake_controller_source_test.go94
-rw-r--r--vendor/k8s.io/client-go/1.5/tools/portforward/doc.go19
-rw-r--r--vendor/k8s.io/client-go/1.5/tools/portforward/portforward.go340
-rw-r--r--vendor/k8s.io/client-go/1.5/tools/record/doc.go18
-rw-r--r--vendor/k8s.io/client-go/1.5/tools/record/event.go316
-rw-r--r--vendor/k8s.io/client-go/1.5/tools/record/event_test.go914
-rw-r--r--vendor/k8s.io/client-go/1.5/tools/record/events_cache.go360
-rw-r--r--vendor/k8s.io/client-go/1.5/tools/record/events_cache_test.go254
-rw-r--r--vendor/k8s.io/client-go/1.5/tools/record/fake.go54
-rw-r--r--vendor/k8s.io/client-go/examples/in-cluster/main.go47
-rw-r--r--vendor/k8s.io/client-go/examples/out-of-cluster/main.go53
163 files changed, 0 insertions, 42916 deletions
diff --git a/vendor/k8s.io/client-go/.github/PULL_REQUEST_TEMPLATE.md b/vendor/k8s.io/client-go/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index ad11b57a8..000000000
--- a/vendor/k8s.io/client-go/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,4 +0,0 @@
-Sorry, client-go does not accept changes via pull requests at this time. Please
-submit your pull request to the main repository:
-https://github.com/kubernetes/kubernetes. See the guidance here:
-https://github.com/kubernetes/client-go#contributing-code.
diff --git a/vendor/k8s.io/client-go/1.5/Godeps/Godeps.json b/vendor/k8s.io/client-go/1.5/Godeps/Godeps.json
deleted file mode 100644
index d9aeabf28..000000000
--- a/vendor/k8s.io/client-go/1.5/Godeps/Godeps.json
+++ /dev/null
@@ -1,318 +0,0 @@
-{
- "ImportPath": "k8s.io/client-go/1.5",
- "GoVersion": "go1.6",
- "GodepVersion": "v74",
- "Packages": [
- "./..."
- ],
- "Deps": [
- {
- "ImportPath": "cloud.google.com/go/compute/metadata",
- "Comment": "v0.1.0-115-g3b1ae45",
- "Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821"
- },
- {
- "ImportPath": "cloud.google.com/go/internal",
- "Comment": "v0.1.0-115-g3b1ae45",
- "Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821"
- },
- {
- "ImportPath": "github.com/PuerkitoBio/purell",
- "Comment": "v1.0.0",
- "Rev": "8a290539e2e8629dbc4e6bad948158f790ec31f4"
- },
- {
- "ImportPath": "github.com/PuerkitoBio/urlesc",
- "Rev": "5bd2802263f21d8788851d5305584c82a5c75d7e"
- },
- {
- "ImportPath": "github.com/blang/semver",
- "Comment": "v3.0.1",
- "Rev": "31b736133b98f26d5e078ec9eb591666edfd091f"
- },
- {
- "ImportPath": "github.com/coreos/go-oidc/http",
- "Rev": "5644a2f50e2d2d5ba0b474bc5bc55fea1925936d"
- },
- {
- "ImportPath": "github.com/coreos/go-oidc/jose",
- "Rev": "5644a2f50e2d2d5ba0b474bc5bc55fea1925936d"
- },
- {
- "ImportPath": "github.com/coreos/go-oidc/key",
- "Rev": "5644a2f50e2d2d5ba0b474bc5bc55fea1925936d"
- },
- {
- "ImportPath": "github.com/coreos/go-oidc/oauth2",
- "Rev": "5644a2f50e2d2d5ba0b474bc5bc55fea1925936d"
- },
- {
- "ImportPath": "github.com/coreos/go-oidc/oidc",
- "Rev": "5644a2f50e2d2d5ba0b474bc5bc55fea1925936d"
- },
- {
- "ImportPath": "github.com/coreos/pkg/health",
- "Comment": "v2-8-gfa29b1d",
- "Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
- },
- {
- "ImportPath": "github.com/coreos/pkg/httputil",
- "Comment": "v2-8-gfa29b1d",
- "Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
- },
- {
- "ImportPath": "github.com/coreos/pkg/timeutil",
- "Comment": "v2-8-gfa29b1d",
- "Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
- },
- {
- "ImportPath": "github.com/davecgh/go-spew/spew",
- "Rev": "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d"
- },
- {
- "ImportPath": "github.com/docker/distribution/digest",
- "Comment": "v2.4.0-rc.1-38-gcd27f17",
- "Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
- },
- {
- "ImportPath": "github.com/docker/distribution/reference",
- "Comment": "v2.4.0-rc.1-38-gcd27f17",
- "Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51"
- },
- {
- "ImportPath": "github.com/emicklei/go-restful",
- "Comment": "v1.2-79-g89ef8af",
- "Rev": "89ef8af493ab468a45a42bb0d89a06fccdd2fb22"
- },
- {
- "ImportPath": "github.com/emicklei/go-restful/log",
- "Comment": "v1.2-79-g89ef8af",
- "Rev": "89ef8af493ab468a45a42bb0d89a06fccdd2fb22"
- },
- {
- "ImportPath": "github.com/emicklei/go-restful/swagger",
- "Comment": "v1.2-79-g89ef8af",
- "Rev": "89ef8af493ab468a45a42bb0d89a06fccdd2fb22"
- },
- {
- "ImportPath": "github.com/ghodss/yaml",
- "Rev": "73d445a93680fa1a78ae23a5839bad48f32ba1ee"
- },
- {
- "ImportPath": "github.com/go-openapi/jsonpointer",
- "Rev": "46af16f9f7b149af66e5d1bd010e3574dc06de98"
- },
- {
- "ImportPath": "github.com/go-openapi/jsonreference",
- "Rev": "13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272"
- },
- {
- "ImportPath": "github.com/go-openapi/spec",
- "Rev": "6aced65f8501fe1217321abf0749d354824ba2ff"
- },
- {
- "ImportPath": "github.com/go-openapi/swag",
- "Rev": "1d0bd113de87027671077d3c71eb3ac5d7dbba72"
- },
- {
- "ImportPath": "github.com/gogo/protobuf/proto",
- "Comment": "v0.2-33-ge18d7aa",
- "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173"
- },
- {
- "ImportPath": "github.com/gogo/protobuf/sortkeys",
- "Comment": "v0.2-33-ge18d7aa",
- "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173"
- },
- {
- "ImportPath": "github.com/golang/glog",
- "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed"
- },
- {
- "ImportPath": "github.com/golang/groupcache/lru",
- "Rev": "02826c3e79038b59d737d3b1c0a1d937f71a4433"
- },
- {
- "ImportPath": "github.com/golang/protobuf/proto",
- "Rev": "8616e8ee5e20a1704615e6c8d7afcdac06087a67"
- },
- {
- "ImportPath": "github.com/google/gofuzz",
- "Rev": "bbcb9da2d746f8bdbd6a936686a0a6067ada0ec5"
- },
- {
- "ImportPath": "github.com/howeyc/gopass",
- "Rev": "3ca23474a7c7203e0a0a070fd33508f6efdb9b3d"
- },
- {
- "ImportPath": "github.com/imdario/mergo",
- "Comment": "0.1.3-8-g6633656",
- "Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc"
- },
- {
- "ImportPath": "github.com/jonboulle/clockwork",
- "Rev": "72f9bd7c4e0c2a40055ab3d0f09654f730cce982"
- },
- {
- "ImportPath": "github.com/juju/ratelimit",
- "Rev": "77ed1c8a01217656d2080ad51981f6e99adaa177"
- },
- {
- "ImportPath": "github.com/mailru/easyjson/buffer",
- "Rev": "d5b7844b561a7bc640052f1b935f7b800330d7e0"
- },
- {
- "ImportPath": "github.com/mailru/easyjson/jlexer",
- "Rev": "d5b7844b561a7bc640052f1b935f7b800330d7e0"
- },
- {
- "ImportPath": "github.com/mailru/easyjson/jwriter",
- "Rev": "d5b7844b561a7bc640052f1b935f7b800330d7e0"
- },
- {
- "ImportPath": "github.com/pborman/uuid",
- "Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4"
- },
- {
- "ImportPath": "github.com/spf13/pflag",
- "Rev": "1560c1005499d61b80f865c04d39ca7505bf7f0b"
- },
- {
- "ImportPath": "github.com/ugorji/go/codec",
- "Rev": "f1f1a805ed361a0e078bb537e4ea78cd37dcf065"
- },
- {
- "ImportPath": "golang.org/x/crypto/ssh/terminal",
- "Rev": "1f22c0103821b9390939b6776727195525381532"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "e90d6d0afc4c315a0d87a568ae68577cc15149a0"
- },
- {
- "ImportPath": "golang.org/x/net/context/ctxhttp",
- "Rev": "e90d6d0afc4c315a0d87a568ae68577cc15149a0"
- },
- {
- "ImportPath": "golang.org/x/net/http2",
- "Rev": "e90d6d0afc4c315a0d87a568ae68577cc15149a0"
- },
- {
- "ImportPath": "golang.org/x/net/http2/hpack",
- "Rev": "e90d6d0afc4c315a0d87a568ae68577cc15149a0"
- },
- {
- "ImportPath": "golang.org/x/net/idna",
- "Rev": "e90d6d0afc4c315a0d87a568ae68577cc15149a0"
- },
- {
- "ImportPath": "golang.org/x/net/lex/httplex",
- "Rev": "e90d6d0afc4c315a0d87a568ae68577cc15149a0"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "3c3a985cb79f52a3190fbc056984415ca6763d01"
- },
- {
- "ImportPath": "golang.org/x/oauth2/google",
- "Rev": "3c3a985cb79f52a3190fbc056984415ca6763d01"
- },
- {
- "ImportPath": "golang.org/x/oauth2/internal",
- "Rev": "3c3a985cb79f52a3190fbc056984415ca6763d01"
- },
- {
- "ImportPath": "golang.org/x/oauth2/jws",
- "Rev": "3c3a985cb79f52a3190fbc056984415ca6763d01"
- },
- {
- "ImportPath": "golang.org/x/oauth2/jwt",
- "Rev": "3c3a985cb79f52a3190fbc056984415ca6763d01"
- },
- {
- "ImportPath": "golang.org/x/sys/unix",
- "Rev": "9c60d1c508f5134d1ca726b4641db998f2523357"
- },
- {
- "ImportPath": "golang.org/x/text/cases",
- "Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
- },
- {
- "ImportPath": "golang.org/x/text/internal/tag",
- "Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
- },
- {
- "ImportPath": "golang.org/x/text/language",
- "Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
- },
- {
- "ImportPath": "golang.org/x/text/runes",
- "Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
- },
- {
- "ImportPath": "golang.org/x/text/secure/bidirule",
- "Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
- },
- {
- "ImportPath": "golang.org/x/text/secure/precis",
- "Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
- },
- {
- "ImportPath": "golang.org/x/text/transform",
- "Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
- },
- {
- "ImportPath": "golang.org/x/text/unicode/bidi",
- "Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
- },
- {
- "ImportPath": "golang.org/x/text/unicode/norm",
- "Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
- },
- {
- "ImportPath": "golang.org/x/text/width",
- "Rev": "2910a502d2bf9e43193af9d68ca516529614eed3"
- },
- {
- "ImportPath": "google.golang.org/appengine",
- "Rev": "4f7eeb5305a4ba1966344836ba4af9996b7b4e05"
- },
- {
- "ImportPath": "google.golang.org/appengine/internal",
- "Rev": "4f7eeb5305a4ba1966344836ba4af9996b7b4e05"
- },
- {
- "ImportPath": "google.golang.org/appengine/internal/app_identity",
- "Rev": "4f7eeb5305a4ba1966344836ba4af9996b7b4e05"
- },
- {
- "ImportPath": "google.golang.org/appengine/internal/base",
- "Rev": "4f7eeb5305a4ba1966344836ba4af9996b7b4e05"
- },
- {
- "ImportPath": "google.golang.org/appengine/internal/datastore",
- "Rev": "4f7eeb5305a4ba1966344836ba4af9996b7b4e05"
- },
- {
- "ImportPath": "google.golang.org/appengine/internal/log",
- "Rev": "4f7eeb5305a4ba1966344836ba4af9996b7b4e05"
- },
- {
- "ImportPath": "google.golang.org/appengine/internal/modules",
- "Rev": "4f7eeb5305a4ba1966344836ba4af9996b7b4e05"
- },
- {
- "ImportPath": "google.golang.org/appengine/internal/remote_api",
- "Rev": "4f7eeb5305a4ba1966344836ba4af9996b7b4e05"
- },
- {
- "ImportPath": "gopkg.in/inf.v0",
- "Comment": "v0.9.0",
- "Rev": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"
- },
- {
- "ImportPath": "gopkg.in/yaml.v2",
- "Rev": "53feefa2559fb8dfa8d81baad31be332c97d6c77"
- }
- ]
-}
diff --git a/vendor/k8s.io/client-go/1.5/Godeps/Readme b/vendor/k8s.io/client-go/1.5/Godeps/Readme
deleted file mode 100644
index 4cdaa53d5..000000000
--- a/vendor/k8s.io/client-go/1.5/Godeps/Readme
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory tree is generated automatically by godep.
-
-Please do not edit.
-
-See https://github.com/tools/godep for more information.
diff --git a/vendor/k8s.io/client-go/1.5/discovery/fake/discovery.go b/vendor/k8s.io/client-go/1.5/discovery/fake/discovery.go
deleted file mode 100644
index b2c1604db..000000000
--- a/vendor/k8s.io/client-go/1.5/discovery/fake/discovery.go
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-Copyright 2016 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 (
- "github.com/emicklei/go-restful/swagger"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/pkg/version"
- "k8s.io/client-go/1.5/testing"
-)
-
-type FakeDiscovery struct {
- *testing.Fake
-}
-
-func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error) {
- action := testing.ActionImpl{
- Verb: "get",
- Resource: unversioned.GroupVersionResource{Resource: "resource"},
- }
- c.Invokes(action, nil)
- return c.Resources[groupVersion], nil
-}
-
-func (c *FakeDiscovery) ServerResources() (map[string]*unversioned.APIResourceList, error) {
- action := testing.ActionImpl{
- Verb: "get",
- Resource: unversioned.GroupVersionResource{Resource: "resource"},
- }
- c.Invokes(action, nil)
- return c.Resources, nil
-}
-
-func (c *FakeDiscovery) ServerPreferredResources() ([]unversioned.GroupVersionResource, error) {
- return nil, nil
-}
-
-func (c *FakeDiscovery) ServerPreferredNamespacedResources() ([]unversioned.GroupVersionResource, error) {
- return nil, nil
-}
-
-func (c *FakeDiscovery) ServerGroups() (*unversioned.APIGroupList, error) {
- return nil, nil
-}
-
-func (c *FakeDiscovery) ServerVersion() (*version.Info, error) {
- action := testing.ActionImpl{}
- action.Verb = "get"
- action.Resource = unversioned.GroupVersionResource{Resource: "version"}
-
- c.Invokes(action, nil)
- versionInfo := version.Get()
- return &versionInfo, nil
-}
-
-func (c *FakeDiscovery) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) {
- action := testing.ActionImpl{}
- action.Verb = "get"
- if version == v1.SchemeGroupVersion {
- action.Resource = unversioned.GroupVersionResource{Resource: "/swaggerapi/api/" + version.Version}
- } else {
- action.Resource = unversioned.GroupVersionResource{Resource: "/swaggerapi/apis/" + version.Group + "/" + version.Version}
- }
-
- c.Invokes(action, nil)
- return &swagger.ApiDeclaration{}, nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/dynamic/client.go b/vendor/k8s.io/client-go/1.5/dynamic/client.go
deleted file mode 100644
index 3a1e3b588..000000000
--- a/vendor/k8s.io/client-go/1.5/dynamic/client.go
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
-Copyright 2016 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 dynamic provides a client interface to arbitrary Kubernetes
-// APIs that exposes common high level operations and exposes common
-// metadata.
-package dynamic
-
-import (
- "encoding/json"
- "errors"
- "io"
- "net/url"
- "strings"
-
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/pkg/conversion/queryparams"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/runtime/serializer"
- "k8s.io/client-go/1.5/pkg/util/flowcontrol"
- "k8s.io/client-go/1.5/pkg/watch"
- "k8s.io/client-go/1.5/rest"
-)
-
-// Client is a Kubernetes client that allows you to access metadata
-// and manipulate metadata of a Kubernetes API group.
-type Client struct {
- cl *rest.RESTClient
- parameterCodec runtime.ParameterCodec
-}
-
-// NewClient returns a new client based on the passed in config. The
-// codec is ignored, as the dynamic client uses it's own codec.
-func NewClient(conf *rest.Config) (*Client, error) {
- // avoid changing the original config
- confCopy := *conf
- conf = &confCopy
-
- contentConfig := ContentConfig()
- contentConfig.GroupVersion = conf.GroupVersion
- if conf.NegotiatedSerializer != nil {
- contentConfig.NegotiatedSerializer = conf.NegotiatedSerializer
- }
- conf.ContentConfig = contentConfig
-
- if conf.APIPath == "" {
- conf.APIPath = "/api"
- }
-
- if len(conf.UserAgent) == 0 {
- conf.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- cl, err := rest.RESTClientFor(conf)
- if err != nil {
- return nil, err
- }
-
- return &Client{cl: cl}, nil
-}
-
-// GetRateLimiter returns rate limier.
-func (c *Client) GetRateLimiter() flowcontrol.RateLimiter {
- return c.cl.GetRateLimiter()
-}
-
-// Resource returns an API interface to the specified resource for this client's
-// group and version. If resource is not a namespaced resource, then namespace
-// is ignored. The ResourceClient inherits the parameter codec of c.
-func (c *Client) Resource(resource *unversioned.APIResource, namespace string) *ResourceClient {
- return &ResourceClient{
- cl: c.cl,
- resource: resource,
- ns: namespace,
- parameterCodec: c.parameterCodec,
- }
-}
-
-// ParameterCodec returns a client with the provided parameter codec.
-func (c *Client) ParameterCodec(parameterCodec runtime.ParameterCodec) *Client {
- return &Client{
- cl: c.cl,
- parameterCodec: parameterCodec,
- }
-}
-
-// ResourceClient is an API interface to a specific resource under a
-// dynamic client.
-type ResourceClient struct {
- cl *rest.RESTClient
- resource *unversioned.APIResource
- ns string
- parameterCodec runtime.ParameterCodec
-}
-
-// List returns a list of objects for this resource.
-func (rc *ResourceClient) List(opts runtime.Object) (runtime.Object, error) {
- parameterEncoder := rc.parameterCodec
- if parameterEncoder == nil {
- parameterEncoder = defaultParameterEncoder
- }
- return rc.cl.Get().
- NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
- Resource(rc.resource.Name).
- VersionedParams(opts, parameterEncoder).
- Do().
- Get()
-}
-
-// Get gets the resource with the specified name.
-func (rc *ResourceClient) Get(name string) (*runtime.Unstructured, error) {
- result := new(runtime.Unstructured)
- err := rc.cl.Get().
- NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
- Resource(rc.resource.Name).
- Name(name).
- Do().
- Into(result)
- return result, err
-}
-
-// Delete deletes the resource with the specified name.
-func (rc *ResourceClient) Delete(name string, opts *v1.DeleteOptions) error {
- return rc.cl.Delete().
- NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
- Resource(rc.resource.Name).
- Name(name).
- Body(opts).
- Do().
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (rc *ResourceClient) DeleteCollection(deleteOptions *v1.DeleteOptions, listOptions runtime.Object) error {
- parameterEncoder := rc.parameterCodec
- if parameterEncoder == nil {
- parameterEncoder = defaultParameterEncoder
- }
- return rc.cl.Delete().
- NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
- Resource(rc.resource.Name).
- VersionedParams(listOptions, parameterEncoder).
- Body(deleteOptions).
- Do().
- Error()
-}
-
-// Create creates the provided resource.
-func (rc *ResourceClient) Create(obj *runtime.Unstructured) (*runtime.Unstructured, error) {
- result := new(runtime.Unstructured)
- err := rc.cl.Post().
- NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
- Resource(rc.resource.Name).
- Body(obj).
- Do().
- Into(result)
- return result, err
-}
-
-// Update updates the provided resource.
-func (rc *ResourceClient) Update(obj *runtime.Unstructured) (*runtime.Unstructured, error) {
- result := new(runtime.Unstructured)
- if len(obj.GetName()) == 0 {
- return result, errors.New("object missing name")
- }
- err := rc.cl.Put().
- NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
- Resource(rc.resource.Name).
- Name(obj.GetName()).
- Body(obj).
- Do().
- Into(result)
- return result, err
-}
-
-// Watch returns a watch.Interface that watches the resource.
-func (rc *ResourceClient) Watch(opts runtime.Object) (watch.Interface, error) {
- parameterEncoder := rc.parameterCodec
- if parameterEncoder == nil {
- parameterEncoder = defaultParameterEncoder
- }
- return rc.cl.Get().
- Prefix("watch").
- NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
- Resource(rc.resource.Name).
- VersionedParams(opts, parameterEncoder).
- Watch()
-}
-
-func (rc *ResourceClient) Patch(name string, pt api.PatchType, data []byte) (*runtime.Unstructured, error) {
- result := new(runtime.Unstructured)
- err := rc.cl.Patch(pt).
- NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
- Resource(rc.resource.Name).
- Name(name).
- Body(data).
- Do().
- Into(result)
- return result, err
-}
-
-// dynamicCodec is a codec that wraps the standard unstructured codec
-// with special handling for Status objects.
-type dynamicCodec struct{}
-
-func (dynamicCodec) Decode(data []byte, gvk *unversioned.GroupVersionKind, obj runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error) {
- obj, gvk, err := runtime.UnstructuredJSONScheme.Decode(data, gvk, obj)
- if err != nil {
- return nil, nil, err
- }
-
- if _, ok := obj.(*unversioned.Status); !ok && strings.ToLower(gvk.Kind) == "status" {
- obj = &unversioned.Status{}
- err := json.Unmarshal(data, obj)
- if err != nil {
- return nil, nil, err
- }
- }
-
- return obj, gvk, nil
-}
-
-func (dynamicCodec) Encode(obj runtime.Object, w io.Writer) error {
- return runtime.UnstructuredJSONScheme.Encode(obj, w)
-}
-
-// ContentConfig returns a rest.ContentConfig for dynamic types.
-func ContentConfig() rest.ContentConfig {
- // TODO: it's questionable that this should be using anything other than unstructured schema and JSON
- codec := dynamicCodec{}
- streamingInfo, _ := api.Codecs.StreamingSerializerForMediaType("application/json;stream=watch", nil)
- return rest.ContentConfig{
- AcceptContentTypes: runtime.ContentTypeJSON,
- ContentType: runtime.ContentTypeJSON,
- NegotiatedSerializer: serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec}, streamingInfo),
- }
-}
-
-// paramaterCodec is a codec converts an API object to query
-// parameters without trying to convert to the target version.
-type parameterCodec struct{}
-
-func (parameterCodec) EncodeParameters(obj runtime.Object, to unversioned.GroupVersion) (url.Values, error) {
- return queryparams.Convert(obj)
-}
-
-func (parameterCodec) DecodeParameters(parameters url.Values, from unversioned.GroupVersion, into runtime.Object) error {
- return errors.New("DecodeParameters not implemented on dynamic parameterCodec")
-}
-
-var defaultParameterEncoder runtime.ParameterCodec = parameterCodec{}
-
-type versionedParameterEncoderWithV1Fallback struct{}
-
-func (versionedParameterEncoderWithV1Fallback) EncodeParameters(obj runtime.Object, to unversioned.GroupVersion) (url.Values, error) {
- ret, err := api.ParameterCodec.EncodeParameters(obj, to)
- if err != nil && runtime.IsNotRegisteredError(err) {
- // fallback to v1
- return api.ParameterCodec.EncodeParameters(obj, v1.SchemeGroupVersion)
- }
- return ret, err
-}
-
-func (versionedParameterEncoderWithV1Fallback) DecodeParameters(parameters url.Values, from unversioned.GroupVersion, into runtime.Object) error {
- return errors.New("DecodeParameters not implemented on versionedParameterEncoderWithV1Fallback")
-}
-
-// VersionedParameterEncoderWithV1Fallback is useful for encoding query
-// parameters for thirdparty resources. It tries to convert object to the
-// specified version before converting it to query parameters, and falls back to
-// converting to v1 if the object is not registered in the specified version.
-// For the record, currently API server always treats query parameters sent to a
-// thirdparty resource endpoint as v1.
-var VersionedParameterEncoderWithV1Fallback runtime.ParameterCodec = versionedParameterEncoderWithV1Fallback{}
diff --git a/vendor/k8s.io/client-go/1.5/dynamic/client_pool.go b/vendor/k8s.io/client-go/1.5/dynamic/client_pool.go
deleted file mode 100644
index b0e94e09d..000000000
--- a/vendor/k8s.io/client-go/1.5/dynamic/client_pool.go
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-Copyright 2016 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 dynamic
-
-import (
- "sync"
-
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/meta"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/runtime/serializer"
- "k8s.io/client-go/1.5/rest"
-)
-
-// ClientPool manages a pool of dynamic clients.
-type ClientPool interface {
- // ClientForGroupVersionKind returns a client configured for the specified groupVersionResource.
- // Resource may be empty.
- ClientForGroupVersionResource(resource unversioned.GroupVersionResource) (*Client, error)
- // ClientForGroupVersionKind returns a client configured for the specified groupVersionKind.
- // Kind may be empty.
- ClientForGroupVersionKind(kind unversioned.GroupVersionKind) (*Client, error)
-}
-
-// APIPathResolverFunc knows how to convert a groupVersion to its API path. The Kind field is
-// optional.
-type APIPathResolverFunc func(kind unversioned.GroupVersionKind) string
-
-// LegacyAPIPathResolverFunc can resolve paths properly with the legacy API.
-func LegacyAPIPathResolverFunc(kind unversioned.GroupVersionKind) string {
- if len(kind.Group) == 0 {
- return "/api"
- }
- return "/apis"
-}
-
-// clientPoolImpl implements ClientPool and caches clients for the resource group versions
-// is asked to retrieve. This type is thread safe.
-type clientPoolImpl struct {
- lock sync.RWMutex
- config *rest.Config
- clients map[unversioned.GroupVersion]*Client
- apiPathResolverFunc APIPathResolverFunc
- mapper meta.RESTMapper
-}
-
-// NewClientPool returns a ClientPool from the specified config. It reuses clients for the the same
-// group version. It is expected this type may be wrapped by specific logic that special cases certain
-// resources or groups.
-func NewClientPool(config *rest.Config, mapper meta.RESTMapper, apiPathResolverFunc APIPathResolverFunc) ClientPool {
- confCopy := *config
- return &clientPoolImpl{
- config: &confCopy,
- clients: map[unversioned.GroupVersion]*Client{},
- apiPathResolverFunc: apiPathResolverFunc,
- mapper: mapper,
- }
-}
-
-// ClientForGroupVersionResource uses the provided RESTMapper to identify the appropriate resource. Resource may
-// be empty. If no matching kind is found the underlying client for that group is still returned.
-func (c *clientPoolImpl) ClientForGroupVersionResource(resource unversioned.GroupVersionResource) (*Client, error) {
- kinds, err := c.mapper.KindsFor(resource)
- if err != nil {
- if meta.IsNoMatchError(err) {
- return c.ClientForGroupVersionKind(unversioned.GroupVersionKind{Group: resource.Group, Version: resource.Version})
- }
- return nil, err
- }
- return c.ClientForGroupVersionKind(kinds[0])
-}
-
-// ClientForGroupVersion returns a client for the specified groupVersion, creates one if none exists. Kind
-// in the GroupVersionKind may be empty.
-func (c *clientPoolImpl) ClientForGroupVersionKind(kind unversioned.GroupVersionKind) (*Client, error) {
- c.lock.Lock()
- defer c.lock.Unlock()
-
- gv := kind.GroupVersion()
-
- // do we have a client already configured?
- if existingClient, found := c.clients[gv]; found {
- return existingClient, nil
- }
-
- // avoid changing the original config
- confCopy := *c.config
- conf := &confCopy
-
- // we need to set the api path based on group version, if no group, default to legacy path
- conf.APIPath = c.apiPathResolverFunc(kind)
-
- // we need to make a client
- conf.GroupVersion = &gv
-
- if conf.NegotiatedSerializer == nil {
- streamingInfo, _ := api.Codecs.StreamingSerializerForMediaType("application/json;stream=watch", nil)
- conf.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: dynamicCodec{}}, streamingInfo)
- }
-
- dynamicClient, err := NewClient(conf)
- if err != nil {
- return nil, err
- }
- c.clients[gv] = dynamicClient
- return dynamicClient, nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/dynamic/client_test.go b/vendor/k8s.io/client-go/1.5/dynamic/client_test.go
deleted file mode 100644
index 3bc32681c..000000000
--- a/vendor/k8s.io/client-go/1.5/dynamic/client_test.go
+++ /dev/null
@@ -1,550 +0,0 @@
-/*
-Copyright 2016 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 dynamic
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/http/httptest"
- "reflect"
- "testing"
-
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/runtime/serializer/streaming"
- "k8s.io/client-go/1.5/pkg/watch"
- "k8s.io/client-go/1.5/pkg/watch/versioned"
- "k8s.io/client-go/1.5/rest"
-)
-
-func getJSON(version, kind, name string) []byte {
- return []byte(fmt.Sprintf(`{"apiVersion": %q, "kind": %q, "metadata": {"name": %q}}`, version, kind, name))
-}
-
-func getListJSON(version, kind string, items ...[]byte) []byte {
- json := fmt.Sprintf(`{"apiVersion": %q, "kind": %q, "items": [%s]}`,
- version, kind, bytes.Join(items, []byte(",")))
- return []byte(json)
-}
-
-func getObject(version, kind, name string) *runtime.Unstructured {
- return &runtime.Unstructured{
- Object: map[string]interface{}{
- "apiVersion": version,
- "kind": kind,
- "metadata": map[string]interface{}{
- "name": name,
- },
- },
- }
-}
-
-func getClientServer(gv *unversioned.GroupVersion, h func(http.ResponseWriter, *http.Request)) (*Client, *httptest.Server, error) {
- srv := httptest.NewServer(http.HandlerFunc(h))
- cl, err := NewClient(&rest.Config{
- Host: srv.URL,
- ContentConfig: rest.ContentConfig{GroupVersion: gv},
- })
- if err != nil {
- srv.Close()
- return nil, nil, err
- }
- return cl, srv, nil
-}
-
-func TestList(t *testing.T) {
- tcs := []struct {
- name string
- namespace string
- path string
- resp []byte
- want *runtime.UnstructuredList
- }{
- {
- name: "normal_list",
- path: "/api/gtest/vtest/rtest",
- resp: getListJSON("vTest", "rTestList",
- getJSON("vTest", "rTest", "item1"),
- getJSON("vTest", "rTest", "item2")),
- want: &runtime.UnstructuredList{
- Object: map[string]interface{}{
- "apiVersion": "vTest",
- "kind": "rTestList",
- },
- Items: []*runtime.Unstructured{
- getObject("vTest", "rTest", "item1"),
- getObject("vTest", "rTest", "item2"),
- },
- },
- },
- {
- name: "namespaced_list",
- namespace: "nstest",
- path: "/api/gtest/vtest/namespaces/nstest/rtest",
- resp: getListJSON("vTest", "rTestList",
- getJSON("vTest", "rTest", "item1"),
- getJSON("vTest", "rTest", "item2")),
- want: &runtime.UnstructuredList{
- Object: map[string]interface{}{
- "apiVersion": "vTest",
- "kind": "rTestList",
- },
- Items: []*runtime.Unstructured{
- getObject("vTest", "rTest", "item1"),
- getObject("vTest", "rTest", "item2"),
- },
- },
- },
- }
- for _, tc := range tcs {
- gv := &unversioned.GroupVersion{Group: "gtest", Version: "vtest"}
- resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
- cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "GET" {
- t.Errorf("List(%q) got HTTP method %s. wanted GET", tc.name, r.Method)
- }
-
- if r.URL.Path != tc.path {
- t.Errorf("List(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
- }
-
- w.Header().Set("Content-Type", runtime.ContentTypeJSON)
- w.Write(tc.resp)
- })
- if err != nil {
- t.Errorf("unexpected error when creating client: %v", err)
- continue
- }
- defer srv.Close()
-
- got, err := cl.Resource(resource, tc.namespace).List(&v1.ListOptions{})
- if err != nil {
- t.Errorf("unexpected error when listing %q: %v", tc.name, err)
- continue
- }
-
- if !reflect.DeepEqual(got, tc.want) {
- t.Errorf("List(%q) want: %v\ngot: %v", tc.name, tc.want, got)
- }
- }
-}
-
-func TestGet(t *testing.T) {
- tcs := []struct {
- namespace string
- name string
- path string
- resp []byte
- want *runtime.Unstructured
- }{
- {
- name: "normal_get",
- path: "/api/gtest/vtest/rtest/normal_get",
- resp: getJSON("vTest", "rTest", "normal_get"),
- want: getObject("vTest", "rTest", "normal_get"),
- },
- {
- namespace: "nstest",
- name: "namespaced_get",
- path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_get",
- resp: getJSON("vTest", "rTest", "namespaced_get"),
- want: getObject("vTest", "rTest", "namespaced_get"),
- },
- }
- for _, tc := range tcs {
- gv := &unversioned.GroupVersion{Group: "gtest", Version: "vtest"}
- resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
- cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "GET" {
- t.Errorf("Get(%q) got HTTP method %s. wanted GET", tc.name, r.Method)
- }
-
- if r.URL.Path != tc.path {
- t.Errorf("Get(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
- }
-
- w.Header().Set("Content-Type", runtime.ContentTypeJSON)
- w.Write(tc.resp)
- })
- if err != nil {
- t.Errorf("unexpected error when creating client: %v", err)
- continue
- }
- defer srv.Close()
-
- got, err := cl.Resource(resource, tc.namespace).Get(tc.name)
- if err != nil {
- t.Errorf("unexpected error when getting %q: %v", tc.name, err)
- continue
- }
-
- if !reflect.DeepEqual(got, tc.want) {
- t.Errorf("Get(%q) want: %v\ngot: %v", tc.name, tc.want, got)
- }
- }
-}
-
-func TestDelete(t *testing.T) {
- statusOK := &unversioned.Status{
- TypeMeta: unversioned.TypeMeta{Kind: "Status"},
- Status: unversioned.StatusSuccess,
- }
- tcs := []struct {
- namespace string
- name string
- path string
- }{
- {
- name: "normal_delete",
- path: "/api/gtest/vtest/rtest/normal_delete",
- },
- {
- namespace: "nstest",
- name: "namespaced_delete",
- path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_delete",
- },
- }
- for _, tc := range tcs {
- gv := &unversioned.GroupVersion{Group: "gtest", Version: "vtest"}
- resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
- cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "DELETE" {
- t.Errorf("Delete(%q) got HTTP method %s. wanted DELETE", tc.name, r.Method)
- }
-
- if r.URL.Path != tc.path {
- t.Errorf("Delete(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
- }
-
- w.Header().Set("Content-Type", runtime.ContentTypeJSON)
- runtime.UnstructuredJSONScheme.Encode(statusOK, w)
- })
- if err != nil {
- t.Errorf("unexpected error when creating client: %v", err)
- continue
- }
- defer srv.Close()
-
- err = cl.Resource(resource, tc.namespace).Delete(tc.name, nil)
- if err != nil {
- t.Errorf("unexpected error when deleting %q: %v", tc.name, err)
- continue
- }
- }
-}
-
-func TestDeleteCollection(t *testing.T) {
- statusOK := &unversioned.Status{
- TypeMeta: unversioned.TypeMeta{Kind: "Status"},
- Status: unversioned.StatusSuccess,
- }
- tcs := []struct {
- namespace string
- name string
- path string
- }{
- {
- name: "normal_delete_collection",
- path: "/api/gtest/vtest/rtest",
- },
- {
- namespace: "nstest",
- name: "namespaced_delete_collection",
- path: "/api/gtest/vtest/namespaces/nstest/rtest",
- },
- }
- for _, tc := range tcs {
- gv := &unversioned.GroupVersion{Group: "gtest", Version: "vtest"}
- resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
- cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "DELETE" {
- t.Errorf("DeleteCollection(%q) got HTTP method %s. wanted DELETE", tc.name, r.Method)
- }
-
- if r.URL.Path != tc.path {
- t.Errorf("DeleteCollection(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
- }
-
- w.Header().Set("Content-Type", runtime.ContentTypeJSON)
- runtime.UnstructuredJSONScheme.Encode(statusOK, w)
- })
- if err != nil {
- t.Errorf("unexpected error when creating client: %v", err)
- continue
- }
- defer srv.Close()
-
- err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, &v1.ListOptions{})
- if err != nil {
- t.Errorf("unexpected error when deleting collection %q: %v", tc.name, err)
- continue
- }
- }
-}
-
-func TestCreate(t *testing.T) {
- tcs := []struct {
- name string
- namespace string
- obj *runtime.Unstructured
- path string
- }{
- {
- name: "normal_create",
- path: "/api/gtest/vtest/rtest",
- obj: getObject("vTest", "rTest", "normal_create"),
- },
- {
- name: "namespaced_create",
- namespace: "nstest",
- path: "/api/gtest/vtest/namespaces/nstest/rtest",
- obj: getObject("vTest", "rTest", "namespaced_create"),
- },
- }
- for _, tc := range tcs {
- gv := &unversioned.GroupVersion{Group: "gtest", Version: "vtest"}
- resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
- cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "POST" {
- t.Errorf("Create(%q) got HTTP method %s. wanted POST", tc.name, r.Method)
- }
-
- if r.URL.Path != tc.path {
- t.Errorf("Create(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
- }
-
- w.Header().Set("Content-Type", runtime.ContentTypeJSON)
- data, err := ioutil.ReadAll(r.Body)
- if err != nil {
- t.Errorf("Create(%q) unexpected error reading body: %v", tc.name, err)
- w.WriteHeader(http.StatusInternalServerError)
- return
- }
-
- w.Write(data)
- })
- if err != nil {
- t.Errorf("unexpected error when creating client: %v", err)
- continue
- }
- defer srv.Close()
-
- got, err := cl.Resource(resource, tc.namespace).Create(tc.obj)
- if err != nil {
- t.Errorf("unexpected error when creating %q: %v", tc.name, err)
- continue
- }
-
- if !reflect.DeepEqual(got, tc.obj) {
- t.Errorf("Create(%q) want: %v\ngot: %v", tc.name, tc.obj, got)
- }
- }
-}
-
-func TestUpdate(t *testing.T) {
- tcs := []struct {
- name string
- namespace string
- obj *runtime.Unstructured
- path string
- }{
- {
- name: "normal_update",
- path: "/api/gtest/vtest/rtest/normal_update",
- obj: getObject("vTest", "rTest", "normal_update"),
- },
- {
- name: "namespaced_update",
- namespace: "nstest",
- path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_update",
- obj: getObject("vTest", "rTest", "namespaced_update"),
- },
- }
- for _, tc := range tcs {
- gv := &unversioned.GroupVersion{Group: "gtest", Version: "vtest"}
- resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
- cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "PUT" {
- t.Errorf("Update(%q) got HTTP method %s. wanted PUT", tc.name, r.Method)
- }
-
- if r.URL.Path != tc.path {
- t.Errorf("Update(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
- }
-
- w.Header().Set("Content-Type", runtime.ContentTypeJSON)
- data, err := ioutil.ReadAll(r.Body)
- if err != nil {
- t.Errorf("Update(%q) unexpected error reading body: %v", tc.name, err)
- w.WriteHeader(http.StatusInternalServerError)
- return
- }
-
- w.Write(data)
- })
- if err != nil {
- t.Errorf("unexpected error when creating client: %v", err)
- continue
- }
- defer srv.Close()
-
- got, err := cl.Resource(resource, tc.namespace).Update(tc.obj)
- if err != nil {
- t.Errorf("unexpected error when updating %q: %v", tc.name, err)
- continue
- }
-
- if !reflect.DeepEqual(got, tc.obj) {
- t.Errorf("Update(%q) want: %v\ngot: %v", tc.name, tc.obj, got)
- }
- }
-}
-
-func TestWatch(t *testing.T) {
- tcs := []struct {
- name string
- namespace string
- events []watch.Event
- path string
- }{
- {
- name: "normal_watch",
- path: "/api/gtest/vtest/watch/rtest",
- events: []watch.Event{
- {Type: watch.Added, Object: getObject("vTest", "rTest", "normal_watch")},
- {Type: watch.Modified, Object: getObject("vTest", "rTest", "normal_watch")},
- {Type: watch.Deleted, Object: getObject("vTest", "rTest", "normal_watch")},
- },
- },
- {
- name: "namespaced_watch",
- namespace: "nstest",
- path: "/api/gtest/vtest/watch/namespaces/nstest/rtest",
- events: []watch.Event{
- {Type: watch.Added, Object: getObject("vTest", "rTest", "namespaced_watch")},
- {Type: watch.Modified, Object: getObject("vTest", "rTest", "namespaced_watch")},
- {Type: watch.Deleted, Object: getObject("vTest", "rTest", "namespaced_watch")},
- },
- },
- }
- for _, tc := range tcs {
- gv := &unversioned.GroupVersion{Group: "gtest", Version: "vtest"}
- resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
- cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "GET" {
- t.Errorf("Watch(%q) got HTTP method %s. wanted GET", tc.name, r.Method)
- }
-
- if r.URL.Path != tc.path {
- t.Errorf("Watch(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
- }
-
- enc := versioned.NewEncoder(streaming.NewEncoder(w, dynamicCodec{}), dynamicCodec{})
- for _, e := range tc.events {
- enc.Encode(&e)
- }
- })
- if err != nil {
- t.Errorf("unexpected error when creating client: %v", err)
- continue
- }
- defer srv.Close()
-
- watcher, err := cl.Resource(resource, tc.namespace).Watch(&v1.ListOptions{})
- if err != nil {
- t.Errorf("unexpected error when watching %q: %v", tc.name, err)
- continue
- }
-
- for _, want := range tc.events {
- got := <-watcher.ResultChan()
- if !reflect.DeepEqual(got, want) {
- t.Errorf("Watch(%q) want: %v\ngot: %v", tc.name, want, got)
- }
- }
- }
-}
-
-func TestPatch(t *testing.T) {
- tcs := []struct {
- name string
- namespace string
- patch []byte
- want *runtime.Unstructured
- path string
- }{
- {
- name: "normal_patch",
- path: "/api/gtest/vtest/rtest/normal_patch",
- patch: getJSON("vTest", "rTest", "normal_patch"),
- want: getObject("vTest", "rTest", "normal_patch"),
- },
- {
- name: "namespaced_patch",
- namespace: "nstest",
- path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_patch",
- patch: getJSON("vTest", "rTest", "namespaced_patch"),
- want: getObject("vTest", "rTest", "namespaced_patch"),
- },
- }
- for _, tc := range tcs {
- gv := &unversioned.GroupVersion{Group: "gtest", Version: "vtest"}
- resource := &unversioned.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
- cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
- if r.Method != "PATCH" {
- t.Errorf("Patch(%q) got HTTP method %s. wanted PATCH", tc.name, r.Method)
- }
-
- if r.URL.Path != tc.path {
- t.Errorf("Patch(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
- }
-
- content := r.Header.Get("Content-Type")
- if content != string(api.StrategicMergePatchType) {
- t.Errorf("Patch(%q) got Content-Type %s. wanted %s", tc.name, content, api.StrategicMergePatchType)
- }
-
- data, err := ioutil.ReadAll(r.Body)
- if err != nil {
- t.Errorf("Patch(%q) unexpected error reading body: %v", tc.name, err)
- w.WriteHeader(http.StatusInternalServerError)
- return
- }
-
- w.Write(data)
- })
- if err != nil {
- t.Errorf("unexpected error when creating client: %v", err)
- continue
- }
- defer srv.Close()
-
- got, err := cl.Resource(resource, tc.namespace).Patch(tc.name, api.StrategicMergePatchType, tc.patch)
- if err != nil {
- t.Errorf("unexpected error when patching %q: %v", tc.name, err)
- continue
- }
-
- if !reflect.DeepEqual(got, tc.want) {
- t.Errorf("Patch(%q) want: %v\ngot: %v", tc.name, tc.want, got)
- }
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/dynamic/dynamic_util.go b/vendor/k8s.io/client-go/1.5/dynamic/dynamic_util.go
deleted file mode 100644
index a50aef964..000000000
--- a/vendor/k8s.io/client-go/1.5/dynamic/dynamic_util.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2016 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 dynamic
-
-import (
- "fmt"
-
- "k8s.io/client-go/1.5/pkg/api/meta"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-// VersionInterfaces provides an object converter and metadata
-// accessor appropriate for use with unstructured objects.
-func VersionInterfaces(unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
- return &meta.VersionInterfaces{
- ObjectConvertor: &runtime.UnstructuredObjectConverter{},
- MetadataAccessor: meta.NewAccessor(),
- }, nil
-}
-
-// NewDiscoveryRESTMapper returns a RESTMapper based on discovery information.
-func NewDiscoveryRESTMapper(resources []*unversioned.APIResourceList, versionFunc meta.VersionInterfacesFunc) (*meta.DefaultRESTMapper, error) {
- rm := meta.NewDefaultRESTMapper(nil, versionFunc)
- for _, resourceList := range resources {
- gv, err := unversioned.ParseGroupVersion(resourceList.GroupVersion)
- if err != nil {
- return nil, err
- }
-
- for _, resource := range resourceList.APIResources {
- gvk := gv.WithKind(resource.Kind)
- scope := meta.RESTScopeRoot
- if resource.Namespaced {
- scope = meta.RESTScopeNamespace
- }
- rm.Add(gvk, scope)
- }
- }
- return rm, nil
-}
-
-// ObjectTyper provides an ObjectTyper implementation for
-// runtime.Unstructured object based on discovery information.
-type ObjectTyper struct {
- registered map[unversioned.GroupVersionKind]bool
-}
-
-// NewObjectTyper constructs an ObjectTyper from discovery information.
-func NewObjectTyper(resources []*unversioned.APIResourceList) (runtime.ObjectTyper, error) {
- ot := &ObjectTyper{registered: make(map[unversioned.GroupVersionKind]bool)}
- for _, resourceList := range resources {
- gv, err := unversioned.ParseGroupVersion(resourceList.GroupVersion)
- if err != nil {
- return nil, err
- }
-
- for _, resource := range resourceList.APIResources {
- ot.registered[gv.WithKind(resource.Kind)] = true
- }
- }
- return ot, nil
-}
-
-// ObjectKinds returns a slice of one element with the
-// group,version,kind of the provided object, or an error if the
-// object is not *runtime.Unstructured or has no group,version,kind
-// information.
-func (ot *ObjectTyper) ObjectKinds(obj runtime.Object) ([]unversioned.GroupVersionKind, bool, error) {
- if _, ok := obj.(*runtime.Unstructured); !ok {
- return nil, false, fmt.Errorf("type %T is invalid for dynamic object typer", obj)
- }
- return []unversioned.GroupVersionKind{obj.GetObjectKind().GroupVersionKind()}, false, nil
-}
-
-// Recognizes returns true if the provided group,version,kind was in
-// the discovery information.
-func (ot *ObjectTyper) Recognizes(gvk unversioned.GroupVersionKind) bool {
- return ot.registered[gvk]
-}
diff --git a/vendor/k8s.io/client-go/1.5/dynamic/dynamic_util_test.go b/vendor/k8s.io/client-go/1.5/dynamic/dynamic_util_test.go
deleted file mode 100644
index 941080817..000000000
--- a/vendor/k8s.io/client-go/1.5/dynamic/dynamic_util_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-Copyright 2016 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 dynamic
-
-import (
- "testing"
-
- "k8s.io/client-go/1.5/pkg/api/unversioned"
-)
-
-func TestDiscoveryRESTMapper(t *testing.T) {
- resources := []*unversioned.APIResourceList{
- {
- GroupVersion: "test/beta1",
- APIResources: []unversioned.APIResource{
- {
- Name: "test_kinds",
- Namespaced: true,
- Kind: "test_kind",
- },
- },
- },
- }
-
- gvk := unversioned.GroupVersionKind{
- Group: "test",
- Version: "beta1",
- Kind: "test_kind",
- }
-
- mapper, err := NewDiscoveryRESTMapper(resources, VersionInterfaces)
- if err != nil {
- t.Fatalf("unexpected error creating mapper: %s", err)
- }
-
- for _, res := range []unversioned.GroupVersionResource{
- {
- Group: "test",
- Version: "beta1",
- Resource: "test_kinds",
- },
- {
- Version: "beta1",
- Resource: "test_kinds",
- },
- {
- Group: "test",
- Resource: "test_kinds",
- },
- {
- Resource: "test_kinds",
- },
- } {
- got, err := mapper.KindFor(res)
- if err != nil {
- t.Errorf("KindFor(%#v) unexpected error: %s", res, err)
- continue
- }
-
- if got != gvk {
- t.Errorf("KindFor(%#v) = %#v; want %#v", res, got, gvk)
- }
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/fake/clientset_generated.go b/vendor/k8s.io/client-go/1.5/kubernetes/fake/clientset_generated.go
deleted file mode 100644
index 091cf4763..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/fake/clientset_generated.go
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
-Copyright 2016 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/client-go/1.5/discovery"
- fakediscovery "k8s.io/client-go/1.5/discovery/fake"
- clientset "k8s.io/client-go/1.5/kubernetes"
- v1alpha1apps "k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1"
- fakev1alpha1apps "k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake"
- v1beta1authentication "k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1"
- fakev1beta1authentication "k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake"
- v1beta1authorization "k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1"
- fakev1beta1authorization "k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake"
- v1autoscaling "k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1"
- fakev1autoscaling "k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake"
- v1batch "k8s.io/client-go/1.5/kubernetes/typed/batch/v1"
- fakev1batch "k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake"
- v1alpha1certificates "k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1"
- fakev1alpha1certificates "k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake"
- v1core "k8s.io/client-go/1.5/kubernetes/typed/core/v1"
- fakev1core "k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake"
- v1beta1extensions "k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1"
- fakev1beta1extensions "k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake"
- v1alpha1policy "k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1"
- fakev1alpha1policy "k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake"
- v1alpha1rbac "k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1"
- fakev1alpha1rbac "k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake"
- v1beta1storage "k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1"
- fakev1beta1storage "k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake"
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/apimachinery/registered"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/watch"
- "k8s.io/client-go/1.5/testing"
-)
-
-// 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(api.Scheme, api.Codecs.UniversalDecoder())
- for _, obj := range objects {
- if err := o.Add(obj); err != nil {
- panic(err)
- }
- }
-
- fakePtr := testing.Fake{}
- fakePtr.AddReactor("*", "*", testing.ObjectReaction(o, registered.RESTMapper()))
-
- fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil))
-
- return &Clientset{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
-}
-
-func (c *Clientset) Discovery() discovery.DiscoveryInterface {
- return &fakediscovery.FakeDiscovery{Fake: &c.Fake}
-}
-
-var _ clientset.Interface = &Clientset{}
-
-// Core retrieves the CoreClient
-func (c *Clientset) Core() v1core.CoreInterface {
- return &fakev1core.FakeCore{Fake: &c.Fake}
-}
-
-// Apps retrieves the AppsClient
-func (c *Clientset) Apps() v1alpha1apps.AppsInterface {
- return &fakev1alpha1apps.FakeApps{Fake: &c.Fake}
-}
-
-// Authentication retrieves the AuthenticationClient
-func (c *Clientset) Authentication() v1beta1authentication.AuthenticationInterface {
- return &fakev1beta1authentication.FakeAuthentication{Fake: &c.Fake}
-}
-
-// Authorization retrieves the AuthorizationClient
-func (c *Clientset) Authorization() v1beta1authorization.AuthorizationInterface {
- return &fakev1beta1authorization.FakeAuthorization{Fake: &c.Fake}
-}
-
-// Autoscaling retrieves the AutoscalingClient
-func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingInterface {
- return &fakev1autoscaling.FakeAutoscaling{Fake: &c.Fake}
-}
-
-// Batch retrieves the BatchClient
-func (c *Clientset) Batch() v1batch.BatchInterface {
- return &fakev1batch.FakeBatch{Fake: &c.Fake}
-}
-
-// Certificates retrieves the CertificatesClient
-func (c *Clientset) Certificates() v1alpha1certificates.CertificatesInterface {
- return &fakev1alpha1certificates.FakeCertificates{Fake: &c.Fake}
-}
-
-// Extensions retrieves the ExtensionsClient
-func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface {
- return &fakev1beta1extensions.FakeExtensions{Fake: &c.Fake}
-}
-
-// Policy retrieves the PolicyClient
-func (c *Clientset) Policy() v1alpha1policy.PolicyInterface {
- return &fakev1alpha1policy.FakePolicy{Fake: &c.Fake}
-}
-
-// Rbac retrieves the RbacClient
-func (c *Clientset) Rbac() v1alpha1rbac.RbacInterface {
- return &fakev1alpha1rbac.FakeRbac{Fake: &c.Fake}
-}
-
-// Storage retrieves the StorageClient
-func (c *Clientset) Storage() v1beta1storage.StorageInterface {
- return &fakev1beta1storage.FakeStorage{Fake: &c.Fake}
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/fake/doc.go
deleted file mode 100644
index f849c0cda..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// This package has the automatically generated fake clientset.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/fake_apps_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/fake_apps_client.go
deleted file mode 100644
index 7ac4d7d68..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/fake_apps_client.go
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2016 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 (
- v1alpha1 "k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakeApps struct {
- *testing.Fake
-}
-
-func (c *FakeApps) PetSets(namespace string) v1alpha1.PetSetInterface {
- return &FakePetSets{c, namespace}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeApps) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/fake_petset.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/fake_petset.go
deleted file mode 100644
index 3123dd070..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/fake/fake_petset.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1alpha1 "k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakePetSets implements PetSetInterface
-type FakePetSets struct {
- Fake *FakeApps
- ns string
-}
-
-var petsetsResource = unversioned.GroupVersionResource{Group: "apps", Version: "v1alpha1", Resource: "petsets"}
-
-func (c *FakePetSets) Create(petSet *v1alpha1.PetSet) (result *v1alpha1.PetSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(petsetsResource, c.ns, petSet), &v1alpha1.PetSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.PetSet), err
-}
-
-func (c *FakePetSets) Update(petSet *v1alpha1.PetSet) (result *v1alpha1.PetSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(petsetsResource, c.ns, petSet), &v1alpha1.PetSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.PetSet), err
-}
-
-func (c *FakePetSets) UpdateStatus(petSet *v1alpha1.PetSet) (*v1alpha1.PetSet, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(petsetsResource, "status", c.ns, petSet), &v1alpha1.PetSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.PetSet), err
-}
-
-func (c *FakePetSets) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(petsetsResource, c.ns, name), &v1alpha1.PetSet{})
-
- return err
-}
-
-func (c *FakePetSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(petsetsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1alpha1.PetSetList{})
- return err
-}
-
-func (c *FakePetSets) Get(name string) (result *v1alpha1.PetSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(petsetsResource, c.ns, name), &v1alpha1.PetSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.PetSet), err
-}
-
-func (c *FakePetSets) List(opts api.ListOptions) (result *v1alpha1.PetSetList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(petsetsResource, c.ns, opts), &v1alpha1.PetSetList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1alpha1.PetSetList{}
- for _, item := range obj.(*v1alpha1.PetSetList).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 petSets.
-func (c *FakePetSets) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(petsetsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched petSet.
-func (c *FakePetSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PetSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(petsetsResource, c.ns, name, data, subresources...), &v1alpha1.PetSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.PetSet), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go
deleted file mode 100644
index 8402bfb8b..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2016 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 (
- v1beta1 "k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakeAuthentication struct {
- *testing.Fake
-}
-
-func (c *FakeAuthentication) TokenReviews() v1beta1.TokenReviewInterface {
- return &FakeTokenReviews{c}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeAuthentication) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go
deleted file mode 100644
index 6508f5a94..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-Copyright 2016 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
-
-// FakeTokenReviews implements TokenReviewInterface
-type FakeTokenReviews struct {
- Fake *FakeAuthentication
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go
deleted file mode 100644
index 953b0361d..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2016 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 (
- v1beta1 "k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakeAuthorization struct {
- *testing.Fake
-}
-
-func (c *FakeAuthorization) LocalSubjectAccessReviews(namespace string) v1beta1.LocalSubjectAccessReviewInterface {
- return &FakeLocalSubjectAccessReviews{c, namespace}
-}
-
-func (c *FakeAuthorization) SelfSubjectAccessReviews() v1beta1.SelfSubjectAccessReviewInterface {
- return &FakeSelfSubjectAccessReviews{c}
-}
-
-func (c *FakeAuthorization) SubjectAccessReviews() v1beta1.SubjectAccessReviewInterface {
- return &FakeSubjectAccessReviews{c}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeAuthorization) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go
deleted file mode 100644
index 50a1e3a89..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-Copyright 2016 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
-
-// FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface
-type FakeLocalSubjectAccessReviews struct {
- Fake *FakeAuthorization
- ns string
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go
deleted file mode 100644
index b107c1b2c..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-Copyright 2016 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
-
-// FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
-type FakeSelfSubjectAccessReviews struct {
- Fake *FakeAuthorization
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go
deleted file mode 100644
index 0a01cd81a..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-Copyright 2016 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
-
-// FakeSubjectAccessReviews implements SubjectAccessReviewInterface
-type FakeSubjectAccessReviews struct {
- Fake *FakeAuthorization
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview_expansion.go
deleted file mode 100644
index 34a7138af..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview_expansion.go
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-Copyright 2016 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 (
- authorizationapi "k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1"
-
- "k8s.io/client-go/1.5/testing"
-)
-
-func (c *FakeSubjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
- obj, err := c.Fake.Invokes(testing.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("subjectaccessreviews"), sar), &authorizationapi.SubjectAccessReview{})
- return obj.(*authorizationapi.SubjectAccessReview), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go
deleted file mode 100644
index 1a18c6f4d..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2016 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/client-go/1.5/kubernetes/typed/autoscaling/v1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakeAutoscaling struct {
- *testing.Fake
-}
-
-func (c *FakeAutoscaling) HorizontalPodAutoscalers(namespace string) v1.HorizontalPodAutoscalerInterface {
- return &FakeHorizontalPodAutoscalers{c, namespace}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeAutoscaling) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go
deleted file mode 100644
index cdebd992c..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/apis/autoscaling/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
-type FakeHorizontalPodAutoscalers struct {
- Fake *FakeAutoscaling
- ns string
-}
-
-var horizontalpodautoscalersResource = unversioned.GroupVersionResource{Group: "autoscaling", Version: "v1", Resource: "horizontalpodautoscalers"}
-
-func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.HorizontalPodAutoscaler), err
-}
-
-func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.HorizontalPodAutoscaler), err
-}
-
-func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.HorizontalPodAutoscaler), err
-}
-
-func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{})
-
- return err
-}
-
-func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.HorizontalPodAutoscalerList{})
- return err
-}
-
-func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *v1.HorizontalPodAutoscaler, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.HorizontalPodAutoscaler), err
-}
-
-func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1.HorizontalPodAutoscalerList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.HorizontalPodAutoscalerList{}
- for _, item := range obj.(*v1.HorizontalPodAutoscalerList).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 horizontalPodAutoscalers.
-func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched horizontalPodAutoscaler.
-func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v1.HorizontalPodAutoscaler{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.HorizontalPodAutoscaler), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/fake_batch_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/fake_batch_client.go
deleted file mode 100644
index 679f76e5c..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/fake_batch_client.go
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2016 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/client-go/1.5/kubernetes/typed/batch/v1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakeBatch struct {
- *testing.Fake
-}
-
-func (c *FakeBatch) Jobs(namespace string) v1.JobInterface {
- return &FakeJobs{c, namespace}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeBatch) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/fake_job.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/fake_job.go
deleted file mode 100644
index 061254b57..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/fake/fake_job.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/apis/batch/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeJobs implements JobInterface
-type FakeJobs struct {
- Fake *FakeBatch
- ns string
-}
-
-var jobsResource = unversioned.GroupVersionResource{Group: "batch", Version: "v1", Resource: "jobs"}
-
-func (c *FakeJobs) Create(job *v1.Job) (result *v1.Job, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &v1.Job{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Job), err
-}
-
-func (c *FakeJobs) Update(job *v1.Job) (result *v1.Job, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &v1.Job{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Job), err
-}
-
-func (c *FakeJobs) UpdateStatus(job *v1.Job) (*v1.Job, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &v1.Job{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Job), err
-}
-
-func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &v1.Job{})
-
- return err
-}
-
-func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.JobList{})
- return err
-}
-
-func (c *FakeJobs) Get(name string) (result *v1.Job, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(jobsResource, c.ns, name), &v1.Job{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Job), err
-}
-
-func (c *FakeJobs) List(opts api.ListOptions) (result *v1.JobList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(jobsResource, c.ns, opts), &v1.JobList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.JobList{}
- for _, item := range obj.(*v1.JobList).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 jobs.
-func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(jobsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched job.
-func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v1.Job{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Job), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/fake_certificates_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/fake_certificates_client.go
deleted file mode 100644
index acbc7a89a..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/fake_certificates_client.go
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2016 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 (
- v1alpha1 "k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakeCertificates struct {
- *testing.Fake
-}
-
-func (c *FakeCertificates) CertificateSigningRequests() v1alpha1.CertificateSigningRequestInterface {
- return &FakeCertificateSigningRequests{c}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeCertificates) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest.go
deleted file mode 100644
index 38178c364..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest.go
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1alpha1 "k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeCertificateSigningRequests implements CertificateSigningRequestInterface
-type FakeCertificateSigningRequests struct {
- Fake *FakeCertificates
-}
-
-var certificatesigningrequestsResource = unversioned.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1alpha1", Resource: "certificatesigningrequests"}
-
-func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1alpha1.CertificateSigningRequest{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.CertificateSigningRequest), err
-}
-
-func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1alpha1.CertificateSigningRequest{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.CertificateSigningRequest), err
-}
-
-func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1alpha1.CertificateSigningRequest{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.CertificateSigningRequest), err
-}
-
-func (c *FakeCertificateSigningRequests) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{})
- return err
-}
-
-func (c *FakeCertificateSigningRequests) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1alpha1.CertificateSigningRequestList{})
- return err
-}
-
-func (c *FakeCertificateSigningRequests) Get(name string) (result *v1alpha1.CertificateSigningRequest, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.CertificateSigningRequest), err
-}
-
-func (c *FakeCertificateSigningRequests) List(opts api.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootListAction(certificatesigningrequestsResource, opts), &v1alpha1.CertificateSigningRequestList{})
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1alpha1.CertificateSigningRequestList{}
- for _, item := range obj.(*v1alpha1.CertificateSigningRequestList).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 certificateSigningRequests.
-func (c *FakeCertificateSigningRequests) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(certificatesigningrequestsResource, opts))
-}
-
-// Patch applies the patch and returns the patched certificateSigningRequest.
-func (c *FakeCertificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, data, subresources...), &v1alpha1.CertificateSigningRequest{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.CertificateSigningRequest), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_componentstatus.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_componentstatus.go
deleted file mode 100644
index 2f8fb80f6..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_componentstatus.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeComponentStatuses implements ComponentStatusInterface
-type FakeComponentStatuses struct {
- Fake *FakeCore
-}
-
-var componentstatusesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "componentstatuses"}
-
-func (c *FakeComponentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(componentstatusesResource, componentStatus), &v1.ComponentStatus{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ComponentStatus), err
-}
-
-func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &v1.ComponentStatus{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ComponentStatus), err
-}
-
-func (c *FakeComponentStatuses) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewRootDeleteAction(componentstatusesResource, name), &v1.ComponentStatus{})
- return err
-}
-
-func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.ComponentStatusList{})
- return err
-}
-
-func (c *FakeComponentStatuses) Get(name string) (result *v1.ComponentStatus, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(componentstatusesResource, name), &v1.ComponentStatus{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ComponentStatus), err
-}
-
-func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *v1.ComponentStatusList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootListAction(componentstatusesResource, opts), &v1.ComponentStatusList{})
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.ComponentStatusList{}
- for _, item := range obj.(*v1.ComponentStatusList).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 componentStatuses.
-func (c *FakeComponentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(componentstatusesResource, opts))
-}
-
-// Patch applies the patch and returns the patched componentStatus.
-func (c *FakeComponentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, data, subresources...), &v1.ComponentStatus{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ComponentStatus), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_configmap.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_configmap.go
deleted file mode 100644
index 48e09b131..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_configmap.go
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeConfigMaps implements ConfigMapInterface
-type FakeConfigMaps struct {
- Fake *FakeCore
- ns string
-}
-
-var configmapsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "configmaps"}
-
-func (c *FakeConfigMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(configmapsResource, c.ns, configMap), &v1.ConfigMap{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ConfigMap), err
-}
-
-func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &v1.ConfigMap{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ConfigMap), err
-}
-
-func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(configmapsResource, c.ns, name), &v1.ConfigMap{})
-
- return err
-}
-
-func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.ConfigMapList{})
- return err
-}
-
-func (c *FakeConfigMaps) Get(name string) (result *v1.ConfigMap, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(configmapsResource, c.ns, name), &v1.ConfigMap{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ConfigMap), err
-}
-
-func (c *FakeConfigMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.ConfigMapList{}
- for _, item := range obj.(*v1.ConfigMapList).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 configMaps.
-func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(configmapsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched configMap.
-func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &v1.ConfigMap{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ConfigMap), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_core_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_core_client.go
deleted file mode 100644
index fe11ad077..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_core_client.go
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-Copyright 2016 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/client-go/1.5/kubernetes/typed/core/v1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakeCore struct {
- *testing.Fake
-}
-
-func (c *FakeCore) ComponentStatuses() v1.ComponentStatusInterface {
- return &FakeComponentStatuses{c}
-}
-
-func (c *FakeCore) ConfigMaps(namespace string) v1.ConfigMapInterface {
- return &FakeConfigMaps{c, namespace}
-}
-
-func (c *FakeCore) Endpoints(namespace string) v1.EndpointsInterface {
- return &FakeEndpoints{c, namespace}
-}
-
-func (c *FakeCore) Events(namespace string) v1.EventInterface {
- return &FakeEvents{c, namespace}
-}
-
-func (c *FakeCore) LimitRanges(namespace string) v1.LimitRangeInterface {
- return &FakeLimitRanges{c, namespace}
-}
-
-func (c *FakeCore) Namespaces() v1.NamespaceInterface {
- return &FakeNamespaces{c}
-}
-
-func (c *FakeCore) Nodes() v1.NodeInterface {
- return &FakeNodes{c}
-}
-
-func (c *FakeCore) PersistentVolumes() v1.PersistentVolumeInterface {
- return &FakePersistentVolumes{c}
-}
-
-func (c *FakeCore) PersistentVolumeClaims(namespace string) v1.PersistentVolumeClaimInterface {
- return &FakePersistentVolumeClaims{c, namespace}
-}
-
-func (c *FakeCore) Pods(namespace string) v1.PodInterface {
- return &FakePods{c, namespace}
-}
-
-func (c *FakeCore) PodTemplates(namespace string) v1.PodTemplateInterface {
- return &FakePodTemplates{c, namespace}
-}
-
-func (c *FakeCore) ReplicationControllers(namespace string) v1.ReplicationControllerInterface {
- return &FakeReplicationControllers{c, namespace}
-}
-
-func (c *FakeCore) ResourceQuotas(namespace string) v1.ResourceQuotaInterface {
- return &FakeResourceQuotas{c, namespace}
-}
-
-func (c *FakeCore) Secrets(namespace string) v1.SecretInterface {
- return &FakeSecrets{c, namespace}
-}
-
-func (c *FakeCore) Services(namespace string) v1.ServiceInterface {
- return &FakeServices{c, namespace}
-}
-
-func (c *FakeCore) ServiceAccounts(namespace string) v1.ServiceAccountInterface {
- return &FakeServiceAccounts{c, namespace}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeCore) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_endpoints.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_endpoints.go
deleted file mode 100644
index e118ece45..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_endpoints.go
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeEndpoints implements EndpointsInterface
-type FakeEndpoints struct {
- Fake *FakeCore
- ns string
-}
-
-var endpointsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "endpoints"}
-
-func (c *FakeEndpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &v1.Endpoints{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Endpoints), err
-}
-
-func (c *FakeEndpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &v1.Endpoints{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Endpoints), err
-}
-
-func (c *FakeEndpoints) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(endpointsResource, c.ns, name), &v1.Endpoints{})
-
- return err
-}
-
-func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.EndpointsList{})
- return err
-}
-
-func (c *FakeEndpoints) Get(name string) (result *v1.Endpoints, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(endpointsResource, c.ns, name), &v1.Endpoints{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Endpoints), err
-}
-
-func (c *FakeEndpoints) List(opts api.ListOptions) (result *v1.EndpointsList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(endpointsResource, c.ns, opts), &v1.EndpointsList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.EndpointsList{}
- for _, item := range obj.(*v1.EndpointsList).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 endpoints.
-func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(endpointsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched endpoints.
-func (c *FakeEndpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, data, subresources...), &v1.Endpoints{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Endpoints), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_event.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_event.go
deleted file mode 100644
index cc3cf5c5f..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_event.go
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeEvents implements EventInterface
-type FakeEvents struct {
- Fake *FakeCore
- ns string
-}
-
-var eventsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "events"}
-
-func (c *FakeEvents) Create(event *v1.Event) (result *v1.Event, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &v1.Event{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Event), err
-}
-
-func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &v1.Event{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Event), err
-}
-
-func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{})
-
- return err
-}
-
-func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.EventList{})
- return err
-}
-
-func (c *FakeEvents) Get(name string) (result *v1.Event, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(eventsResource, c.ns, name), &v1.Event{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Event), err
-}
-
-func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(eventsResource, c.ns, opts), &v1.EventList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.EventList{}
- for _, item := range obj.(*v1.EventList).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 events.
-func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched event.
-func (c *FakeEvents) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &v1.Event{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Event), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_event_expansion.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_event_expansion.go
deleted file mode 100644
index dd21c9c05..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_event_expansion.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2014 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/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/pkg/fields"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/testing"
-)
-
-func (c *FakeEvents) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
- action := testing.NewRootCreateAction(eventsResource, event)
- if c.ns != "" {
- action = testing.NewCreateAction(eventsResource, c.ns, event)
- }
- obj, err := c.Fake.Invokes(action, event)
- if obj == nil {
- return nil, err
- }
-
- return obj.(*v1.Event), err
-}
-
-// Update replaces an existing event. Returns the copy of the event the server returns, or an error.
-func (c *FakeEvents) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
- action := testing.NewRootUpdateAction(eventsResource, event)
- if c.ns != "" {
- action = testing.NewUpdateAction(eventsResource, c.ns, event)
- }
- obj, err := c.Fake.Invokes(action, event)
- if obj == nil {
- return nil, err
- }
-
- return obj.(*v1.Event), err
-}
-
-// PatchWithEventNamespace patches an existing event. Returns the copy of the event the server returns, or an error.
-func (c *FakeEvents) PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error) {
- action := testing.NewRootPatchAction(eventsResource, event.Name, data)
- if c.ns != "" {
- action = testing.NewPatchAction(eventsResource, c.ns, event.Name, data)
- }
- obj, err := c.Fake.Invokes(action, event)
- if obj == nil {
- return nil, err
- }
-
- return obj.(*v1.Event), err
-}
-
-// Search returns a list of events matching the specified object.
-func (c *FakeEvents) Search(objOrRef runtime.Object) (*v1.EventList, error) {
- action := testing.NewRootListAction(eventsResource, api.ListOptions{})
- if c.ns != "" {
- action = testing.NewListAction(eventsResource, c.ns, api.ListOptions{})
- }
- obj, err := c.Fake.Invokes(action, &v1.EventList{})
- if obj == nil {
- return nil, err
- }
-
- return obj.(*v1.EventList), err
-}
-
-func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
- action := testing.GenericActionImpl{}
- action.Verb = "get-field-selector"
- action.Resource = eventsResource
-
- c.Fake.Invokes(action, nil)
- return fields.Everything()
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_limitrange.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_limitrange.go
deleted file mode 100644
index 2462d302c..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_limitrange.go
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeLimitRanges implements LimitRangeInterface
-type FakeLimitRanges struct {
- Fake *FakeCore
- ns string
-}
-
-var limitrangesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "limitranges"}
-
-func (c *FakeLimitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(limitrangesResource, c.ns, limitRange), &v1.LimitRange{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.LimitRange), err
-}
-
-func (c *FakeLimitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &v1.LimitRange{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.LimitRange), err
-}
-
-func (c *FakeLimitRanges) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(limitrangesResource, c.ns, name), &v1.LimitRange{})
-
- return err
-}
-
-func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.LimitRangeList{})
- return err
-}
-
-func (c *FakeLimitRanges) Get(name string) (result *v1.LimitRange, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(limitrangesResource, c.ns, name), &v1.LimitRange{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.LimitRange), err
-}
-
-func (c *FakeLimitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(limitrangesResource, c.ns, opts), &v1.LimitRangeList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.LimitRangeList{}
- for _, item := range obj.(*v1.LimitRangeList).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 limitRanges.
-func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(limitrangesResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched limitRange.
-func (c *FakeLimitRanges) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, data, subresources...), &v1.LimitRange{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.LimitRange), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_namespace.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_namespace.go
deleted file mode 100644
index 54f5c0dd0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_namespace.go
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeNamespaces implements NamespaceInterface
-type FakeNamespaces struct {
- Fake *FakeCore
-}
-
-var namespacesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "namespaces"}
-
-func (c *FakeNamespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &v1.Namespace{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Namespace), err
-}
-
-func (c *FakeNamespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &v1.Namespace{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Namespace), err
-}
-
-func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &v1.Namespace{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Namespace), err
-}
-
-func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{})
- return err
-}
-
-func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(namespacesResource, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.NamespaceList{})
- return err
-}
-
-func (c *FakeNamespaces) Get(name string) (result *v1.Namespace, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(namespacesResource, name), &v1.Namespace{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Namespace), err
-}
-
-func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{})
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.NamespaceList{}
- for _, item := range obj.(*v1.NamespaceList).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 namespaces.
-func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(namespacesResource, opts))
-}
-
-// Patch applies the patch and returns the patched namespace.
-func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &v1.Namespace{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Namespace), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go
deleted file mode 100644
index c6f57e259..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_namespace_expansion.go
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2014 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/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/testing"
-)
-
-func (c *FakeNamespaces) Finalize(namespace *v1.Namespace) (*v1.Namespace, error) {
- action := testing.CreateActionImpl{}
- action.Verb = "create"
- action.Resource = namespacesResource
- action.Subresource = "finalize"
- action.Object = namespace
-
- obj, err := c.Fake.Invokes(action, namespace)
- if obj == nil {
- return nil, err
- }
-
- return obj.(*v1.Namespace), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_node.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_node.go
deleted file mode 100644
index c16c9d0b7..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_node.go
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeNodes implements NodeInterface
-type FakeNodes struct {
- Fake *FakeCore
-}
-
-var nodesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "nodes"}
-
-func (c *FakeNodes) Create(node *v1.Node) (result *v1.Node, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(nodesResource, node), &v1.Node{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Node), err
-}
-
-func (c *FakeNodes) Update(node *v1.Node) (result *v1.Node, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(nodesResource, node), &v1.Node{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Node), err
-}
-
-func (c *FakeNodes) UpdateStatus(node *v1.Node) (*v1.Node, error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &v1.Node{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Node), err
-}
-
-func (c *FakeNodes) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewRootDeleteAction(nodesResource, name), &v1.Node{})
- return err
-}
-
-func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(nodesResource, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.NodeList{})
- return err
-}
-
-func (c *FakeNodes) Get(name string) (result *v1.Node, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(nodesResource, name), &v1.Node{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Node), err
-}
-
-func (c *FakeNodes) List(opts api.ListOptions) (result *v1.NodeList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootListAction(nodesResource, opts), &v1.NodeList{})
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.NodeList{}
- for _, item := range obj.(*v1.NodeList).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 nodes.
-func (c *FakeNodes) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(nodesResource, opts))
-}
-
-// Patch applies the patch and returns the patched node.
-func (c *FakeNodes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, data, subresources...), &v1.Node{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Node), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_persistentvolume.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_persistentvolume.go
deleted file mode 100644
index 4376c0ed1..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_persistentvolume.go
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakePersistentVolumes implements PersistentVolumeInterface
-type FakePersistentVolumes struct {
- Fake *FakeCore
-}
-
-var persistentvolumesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "persistentvolumes"}
-
-func (c *FakePersistentVolumes) Create(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(persistentvolumesResource, persistentVolume), &v1.PersistentVolume{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PersistentVolume), err
-}
-
-func (c *FakePersistentVolumes) Update(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &v1.PersistentVolume{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PersistentVolume), err
-}
-
-func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) (*v1.PersistentVolume, error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &v1.PersistentVolume{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PersistentVolume), err
-}
-
-func (c *FakePersistentVolumes) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewRootDeleteAction(persistentvolumesResource, name), &v1.PersistentVolume{})
- return err
-}
-
-func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.PersistentVolumeList{})
- return err
-}
-
-func (c *FakePersistentVolumes) Get(name string) (result *v1.PersistentVolume, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(persistentvolumesResource, name), &v1.PersistentVolume{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PersistentVolume), err
-}
-
-func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *v1.PersistentVolumeList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootListAction(persistentvolumesResource, opts), &v1.PersistentVolumeList{})
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.PersistentVolumeList{}
- for _, item := range obj.(*v1.PersistentVolumeList).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 persistentVolumes.
-func (c *FakePersistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(persistentvolumesResource, opts))
-}
-
-// Patch applies the patch and returns the patched persistentVolume.
-func (c *FakePersistentVolumes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, data, subresources...), &v1.PersistentVolume{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PersistentVolume), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go
deleted file mode 100644
index 7c2f82c6f..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakePersistentVolumeClaims implements PersistentVolumeClaimInterface
-type FakePersistentVolumeClaims struct {
- Fake *FakeCore
- ns string
-}
-
-var persistentvolumeclaimsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "persistentvolumeclaims"}
-
-func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &v1.PersistentVolumeClaim{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PersistentVolumeClaim), err
-}
-
-func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &v1.PersistentVolumeClaim{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PersistentVolumeClaim), err
-}
-
-func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &v1.PersistentVolumeClaim{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PersistentVolumeClaim), err
-}
-
-func (c *FakePersistentVolumeClaims) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &v1.PersistentVolumeClaim{})
-
- return err
-}
-
-func (c *FakePersistentVolumeClaims) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.PersistentVolumeClaimList{})
- return err
-}
-
-func (c *FakePersistentVolumeClaims) Get(name string) (result *v1.PersistentVolumeClaim, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &v1.PersistentVolumeClaim{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PersistentVolumeClaim), err
-}
-
-func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *v1.PersistentVolumeClaimList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(persistentvolumeclaimsResource, c.ns, opts), &v1.PersistentVolumeClaimList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.PersistentVolumeClaimList{}
- for _, item := range obj.(*v1.PersistentVolumeClaimList).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 persistentVolumeClaims.
-func (c *FakePersistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched persistentVolumeClaim.
-func (c *FakePersistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, data, subresources...), &v1.PersistentVolumeClaim{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PersistentVolumeClaim), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_pod.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_pod.go
deleted file mode 100644
index 414da1764..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_pod.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakePods implements PodInterface
-type FakePods struct {
- Fake *FakeCore
- ns string
-}
-
-var podsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"}
-
-func (c *FakePods) Create(pod *v1.Pod) (result *v1.Pod, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &v1.Pod{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Pod), err
-}
-
-func (c *FakePods) Update(pod *v1.Pod) (result *v1.Pod, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &v1.Pod{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Pod), err
-}
-
-func (c *FakePods) UpdateStatus(pod *v1.Pod) (*v1.Pod, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &v1.Pod{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Pod), err
-}
-
-func (c *FakePods) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(podsResource, c.ns, name), &v1.Pod{})
-
- return err
-}
-
-func (c *FakePods) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.PodList{})
- return err
-}
-
-func (c *FakePods) Get(name string) (result *v1.Pod, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(podsResource, c.ns, name), &v1.Pod{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Pod), err
-}
-
-func (c *FakePods) List(opts api.ListOptions) (result *v1.PodList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(podsResource, c.ns, opts), &v1.PodList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.PodList{}
- for _, item := range obj.(*v1.PodList).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 pods.
-func (c *FakePods) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(podsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched pod.
-func (c *FakePods) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, data, subresources...), &v1.Pod{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Pod), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_pod_expansion.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_pod_expansion.go
deleted file mode 100644
index 5fda6de62..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_pod_expansion.go
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-Copyright 2014 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/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1"
- "k8s.io/client-go/1.5/rest"
- "k8s.io/client-go/1.5/testing"
-)
-
-func (c *FakePods) Bind(binding *v1.Binding) error {
- action := testing.CreateActionImpl{}
- action.Verb = "create"
- action.Resource = podsResource
- action.Subresource = "bindings"
- action.Object = binding
-
- _, err := c.Fake.Invokes(action, binding)
- return err
-}
-
-func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request {
- action := testing.GenericActionImpl{}
- action.Verb = "get"
- action.Namespace = c.ns
- action.Resource = podsResource
- action.Subresource = "logs"
- action.Value = opts
-
- _, _ = c.Fake.Invokes(action, &v1.Pod{})
- return &rest.Request{}
-}
-
-func (c *FakePods) Evict(eviction *v1alpha1.Eviction) error {
- action := testing.CreateActionImpl{}
- action.Verb = "create"
- action.Resource = podsResource
- action.Subresource = "eviction"
- action.Object = eviction
-
- _, err := c.Fake.Invokes(action, eviction)
- return err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_podtemplate.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_podtemplate.go
deleted file mode 100644
index 709398618..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_podtemplate.go
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakePodTemplates implements PodTemplateInterface
-type FakePodTemplates struct {
- Fake *FakeCore
- ns string
-}
-
-var podtemplatesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "podtemplates"}
-
-func (c *FakePodTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &v1.PodTemplate{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PodTemplate), err
-}
-
-func (c *FakePodTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &v1.PodTemplate{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PodTemplate), err
-}
-
-func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(podtemplatesResource, c.ns, name), &v1.PodTemplate{})
-
- return err
-}
-
-func (c *FakePodTemplates) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.PodTemplateList{})
- return err
-}
-
-func (c *FakePodTemplates) Get(name string) (result *v1.PodTemplate, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(podtemplatesResource, c.ns, name), &v1.PodTemplate{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PodTemplate), err
-}
-
-func (c *FakePodTemplates) List(opts api.ListOptions) (result *v1.PodTemplateList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(podtemplatesResource, c.ns, opts), &v1.PodTemplateList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.PodTemplateList{}
- for _, item := range obj.(*v1.PodTemplateList).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 podTemplates.
-func (c *FakePodTemplates) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(podtemplatesResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched podTemplate.
-func (c *FakePodTemplates) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, data, subresources...), &v1.PodTemplate{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.PodTemplate), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go
deleted file mode 100644
index 61b45d76e..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeReplicationControllers implements ReplicationControllerInterface
-type FakeReplicationControllers struct {
- Fake *FakeCore
- ns string
-}
-
-var replicationcontrollersResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "replicationcontrollers"}
-
-func (c *FakeReplicationControllers) Create(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &v1.ReplicationController{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ReplicationController), err
-}
-
-func (c *FakeReplicationControllers) Update(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &v1.ReplicationController{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ReplicationController), err
-}
-
-func (c *FakeReplicationControllers) UpdateStatus(replicationController *v1.ReplicationController) (*v1.ReplicationController, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &v1.ReplicationController{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ReplicationController), err
-}
-
-func (c *FakeReplicationControllers) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(replicationcontrollersResource, c.ns, name), &v1.ReplicationController{})
-
- return err
-}
-
-func (c *FakeReplicationControllers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.ReplicationControllerList{})
- return err
-}
-
-func (c *FakeReplicationControllers) Get(name string) (result *v1.ReplicationController, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(replicationcontrollersResource, c.ns, name), &v1.ReplicationController{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ReplicationController), err
-}
-
-func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *v1.ReplicationControllerList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(replicationcontrollersResource, c.ns, opts), &v1.ReplicationControllerList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.ReplicationControllerList{}
- for _, item := range obj.(*v1.ReplicationControllerList).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 replicationControllers.
-func (c *FakeReplicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(replicationcontrollersResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched replicationController.
-func (c *FakeReplicationControllers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, data, subresources...), &v1.ReplicationController{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ReplicationController), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_resourcequota.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_resourcequota.go
deleted file mode 100644
index 8170e833a..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_resourcequota.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeResourceQuotas implements ResourceQuotaInterface
-type FakeResourceQuotas struct {
- Fake *FakeCore
- ns string
-}
-
-var resourcequotasResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "resourcequotas"}
-
-func (c *FakeResourceQuotas) Create(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &v1.ResourceQuota{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ResourceQuota), err
-}
-
-func (c *FakeResourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &v1.ResourceQuota{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ResourceQuota), err
-}
-
-func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (*v1.ResourceQuota, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &v1.ResourceQuota{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ResourceQuota), err
-}
-
-func (c *FakeResourceQuotas) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(resourcequotasResource, c.ns, name), &v1.ResourceQuota{})
-
- return err
-}
-
-func (c *FakeResourceQuotas) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.ResourceQuotaList{})
- return err
-}
-
-func (c *FakeResourceQuotas) Get(name string) (result *v1.ResourceQuota, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(resourcequotasResource, c.ns, name), &v1.ResourceQuota{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ResourceQuota), err
-}
-
-func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *v1.ResourceQuotaList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(resourcequotasResource, c.ns, opts), &v1.ResourceQuotaList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.ResourceQuotaList{}
- for _, item := range obj.(*v1.ResourceQuotaList).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 resourceQuotas.
-func (c *FakeResourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(resourcequotasResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched resourceQuota.
-func (c *FakeResourceQuotas) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, data, subresources...), &v1.ResourceQuota{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ResourceQuota), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_secret.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_secret.go
deleted file mode 100644
index 3c98f8c35..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_secret.go
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeSecrets implements SecretInterface
-type FakeSecrets struct {
- Fake *FakeCore
- ns string
-}
-
-var secretsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "secrets"}
-
-func (c *FakeSecrets) Create(secret *v1.Secret) (result *v1.Secret, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &v1.Secret{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Secret), err
-}
-
-func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &v1.Secret{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Secret), err
-}
-
-func (c *FakeSecrets) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(secretsResource, c.ns, name), &v1.Secret{})
-
- return err
-}
-
-func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.SecretList{})
- return err
-}
-
-func (c *FakeSecrets) Get(name string) (result *v1.Secret, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(secretsResource, c.ns, name), &v1.Secret{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Secret), err
-}
-
-func (c *FakeSecrets) List(opts api.ListOptions) (result *v1.SecretList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(secretsResource, c.ns, opts), &v1.SecretList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.SecretList{}
- for _, item := range obj.(*v1.SecretList).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 secrets.
-func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(secretsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched secret.
-func (c *FakeSecrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &v1.Secret{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Secret), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_service.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_service.go
deleted file mode 100644
index 62911122c..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_service.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeServices implements ServiceInterface
-type FakeServices struct {
- Fake *FakeCore
- ns string
-}
-
-var servicesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "services"}
-
-func (c *FakeServices) Create(service *v1.Service) (result *v1.Service, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &v1.Service{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Service), err
-}
-
-func (c *FakeServices) Update(service *v1.Service) (result *v1.Service, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &v1.Service{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Service), err
-}
-
-func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &v1.Service{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Service), err
-}
-
-func (c *FakeServices) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(servicesResource, c.ns, name), &v1.Service{})
-
- return err
-}
-
-func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(servicesResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.ServiceList{})
- return err
-}
-
-func (c *FakeServices) Get(name string) (result *v1.Service, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(servicesResource, c.ns, name), &v1.Service{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Service), err
-}
-
-func (c *FakeServices) List(opts api.ListOptions) (result *v1.ServiceList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(servicesResource, c.ns, opts), &v1.ServiceList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.ServiceList{}
- for _, item := range obj.(*v1.ServiceList).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 services.
-func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(servicesResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched service.
-func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &v1.Service{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.Service), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_service_expansion.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_service_expansion.go
deleted file mode 100644
index 18a1b0e8d..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_service_expansion.go
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Copyright 2014 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/client-go/1.5/rest"
- "k8s.io/client-go/1.5/testing"
-)
-
-func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper {
- return c.Fake.InvokesProxy(testing.NewProxyGetAction(servicesResource, c.ns, scheme, name, port, path, params))
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_serviceaccount.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_serviceaccount.go
deleted file mode 100644
index adedcfe3f..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/fake/fake_serviceaccount.go
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeServiceAccounts implements ServiceAccountInterface
-type FakeServiceAccounts struct {
- Fake *FakeCore
- ns string
-}
-
-var serviceaccountsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "serviceaccounts"}
-
-func (c *FakeServiceAccounts) Create(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &v1.ServiceAccount{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ServiceAccount), err
-}
-
-func (c *FakeServiceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &v1.ServiceAccount{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ServiceAccount), err
-}
-
-func (c *FakeServiceAccounts) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(serviceaccountsResource, c.ns, name), &v1.ServiceAccount{})
-
- return err
-}
-
-func (c *FakeServiceAccounts) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1.ServiceAccountList{})
- return err
-}
-
-func (c *FakeServiceAccounts) Get(name string) (result *v1.ServiceAccount, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(serviceaccountsResource, c.ns, name), &v1.ServiceAccount{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ServiceAccount), err
-}
-
-func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *v1.ServiceAccountList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(serviceaccountsResource, c.ns, opts), &v1.ServiceAccountList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1.ServiceAccountList{}
- for _, item := range obj.(*v1.ServiceAccountList).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 serviceAccounts.
-func (c *FakeServiceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(serviceaccountsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched serviceAccount.
-func (c *FakeServiceAccounts) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, data, subresources...), &v1.ServiceAccount{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1.ServiceAccount), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go
deleted file mode 100644
index 31b68a83a..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeDaemonSets implements DaemonSetInterface
-type FakeDaemonSets struct {
- Fake *FakeExtensions
- ns string
-}
-
-var daemonsetsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "daemonsets"}
-
-func (c *FakeDaemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.DaemonSet), err
-}
-
-func (c *FakeDaemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.DaemonSet), err
-}
-
-func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta1.DaemonSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.DaemonSet), err
-}
-
-func (c *FakeDaemonSets) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{})
-
- return err
-}
-
-func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1beta1.DaemonSetList{})
- return err
-}
-
-func (c *FakeDaemonSets) Get(name string) (result *v1beta1.DaemonSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.DaemonSet), err
-}
-
-func (c *FakeDaemonSets) List(opts api.ListOptions) (result *v1beta1.DaemonSetList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(daemonsetsResource, c.ns, opts), &v1beta1.DaemonSetList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1beta1.DaemonSetList{}
- for _, item := range obj.(*v1beta1.DaemonSetList).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 daemonSets.
-func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched daemonSet.
-func (c *FakeDaemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &v1beta1.DaemonSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.DaemonSet), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go
deleted file mode 100644
index 2e51cc16e..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeDeployments implements DeploymentInterface
-type FakeDeployments struct {
- Fake *FakeExtensions
- ns string
-}
-
-var deploymentsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "deployments"}
-
-func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Deployment), err
-}
-
-func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Deployment), err
-}
-
-func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Deployment), err
-}
-
-func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
-
- return err
-}
-
-func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{})
- return err
-}
-
-func (c *FakeDeployments) Get(name string) (result *v1beta1.Deployment, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Deployment), err
-}
-
-func (c *FakeDeployments) List(opts api.ListOptions) (result *v1beta1.DeploymentList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(deploymentsResource, c.ns, opts), &v1beta1.DeploymentList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1beta1.DeploymentList{}
- for _, item := range obj.(*v1beta1.DeploymentList).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 deployments.
-func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched deployment.
-func (c *FakeDeployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &v1beta1.Deployment{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Deployment), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go
deleted file mode 100644
index 19638e2d2..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright 2014 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/client-go/1.5/pkg/apis/extensions/v1beta1"
- "k8s.io/client-go/1.5/testing"
-)
-
-func (c *FakeDeployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error {
- action := testing.CreateActionImpl{}
- action.Verb = "create"
- action.Resource = deploymentsResource
- action.Subresource = "rollback"
- action.Object = deploymentRollback
-
- _, err := c.Fake.Invokes(action, deploymentRollback)
- return err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go
deleted file mode 100644
index 1c04745a0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Copyright 2016 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 (
- v1beta1 "k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakeExtensions struct {
- *testing.Fake
-}
-
-func (c *FakeExtensions) DaemonSets(namespace string) v1beta1.DaemonSetInterface {
- return &FakeDaemonSets{c, namespace}
-}
-
-func (c *FakeExtensions) Deployments(namespace string) v1beta1.DeploymentInterface {
- return &FakeDeployments{c, namespace}
-}
-
-func (c *FakeExtensions) Ingresses(namespace string) v1beta1.IngressInterface {
- return &FakeIngresses{c, namespace}
-}
-
-func (c *FakeExtensions) Jobs(namespace string) v1beta1.JobInterface {
- return &FakeJobs{c, namespace}
-}
-
-func (c *FakeExtensions) PodSecurityPolicies() v1beta1.PodSecurityPolicyInterface {
- return &FakePodSecurityPolicies{c}
-}
-
-func (c *FakeExtensions) ReplicaSets(namespace string) v1beta1.ReplicaSetInterface {
- return &FakeReplicaSets{c, namespace}
-}
-
-func (c *FakeExtensions) Scales(namespace string) v1beta1.ScaleInterface {
- return &FakeScales{c, namespace}
-}
-
-func (c *FakeExtensions) ThirdPartyResources() v1beta1.ThirdPartyResourceInterface {
- return &FakeThirdPartyResources{c}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeExtensions) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go
deleted file mode 100644
index 2c5bcaa2f..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeIngresses implements IngressInterface
-type FakeIngresses struct {
- Fake *FakeExtensions
- ns string
-}
-
-var ingressesResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "ingresses"}
-
-func (c *FakeIngresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Ingress), err
-}
-
-func (c *FakeIngresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Ingress), err
-}
-
-func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Ingress), err
-}
-
-func (c *FakeIngresses) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(ingressesResource, c.ns, name), &v1beta1.Ingress{})
-
- return err
-}
-
-func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1beta1.IngressList{})
- return err
-}
-
-func (c *FakeIngresses) Get(name string) (result *v1beta1.Ingress, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(ingressesResource, c.ns, name), &v1beta1.Ingress{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Ingress), err
-}
-
-func (c *FakeIngresses) List(opts api.ListOptions) (result *v1beta1.IngressList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(ingressesResource, c.ns, opts), &v1beta1.IngressList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1beta1.IngressList{}
- for _, item := range obj.(*v1beta1.IngressList).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 ingresses.
-func (c *FakeIngresses) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(ingressesResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched ingress.
-func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, data, subresources...), &v1beta1.Ingress{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Ingress), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_job.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_job.go
deleted file mode 100644
index 7e85cfa6b..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_job.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeJobs implements JobInterface
-type FakeJobs struct {
- Fake *FakeExtensions
- ns string
-}
-
-var jobsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "jobs"}
-
-func (c *FakeJobs) Create(job *v1beta1.Job) (result *v1beta1.Job, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &v1beta1.Job{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Job), err
-}
-
-func (c *FakeJobs) Update(job *v1beta1.Job) (result *v1beta1.Job, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &v1beta1.Job{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Job), err
-}
-
-func (c *FakeJobs) UpdateStatus(job *v1beta1.Job) (*v1beta1.Job, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &v1beta1.Job{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Job), err
-}
-
-func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &v1beta1.Job{})
-
- return err
-}
-
-func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1beta1.JobList{})
- return err
-}
-
-func (c *FakeJobs) Get(name string) (result *v1beta1.Job, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(jobsResource, c.ns, name), &v1beta1.Job{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Job), err
-}
-
-func (c *FakeJobs) List(opts api.ListOptions) (result *v1beta1.JobList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(jobsResource, c.ns, opts), &v1beta1.JobList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1beta1.JobList{}
- for _, item := range obj.(*v1beta1.JobList).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 jobs.
-func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(jobsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched job.
-func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Job, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v1beta1.Job{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.Job), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go
deleted file mode 100644
index e832be20c..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakePodSecurityPolicies implements PodSecurityPolicyInterface
-type FakePodSecurityPolicies struct {
- Fake *FakeExtensions
-}
-
-var podsecuritypoliciesResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "podsecuritypolicies"}
-
-func (c *FakePodSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.PodSecurityPolicy), err
-}
-
-func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.PodSecurityPolicy), err
-}
-
-func (c *FakePodSecurityPolicies) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewRootDeleteAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{})
- return err
-}
-
-func (c *FakePodSecurityPolicies) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1beta1.PodSecurityPolicyList{})
- return err
-}
-
-func (c *FakePodSecurityPolicies) Get(name string) (result *v1beta1.PodSecurityPolicy, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.PodSecurityPolicy), err
-}
-
-func (c *FakePodSecurityPolicies) List(opts api.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootListAction(podsecuritypoliciesResource, opts), &v1beta1.PodSecurityPolicyList{})
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1beta1.PodSecurityPolicyList{}
- for _, item := range obj.(*v1beta1.PodSecurityPolicyList).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 podSecurityPolicies.
-func (c *FakePodSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(podsecuritypoliciesResource, opts))
-}
-
-// Patch applies the patch and returns the patched podSecurityPolicy.
-func (c *FakePodSecurityPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, data, subresources...), &v1beta1.PodSecurityPolicy{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.PodSecurityPolicy), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go
deleted file mode 100644
index 61ca696d1..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeReplicaSets implements ReplicaSetInterface
-type FakeReplicaSets struct {
- Fake *FakeExtensions
- ns string
-}
-
-var replicasetsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "replicasets"}
-
-func (c *FakeReplicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.ReplicaSet), err
-}
-
-func (c *FakeReplicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.ReplicaSet), err
-}
-
-func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta1.ReplicaSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.ReplicaSet), err
-}
-
-func (c *FakeReplicaSets) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{})
-
- return err
-}
-
-func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1beta1.ReplicaSetList{})
- return err
-}
-
-func (c *FakeReplicaSets) Get(name string) (result *v1beta1.ReplicaSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.ReplicaSet), err
-}
-
-func (c *FakeReplicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(replicasetsResource, c.ns, opts), &v1beta1.ReplicaSetList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1beta1.ReplicaSetList{}
- for _, item := range obj.(*v1beta1.ReplicaSetList).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 replicaSets.
-func (c *FakeReplicaSets) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched replicaSet.
-func (c *FakeReplicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &v1beta1.ReplicaSet{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.ReplicaSet), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_scale.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_scale.go
deleted file mode 100644
index 0179e4edc..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_scale.go
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-Copyright 2016 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
-
-// FakeScales implements ScaleInterface
-type FakeScales struct {
- Fake *FakeExtensions
- ns string
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_scale_expansion.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_scale_expansion.go
deleted file mode 100644
index 7a9312ada..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_scale_expansion.go
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-Copyright 2015 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/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1"
- "k8s.io/client-go/1.5/testing"
-)
-
-func (c *FakeScales) Get(kind string, name string) (result *v1beta1.Scale, err error) {
- action := testing.GetActionImpl{}
- action.Verb = "get"
- action.Namespace = c.ns
- action.Resource = unversioned.GroupVersionResource{Resource: kind}
- action.Subresource = "scale"
- action.Name = name
- obj, err := c.Fake.Invokes(action, &v1beta1.Scale{})
- result = obj.(*v1beta1.Scale)
- return
-}
-
-func (c *FakeScales) Update(kind string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
- action := testing.UpdateActionImpl{}
- action.Verb = "update"
- action.Namespace = c.ns
- action.Resource = unversioned.GroupVersionResource{Resource: kind}
- action.Subresource = "scale"
- action.Object = scale
- obj, err := c.Fake.Invokes(action, scale)
- result = obj.(*v1beta1.Scale)
- return
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go
deleted file mode 100644
index 2f482c7d6..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeThirdPartyResources implements ThirdPartyResourceInterface
-type FakeThirdPartyResources struct {
- Fake *FakeExtensions
-}
-
-var thirdpartyresourcesResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "thirdpartyresources"}
-
-func (c *FakeThirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(thirdpartyresourcesResource, thirdPartyResource), &v1beta1.ThirdPartyResource{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.ThirdPartyResource), err
-}
-
-func (c *FakeThirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(thirdpartyresourcesResource, thirdPartyResource), &v1beta1.ThirdPartyResource{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.ThirdPartyResource), err
-}
-
-func (c *FakeThirdPartyResources) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewRootDeleteAction(thirdpartyresourcesResource, name), &v1beta1.ThirdPartyResource{})
- return err
-}
-
-func (c *FakeThirdPartyResources) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(thirdpartyresourcesResource, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1beta1.ThirdPartyResourceList{})
- return err
-}
-
-func (c *FakeThirdPartyResources) Get(name string) (result *v1beta1.ThirdPartyResource, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(thirdpartyresourcesResource, name), &v1beta1.ThirdPartyResource{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.ThirdPartyResource), err
-}
-
-func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootListAction(thirdpartyresourcesResource, opts), &v1beta1.ThirdPartyResourceList{})
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1beta1.ThirdPartyResourceList{}
- for _, item := range obj.(*v1beta1.ThirdPartyResourceList).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 thirdPartyResources.
-func (c *FakeThirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(thirdpartyresourcesResource, opts))
-}
-
-// Patch applies the patch and returns the patched thirdPartyResource.
-func (c *FakeThirdPartyResources) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(thirdpartyresourcesResource, name, data, subresources...), &v1beta1.ThirdPartyResource{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.ThirdPartyResource), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go
deleted file mode 100644
index 02d805ee4..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1alpha1 "k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakePodDisruptionBudgets implements PodDisruptionBudgetInterface
-type FakePodDisruptionBudgets struct {
- Fake *FakePolicy
- ns string
-}
-
-var poddisruptionbudgetsResource = unversioned.GroupVersionResource{Group: "policy", Version: "v1alpha1", Resource: "poddisruptionbudgets"}
-
-func (c *FakePodDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.PodDisruptionBudget), err
-}
-
-func (c *FakePodDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.PodDisruptionBudget), err
-}
-
-func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.PodDisruptionBudget), err
-}
-
-func (c *FakePodDisruptionBudgets) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{})
-
- return err
-}
-
-func (c *FakePodDisruptionBudgets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1alpha1.PodDisruptionBudgetList{})
- return err
-}
-
-func (c *FakePodDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.PodDisruptionBudget), err
-}
-
-func (c *FakePodDisruptionBudgets) List(opts api.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(poddisruptionbudgetsResource, c.ns, opts), &v1alpha1.PodDisruptionBudgetList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1alpha1.PodDisruptionBudgetList{}
- for _, item := range obj.(*v1alpha1.PodDisruptionBudgetList).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 podDisruptionBudgets.
-func (c *FakePodDisruptionBudgets) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched podDisruptionBudget.
-func (c *FakePodDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &v1alpha1.PodDisruptionBudget{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.PodDisruptionBudget), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go
deleted file mode 100644
index 466b3338d..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2016 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 (
- v1alpha1 "k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakePolicy struct {
- *testing.Fake
-}
-
-func (c *FakePolicy) PodDisruptionBudgets(namespace string) v1alpha1.PodDisruptionBudgetInterface {
- return &FakePodDisruptionBudgets{c, namespace}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakePolicy) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go
deleted file mode 100644
index ad59de50d..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1alpha1 "k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeClusterRoles implements ClusterRoleInterface
-type FakeClusterRoles struct {
- Fake *FakeRbac
-}
-
-var clusterrolesResource = unversioned.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Resource: "clusterroles"}
-
-func (c *FakeClusterRoles) Create(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &v1alpha1.ClusterRole{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.ClusterRole), err
-}
-
-func (c *FakeClusterRoles) Update(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &v1alpha1.ClusterRole{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.ClusterRole), err
-}
-
-func (c *FakeClusterRoles) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewRootDeleteAction(clusterrolesResource, name), &v1alpha1.ClusterRole{})
- return err
-}
-
-func (c *FakeClusterRoles) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1alpha1.ClusterRoleList{})
- return err
-}
-
-func (c *FakeClusterRoles) Get(name string) (result *v1alpha1.ClusterRole, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(clusterrolesResource, name), &v1alpha1.ClusterRole{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.ClusterRole), err
-}
-
-func (c *FakeClusterRoles) List(opts api.ListOptions) (result *v1alpha1.ClusterRoleList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootListAction(clusterrolesResource, opts), &v1alpha1.ClusterRoleList{})
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1alpha1.ClusterRoleList{}
- for _, item := range obj.(*v1alpha1.ClusterRoleList).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 clusterRoles.
-func (c *FakeClusterRoles) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(clusterrolesResource, opts))
-}
-
-// Patch applies the patch and returns the patched clusterRole.
-func (c *FakeClusterRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &v1alpha1.ClusterRole{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.ClusterRole), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go
deleted file mode 100644
index 8b94350e0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1alpha1 "k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeClusterRoleBindings implements ClusterRoleBindingInterface
-type FakeClusterRoleBindings struct {
- Fake *FakeRbac
-}
-
-var clusterrolebindingsResource = unversioned.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Resource: "clusterrolebindings"}
-
-func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.ClusterRoleBinding), err
-}
-
-func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.ClusterRoleBinding), err
-}
-
-func (c *FakeClusterRoleBindings) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &v1alpha1.ClusterRoleBinding{})
- return err
-}
-
-func (c *FakeClusterRoleBindings) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1alpha1.ClusterRoleBindingList{})
- return err
-}
-
-func (c *FakeClusterRoleBindings) Get(name string) (result *v1alpha1.ClusterRoleBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &v1alpha1.ClusterRoleBinding{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.ClusterRoleBinding), err
-}
-
-func (c *FakeClusterRoleBindings) List(opts api.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootListAction(clusterrolebindingsResource, opts), &v1alpha1.ClusterRoleBindingList{})
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1alpha1.ClusterRoleBindingList{}
- for _, item := range obj.(*v1alpha1.ClusterRoleBindingList).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 clusterRoleBindings.
-func (c *FakeClusterRoleBindings) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(clusterrolebindingsResource, opts))
-}
-
-// Patch applies the patch and returns the patched clusterRoleBinding.
-func (c *FakeClusterRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &v1alpha1.ClusterRoleBinding{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.ClusterRoleBinding), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go
deleted file mode 100644
index 282f51138..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-Copyright 2016 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 (
- v1alpha1 "k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakeRbac struct {
- *testing.Fake
-}
-
-func (c *FakeRbac) ClusterRoles() v1alpha1.ClusterRoleInterface {
- return &FakeClusterRoles{c}
-}
-
-func (c *FakeRbac) ClusterRoleBindings() v1alpha1.ClusterRoleBindingInterface {
- return &FakeClusterRoleBindings{c}
-}
-
-func (c *FakeRbac) Roles(namespace string) v1alpha1.RoleInterface {
- return &FakeRoles{c, namespace}
-}
-
-func (c *FakeRbac) RoleBindings(namespace string) v1alpha1.RoleBindingInterface {
- return &FakeRoleBindings{c, namespace}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeRbac) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go
deleted file mode 100644
index e6ef2e7d0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1alpha1 "k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeRoles implements RoleInterface
-type FakeRoles struct {
- Fake *FakeRbac
- ns string
-}
-
-var rolesResource = unversioned.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Resource: "roles"}
-
-func (c *FakeRoles) Create(role *v1alpha1.Role) (result *v1alpha1.Role, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &v1alpha1.Role{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.Role), err
-}
-
-func (c *FakeRoles) Update(role *v1alpha1.Role) (result *v1alpha1.Role, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &v1alpha1.Role{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.Role), err
-}
-
-func (c *FakeRoles) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(rolesResource, c.ns, name), &v1alpha1.Role{})
-
- return err
-}
-
-func (c *FakeRoles) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1alpha1.RoleList{})
- return err
-}
-
-func (c *FakeRoles) Get(name string) (result *v1alpha1.Role, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(rolesResource, c.ns, name), &v1alpha1.Role{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.Role), err
-}
-
-func (c *FakeRoles) List(opts api.ListOptions) (result *v1alpha1.RoleList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(rolesResource, c.ns, opts), &v1alpha1.RoleList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1alpha1.RoleList{}
- for _, item := range obj.(*v1alpha1.RoleList).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 roles.
-func (c *FakeRoles) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(rolesResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched role.
-func (c *FakeRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &v1alpha1.Role{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.Role), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go
deleted file mode 100644
index ba929e880..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1alpha1 "k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeRoleBindings implements RoleBindingInterface
-type FakeRoleBindings struct {
- Fake *FakeRbac
- ns string
-}
-
-var rolebindingsResource = unversioned.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Resource: "rolebindings"}
-
-func (c *FakeRoleBindings) Create(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &v1alpha1.RoleBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.RoleBinding), err
-}
-
-func (c *FakeRoleBindings) Update(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &v1alpha1.RoleBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.RoleBinding), err
-}
-
-func (c *FakeRoleBindings) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteAction(rolebindingsResource, c.ns, name), &v1alpha1.RoleBinding{})
-
- return err
-}
-
-func (c *FakeRoleBindings) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1alpha1.RoleBindingList{})
- return err
-}
-
-func (c *FakeRoleBindings) Get(name string) (result *v1alpha1.RoleBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &v1alpha1.RoleBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.RoleBinding), err
-}
-
-func (c *FakeRoleBindings) List(opts api.ListOptions) (result *v1alpha1.RoleBindingList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(rolebindingsResource, c.ns, opts), &v1alpha1.RoleBindingList{})
-
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1alpha1.RoleBindingList{}
- for _, item := range obj.(*v1alpha1.RoleBindingList).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 roleBindings.
-func (c *FakeRoleBindings) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(rolebindingsResource, c.ns, opts))
-
-}
-
-// Patch applies the patch and returns the patched roleBinding.
-func (c *FakeRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &v1alpha1.RoleBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.RoleBinding), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/doc.go
deleted file mode 100644
index 6499875c0..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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 is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1]
-
-// Package fake has the automatically generated clients.
-package fake
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go
deleted file mode 100644
index 43c2fecac..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2016 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 (
- v1beta1 "k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1"
- rest "k8s.io/client-go/1.5/rest"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-type FakeStorage struct {
- *testing.Fake
-}
-
-func (c *FakeStorage) StorageClasses() v1beta1.StorageClassInterface {
- return &FakeStorageClasses{c}
-}
-
-// GetRESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeStorage) GetRESTClient() *rest.RESTClient {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go
deleted file mode 100644
index acc82518a..000000000
--- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-Copyright 2016 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 (
- api "k8s.io/client-go/1.5/pkg/api"
- unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- v1beta1 "k8s.io/client-go/1.5/pkg/apis/storage/v1beta1"
- labels "k8s.io/client-go/1.5/pkg/labels"
- watch "k8s.io/client-go/1.5/pkg/watch"
- testing "k8s.io/client-go/1.5/testing"
-)
-
-// FakeStorageClasses implements StorageClassInterface
-type FakeStorageClasses struct {
- Fake *FakeStorage
-}
-
-var storageclassesResource = unversioned.GroupVersionResource{Group: "storage.k8s.io", Version: "v1beta1", Resource: "storageclasses"}
-
-func (c *FakeStorageClasses) Create(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.StorageClass), err
-}
-
-func (c *FakeStorageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.StorageClass), err
-}
-
-func (c *FakeStorageClasses) Delete(name string, options *api.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewRootDeleteAction(storageclassesResource, name), &v1beta1.StorageClass{})
- return err
-}
-
-func (c *FakeStorageClasses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOptions)
-
- _, err := c.Fake.Invokes(action, &v1beta1.StorageClassList{})
- return err
-}
-
-func (c *FakeStorageClasses) Get(name string) (result *v1beta1.StorageClass, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(storageclassesResource, name), &v1beta1.StorageClass{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.StorageClass), err
-}
-
-func (c *FakeStorageClasses) List(opts api.ListOptions) (result *v1beta1.StorageClassList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootListAction(storageclassesResource, opts), &v1beta1.StorageClassList{})
- if obj == nil {
- return nil, err
- }
-
- label := opts.LabelSelector
- if label == nil {
- label = labels.Everything()
- }
- list := &v1beta1.StorageClassList{}
- for _, item := range obj.(*v1beta1.StorageClassList).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 storageClasses.
-func (c *FakeStorageClasses) Watch(opts api.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(storageclassesResource, opts))
-}
-
-// Patch applies the patch and returns the patched storageClass.
-func (c *FakeStorageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &v1beta1.StorageClass{})
- if obj == nil {
- return nil, err
- }
- return obj.(*v1beta1.StorageClass), err
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/testapi/testapi.go b/vendor/k8s.io/client-go/1.5/pkg/api/testapi/testapi.go
deleted file mode 100644
index 7ef6b01f1..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/api/testapi/testapi.go
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
-Copyright 2014 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 testapi provides a helper for retrieving the KUBE_TEST_API environment variable.
-//
-// TODO(lavalamp): this package is a huge disaster at the moment. I intend to
-// refactor. All code currently using this package should change:
-// 1. Declare your own registered.APIGroupRegistrationManager in your own test code.
-// 2. Import the relevant install packages.
-// 3. Register the types you need, from the announced.APIGroupAnnouncementManager.
-package testapi
-
-import (
- "fmt"
- "mime"
- "os"
- "reflect"
- "strings"
-
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/meta"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/apimachinery/registered"
- "k8s.io/client-go/1.5/pkg/apis/apps"
- "k8s.io/client-go/1.5/pkg/apis/autoscaling"
- "k8s.io/client-go/1.5/pkg/apis/batch"
- "k8s.io/client-go/1.5/pkg/apis/certificates"
- "k8s.io/client-go/1.5/pkg/apis/extensions"
- "k8s.io/client-go/1.5/pkg/apis/imagepolicy"
- "k8s.io/client-go/1.5/pkg/apis/policy"
- "k8s.io/client-go/1.5/pkg/apis/rbac"
- "k8s.io/client-go/1.5/pkg/apis/storage"
- "k8s.io/client-go/1.5/pkg/federation/apis/federation"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/runtime/serializer/recognizer"
-
- _ "k8s.io/client-go/1.5/pkg/api/install"
- _ "k8s.io/client-go/1.5/pkg/apis/apps/install"
- _ "k8s.io/client-go/1.5/pkg/apis/authentication/install"
- _ "k8s.io/client-go/1.5/pkg/apis/authorization/install"
- _ "k8s.io/client-go/1.5/pkg/apis/autoscaling/install"
- _ "k8s.io/client-go/1.5/pkg/apis/batch/install"
- _ "k8s.io/client-go/1.5/pkg/apis/certificates/install"
- _ "k8s.io/client-go/1.5/pkg/apis/componentconfig/install"
- _ "k8s.io/client-go/1.5/pkg/apis/extensions/install"
- _ "k8s.io/client-go/1.5/pkg/apis/imagepolicy/install"
- _ "k8s.io/client-go/1.5/pkg/apis/policy/install"
- _ "k8s.io/client-go/1.5/pkg/apis/rbac/install"
- _ "k8s.io/client-go/1.5/pkg/apis/storage/install"
- _ "k8s.io/client-go/1.5/pkg/federation/apis/federation/install"
-)
-
-var (
- Groups = make(map[string]TestGroup)
- Default TestGroup
- Autoscaling TestGroup
- Batch TestGroup
- Extensions TestGroup
- Apps TestGroup
- Policy TestGroup
- Federation TestGroup
- Rbac TestGroup
- Certificates TestGroup
- Storage TestGroup
- ImagePolicy TestGroup
-
- serializer runtime.SerializerInfo
- storageSerializer runtime.SerializerInfo
-)
-
-type TestGroup struct {
- externalGroupVersion unversioned.GroupVersion
- internalGroupVersion unversioned.GroupVersion
- internalTypes map[string]reflect.Type
- externalTypes map[string]reflect.Type
-}
-
-func init() {
- if apiMediaType := os.Getenv("KUBE_TEST_API_TYPE"); len(apiMediaType) > 0 {
- var ok bool
- mediaType, options, err := mime.ParseMediaType(apiMediaType)
- if err != nil {
- panic(err)
- }
- serializer, ok = api.Codecs.SerializerForMediaType(mediaType, options)
- if !ok {
- panic(fmt.Sprintf("no serializer for %s", apiMediaType))
- }
- }
-
- if storageMediaType := StorageMediaType(); len(storageMediaType) > 0 {
- var ok bool
- mediaType, options, err := mime.ParseMediaType(storageMediaType)
- if err != nil {
- panic(err)
- }
- storageSerializer, ok = api.Codecs.SerializerForMediaType(mediaType, options)
- if !ok {
- panic(fmt.Sprintf("no serializer for %s", storageMediaType))
- }
- }
-
- kubeTestAPI := os.Getenv("KUBE_TEST_API")
- if len(kubeTestAPI) != 0 {
- // priority is "first in list preferred", so this has to run in reverse order
- testGroupVersions := strings.Split(kubeTestAPI, ",")
- for i := len(testGroupVersions) - 1; i >= 0; i-- {
- gvString := testGroupVersions[i]
- groupVersion, err := unversioned.ParseGroupVersion(gvString)
- if err != nil {
- panic(fmt.Sprintf("Error parsing groupversion %v: %v", gvString, err))
- }
-
- internalGroupVersion := unversioned.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}
- Groups[groupVersion.Group] = TestGroup{
- externalGroupVersion: groupVersion,
- internalGroupVersion: internalGroupVersion,
- internalTypes: api.Scheme.KnownTypes(internalGroupVersion),
- externalTypes: api.Scheme.KnownTypes(groupVersion),
- }
- }
- }
-
- if _, ok := Groups[api.GroupName]; !ok {
- externalGroupVersion := unversioned.GroupVersion{Group: api.GroupName, Version: registered.GroupOrDie(api.GroupName).GroupVersion.Version}
- Groups[api.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: api.SchemeGroupVersion,
- internalTypes: api.Scheme.KnownTypes(api.SchemeGroupVersion),
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
- if _, ok := Groups[extensions.GroupName]; !ok {
- externalGroupVersion := unversioned.GroupVersion{Group: extensions.GroupName, Version: registered.GroupOrDie(extensions.GroupName).GroupVersion.Version}
- Groups[extensions.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: extensions.SchemeGroupVersion,
- internalTypes: api.Scheme.KnownTypes(extensions.SchemeGroupVersion),
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
- if _, ok := Groups[autoscaling.GroupName]; !ok {
- internalTypes := make(map[string]reflect.Type)
- for k, t := range api.Scheme.KnownTypes(extensions.SchemeGroupVersion) {
- if k == "Scale" {
- continue
- }
- internalTypes[k] = t
- }
- externalGroupVersion := unversioned.GroupVersion{Group: autoscaling.GroupName, Version: registered.GroupOrDie(autoscaling.GroupName).GroupVersion.Version}
- Groups[autoscaling.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: extensions.SchemeGroupVersion,
- internalTypes: internalTypes,
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
- if _, ok := Groups[autoscaling.GroupName+"IntraGroup"]; !ok {
- internalTypes := make(map[string]reflect.Type)
- for k, t := range api.Scheme.KnownTypes(extensions.SchemeGroupVersion) {
- if k == "Scale" {
- internalTypes[k] = t
- break
- }
- }
- externalGroupVersion := unversioned.GroupVersion{Group: autoscaling.GroupName, Version: registered.GroupOrDie(autoscaling.GroupName).GroupVersion.Version}
- Groups[autoscaling.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: autoscaling.SchemeGroupVersion,
- internalTypes: internalTypes,
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
- if _, ok := Groups[batch.GroupName]; !ok {
- externalGroupVersion := unversioned.GroupVersion{Group: batch.GroupName, Version: registered.GroupOrDie(batch.GroupName).GroupVersion.Version}
- Groups[batch.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: batch.SchemeGroupVersion,
- internalTypes: api.Scheme.KnownTypes(batch.SchemeGroupVersion),
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
- if _, ok := Groups[apps.GroupName]; !ok {
- externalGroupVersion := unversioned.GroupVersion{Group: apps.GroupName, Version: registered.GroupOrDie(apps.GroupName).GroupVersion.Version}
- Groups[apps.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: extensions.SchemeGroupVersion,
- internalTypes: api.Scheme.KnownTypes(extensions.SchemeGroupVersion),
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
- if _, ok := Groups[policy.GroupName]; !ok {
- externalGroupVersion := unversioned.GroupVersion{Group: policy.GroupName, Version: registered.GroupOrDie(policy.GroupName).GroupVersion.Version}
- Groups[policy.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: policy.SchemeGroupVersion,
- internalTypes: api.Scheme.KnownTypes(policy.SchemeGroupVersion),
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
- if _, ok := Groups[federation.GroupName]; !ok {
- externalGroupVersion := unversioned.GroupVersion{Group: federation.GroupName, Version: registered.GroupOrDie(federation.GroupName).GroupVersion.Version}
- Groups[federation.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: federation.SchemeGroupVersion,
- internalTypes: api.Scheme.KnownTypes(federation.SchemeGroupVersion),
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
- if _, ok := Groups[rbac.GroupName]; !ok {
- externalGroupVersion := unversioned.GroupVersion{Group: rbac.GroupName, Version: registered.GroupOrDie(rbac.GroupName).GroupVersion.Version}
- Groups[rbac.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: rbac.SchemeGroupVersion,
- internalTypes: api.Scheme.KnownTypes(rbac.SchemeGroupVersion),
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
- if _, ok := Groups[storage.GroupName]; !ok {
- externalGroupVersion := unversioned.GroupVersion{Group: storage.GroupName, Version: registered.GroupOrDie(storage.GroupName).GroupVersion.Version}
- Groups[storage.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: storage.SchemeGroupVersion,
- internalTypes: api.Scheme.KnownTypes(storage.SchemeGroupVersion),
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
- if _, ok := Groups[certificates.GroupName]; !ok {
- externalGroupVersion := unversioned.GroupVersion{Group: certificates.GroupName, Version: registered.GroupOrDie(certificates.GroupName).GroupVersion.Version}
- Groups[certificates.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: certificates.SchemeGroupVersion,
- internalTypes: api.Scheme.KnownTypes(certificates.SchemeGroupVersion),
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
-
- if _, ok := Groups[imagepolicy.GroupName]; !ok {
- externalGroupVersion := unversioned.GroupVersion{Group: imagepolicy.GroupName, Version: registered.GroupOrDie(imagepolicy.GroupName).GroupVersion.Version}
- Groups[imagepolicy.GroupName] = TestGroup{
- externalGroupVersion: externalGroupVersion,
- internalGroupVersion: imagepolicy.SchemeGroupVersion,
- internalTypes: api.Scheme.KnownTypes(imagepolicy.SchemeGroupVersion),
- externalTypes: api.Scheme.KnownTypes(externalGroupVersion),
- }
- }
-
- Default = Groups[api.GroupName]
- Autoscaling = Groups[autoscaling.GroupName]
- Batch = Groups[batch.GroupName]
- Apps = Groups[apps.GroupName]
- Policy = Groups[policy.GroupName]
- Certificates = Groups[certificates.GroupName]
- Extensions = Groups[extensions.GroupName]
- Federation = Groups[federation.GroupName]
- Rbac = Groups[rbac.GroupName]
- Storage = Groups[storage.GroupName]
- ImagePolicy = Groups[imagepolicy.GroupName]
-}
-
-func (g TestGroup) ContentConfig() (string, *unversioned.GroupVersion, runtime.Codec) {
- return "application/json", g.GroupVersion(), g.Codec()
-}
-
-func (g TestGroup) GroupVersion() *unversioned.GroupVersion {
- copyOfGroupVersion := g.externalGroupVersion
- return &copyOfGroupVersion
-}
-
-// InternalGroupVersion returns the group,version used to identify the internal
-// types for this API
-func (g TestGroup) InternalGroupVersion() unversioned.GroupVersion {
- return g.internalGroupVersion
-}
-
-// InternalTypes returns a map of internal API types' kind names to their Go types.
-func (g TestGroup) InternalTypes() map[string]reflect.Type {
- return g.internalTypes
-}
-
-// ExternalTypes returns a map of external API types' kind names to their Go types.
-func (g TestGroup) ExternalTypes() map[string]reflect.Type {
- return g.externalTypes
-}
-
-// Codec returns the codec for the API version to test against, as set by the
-// KUBE_TEST_API_TYPE env var.
-func (g TestGroup) Codec() runtime.Codec {
- if serializer.Serializer == nil {
- return api.Codecs.LegacyCodec(g.externalGroupVersion)
- }
- return api.Codecs.CodecForVersions(serializer, api.Codecs.UniversalDeserializer(), unversioned.GroupVersions{g.externalGroupVersion}, nil)
-}
-
-// NegotiatedSerializer returns the negotiated serializer for the server.
-func (g TestGroup) NegotiatedSerializer() runtime.NegotiatedSerializer {
- return api.Codecs
-}
-
-func StorageMediaType() string {
- return os.Getenv("KUBE_TEST_API_STORAGE_TYPE")
-}
-
-// StorageCodec returns the codec for the API version to store in etcd, as set by the
-// KUBE_TEST_API_STORAGE_TYPE env var.
-func (g TestGroup) StorageCodec() runtime.Codec {
- s := storageSerializer.Serializer
-
- if s == nil {
- return api.Codecs.LegacyCodec(g.externalGroupVersion)
- }
-
- // etcd2 only supports string data - we must wrap any result before returning
- // TODO: remove for etcd3 / make parameterizable
- if !storageSerializer.EncodesAsText {
- s = runtime.NewBase64Serializer(s)
- }
- ds := recognizer.NewDecoder(s, api.Codecs.UniversalDeserializer())
-
- return api.Codecs.CodecForVersions(s, ds, unversioned.GroupVersions{g.externalGroupVersion}, nil)
-}
-
-// Converter returns the api.Scheme for the API version to test against, as set by the
-// KUBE_TEST_API env var.
-func (g TestGroup) Converter() runtime.ObjectConvertor {
- interfaces, err := registered.GroupOrDie(g.externalGroupVersion.Group).InterfacesFor(g.externalGroupVersion)
- if err != nil {
- panic(err)
- }
- return interfaces.ObjectConvertor
-}
-
-// MetadataAccessor returns the MetadataAccessor for the API version to test against,
-// as set by the KUBE_TEST_API env var.
-func (g TestGroup) MetadataAccessor() meta.MetadataAccessor {
- interfaces, err := registered.GroupOrDie(g.externalGroupVersion.Group).InterfacesFor(g.externalGroupVersion)
- if err != nil {
- panic(err)
- }
- return interfaces.MetadataAccessor
-}
-
-// SelfLink returns a self link that will appear to be for the version Version().
-// 'resource' should be the resource path, e.g. "pods" for the Pod type. 'name' should be
-// empty for lists.
-func (g TestGroup) SelfLink(resource, name string) string {
- if g.externalGroupVersion.Group == api.GroupName {
- if name == "" {
- return fmt.Sprintf("/api/%s/%s", g.externalGroupVersion.Version, resource)
- }
- return fmt.Sprintf("/api/%s/%s/%s", g.externalGroupVersion.Version, resource, name)
- } else {
- // TODO: will need a /apis prefix once we have proper multi-group
- // support
- if name == "" {
- return fmt.Sprintf("/apis/%s/%s/%s", g.externalGroupVersion.Group, g.externalGroupVersion.Version, resource)
- }
- return fmt.Sprintf("/apis/%s/%s/%s/%s", g.externalGroupVersion.Group, g.externalGroupVersion.Version, resource, name)
- }
-}
-
-// Returns the appropriate path for the given prefix (watch, proxy, redirect, etc), resource, namespace and name.
-// For ex, this is of the form:
-// /api/v1/watch/namespaces/foo/pods/pod0 for v1.
-func (g TestGroup) ResourcePathWithPrefix(prefix, resource, namespace, name string) string {
- var path string
- if g.externalGroupVersion.Group == api.GroupName {
- path = "/api/" + g.externalGroupVersion.Version
- } else {
- // TODO: switch back once we have proper multiple group support
- // path = "/apis/" + g.Group + "/" + Version(group...)
- path = "/apis/" + g.externalGroupVersion.Group + "/" + g.externalGroupVersion.Version
- }
-
- if prefix != "" {
- path = path + "/" + prefix
- }
- if namespace != "" {
- path = path + "/namespaces/" + namespace
- }
- // Resource names are lower case.
- resource = strings.ToLower(resource)
- if resource != "" {
- path = path + "/" + resource
- }
- if name != "" {
- path = path + "/" + name
- }
- return path
-}
-
-// Returns the appropriate path for the given resource, namespace and name.
-// For example, this is of the form:
-// /api/v1/namespaces/foo/pods/pod0 for v1.
-func (g TestGroup) ResourcePath(resource, namespace, name string) string {
- return g.ResourcePathWithPrefix("", resource, namespace, name)
-}
-
-func (g TestGroup) RESTMapper() meta.RESTMapper {
- return registered.RESTMapper()
-}
-
-// ExternalGroupVersions returns all external group versions allowed for the server.
-func ExternalGroupVersions() unversioned.GroupVersions {
- versions := []unversioned.GroupVersion{}
- for _, g := range Groups {
- gv := g.GroupVersion()
- versions = append(versions, *gv)
- }
- return versions
-}
-
-// Get codec based on runtime.Object
-func GetCodecForObject(obj runtime.Object) (runtime.Codec, error) {
- kinds, _, err := api.Scheme.ObjectKinds(obj)
- if err != nil {
- return nil, fmt.Errorf("unexpected encoding error: %v", err)
- }
- kind := kinds[0]
-
- for _, group := range Groups {
- if group.GroupVersion().Group != kind.Group {
- continue
- }
-
- if api.Scheme.Recognizes(kind) {
- return group.Codec(), nil
- }
- }
- // Codec used for unversioned types
- if api.Scheme.Recognizes(kind) {
- serializer, ok := api.Codecs.SerializerForFileExtension("json")
- if !ok {
- return nil, fmt.Errorf("no serializer registered for json")
- }
- return serializer, nil
- }
- return nil, fmt.Errorf("unexpected kind: %v", kind)
-}
-
-func NewTestGroup(external, internal unversioned.GroupVersion, internalTypes map[string]reflect.Type, externalTypes map[string]reflect.Type) TestGroup {
- return TestGroup{external, internal, internalTypes, externalTypes}
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/doc.go
deleted file mode 100644
index 98ea9b555..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// +k8s:deepcopy-gen=package,register
-// +k8s:openapi-gen=true
-
-package componentconfig
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/helpers.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/helpers.go
deleted file mode 100644
index 6111759a0..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/helpers.go
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-Copyright 2016 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 componentconfig
-
-import (
- "fmt"
- "net"
-
- utilnet "k8s.io/client-go/1.5/pkg/util/net"
-)
-
-// used for validating command line opts
-// TODO(mikedanese): remove these when we remove command line flags
-
-type IPVar struct {
- Val *string
-}
-
-func (v IPVar) Set(s string) error {
- if net.ParseIP(s) == nil {
- return fmt.Errorf("%q is not a valid IP address", s)
- }
- if v.Val == nil {
- // it's okay to panic here since this is programmer error
- panic("the string pointer passed into IPVar should not be nil")
- }
- *v.Val = s
- return nil
-}
-
-func (v IPVar) String() string {
- if v.Val == nil {
- return ""
- }
- return *v.Val
-}
-
-func (v IPVar) Type() string {
- return "ip"
-}
-
-func (m *ProxyMode) Set(s string) error {
- *m = ProxyMode(s)
- return nil
-}
-
-func (m *ProxyMode) String() string {
- if m != nil {
- return string(*m)
- }
- return ""
-}
-
-func (m *ProxyMode) Type() string {
- return "ProxyMode"
-}
-
-type PortRangeVar struct {
- Val *string
-}
-
-func (v PortRangeVar) Set(s string) error {
- if _, err := utilnet.ParsePortRange(s); err != nil {
- return fmt.Errorf("%q is not a valid port range: %v", s, err)
- }
- if v.Val == nil {
- // it's okay to panic here since this is programmer error
- panic("the string pointer passed into PortRangeVar should not be nil")
- }
- *v.Val = s
- return nil
-}
-
-func (v PortRangeVar) String() string {
- if v.Val == nil {
- return ""
- }
- return *v.Val
-}
-
-func (v PortRangeVar) Type() string {
- return "port-range"
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/install/install.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/install/install.go
deleted file mode 100644
index 891ee47a5..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/install/install.go
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-Copyright 2015 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 install installs the experimental API group, making it available as
-// an option to all of the API encoding/decoding machinery.
-package install
-
-import (
- "k8s.io/client-go/1.5/pkg/apimachinery/announced"
- "k8s.io/client-go/1.5/pkg/apis/componentconfig"
- "k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1"
-)
-
-func init() {
- if err := announced.NewGroupMetaFactory(
- &announced.GroupMetaFactoryArgs{
- GroupName: componentconfig.GroupName,
- VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version},
- ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/componentconfig",
- AddInternalObjectsToScheme: componentconfig.AddToScheme,
- },
- announced.VersionToSchemeFunc{
- v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme,
- },
- ).Announce().RegisterAndEnable(); err != nil {
- panic(err)
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/register.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/register.go
deleted file mode 100644
index faaf0b1cd..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/register.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-Copyright 2015 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 componentconfig
-
-import (
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-var (
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- AddToScheme = SchemeBuilder.AddToScheme
-)
-
-// GroupName is the group name use in this package
-const GroupName = "componentconfig"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
-
-// Kind takes an unqualified kind and returns a Group qualified GroupKind
-func Kind(kind string) unversioned.GroupKind {
- return SchemeGroupVersion.WithKind(kind).GroupKind()
-}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) unversioned.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-func addKnownTypes(scheme *runtime.Scheme) error {
- // TODO this will get cleaned up with the scheme types are fixed
- scheme.AddKnownTypes(SchemeGroupVersion,
- &KubeProxyConfiguration{},
- &KubeSchedulerConfiguration{},
- &KubeletConfiguration{},
- )
- return nil
-}
-
-func (obj *KubeProxyConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
-func (obj *KubeSchedulerConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
-func (obj *KubeletConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/types.generated.go
deleted file mode 100644
index 26e58aaa0..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/types.generated.go
+++ /dev/null
@@ -1,11182 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// ************************************************************
-// DO NOT EDIT.
-// THIS FILE IS AUTO-GENERATED BY codecgen.
-// ************************************************************
-
-package componentconfig
-
-import (
- "errors"
- "fmt"
- codec1978 "github.com/ugorji/go/codec"
- pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- pkg2_config "k8s.io/client-go/1.5/pkg/util/config"
- "reflect"
- "runtime"
- time "time"
-)
-
-const (
- // ----- content types ----
- codecSelferC_UTF81234 = 1
- codecSelferC_RAW1234 = 0
- // ----- value types used ----
- codecSelferValueTypeArray1234 = 10
- codecSelferValueTypeMap1234 = 9
- // ----- containerStateValues ----
- codecSelfer_containerMapKey1234 = 2
- codecSelfer_containerMapValue1234 = 3
- codecSelfer_containerMapEnd1234 = 4
- codecSelfer_containerArrayElem1234 = 6
- codecSelfer_containerArrayEnd1234 = 7
-)
-
-var (
- codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
- codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
-)
-
-type codecSelfer1234 struct{}
-
-func init() {
- if codec1978.GenVersion != 5 {
- _, file, _, _ := runtime.Caller(0)
- err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
- 5, codec1978.GenVersion, file)
- panic(err)
- }
- if false { // reference the types, but skip this branch at build/run time
- var v0 pkg1_unversioned.TypeMeta
- var v1 pkg2_config.ConfigurationMap
- var v2 time.Duration
- _, _, _ = v0, v1, v2
- }
-}
-
-func (x *KubeProxyConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [21]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = x.Kind != ""
- yyq2[1] = x.APIVersion != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(21)
- } else {
- yynn2 = 19
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[1] {
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.BindAddress))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("bindAddress"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym11 := z.EncBinary()
- _ = yym11
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.BindAddress))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clusterCIDR"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym14 := z.EncBinary()
- _ = yym14
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("healthzBindAddress"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym17 := z.EncBinary()
- _ = yym17
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym19 := z.EncBinary()
- _ = yym19
- if false {
- } else {
- r.EncodeInt(int64(x.HealthzPort))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("healthzPort"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym20 := z.EncBinary()
- _ = yym20
- if false {
- } else {
- r.EncodeInt(int64(x.HealthzPort))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym22 := z.EncBinary()
- _ = yym22
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("hostnameOverride"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym23 := z.EncBinary()
- _ = yym23
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.IPTablesMasqueradeBit == nil {
- r.EncodeNil()
- } else {
- yy25 := *x.IPTablesMasqueradeBit
- yym26 := z.EncBinary()
- _ = yym26
- if false {
- } else {
- r.EncodeInt(int64(yy25))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("iptablesMasqueradeBit"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.IPTablesMasqueradeBit == nil {
- r.EncodeNil()
- } else {
- yy27 := *x.IPTablesMasqueradeBit
- yym28 := z.EncBinary()
- _ = yym28
- if false {
- } else {
- r.EncodeInt(int64(yy27))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy30 := &x.IPTablesSyncPeriod
- yym31 := z.EncBinary()
- _ = yym31
- if false {
- } else if z.HasExtensions() && z.EncExt(yy30) {
- } else if !yym31 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy30)
- } else {
- z.EncFallback(yy30)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("iptablesSyncPeriodSeconds"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy32 := &x.IPTablesSyncPeriod
- yym33 := z.EncBinary()
- _ = yym33
- if false {
- } else if z.HasExtensions() && z.EncExt(yy32) {
- } else if !yym33 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy32)
- } else {
- z.EncFallback(yy32)
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym35 := z.EncBinary()
- _ = yym35
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.KubeconfigPath))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kubeconfigPath"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym36 := z.EncBinary()
- _ = yym36
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.KubeconfigPath))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym38 := z.EncBinary()
- _ = yym38
- if false {
- } else {
- r.EncodeBool(bool(x.MasqueradeAll))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("masqueradeAll"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym39 := z.EncBinary()
- _ = yym39
- if false {
- } else {
- r.EncodeBool(bool(x.MasqueradeAll))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym41 := z.EncBinary()
- _ = yym41
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Master))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("master"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym42 := z.EncBinary()
- _ = yym42
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Master))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.OOMScoreAdj == nil {
- r.EncodeNil()
- } else {
- yy44 := *x.OOMScoreAdj
- yym45 := z.EncBinary()
- _ = yym45
- if false {
- } else {
- r.EncodeInt(int64(yy44))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("oomScoreAdj"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.OOMScoreAdj == nil {
- r.EncodeNil()
- } else {
- yy46 := *x.OOMScoreAdj
- yym47 := z.EncBinary()
- _ = yym47
- if false {
- } else {
- r.EncodeInt(int64(yy46))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- x.Mode.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("mode"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- x.Mode.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym50 := z.EncBinary()
- _ = yym50
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PortRange))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("portRange"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym51 := z.EncBinary()
- _ = yym51
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PortRange))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym53 := z.EncBinary()
- _ = yym53
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("resourceContainer"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym54 := z.EncBinary()
- _ = yym54
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ResourceContainer))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy56 := &x.UDPIdleTimeout
- yym57 := z.EncBinary()
- _ = yym57
- if false {
- } else if z.HasExtensions() && z.EncExt(yy56) {
- } else if !yym57 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy56)
- } else {
- z.EncFallback(yy56)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("udpTimeoutMilliseconds"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy58 := &x.UDPIdleTimeout
- yym59 := z.EncBinary()
- _ = yym59
- if false {
- } else if z.HasExtensions() && z.EncExt(yy58) {
- } else if !yym59 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy58)
- } else {
- z.EncFallback(yy58)
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym61 := z.EncBinary()
- _ = yym61
- if false {
- } else {
- r.EncodeInt(int64(x.ConntrackMax))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("conntrackMax"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym62 := z.EncBinary()
- _ = yym62
- if false {
- } else {
- r.EncodeInt(int64(x.ConntrackMax))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym64 := z.EncBinary()
- _ = yym64
- if false {
- } else {
- r.EncodeInt(int64(x.ConntrackMaxPerCore))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("conntrackMaxPerCore"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym65 := z.EncBinary()
- _ = yym65
- if false {
- } else {
- r.EncodeInt(int64(x.ConntrackMaxPerCore))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym67 := z.EncBinary()
- _ = yym67
- if false {
- } else {
- r.EncodeInt(int64(x.ConntrackMin))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("conntrackMin"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym68 := z.EncBinary()
- _ = yym68
- if false {
- } else {
- r.EncodeInt(int64(x.ConntrackMin))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy70 := &x.ConntrackTCPEstablishedTimeout
- yym71 := z.EncBinary()
- _ = yym71
- if false {
- } else if z.HasExtensions() && z.EncExt(yy70) {
- } else if !yym71 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy70)
- } else {
- z.EncFallback(yy70)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("conntrackTCPEstablishedTimeout"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy72 := &x.ConntrackTCPEstablishedTimeout
- yym73 := z.EncBinary()
- _ = yym73
- if false {
- } else if z.HasExtensions() && z.EncExt(yy72) {
- } else if !yym73 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy72)
- } else {
- z.EncFallback(yy72)
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *KubeProxyConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym74 := z.DecBinary()
- _ = yym74
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct75 := r.ContainerType()
- if yyct75 == codecSelferValueTypeMap1234 {
- yyl75 := r.ReadMapStart()
- if yyl75 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl75, d)
- }
- } else if yyct75 == codecSelferValueTypeArray1234 {
- yyl75 := r.ReadArrayStart()
- if yyl75 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl75, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *KubeProxyConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys76Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys76Slc
- var yyhl76 bool = l >= 0
- for yyj76 := 0; ; yyj76++ {
- if yyhl76 {
- if yyj76 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys76Slc = r.DecodeBytes(yys76Slc, true, true)
- yys76 := string(yys76Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys76 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "bindAddress":
- if r.TryDecodeAsNil() {
- x.BindAddress = ""
- } else {
- x.BindAddress = string(r.DecodeString())
- }
- case "clusterCIDR":
- if r.TryDecodeAsNil() {
- x.ClusterCIDR = ""
- } else {
- x.ClusterCIDR = string(r.DecodeString())
- }
- case "healthzBindAddress":
- if r.TryDecodeAsNil() {
- x.HealthzBindAddress = ""
- } else {
- x.HealthzBindAddress = string(r.DecodeString())
- }
- case "healthzPort":
- if r.TryDecodeAsNil() {
- x.HealthzPort = 0
- } else {
- x.HealthzPort = int32(r.DecodeInt(32))
- }
- case "hostnameOverride":
- if r.TryDecodeAsNil() {
- x.HostnameOverride = ""
- } else {
- x.HostnameOverride = string(r.DecodeString())
- }
- case "iptablesMasqueradeBit":
- if r.TryDecodeAsNil() {
- if x.IPTablesMasqueradeBit != nil {
- x.IPTablesMasqueradeBit = nil
- }
- } else {
- if x.IPTablesMasqueradeBit == nil {
- x.IPTablesMasqueradeBit = new(int32)
- }
- yym85 := z.DecBinary()
- _ = yym85
- if false {
- } else {
- *((*int32)(x.IPTablesMasqueradeBit)) = int32(r.DecodeInt(32))
- }
- }
- case "iptablesSyncPeriodSeconds":
- if r.TryDecodeAsNil() {
- x.IPTablesSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv86 := &x.IPTablesSyncPeriod
- yym87 := z.DecBinary()
- _ = yym87
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv86) {
- } else if !yym87 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv86)
- } else {
- z.DecFallback(yyv86, false)
- }
- }
- case "kubeconfigPath":
- if r.TryDecodeAsNil() {
- x.KubeconfigPath = ""
- } else {
- x.KubeconfigPath = string(r.DecodeString())
- }
- case "masqueradeAll":
- if r.TryDecodeAsNil() {
- x.MasqueradeAll = false
- } else {
- x.MasqueradeAll = bool(r.DecodeBool())
- }
- case "master":
- if r.TryDecodeAsNil() {
- x.Master = ""
- } else {
- x.Master = string(r.DecodeString())
- }
- case "oomScoreAdj":
- if r.TryDecodeAsNil() {
- if x.OOMScoreAdj != nil {
- x.OOMScoreAdj = nil
- }
- } else {
- if x.OOMScoreAdj == nil {
- x.OOMScoreAdj = new(int32)
- }
- yym92 := z.DecBinary()
- _ = yym92
- if false {
- } else {
- *((*int32)(x.OOMScoreAdj)) = int32(r.DecodeInt(32))
- }
- }
- case "mode":
- if r.TryDecodeAsNil() {
- x.Mode = ""
- } else {
- x.Mode = ProxyMode(r.DecodeString())
- }
- case "portRange":
- if r.TryDecodeAsNil() {
- x.PortRange = ""
- } else {
- x.PortRange = string(r.DecodeString())
- }
- case "resourceContainer":
- if r.TryDecodeAsNil() {
- x.ResourceContainer = ""
- } else {
- x.ResourceContainer = string(r.DecodeString())
- }
- case "udpTimeoutMilliseconds":
- if r.TryDecodeAsNil() {
- x.UDPIdleTimeout = pkg1_unversioned.Duration{}
- } else {
- yyv96 := &x.UDPIdleTimeout
- yym97 := z.DecBinary()
- _ = yym97
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv96) {
- } else if !yym97 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv96)
- } else {
- z.DecFallback(yyv96, false)
- }
- }
- case "conntrackMax":
- if r.TryDecodeAsNil() {
- x.ConntrackMax = 0
- } else {
- x.ConntrackMax = int32(r.DecodeInt(32))
- }
- case "conntrackMaxPerCore":
- if r.TryDecodeAsNil() {
- x.ConntrackMaxPerCore = 0
- } else {
- x.ConntrackMaxPerCore = int32(r.DecodeInt(32))
- }
- case "conntrackMin":
- if r.TryDecodeAsNil() {
- x.ConntrackMin = 0
- } else {
- x.ConntrackMin = int32(r.DecodeInt(32))
- }
- case "conntrackTCPEstablishedTimeout":
- if r.TryDecodeAsNil() {
- x.ConntrackTCPEstablishedTimeout = pkg1_unversioned.Duration{}
- } else {
- yyv101 := &x.ConntrackTCPEstablishedTimeout
- yym102 := z.DecBinary()
- _ = yym102
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv101) {
- } else if !yym102 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv101)
- } else {
- z.DecFallback(yyv101, false)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys76)
- } // end switch yys76
- } // end for yyj76
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *KubeProxyConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj103 int
- var yyb103 bool
- var yyhl103 bool = l >= 0
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.BindAddress = ""
- } else {
- x.BindAddress = string(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ClusterCIDR = ""
- } else {
- x.ClusterCIDR = string(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HealthzBindAddress = ""
- } else {
- x.HealthzBindAddress = string(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HealthzPort = 0
- } else {
- x.HealthzPort = int32(r.DecodeInt(32))
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HostnameOverride = ""
- } else {
- x.HostnameOverride = string(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- if x.IPTablesMasqueradeBit != nil {
- x.IPTablesMasqueradeBit = nil
- }
- } else {
- if x.IPTablesMasqueradeBit == nil {
- x.IPTablesMasqueradeBit = new(int32)
- }
- yym112 := z.DecBinary()
- _ = yym112
- if false {
- } else {
- *((*int32)(x.IPTablesMasqueradeBit)) = int32(r.DecodeInt(32))
- }
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.IPTablesSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv113 := &x.IPTablesSyncPeriod
- yym114 := z.DecBinary()
- _ = yym114
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv113) {
- } else if !yym114 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv113)
- } else {
- z.DecFallback(yyv113, false)
- }
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.KubeconfigPath = ""
- } else {
- x.KubeconfigPath = string(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MasqueradeAll = false
- } else {
- x.MasqueradeAll = bool(r.DecodeBool())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Master = ""
- } else {
- x.Master = string(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- if x.OOMScoreAdj != nil {
- x.OOMScoreAdj = nil
- }
- } else {
- if x.OOMScoreAdj == nil {
- x.OOMScoreAdj = new(int32)
- }
- yym119 := z.DecBinary()
- _ = yym119
- if false {
- } else {
- *((*int32)(x.OOMScoreAdj)) = int32(r.DecodeInt(32))
- }
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Mode = ""
- } else {
- x.Mode = ProxyMode(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PortRange = ""
- } else {
- x.PortRange = string(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ResourceContainer = ""
- } else {
- x.ResourceContainer = string(r.DecodeString())
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.UDPIdleTimeout = pkg1_unversioned.Duration{}
- } else {
- yyv123 := &x.UDPIdleTimeout
- yym124 := z.DecBinary()
- _ = yym124
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv123) {
- } else if !yym124 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv123)
- } else {
- z.DecFallback(yyv123, false)
- }
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConntrackMax = 0
- } else {
- x.ConntrackMax = int32(r.DecodeInt(32))
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConntrackMaxPerCore = 0
- } else {
- x.ConntrackMaxPerCore = int32(r.DecodeInt(32))
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConntrackMin = 0
- } else {
- x.ConntrackMin = int32(r.DecodeInt(32))
- }
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConntrackTCPEstablishedTimeout = pkg1_unversioned.Duration{}
- } else {
- yyv128 := &x.ConntrackTCPEstablishedTimeout
- yym129 := z.DecBinary()
- _ = yym129
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv128) {
- } else if !yym129 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv128)
- } else {
- z.DecFallback(yyv128, false)
- }
- }
- for {
- yyj103++
- if yyhl103 {
- yyb103 = yyj103 > l
- } else {
- yyb103 = r.CheckBreak()
- }
- if yyb103 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj103-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x ProxyMode) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- yym130 := z.EncBinary()
- _ = yym130
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x))
- }
-}
-
-func (x *ProxyMode) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym131 := z.DecBinary()
- _ = yym131
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- *((*string)(x)) = r.DecodeString()
- }
-}
-
-func (x HairpinMode) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- yym132 := z.EncBinary()
- _ = yym132
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x))
- }
-}
-
-func (x *HairpinMode) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym133 := z.DecBinary()
- _ = yym133
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- *((*string)(x)) = r.DecodeString()
- }
-}
-
-func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym134 := z.EncBinary()
- _ = yym134
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep135 := !z.EncBinary()
- yy2arr135 := z.EncBasicHandle().StructToArray
- var yyq135 [108]bool
- _, _, _ = yysep135, yyq135, yy2arr135
- const yyr135 bool = false
- yyq135[0] = x.Kind != ""
- yyq135[1] = x.APIVersion != ""
- yyq135[53] = x.CloudProvider != ""
- yyq135[54] = x.CloudConfigFile != ""
- yyq135[55] = x.KubeletCgroups != ""
- yyq135[56] = x.CgroupsPerQOS != false
- yyq135[57] = x.RuntimeCgroups != ""
- yyq135[58] = x.SystemCgroups != ""
- yyq135[59] = x.CgroupRoot != ""
- yyq135[63] = true
- yyq135[64] = x.RktPath != ""
- yyq135[65] = x.RktAPIEndpoint != ""
- yyq135[66] = x.RktStage1Image != ""
- yyq135[87] = true
- yyq135[88] = x.NodeIP != ""
- yyq135[92] = x.EvictionHard != ""
- yyq135[93] = x.EvictionSoft != ""
- yyq135[94] = x.EvictionSoftGracePeriod != ""
- yyq135[95] = true
- yyq135[96] = x.EvictionMaxPodGracePeriod != 0
- yyq135[97] = x.EvictionMinimumReclaim != ""
- yyq135[106] = len(x.AllowedUnsafeSysctls) != 0
- yyq135[107] = x.ExperimentalRuntimeIntegrationType != ""
- var yynn135 int
- if yyr135 || yy2arr135 {
- r.EncodeArrayStart(108)
- } else {
- yynn135 = 85
- for _, b := range yyq135 {
- if b {
- yynn135++
- }
- }
- r.EncodeMapStart(yynn135)
- yynn135 = 0
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[0] {
- yym137 := z.EncBinary()
- _ = yym137
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym138 := z.EncBinary()
- _ = yym138
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[1] {
- yym140 := z.EncBinary()
- _ = yym140
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym141 := z.EncBinary()
- _ = yym141
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym143 := z.EncBinary()
- _ = yym143
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PodManifestPath))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("podManifestPath"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym144 := z.EncBinary()
- _ = yym144
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PodManifestPath))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy146 := &x.SyncFrequency
- yym147 := z.EncBinary()
- _ = yym147
- if false {
- } else if z.HasExtensions() && z.EncExt(yy146) {
- } else if !yym147 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy146)
- } else {
- z.EncFallback(yy146)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("syncFrequency"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy148 := &x.SyncFrequency
- yym149 := z.EncBinary()
- _ = yym149
- if false {
- } else if z.HasExtensions() && z.EncExt(yy148) {
- } else if !yym149 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy148)
- } else {
- z.EncFallback(yy148)
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy151 := &x.FileCheckFrequency
- yym152 := z.EncBinary()
- _ = yym152
- if false {
- } else if z.HasExtensions() && z.EncExt(yy151) {
- } else if !yym152 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy151)
- } else {
- z.EncFallback(yy151)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("fileCheckFrequency"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy153 := &x.FileCheckFrequency
- yym154 := z.EncBinary()
- _ = yym154
- if false {
- } else if z.HasExtensions() && z.EncExt(yy153) {
- } else if !yym154 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy153)
- } else {
- z.EncFallback(yy153)
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy156 := &x.HTTPCheckFrequency
- yym157 := z.EncBinary()
- _ = yym157
- if false {
- } else if z.HasExtensions() && z.EncExt(yy156) {
- } else if !yym157 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy156)
- } else {
- z.EncFallback(yy156)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("httpCheckFrequency"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy158 := &x.HTTPCheckFrequency
- yym159 := z.EncBinary()
- _ = yym159
- if false {
- } else if z.HasExtensions() && z.EncExt(yy158) {
- } else if !yym159 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy158)
- } else {
- z.EncFallback(yy158)
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym161 := z.EncBinary()
- _ = yym161
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURL))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("manifestURL"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym162 := z.EncBinary()
- _ = yym162
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURL))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym164 := z.EncBinary()
- _ = yym164
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURLHeader))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("manifestURLHeader"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym165 := z.EncBinary()
- _ = yym165
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ManifestURLHeader))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym167 := z.EncBinary()
- _ = yym167
- if false {
- } else {
- r.EncodeBool(bool(x.EnableServer))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("enableServer"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym168 := z.EncBinary()
- _ = yym168
- if false {
- } else {
- r.EncodeBool(bool(x.EnableServer))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym170 := z.EncBinary()
- _ = yym170
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Address))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("address"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym171 := z.EncBinary()
- _ = yym171
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Address))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym173 := z.EncBinary()
- _ = yym173
- if false {
- } else {
- r.EncodeInt(int64(x.Port))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("port"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym174 := z.EncBinary()
- _ = yym174
- if false {
- } else {
- r.EncodeInt(int64(x.Port))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym176 := z.EncBinary()
- _ = yym176
- if false {
- } else {
- r.EncodeInt(int64(x.ReadOnlyPort))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("readOnlyPort"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym177 := z.EncBinary()
- _ = yym177
- if false {
- } else {
- r.EncodeInt(int64(x.ReadOnlyPort))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym179 := z.EncBinary()
- _ = yym179
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.TLSCertFile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("tlsCertFile"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym180 := z.EncBinary()
- _ = yym180
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.TLSCertFile))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym182 := z.EncBinary()
- _ = yym182
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.TLSPrivateKeyFile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("tlsPrivateKeyFile"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym183 := z.EncBinary()
- _ = yym183
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.TLSPrivateKeyFile))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym185 := z.EncBinary()
- _ = yym185
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CertDirectory))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("certDirectory"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym186 := z.EncBinary()
- _ = yym186
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CertDirectory))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym188 := z.EncBinary()
- _ = yym188
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("hostnameOverride"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym189 := z.EncBinary()
- _ = yym189
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.HostnameOverride))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym191 := z.EncBinary()
- _ = yym191
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PodInfraContainerImage))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("podInfraContainerImage"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym192 := z.EncBinary()
- _ = yym192
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PodInfraContainerImage))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym194 := z.EncBinary()
- _ = yym194
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.DockerEndpoint))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("dockerEndpoint"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym195 := z.EncBinary()
- _ = yym195
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.DockerEndpoint))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym197 := z.EncBinary()
- _ = yym197
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RootDirectory))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("rootDirectory"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym198 := z.EncBinary()
- _ = yym198
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RootDirectory))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym200 := z.EncBinary()
- _ = yym200
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.SeccompProfileRoot))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("seccompProfileRoot"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym201 := z.EncBinary()
- _ = yym201
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.SeccompProfileRoot))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym203 := z.EncBinary()
- _ = yym203
- if false {
- } else {
- r.EncodeBool(bool(x.AllowPrivileged))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("allowPrivileged"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym204 := z.EncBinary()
- _ = yym204
- if false {
- } else {
- r.EncodeBool(bool(x.AllowPrivileged))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.HostNetworkSources == nil {
- r.EncodeNil()
- } else {
- yym206 := z.EncBinary()
- _ = yym206
- if false {
- } else {
- z.F.EncSliceStringV(x.HostNetworkSources, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("hostNetworkSources"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.HostNetworkSources == nil {
- r.EncodeNil()
- } else {
- yym207 := z.EncBinary()
- _ = yym207
- if false {
- } else {
- z.F.EncSliceStringV(x.HostNetworkSources, false, e)
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.HostPIDSources == nil {
- r.EncodeNil()
- } else {
- yym209 := z.EncBinary()
- _ = yym209
- if false {
- } else {
- z.F.EncSliceStringV(x.HostPIDSources, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("hostPIDSources"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.HostPIDSources == nil {
- r.EncodeNil()
- } else {
- yym210 := z.EncBinary()
- _ = yym210
- if false {
- } else {
- z.F.EncSliceStringV(x.HostPIDSources, false, e)
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.HostIPCSources == nil {
- r.EncodeNil()
- } else {
- yym212 := z.EncBinary()
- _ = yym212
- if false {
- } else {
- z.F.EncSliceStringV(x.HostIPCSources, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("hostIPCSources"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.HostIPCSources == nil {
- r.EncodeNil()
- } else {
- yym213 := z.EncBinary()
- _ = yym213
- if false {
- } else {
- z.F.EncSliceStringV(x.HostIPCSources, false, e)
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym215 := z.EncBinary()
- _ = yym215
- if false {
- } else {
- r.EncodeInt(int64(x.RegistryPullQPS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("registryPullQPS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym216 := z.EncBinary()
- _ = yym216
- if false {
- } else {
- r.EncodeInt(int64(x.RegistryPullQPS))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym218 := z.EncBinary()
- _ = yym218
- if false {
- } else {
- r.EncodeInt(int64(x.RegistryBurst))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("registryBurst"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym219 := z.EncBinary()
- _ = yym219
- if false {
- } else {
- r.EncodeInt(int64(x.RegistryBurst))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym221 := z.EncBinary()
- _ = yym221
- if false {
- } else {
- r.EncodeInt(int64(x.EventRecordQPS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("eventRecordQPS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym222 := z.EncBinary()
- _ = yym222
- if false {
- } else {
- r.EncodeInt(int64(x.EventRecordQPS))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym224 := z.EncBinary()
- _ = yym224
- if false {
- } else {
- r.EncodeInt(int64(x.EventBurst))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("eventBurst"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym225 := z.EncBinary()
- _ = yym225
- if false {
- } else {
- r.EncodeInt(int64(x.EventBurst))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym227 := z.EncBinary()
- _ = yym227
- if false {
- } else {
- r.EncodeBool(bool(x.EnableDebuggingHandlers))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("enableDebuggingHandlers"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym228 := z.EncBinary()
- _ = yym228
- if false {
- } else {
- r.EncodeBool(bool(x.EnableDebuggingHandlers))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy230 := &x.MinimumGCAge
- yym231 := z.EncBinary()
- _ = yym231
- if false {
- } else if z.HasExtensions() && z.EncExt(yy230) {
- } else if !yym231 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy230)
- } else {
- z.EncFallback(yy230)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("minimumGCAge"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy232 := &x.MinimumGCAge
- yym233 := z.EncBinary()
- _ = yym233
- if false {
- } else if z.HasExtensions() && z.EncExt(yy232) {
- } else if !yym233 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy232)
- } else {
- z.EncFallback(yy232)
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym235 := z.EncBinary()
- _ = yym235
- if false {
- } else {
- r.EncodeInt(int64(x.MaxPerPodContainerCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("maxPerPodContainerCount"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym236 := z.EncBinary()
- _ = yym236
- if false {
- } else {
- r.EncodeInt(int64(x.MaxPerPodContainerCount))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym238 := z.EncBinary()
- _ = yym238
- if false {
- } else {
- r.EncodeInt(int64(x.MaxContainerCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("maxContainerCount"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym239 := z.EncBinary()
- _ = yym239
- if false {
- } else {
- r.EncodeInt(int64(x.MaxContainerCount))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym241 := z.EncBinary()
- _ = yym241
- if false {
- } else {
- r.EncodeInt(int64(x.CAdvisorPort))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("cAdvisorPort"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym242 := z.EncBinary()
- _ = yym242
- if false {
- } else {
- r.EncodeInt(int64(x.CAdvisorPort))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym244 := z.EncBinary()
- _ = yym244
- if false {
- } else {
- r.EncodeInt(int64(x.HealthzPort))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("healthzPort"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym245 := z.EncBinary()
- _ = yym245
- if false {
- } else {
- r.EncodeInt(int64(x.HealthzPort))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym247 := z.EncBinary()
- _ = yym247
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("healthzBindAddress"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym248 := z.EncBinary()
- _ = yym248
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.HealthzBindAddress))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym250 := z.EncBinary()
- _ = yym250
- if false {
- } else {
- r.EncodeInt(int64(x.OOMScoreAdj))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("oomScoreAdj"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym251 := z.EncBinary()
- _ = yym251
- if false {
- } else {
- r.EncodeInt(int64(x.OOMScoreAdj))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym253 := z.EncBinary()
- _ = yym253
- if false {
- } else {
- r.EncodeBool(bool(x.RegisterNode))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("registerNode"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym254 := z.EncBinary()
- _ = yym254
- if false {
- } else {
- r.EncodeBool(bool(x.RegisterNode))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym256 := z.EncBinary()
- _ = yym256
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDomain))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clusterDomain"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym257 := z.EncBinary()
- _ = yym257
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDomain))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym259 := z.EncBinary()
- _ = yym259
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.MasterServiceNamespace))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("masterServiceNamespace"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym260 := z.EncBinary()
- _ = yym260
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.MasterServiceNamespace))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym262 := z.EncBinary()
- _ = yym262
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDNS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clusterDNS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym263 := z.EncBinary()
- _ = yym263
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterDNS))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy265 := &x.StreamingConnectionIdleTimeout
- yym266 := z.EncBinary()
- _ = yym266
- if false {
- } else if z.HasExtensions() && z.EncExt(yy265) {
- } else if !yym266 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy265)
- } else {
- z.EncFallback(yy265)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("streamingConnectionIdleTimeout"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy267 := &x.StreamingConnectionIdleTimeout
- yym268 := z.EncBinary()
- _ = yym268
- if false {
- } else if z.HasExtensions() && z.EncExt(yy267) {
- } else if !yym268 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy267)
- } else {
- z.EncFallback(yy267)
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy270 := &x.NodeStatusUpdateFrequency
- yym271 := z.EncBinary()
- _ = yym271
- if false {
- } else if z.HasExtensions() && z.EncExt(yy270) {
- } else if !yym271 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy270)
- } else {
- z.EncFallback(yy270)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nodeStatusUpdateFrequency"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy272 := &x.NodeStatusUpdateFrequency
- yym273 := z.EncBinary()
- _ = yym273
- if false {
- } else if z.HasExtensions() && z.EncExt(yy272) {
- } else if !yym273 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy272)
- } else {
- z.EncFallback(yy272)
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy275 := &x.ImageMinimumGCAge
- yym276 := z.EncBinary()
- _ = yym276
- if false {
- } else if z.HasExtensions() && z.EncExt(yy275) {
- } else if !yym276 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy275)
- } else {
- z.EncFallback(yy275)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("imageMinimumGCAge"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy277 := &x.ImageMinimumGCAge
- yym278 := z.EncBinary()
- _ = yym278
- if false {
- } else if z.HasExtensions() && z.EncExt(yy277) {
- } else if !yym278 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy277)
- } else {
- z.EncFallback(yy277)
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym280 := z.EncBinary()
- _ = yym280
- if false {
- } else {
- r.EncodeInt(int64(x.ImageGCHighThresholdPercent))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("imageGCHighThresholdPercent"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym281 := z.EncBinary()
- _ = yym281
- if false {
- } else {
- r.EncodeInt(int64(x.ImageGCHighThresholdPercent))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym283 := z.EncBinary()
- _ = yym283
- if false {
- } else {
- r.EncodeInt(int64(x.ImageGCLowThresholdPercent))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("imageGCLowThresholdPercent"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym284 := z.EncBinary()
- _ = yym284
- if false {
- } else {
- r.EncodeInt(int64(x.ImageGCLowThresholdPercent))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym286 := z.EncBinary()
- _ = yym286
- if false {
- } else {
- r.EncodeInt(int64(x.LowDiskSpaceThresholdMB))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("lowDiskSpaceThresholdMB"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym287 := z.EncBinary()
- _ = yym287
- if false {
- } else {
- r.EncodeInt(int64(x.LowDiskSpaceThresholdMB))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy289 := &x.VolumeStatsAggPeriod
- yym290 := z.EncBinary()
- _ = yym290
- if false {
- } else if z.HasExtensions() && z.EncExt(yy289) {
- } else if !yym290 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy289)
- } else {
- z.EncFallback(yy289)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("volumeStatsAggPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy291 := &x.VolumeStatsAggPeriod
- yym292 := z.EncBinary()
- _ = yym292
- if false {
- } else if z.HasExtensions() && z.EncExt(yy291) {
- } else if !yym292 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy291)
- } else {
- z.EncFallback(yy291)
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym294 := z.EncBinary()
- _ = yym294
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginName))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("networkPluginName"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym295 := z.EncBinary()
- _ = yym295
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginName))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym297 := z.EncBinary()
- _ = yym297
- if false {
- } else {
- r.EncodeInt(int64(x.NetworkPluginMTU))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("networkPluginMTU"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym298 := z.EncBinary()
- _ = yym298
- if false {
- } else {
- r.EncodeInt(int64(x.NetworkPluginMTU))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym300 := z.EncBinary()
- _ = yym300
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginDir))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("networkPluginDir"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym301 := z.EncBinary()
- _ = yym301
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.NetworkPluginDir))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym303 := z.EncBinary()
- _ = yym303
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CNIConfDir))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("cniConfDir"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym304 := z.EncBinary()
- _ = yym304
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CNIConfDir))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym306 := z.EncBinary()
- _ = yym306
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CNIBinDir))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("cniBinDir"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym307 := z.EncBinary()
- _ = yym307
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CNIBinDir))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym309 := z.EncBinary()
- _ = yym309
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.VolumePluginDir))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("volumePluginDir"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym310 := z.EncBinary()
- _ = yym310
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.VolumePluginDir))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[53] {
- yym312 := z.EncBinary()
- _ = yym312
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[53] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("cloudProvider"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym313 := z.EncBinary()
- _ = yym313
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[54] {
- yym315 := z.EncBinary()
- _ = yym315
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[54] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("cloudConfigFile"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym316 := z.EncBinary()
- _ = yym316
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[55] {
- yym318 := z.EncBinary()
- _ = yym318
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.KubeletCgroups))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[55] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kubeletCgroups"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym319 := z.EncBinary()
- _ = yym319
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.KubeletCgroups))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[56] {
- yym321 := z.EncBinary()
- _ = yym321
- if false {
- } else {
- r.EncodeBool(bool(x.CgroupsPerQOS))
- }
- } else {
- r.EncodeBool(false)
- }
- } else {
- if yyq135[56] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("CgroupsPerQOS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym322 := z.EncBinary()
- _ = yym322
- if false {
- } else {
- r.EncodeBool(bool(x.CgroupsPerQOS))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[57] {
- yym324 := z.EncBinary()
- _ = yym324
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RuntimeCgroups))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[57] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("runtimeCgroups"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym325 := z.EncBinary()
- _ = yym325
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RuntimeCgroups))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[58] {
- yym327 := z.EncBinary()
- _ = yym327
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.SystemCgroups))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[58] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("systemCgroups"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym328 := z.EncBinary()
- _ = yym328
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.SystemCgroups))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[59] {
- yym330 := z.EncBinary()
- _ = yym330
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CgroupRoot))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[59] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("cgroupRoot"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym331 := z.EncBinary()
- _ = yym331
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CgroupRoot))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym333 := z.EncBinary()
- _ = yym333
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntime))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("containerRuntime"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym334 := z.EncBinary()
- _ = yym334
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntime))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym336 := z.EncBinary()
- _ = yym336
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RemoteRuntimeEndpoint))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("remoteRuntimeEndpoint"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym337 := z.EncBinary()
- _ = yym337
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RemoteRuntimeEndpoint))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym339 := z.EncBinary()
- _ = yym339
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RemoteImageEndpoint))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("remoteImageEndpoint"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym340 := z.EncBinary()
- _ = yym340
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RemoteImageEndpoint))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[63] {
- yy342 := &x.RuntimeRequestTimeout
- yym343 := z.EncBinary()
- _ = yym343
- if false {
- } else if z.HasExtensions() && z.EncExt(yy342) {
- } else if !yym343 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy342)
- } else {
- z.EncFallback(yy342)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq135[63] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("runtimeRequestTimeout"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy344 := &x.RuntimeRequestTimeout
- yym345 := z.EncBinary()
- _ = yym345
- if false {
- } else if z.HasExtensions() && z.EncExt(yy344) {
- } else if !yym345 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy344)
- } else {
- z.EncFallback(yy344)
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[64] {
- yym347 := z.EncBinary()
- _ = yym347
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RktPath))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[64] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("rktPath"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym348 := z.EncBinary()
- _ = yym348
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RktPath))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[65] {
- yym350 := z.EncBinary()
- _ = yym350
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RktAPIEndpoint))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[65] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("rktAPIEndpoint"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym351 := z.EncBinary()
- _ = yym351
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RktAPIEndpoint))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[66] {
- yym353 := z.EncBinary()
- _ = yym353
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[66] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("rktStage1Image"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym354 := z.EncBinary()
- _ = yym354
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RktStage1Image))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym356 := z.EncBinary()
- _ = yym356
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.LockFilePath))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("lockFilePath"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym357 := z.EncBinary()
- _ = yym357
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.LockFilePath))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym359 := z.EncBinary()
- _ = yym359
- if false {
- } else {
- r.EncodeBool(bool(x.ExitOnLockContention))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("exitOnLockContention"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym360 := z.EncBinary()
- _ = yym360
- if false {
- } else {
- r.EncodeBool(bool(x.ExitOnLockContention))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym362 := z.EncBinary()
- _ = yym362
- if false {
- } else {
- r.EncodeBool(bool(x.ConfigureCBR0))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("configureCbr0"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym363 := z.EncBinary()
- _ = yym363
- if false {
- } else {
- r.EncodeBool(bool(x.ConfigureCBR0))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym365 := z.EncBinary()
- _ = yym365
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.HairpinMode))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("hairpinMode"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym366 := z.EncBinary()
- _ = yym366
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.HairpinMode))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym368 := z.EncBinary()
- _ = yym368
- if false {
- } else {
- r.EncodeBool(bool(x.BabysitDaemons))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("babysitDaemons"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym369 := z.EncBinary()
- _ = yym369
- if false {
- } else {
- r.EncodeBool(bool(x.BabysitDaemons))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym371 := z.EncBinary()
- _ = yym371
- if false {
- } else {
- r.EncodeInt(int64(x.MaxPods))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("maxPods"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym372 := z.EncBinary()
- _ = yym372
- if false {
- } else {
- r.EncodeInt(int64(x.MaxPods))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym374 := z.EncBinary()
- _ = yym374
- if false {
- } else {
- r.EncodeInt(int64(x.NvidiaGPUs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nvidiaGPUs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym375 := z.EncBinary()
- _ = yym375
- if false {
- } else {
- r.EncodeInt(int64(x.NvidiaGPUs))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym377 := z.EncBinary()
- _ = yym377
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("dockerExecHandlerName"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym378 := z.EncBinary()
- _ = yym378
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.DockerExecHandlerName))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym380 := z.EncBinary()
- _ = yym380
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("podCIDR"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym381 := z.EncBinary()
- _ = yym381
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym383 := z.EncBinary()
- _ = yym383
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("resolvConf"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym384 := z.EncBinary()
- _ = yym384
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ResolverConfig))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym386 := z.EncBinary()
- _ = yym386
- if false {
- } else {
- r.EncodeBool(bool(x.CPUCFSQuota))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("cpuCFSQuota"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym387 := z.EncBinary()
- _ = yym387
- if false {
- } else {
- r.EncodeBool(bool(x.CPUCFSQuota))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym389 := z.EncBinary()
- _ = yym389
- if false {
- } else {
- r.EncodeBool(bool(x.Containerized))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("containerized"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym390 := z.EncBinary()
- _ = yym390
- if false {
- } else {
- r.EncodeBool(bool(x.Containerized))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym392 := z.EncBinary()
- _ = yym392
- if false {
- } else {
- r.EncodeInt(int64(x.MaxOpenFiles))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("maxOpenFiles"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym393 := z.EncBinary()
- _ = yym393
- if false {
- } else {
- r.EncodeInt(int64(x.MaxOpenFiles))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym395 := z.EncBinary()
- _ = yym395
- if false {
- } else {
- r.EncodeBool(bool(x.ReconcileCIDR))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("reconcileCIDR"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym396 := z.EncBinary()
- _ = yym396
- if false {
- } else {
- r.EncodeBool(bool(x.ReconcileCIDR))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym398 := z.EncBinary()
- _ = yym398
- if false {
- } else {
- r.EncodeBool(bool(x.RegisterSchedulable))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("registerSchedulable"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym399 := z.EncBinary()
- _ = yym399
- if false {
- } else {
- r.EncodeBool(bool(x.RegisterSchedulable))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym401 := z.EncBinary()
- _ = yym401
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("contentType"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym402 := z.EncBinary()
- _ = yym402
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym404 := z.EncBinary()
- _ = yym404
- if false {
- } else {
- r.EncodeInt(int64(x.KubeAPIQPS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym405 := z.EncBinary()
- _ = yym405
- if false {
- } else {
- r.EncodeInt(int64(x.KubeAPIQPS))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym407 := z.EncBinary()
- _ = yym407
- if false {
- } else {
- r.EncodeInt(int64(x.KubeAPIBurst))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym408 := z.EncBinary()
- _ = yym408
- if false {
- } else {
- r.EncodeInt(int64(x.KubeAPIBurst))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym410 := z.EncBinary()
- _ = yym410
- if false {
- } else {
- r.EncodeBool(bool(x.SerializeImagePulls))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("serializeImagePulls"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym411 := z.EncBinary()
- _ = yym411
- if false {
- } else {
- r.EncodeBool(bool(x.SerializeImagePulls))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym413 := z.EncBinary()
- _ = yym413
- if false {
- } else {
- r.EncodeBool(bool(x.ExperimentalFlannelOverlay))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("experimentalFlannelOverlay"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym414 := z.EncBinary()
- _ = yym414
- if false {
- } else {
- r.EncodeBool(bool(x.ExperimentalFlannelOverlay))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[87] {
- yy416 := &x.OutOfDiskTransitionFrequency
- yym417 := z.EncBinary()
- _ = yym417
- if false {
- } else if z.HasExtensions() && z.EncExt(yy416) {
- } else if !yym417 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy416)
- } else {
- z.EncFallback(yy416)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq135[87] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("outOfDiskTransitionFrequency"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy418 := &x.OutOfDiskTransitionFrequency
- yym419 := z.EncBinary()
- _ = yym419
- if false {
- } else if z.HasExtensions() && z.EncExt(yy418) {
- } else if !yym419 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy418)
- } else {
- z.EncFallback(yy418)
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[88] {
- yym421 := z.EncBinary()
- _ = yym421
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[88] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nodeIP"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym422 := z.EncBinary()
- _ = yym422
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.NodeIP))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.NodeLabels == nil {
- r.EncodeNil()
- } else {
- yym424 := z.EncBinary()
- _ = yym424
- if false {
- } else {
- z.F.EncMapStringStringV(x.NodeLabels, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nodeLabels"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.NodeLabels == nil {
- r.EncodeNil()
- } else {
- yym425 := z.EncBinary()
- _ = yym425
- if false {
- } else {
- z.F.EncMapStringStringV(x.NodeLabels, false, e)
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym427 := z.EncBinary()
- _ = yym427
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.NonMasqueradeCIDR))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nonMasqueradeCIDR"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym428 := z.EncBinary()
- _ = yym428
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.NonMasqueradeCIDR))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym430 := z.EncBinary()
- _ = yym430
- if false {
- } else {
- r.EncodeBool(bool(x.EnableCustomMetrics))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("enableCustomMetrics"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym431 := z.EncBinary()
- _ = yym431
- if false {
- } else {
- r.EncodeBool(bool(x.EnableCustomMetrics))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[92] {
- yym433 := z.EncBinary()
- _ = yym433
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.EvictionHard))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[92] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("evictionHard"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym434 := z.EncBinary()
- _ = yym434
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.EvictionHard))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[93] {
- yym436 := z.EncBinary()
- _ = yym436
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoft))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[93] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("evictionSoft"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym437 := z.EncBinary()
- _ = yym437
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoft))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[94] {
- yym439 := z.EncBinary()
- _ = yym439
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoftGracePeriod))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[94] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("evictionSoftGracePeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym440 := z.EncBinary()
- _ = yym440
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.EvictionSoftGracePeriod))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[95] {
- yy442 := &x.EvictionPressureTransitionPeriod
- yym443 := z.EncBinary()
- _ = yym443
- if false {
- } else if z.HasExtensions() && z.EncExt(yy442) {
- } else if !yym443 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy442)
- } else {
- z.EncFallback(yy442)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq135[95] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("evictionPressureTransitionPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy444 := &x.EvictionPressureTransitionPeriod
- yym445 := z.EncBinary()
- _ = yym445
- if false {
- } else if z.HasExtensions() && z.EncExt(yy444) {
- } else if !yym445 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy444)
- } else {
- z.EncFallback(yy444)
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[96] {
- yym447 := z.EncBinary()
- _ = yym447
- if false {
- } else {
- r.EncodeInt(int64(x.EvictionMaxPodGracePeriod))
- }
- } else {
- r.EncodeInt(0)
- }
- } else {
- if yyq135[96] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("evictionMaxPodGracePeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym448 := z.EncBinary()
- _ = yym448
- if false {
- } else {
- r.EncodeInt(int64(x.EvictionMaxPodGracePeriod))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[97] {
- yym450 := z.EncBinary()
- _ = yym450
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.EvictionMinimumReclaim))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[97] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("evictionMinimumReclaim"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym451 := z.EncBinary()
- _ = yym451
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.EvictionMinimumReclaim))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym453 := z.EncBinary()
- _ = yym453
- if false {
- } else {
- r.EncodeInt(int64(x.PodsPerCore))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("podsPerCore"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym454 := z.EncBinary()
- _ = yym454
- if false {
- } else {
- r.EncodeInt(int64(x.PodsPerCore))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym456 := z.EncBinary()
- _ = yym456
- if false {
- } else {
- r.EncodeBool(bool(x.EnableControllerAttachDetach))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("enableControllerAttachDetach"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym457 := z.EncBinary()
- _ = yym457
- if false {
- } else {
- r.EncodeBool(bool(x.EnableControllerAttachDetach))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.SystemReserved == nil {
- r.EncodeNil()
- } else {
- yym459 := z.EncBinary()
- _ = yym459
- if false {
- } else if z.HasExtensions() && z.EncExt(x.SystemReserved) {
- } else {
- h.encconfig_ConfigurationMap((pkg2_config.ConfigurationMap)(x.SystemReserved), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("systemReserved"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.SystemReserved == nil {
- r.EncodeNil()
- } else {
- yym460 := z.EncBinary()
- _ = yym460
- if false {
- } else if z.HasExtensions() && z.EncExt(x.SystemReserved) {
- } else {
- h.encconfig_ConfigurationMap((pkg2_config.ConfigurationMap)(x.SystemReserved), e)
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.KubeReserved == nil {
- r.EncodeNil()
- } else {
- yym462 := z.EncBinary()
- _ = yym462
- if false {
- } else if z.HasExtensions() && z.EncExt(x.KubeReserved) {
- } else {
- h.encconfig_ConfigurationMap((pkg2_config.ConfigurationMap)(x.KubeReserved), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kubeReserved"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.KubeReserved == nil {
- r.EncodeNil()
- } else {
- yym463 := z.EncBinary()
- _ = yym463
- if false {
- } else if z.HasExtensions() && z.EncExt(x.KubeReserved) {
- } else {
- h.encconfig_ConfigurationMap((pkg2_config.ConfigurationMap)(x.KubeReserved), e)
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym465 := z.EncBinary()
- _ = yym465
- if false {
- } else {
- r.EncodeBool(bool(x.ProtectKernelDefaults))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("protectKernelDefaults"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym466 := z.EncBinary()
- _ = yym466
- if false {
- } else {
- r.EncodeBool(bool(x.ProtectKernelDefaults))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym468 := z.EncBinary()
- _ = yym468
- if false {
- } else {
- r.EncodeBool(bool(x.MakeIPTablesUtilChains))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("makeIPTablesUtilChains"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym469 := z.EncBinary()
- _ = yym469
- if false {
- } else {
- r.EncodeBool(bool(x.MakeIPTablesUtilChains))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym471 := z.EncBinary()
- _ = yym471
- if false {
- } else {
- r.EncodeInt(int64(x.IPTablesMasqueradeBit))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("iptablesMasqueradeBit"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym472 := z.EncBinary()
- _ = yym472
- if false {
- } else {
- r.EncodeInt(int64(x.IPTablesMasqueradeBit))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym474 := z.EncBinary()
- _ = yym474
- if false {
- } else {
- r.EncodeInt(int64(x.IPTablesDropBit))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("iptablesDropBit"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym475 := z.EncBinary()
- _ = yym475
- if false {
- } else {
- r.EncodeInt(int64(x.IPTablesDropBit))
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[106] {
- if x.AllowedUnsafeSysctls == nil {
- r.EncodeNil()
- } else {
- yym477 := z.EncBinary()
- _ = yym477
- if false {
- } else {
- z.F.EncSliceStringV(x.AllowedUnsafeSysctls, false, e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq135[106] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("experimentalAllowedUnsafeSysctls"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.AllowedUnsafeSysctls == nil {
- r.EncodeNil()
- } else {
- yym478 := z.EncBinary()
- _ = yym478
- if false {
- } else {
- z.F.EncSliceStringV(x.AllowedUnsafeSysctls, false, e)
- }
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq135[107] {
- yym480 := z.EncBinary()
- _ = yym480
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ExperimentalRuntimeIntegrationType))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq135[107] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("experimentalRuntimeIntegrationType"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym481 := z.EncBinary()
- _ = yym481
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ExperimentalRuntimeIntegrationType))
- }
- }
- }
- if yyr135 || yy2arr135 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *KubeletConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym482 := z.DecBinary()
- _ = yym482
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct483 := r.ContainerType()
- if yyct483 == codecSelferValueTypeMap1234 {
- yyl483 := r.ReadMapStart()
- if yyl483 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl483, d)
- }
- } else if yyct483 == codecSelferValueTypeArray1234 {
- yyl483 := r.ReadArrayStart()
- if yyl483 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl483, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys484Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys484Slc
- var yyhl484 bool = l >= 0
- for yyj484 := 0; ; yyj484++ {
- if yyhl484 {
- if yyj484 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys484Slc = r.DecodeBytes(yys484Slc, true, true)
- yys484 := string(yys484Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys484 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "podManifestPath":
- if r.TryDecodeAsNil() {
- x.PodManifestPath = ""
- } else {
- x.PodManifestPath = string(r.DecodeString())
- }
- case "syncFrequency":
- if r.TryDecodeAsNil() {
- x.SyncFrequency = pkg1_unversioned.Duration{}
- } else {
- yyv488 := &x.SyncFrequency
- yym489 := z.DecBinary()
- _ = yym489
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv488) {
- } else if !yym489 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv488)
- } else {
- z.DecFallback(yyv488, false)
- }
- }
- case "fileCheckFrequency":
- if r.TryDecodeAsNil() {
- x.FileCheckFrequency = pkg1_unversioned.Duration{}
- } else {
- yyv490 := &x.FileCheckFrequency
- yym491 := z.DecBinary()
- _ = yym491
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv490) {
- } else if !yym491 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv490)
- } else {
- z.DecFallback(yyv490, false)
- }
- }
- case "httpCheckFrequency":
- if r.TryDecodeAsNil() {
- x.HTTPCheckFrequency = pkg1_unversioned.Duration{}
- } else {
- yyv492 := &x.HTTPCheckFrequency
- yym493 := z.DecBinary()
- _ = yym493
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv492) {
- } else if !yym493 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv492)
- } else {
- z.DecFallback(yyv492, false)
- }
- }
- case "manifestURL":
- if r.TryDecodeAsNil() {
- x.ManifestURL = ""
- } else {
- x.ManifestURL = string(r.DecodeString())
- }
- case "manifestURLHeader":
- if r.TryDecodeAsNil() {
- x.ManifestURLHeader = ""
- } else {
- x.ManifestURLHeader = string(r.DecodeString())
- }
- case "enableServer":
- if r.TryDecodeAsNil() {
- x.EnableServer = false
- } else {
- x.EnableServer = bool(r.DecodeBool())
- }
- case "address":
- if r.TryDecodeAsNil() {
- x.Address = ""
- } else {
- x.Address = string(r.DecodeString())
- }
- case "port":
- if r.TryDecodeAsNil() {
- x.Port = 0
- } else {
- x.Port = int32(r.DecodeInt(32))
- }
- case "readOnlyPort":
- if r.TryDecodeAsNil() {
- x.ReadOnlyPort = 0
- } else {
- x.ReadOnlyPort = int32(r.DecodeInt(32))
- }
- case "tlsCertFile":
- if r.TryDecodeAsNil() {
- x.TLSCertFile = ""
- } else {
- x.TLSCertFile = string(r.DecodeString())
- }
- case "tlsPrivateKeyFile":
- if r.TryDecodeAsNil() {
- x.TLSPrivateKeyFile = ""
- } else {
- x.TLSPrivateKeyFile = string(r.DecodeString())
- }
- case "certDirectory":
- if r.TryDecodeAsNil() {
- x.CertDirectory = ""
- } else {
- x.CertDirectory = string(r.DecodeString())
- }
- case "hostnameOverride":
- if r.TryDecodeAsNil() {
- x.HostnameOverride = ""
- } else {
- x.HostnameOverride = string(r.DecodeString())
- }
- case "podInfraContainerImage":
- if r.TryDecodeAsNil() {
- x.PodInfraContainerImage = ""
- } else {
- x.PodInfraContainerImage = string(r.DecodeString())
- }
- case "dockerEndpoint":
- if r.TryDecodeAsNil() {
- x.DockerEndpoint = ""
- } else {
- x.DockerEndpoint = string(r.DecodeString())
- }
- case "rootDirectory":
- if r.TryDecodeAsNil() {
- x.RootDirectory = ""
- } else {
- x.RootDirectory = string(r.DecodeString())
- }
- case "seccompProfileRoot":
- if r.TryDecodeAsNil() {
- x.SeccompProfileRoot = ""
- } else {
- x.SeccompProfileRoot = string(r.DecodeString())
- }
- case "allowPrivileged":
- if r.TryDecodeAsNil() {
- x.AllowPrivileged = false
- } else {
- x.AllowPrivileged = bool(r.DecodeBool())
- }
- case "hostNetworkSources":
- if r.TryDecodeAsNil() {
- x.HostNetworkSources = nil
- } else {
- yyv509 := &x.HostNetworkSources
- yym510 := z.DecBinary()
- _ = yym510
- if false {
- } else {
- z.F.DecSliceStringX(yyv509, false, d)
- }
- }
- case "hostPIDSources":
- if r.TryDecodeAsNil() {
- x.HostPIDSources = nil
- } else {
- yyv511 := &x.HostPIDSources
- yym512 := z.DecBinary()
- _ = yym512
- if false {
- } else {
- z.F.DecSliceStringX(yyv511, false, d)
- }
- }
- case "hostIPCSources":
- if r.TryDecodeAsNil() {
- x.HostIPCSources = nil
- } else {
- yyv513 := &x.HostIPCSources
- yym514 := z.DecBinary()
- _ = yym514
- if false {
- } else {
- z.F.DecSliceStringX(yyv513, false, d)
- }
- }
- case "registryPullQPS":
- if r.TryDecodeAsNil() {
- x.RegistryPullQPS = 0
- } else {
- x.RegistryPullQPS = int32(r.DecodeInt(32))
- }
- case "registryBurst":
- if r.TryDecodeAsNil() {
- x.RegistryBurst = 0
- } else {
- x.RegistryBurst = int32(r.DecodeInt(32))
- }
- case "eventRecordQPS":
- if r.TryDecodeAsNil() {
- x.EventRecordQPS = 0
- } else {
- x.EventRecordQPS = int32(r.DecodeInt(32))
- }
- case "eventBurst":
- if r.TryDecodeAsNil() {
- x.EventBurst = 0
- } else {
- x.EventBurst = int32(r.DecodeInt(32))
- }
- case "enableDebuggingHandlers":
- if r.TryDecodeAsNil() {
- x.EnableDebuggingHandlers = false
- } else {
- x.EnableDebuggingHandlers = bool(r.DecodeBool())
- }
- case "minimumGCAge":
- if r.TryDecodeAsNil() {
- x.MinimumGCAge = pkg1_unversioned.Duration{}
- } else {
- yyv520 := &x.MinimumGCAge
- yym521 := z.DecBinary()
- _ = yym521
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv520) {
- } else if !yym521 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv520)
- } else {
- z.DecFallback(yyv520, false)
- }
- }
- case "maxPerPodContainerCount":
- if r.TryDecodeAsNil() {
- x.MaxPerPodContainerCount = 0
- } else {
- x.MaxPerPodContainerCount = int32(r.DecodeInt(32))
- }
- case "maxContainerCount":
- if r.TryDecodeAsNil() {
- x.MaxContainerCount = 0
- } else {
- x.MaxContainerCount = int32(r.DecodeInt(32))
- }
- case "cAdvisorPort":
- if r.TryDecodeAsNil() {
- x.CAdvisorPort = 0
- } else {
- x.CAdvisorPort = int32(r.DecodeInt(32))
- }
- case "healthzPort":
- if r.TryDecodeAsNil() {
- x.HealthzPort = 0
- } else {
- x.HealthzPort = int32(r.DecodeInt(32))
- }
- case "healthzBindAddress":
- if r.TryDecodeAsNil() {
- x.HealthzBindAddress = ""
- } else {
- x.HealthzBindAddress = string(r.DecodeString())
- }
- case "oomScoreAdj":
- if r.TryDecodeAsNil() {
- x.OOMScoreAdj = 0
- } else {
- x.OOMScoreAdj = int32(r.DecodeInt(32))
- }
- case "registerNode":
- if r.TryDecodeAsNil() {
- x.RegisterNode = false
- } else {
- x.RegisterNode = bool(r.DecodeBool())
- }
- case "clusterDomain":
- if r.TryDecodeAsNil() {
- x.ClusterDomain = ""
- } else {
- x.ClusterDomain = string(r.DecodeString())
- }
- case "masterServiceNamespace":
- if r.TryDecodeAsNil() {
- x.MasterServiceNamespace = ""
- } else {
- x.MasterServiceNamespace = string(r.DecodeString())
- }
- case "clusterDNS":
- if r.TryDecodeAsNil() {
- x.ClusterDNS = ""
- } else {
- x.ClusterDNS = string(r.DecodeString())
- }
- case "streamingConnectionIdleTimeout":
- if r.TryDecodeAsNil() {
- x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{}
- } else {
- yyv532 := &x.StreamingConnectionIdleTimeout
- yym533 := z.DecBinary()
- _ = yym533
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv532) {
- } else if !yym533 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv532)
- } else {
- z.DecFallback(yyv532, false)
- }
- }
- case "nodeStatusUpdateFrequency":
- if r.TryDecodeAsNil() {
- x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{}
- } else {
- yyv534 := &x.NodeStatusUpdateFrequency
- yym535 := z.DecBinary()
- _ = yym535
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv534) {
- } else if !yym535 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv534)
- } else {
- z.DecFallback(yyv534, false)
- }
- }
- case "imageMinimumGCAge":
- if r.TryDecodeAsNil() {
- x.ImageMinimumGCAge = pkg1_unversioned.Duration{}
- } else {
- yyv536 := &x.ImageMinimumGCAge
- yym537 := z.DecBinary()
- _ = yym537
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv536) {
- } else if !yym537 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv536)
- } else {
- z.DecFallback(yyv536, false)
- }
- }
- case "imageGCHighThresholdPercent":
- if r.TryDecodeAsNil() {
- x.ImageGCHighThresholdPercent = 0
- } else {
- x.ImageGCHighThresholdPercent = int32(r.DecodeInt(32))
- }
- case "imageGCLowThresholdPercent":
- if r.TryDecodeAsNil() {
- x.ImageGCLowThresholdPercent = 0
- } else {
- x.ImageGCLowThresholdPercent = int32(r.DecodeInt(32))
- }
- case "lowDiskSpaceThresholdMB":
- if r.TryDecodeAsNil() {
- x.LowDiskSpaceThresholdMB = 0
- } else {
- x.LowDiskSpaceThresholdMB = int32(r.DecodeInt(32))
- }
- case "volumeStatsAggPeriod":
- if r.TryDecodeAsNil() {
- x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv541 := &x.VolumeStatsAggPeriod
- yym542 := z.DecBinary()
- _ = yym542
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv541) {
- } else if !yym542 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv541)
- } else {
- z.DecFallback(yyv541, false)
- }
- }
- case "networkPluginName":
- if r.TryDecodeAsNil() {
- x.NetworkPluginName = ""
- } else {
- x.NetworkPluginName = string(r.DecodeString())
- }
- case "networkPluginMTU":
- if r.TryDecodeAsNil() {
- x.NetworkPluginMTU = 0
- } else {
- x.NetworkPluginMTU = int32(r.DecodeInt(32))
- }
- case "networkPluginDir":
- if r.TryDecodeAsNil() {
- x.NetworkPluginDir = ""
- } else {
- x.NetworkPluginDir = string(r.DecodeString())
- }
- case "cniConfDir":
- if r.TryDecodeAsNil() {
- x.CNIConfDir = ""
- } else {
- x.CNIConfDir = string(r.DecodeString())
- }
- case "cniBinDir":
- if r.TryDecodeAsNil() {
- x.CNIBinDir = ""
- } else {
- x.CNIBinDir = string(r.DecodeString())
- }
- case "volumePluginDir":
- if r.TryDecodeAsNil() {
- x.VolumePluginDir = ""
- } else {
- x.VolumePluginDir = string(r.DecodeString())
- }
- case "cloudProvider":
- if r.TryDecodeAsNil() {
- x.CloudProvider = ""
- } else {
- x.CloudProvider = string(r.DecodeString())
- }
- case "cloudConfigFile":
- if r.TryDecodeAsNil() {
- x.CloudConfigFile = ""
- } else {
- x.CloudConfigFile = string(r.DecodeString())
- }
- case "kubeletCgroups":
- if r.TryDecodeAsNil() {
- x.KubeletCgroups = ""
- } else {
- x.KubeletCgroups = string(r.DecodeString())
- }
- case "CgroupsPerQOS":
- if r.TryDecodeAsNil() {
- x.CgroupsPerQOS = false
- } else {
- x.CgroupsPerQOS = bool(r.DecodeBool())
- }
- case "runtimeCgroups":
- if r.TryDecodeAsNil() {
- x.RuntimeCgroups = ""
- } else {
- x.RuntimeCgroups = string(r.DecodeString())
- }
- case "systemCgroups":
- if r.TryDecodeAsNil() {
- x.SystemCgroups = ""
- } else {
- x.SystemCgroups = string(r.DecodeString())
- }
- case "cgroupRoot":
- if r.TryDecodeAsNil() {
- x.CgroupRoot = ""
- } else {
- x.CgroupRoot = string(r.DecodeString())
- }
- case "containerRuntime":
- if r.TryDecodeAsNil() {
- x.ContainerRuntime = ""
- } else {
- x.ContainerRuntime = string(r.DecodeString())
- }
- case "remoteRuntimeEndpoint":
- if r.TryDecodeAsNil() {
- x.RemoteRuntimeEndpoint = ""
- } else {
- x.RemoteRuntimeEndpoint = string(r.DecodeString())
- }
- case "remoteImageEndpoint":
- if r.TryDecodeAsNil() {
- x.RemoteImageEndpoint = ""
- } else {
- x.RemoteImageEndpoint = string(r.DecodeString())
- }
- case "runtimeRequestTimeout":
- if r.TryDecodeAsNil() {
- x.RuntimeRequestTimeout = pkg1_unversioned.Duration{}
- } else {
- yyv559 := &x.RuntimeRequestTimeout
- yym560 := z.DecBinary()
- _ = yym560
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv559) {
- } else if !yym560 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv559)
- } else {
- z.DecFallback(yyv559, false)
- }
- }
- case "rktPath":
- if r.TryDecodeAsNil() {
- x.RktPath = ""
- } else {
- x.RktPath = string(r.DecodeString())
- }
- case "rktAPIEndpoint":
- if r.TryDecodeAsNil() {
- x.RktAPIEndpoint = ""
- } else {
- x.RktAPIEndpoint = string(r.DecodeString())
- }
- case "rktStage1Image":
- if r.TryDecodeAsNil() {
- x.RktStage1Image = ""
- } else {
- x.RktStage1Image = string(r.DecodeString())
- }
- case "lockFilePath":
- if r.TryDecodeAsNil() {
- x.LockFilePath = ""
- } else {
- x.LockFilePath = string(r.DecodeString())
- }
- case "exitOnLockContention":
- if r.TryDecodeAsNil() {
- x.ExitOnLockContention = false
- } else {
- x.ExitOnLockContention = bool(r.DecodeBool())
- }
- case "configureCbr0":
- if r.TryDecodeAsNil() {
- x.ConfigureCBR0 = false
- } else {
- x.ConfigureCBR0 = bool(r.DecodeBool())
- }
- case "hairpinMode":
- if r.TryDecodeAsNil() {
- x.HairpinMode = ""
- } else {
- x.HairpinMode = string(r.DecodeString())
- }
- case "babysitDaemons":
- if r.TryDecodeAsNil() {
- x.BabysitDaemons = false
- } else {
- x.BabysitDaemons = bool(r.DecodeBool())
- }
- case "maxPods":
- if r.TryDecodeAsNil() {
- x.MaxPods = 0
- } else {
- x.MaxPods = int32(r.DecodeInt(32))
- }
- case "nvidiaGPUs":
- if r.TryDecodeAsNil() {
- x.NvidiaGPUs = 0
- } else {
- x.NvidiaGPUs = int32(r.DecodeInt(32))
- }
- case "dockerExecHandlerName":
- if r.TryDecodeAsNil() {
- x.DockerExecHandlerName = ""
- } else {
- x.DockerExecHandlerName = string(r.DecodeString())
- }
- case "podCIDR":
- if r.TryDecodeAsNil() {
- x.PodCIDR = ""
- } else {
- x.PodCIDR = string(r.DecodeString())
- }
- case "resolvConf":
- if r.TryDecodeAsNil() {
- x.ResolverConfig = ""
- } else {
- x.ResolverConfig = string(r.DecodeString())
- }
- case "cpuCFSQuota":
- if r.TryDecodeAsNil() {
- x.CPUCFSQuota = false
- } else {
- x.CPUCFSQuota = bool(r.DecodeBool())
- }
- case "containerized":
- if r.TryDecodeAsNil() {
- x.Containerized = false
- } else {
- x.Containerized = bool(r.DecodeBool())
- }
- case "maxOpenFiles":
- if r.TryDecodeAsNil() {
- x.MaxOpenFiles = 0
- } else {
- x.MaxOpenFiles = int64(r.DecodeInt(64))
- }
- case "reconcileCIDR":
- if r.TryDecodeAsNil() {
- x.ReconcileCIDR = false
- } else {
- x.ReconcileCIDR = bool(r.DecodeBool())
- }
- case "registerSchedulable":
- if r.TryDecodeAsNil() {
- x.RegisterSchedulable = false
- } else {
- x.RegisterSchedulable = bool(r.DecodeBool())
- }
- case "contentType":
- if r.TryDecodeAsNil() {
- x.ContentType = ""
- } else {
- x.ContentType = string(r.DecodeString())
- }
- case "kubeAPIQPS":
- if r.TryDecodeAsNil() {
- x.KubeAPIQPS = 0
- } else {
- x.KubeAPIQPS = int32(r.DecodeInt(32))
- }
- case "kubeAPIBurst":
- if r.TryDecodeAsNil() {
- x.KubeAPIBurst = 0
- } else {
- x.KubeAPIBurst = int32(r.DecodeInt(32))
- }
- case "serializeImagePulls":
- if r.TryDecodeAsNil() {
- x.SerializeImagePulls = false
- } else {
- x.SerializeImagePulls = bool(r.DecodeBool())
- }
- case "experimentalFlannelOverlay":
- if r.TryDecodeAsNil() {
- x.ExperimentalFlannelOverlay = false
- } else {
- x.ExperimentalFlannelOverlay = bool(r.DecodeBool())
- }
- case "outOfDiskTransitionFrequency":
- if r.TryDecodeAsNil() {
- x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{}
- } else {
- yyv584 := &x.OutOfDiskTransitionFrequency
- yym585 := z.DecBinary()
- _ = yym585
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv584) {
- } else if !yym585 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv584)
- } else {
- z.DecFallback(yyv584, false)
- }
- }
- case "nodeIP":
- if r.TryDecodeAsNil() {
- x.NodeIP = ""
- } else {
- x.NodeIP = string(r.DecodeString())
- }
- case "nodeLabels":
- if r.TryDecodeAsNil() {
- x.NodeLabels = nil
- } else {
- yyv587 := &x.NodeLabels
- yym588 := z.DecBinary()
- _ = yym588
- if false {
- } else {
- z.F.DecMapStringStringX(yyv587, false, d)
- }
- }
- case "nonMasqueradeCIDR":
- if r.TryDecodeAsNil() {
- x.NonMasqueradeCIDR = ""
- } else {
- x.NonMasqueradeCIDR = string(r.DecodeString())
- }
- case "enableCustomMetrics":
- if r.TryDecodeAsNil() {
- x.EnableCustomMetrics = false
- } else {
- x.EnableCustomMetrics = bool(r.DecodeBool())
- }
- case "evictionHard":
- if r.TryDecodeAsNil() {
- x.EvictionHard = ""
- } else {
- x.EvictionHard = string(r.DecodeString())
- }
- case "evictionSoft":
- if r.TryDecodeAsNil() {
- x.EvictionSoft = ""
- } else {
- x.EvictionSoft = string(r.DecodeString())
- }
- case "evictionSoftGracePeriod":
- if r.TryDecodeAsNil() {
- x.EvictionSoftGracePeriod = ""
- } else {
- x.EvictionSoftGracePeriod = string(r.DecodeString())
- }
- case "evictionPressureTransitionPeriod":
- if r.TryDecodeAsNil() {
- x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv594 := &x.EvictionPressureTransitionPeriod
- yym595 := z.DecBinary()
- _ = yym595
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv594) {
- } else if !yym595 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv594)
- } else {
- z.DecFallback(yyv594, false)
- }
- }
- case "evictionMaxPodGracePeriod":
- if r.TryDecodeAsNil() {
- x.EvictionMaxPodGracePeriod = 0
- } else {
- x.EvictionMaxPodGracePeriod = int32(r.DecodeInt(32))
- }
- case "evictionMinimumReclaim":
- if r.TryDecodeAsNil() {
- x.EvictionMinimumReclaim = ""
- } else {
- x.EvictionMinimumReclaim = string(r.DecodeString())
- }
- case "podsPerCore":
- if r.TryDecodeAsNil() {
- x.PodsPerCore = 0
- } else {
- x.PodsPerCore = int32(r.DecodeInt(32))
- }
- case "enableControllerAttachDetach":
- if r.TryDecodeAsNil() {
- x.EnableControllerAttachDetach = false
- } else {
- x.EnableControllerAttachDetach = bool(r.DecodeBool())
- }
- case "systemReserved":
- if r.TryDecodeAsNil() {
- x.SystemReserved = nil
- } else {
- yyv600 := &x.SystemReserved
- yym601 := z.DecBinary()
- _ = yym601
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv600) {
- } else {
- h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv600), d)
- }
- }
- case "kubeReserved":
- if r.TryDecodeAsNil() {
- x.KubeReserved = nil
- } else {
- yyv602 := &x.KubeReserved
- yym603 := z.DecBinary()
- _ = yym603
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv602) {
- } else {
- h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv602), d)
- }
- }
- case "protectKernelDefaults":
- if r.TryDecodeAsNil() {
- x.ProtectKernelDefaults = false
- } else {
- x.ProtectKernelDefaults = bool(r.DecodeBool())
- }
- case "makeIPTablesUtilChains":
- if r.TryDecodeAsNil() {
- x.MakeIPTablesUtilChains = false
- } else {
- x.MakeIPTablesUtilChains = bool(r.DecodeBool())
- }
- case "iptablesMasqueradeBit":
- if r.TryDecodeAsNil() {
- x.IPTablesMasqueradeBit = 0
- } else {
- x.IPTablesMasqueradeBit = int32(r.DecodeInt(32))
- }
- case "iptablesDropBit":
- if r.TryDecodeAsNil() {
- x.IPTablesDropBit = 0
- } else {
- x.IPTablesDropBit = int32(r.DecodeInt(32))
- }
- case "experimentalAllowedUnsafeSysctls":
- if r.TryDecodeAsNil() {
- x.AllowedUnsafeSysctls = nil
- } else {
- yyv608 := &x.AllowedUnsafeSysctls
- yym609 := z.DecBinary()
- _ = yym609
- if false {
- } else {
- z.F.DecSliceStringX(yyv608, false, d)
- }
- }
- case "experimentalRuntimeIntegrationType":
- if r.TryDecodeAsNil() {
- x.ExperimentalRuntimeIntegrationType = ""
- } else {
- x.ExperimentalRuntimeIntegrationType = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys484)
- } // end switch yys484
- } // end for yyj484
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj611 int
- var yyb611 bool
- var yyhl611 bool = l >= 0
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PodManifestPath = ""
- } else {
- x.PodManifestPath = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.SyncFrequency = pkg1_unversioned.Duration{}
- } else {
- yyv615 := &x.SyncFrequency
- yym616 := z.DecBinary()
- _ = yym616
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv615) {
- } else if !yym616 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv615)
- } else {
- z.DecFallback(yyv615, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.FileCheckFrequency = pkg1_unversioned.Duration{}
- } else {
- yyv617 := &x.FileCheckFrequency
- yym618 := z.DecBinary()
- _ = yym618
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv617) {
- } else if !yym618 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv617)
- } else {
- z.DecFallback(yyv617, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HTTPCheckFrequency = pkg1_unversioned.Duration{}
- } else {
- yyv619 := &x.HTTPCheckFrequency
- yym620 := z.DecBinary()
- _ = yym620
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv619) {
- } else if !yym620 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv619)
- } else {
- z.DecFallback(yyv619, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ManifestURL = ""
- } else {
- x.ManifestURL = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ManifestURLHeader = ""
- } else {
- x.ManifestURLHeader = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EnableServer = false
- } else {
- x.EnableServer = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Address = ""
- } else {
- x.Address = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Port = 0
- } else {
- x.Port = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ReadOnlyPort = 0
- } else {
- x.ReadOnlyPort = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.TLSCertFile = ""
- } else {
- x.TLSCertFile = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.TLSPrivateKeyFile = ""
- } else {
- x.TLSPrivateKeyFile = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CertDirectory = ""
- } else {
- x.CertDirectory = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HostnameOverride = ""
- } else {
- x.HostnameOverride = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PodInfraContainerImage = ""
- } else {
- x.PodInfraContainerImage = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.DockerEndpoint = ""
- } else {
- x.DockerEndpoint = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RootDirectory = ""
- } else {
- x.RootDirectory = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.SeccompProfileRoot = ""
- } else {
- x.SeccompProfileRoot = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.AllowPrivileged = false
- } else {
- x.AllowPrivileged = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HostNetworkSources = nil
- } else {
- yyv636 := &x.HostNetworkSources
- yym637 := z.DecBinary()
- _ = yym637
- if false {
- } else {
- z.F.DecSliceStringX(yyv636, false, d)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HostPIDSources = nil
- } else {
- yyv638 := &x.HostPIDSources
- yym639 := z.DecBinary()
- _ = yym639
- if false {
- } else {
- z.F.DecSliceStringX(yyv638, false, d)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HostIPCSources = nil
- } else {
- yyv640 := &x.HostIPCSources
- yym641 := z.DecBinary()
- _ = yym641
- if false {
- } else {
- z.F.DecSliceStringX(yyv640, false, d)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RegistryPullQPS = 0
- } else {
- x.RegistryPullQPS = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RegistryBurst = 0
- } else {
- x.RegistryBurst = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EventRecordQPS = 0
- } else {
- x.EventRecordQPS = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EventBurst = 0
- } else {
- x.EventBurst = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EnableDebuggingHandlers = false
- } else {
- x.EnableDebuggingHandlers = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MinimumGCAge = pkg1_unversioned.Duration{}
- } else {
- yyv647 := &x.MinimumGCAge
- yym648 := z.DecBinary()
- _ = yym648
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv647) {
- } else if !yym648 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv647)
- } else {
- z.DecFallback(yyv647, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MaxPerPodContainerCount = 0
- } else {
- x.MaxPerPodContainerCount = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MaxContainerCount = 0
- } else {
- x.MaxContainerCount = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CAdvisorPort = 0
- } else {
- x.CAdvisorPort = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HealthzPort = 0
- } else {
- x.HealthzPort = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HealthzBindAddress = ""
- } else {
- x.HealthzBindAddress = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.OOMScoreAdj = 0
- } else {
- x.OOMScoreAdj = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RegisterNode = false
- } else {
- x.RegisterNode = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ClusterDomain = ""
- } else {
- x.ClusterDomain = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MasterServiceNamespace = ""
- } else {
- x.MasterServiceNamespace = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ClusterDNS = ""
- } else {
- x.ClusterDNS = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{}
- } else {
- yyv659 := &x.StreamingConnectionIdleTimeout
- yym660 := z.DecBinary()
- _ = yym660
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv659) {
- } else if !yym660 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv659)
- } else {
- z.DecFallback(yyv659, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{}
- } else {
- yyv661 := &x.NodeStatusUpdateFrequency
- yym662 := z.DecBinary()
- _ = yym662
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv661) {
- } else if !yym662 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv661)
- } else {
- z.DecFallback(yyv661, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ImageMinimumGCAge = pkg1_unversioned.Duration{}
- } else {
- yyv663 := &x.ImageMinimumGCAge
- yym664 := z.DecBinary()
- _ = yym664
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv663) {
- } else if !yym664 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv663)
- } else {
- z.DecFallback(yyv663, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ImageGCHighThresholdPercent = 0
- } else {
- x.ImageGCHighThresholdPercent = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ImageGCLowThresholdPercent = 0
- } else {
- x.ImageGCLowThresholdPercent = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LowDiskSpaceThresholdMB = 0
- } else {
- x.LowDiskSpaceThresholdMB = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv668 := &x.VolumeStatsAggPeriod
- yym669 := z.DecBinary()
- _ = yym669
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv668) {
- } else if !yym669 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv668)
- } else {
- z.DecFallback(yyv668, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NetworkPluginName = ""
- } else {
- x.NetworkPluginName = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NetworkPluginMTU = 0
- } else {
- x.NetworkPluginMTU = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NetworkPluginDir = ""
- } else {
- x.NetworkPluginDir = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CNIConfDir = ""
- } else {
- x.CNIConfDir = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CNIBinDir = ""
- } else {
- x.CNIBinDir = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.VolumePluginDir = ""
- } else {
- x.VolumePluginDir = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CloudProvider = ""
- } else {
- x.CloudProvider = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CloudConfigFile = ""
- } else {
- x.CloudConfigFile = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.KubeletCgroups = ""
- } else {
- x.KubeletCgroups = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CgroupsPerQOS = false
- } else {
- x.CgroupsPerQOS = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RuntimeCgroups = ""
- } else {
- x.RuntimeCgroups = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.SystemCgroups = ""
- } else {
- x.SystemCgroups = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CgroupRoot = ""
- } else {
- x.CgroupRoot = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ContainerRuntime = ""
- } else {
- x.ContainerRuntime = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RemoteRuntimeEndpoint = ""
- } else {
- x.RemoteRuntimeEndpoint = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RemoteImageEndpoint = ""
- } else {
- x.RemoteImageEndpoint = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RuntimeRequestTimeout = pkg1_unversioned.Duration{}
- } else {
- yyv686 := &x.RuntimeRequestTimeout
- yym687 := z.DecBinary()
- _ = yym687
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv686) {
- } else if !yym687 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv686)
- } else {
- z.DecFallback(yyv686, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RktPath = ""
- } else {
- x.RktPath = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RktAPIEndpoint = ""
- } else {
- x.RktAPIEndpoint = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RktStage1Image = ""
- } else {
- x.RktStage1Image = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LockFilePath = ""
- } else {
- x.LockFilePath = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ExitOnLockContention = false
- } else {
- x.ExitOnLockContention = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConfigureCBR0 = false
- } else {
- x.ConfigureCBR0 = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HairpinMode = ""
- } else {
- x.HairpinMode = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.BabysitDaemons = false
- } else {
- x.BabysitDaemons = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MaxPods = 0
- } else {
- x.MaxPods = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NvidiaGPUs = 0
- } else {
- x.NvidiaGPUs = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.DockerExecHandlerName = ""
- } else {
- x.DockerExecHandlerName = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PodCIDR = ""
- } else {
- x.PodCIDR = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ResolverConfig = ""
- } else {
- x.ResolverConfig = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CPUCFSQuota = false
- } else {
- x.CPUCFSQuota = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Containerized = false
- } else {
- x.Containerized = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MaxOpenFiles = 0
- } else {
- x.MaxOpenFiles = int64(r.DecodeInt(64))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ReconcileCIDR = false
- } else {
- x.ReconcileCIDR = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RegisterSchedulable = false
- } else {
- x.RegisterSchedulable = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ContentType = ""
- } else {
- x.ContentType = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.KubeAPIQPS = 0
- } else {
- x.KubeAPIQPS = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.KubeAPIBurst = 0
- } else {
- x.KubeAPIBurst = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.SerializeImagePulls = false
- } else {
- x.SerializeImagePulls = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ExperimentalFlannelOverlay = false
- } else {
- x.ExperimentalFlannelOverlay = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{}
- } else {
- yyv711 := &x.OutOfDiskTransitionFrequency
- yym712 := z.DecBinary()
- _ = yym712
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv711) {
- } else if !yym712 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv711)
- } else {
- z.DecFallback(yyv711, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NodeIP = ""
- } else {
- x.NodeIP = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NodeLabels = nil
- } else {
- yyv714 := &x.NodeLabels
- yym715 := z.DecBinary()
- _ = yym715
- if false {
- } else {
- z.F.DecMapStringStringX(yyv714, false, d)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NonMasqueradeCIDR = ""
- } else {
- x.NonMasqueradeCIDR = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EnableCustomMetrics = false
- } else {
- x.EnableCustomMetrics = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EvictionHard = ""
- } else {
- x.EvictionHard = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EvictionSoft = ""
- } else {
- x.EvictionSoft = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EvictionSoftGracePeriod = ""
- } else {
- x.EvictionSoftGracePeriod = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv721 := &x.EvictionPressureTransitionPeriod
- yym722 := z.DecBinary()
- _ = yym722
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv721) {
- } else if !yym722 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv721)
- } else {
- z.DecFallback(yyv721, false)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EvictionMaxPodGracePeriod = 0
- } else {
- x.EvictionMaxPodGracePeriod = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EvictionMinimumReclaim = ""
- } else {
- x.EvictionMinimumReclaim = string(r.DecodeString())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PodsPerCore = 0
- } else {
- x.PodsPerCore = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EnableControllerAttachDetach = false
- } else {
- x.EnableControllerAttachDetach = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.SystemReserved = nil
- } else {
- yyv727 := &x.SystemReserved
- yym728 := z.DecBinary()
- _ = yym728
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv727) {
- } else {
- h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv727), d)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.KubeReserved = nil
- } else {
- yyv729 := &x.KubeReserved
- yym730 := z.DecBinary()
- _ = yym730
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv729) {
- } else {
- h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv729), d)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ProtectKernelDefaults = false
- } else {
- x.ProtectKernelDefaults = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MakeIPTablesUtilChains = false
- } else {
- x.MakeIPTablesUtilChains = bool(r.DecodeBool())
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.IPTablesMasqueradeBit = 0
- } else {
- x.IPTablesMasqueradeBit = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.IPTablesDropBit = 0
- } else {
- x.IPTablesDropBit = int32(r.DecodeInt(32))
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.AllowedUnsafeSysctls = nil
- } else {
- yyv735 := &x.AllowedUnsafeSysctls
- yym736 := z.DecBinary()
- _ = yym736
- if false {
- } else {
- z.F.DecSliceStringX(yyv735, false, d)
- }
- }
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ExperimentalRuntimeIntegrationType = ""
- } else {
- x.ExperimentalRuntimeIntegrationType = string(r.DecodeString())
- }
- for {
- yyj611++
- if yyhl611 {
- yyb611 = yyj611 > l
- } else {
- yyb611 = r.CheckBreak()
- }
- if yyb611 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj611-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym738 := z.EncBinary()
- _ = yym738
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep739 := !z.EncBinary()
- yy2arr739 := z.EncBasicHandle().StructToArray
- var yyq739 [14]bool
- _, _, _ = yysep739, yyq739, yy2arr739
- const yyr739 bool = false
- yyq739[0] = x.Kind != ""
- yyq739[1] = x.APIVersion != ""
- var yynn739 int
- if yyr739 || yy2arr739 {
- r.EncodeArrayStart(14)
- } else {
- yynn739 = 12
- for _, b := range yyq739 {
- if b {
- yynn739++
- }
- }
- r.EncodeMapStart(yynn739)
- yynn739 = 0
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq739[0] {
- yym741 := z.EncBinary()
- _ = yym741
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq739[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym742 := z.EncBinary()
- _ = yym742
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq739[1] {
- yym744 := z.EncBinary()
- _ = yym744
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq739[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym745 := z.EncBinary()
- _ = yym745
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym747 := z.EncBinary()
- _ = yym747
- if false {
- } else {
- r.EncodeInt(int64(x.Port))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("port"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym748 := z.EncBinary()
- _ = yym748
- if false {
- } else {
- r.EncodeInt(int64(x.Port))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym750 := z.EncBinary()
- _ = yym750
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Address))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("address"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym751 := z.EncBinary()
- _ = yym751
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Address))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym753 := z.EncBinary()
- _ = yym753
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("algorithmProvider"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym754 := z.EncBinary()
- _ = yym754
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym756 := z.EncBinary()
- _ = yym756
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("policyConfigFile"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym757 := z.EncBinary()
- _ = yym757
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym759 := z.EncBinary()
- _ = yym759
- if false {
- } else {
- r.EncodeBool(bool(x.EnableProfiling))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("enableProfiling"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym760 := z.EncBinary()
- _ = yym760
- if false {
- } else {
- r.EncodeBool(bool(x.EnableProfiling))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym762 := z.EncBinary()
- _ = yym762
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("contentType"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym763 := z.EncBinary()
- _ = yym763
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym765 := z.EncBinary()
- _ = yym765
- if false {
- } else {
- r.EncodeFloat32(float32(x.KubeAPIQPS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym766 := z.EncBinary()
- _ = yym766
- if false {
- } else {
- r.EncodeFloat32(float32(x.KubeAPIQPS))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym768 := z.EncBinary()
- _ = yym768
- if false {
- } else {
- r.EncodeInt(int64(x.KubeAPIBurst))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym769 := z.EncBinary()
- _ = yym769
- if false {
- } else {
- r.EncodeInt(int64(x.KubeAPIBurst))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym771 := z.EncBinary()
- _ = yym771
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("schedulerName"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym772 := z.EncBinary()
- _ = yym772
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym774 := z.EncBinary()
- _ = yym774
- if false {
- } else {
- r.EncodeInt(int64(x.HardPodAffinitySymmetricWeight))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("hardPodAffinitySymmetricWeight"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym775 := z.EncBinary()
- _ = yym775
- if false {
- } else {
- r.EncodeInt(int64(x.HardPodAffinitySymmetricWeight))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym777 := z.EncBinary()
- _ = yym777
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.FailureDomains))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("failureDomains"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym778 := z.EncBinary()
- _ = yym778
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.FailureDomains))
- }
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy780 := &x.LeaderElection
- yy780.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("leaderElection"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy781 := &x.LeaderElection
- yy781.CodecEncodeSelf(e)
- }
- if yyr739 || yy2arr739 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *KubeSchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym782 := z.DecBinary()
- _ = yym782
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct783 := r.ContainerType()
- if yyct783 == codecSelferValueTypeMap1234 {
- yyl783 := r.ReadMapStart()
- if yyl783 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl783, d)
- }
- } else if yyct783 == codecSelferValueTypeArray1234 {
- yyl783 := r.ReadArrayStart()
- if yyl783 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl783, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys784Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys784Slc
- var yyhl784 bool = l >= 0
- for yyj784 := 0; ; yyj784++ {
- if yyhl784 {
- if yyj784 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys784Slc = r.DecodeBytes(yys784Slc, true, true)
- yys784 := string(yys784Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys784 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "port":
- if r.TryDecodeAsNil() {
- x.Port = 0
- } else {
- x.Port = int32(r.DecodeInt(32))
- }
- case "address":
- if r.TryDecodeAsNil() {
- x.Address = ""
- } else {
- x.Address = string(r.DecodeString())
- }
- case "algorithmProvider":
- if r.TryDecodeAsNil() {
- x.AlgorithmProvider = ""
- } else {
- x.AlgorithmProvider = string(r.DecodeString())
- }
- case "policyConfigFile":
- if r.TryDecodeAsNil() {
- x.PolicyConfigFile = ""
- } else {
- x.PolicyConfigFile = string(r.DecodeString())
- }
- case "enableProfiling":
- if r.TryDecodeAsNil() {
- x.EnableProfiling = false
- } else {
- x.EnableProfiling = bool(r.DecodeBool())
- }
- case "contentType":
- if r.TryDecodeAsNil() {
- x.ContentType = ""
- } else {
- x.ContentType = string(r.DecodeString())
- }
- case "kubeAPIQPS":
- if r.TryDecodeAsNil() {
- x.KubeAPIQPS = 0
- } else {
- x.KubeAPIQPS = float32(r.DecodeFloat(true))
- }
- case "kubeAPIBurst":
- if r.TryDecodeAsNil() {
- x.KubeAPIBurst = 0
- } else {
- x.KubeAPIBurst = int32(r.DecodeInt(32))
- }
- case "schedulerName":
- if r.TryDecodeAsNil() {
- x.SchedulerName = ""
- } else {
- x.SchedulerName = string(r.DecodeString())
- }
- case "hardPodAffinitySymmetricWeight":
- if r.TryDecodeAsNil() {
- x.HardPodAffinitySymmetricWeight = 0
- } else {
- x.HardPodAffinitySymmetricWeight = int(r.DecodeInt(codecSelferBitsize1234))
- }
- case "failureDomains":
- if r.TryDecodeAsNil() {
- x.FailureDomains = ""
- } else {
- x.FailureDomains = string(r.DecodeString())
- }
- case "leaderElection":
- if r.TryDecodeAsNil() {
- x.LeaderElection = LeaderElectionConfiguration{}
- } else {
- yyv798 := &x.LeaderElection
- yyv798.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys784)
- } // end switch yys784
- } // end for yyj784
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj799 int
- var yyb799 bool
- var yyhl799 bool = l >= 0
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Port = 0
- } else {
- x.Port = int32(r.DecodeInt(32))
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Address = ""
- } else {
- x.Address = string(r.DecodeString())
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.AlgorithmProvider = ""
- } else {
- x.AlgorithmProvider = string(r.DecodeString())
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PolicyConfigFile = ""
- } else {
- x.PolicyConfigFile = string(r.DecodeString())
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EnableProfiling = false
- } else {
- x.EnableProfiling = bool(r.DecodeBool())
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ContentType = ""
- } else {
- x.ContentType = string(r.DecodeString())
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.KubeAPIQPS = 0
- } else {
- x.KubeAPIQPS = float32(r.DecodeFloat(true))
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.KubeAPIBurst = 0
- } else {
- x.KubeAPIBurst = int32(r.DecodeInt(32))
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.SchedulerName = ""
- } else {
- x.SchedulerName = string(r.DecodeString())
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HardPodAffinitySymmetricWeight = 0
- } else {
- x.HardPodAffinitySymmetricWeight = int(r.DecodeInt(codecSelferBitsize1234))
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.FailureDomains = ""
- } else {
- x.FailureDomains = string(r.DecodeString())
- }
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LeaderElection = LeaderElectionConfiguration{}
- } else {
- yyv813 := &x.LeaderElection
- yyv813.CodecDecodeSelf(d)
- }
- for {
- yyj799++
- if yyhl799 {
- yyb799 = yyj799 > l
- } else {
- yyb799 = r.CheckBreak()
- }
- if yyb799 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj799-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym814 := z.EncBinary()
- _ = yym814
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep815 := !z.EncBinary()
- yy2arr815 := z.EncBasicHandle().StructToArray
- var yyq815 [4]bool
- _, _, _ = yysep815, yyq815, yy2arr815
- const yyr815 bool = false
- var yynn815 int
- if yyr815 || yy2arr815 {
- r.EncodeArrayStart(4)
- } else {
- yynn815 = 4
- for _, b := range yyq815 {
- if b {
- yynn815++
- }
- }
- r.EncodeMapStart(yynn815)
- yynn815 = 0
- }
- if yyr815 || yy2arr815 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym817 := z.EncBinary()
- _ = yym817
- if false {
- } else {
- r.EncodeBool(bool(x.LeaderElect))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("leaderElect"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym818 := z.EncBinary()
- _ = yym818
- if false {
- } else {
- r.EncodeBool(bool(x.LeaderElect))
- }
- }
- if yyr815 || yy2arr815 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy820 := &x.LeaseDuration
- yym821 := z.EncBinary()
- _ = yym821
- if false {
- } else if z.HasExtensions() && z.EncExt(yy820) {
- } else if !yym821 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy820)
- } else {
- z.EncFallback(yy820)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("leaseDuration"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy822 := &x.LeaseDuration
- yym823 := z.EncBinary()
- _ = yym823
- if false {
- } else if z.HasExtensions() && z.EncExt(yy822) {
- } else if !yym823 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy822)
- } else {
- z.EncFallback(yy822)
- }
- }
- if yyr815 || yy2arr815 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy825 := &x.RenewDeadline
- yym826 := z.EncBinary()
- _ = yym826
- if false {
- } else if z.HasExtensions() && z.EncExt(yy825) {
- } else if !yym826 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy825)
- } else {
- z.EncFallback(yy825)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("renewDeadline"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy827 := &x.RenewDeadline
- yym828 := z.EncBinary()
- _ = yym828
- if false {
- } else if z.HasExtensions() && z.EncExt(yy827) {
- } else if !yym828 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy827)
- } else {
- z.EncFallback(yy827)
- }
- }
- if yyr815 || yy2arr815 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy830 := &x.RetryPeriod
- yym831 := z.EncBinary()
- _ = yym831
- if false {
- } else if z.HasExtensions() && z.EncExt(yy830) {
- } else if !yym831 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy830)
- } else {
- z.EncFallback(yy830)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("retryPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy832 := &x.RetryPeriod
- yym833 := z.EncBinary()
- _ = yym833
- if false {
- } else if z.HasExtensions() && z.EncExt(yy832) {
- } else if !yym833 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy832)
- } else {
- z.EncFallback(yy832)
- }
- }
- if yyr815 || yy2arr815 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym834 := z.DecBinary()
- _ = yym834
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct835 := r.ContainerType()
- if yyct835 == codecSelferValueTypeMap1234 {
- yyl835 := r.ReadMapStart()
- if yyl835 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl835, d)
- }
- } else if yyct835 == codecSelferValueTypeArray1234 {
- yyl835 := r.ReadArrayStart()
- if yyl835 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl835, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys836Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys836Slc
- var yyhl836 bool = l >= 0
- for yyj836 := 0; ; yyj836++ {
- if yyhl836 {
- if yyj836 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys836Slc = r.DecodeBytes(yys836Slc, true, true)
- yys836 := string(yys836Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys836 {
- case "leaderElect":
- if r.TryDecodeAsNil() {
- x.LeaderElect = false
- } else {
- x.LeaderElect = bool(r.DecodeBool())
- }
- case "leaseDuration":
- if r.TryDecodeAsNil() {
- x.LeaseDuration = pkg1_unversioned.Duration{}
- } else {
- yyv838 := &x.LeaseDuration
- yym839 := z.DecBinary()
- _ = yym839
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv838) {
- } else if !yym839 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv838)
- } else {
- z.DecFallback(yyv838, false)
- }
- }
- case "renewDeadline":
- if r.TryDecodeAsNil() {
- x.RenewDeadline = pkg1_unversioned.Duration{}
- } else {
- yyv840 := &x.RenewDeadline
- yym841 := z.DecBinary()
- _ = yym841
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv840) {
- } else if !yym841 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv840)
- } else {
- z.DecFallback(yyv840, false)
- }
- }
- case "retryPeriod":
- if r.TryDecodeAsNil() {
- x.RetryPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv842 := &x.RetryPeriod
- yym843 := z.DecBinary()
- _ = yym843
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv842) {
- } else if !yym843 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv842)
- } else {
- z.DecFallback(yyv842, false)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys836)
- } // end switch yys836
- } // end for yyj836
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj844 int
- var yyb844 bool
- var yyhl844 bool = l >= 0
- yyj844++
- if yyhl844 {
- yyb844 = yyj844 > l
- } else {
- yyb844 = r.CheckBreak()
- }
- if yyb844 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LeaderElect = false
- } else {
- x.LeaderElect = bool(r.DecodeBool())
- }
- yyj844++
- if yyhl844 {
- yyb844 = yyj844 > l
- } else {
- yyb844 = r.CheckBreak()
- }
- if yyb844 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LeaseDuration = pkg1_unversioned.Duration{}
- } else {
- yyv846 := &x.LeaseDuration
- yym847 := z.DecBinary()
- _ = yym847
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv846) {
- } else if !yym847 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv846)
- } else {
- z.DecFallback(yyv846, false)
- }
- }
- yyj844++
- if yyhl844 {
- yyb844 = yyj844 > l
- } else {
- yyb844 = r.CheckBreak()
- }
- if yyb844 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RenewDeadline = pkg1_unversioned.Duration{}
- } else {
- yyv848 := &x.RenewDeadline
- yym849 := z.DecBinary()
- _ = yym849
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv848) {
- } else if !yym849 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv848)
- } else {
- z.DecFallback(yyv848, false)
- }
- }
- yyj844++
- if yyhl844 {
- yyb844 = yyj844 > l
- } else {
- yyb844 = r.CheckBreak()
- }
- if yyb844 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RetryPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv850 := &x.RetryPeriod
- yym851 := z.DecBinary()
- _ = yym851
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv850) {
- } else if !yym851 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv850)
- } else {
- z.DecFallback(yyv850, false)
- }
- }
- for {
- yyj844++
- if yyhl844 {
- yyb844 = yyj844 > l
- } else {
- yyb844 = r.CheckBreak()
- }
- if yyb844 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj844-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym852 := z.EncBinary()
- _ = yym852
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep853 := !z.EncBinary()
- yy2arr853 := z.EncBasicHandle().StructToArray
- var yyq853 [60]bool
- _, _, _ = yysep853, yyq853, yy2arr853
- const yyr853 bool = false
- yyq853[0] = x.Kind != ""
- yyq853[1] = x.APIVersion != ""
- var yynn853 int
- if yyr853 || yy2arr853 {
- r.EncodeArrayStart(60)
- } else {
- yynn853 = 58
- for _, b := range yyq853 {
- if b {
- yynn853++
- }
- }
- r.EncodeMapStart(yynn853)
- yynn853 = 0
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq853[0] {
- yym855 := z.EncBinary()
- _ = yym855
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq853[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym856 := z.EncBinary()
- _ = yym856
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq853[1] {
- yym858 := z.EncBinary()
- _ = yym858
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq853[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym859 := z.EncBinary()
- _ = yym859
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym861 := z.EncBinary()
- _ = yym861
- if false {
- } else {
- r.EncodeInt(int64(x.Port))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("port"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym862 := z.EncBinary()
- _ = yym862
- if false {
- } else {
- r.EncodeInt(int64(x.Port))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym864 := z.EncBinary()
- _ = yym864
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Address))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("address"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym865 := z.EncBinary()
- _ = yym865
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Address))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym867 := z.EncBinary()
- _ = yym867
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("cloudProvider"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym868 := z.EncBinary()
- _ = yym868
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym870 := z.EncBinary()
- _ = yym870
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("cloudConfigFile"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym871 := z.EncBinary()
- _ = yym871
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym873 := z.EncBinary()
- _ = yym873
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentEndpointSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentEndpointSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym874 := z.EncBinary()
- _ = yym874
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentEndpointSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym876 := z.EncBinary()
- _ = yym876
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentRSSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentRSSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym877 := z.EncBinary()
- _ = yym877
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentRSSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym879 := z.EncBinary()
- _ = yym879
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentRCSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentRCSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym880 := z.EncBinary()
- _ = yym880
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentRCSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym882 := z.EncBinary()
- _ = yym882
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentServiceSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentServiceSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym883 := z.EncBinary()
- _ = yym883
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentServiceSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym885 := z.EncBinary()
- _ = yym885
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentResourceQuotaSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentResourceQuotaSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym886 := z.EncBinary()
- _ = yym886
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentResourceQuotaSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym888 := z.EncBinary()
- _ = yym888
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentDeploymentSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentDeploymentSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym889 := z.EncBinary()
- _ = yym889
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentDeploymentSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym891 := z.EncBinary()
- _ = yym891
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentDaemonSetSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentDaemonSetSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym892 := z.EncBinary()
- _ = yym892
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentDaemonSetSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym894 := z.EncBinary()
- _ = yym894
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentJobSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentJobSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym895 := z.EncBinary()
- _ = yym895
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentJobSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym897 := z.EncBinary()
- _ = yym897
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentNamespaceSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentNamespaceSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym898 := z.EncBinary()
- _ = yym898
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentNamespaceSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym900 := z.EncBinary()
- _ = yym900
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentSATokenSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentSATokenSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym901 := z.EncBinary()
- _ = yym901
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentSATokenSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym903 := z.EncBinary()
- _ = yym903
- if false {
- } else {
- r.EncodeInt(int64(x.LookupCacheSizeForRC))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRC"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym904 := z.EncBinary()
- _ = yym904
- if false {
- } else {
- r.EncodeInt(int64(x.LookupCacheSizeForRC))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym906 := z.EncBinary()
- _ = yym906
- if false {
- } else {
- r.EncodeInt(int64(x.LookupCacheSizeForRS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym907 := z.EncBinary()
- _ = yym907
- if false {
- } else {
- r.EncodeInt(int64(x.LookupCacheSizeForRS))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym909 := z.EncBinary()
- _ = yym909
- if false {
- } else {
- r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForDaemonSet"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym910 := z.EncBinary()
- _ = yym910
- if false {
- } else {
- r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy912 := &x.ServiceSyncPeriod
- yym913 := z.EncBinary()
- _ = yym913
- if false {
- } else if z.HasExtensions() && z.EncExt(yy912) {
- } else if !yym913 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy912)
- } else {
- z.EncFallback(yy912)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("serviceSyncPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy914 := &x.ServiceSyncPeriod
- yym915 := z.EncBinary()
- _ = yym915
- if false {
- } else if z.HasExtensions() && z.EncExt(yy914) {
- } else if !yym915 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy914)
- } else {
- z.EncFallback(yy914)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy917 := &x.NodeSyncPeriod
- yym918 := z.EncBinary()
- _ = yym918
- if false {
- } else if z.HasExtensions() && z.EncExt(yy917) {
- } else if !yym918 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy917)
- } else {
- z.EncFallback(yy917)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nodeSyncPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy919 := &x.NodeSyncPeriod
- yym920 := z.EncBinary()
- _ = yym920
- if false {
- } else if z.HasExtensions() && z.EncExt(yy919) {
- } else if !yym920 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy919)
- } else {
- z.EncFallback(yy919)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy922 := &x.RouteReconciliationPeriod
- yym923 := z.EncBinary()
- _ = yym923
- if false {
- } else if z.HasExtensions() && z.EncExt(yy922) {
- } else if !yym923 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy922)
- } else {
- z.EncFallback(yy922)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("routeReconciliationPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy924 := &x.RouteReconciliationPeriod
- yym925 := z.EncBinary()
- _ = yym925
- if false {
- } else if z.HasExtensions() && z.EncExt(yy924) {
- } else if !yym925 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy924)
- } else {
- z.EncFallback(yy924)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy927 := &x.ResourceQuotaSyncPeriod
- yym928 := z.EncBinary()
- _ = yym928
- if false {
- } else if z.HasExtensions() && z.EncExt(yy927) {
- } else if !yym928 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy927)
- } else {
- z.EncFallback(yy927)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("resourceQuotaSyncPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy929 := &x.ResourceQuotaSyncPeriod
- yym930 := z.EncBinary()
- _ = yym930
- if false {
- } else if z.HasExtensions() && z.EncExt(yy929) {
- } else if !yym930 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy929)
- } else {
- z.EncFallback(yy929)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy932 := &x.NamespaceSyncPeriod
- yym933 := z.EncBinary()
- _ = yym933
- if false {
- } else if z.HasExtensions() && z.EncExt(yy932) {
- } else if !yym933 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy932)
- } else {
- z.EncFallback(yy932)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("namespaceSyncPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy934 := &x.NamespaceSyncPeriod
- yym935 := z.EncBinary()
- _ = yym935
- if false {
- } else if z.HasExtensions() && z.EncExt(yy934) {
- } else if !yym935 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy934)
- } else {
- z.EncFallback(yy934)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy937 := &x.PVClaimBinderSyncPeriod
- yym938 := z.EncBinary()
- _ = yym938
- if false {
- } else if z.HasExtensions() && z.EncExt(yy937) {
- } else if !yym938 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy937)
- } else {
- z.EncFallback(yy937)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("pvClaimBinderSyncPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy939 := &x.PVClaimBinderSyncPeriod
- yym940 := z.EncBinary()
- _ = yym940
- if false {
- } else if z.HasExtensions() && z.EncExt(yy939) {
- } else if !yym940 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy939)
- } else {
- z.EncFallback(yy939)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy942 := &x.MinResyncPeriod
- yym943 := z.EncBinary()
- _ = yym943
- if false {
- } else if z.HasExtensions() && z.EncExt(yy942) {
- } else if !yym943 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy942)
- } else {
- z.EncFallback(yy942)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("minResyncPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy944 := &x.MinResyncPeriod
- yym945 := z.EncBinary()
- _ = yym945
- if false {
- } else if z.HasExtensions() && z.EncExt(yy944) {
- } else if !yym945 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy944)
- } else {
- z.EncFallback(yy944)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym947 := z.EncBinary()
- _ = yym947
- if false {
- } else {
- r.EncodeInt(int64(x.TerminatedPodGCThreshold))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("terminatedPodGCThreshold"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym948 := z.EncBinary()
- _ = yym948
- if false {
- } else {
- r.EncodeInt(int64(x.TerminatedPodGCThreshold))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy950 := &x.HorizontalPodAutoscalerSyncPeriod
- yym951 := z.EncBinary()
- _ = yym951
- if false {
- } else if z.HasExtensions() && z.EncExt(yy950) {
- } else if !yym951 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy950)
- } else {
- z.EncFallback(yy950)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("horizontalPodAutoscalerSyncPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy952 := &x.HorizontalPodAutoscalerSyncPeriod
- yym953 := z.EncBinary()
- _ = yym953
- if false {
- } else if z.HasExtensions() && z.EncExt(yy952) {
- } else if !yym953 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy952)
- } else {
- z.EncFallback(yy952)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy955 := &x.DeploymentControllerSyncPeriod
- yym956 := z.EncBinary()
- _ = yym956
- if false {
- } else if z.HasExtensions() && z.EncExt(yy955) {
- } else if !yym956 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy955)
- } else {
- z.EncFallback(yy955)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("deploymentControllerSyncPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy957 := &x.DeploymentControllerSyncPeriod
- yym958 := z.EncBinary()
- _ = yym958
- if false {
- } else if z.HasExtensions() && z.EncExt(yy957) {
- } else if !yym958 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy957)
- } else {
- z.EncFallback(yy957)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy960 := &x.PodEvictionTimeout
- yym961 := z.EncBinary()
- _ = yym961
- if false {
- } else if z.HasExtensions() && z.EncExt(yy960) {
- } else if !yym961 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy960)
- } else {
- z.EncFallback(yy960)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("podEvictionTimeout"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy962 := &x.PodEvictionTimeout
- yym963 := z.EncBinary()
- _ = yym963
- if false {
- } else if z.HasExtensions() && z.EncExt(yy962) {
- } else if !yym963 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy962)
- } else {
- z.EncFallback(yy962)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym965 := z.EncBinary()
- _ = yym965
- if false {
- } else {
- r.EncodeFloat32(float32(x.DeletingPodsQps))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("deletingPodsQps"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym966 := z.EncBinary()
- _ = yym966
- if false {
- } else {
- r.EncodeFloat32(float32(x.DeletingPodsQps))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym968 := z.EncBinary()
- _ = yym968
- if false {
- } else {
- r.EncodeInt(int64(x.DeletingPodsBurst))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("deletingPodsBurst"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym969 := z.EncBinary()
- _ = yym969
- if false {
- } else {
- r.EncodeInt(int64(x.DeletingPodsBurst))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy971 := &x.NodeMonitorGracePeriod
- yym972 := z.EncBinary()
- _ = yym972
- if false {
- } else if z.HasExtensions() && z.EncExt(yy971) {
- } else if !yym972 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy971)
- } else {
- z.EncFallback(yy971)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorGracePeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy973 := &x.NodeMonitorGracePeriod
- yym974 := z.EncBinary()
- _ = yym974
- if false {
- } else if z.HasExtensions() && z.EncExt(yy973) {
- } else if !yym974 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy973)
- } else {
- z.EncFallback(yy973)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym976 := z.EncBinary()
- _ = yym976
- if false {
- } else {
- r.EncodeInt(int64(x.RegisterRetryCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("registerRetryCount"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym977 := z.EncBinary()
- _ = yym977
- if false {
- } else {
- r.EncodeInt(int64(x.RegisterRetryCount))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy979 := &x.NodeStartupGracePeriod
- yym980 := z.EncBinary()
- _ = yym980
- if false {
- } else if z.HasExtensions() && z.EncExt(yy979) {
- } else if !yym980 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy979)
- } else {
- z.EncFallback(yy979)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nodeStartupGracePeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy981 := &x.NodeStartupGracePeriod
- yym982 := z.EncBinary()
- _ = yym982
- if false {
- } else if z.HasExtensions() && z.EncExt(yy981) {
- } else if !yym982 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy981)
- } else {
- z.EncFallback(yy981)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy984 := &x.NodeMonitorPeriod
- yym985 := z.EncBinary()
- _ = yym985
- if false {
- } else if z.HasExtensions() && z.EncExt(yy984) {
- } else if !yym985 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy984)
- } else {
- z.EncFallback(yy984)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorPeriod"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy986 := &x.NodeMonitorPeriod
- yym987 := z.EncBinary()
- _ = yym987
- if false {
- } else if z.HasExtensions() && z.EncExt(yy986) {
- } else if !yym987 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy986)
- } else {
- z.EncFallback(yy986)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym989 := z.EncBinary()
- _ = yym989
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("serviceAccountKeyFile"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym990 := z.EncBinary()
- _ = yym990
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym992 := z.EncBinary()
- _ = yym992
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningCertFile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clusterSigningCertFile"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym993 := z.EncBinary()
- _ = yym993
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningCertFile))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym995 := z.EncBinary()
- _ = yym995
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningKeyFile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clusterSigningKeyFile"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym996 := z.EncBinary()
- _ = yym996
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningKeyFile))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym998 := z.EncBinary()
- _ = yym998
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ApproveAllKubeletCSRsForGroup))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("approveAllKubeletCSRsForGroup"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym999 := z.EncBinary()
- _ = yym999
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ApproveAllKubeletCSRsForGroup))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1001 := z.EncBinary()
- _ = yym1001
- if false {
- } else {
- r.EncodeBool(bool(x.EnableProfiling))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("enableProfiling"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1002 := z.EncBinary()
- _ = yym1002
- if false {
- } else {
- r.EncodeBool(bool(x.EnableProfiling))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1004 := z.EncBinary()
- _ = yym1004
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clusterName"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1005 := z.EncBinary()
- _ = yym1005
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1007 := z.EncBinary()
- _ = yym1007
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clusterCIDR"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1008 := z.EncBinary()
- _ = yym1008
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1010 := z.EncBinary()
- _ = yym1010
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("serviceCIDR"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1011 := z.EncBinary()
- _ = yym1011
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1013 := z.EncBinary()
- _ = yym1013
- if false {
- } else {
- r.EncodeInt(int64(x.NodeCIDRMaskSize))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nodeCIDRMaskSize"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1014 := z.EncBinary()
- _ = yym1014
- if false {
- } else {
- r.EncodeInt(int64(x.NodeCIDRMaskSize))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1016 := z.EncBinary()
- _ = yym1016
- if false {
- } else {
- r.EncodeBool(bool(x.AllocateNodeCIDRs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("allocateNodeCIDRs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1017 := z.EncBinary()
- _ = yym1017
- if false {
- } else {
- r.EncodeBool(bool(x.AllocateNodeCIDRs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1019 := z.EncBinary()
- _ = yym1019
- if false {
- } else {
- r.EncodeBool(bool(x.ConfigureCloudRoutes))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("configureCloudRoutes"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1020 := z.EncBinary()
- _ = yym1020
- if false {
- } else {
- r.EncodeBool(bool(x.ConfigureCloudRoutes))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1022 := z.EncBinary()
- _ = yym1022
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("rootCAFile"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1023 := z.EncBinary()
- _ = yym1023
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1025 := z.EncBinary()
- _ = yym1025
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("contentType"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1026 := z.EncBinary()
- _ = yym1026
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ContentType))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1028 := z.EncBinary()
- _ = yym1028
- if false {
- } else {
- r.EncodeFloat32(float32(x.KubeAPIQPS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1029 := z.EncBinary()
- _ = yym1029
- if false {
- } else {
- r.EncodeFloat32(float32(x.KubeAPIQPS))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1031 := z.EncBinary()
- _ = yym1031
- if false {
- } else {
- r.EncodeInt(int64(x.KubeAPIBurst))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1032 := z.EncBinary()
- _ = yym1032
- if false {
- } else {
- r.EncodeInt(int64(x.KubeAPIBurst))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy1034 := &x.LeaderElection
- yy1034.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("leaderElection"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy1035 := &x.LeaderElection
- yy1035.CodecEncodeSelf(e)
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy1037 := &x.VolumeConfiguration
- yy1037.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("volumeConfiguration"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy1038 := &x.VolumeConfiguration
- yy1038.CodecEncodeSelf(e)
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy1040 := &x.ControllerStartInterval
- yym1041 := z.EncBinary()
- _ = yym1041
- if false {
- } else if z.HasExtensions() && z.EncExt(yy1040) {
- } else if !yym1041 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy1040)
- } else {
- z.EncFallback(yy1040)
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("controllerStartInterval"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy1042 := &x.ControllerStartInterval
- yym1043 := z.EncBinary()
- _ = yym1043
- if false {
- } else if z.HasExtensions() && z.EncExt(yy1042) {
- } else if !yym1043 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy1042)
- } else {
- z.EncFallback(yy1042)
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1045 := z.EncBinary()
- _ = yym1045
- if false {
- } else {
- r.EncodeBool(bool(x.EnableGarbageCollector))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("enableGarbageCollector"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1046 := z.EncBinary()
- _ = yym1046
- if false {
- } else {
- r.EncodeBool(bool(x.EnableGarbageCollector))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1048 := z.EncBinary()
- _ = yym1048
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentGCSyncs))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("concurrentGCSyncs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1049 := z.EncBinary()
- _ = yym1049
- if false {
- } else {
- r.EncodeInt(int64(x.ConcurrentGCSyncs))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1051 := z.EncBinary()
- _ = yym1051
- if false {
- } else {
- r.EncodeFloat32(float32(x.NodeEvictionRate))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("nodeEvictionRate"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1052 := z.EncBinary()
- _ = yym1052
- if false {
- } else {
- r.EncodeFloat32(float32(x.NodeEvictionRate))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1054 := z.EncBinary()
- _ = yym1054
- if false {
- } else {
- r.EncodeFloat32(float32(x.SecondaryNodeEvictionRate))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("secondaryNodeEvictionRate"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1055 := z.EncBinary()
- _ = yym1055
- if false {
- } else {
- r.EncodeFloat32(float32(x.SecondaryNodeEvictionRate))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1057 := z.EncBinary()
- _ = yym1057
- if false {
- } else {
- r.EncodeInt(int64(x.LargeClusterSizeThreshold))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("largeClusterSizeThreshold"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1058 := z.EncBinary()
- _ = yym1058
- if false {
- } else {
- r.EncodeInt(int64(x.LargeClusterSizeThreshold))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1060 := z.EncBinary()
- _ = yym1060
- if false {
- } else {
- r.EncodeFloat32(float32(x.UnhealthyZoneThreshold))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("unhealthyZoneThreshold"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1061 := z.EncBinary()
- _ = yym1061
- if false {
- } else {
- r.EncodeFloat32(float32(x.UnhealthyZoneThreshold))
- }
- }
- if yyr853 || yy2arr853 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *KubeControllerManagerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1062 := z.DecBinary()
- _ = yym1062
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct1063 := r.ContainerType()
- if yyct1063 == codecSelferValueTypeMap1234 {
- yyl1063 := r.ReadMapStart()
- if yyl1063 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl1063, d)
- }
- } else if yyct1063 == codecSelferValueTypeArray1234 {
- yyl1063 := r.ReadArrayStart()
- if yyl1063 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl1063, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys1064Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys1064Slc
- var yyhl1064 bool = l >= 0
- for yyj1064 := 0; ; yyj1064++ {
- if yyhl1064 {
- if yyj1064 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys1064Slc = r.DecodeBytes(yys1064Slc, true, true)
- yys1064 := string(yys1064Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys1064 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "port":
- if r.TryDecodeAsNil() {
- x.Port = 0
- } else {
- x.Port = int32(r.DecodeInt(32))
- }
- case "address":
- if r.TryDecodeAsNil() {
- x.Address = ""
- } else {
- x.Address = string(r.DecodeString())
- }
- case "cloudProvider":
- if r.TryDecodeAsNil() {
- x.CloudProvider = ""
- } else {
- x.CloudProvider = string(r.DecodeString())
- }
- case "cloudConfigFile":
- if r.TryDecodeAsNil() {
- x.CloudConfigFile = ""
- } else {
- x.CloudConfigFile = string(r.DecodeString())
- }
- case "concurrentEndpointSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentEndpointSyncs = 0
- } else {
- x.ConcurrentEndpointSyncs = int32(r.DecodeInt(32))
- }
- case "concurrentRSSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentRSSyncs = 0
- } else {
- x.ConcurrentRSSyncs = int32(r.DecodeInt(32))
- }
- case "concurrentRCSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentRCSyncs = 0
- } else {
- x.ConcurrentRCSyncs = int32(r.DecodeInt(32))
- }
- case "concurrentServiceSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentServiceSyncs = 0
- } else {
- x.ConcurrentServiceSyncs = int32(r.DecodeInt(32))
- }
- case "concurrentResourceQuotaSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentResourceQuotaSyncs = 0
- } else {
- x.ConcurrentResourceQuotaSyncs = int32(r.DecodeInt(32))
- }
- case "concurrentDeploymentSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentDeploymentSyncs = 0
- } else {
- x.ConcurrentDeploymentSyncs = int32(r.DecodeInt(32))
- }
- case "concurrentDaemonSetSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentDaemonSetSyncs = 0
- } else {
- x.ConcurrentDaemonSetSyncs = int32(r.DecodeInt(32))
- }
- case "concurrentJobSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentJobSyncs = 0
- } else {
- x.ConcurrentJobSyncs = int32(r.DecodeInt(32))
- }
- case "concurrentNamespaceSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentNamespaceSyncs = 0
- } else {
- x.ConcurrentNamespaceSyncs = int32(r.DecodeInt(32))
- }
- case "concurrentSATokenSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentSATokenSyncs = 0
- } else {
- x.ConcurrentSATokenSyncs = int32(r.DecodeInt(32))
- }
- case "lookupCacheSizeForRC":
- if r.TryDecodeAsNil() {
- x.LookupCacheSizeForRC = 0
- } else {
- x.LookupCacheSizeForRC = int32(r.DecodeInt(32))
- }
- case "lookupCacheSizeForRS":
- if r.TryDecodeAsNil() {
- x.LookupCacheSizeForRS = 0
- } else {
- x.LookupCacheSizeForRS = int32(r.DecodeInt(32))
- }
- case "lookupCacheSizeForDaemonSet":
- if r.TryDecodeAsNil() {
- x.LookupCacheSizeForDaemonSet = 0
- } else {
- x.LookupCacheSizeForDaemonSet = int32(r.DecodeInt(32))
- }
- case "serviceSyncPeriod":
- if r.TryDecodeAsNil() {
- x.ServiceSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1084 := &x.ServiceSyncPeriod
- yym1085 := z.DecBinary()
- _ = yym1085
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1084) {
- } else if !yym1085 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1084)
- } else {
- z.DecFallback(yyv1084, false)
- }
- }
- case "nodeSyncPeriod":
- if r.TryDecodeAsNil() {
- x.NodeSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1086 := &x.NodeSyncPeriod
- yym1087 := z.DecBinary()
- _ = yym1087
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1086) {
- } else if !yym1087 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1086)
- } else {
- z.DecFallback(yyv1086, false)
- }
- }
- case "routeReconciliationPeriod":
- if r.TryDecodeAsNil() {
- x.RouteReconciliationPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1088 := &x.RouteReconciliationPeriod
- yym1089 := z.DecBinary()
- _ = yym1089
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1088) {
- } else if !yym1089 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1088)
- } else {
- z.DecFallback(yyv1088, false)
- }
- }
- case "resourceQuotaSyncPeriod":
- if r.TryDecodeAsNil() {
- x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1090 := &x.ResourceQuotaSyncPeriod
- yym1091 := z.DecBinary()
- _ = yym1091
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1090) {
- } else if !yym1091 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1090)
- } else {
- z.DecFallback(yyv1090, false)
- }
- }
- case "namespaceSyncPeriod":
- if r.TryDecodeAsNil() {
- x.NamespaceSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1092 := &x.NamespaceSyncPeriod
- yym1093 := z.DecBinary()
- _ = yym1093
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1092) {
- } else if !yym1093 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1092)
- } else {
- z.DecFallback(yyv1092, false)
- }
- }
- case "pvClaimBinderSyncPeriod":
- if r.TryDecodeAsNil() {
- x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1094 := &x.PVClaimBinderSyncPeriod
- yym1095 := z.DecBinary()
- _ = yym1095
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1094) {
- } else if !yym1095 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1094)
- } else {
- z.DecFallback(yyv1094, false)
- }
- }
- case "minResyncPeriod":
- if r.TryDecodeAsNil() {
- x.MinResyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1096 := &x.MinResyncPeriod
- yym1097 := z.DecBinary()
- _ = yym1097
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1096) {
- } else if !yym1097 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1096)
- } else {
- z.DecFallback(yyv1096, false)
- }
- }
- case "terminatedPodGCThreshold":
- if r.TryDecodeAsNil() {
- x.TerminatedPodGCThreshold = 0
- } else {
- x.TerminatedPodGCThreshold = int32(r.DecodeInt(32))
- }
- case "horizontalPodAutoscalerSyncPeriod":
- if r.TryDecodeAsNil() {
- x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1099 := &x.HorizontalPodAutoscalerSyncPeriod
- yym1100 := z.DecBinary()
- _ = yym1100
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1099) {
- } else if !yym1100 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1099)
- } else {
- z.DecFallback(yyv1099, false)
- }
- }
- case "deploymentControllerSyncPeriod":
- if r.TryDecodeAsNil() {
- x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1101 := &x.DeploymentControllerSyncPeriod
- yym1102 := z.DecBinary()
- _ = yym1102
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1101) {
- } else if !yym1102 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1101)
- } else {
- z.DecFallback(yyv1101, false)
- }
- }
- case "podEvictionTimeout":
- if r.TryDecodeAsNil() {
- x.PodEvictionTimeout = pkg1_unversioned.Duration{}
- } else {
- yyv1103 := &x.PodEvictionTimeout
- yym1104 := z.DecBinary()
- _ = yym1104
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1103) {
- } else if !yym1104 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1103)
- } else {
- z.DecFallback(yyv1103, false)
- }
- }
- case "deletingPodsQps":
- if r.TryDecodeAsNil() {
- x.DeletingPodsQps = 0
- } else {
- x.DeletingPodsQps = float32(r.DecodeFloat(true))
- }
- case "deletingPodsBurst":
- if r.TryDecodeAsNil() {
- x.DeletingPodsBurst = 0
- } else {
- x.DeletingPodsBurst = int32(r.DecodeInt(32))
- }
- case "nodeMonitorGracePeriod":
- if r.TryDecodeAsNil() {
- x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1107 := &x.NodeMonitorGracePeriod
- yym1108 := z.DecBinary()
- _ = yym1108
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1107) {
- } else if !yym1108 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1107)
- } else {
- z.DecFallback(yyv1107, false)
- }
- }
- case "registerRetryCount":
- if r.TryDecodeAsNil() {
- x.RegisterRetryCount = 0
- } else {
- x.RegisterRetryCount = int32(r.DecodeInt(32))
- }
- case "nodeStartupGracePeriod":
- if r.TryDecodeAsNil() {
- x.NodeStartupGracePeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1110 := &x.NodeStartupGracePeriod
- yym1111 := z.DecBinary()
- _ = yym1111
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1110) {
- } else if !yym1111 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1110)
- } else {
- z.DecFallback(yyv1110, false)
- }
- }
- case "nodeMonitorPeriod":
- if r.TryDecodeAsNil() {
- x.NodeMonitorPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1112 := &x.NodeMonitorPeriod
- yym1113 := z.DecBinary()
- _ = yym1113
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1112) {
- } else if !yym1113 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1112)
- } else {
- z.DecFallback(yyv1112, false)
- }
- }
- case "serviceAccountKeyFile":
- if r.TryDecodeAsNil() {
- x.ServiceAccountKeyFile = ""
- } else {
- x.ServiceAccountKeyFile = string(r.DecodeString())
- }
- case "clusterSigningCertFile":
- if r.TryDecodeAsNil() {
- x.ClusterSigningCertFile = ""
- } else {
- x.ClusterSigningCertFile = string(r.DecodeString())
- }
- case "clusterSigningKeyFile":
- if r.TryDecodeAsNil() {
- x.ClusterSigningKeyFile = ""
- } else {
- x.ClusterSigningKeyFile = string(r.DecodeString())
- }
- case "approveAllKubeletCSRsForGroup":
- if r.TryDecodeAsNil() {
- x.ApproveAllKubeletCSRsForGroup = ""
- } else {
- x.ApproveAllKubeletCSRsForGroup = string(r.DecodeString())
- }
- case "enableProfiling":
- if r.TryDecodeAsNil() {
- x.EnableProfiling = false
- } else {
- x.EnableProfiling = bool(r.DecodeBool())
- }
- case "clusterName":
- if r.TryDecodeAsNil() {
- x.ClusterName = ""
- } else {
- x.ClusterName = string(r.DecodeString())
- }
- case "clusterCIDR":
- if r.TryDecodeAsNil() {
- x.ClusterCIDR = ""
- } else {
- x.ClusterCIDR = string(r.DecodeString())
- }
- case "serviceCIDR":
- if r.TryDecodeAsNil() {
- x.ServiceCIDR = ""
- } else {
- x.ServiceCIDR = string(r.DecodeString())
- }
- case "nodeCIDRMaskSize":
- if r.TryDecodeAsNil() {
- x.NodeCIDRMaskSize = 0
- } else {
- x.NodeCIDRMaskSize = int32(r.DecodeInt(32))
- }
- case "allocateNodeCIDRs":
- if r.TryDecodeAsNil() {
- x.AllocateNodeCIDRs = false
- } else {
- x.AllocateNodeCIDRs = bool(r.DecodeBool())
- }
- case "configureCloudRoutes":
- if r.TryDecodeAsNil() {
- x.ConfigureCloudRoutes = false
- } else {
- x.ConfigureCloudRoutes = bool(r.DecodeBool())
- }
- case "rootCAFile":
- if r.TryDecodeAsNil() {
- x.RootCAFile = ""
- } else {
- x.RootCAFile = string(r.DecodeString())
- }
- case "contentType":
- if r.TryDecodeAsNil() {
- x.ContentType = ""
- } else {
- x.ContentType = string(r.DecodeString())
- }
- case "kubeAPIQPS":
- if r.TryDecodeAsNil() {
- x.KubeAPIQPS = 0
- } else {
- x.KubeAPIQPS = float32(r.DecodeFloat(true))
- }
- case "kubeAPIBurst":
- if r.TryDecodeAsNil() {
- x.KubeAPIBurst = 0
- } else {
- x.KubeAPIBurst = int32(r.DecodeInt(32))
- }
- case "leaderElection":
- if r.TryDecodeAsNil() {
- x.LeaderElection = LeaderElectionConfiguration{}
- } else {
- yyv1129 := &x.LeaderElection
- yyv1129.CodecDecodeSelf(d)
- }
- case "volumeConfiguration":
- if r.TryDecodeAsNil() {
- x.VolumeConfiguration = VolumeConfiguration{}
- } else {
- yyv1130 := &x.VolumeConfiguration
- yyv1130.CodecDecodeSelf(d)
- }
- case "controllerStartInterval":
- if r.TryDecodeAsNil() {
- x.ControllerStartInterval = pkg1_unversioned.Duration{}
- } else {
- yyv1131 := &x.ControllerStartInterval
- yym1132 := z.DecBinary()
- _ = yym1132
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1131) {
- } else if !yym1132 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1131)
- } else {
- z.DecFallback(yyv1131, false)
- }
- }
- case "enableGarbageCollector":
- if r.TryDecodeAsNil() {
- x.EnableGarbageCollector = false
- } else {
- x.EnableGarbageCollector = bool(r.DecodeBool())
- }
- case "concurrentGCSyncs":
- if r.TryDecodeAsNil() {
- x.ConcurrentGCSyncs = 0
- } else {
- x.ConcurrentGCSyncs = int32(r.DecodeInt(32))
- }
- case "nodeEvictionRate":
- if r.TryDecodeAsNil() {
- x.NodeEvictionRate = 0
- } else {
- x.NodeEvictionRate = float32(r.DecodeFloat(true))
- }
- case "secondaryNodeEvictionRate":
- if r.TryDecodeAsNil() {
- x.SecondaryNodeEvictionRate = 0
- } else {
- x.SecondaryNodeEvictionRate = float32(r.DecodeFloat(true))
- }
- case "largeClusterSizeThreshold":
- if r.TryDecodeAsNil() {
- x.LargeClusterSizeThreshold = 0
- } else {
- x.LargeClusterSizeThreshold = int32(r.DecodeInt(32))
- }
- case "unhealthyZoneThreshold":
- if r.TryDecodeAsNil() {
- x.UnhealthyZoneThreshold = 0
- } else {
- x.UnhealthyZoneThreshold = float32(r.DecodeFloat(true))
- }
- default:
- z.DecStructFieldNotFound(-1, yys1064)
- } // end switch yys1064
- } // end for yyj1064
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj1139 int
- var yyb1139 bool
- var yyhl1139 bool = l >= 0
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Port = 0
- } else {
- x.Port = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Address = ""
- } else {
- x.Address = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CloudProvider = ""
- } else {
- x.CloudProvider = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CloudConfigFile = ""
- } else {
- x.CloudConfigFile = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentEndpointSyncs = 0
- } else {
- x.ConcurrentEndpointSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentRSSyncs = 0
- } else {
- x.ConcurrentRSSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentRCSyncs = 0
- } else {
- x.ConcurrentRCSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentServiceSyncs = 0
- } else {
- x.ConcurrentServiceSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentResourceQuotaSyncs = 0
- } else {
- x.ConcurrentResourceQuotaSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentDeploymentSyncs = 0
- } else {
- x.ConcurrentDeploymentSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentDaemonSetSyncs = 0
- } else {
- x.ConcurrentDaemonSetSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentJobSyncs = 0
- } else {
- x.ConcurrentJobSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentNamespaceSyncs = 0
- } else {
- x.ConcurrentNamespaceSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentSATokenSyncs = 0
- } else {
- x.ConcurrentSATokenSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LookupCacheSizeForRC = 0
- } else {
- x.LookupCacheSizeForRC = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LookupCacheSizeForRS = 0
- } else {
- x.LookupCacheSizeForRS = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LookupCacheSizeForDaemonSet = 0
- } else {
- x.LookupCacheSizeForDaemonSet = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ServiceSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1159 := &x.ServiceSyncPeriod
- yym1160 := z.DecBinary()
- _ = yym1160
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1159) {
- } else if !yym1160 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1159)
- } else {
- z.DecFallback(yyv1159, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NodeSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1161 := &x.NodeSyncPeriod
- yym1162 := z.DecBinary()
- _ = yym1162
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1161) {
- } else if !yym1162 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1161)
- } else {
- z.DecFallback(yyv1161, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RouteReconciliationPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1163 := &x.RouteReconciliationPeriod
- yym1164 := z.DecBinary()
- _ = yym1164
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1163) {
- } else if !yym1164 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1163)
- } else {
- z.DecFallback(yyv1163, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1165 := &x.ResourceQuotaSyncPeriod
- yym1166 := z.DecBinary()
- _ = yym1166
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1165) {
- } else if !yym1166 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1165)
- } else {
- z.DecFallback(yyv1165, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NamespaceSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1167 := &x.NamespaceSyncPeriod
- yym1168 := z.DecBinary()
- _ = yym1168
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1167) {
- } else if !yym1168 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1167)
- } else {
- z.DecFallback(yyv1167, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1169 := &x.PVClaimBinderSyncPeriod
- yym1170 := z.DecBinary()
- _ = yym1170
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1169) {
- } else if !yym1170 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1169)
- } else {
- z.DecFallback(yyv1169, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MinResyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1171 := &x.MinResyncPeriod
- yym1172 := z.DecBinary()
- _ = yym1172
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1171) {
- } else if !yym1172 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1171)
- } else {
- z.DecFallback(yyv1171, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.TerminatedPodGCThreshold = 0
- } else {
- x.TerminatedPodGCThreshold = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1174 := &x.HorizontalPodAutoscalerSyncPeriod
- yym1175 := z.DecBinary()
- _ = yym1175
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1174) {
- } else if !yym1175 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1174)
- } else {
- z.DecFallback(yyv1174, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1176 := &x.DeploymentControllerSyncPeriod
- yym1177 := z.DecBinary()
- _ = yym1177
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1176) {
- } else if !yym1177 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1176)
- } else {
- z.DecFallback(yyv1176, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PodEvictionTimeout = pkg1_unversioned.Duration{}
- } else {
- yyv1178 := &x.PodEvictionTimeout
- yym1179 := z.DecBinary()
- _ = yym1179
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1178) {
- } else if !yym1179 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1178)
- } else {
- z.DecFallback(yyv1178, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.DeletingPodsQps = 0
- } else {
- x.DeletingPodsQps = float32(r.DecodeFloat(true))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.DeletingPodsBurst = 0
- } else {
- x.DeletingPodsBurst = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1182 := &x.NodeMonitorGracePeriod
- yym1183 := z.DecBinary()
- _ = yym1183
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1182) {
- } else if !yym1183 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1182)
- } else {
- z.DecFallback(yyv1182, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RegisterRetryCount = 0
- } else {
- x.RegisterRetryCount = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NodeStartupGracePeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1185 := &x.NodeStartupGracePeriod
- yym1186 := z.DecBinary()
- _ = yym1186
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1185) {
- } else if !yym1186 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1185)
- } else {
- z.DecFallback(yyv1185, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NodeMonitorPeriod = pkg1_unversioned.Duration{}
- } else {
- yyv1187 := &x.NodeMonitorPeriod
- yym1188 := z.DecBinary()
- _ = yym1188
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1187) {
- } else if !yym1188 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1187)
- } else {
- z.DecFallback(yyv1187, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ServiceAccountKeyFile = ""
- } else {
- x.ServiceAccountKeyFile = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ClusterSigningCertFile = ""
- } else {
- x.ClusterSigningCertFile = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ClusterSigningKeyFile = ""
- } else {
- x.ClusterSigningKeyFile = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ApproveAllKubeletCSRsForGroup = ""
- } else {
- x.ApproveAllKubeletCSRsForGroup = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EnableProfiling = false
- } else {
- x.EnableProfiling = bool(r.DecodeBool())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ClusterName = ""
- } else {
- x.ClusterName = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ClusterCIDR = ""
- } else {
- x.ClusterCIDR = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ServiceCIDR = ""
- } else {
- x.ServiceCIDR = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NodeCIDRMaskSize = 0
- } else {
- x.NodeCIDRMaskSize = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.AllocateNodeCIDRs = false
- } else {
- x.AllocateNodeCIDRs = bool(r.DecodeBool())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConfigureCloudRoutes = false
- } else {
- x.ConfigureCloudRoutes = bool(r.DecodeBool())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.RootCAFile = ""
- } else {
- x.RootCAFile = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ContentType = ""
- } else {
- x.ContentType = string(r.DecodeString())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.KubeAPIQPS = 0
- } else {
- x.KubeAPIQPS = float32(r.DecodeFloat(true))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.KubeAPIBurst = 0
- } else {
- x.KubeAPIBurst = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LeaderElection = LeaderElectionConfiguration{}
- } else {
- yyv1204 := &x.LeaderElection
- yyv1204.CodecDecodeSelf(d)
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.VolumeConfiguration = VolumeConfiguration{}
- } else {
- yyv1205 := &x.VolumeConfiguration
- yyv1205.CodecDecodeSelf(d)
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ControllerStartInterval = pkg1_unversioned.Duration{}
- } else {
- yyv1206 := &x.ControllerStartInterval
- yym1207 := z.DecBinary()
- _ = yym1207
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv1206) {
- } else if !yym1207 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv1206)
- } else {
- z.DecFallback(yyv1206, false)
- }
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EnableGarbageCollector = false
- } else {
- x.EnableGarbageCollector = bool(r.DecodeBool())
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ConcurrentGCSyncs = 0
- } else {
- x.ConcurrentGCSyncs = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.NodeEvictionRate = 0
- } else {
- x.NodeEvictionRate = float32(r.DecodeFloat(true))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.SecondaryNodeEvictionRate = 0
- } else {
- x.SecondaryNodeEvictionRate = float32(r.DecodeFloat(true))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LargeClusterSizeThreshold = 0
- } else {
- x.LargeClusterSizeThreshold = int32(r.DecodeInt(32))
- }
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.UnhealthyZoneThreshold = 0
- } else {
- x.UnhealthyZoneThreshold = float32(r.DecodeFloat(true))
- }
- for {
- yyj1139++
- if yyhl1139 {
- yyb1139 = yyj1139 > l
- } else {
- yyb1139 = r.CheckBreak()
- }
- if yyb1139 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj1139-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *VolumeConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1214 := z.EncBinary()
- _ = yym1214
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep1215 := !z.EncBinary()
- yy2arr1215 := z.EncBasicHandle().StructToArray
- var yyq1215 [4]bool
- _, _, _ = yysep1215, yyq1215, yy2arr1215
- const yyr1215 bool = false
- var yynn1215 int
- if yyr1215 || yy2arr1215 {
- r.EncodeArrayStart(4)
- } else {
- yynn1215 = 4
- for _, b := range yyq1215 {
- if b {
- yynn1215++
- }
- }
- r.EncodeMapStart(yynn1215)
- yynn1215 = 0
- }
- if yyr1215 || yy2arr1215 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1217 := z.EncBinary()
- _ = yym1217
- if false {
- } else {
- r.EncodeBool(bool(x.EnableHostPathProvisioning))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("enableHostPathProvisioning"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1218 := z.EncBinary()
- _ = yym1218
- if false {
- } else {
- r.EncodeBool(bool(x.EnableHostPathProvisioning))
- }
- }
- if yyr1215 || yy2arr1215 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1220 := z.EncBinary()
- _ = yym1220
- if false {
- } else {
- r.EncodeBool(bool(x.EnableDynamicProvisioning))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("enableDynamicProvisioning"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1221 := z.EncBinary()
- _ = yym1221
- if false {
- } else {
- r.EncodeBool(bool(x.EnableDynamicProvisioning))
- }
- }
- if yyr1215 || yy2arr1215 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy1223 := &x.PersistentVolumeRecyclerConfiguration
- yy1223.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("persitentVolumeRecyclerConfiguration"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy1224 := &x.PersistentVolumeRecyclerConfiguration
- yy1224.CodecEncodeSelf(e)
- }
- if yyr1215 || yy2arr1215 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1226 := z.EncBinary()
- _ = yym1226
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.FlexVolumePluginDir))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("flexVolumePluginDir"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1227 := z.EncBinary()
- _ = yym1227
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.FlexVolumePluginDir))
- }
- }
- if yyr1215 || yy2arr1215 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *VolumeConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1228 := z.DecBinary()
- _ = yym1228
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct1229 := r.ContainerType()
- if yyct1229 == codecSelferValueTypeMap1234 {
- yyl1229 := r.ReadMapStart()
- if yyl1229 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl1229, d)
- }
- } else if yyct1229 == codecSelferValueTypeArray1234 {
- yyl1229 := r.ReadArrayStart()
- if yyl1229 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl1229, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *VolumeConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys1230Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys1230Slc
- var yyhl1230 bool = l >= 0
- for yyj1230 := 0; ; yyj1230++ {
- if yyhl1230 {
- if yyj1230 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys1230Slc = r.DecodeBytes(yys1230Slc, true, true)
- yys1230 := string(yys1230Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys1230 {
- case "enableHostPathProvisioning":
- if r.TryDecodeAsNil() {
- x.EnableHostPathProvisioning = false
- } else {
- x.EnableHostPathProvisioning = bool(r.DecodeBool())
- }
- case "enableDynamicProvisioning":
- if r.TryDecodeAsNil() {
- x.EnableDynamicProvisioning = false
- } else {
- x.EnableDynamicProvisioning = bool(r.DecodeBool())
- }
- case "persitentVolumeRecyclerConfiguration":
- if r.TryDecodeAsNil() {
- x.PersistentVolumeRecyclerConfiguration = PersistentVolumeRecyclerConfiguration{}
- } else {
- yyv1233 := &x.PersistentVolumeRecyclerConfiguration
- yyv1233.CodecDecodeSelf(d)
- }
- case "flexVolumePluginDir":
- if r.TryDecodeAsNil() {
- x.FlexVolumePluginDir = ""
- } else {
- x.FlexVolumePluginDir = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys1230)
- } // end switch yys1230
- } // end for yyj1230
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj1235 int
- var yyb1235 bool
- var yyhl1235 bool = l >= 0
- yyj1235++
- if yyhl1235 {
- yyb1235 = yyj1235 > l
- } else {
- yyb1235 = r.CheckBreak()
- }
- if yyb1235 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EnableHostPathProvisioning = false
- } else {
- x.EnableHostPathProvisioning = bool(r.DecodeBool())
- }
- yyj1235++
- if yyhl1235 {
- yyb1235 = yyj1235 > l
- } else {
- yyb1235 = r.CheckBreak()
- }
- if yyb1235 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.EnableDynamicProvisioning = false
- } else {
- x.EnableDynamicProvisioning = bool(r.DecodeBool())
- }
- yyj1235++
- if yyhl1235 {
- yyb1235 = yyj1235 > l
- } else {
- yyb1235 = r.CheckBreak()
- }
- if yyb1235 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PersistentVolumeRecyclerConfiguration = PersistentVolumeRecyclerConfiguration{}
- } else {
- yyv1238 := &x.PersistentVolumeRecyclerConfiguration
- yyv1238.CodecDecodeSelf(d)
- }
- yyj1235++
- if yyhl1235 {
- yyb1235 = yyj1235 > l
- } else {
- yyb1235 = r.CheckBreak()
- }
- if yyb1235 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.FlexVolumePluginDir = ""
- } else {
- x.FlexVolumePluginDir = string(r.DecodeString())
- }
- for {
- yyj1235++
- if yyhl1235 {
- yyb1235 = yyj1235 > l
- } else {
- yyb1235 = r.CheckBreak()
- }
- if yyb1235 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj1235-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1240 := z.EncBinary()
- _ = yym1240
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep1241 := !z.EncBinary()
- yy2arr1241 := z.EncBasicHandle().StructToArray
- var yyq1241 [7]bool
- _, _, _ = yysep1241, yyq1241, yy2arr1241
- const yyr1241 bool = false
- var yynn1241 int
- if yyr1241 || yy2arr1241 {
- r.EncodeArrayStart(7)
- } else {
- yynn1241 = 7
- for _, b := range yyq1241 {
- if b {
- yynn1241++
- }
- }
- r.EncodeMapStart(yynn1241)
- yynn1241 = 0
- }
- if yyr1241 || yy2arr1241 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1243 := z.EncBinary()
- _ = yym1243
- if false {
- } else {
- r.EncodeInt(int64(x.MaximumRetry))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("maximumRetry"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1244 := z.EncBinary()
- _ = yym1244
- if false {
- } else {
- r.EncodeInt(int64(x.MaximumRetry))
- }
- }
- if yyr1241 || yy2arr1241 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1246 := z.EncBinary()
- _ = yym1246
- if false {
- } else {
- r.EncodeInt(int64(x.MinimumTimeoutNFS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("minimumTimeoutNFS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1247 := z.EncBinary()
- _ = yym1247
- if false {
- } else {
- r.EncodeInt(int64(x.MinimumTimeoutNFS))
- }
- }
- if yyr1241 || yy2arr1241 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1249 := z.EncBinary()
- _ = yym1249
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathNFS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("podTemplateFilePathNFS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1250 := z.EncBinary()
- _ = yym1250
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathNFS))
- }
- }
- if yyr1241 || yy2arr1241 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1252 := z.EncBinary()
- _ = yym1252
- if false {
- } else {
- r.EncodeInt(int64(x.IncrementTimeoutNFS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("incrementTimeoutNFS"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1253 := z.EncBinary()
- _ = yym1253
- if false {
- } else {
- r.EncodeInt(int64(x.IncrementTimeoutNFS))
- }
- }
- if yyr1241 || yy2arr1241 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1255 := z.EncBinary()
- _ = yym1255
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathHostPath))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("podTemplateFilePathHostPath"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1256 := z.EncBinary()
- _ = yym1256
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathHostPath))
- }
- }
- if yyr1241 || yy2arr1241 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1258 := z.EncBinary()
- _ = yym1258
- if false {
- } else {
- r.EncodeInt(int64(x.MinimumTimeoutHostPath))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("minimumTimeoutHostPath"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1259 := z.EncBinary()
- _ = yym1259
- if false {
- } else {
- r.EncodeInt(int64(x.MinimumTimeoutHostPath))
- }
- }
- if yyr1241 || yy2arr1241 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym1261 := z.EncBinary()
- _ = yym1261
- if false {
- } else {
- r.EncodeInt(int64(x.IncrementTimeoutHostPath))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("incrementTimeoutHostPath"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1262 := z.EncBinary()
- _ = yym1262
- if false {
- } else {
- r.EncodeInt(int64(x.IncrementTimeoutHostPath))
- }
- }
- if yyr1241 || yy2arr1241 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *PersistentVolumeRecyclerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1263 := z.DecBinary()
- _ = yym1263
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct1264 := r.ContainerType()
- if yyct1264 == codecSelferValueTypeMap1234 {
- yyl1264 := r.ReadMapStart()
- if yyl1264 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl1264, d)
- }
- } else if yyct1264 == codecSelferValueTypeArray1234 {
- yyl1264 := r.ReadArrayStart()
- if yyl1264 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl1264, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys1265Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys1265Slc
- var yyhl1265 bool = l >= 0
- for yyj1265 := 0; ; yyj1265++ {
- if yyhl1265 {
- if yyj1265 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys1265Slc = r.DecodeBytes(yys1265Slc, true, true)
- yys1265 := string(yys1265Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys1265 {
- case "maximumRetry":
- if r.TryDecodeAsNil() {
- x.MaximumRetry = 0
- } else {
- x.MaximumRetry = int32(r.DecodeInt(32))
- }
- case "minimumTimeoutNFS":
- if r.TryDecodeAsNil() {
- x.MinimumTimeoutNFS = 0
- } else {
- x.MinimumTimeoutNFS = int32(r.DecodeInt(32))
- }
- case "podTemplateFilePathNFS":
- if r.TryDecodeAsNil() {
- x.PodTemplateFilePathNFS = ""
- } else {
- x.PodTemplateFilePathNFS = string(r.DecodeString())
- }
- case "incrementTimeoutNFS":
- if r.TryDecodeAsNil() {
- x.IncrementTimeoutNFS = 0
- } else {
- x.IncrementTimeoutNFS = int32(r.DecodeInt(32))
- }
- case "podTemplateFilePathHostPath":
- if r.TryDecodeAsNil() {
- x.PodTemplateFilePathHostPath = ""
- } else {
- x.PodTemplateFilePathHostPath = string(r.DecodeString())
- }
- case "minimumTimeoutHostPath":
- if r.TryDecodeAsNil() {
- x.MinimumTimeoutHostPath = 0
- } else {
- x.MinimumTimeoutHostPath = int32(r.DecodeInt(32))
- }
- case "incrementTimeoutHostPath":
- if r.TryDecodeAsNil() {
- x.IncrementTimeoutHostPath = 0
- } else {
- x.IncrementTimeoutHostPath = int32(r.DecodeInt(32))
- }
- default:
- z.DecStructFieldNotFound(-1, yys1265)
- } // end switch yys1265
- } // end for yyj1265
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj1273 int
- var yyb1273 bool
- var yyhl1273 bool = l >= 0
- yyj1273++
- if yyhl1273 {
- yyb1273 = yyj1273 > l
- } else {
- yyb1273 = r.CheckBreak()
- }
- if yyb1273 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MaximumRetry = 0
- } else {
- x.MaximumRetry = int32(r.DecodeInt(32))
- }
- yyj1273++
- if yyhl1273 {
- yyb1273 = yyj1273 > l
- } else {
- yyb1273 = r.CheckBreak()
- }
- if yyb1273 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MinimumTimeoutNFS = 0
- } else {
- x.MinimumTimeoutNFS = int32(r.DecodeInt(32))
- }
- yyj1273++
- if yyhl1273 {
- yyb1273 = yyj1273 > l
- } else {
- yyb1273 = r.CheckBreak()
- }
- if yyb1273 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PodTemplateFilePathNFS = ""
- } else {
- x.PodTemplateFilePathNFS = string(r.DecodeString())
- }
- yyj1273++
- if yyhl1273 {
- yyb1273 = yyj1273 > l
- } else {
- yyb1273 = r.CheckBreak()
- }
- if yyb1273 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.IncrementTimeoutNFS = 0
- } else {
- x.IncrementTimeoutNFS = int32(r.DecodeInt(32))
- }
- yyj1273++
- if yyhl1273 {
- yyb1273 = yyj1273 > l
- } else {
- yyb1273 = r.CheckBreak()
- }
- if yyb1273 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.PodTemplateFilePathHostPath = ""
- } else {
- x.PodTemplateFilePathHostPath = string(r.DecodeString())
- }
- yyj1273++
- if yyhl1273 {
- yyb1273 = yyj1273 > l
- } else {
- yyb1273 = r.CheckBreak()
- }
- if yyb1273 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MinimumTimeoutHostPath = 0
- } else {
- x.MinimumTimeoutHostPath = int32(r.DecodeInt(32))
- }
- yyj1273++
- if yyhl1273 {
- yyb1273 = yyj1273 > l
- } else {
- yyb1273 = r.CheckBreak()
- }
- if yyb1273 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.IncrementTimeoutHostPath = 0
- } else {
- x.IncrementTimeoutHostPath = int32(r.DecodeInt(32))
- }
- for {
- yyj1273++
- if yyhl1273 {
- yyb1273 = yyj1273 > l
- } else {
- yyb1273 = r.CheckBreak()
- }
- if yyb1273 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj1273-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) encconfig_ConfigurationMap(v pkg2_config.ConfigurationMap, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeMapStart(len(v))
- for yyk1281, yyv1281 := range v {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- yym1282 := z.EncBinary()
- _ = yym1282
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(yyk1281))
- }
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym1283 := z.EncBinary()
- _ = yym1283
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(yyv1281))
- }
- }
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x codecSelfer1234) decconfig_ConfigurationMap(v *pkg2_config.ConfigurationMap, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1284 := *v
- yyl1284 := r.ReadMapStart()
- yybh1284 := z.DecBasicHandle()
- if yyv1284 == nil {
- yyrl1284, _ := z.DecInferLen(yyl1284, yybh1284.MaxInitLen, 32)
- yyv1284 = make(map[string]string, yyrl1284)
- *v = yyv1284
- }
- var yymk1284 string
- var yymv1284 string
- var yymg1284 bool
- if yybh1284.MapValueReset {
- }
- if yyl1284 > 0 {
- for yyj1284 := 0; yyj1284 < yyl1284; yyj1284++ {
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- if r.TryDecodeAsNil() {
- yymk1284 = ""
- } else {
- yymk1284 = string(r.DecodeString())
- }
-
- if yymg1284 {
- yymv1284 = yyv1284[yymk1284]
- }
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- if r.TryDecodeAsNil() {
- yymv1284 = ""
- } else {
- yymv1284 = string(r.DecodeString())
- }
-
- if yyv1284 != nil {
- yyv1284[yymk1284] = yymv1284
- }
- }
- } else if yyl1284 < 0 {
- for yyj1284 := 0; !r.CheckBreak(); yyj1284++ {
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- if r.TryDecodeAsNil() {
- yymk1284 = ""
- } else {
- yymk1284 = string(r.DecodeString())
- }
-
- if yymg1284 {
- yymv1284 = yyv1284[yymk1284]
- }
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- if r.TryDecodeAsNil() {
- yymv1284 = ""
- } else {
- yymv1284 = string(r.DecodeString())
- }
-
- if yyv1284 != nil {
- yyv1284[yymk1284] = yymv1284
- }
- }
- } // else len==0: TODO: Should we clear map entries?
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/types.go
deleted file mode 100644
index 089ede983..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/types.go
+++ /dev/null
@@ -1,714 +0,0 @@
-/*
-Copyright 2015 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 componentconfig
-
-import (
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- utilconfig "k8s.io/client-go/1.5/pkg/util/config"
-)
-
-type KubeProxyConfiguration struct {
- unversioned.TypeMeta
-
- // bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0
- // for all interfaces)
- BindAddress string `json:"bindAddress"`
- // clusterCIDR is the CIDR range of the pods in the cluster. It is used to
- // bridge traffic coming from outside of the cluster. If not provided,
- // no off-cluster bridging will be performed.
- ClusterCIDR string `json:"clusterCIDR"`
- // healthzBindAddress is the IP address for the health check server to serve on,
- // defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)
- HealthzBindAddress string `json:"healthzBindAddress"`
- // healthzPort is the port to bind the health check server. Use 0 to disable.
- HealthzPort int32 `json:"healthzPort"`
- // hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.
- HostnameOverride string `json:"hostnameOverride"`
- // iptablesMasqueradeBit is the bit of the iptables fwmark space to use for SNAT if using
- // the pure iptables proxy mode. Values must be within the range [0, 31].
- IPTablesMasqueradeBit *int32 `json:"iptablesMasqueradeBit"`
- // iptablesSyncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m',
- // '2h22m'). Must be greater than 0.
- IPTablesSyncPeriod unversioned.Duration `json:"iptablesSyncPeriodSeconds"`
- // kubeconfigPath is the path to the kubeconfig file with authorization information (the
- // master location is set by the master flag).
- KubeconfigPath string `json:"kubeconfigPath"`
- // masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.
- MasqueradeAll bool `json:"masqueradeAll"`
- // master is the address of the Kubernetes API server (overrides any value in kubeconfig)
- Master string `json:"master"`
- // oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within
- // the range [-1000, 1000]
- OOMScoreAdj *int32 `json:"oomScoreAdj"`
- // mode specifies which proxy mode to use.
- Mode ProxyMode `json:"mode"`
- // portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed
- // in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.
- PortRange string `json:"portRange"`
- // resourceContainer is the absolute name of the resource-only container to create and run
- // the Kube-proxy in (Default: /kube-proxy).
- ResourceContainer string `json:"resourceContainer"`
- // udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s').
- // Must be greater than 0. Only applicable for proxyMode=userspace.
- UDPIdleTimeout unversioned.Duration `json:"udpTimeoutMilliseconds"`
- // conntrackMax is the maximum number of NAT connections to track (0 to
- // leave as-is). This takes precedence over conntrackMaxPerCore and conntrackMin.
- ConntrackMax int32 `json:"conntrackMax"`
- // conntrackMaxPerCore is the maximum number of NAT connections to track
- // per CPU core (0 to leave the limit as-is and ignore conntrackMin).
- ConntrackMaxPerCore int32 `json:"conntrackMaxPerCore"`
- // conntrackMin is the minimum value of connect-tracking records to allocate,
- // regardless of conntrackMaxPerCore (set conntrackMaxPerCore=0 to leave the limit as-is).
- ConntrackMin int32 `json:"conntrackMin"`
- // conntrackTCPEstablishedTimeout is how long an idle TCP connection will be kept open
- // (e.g. '250ms', '2s'). Must be greater than 0.
- ConntrackTCPEstablishedTimeout unversioned.Duration `json:"conntrackTCPEstablishedTimeout"`
-}
-
-// Currently two modes of proxying are available: 'userspace' (older, stable) or 'iptables'
-// (newer, faster). If blank, look at the Node object on the Kubernetes API and respect the
-// 'net.experimental.kubernetes.io/proxy-mode' annotation if provided. Otherwise use the
-// best-available proxy (currently iptables, but may change in future versions). If the
-// iptables proxy is selected, regardless of how, but the system's kernel or iptables
-// versions are insufficient, this always falls back to the userspace proxy.
-type ProxyMode string
-
-const (
- ProxyModeUserspace ProxyMode = "userspace"
- ProxyModeIPTables ProxyMode = "iptables"
-)
-
-// HairpinMode denotes how the kubelet should configure networking to handle
-// hairpin packets.
-type HairpinMode string
-
-// Enum settings for different ways to handle hairpin packets.
-const (
- // Set the hairpin flag on the veth of containers in the respective
- // container runtime.
- HairpinVeth = "hairpin-veth"
- // Make the container bridge promiscuous. This will force it to accept
- // hairpin packets, even if the flag isn't set on ports of the bridge.
- PromiscuousBridge = "promiscuous-bridge"
- // Neither of the above. If the kubelet is started in this hairpin mode
- // and kube-proxy is running in iptables mode, hairpin packets will be
- // dropped by the container bridge.
- HairpinNone = "none"
-)
-
-// TODO: curate the ordering and structure of this config object
-type KubeletConfiguration struct {
- unversioned.TypeMeta
-
- // podManifestPath is the path to the directory containing pod manifests to
- // run, or the path to a single manifest file
- PodManifestPath string `json:"podManifestPath"`
- // syncFrequency is the max period between synchronizing running
- // containers and config
- SyncFrequency unversioned.Duration `json:"syncFrequency"`
- // fileCheckFrequency is the duration between checking config files for
- // new data
- FileCheckFrequency unversioned.Duration `json:"fileCheckFrequency"`
- // httpCheckFrequency is the duration between checking http for new data
- HTTPCheckFrequency unversioned.Duration `json:"httpCheckFrequency"`
- // manifestURL is the URL for accessing the container manifest
- ManifestURL string `json:"manifestURL"`
- // manifestURLHeader is the HTTP header to use when accessing the manifest
- // URL, with the key separated from the value with a ':', as in 'key:value'
- ManifestURLHeader string `json:"manifestURLHeader"`
- // enableServer enables the Kubelet's server
- EnableServer bool `json:"enableServer"`
- // address is the IP address for the Kubelet to serve on (set to 0.0.0.0
- // for all interfaces)
- Address string `json:"address"`
- // port is the port for the Kubelet to serve on.
- Port int32 `json:"port"`
- // readOnlyPort is the read-only port for the Kubelet to serve on with
- // no authentication/authorization (set to 0 to disable)
- ReadOnlyPort int32 `json:"readOnlyPort"`
- // tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert,
- // if any, concatenated after server cert). If tlsCertFile and
- // tlsPrivateKeyFile are not provided, a self-signed certificate
- // and key are generated for the public address and saved to the directory
- // passed to certDir.
- TLSCertFile string `json:"tlsCertFile"`
- // tlsPrivateKeyFile is the ile containing x509 private key matching
- // tlsCertFile.
- TLSPrivateKeyFile string `json:"tlsPrivateKeyFile"`
- // certDirectory is the directory where the TLS certs are located (by
- // default /var/run/kubernetes). If tlsCertFile and tlsPrivateKeyFile
- // are provided, this flag will be ignored.
- CertDirectory string `json:"certDirectory"`
- // hostnameOverride is the hostname used to identify the kubelet instead
- // of the actual hostname.
- HostnameOverride string `json:"hostnameOverride"`
- // podInfraContainerImage is the image whose network/ipc namespaces
- // containers in each pod will use.
- PodInfraContainerImage string `json:"podInfraContainerImage"`
- // dockerEndpoint is the path to the docker endpoint to communicate with.
- DockerEndpoint string `json:"dockerEndpoint"`
- // rootDirectory is the directory path to place kubelet files (volume
- // mounts,etc).
- RootDirectory string `json:"rootDirectory"`
- // seccompProfileRoot is the directory path for seccomp profiles.
- SeccompProfileRoot string `json:"seccompProfileRoot"`
- // allowPrivileged enables containers to request privileged mode.
- // Defaults to false.
- AllowPrivileged bool `json:"allowPrivileged"`
- // hostNetworkSources is a comma-separated list of sources from which the
- // Kubelet allows pods to use of host network. Defaults to "*". Valid
- // options are "file", "http", "api", and "*" (all sources).
- HostNetworkSources []string `json:"hostNetworkSources"`
- // hostPIDSources is a comma-separated list of sources from which the
- // Kubelet allows pods to use the host pid namespace. Defaults to "*".
- HostPIDSources []string `json:"hostPIDSources"`
- // hostIPCSources is a comma-separated list of sources from which the
- // Kubelet allows pods to use the host ipc namespace. Defaults to "*".
- HostIPCSources []string `json:"hostIPCSources"`
- // registryPullQPS is the limit of registry pulls per second. If 0,
- // unlimited. Set to 0 for no limit. Defaults to 5.0.
- RegistryPullQPS int32 `json:"registryPullQPS"`
- // registryBurst is the maximum size of a bursty pulls, temporarily allows
- // pulls to burst to this number, while still not exceeding registryQps.
- // Only used if registryQPS > 0.
- RegistryBurst int32 `json:"registryBurst"`
- // eventRecordQPS is the maximum event creations per second. If 0, there
- // is no limit enforced.
- EventRecordQPS int32 `json:"eventRecordQPS"`
- // eventBurst is the maximum size of a bursty event records, temporarily
- // allows event records to burst to this number, while still not exceeding
- // event-qps. Only used if eventQps > 0
- EventBurst int32 `json:"eventBurst"`
- // enableDebuggingHandlers enables server endpoints for log collection
- // and local running of containers and commands
- EnableDebuggingHandlers bool `json:"enableDebuggingHandlers"`
- // minimumGCAge is the minimum age for a finished container before it is
- // garbage collected.
- MinimumGCAge unversioned.Duration `json:"minimumGCAge"`
- // maxPerPodContainerCount is the maximum number of old instances to
- // retain per container. Each container takes up some disk space.
- MaxPerPodContainerCount int32 `json:"maxPerPodContainerCount"`
- // maxContainerCount is the maximum number of old instances of containers
- // to retain globally. Each container takes up some disk space.
- MaxContainerCount int32 `json:"maxContainerCount"`
- // cAdvisorPort is the port of the localhost cAdvisor endpoint
- CAdvisorPort int32 `json:"cAdvisorPort"`
- // healthzPort is the port of the localhost healthz endpoint
- HealthzPort int32 `json:"healthzPort"`
- // healthzBindAddress is the IP address for the healthz server to serve
- // on.
- HealthzBindAddress string `json:"healthzBindAddress"`
- // oomScoreAdj is The oom-score-adj value for kubelet process. Values
- // must be within the range [-1000, 1000].
- OOMScoreAdj int32 `json:"oomScoreAdj"`
- // registerNode enables automatic registration with the apiserver.
- RegisterNode bool `json:"registerNode"`
- // clusterDomain is the DNS domain for this cluster. If set, kubelet will
- // configure all containers to search this domain in addition to the
- // host's search domains.
- ClusterDomain string `json:"clusterDomain"`
- // masterServiceNamespace is The namespace from which the kubernetes
- // master services should be injected into pods.
- MasterServiceNamespace string `json:"masterServiceNamespace"`
- // clusterDNS is the IP address for a cluster DNS server. If set, kubelet
- // will configure all containers to use this for DNS resolution in
- // addition to the host's DNS servers
- ClusterDNS string `json:"clusterDNS"`
- // streamingConnectionIdleTimeout is the maximum time a streaming connection
- // can be idle before the connection is automatically closed.
- StreamingConnectionIdleTimeout unversioned.Duration `json:"streamingConnectionIdleTimeout"`
- // nodeStatusUpdateFrequency is the frequency that kubelet posts node
- // status to master. Note: be cautious when changing the constant, it
- // must work with nodeMonitorGracePeriod in nodecontroller.
- NodeStatusUpdateFrequency unversioned.Duration `json:"nodeStatusUpdateFrequency"`
- // imageMinimumGCAge is the minimum age for an unused image before it is
- // garbage collected.
- ImageMinimumGCAge unversioned.Duration `json:"imageMinimumGCAge"`
- // imageGCHighThresholdPercent is the percent of disk usage after which
- // image garbage collection is always run.
- ImageGCHighThresholdPercent int32 `json:"imageGCHighThresholdPercent"`
- // imageGCLowThresholdPercent is the percent of disk usage before which
- // image garbage collection is never run. Lowest disk usage to garbage
- // collect to.
- ImageGCLowThresholdPercent int32 `json:"imageGCLowThresholdPercent"`
- // lowDiskSpaceThresholdMB is the absolute free disk space, in MB, to
- // maintain. When disk space falls below this threshold, new pods would
- // be rejected.
- LowDiskSpaceThresholdMB int32 `json:"lowDiskSpaceThresholdMB"`
- // How frequently to calculate and cache volume disk usage for all pods
- VolumeStatsAggPeriod unversioned.Duration `json:"volumeStatsAggPeriod"`
- // networkPluginName is the name of the network plugin to be invoked for
- // various events in kubelet/pod lifecycle
- NetworkPluginName string `json:"networkPluginName"`
- // networkPluginMTU is the MTU to be passed to the network plugin,
- // and overrides the default MTU for cases where it cannot be automatically
- // computed (such as IPSEC).
- NetworkPluginMTU int32 `json:"networkPluginMTU"`
- // networkPluginDir is the full path of the directory in which to search
- // for network plugins (and, for backwards-compat, CNI config files)
- NetworkPluginDir string `json:"networkPluginDir"`
- // CNIConfDir is the full path of the directory in which to search for
- // CNI config files
- CNIConfDir string `json:"cniConfDir"`
- // CNIBinDir is the full path of the directory in which to search for
- // CNI plugin binaries
- CNIBinDir string `json:"cniBinDir"`
- // volumePluginDir is the full path of the directory in which to search
- // for additional third party volume plugins
- VolumePluginDir string `json:"volumePluginDir"`
- // cloudProvider is the provider for cloud services.
- CloudProvider string `json:"cloudProvider,omitempty"`
- // cloudConfigFile is the path to the cloud provider configuration file.
- CloudConfigFile string `json:"cloudConfigFile,omitempty"`
- // KubeletCgroups is the absolute name of cgroups to isolate the kubelet in.
- KubeletCgroups string `json:"kubeletCgroups,omitempty"`
- // Enable QoS based Cgroup hierarchy: top level cgroups for QoS Classes
- // And all Burstable and BestEffort pods are brought up under their
- // specific top level QoS cgroup.
- CgroupsPerQOS bool `json:"CgroupsPerQOS,omitempty"`
- // Cgroups that container runtime is expected to be isolated in.
- RuntimeCgroups string `json:"runtimeCgroups,omitempty"`
- // SystemCgroups is absolute name of cgroups in which to place
- // all non-kernel processes that are not already in a container. Empty
- // for no container. Rolling back the flag requires a reboot.
- SystemCgroups string `json:"systemCgroups,omitempty"`
- // CgroupRoot is the root cgroup to use for pods.
- // If CgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy.
- CgroupRoot string `json:"cgroupRoot,omitempty"`
- // containerRuntime is the container runtime to use.
- ContainerRuntime string `json:"containerRuntime"`
- // remoteRuntimeEndpoint is the endpoint of remote runtime service
- RemoteRuntimeEndpoint string `json:"remoteRuntimeEndpoint"`
- // remoteImageEndpoint is the endpoint of remote image service
- RemoteImageEndpoint string `json:"remoteImageEndpoint"`
- // runtimeRequestTimeout is the timeout for all runtime requests except long running
- // requests - pull, logs, exec and attach.
- RuntimeRequestTimeout unversioned.Duration `json:"runtimeRequestTimeout,omitempty"`
- // rktPath is the path of rkt binary. Leave empty to use the first rkt in
- // $PATH.
- RktPath string `json:"rktPath,omitempty"`
- // rktApiEndpoint is the endpoint of the rkt API service to communicate with.
- RktAPIEndpoint string `json:"rktAPIEndpoint,omitempty"`
- // rktStage1Image is the image to use as stage1. Local paths and
- // http/https URLs are supported.
- RktStage1Image string `json:"rktStage1Image,omitempty"`
- // lockFilePath is the path that kubelet will use to as a lock file.
- // It uses this file as a lock to synchronize with other kubelet processes
- // that may be running.
- LockFilePath string `json:"lockFilePath"`
- // ExitOnLockContention is a flag that signifies to the kubelet that it is running
- // in "bootstrap" mode. This requires that 'LockFilePath' has been set.
- // This will cause the kubelet to listen to inotify events on the lock file,
- // releasing it and exiting when another process tries to open that file.
- ExitOnLockContention bool `json:"exitOnLockContention"`
- // configureCBR0 enables the kublet to configure cbr0 based on
- // Node.Spec.PodCIDR.
- ConfigureCBR0 bool `json:"configureCbr0"`
- // How should the kubelet configure the container bridge for hairpin packets.
- // Setting this flag allows endpoints in a Service to loadbalance back to
- // themselves if they should try to access their own Service. Values:
- // "promiscuous-bridge": make the container bridge promiscuous.
- // "hairpin-veth": set the hairpin flag on container veth interfaces.
- // "none": do nothing.
- // Setting --configure-cbr0 to false implies that to achieve hairpin NAT
- // one must set --hairpin-mode=veth-flag, because bridge assumes the
- // existence of a container bridge named cbr0.
- HairpinMode string `json:"hairpinMode"`
- // The node has babysitter process monitoring docker and kubelet.
- BabysitDaemons bool `json:"babysitDaemons"`
- // maxPods is the number of pods that can run on this Kubelet.
- MaxPods int32 `json:"maxPods"`
- // nvidiaGPUs is the number of NVIDIA GPU devices on this node.
- NvidiaGPUs int32 `json:"nvidiaGPUs"`
- // dockerExecHandlerName is the handler to use when executing a command
- // in a container. Valid values are 'native' and 'nsenter'. Defaults to
- // 'native'.
- DockerExecHandlerName string `json:"dockerExecHandlerName"`
- // The CIDR to use for pod IP addresses, only used in standalone mode.
- // In cluster mode, this is obtained from the master.
- PodCIDR string `json:"podCIDR"`
- // ResolverConfig is the resolver configuration file used as the basis
- // for the container DNS resolution configuration."), []
- ResolverConfig string `json:"resolvConf"`
- // cpuCFSQuota is Enable CPU CFS quota enforcement for containers that
- // specify CPU limits
- CPUCFSQuota bool `json:"cpuCFSQuota"`
- // containerized should be set to true if kubelet is running in a container.
- Containerized bool `json:"containerized"`
- // maxOpenFiles is Number of files that can be opened by Kubelet process.
- MaxOpenFiles int64 `json:"maxOpenFiles"`
- // reconcileCIDR is Reconcile node CIDR with the CIDR specified by the
- // API server. No-op if register-node or configure-cbr0 is false.
- ReconcileCIDR bool `json:"reconcileCIDR"`
- // registerSchedulable tells the kubelet to register the node as
- // schedulable. No-op if register-node is false.
- RegisterSchedulable bool `json:"registerSchedulable"`
- // contentType is contentType of requests sent to apiserver.
- ContentType string `json:"contentType"`
- // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver
- KubeAPIQPS int32 `json:"kubeAPIQPS"`
- // kubeAPIBurst is the burst to allow while talking with kubernetes
- // apiserver
- KubeAPIBurst int32 `json:"kubeAPIBurst"`
- // serializeImagePulls when enabled, tells the Kubelet to pull images one
- // at a time. We recommend *not* changing the default value on nodes that
- // run docker daemon with version < 1.9 or an Aufs storage backend.
- // Issue #10959 has more details.
- SerializeImagePulls bool `json:"serializeImagePulls"`
- // experimentalFlannelOverlay enables experimental support for starting the
- // kubelet with the default overlay network (flannel). Assumes flanneld
- // is already running in client mode.
- ExperimentalFlannelOverlay bool `json:"experimentalFlannelOverlay"`
- // outOfDiskTransitionFrequency is duration for which the kubelet has to
- // wait before transitioning out of out-of-disk node condition status.
- OutOfDiskTransitionFrequency unversioned.Duration `json:"outOfDiskTransitionFrequency,omitempty"`
- // nodeIP is IP address of the node. If set, kubelet will use this IP
- // address for the node.
- NodeIP string `json:"nodeIP,omitempty"`
- // nodeLabels to add when registering the node in the cluster.
- NodeLabels map[string]string `json:"nodeLabels"`
- // nonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade.
- NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"`
- // enable gathering custom metrics.
- EnableCustomMetrics bool `json:"enableCustomMetrics"`
- // Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.
- EvictionHard string `json:"evictionHard,omitempty"`
- // Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'.
- EvictionSoft string `json:"evictionSoft,omitempty"`
- // Comma-delimeted list of grace periods for each soft eviction signal. For example, 'memory.available=30s'.
- EvictionSoftGracePeriod string `json:"evictionSoftGracePeriod,omitempty"`
- // Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition.
- EvictionPressureTransitionPeriod unversioned.Duration `json:"evictionPressureTransitionPeriod,omitempty"`
- // Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met.
- EvictionMaxPodGracePeriod int32 `json:"evictionMaxPodGracePeriod,omitempty"`
- // Comma-delimited list of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure.
- EvictionMinimumReclaim string `json:"evictionMinimumReclaim,omitempty"`
- // Maximum number of pods per core. Cannot exceed MaxPods
- PodsPerCore int32 `json:"podsPerCore"`
- // enableControllerAttachDetach enables the Attach/Detach controller to
- // manage attachment/detachment of volumes scheduled to this node, and
- // disables kubelet from executing any attach/detach operations
- EnableControllerAttachDetach bool `json:"enableControllerAttachDetach"`
- // A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs
- // that describe resources reserved for non-kubernetes components.
- // Currently only cpu and memory are supported. [default=none]
- // See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail.
- SystemReserved utilconfig.ConfigurationMap `json:"systemReserved"`
- // A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs
- // that describe resources reserved for kubernetes system components.
- // Currently only cpu and memory are supported. [default=none]
- // See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail.
- KubeReserved utilconfig.ConfigurationMap `json:"kubeReserved"`
- // Default behaviour for kernel tuning
- ProtectKernelDefaults bool `json:"protectKernelDefaults"`
- // If true, Kubelet ensures a set of iptables rules are present on host.
- // These rules will serve as utility for various components, e.g. kube-proxy.
- // The rules will be created based on IPTablesMasqueradeBit and IPTablesDropBit.
- MakeIPTablesUtilChains bool `json:"makeIPTablesUtilChains"`
- // iptablesMasqueradeBit is the bit of the iptables fwmark space to use for SNAT
- // Values must be within the range [0, 31].
- // Warning: Please match the value of corresponding parameter in kube-proxy
- // TODO: clean up IPTablesMasqueradeBit in kube-proxy
- IPTablesMasqueradeBit int32 `json:"iptablesMasqueradeBit"`
- // iptablesDropBit is the bit of the iptables fwmark space to use for dropping packets. Kubelet will ensure iptables mark and drop rules.
- // Values must be within the range [0, 31]. Must be different from IPTablesMasqueradeBit
- IPTablesDropBit int32 `json:"iptablesDropBit"`
- // Whitelist of unsafe sysctls or sysctl patterns (ending in *).
- AllowedUnsafeSysctls []string `json:"experimentalAllowedUnsafeSysctls,omitempty"`
- // How to integrate with runtime. If set to cri, kubelet will switch to
- // using the new Container Runtine Interface.
- ExperimentalRuntimeIntegrationType string `json:"experimentalRuntimeIntegrationType,omitempty"`
-}
-
-type KubeSchedulerConfiguration struct {
- unversioned.TypeMeta
-
- // port is the port that the scheduler's http service runs on.
- Port int32 `json:"port"`
- // address is the IP address to serve on.
- Address string `json:"address"`
- // algorithmProvider is the scheduling algorithm provider to use.
- AlgorithmProvider string `json:"algorithmProvider"`
- // policyConfigFile is the filepath to the scheduler policy configuration.
- PolicyConfigFile string `json:"policyConfigFile"`
- // enableProfiling enables profiling via web interface.
- EnableProfiling bool `json:"enableProfiling"`
- // contentType is contentType of requests sent to apiserver.
- ContentType string `json:"contentType"`
- // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
- KubeAPIQPS float32 `json:"kubeAPIQPS"`
- // kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver.
- KubeAPIBurst int32 `json:"kubeAPIBurst"`
- // schedulerName is name of the scheduler, used to select which pods
- // will be processed by this scheduler, based on pod's annotation with
- // key 'scheduler.alpha.kubernetes.io/name'.
- SchedulerName string `json:"schedulerName"`
- // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
- // corresponding to every RequiredDuringScheduling affinity rule.
- // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100.
- HardPodAffinitySymmetricWeight int `json:"hardPodAffinitySymmetricWeight"`
- // Indicate the "all topologies" set for empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity.
- FailureDomains string `json:"failureDomains"`
- // leaderElection defines the configuration of leader election client.
- LeaderElection LeaderElectionConfiguration `json:"leaderElection"`
-}
-
-// LeaderElectionConfiguration defines the configuration of leader election
-// clients for components that can run with leader election enabled.
-type LeaderElectionConfiguration struct {
- // leaderElect enables a leader election client to gain leadership
- // before executing the main loop. Enable this when running replicated
- // components for high availability.
- LeaderElect bool `json:"leaderElect"`
- // leaseDuration is the duration that non-leader candidates will wait
- // after observing a leadership renewal until attempting to acquire
- // leadership of a led but unrenewed leader slot. This is effectively the
- // maximum duration that a leader can be stopped before it is replaced
- // by another candidate. This is only applicable if leader election is
- // enabled.
- LeaseDuration unversioned.Duration `json:"leaseDuration"`
- // renewDeadline is the interval between attempts by the acting master to
- // renew a leadership slot before it stops leading. This must be less
- // than or equal to the lease duration. This is only applicable if leader
- // election is enabled.
- RenewDeadline unversioned.Duration `json:"renewDeadline"`
- // retryPeriod is the duration the clients should wait between attempting
- // acquisition and renewal of a leadership. This is only applicable if
- // leader election is enabled.
- RetryPeriod unversioned.Duration `json:"retryPeriod"`
-}
-
-type KubeControllerManagerConfiguration struct {
- unversioned.TypeMeta
-
- // port is the port that the controller-manager's http service runs on.
- Port int32 `json:"port"`
- // address is the IP address to serve on (set to 0.0.0.0 for all interfaces).
- Address string `json:"address"`
- // cloudProvider is the provider for cloud services.
- CloudProvider string `json:"cloudProvider"`
- // cloudConfigFile is the path to the cloud provider configuration file.
- CloudConfigFile string `json:"cloudConfigFile"`
- // concurrentEndpointSyncs is the number of endpoint syncing operations
- // that will be done concurrently. Larger number = faster endpoint updating,
- // but more CPU (and network) load.
- ConcurrentEndpointSyncs int32 `json:"concurrentEndpointSyncs"`
- // concurrentRSSyncs is the number of replica sets that are allowed to sync
- // concurrently. Larger number = more responsive replica management, but more
- // CPU (and network) load.
- ConcurrentRSSyncs int32 `json:"concurrentRSSyncs"`
- // concurrentRCSyncs is the number of replication controllers that are
- // allowed to sync concurrently. Larger number = more responsive replica
- // management, but more CPU (and network) load.
- ConcurrentRCSyncs int32 `json:"concurrentRCSyncs"`
- // concurrentServiceSyncs is the number of services that are
- // allowed to sync concurrently. Larger number = more responsive service
- // management, but more CPU (and network) load.
- ConcurrentServiceSyncs int32 `json:"concurrentServiceSyncs"`
- // concurrentResourceQuotaSyncs is the number of resource quotas that are
- // allowed to sync concurrently. Larger number = more responsive quota
- // management, but more CPU (and network) load.
- ConcurrentResourceQuotaSyncs int32 `json:"concurrentResourceQuotaSyncs"`
- // concurrentDeploymentSyncs is the number of deployment objects that are
- // allowed to sync concurrently. Larger number = more responsive deployments,
- // but more CPU (and network) load.
- ConcurrentDeploymentSyncs int32 `json:"concurrentDeploymentSyncs"`
- // concurrentDaemonSetSyncs is the number of daemonset objects that are
- // allowed to sync concurrently. Larger number = more responsive daemonset,
- // but more CPU (and network) load.
- ConcurrentDaemonSetSyncs int32 `json:"concurrentDaemonSetSyncs"`
- // concurrentJobSyncs is the number of job objects that are
- // allowed to sync concurrently. Larger number = more responsive jobs,
- // but more CPU (and network) load.
- ConcurrentJobSyncs int32 `json:"concurrentJobSyncs"`
- // concurrentNamespaceSyncs is the number of namespace objects that are
- // allowed to sync concurrently.
- ConcurrentNamespaceSyncs int32 `json:"concurrentNamespaceSyncs"`
- // concurrentSATokenSyncs is the number of service account token syncing operations
- // that will be done concurrently.
- ConcurrentSATokenSyncs int32 `json:"concurrentSATokenSyncs"`
- // lookupCacheSizeForRC is the size of lookup cache for replication controllers.
- // Larger number = more responsive replica management, but more MEM load.
- LookupCacheSizeForRC int32 `json:"lookupCacheSizeForRC"`
- // lookupCacheSizeForRS is the size of lookup cache for replicatsets.
- // Larger number = more responsive replica management, but more MEM load.
- LookupCacheSizeForRS int32 `json:"lookupCacheSizeForRS"`
- // lookupCacheSizeForDaemonSet is the size of lookup cache for daemonsets.
- // Larger number = more responsive daemonset, but more MEM load.
- LookupCacheSizeForDaemonSet int32 `json:"lookupCacheSizeForDaemonSet"`
- // serviceSyncPeriod is the period for syncing services with their external
- // load balancers.
- ServiceSyncPeriod unversioned.Duration `json:"serviceSyncPeriod"`
- // nodeSyncPeriod is the period for syncing nodes from cloudprovider. Longer
- // periods will result in fewer calls to cloud provider, but may delay addition
- // of new nodes to cluster.
- NodeSyncPeriod unversioned.Duration `json:"nodeSyncPeriod"`
- // routeReconciliationPeriod is the period for reconciling routes created for Nodes by cloud provider..
- RouteReconciliationPeriod unversioned.Duration `json:"routeReconciliationPeriod"`
- // resourceQuotaSyncPeriod is the period for syncing quota usage status
- // in the system.
- ResourceQuotaSyncPeriod unversioned.Duration `json:"resourceQuotaSyncPeriod"`
- // namespaceSyncPeriod is the period for syncing namespace life-cycle
- // updates.
- NamespaceSyncPeriod unversioned.Duration `json:"namespaceSyncPeriod"`
- // pvClaimBinderSyncPeriod is the period for syncing persistent volumes
- // and persistent volume claims.
- PVClaimBinderSyncPeriod unversioned.Duration `json:"pvClaimBinderSyncPeriod"`
- // minResyncPeriod is the resync period in reflectors; will be random between
- // minResyncPeriod and 2*minResyncPeriod.
- MinResyncPeriod unversioned.Duration `json:"minResyncPeriod"`
- // terminatedPodGCThreshold is the number of terminated pods that can exist
- // before the terminated pod garbage collector starts deleting terminated pods.
- // If <= 0, the terminated pod garbage collector is disabled.
- TerminatedPodGCThreshold int32 `json:"terminatedPodGCThreshold"`
- // horizontalPodAutoscalerSyncPeriod is the period for syncing the number of
- // pods in horizontal pod autoscaler.
- HorizontalPodAutoscalerSyncPeriod unversioned.Duration `json:"horizontalPodAutoscalerSyncPeriod"`
- // deploymentControllerSyncPeriod is the period for syncing the deployments.
- DeploymentControllerSyncPeriod unversioned.Duration `json:"deploymentControllerSyncPeriod"`
- // podEvictionTimeout is the grace period for deleting pods on failed nodes.
- PodEvictionTimeout unversioned.Duration `json:"podEvictionTimeout"`
- // DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in
- // case of node failure.
- DeletingPodsQps float32 `json:"deletingPodsQps"`
- // DEPRECATED: deletingPodsBurst is the number of nodes on which pods are bursty deleted in
- // case of node failure. For more details look into RateLimiter.
- DeletingPodsBurst int32 `json:"deletingPodsBurst"`
- // nodeMontiorGracePeriod is the amount of time which we allow a running node to be
- // unresponsive before marking it unhealthy. Must be N times more than kubelet's
- // nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet
- // to post node status.
- NodeMonitorGracePeriod unversioned.Duration `json:"nodeMonitorGracePeriod"`
- // registerRetryCount is the number of retries for initial node registration.
- // Retry interval equals node-sync-period.
- RegisterRetryCount int32 `json:"registerRetryCount"`
- // nodeStartupGracePeriod is the amount of time which we allow starting a node to
- // be unresponsive before marking it unhealthy.
- NodeStartupGracePeriod unversioned.Duration `json:"nodeStartupGracePeriod"`
- // nodeMonitorPeriod is the period for syncing NodeStatus in NodeController.
- NodeMonitorPeriod unversioned.Duration `json:"nodeMonitorPeriod"`
- // serviceAccountKeyFile is the filename containing a PEM-encoded private RSA key
- // used to sign service account tokens.
- ServiceAccountKeyFile string `json:"serviceAccountKeyFile"`
- // clusterSigningCertFile is the filename containing a PEM-encoded
- // X509 CA certificate used to issue cluster-scoped certificates
- ClusterSigningCertFile string `json:"clusterSigningCertFile"`
- // clusterSigningCertFile is the filename containing a PEM-encoded
- // RSA or ECDSA private key used to issue cluster-scoped certificates
- ClusterSigningKeyFile string `json:"clusterSigningKeyFile"`
- // approveAllKubeletCSRs tells the CSR controller to approve all CSRs originating
- // from the kubelet bootstrapping group automatically.
- // WARNING: this grants all users with access to the certificates API group
- // the ability to create credentials for any user that has access to the boostrapping
- // user's credentials.
- ApproveAllKubeletCSRsForGroup string `json:"approveAllKubeletCSRsForGroup"`
- // enableProfiling enables profiling via web interface host:port/debug/pprof/
- EnableProfiling bool `json:"enableProfiling"`
- // clusterName is the instance prefix for the cluster.
- ClusterName string `json:"clusterName"`
- // clusterCIDR is CIDR Range for Pods in cluster.
- ClusterCIDR string `json:"clusterCIDR"`
- // serviceCIDR is CIDR Range for Services in cluster.
- ServiceCIDR string `json:"serviceCIDR"`
- // NodeCIDRMaskSize is the mask size for node cidr in cluster.
- NodeCIDRMaskSize int32 `json:"nodeCIDRMaskSize"`
- // allocateNodeCIDRs enables CIDRs for Pods to be allocated and, if
- // ConfigureCloudRoutes is true, to be set on the cloud provider.
- AllocateNodeCIDRs bool `json:"allocateNodeCIDRs"`
- // configureCloudRoutes enables CIDRs allocated with allocateNodeCIDRs
- // to be configured on the cloud provider.
- ConfigureCloudRoutes bool `json:"configureCloudRoutes"`
- // rootCAFile is the root certificate authority will be included in service
- // account's token secret. This must be a valid PEM-encoded CA bundle.
- RootCAFile string `json:"rootCAFile"`
- // contentType is contentType of requests sent to apiserver.
- ContentType string `json:"contentType"`
- // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
- KubeAPIQPS float32 `json:"kubeAPIQPS"`
- // kubeAPIBurst is the burst to use while talking with kubernetes apiserver.
- KubeAPIBurst int32 `json:"kubeAPIBurst"`
- // leaderElection defines the configuration of leader election client.
- LeaderElection LeaderElectionConfiguration `json:"leaderElection"`
- // volumeConfiguration holds configuration for volume related features.
- VolumeConfiguration VolumeConfiguration `json:"volumeConfiguration"`
- // How long to wait between starting controller managers
- ControllerStartInterval unversioned.Duration `json:"controllerStartInterval"`
- // enables the generic garbage collector. MUST be synced with the
- // corresponding flag of the kube-apiserver. WARNING: the generic garbage
- // collector is an alpha feature.
- EnableGarbageCollector bool `json:"enableGarbageCollector"`
- // concurrentGCSyncs is the number of garbage collector workers that are
- // allowed to sync concurrently.
- ConcurrentGCSyncs int32 `json:"concurrentGCSyncs"`
- // nodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is healthy
- NodeEvictionRate float32 `json:"nodeEvictionRate"`
- // secondaryNodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is unhealty
- SecondaryNodeEvictionRate float32 `json:"secondaryNodeEvictionRate"`
- // secondaryNodeEvictionRate is implicitly overridden to 0 for clusters smaller than or equal to largeClusterSizeThreshold
- LargeClusterSizeThreshold int32 `json:"largeClusterSizeThreshold"`
- // Zone is treated as unhealthy in nodeEvictionRate and secondaryNodeEvictionRate when at least
- // unhealthyZoneThreshold (no less than 3) of Nodes in the zone are NotReady
- UnhealthyZoneThreshold float32 `json:"unhealthyZoneThreshold"`
-}
-
-// VolumeConfiguration contains *all* enumerated flags meant to configure all volume
-// plugins. From this config, the controller-manager binary will create many instances of
-// volume.VolumeConfig, each containing only the configuration needed for that plugin which
-// are then passed to the appropriate plugin. The ControllerManager binary is the only part
-// of the code which knows what plugins are supported and which flags correspond to each plugin.
-type VolumeConfiguration struct {
- // enableHostPathProvisioning enables HostPath PV provisioning when running without a
- // cloud provider. This allows testing and development of provisioning features. HostPath
- // provisioning is not supported in any way, won't work in a multi-node cluster, and
- // should not be used for anything other than testing or development.
- EnableHostPathProvisioning bool `json:"enableHostPathProvisioning"`
- // enableDynamicProvisioning enables the provisioning of volumes when running within an environment
- // that supports dynamic provisioning. Defaults to true.
- EnableDynamicProvisioning bool `json:"enableDynamicProvisioning"`
- // persistentVolumeRecyclerConfiguration holds configuration for persistent volume plugins.
- PersistentVolumeRecyclerConfiguration PersistentVolumeRecyclerConfiguration `json:"persitentVolumeRecyclerConfiguration"`
- // volumePluginDir is the full path of the directory in which the flex
- // volume plugin should search for additional third party volume plugins
- FlexVolumePluginDir string `json:"flexVolumePluginDir"`
-}
-
-type PersistentVolumeRecyclerConfiguration struct {
- // maximumRetry is number of retries the PV recycler will execute on failure to recycle
- // PV.
- MaximumRetry int32 `json:"maximumRetry"`
- // minimumTimeoutNFS is the minimum ActiveDeadlineSeconds to use for an NFS Recycler
- // pod.
- MinimumTimeoutNFS int32 `json:"minimumTimeoutNFS"`
- // podTemplateFilePathNFS is the file path to a pod definition used as a template for
- // NFS persistent volume recycling
- PodTemplateFilePathNFS string `json:"podTemplateFilePathNFS"`
- // incrementTimeoutNFS is the increment of time added per Gi to ActiveDeadlineSeconds
- // for an NFS scrubber pod.
- IncrementTimeoutNFS int32 `json:"incrementTimeoutNFS"`
- // podTemplateFilePathHostPath is the file path to a pod definition used as a template for
- // HostPath persistent volume recycling. This is for development and testing only and
- // will not work in a multi-node cluster.
- PodTemplateFilePathHostPath string `json:"podTemplateFilePathHostPath"`
- // minimumTimeoutHostPath is the minimum ActiveDeadlineSeconds to use for a HostPath
- // Recycler pod. This is for development and testing only and will not work in a multi-node
- // cluster.
- MinimumTimeoutHostPath int32 `json:"minimumTimeoutHostPath"`
- // incrementTimeoutHostPath is the increment of time added per Gi to ActiveDeadlineSeconds
- // for a HostPath scrubber pod. This is for development and testing only and will not work
- // in a multi-node cluster.
- IncrementTimeoutHostPath int32 `json:"incrementTimeoutHostPath"`
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/defaults.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/defaults.go
deleted file mode 100644
index 2dc12ab39..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/defaults.go
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
-Copyright 2015 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 (
- "path/filepath"
- "runtime"
- "time"
-
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/kubelet/qos"
- kubetypes "k8s.io/client-go/1.5/pkg/kubelet/types"
- "k8s.io/client-go/1.5/pkg/master/ports"
- kruntime "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-const (
- defaultRootDir = "/var/lib/kubelet"
-
- // When these values are updated, also update test/e2e/framework/util.go
- defaultPodInfraContainerImageName = "gcr.io/google_containers/pause"
- defaultPodInfraContainerImageVersion = "3.0"
- defaultPodInfraContainerImage = defaultPodInfraContainerImageName +
- "-" + runtime.GOARCH + ":" +
- defaultPodInfraContainerImageVersion
-
- // From pkg/kubelet/rkt/rkt.go to avoid circular import
- defaultRktAPIServiceEndpoint = "localhost:15441"
-
- AutoDetectCloudProvider = "auto-detect"
-
- defaultIPTablesMasqueradeBit = 14
- defaultIPTablesDropBit = 15
-)
-
-var zeroDuration = unversioned.Duration{}
-
-func addDefaultingFuncs(scheme *kruntime.Scheme) error {
- return scheme.AddDefaultingFuncs(
- SetDefaults_KubeProxyConfiguration,
- SetDefaults_KubeSchedulerConfiguration,
- SetDefaults_LeaderElectionConfiguration,
- SetDefaults_KubeletConfiguration,
- )
-}
-
-func SetDefaults_KubeProxyConfiguration(obj *KubeProxyConfiguration) {
- if obj.BindAddress == "" {
- obj.BindAddress = "0.0.0.0"
- }
- if obj.HealthzPort == 0 {
- obj.HealthzPort = 10249
- }
- if obj.HealthzBindAddress == "" {
- obj.HealthzBindAddress = "127.0.0.1"
- }
- if obj.OOMScoreAdj == nil {
- temp := int32(qos.KubeProxyOOMScoreAdj)
- obj.OOMScoreAdj = &temp
- }
- if obj.ResourceContainer == "" {
- obj.ResourceContainer = "/kube-proxy"
- }
- if obj.IPTablesSyncPeriod.Duration == 0 {
- obj.IPTablesSyncPeriod = unversioned.Duration{Duration: 30 * time.Second}
- }
- zero := unversioned.Duration{}
- if obj.UDPIdleTimeout == zero {
- obj.UDPIdleTimeout = unversioned.Duration{Duration: 250 * time.Millisecond}
- }
- // If ConntrackMax is set, respect it.
- if obj.ConntrackMax == 0 {
- // If ConntrackMax is *not* set, use per-core scaling.
- if obj.ConntrackMaxPerCore == 0 {
- obj.ConntrackMaxPerCore = 32 * 1024
- }
- if obj.ConntrackMin == 0 {
- obj.ConntrackMin = 128 * 1024
- }
- }
- if obj.IPTablesMasqueradeBit == nil {
- temp := int32(14)
- obj.IPTablesMasqueradeBit = &temp
- }
- if obj.ConntrackTCPEstablishedTimeout == zero {
- obj.ConntrackTCPEstablishedTimeout = unversioned.Duration{Duration: 24 * time.Hour} // 1 day (1/5 default)
- }
-}
-
-func SetDefaults_KubeSchedulerConfiguration(obj *KubeSchedulerConfiguration) {
- if obj.Port == 0 {
- obj.Port = ports.SchedulerPort
- }
- if obj.Address == "" {
- obj.Address = "0.0.0.0"
- }
- if obj.AlgorithmProvider == "" {
- obj.AlgorithmProvider = "DefaultProvider"
- }
- if obj.ContentType == "" {
- obj.ContentType = "application/vnd.kubernetes.protobuf"
- }
- if obj.KubeAPIQPS == 0 {
- obj.KubeAPIQPS = 50.0
- }
- if obj.KubeAPIBurst == 0 {
- obj.KubeAPIBurst = 100
- }
- if obj.SchedulerName == "" {
- obj.SchedulerName = api.DefaultSchedulerName
- }
- if obj.HardPodAffinitySymmetricWeight == 0 {
- obj.HardPodAffinitySymmetricWeight = api.DefaultHardPodAffinitySymmetricWeight
- }
- if obj.FailureDomains == "" {
- obj.FailureDomains = api.DefaultFailureDomains
- }
-}
-
-func SetDefaults_LeaderElectionConfiguration(obj *LeaderElectionConfiguration) {
- zero := unversioned.Duration{}
- if obj.LeaseDuration == zero {
- obj.LeaseDuration = unversioned.Duration{Duration: 15 * time.Second}
- }
- if obj.RenewDeadline == zero {
- obj.RenewDeadline = unversioned.Duration{Duration: 10 * time.Second}
- }
- if obj.RetryPeriod == zero {
- obj.RetryPeriod = unversioned.Duration{Duration: 2 * time.Second}
- }
-}
-
-func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) {
- if obj.Address == "" {
- obj.Address = "0.0.0.0"
- }
- if obj.CloudProvider == "" {
- obj.CloudProvider = AutoDetectCloudProvider
- }
- if obj.CAdvisorPort == 0 {
- obj.CAdvisorPort = 4194
- }
- if obj.VolumeStatsAggPeriod == zeroDuration {
- obj.VolumeStatsAggPeriod = unversioned.Duration{Duration: time.Minute}
- }
- if obj.CertDirectory == "" {
- obj.CertDirectory = "/var/run/kubernetes"
- }
- if obj.ConfigureCBR0 == nil {
- obj.ConfigureCBR0 = boolVar(false)
- }
- if obj.CgroupsPerQOS == nil {
- obj.CgroupsPerQOS = boolVar(false)
- }
- if obj.ContainerRuntime == "" {
- obj.ContainerRuntime = "docker"
- }
- if obj.RuntimeRequestTimeout == zeroDuration {
- obj.RuntimeRequestTimeout = unversioned.Duration{Duration: 2 * time.Minute}
- }
- if obj.CPUCFSQuota == nil {
- obj.CPUCFSQuota = boolVar(true)
- }
- if obj.DockerExecHandlerName == "" {
- obj.DockerExecHandlerName = "native"
- }
- if obj.DockerEndpoint == "" {
- obj.DockerEndpoint = "unix:///var/run/docker.sock"
- }
- if obj.EventBurst == 0 {
- obj.EventBurst = 10
- }
- if obj.EventRecordQPS == nil {
- temp := int32(5)
- obj.EventRecordQPS = &temp
- }
- if obj.EnableControllerAttachDetach == nil {
- obj.EnableControllerAttachDetach = boolVar(true)
- }
- if obj.EnableDebuggingHandlers == nil {
- obj.EnableDebuggingHandlers = boolVar(true)
- }
- if obj.EnableServer == nil {
- obj.EnableServer = boolVar(true)
- }
- if obj.FileCheckFrequency == zeroDuration {
- obj.FileCheckFrequency = unversioned.Duration{Duration: 20 * time.Second}
- }
- if obj.HealthzBindAddress == "" {
- obj.HealthzBindAddress = "127.0.0.1"
- }
- if obj.HealthzPort == 0 {
- obj.HealthzPort = 10248
- }
- if obj.HostNetworkSources == nil {
- obj.HostNetworkSources = []string{kubetypes.AllSource}
- }
- if obj.HostPIDSources == nil {
- obj.HostPIDSources = []string{kubetypes.AllSource}
- }
- if obj.HostIPCSources == nil {
- obj.HostIPCSources = []string{kubetypes.AllSource}
- }
- if obj.HTTPCheckFrequency == zeroDuration {
- obj.HTTPCheckFrequency = unversioned.Duration{Duration: 20 * time.Second}
- }
- if obj.ImageMinimumGCAge == zeroDuration {
- obj.ImageMinimumGCAge = unversioned.Duration{Duration: 2 * time.Minute}
- }
- if obj.ImageGCHighThresholdPercent == nil {
- temp := int32(90)
- obj.ImageGCHighThresholdPercent = &temp
- }
- if obj.ImageGCLowThresholdPercent == nil {
- temp := int32(80)
- obj.ImageGCLowThresholdPercent = &temp
- }
- if obj.LowDiskSpaceThresholdMB == 0 {
- obj.LowDiskSpaceThresholdMB = 256
- }
- if obj.MasterServiceNamespace == "" {
- obj.MasterServiceNamespace = api.NamespaceDefault
- }
- if obj.MaxContainerCount == nil {
- temp := int32(-1)
- obj.MaxContainerCount = &temp
- }
- if obj.MaxPerPodContainerCount == 0 {
- obj.MaxPerPodContainerCount = 1
- }
- if obj.MaxOpenFiles == 0 {
- obj.MaxOpenFiles = 1000000
- }
- if obj.MaxPods == 0 {
- obj.MaxPods = 110
- }
- if obj.MinimumGCAge == zeroDuration {
- obj.MinimumGCAge = unversioned.Duration{Duration: 0}
- }
- if obj.NonMasqueradeCIDR == "" {
- obj.NonMasqueradeCIDR = "10.0.0.0/8"
- }
- if obj.VolumePluginDir == "" {
- obj.VolumePluginDir = "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"
- }
- if obj.NodeStatusUpdateFrequency == zeroDuration {
- obj.NodeStatusUpdateFrequency = unversioned.Duration{Duration: 10 * time.Second}
- }
- if obj.OOMScoreAdj == nil {
- temp := int32(qos.KubeletOOMScoreAdj)
- obj.OOMScoreAdj = &temp
- }
- if obj.PodInfraContainerImage == "" {
- obj.PodInfraContainerImage = defaultPodInfraContainerImage
- }
- if obj.Port == 0 {
- obj.Port = ports.KubeletPort
- }
- if obj.ReadOnlyPort == 0 {
- obj.ReadOnlyPort = ports.KubeletReadOnlyPort
- }
- if obj.RegisterNode == nil {
- obj.RegisterNode = boolVar(true)
- }
- if obj.RegisterSchedulable == nil {
- obj.RegisterSchedulable = boolVar(true)
- }
- if obj.RegistryBurst == 0 {
- obj.RegistryBurst = 10
- }
- if obj.RegistryPullQPS == nil {
- temp := int32(5)
- obj.RegistryPullQPS = &temp
- }
- if obj.ResolverConfig == "" {
- obj.ResolverConfig = kubetypes.ResolvConfDefault
- }
- if obj.RktAPIEndpoint == "" {
- obj.RktAPIEndpoint = defaultRktAPIServiceEndpoint
- }
- if obj.RootDirectory == "" {
- obj.RootDirectory = defaultRootDir
- }
- if obj.SerializeImagePulls == nil {
- obj.SerializeImagePulls = boolVar(true)
- }
- if obj.SeccompProfileRoot == "" {
- filepath.Join(defaultRootDir, "seccomp")
- }
- if obj.StreamingConnectionIdleTimeout == zeroDuration {
- obj.StreamingConnectionIdleTimeout = unversioned.Duration{Duration: 4 * time.Hour}
- }
- if obj.SyncFrequency == zeroDuration {
- obj.SyncFrequency = unversioned.Duration{Duration: 1 * time.Minute}
- }
- if obj.ReconcileCIDR == nil {
- obj.ReconcileCIDR = boolVar(true)
- }
- if obj.ContentType == "" {
- obj.ContentType = "application/vnd.kubernetes.protobuf"
- }
- if obj.KubeAPIQPS == nil {
- temp := int32(5)
- obj.KubeAPIQPS = &temp
- }
- if obj.KubeAPIBurst == 0 {
- obj.KubeAPIBurst = 10
- }
- if obj.OutOfDiskTransitionFrequency == zeroDuration {
- obj.OutOfDiskTransitionFrequency = unversioned.Duration{Duration: 5 * time.Minute}
- }
- if string(obj.HairpinMode) == "" {
- obj.HairpinMode = PromiscuousBridge
- }
- if obj.EvictionHard == nil {
- temp := "memory.available<100Mi"
- obj.EvictionHard = &temp
- }
- if obj.EvictionPressureTransitionPeriod == zeroDuration {
- obj.EvictionPressureTransitionPeriod = unversioned.Duration{Duration: 5 * time.Minute}
- }
- if obj.SystemReserved == nil {
- obj.SystemReserved = make(map[string]string)
- }
- if obj.KubeReserved == nil {
- obj.KubeReserved = make(map[string]string)
- }
- if obj.MakeIPTablesUtilChains == nil {
- obj.MakeIPTablesUtilChains = boolVar(true)
- }
- if obj.IPTablesMasqueradeBit == nil {
- temp := int32(defaultIPTablesMasqueradeBit)
- obj.IPTablesMasqueradeBit = &temp
- }
- if obj.IPTablesDropBit == nil {
- temp := int32(defaultIPTablesDropBit)
- obj.IPTablesDropBit = &temp
- }
-}
-
-func boolVar(b bool) *bool {
- return &b
-}
-
-var (
- defaultCfg = KubeletConfiguration{}
-)
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/doc.go
deleted file mode 100644
index 233f24f2f..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// +k8s:deepcopy-gen=package,register
-// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/componentconfig
-// +k8s:openapi-gen=true
-
-package v1alpha1
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/register.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/register.go
deleted file mode 100644
index 7f301fdda..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/register.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2015 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/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "componentconfig"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
-
-var (
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs)
- AddToScheme = SchemeBuilder.AddToScheme
-)
-
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &KubeProxyConfiguration{},
- &KubeSchedulerConfiguration{},
- &KubeletConfiguration{},
- )
- return nil
-}
-
-func (obj *KubeProxyConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
-func (obj *KubeSchedulerConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
-func (obj *KubeletConfiguration) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/types.go
deleted file mode 100644
index 392955418..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/types.go
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
-Copyright 2015 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/client-go/1.5/pkg/api/unversioned"
-
-type KubeProxyConfiguration struct {
- unversioned.TypeMeta
-
- // bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0
- // for all interfaces)
- BindAddress string `json:"bindAddress"`
- // clusterCIDR is the CIDR range of the pods in the cluster. It is used to
- // bridge traffic coming from outside of the cluster. If not provided,
- // no off-cluster bridging will be performed.
- ClusterCIDR string `json:"clusterCIDR"`
- // healthzBindAddress is the IP address for the health check server to serve on,
- // defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)
- HealthzBindAddress string `json:"healthzBindAddress"`
- // healthzPort is the port to bind the health check server. Use 0 to disable.
- HealthzPort int32 `json:"healthzPort"`
- // hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.
- HostnameOverride string `json:"hostnameOverride"`
- // iptablesMasqueradeBit is the bit of the iptables fwmark space to use for SNAT if using
- // the pure iptables proxy mode. Values must be within the range [0, 31].
- IPTablesMasqueradeBit *int32 `json:"iptablesMasqueradeBit"`
- // iptablesSyncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m',
- // '2h22m'). Must be greater than 0.
- IPTablesSyncPeriod unversioned.Duration `json:"iptablesSyncPeriodSeconds"`
- // kubeconfigPath is the path to the kubeconfig file with authorization information (the
- // master location is set by the master flag).
- KubeconfigPath string `json:"kubeconfigPath"`
- // masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.
- MasqueradeAll bool `json:"masqueradeAll"`
- // master is the address of the Kubernetes API server (overrides any value in kubeconfig)
- Master string `json:"master"`
- // oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within
- // the range [-1000, 1000]
- OOMScoreAdj *int32 `json:"oomScoreAdj"`
- // mode specifies which proxy mode to use.
- Mode ProxyMode `json:"mode"`
- // portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed
- // in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.
- PortRange string `json:"portRange"`
- // resourceContainer is the bsolute name of the resource-only container to create and run
- // the Kube-proxy in (Default: /kube-proxy).
- ResourceContainer string `json:"resourceContainer"`
- // udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s').
- // Must be greater than 0. Only applicable for proxyMode=userspace.
- UDPIdleTimeout unversioned.Duration `json:"udpTimeoutMilliseconds"`
- // conntrackMax is the maximum number of NAT connections to track (0 to
- // leave as-is). This takes precedence over conntrackMaxPerCore and conntrackMin.
- ConntrackMax int32 `json:"conntrackMax"`
- // conntrackMaxPerCore is the maximum number of NAT connections to track
- // per CPU core (0 to leave the limit as-is and ignore conntrackMin).
- ConntrackMaxPerCore int32 `json:"conntrackMaxPerCore"`
- // conntrackMin is the minimum value of connect-tracking records to allocate,
- // regardless of conntrackMaxPerCore (set conntrackMaxPerCore=0 to leave the limit as-is).
- ConntrackMin int32 `json:"conntrackMin"`
- // conntrackTCPEstablishedTimeout is how long an idle TCP connection will be kept open
- // (e.g. '250ms', '2s'). Must be greater than 0.
- ConntrackTCPEstablishedTimeout unversioned.Duration `json:"conntrackTCPEstablishedTimeout"`
-}
-
-// Currently two modes of proxying are available: 'userspace' (older, stable) or 'iptables'
-// (experimental). If blank, look at the Node object on the Kubernetes API and respect the
-// 'net.experimental.kubernetes.io/proxy-mode' annotation if provided. Otherwise use the
-// best-available proxy (currently userspace, but may change in future versions). If the
-// iptables proxy is selected, regardless of how, but the system's kernel or iptables
-// versions are insufficient, this always falls back to the userspace proxy.
-type ProxyMode string
-
-const (
- ProxyModeUserspace ProxyMode = "userspace"
- ProxyModeIPTables ProxyMode = "iptables"
-)
-
-type KubeSchedulerConfiguration struct {
- unversioned.TypeMeta
-
- // port is the port that the scheduler's http service runs on.
- Port int `json:"port"`
- // address is the IP address to serve on.
- Address string `json:"address"`
- // algorithmProvider is the scheduling algorithm provider to use.
- AlgorithmProvider string `json:"algorithmProvider"`
- // policyConfigFile is the filepath to the scheduler policy configuration.
- PolicyConfigFile string `json:"policyConfigFile"`
- // enableProfiling enables profiling via web interface.
- EnableProfiling *bool `json:"enableProfiling"`
- // contentType is contentType of requests sent to apiserver.
- ContentType string `json:"contentType"`
- // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
- KubeAPIQPS float32 `json:"kubeAPIQPS"`
- // kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver.
- KubeAPIBurst int `json:"kubeAPIBurst"`
- // schedulerName is name of the scheduler, used to select which pods
- // will be processed by this scheduler, based on pod's annotation with
- // key 'scheduler.alpha.kubernetes.io/name'.
- SchedulerName string `json:"schedulerName"`
- // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
- // corresponding to every RequiredDuringScheduling affinity rule.
- // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100.
- HardPodAffinitySymmetricWeight int `json:"hardPodAffinitySymmetricWeight"`
- // Indicate the "all topologies" set for empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity.
- FailureDomains string `json:"failureDomains"`
- // leaderElection defines the configuration of leader election client.
- LeaderElection LeaderElectionConfiguration `json:"leaderElection"`
-}
-
-// HairpinMode denotes how the kubelet should configure networking to handle
-// hairpin packets.
-type HairpinMode string
-
-// Enum settings for different ways to handle hairpin packets.
-const (
- // Set the hairpin flag on the veth of containers in the respective
- // container runtime.
- HairpinVeth = "hairpin-veth"
- // Make the container bridge promiscuous. This will force it to accept
- // hairpin packets, even if the flag isn't set on ports of the bridge.
- PromiscuousBridge = "promiscuous-bridge"
- // Neither of the above. If the kubelet is started in this hairpin mode
- // and kube-proxy is running in iptables mode, hairpin packets will be
- // dropped by the container bridge.
- HairpinNone = "none"
-)
-
-// LeaderElectionConfiguration defines the configuration of leader election
-// clients for components that can run with leader election enabled.
-type LeaderElectionConfiguration struct {
- // leaderElect enables a leader election client to gain leadership
- // before executing the main loop. Enable this when running replicated
- // components for high availability.
- LeaderElect *bool `json:"leaderElect"`
- // leaseDuration is the duration that non-leader candidates will wait
- // after observing a leadership renewal until attempting to acquire
- // leadership of a led but unrenewed leader slot. This is effectively the
- // maximum duration that a leader can be stopped before it is replaced
- // by another candidate. This is only applicable if leader election is
- // enabled.
- LeaseDuration unversioned.Duration `json:"leaseDuration"`
- // renewDeadline is the interval between attempts by the acting master to
- // renew a leadership slot before it stops leading. This must be less
- // than or equal to the lease duration. This is only applicable if leader
- // election is enabled.
- RenewDeadline unversioned.Duration `json:"renewDeadline"`
- // retryPeriod is the duration the clients should wait between attempting
- // acquisition and renewal of a leadership. This is only applicable if
- // leader election is enabled.
- RetryPeriod unversioned.Duration `json:"retryPeriod"`
-}
-
-type KubeletConfiguration struct {
- unversioned.TypeMeta
-
- // podManifestPath is the path to the directory containing pod manifests to
- // run, or the path to a single manifest file
- PodManifestPath string `json:"podManifestPath"`
- // syncFrequency is the max period between synchronizing running
- // containers and config
- SyncFrequency unversioned.Duration `json:"syncFrequency"`
- // fileCheckFrequency is the duration between checking config files for
- // new data
- FileCheckFrequency unversioned.Duration `json:"fileCheckFrequency"`
- // httpCheckFrequency is the duration between checking http for new data
- HTTPCheckFrequency unversioned.Duration `json:"httpCheckFrequency"`
- // manifestURL is the URL for accessing the container manifest
- ManifestURL string `json:"manifestURL"`
- // manifestURLHeader is the HTTP header to use when accessing the manifest
- // URL, with the key separated from the value with a ':', as in 'key:value'
- ManifestURLHeader string `json:"manifestURLHeader"`
- // enableServer enables the Kubelet's server
- EnableServer *bool `json:"enableServer"`
- // address is the IP address for the Kubelet to serve on (set to 0.0.0.0
- // for all interfaces)
- Address string `json:"address"`
- // port is the port for the Kubelet to serve on.
- Port int32 `json:"port"`
- // readOnlyPort is the read-only port for the Kubelet to serve on with
- // no authentication/authorization (set to 0 to disable)
- ReadOnlyPort int32 `json:"readOnlyPort"`
- // tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert,
- // if any, concatenated after server cert). If tlsCertFile and
- // tlsPrivateKeyFile are not provided, a self-signed certificate
- // and key are generated for the public address and saved to the directory
- // passed to certDir.
- TLSCertFile string `json:"tlsCertFile"`
- // tlsPrivateKeyFile is the ile containing x509 private key matching
- // tlsCertFile.
- TLSPrivateKeyFile string `json:"tlsPrivateKeyFile"`
- // certDirectory is the directory where the TLS certs are located (by
- // default /var/run/kubernetes). If tlsCertFile and tlsPrivateKeyFile
- // are provided, this flag will be ignored.
- CertDirectory string `json:"certDirectory"`
- // hostnameOverride is the hostname used to identify the kubelet instead
- // of the actual hostname.
- HostnameOverride string `json:"hostnameOverride"`
- // podInfraContainerImage is the image whose network/ipc namespaces
- // containers in each pod will use.
- PodInfraContainerImage string `json:"podInfraContainerImage"`
- // dockerEndpoint is the path to the docker endpoint to communicate with.
- DockerEndpoint string `json:"dockerEndpoint"`
- // rootDirectory is the directory path to place kubelet files (volume
- // mounts,etc).
- RootDirectory string `json:"rootDirectory"`
- // seccompProfileRoot is the directory path for seccomp profiles.
- SeccompProfileRoot string `json:"seccompProfileRoot"`
- // allowPrivileged enables containers to request privileged mode.
- // Defaults to false.
- AllowPrivileged *bool `json:"allowPrivileged"`
- // hostNetworkSources is a comma-separated list of sources from which the
- // Kubelet allows pods to use of host network. Defaults to "*". Valid
- // options are "file", "http", "api", and "*" (all sources).
- HostNetworkSources []string `json:"hostNetworkSources"`
- // hostPIDSources is a comma-separated list of sources from which the
- // Kubelet allows pods to use the host pid namespace. Defaults to "*".
- HostPIDSources []string `json:"hostPIDSources"`
- // hostIPCSources is a comma-separated list of sources from which the
- // Kubelet allows pods to use the host ipc namespace. Defaults to "*".
- HostIPCSources []string `json:"hostIPCSources"`
- // registryPullQPS is the limit of registry pulls per second. If 0,
- // unlimited. Set to 0 for no limit. Defaults to 5.0.
- RegistryPullQPS *int32 `json:"registryPullQPS"`
- // registryBurst is the maximum size of a bursty pulls, temporarily allows
- // pulls to burst to this number, while still not exceeding registryQps.
- // Only used if registryQPS > 0.
- RegistryBurst int32 `json:"registryBurst"`
- // eventRecordQPS is the maximum event creations per second. If 0, there
- // is no limit enforced.
- EventRecordQPS *int32 `json:"eventRecordQPS"`
- // eventBurst is the maximum size of a bursty event records, temporarily
- // allows event records to burst to this number, while still not exceeding
- // event-qps. Only used if eventQps > 0
- EventBurst int32 `json:"eventBurst"`
- // enableDebuggingHandlers enables server endpoints for log collection
- // and local running of containers and commands
- EnableDebuggingHandlers *bool `json:"enableDebuggingHandlers"`
- // minimumGCAge is the minimum age for a finished container before it is
- // garbage collected.
- MinimumGCAge unversioned.Duration `json:"minimumGCAge"`
- // maxPerPodContainerCount is the maximum number of old instances to
- // retain per container. Each container takes up some disk space.
- MaxPerPodContainerCount int32 `json:"maxPerPodContainerCount"`
- // maxContainerCount is the maximum number of old instances of containers
- // to retain globally. Each container takes up some disk space.
- MaxContainerCount *int32 `json:"maxContainerCount"`
- // cAdvisorPort is the port of the localhost cAdvisor endpoint
- CAdvisorPort int32 `json:"cAdvisorPort"`
- // healthzPort is the port of the localhost healthz endpoint
- HealthzPort int32 `json:"healthzPort"`
- // healthzBindAddress is the IP address for the healthz server to serve
- // on.
- HealthzBindAddress string `json:"healthzBindAddress"`
- // oomScoreAdj is The oom-score-adj value for kubelet process. Values
- // must be within the range [-1000, 1000].
- OOMScoreAdj *int32 `json:"oomScoreAdj"`
- // registerNode enables automatic registration with the apiserver.
- RegisterNode *bool `json:"registerNode"`
- // clusterDomain is the DNS domain for this cluster. If set, kubelet will
- // configure all containers to search this domain in addition to the
- // host's search domains.
- ClusterDomain string `json:"clusterDomain"`
- // masterServiceNamespace is The namespace from which the kubernetes
- // master services should be injected into pods.
- MasterServiceNamespace string `json:"masterServiceNamespace"`
- // clusterDNS is the IP address for a cluster DNS server. If set, kubelet
- // will configure all containers to use this for DNS resolution in
- // addition to the host's DNS servers
- ClusterDNS string `json:"clusterDNS"`
- // streamingConnectionIdleTimeout is the maximum time a streaming connection
- // can be idle before the connection is automatically closed.
- StreamingConnectionIdleTimeout unversioned.Duration `json:"streamingConnectionIdleTimeout"`
- // nodeStatusUpdateFrequency is the frequency that kubelet posts node
- // status to master. Note: be cautious when changing the constant, it
- // must work with nodeMonitorGracePeriod in nodecontroller.
- NodeStatusUpdateFrequency unversioned.Duration `json:"nodeStatusUpdateFrequency"`
- // imageMinimumGCAge is the minimum age for an unused image before it is
- // garbage collected.
- ImageMinimumGCAge unversioned.Duration `json:"imageMinimumGCAge"`
- // imageGCHighThresholdPercent is the percent of disk usage after which
- // image garbage collection is always run. The percent is calculated as
- // this field value out of 100.
- ImageGCHighThresholdPercent *int32 `json:"imageGCHighThresholdPercent"`
- // imageGCLowThresholdPercent is the percent of disk usage before which
- // image garbage collection is never run. Lowest disk usage to garbage
- // collect to. The percent is calculated as this field value out of 100.
- ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent"`
- // lowDiskSpaceThresholdMB is the absolute free disk space, in MB, to
- // maintain. When disk space falls below this threshold, new pods would
- // be rejected.
- LowDiskSpaceThresholdMB int32 `json:"lowDiskSpaceThresholdMB"`
- // How frequently to calculate and cache volume disk usage for all pods
- VolumeStatsAggPeriod unversioned.Duration `json:"volumeStatsAggPeriod"`
- // networkPluginName is the name of the network plugin to be invoked for
- // various events in kubelet/pod lifecycle
- NetworkPluginName string `json:"networkPluginName"`
- // networkPluginDir is the full path of the directory in which to search
- // for network plugins (and, for backwards-compat, CNI config files)
- NetworkPluginDir string `json:"networkPluginDir"`
- // CNIConfDir is the full path of the directory in which to search for
- // CNI config files
- CNIConfDir string `json:"cniConfDir"`
- // CNIBinDir is the full path of the directory in which to search for
- // CNI plugin binaries
- CNIBinDir string `json:"cniBinDir"`
- // networkPluginMTU is the MTU to be passed to the network plugin,
- // and overrides the default MTU for cases where it cannot be automatically
- // computed (such as IPSEC).
- NetworkPluginMTU int32 `json:"networkPluginMTU"`
- // volumePluginDir is the full path of the directory in which to search
- // for additional third party volume plugins
- VolumePluginDir string `json:"volumePluginDir"`
- // cloudProvider is the provider for cloud services.
- CloudProvider string `json:"cloudProvider"`
- // cloudConfigFile is the path to the cloud provider configuration file.
- CloudConfigFile string `json:"cloudConfigFile"`
- // kubeletCgroups is the absolute name of cgroups to isolate the kubelet in.
- KubeletCgroups string `json:"kubeletCgroups"`
- // runtimeCgroups are cgroups that container runtime is expected to be isolated in.
- RuntimeCgroups string `json:"runtimeCgroups"`
- // systemCgroups is absolute name of cgroups in which to place
- // all non-kernel processes that are not already in a container. Empty
- // for no container. Rolling back the flag requires a reboot.
- SystemCgroups string `json:"systemCgroups"`
- // cgroupRoot is the root cgroup to use for pods. This is handled by the
- // container runtime on a best effort basis.
- CgroupRoot string `json:"cgroupRoot"`
- // Enable QoS based Cgroup hierarchy: top level cgroups for QoS Classes
- // And all Burstable and BestEffort pods are brought up under their
- // specific top level QoS cgroup.
- CgroupsPerQOS *bool `json:"CgroupsPerQOS,omitempty"`
- // containerRuntime is the container runtime to use.
- ContainerRuntime string `json:"containerRuntime"`
- // remoteRuntimeEndpoint is the endpoint of remote runtime service
- RemoteRuntimeEndpoint string `json:"remoteRuntimeEndpoint"`
- // remoteImageEndpoint is the endpoint of remote image service
- RemoteImageEndpoint string `json:"remoteImageEndpoint"`
- // runtimeRequestTimeout is the timeout for all runtime requests except long running
- // requests - pull, logs, exec and attach.
- RuntimeRequestTimeout unversioned.Duration `json:"runtimeRequestTimeout"`
- // rktPath is the path of rkt binary. Leave empty to use the first rkt in
- // $PATH.
- RktPath string `json:"rktPath"`
- // rktApiEndpoint is the endpoint of the rkt API service to communicate with.
- RktAPIEndpoint string `json:"rktAPIEndpoint"`
- // rktStage1Image is the image to use as stage1. Local paths and
- // http/https URLs are supported.
- RktStage1Image string `json:"rktStage1Image"`
- // lockFilePath is the path that kubelet will use to as a lock file.
- // It uses this file as a lock to synchronize with other kubelet processes
- // that may be running.
- LockFilePath *string `json:"lockFilePath"`
- // ExitOnLockContention is a flag that signifies to the kubelet that it is running
- // in "bootstrap" mode. This requires that 'LockFilePath' has been set.
- // This will cause the kubelet to listen to inotify events on the lock file,
- // releasing it and exiting when another process tries to open that file.
- ExitOnLockContention bool `json:"exitOnLockContention"`
- // configureCBR0 enables the kublet to configure cbr0 based on
- // Node.Spec.PodCIDR.
- ConfigureCBR0 *bool `json:"configureCbr0"`
- // How should the kubelet configure the container bridge for hairpin packets.
- // Setting this flag allows endpoints in a Service to loadbalance back to
- // themselves if they should try to access their own Service. Values:
- // "promiscuous-bridge": make the container bridge promiscuous.
- // "hairpin-veth": set the hairpin flag on container veth interfaces.
- // "none": do nothing.
- // Setting --configure-cbr0 to false implies that to achieve hairpin NAT
- // one must set --hairpin-mode=veth-flag, because bridge assumes the
- // existence of a container bridge named cbr0.
- HairpinMode string `json:"hairpinMode"`
- // The node has babysitter process monitoring docker and kubelet.
- BabysitDaemons bool `json:"babysitDaemons"`
- // maxPods is the number of pods that can run on this Kubelet.
- MaxPods int32 `json:"maxPods"`
- // nvidiaGPUs is the number of NVIDIA GPU devices on this node.
- NvidiaGPUs int32 `json:"nvidiaGPUs"`
- // dockerExecHandlerName is the handler to use when executing a command
- // in a container. Valid values are 'native' and 'nsenter'. Defaults to
- // 'native'.
- DockerExecHandlerName string `json:"dockerExecHandlerName"`
- // The CIDR to use for pod IP addresses, only used in standalone mode.
- // In cluster mode, this is obtained from the master.
- PodCIDR string `json:"podCIDR"`
- // ResolverConfig is the resolver configuration file used as the basis
- // for the container DNS resolution configuration."), []
- ResolverConfig string `json:"resolvConf"`
- // cpuCFSQuota is Enable CPU CFS quota enforcement for containers that
- // specify CPU limits
- CPUCFSQuota *bool `json:"cpuCFSQuota"`
- // containerized should be set to true if kubelet is running in a container.
- Containerized *bool `json:"containerized"`
- // maxOpenFiles is Number of files that can be opened by Kubelet process.
- MaxOpenFiles int64 `json:"maxOpenFiles"`
- // reconcileCIDR is Reconcile node CIDR with the CIDR specified by the
- // API server. No-op if register-node or configure-cbr0 is false.
- ReconcileCIDR *bool `json:"reconcileCIDR"`
- // registerSchedulable tells the kubelet to register the node as
- // schedulable. No-op if register-node is false.
- RegisterSchedulable *bool `json:"registerSchedulable"`
- // contentType is contentType of requests sent to apiserver.
- ContentType string `json:"contentType"`
- // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver
- KubeAPIQPS *int32 `json:"kubeAPIQPS"`
- // kubeAPIBurst is the burst to allow while talking with kubernetes
- // apiserver
- KubeAPIBurst int32 `json:"kubeAPIBurst"`
- // serializeImagePulls when enabled, tells the Kubelet to pull images one
- // at a time. We recommend *not* changing the default value on nodes that
- // run docker daemon with version < 1.9 or an Aufs storage backend.
- // Issue #10959 has more details.
- SerializeImagePulls *bool `json:"serializeImagePulls"`
- // experimentalFlannelOverlay enables experimental support for starting the
- // kubelet with the default overlay network (flannel). Assumes flanneld
- // is already running in client mode.
- ExperimentalFlannelOverlay bool `json:"experimentalFlannelOverlay"`
- // outOfDiskTransitionFrequency is duration for which the kubelet has to
- // wait before transitioning out of out-of-disk node condition status.
- OutOfDiskTransitionFrequency unversioned.Duration `json:"outOfDiskTransitionFrequency"`
- // nodeIP is IP address of the node. If set, kubelet will use this IP
- // address for the node.
- NodeIP string `json:"nodeIP"`
- // nodeLabels to add when registering the node in the cluster.
- NodeLabels map[string]string `json:"nodeLabels"`
- // nonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade.
- NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"`
- // enable gathering custom metrics.
- EnableCustomMetrics bool `json:"enableCustomMetrics"`
- // Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.
- EvictionHard *string `json:"evictionHard"`
- // Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'.
- EvictionSoft string `json:"evictionSoft"`
- // Comma-delimeted list of grace periods for each soft eviction signal. For example, 'memory.available=30s'.
- EvictionSoftGracePeriod string `json:"evictionSoftGracePeriod"`
- // Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition.
- EvictionPressureTransitionPeriod unversioned.Duration `json:"evictionPressureTransitionPeriod"`
- // Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met.
- EvictionMaxPodGracePeriod int32 `json:"evictionMaxPodGracePeriod"`
- // Comma-delimited list of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure.
- EvictionMinimumReclaim string `json:"evictionMinimumReclaim"`
- // Maximum number of pods per core. Cannot exceed MaxPods
- PodsPerCore int32 `json:"podsPerCore"`
- // enableControllerAttachDetach enables the Attach/Detach controller to
- // manage attachment/detachment of volumes scheduled to this node, and
- // disables kubelet from executing any attach/detach operations
- EnableControllerAttachDetach *bool `json:"enableControllerAttachDetach"`
- // A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs
- // that describe resources reserved for non-kubernetes components.
- // Currently only cpu and memory are supported. [default=none]
- // See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail.
- SystemReserved map[string]string `json:"systemReserved"`
- // A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs
- // that describe resources reserved for kubernetes system components.
- // Currently only cpu and memory are supported. [default=none]
- // See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail.
- KubeReserved map[string]string `json:"kubeReserved"`
- // Default behaviour for kernel tuning
- ProtectKernelDefaults bool `json:"protectKernelDefaults"`
- // If true, Kubelet ensures a set of iptables rules are present on host.
- // These rules will serve as utility rules for various components, e.g. KubeProxy.
- // The rules will be created based on IPTablesMasqueradeBit and IPTablesDropBit.
- MakeIPTablesUtilChains *bool `json:"makeIPTablesUtilChains"`
- // iptablesMasqueradeBit is the bit of the iptables fwmark space to mark for SNAT
- // Values must be within the range [0, 31]. Must be different from other mark bits.
- // Warning: Please match the value of corresponding parameter in kube-proxy
- // TODO: clean up IPTablesMasqueradeBit in kube-proxy
- IPTablesMasqueradeBit *int32 `json:"iptablesMasqueradeBit"`
- // iptablesDropBit is the bit of the iptables fwmark space to mark for dropping packets.
- // Values must be within the range [0, 31]. Must be different from other mark bits.
- IPTablesDropBit *int32 `json:"iptablesDropBit"`
- // Whitelist of unsafe sysctls or sysctl patterns (ending in *). Use these at your own risk.
- // Resource isolation might be lacking and pod might influence each other on the same node.
- AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"`
- // How to integrate with runtime. If set to CRI, kubelet will switch to
- // using the new Container Runtine Interface.
- ExperimentalRuntimeIntegrationType string `json:"experimentalRuntimeIntegrationType,omitempty"`
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go
deleted file mode 100644
index 1a29cff33..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go
+++ /dev/null
@@ -1,556 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 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 conversion-gen. Do not edit it manually!
-
-package v1alpha1
-
-import (
- api "k8s.io/client-go/1.5/pkg/api"
- componentconfig "k8s.io/client-go/1.5/pkg/apis/componentconfig"
- conversion "k8s.io/client-go/1.5/pkg/conversion"
- runtime "k8s.io/client-go/1.5/pkg/runtime"
- config "k8s.io/client-go/1.5/pkg/util/config"
-)
-
-func init() {
- SchemeBuilder.Register(RegisterConversions)
-}
-
-// RegisterConversions adds conversion functions to the given scheme.
-// Public to allow building arbitrary schemes.
-func RegisterConversions(scheme *runtime.Scheme) error {
- return scheme.AddGeneratedConversionFuncs(
- Convert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration,
- Convert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration,
- Convert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration,
- Convert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration,
- Convert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfiguration,
- Convert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfiguration,
- Convert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration,
- Convert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration,
- )
-}
-
-func autoConvert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration(in *KubeProxyConfiguration, out *componentconfig.KubeProxyConfiguration, s conversion.Scope) error {
- SetDefaults_KubeProxyConfiguration(in)
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- out.BindAddress = in.BindAddress
- out.ClusterCIDR = in.ClusterCIDR
- out.HealthzBindAddress = in.HealthzBindAddress
- out.HealthzPort = in.HealthzPort
- out.HostnameOverride = in.HostnameOverride
- out.IPTablesMasqueradeBit = in.IPTablesMasqueradeBit
- out.IPTablesSyncPeriod = in.IPTablesSyncPeriod
- out.KubeconfigPath = in.KubeconfigPath
- out.MasqueradeAll = in.MasqueradeAll
- out.Master = in.Master
- out.OOMScoreAdj = in.OOMScoreAdj
- out.Mode = componentconfig.ProxyMode(in.Mode)
- out.PortRange = in.PortRange
- out.ResourceContainer = in.ResourceContainer
- out.UDPIdleTimeout = in.UDPIdleTimeout
- out.ConntrackMax = in.ConntrackMax
- out.ConntrackMaxPerCore = in.ConntrackMaxPerCore
- out.ConntrackMin = in.ConntrackMin
- out.ConntrackTCPEstablishedTimeout = in.ConntrackTCPEstablishedTimeout
- return nil
-}
-
-func Convert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration(in *KubeProxyConfiguration, out *componentconfig.KubeProxyConfiguration, s conversion.Scope) error {
- return autoConvert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration(in, out, s)
-}
-
-func autoConvert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in *componentconfig.KubeProxyConfiguration, out *KubeProxyConfiguration, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- out.BindAddress = in.BindAddress
- out.ClusterCIDR = in.ClusterCIDR
- out.HealthzBindAddress = in.HealthzBindAddress
- out.HealthzPort = in.HealthzPort
- out.HostnameOverride = in.HostnameOverride
- out.IPTablesMasqueradeBit = in.IPTablesMasqueradeBit
- out.IPTablesSyncPeriod = in.IPTablesSyncPeriod
- out.KubeconfigPath = in.KubeconfigPath
- out.MasqueradeAll = in.MasqueradeAll
- out.Master = in.Master
- out.OOMScoreAdj = in.OOMScoreAdj
- out.Mode = ProxyMode(in.Mode)
- out.PortRange = in.PortRange
- out.ResourceContainer = in.ResourceContainer
- out.UDPIdleTimeout = in.UDPIdleTimeout
- out.ConntrackMax = in.ConntrackMax
- out.ConntrackMaxPerCore = in.ConntrackMaxPerCore
- out.ConntrackMin = in.ConntrackMin
- out.ConntrackTCPEstablishedTimeout = in.ConntrackTCPEstablishedTimeout
- return nil
-}
-
-func Convert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in *componentconfig.KubeProxyConfiguration, out *KubeProxyConfiguration, s conversion.Scope) error {
- return autoConvert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in, out, s)
-}
-
-func autoConvert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration(in *KubeSchedulerConfiguration, out *componentconfig.KubeSchedulerConfiguration, s conversion.Scope) error {
- SetDefaults_KubeSchedulerConfiguration(in)
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- out.Port = int32(in.Port)
- out.Address = in.Address
- out.AlgorithmProvider = in.AlgorithmProvider
- out.PolicyConfigFile = in.PolicyConfigFile
- if err := api.Convert_Pointer_bool_To_bool(&in.EnableProfiling, &out.EnableProfiling, s); err != nil {
- return err
- }
- out.ContentType = in.ContentType
- out.KubeAPIQPS = in.KubeAPIQPS
- out.KubeAPIBurst = int32(in.KubeAPIBurst)
- out.SchedulerName = in.SchedulerName
- out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight
- out.FailureDomains = in.FailureDomains
- if err := Convert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil {
- return err
- }
- return nil
-}
-
-func Convert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration(in *KubeSchedulerConfiguration, out *componentconfig.KubeSchedulerConfiguration, s conversion.Scope) error {
- return autoConvert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration(in, out, s)
-}
-
-func autoConvert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in *componentconfig.KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- out.Port = int(in.Port)
- out.Address = in.Address
- out.AlgorithmProvider = in.AlgorithmProvider
- out.PolicyConfigFile = in.PolicyConfigFile
- if err := api.Convert_bool_To_Pointer_bool(&in.EnableProfiling, &out.EnableProfiling, s); err != nil {
- return err
- }
- out.ContentType = in.ContentType
- out.KubeAPIQPS = in.KubeAPIQPS
- out.KubeAPIBurst = int(in.KubeAPIBurst)
- out.SchedulerName = in.SchedulerName
- out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight
- out.FailureDomains = in.FailureDomains
- if err := Convert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil {
- return err
- }
- return nil
-}
-
-func Convert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in *componentconfig.KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, s conversion.Scope) error {
- return autoConvert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in, out, s)
-}
-
-func autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfiguration(in *KubeletConfiguration, out *componentconfig.KubeletConfiguration, s conversion.Scope) error {
- SetDefaults_KubeletConfiguration(in)
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- out.PodManifestPath = in.PodManifestPath
- out.SyncFrequency = in.SyncFrequency
- out.FileCheckFrequency = in.FileCheckFrequency
- out.HTTPCheckFrequency = in.HTTPCheckFrequency
- out.ManifestURL = in.ManifestURL
- out.ManifestURLHeader = in.ManifestURLHeader
- if err := api.Convert_Pointer_bool_To_bool(&in.EnableServer, &out.EnableServer, s); err != nil {
- return err
- }
- out.Address = in.Address
- out.Port = in.Port
- out.ReadOnlyPort = in.ReadOnlyPort
- out.TLSCertFile = in.TLSCertFile
- out.TLSPrivateKeyFile = in.TLSPrivateKeyFile
- out.CertDirectory = in.CertDirectory
- out.HostnameOverride = in.HostnameOverride
- out.PodInfraContainerImage = in.PodInfraContainerImage
- out.DockerEndpoint = in.DockerEndpoint
- out.RootDirectory = in.RootDirectory
- out.SeccompProfileRoot = in.SeccompProfileRoot
- if err := api.Convert_Pointer_bool_To_bool(&in.AllowPrivileged, &out.AllowPrivileged, s); err != nil {
- return err
- }
- out.HostNetworkSources = in.HostNetworkSources
- out.HostPIDSources = in.HostPIDSources
- out.HostIPCSources = in.HostIPCSources
- if err := api.Convert_Pointer_int32_To_int32(&in.RegistryPullQPS, &out.RegistryPullQPS, s); err != nil {
- return err
- }
- out.RegistryBurst = in.RegistryBurst
- if err := api.Convert_Pointer_int32_To_int32(&in.EventRecordQPS, &out.EventRecordQPS, s); err != nil {
- return err
- }
- out.EventBurst = in.EventBurst
- if err := api.Convert_Pointer_bool_To_bool(&in.EnableDebuggingHandlers, &out.EnableDebuggingHandlers, s); err != nil {
- return err
- }
- out.MinimumGCAge = in.MinimumGCAge
- out.MaxPerPodContainerCount = in.MaxPerPodContainerCount
- if err := api.Convert_Pointer_int32_To_int32(&in.MaxContainerCount, &out.MaxContainerCount, s); err != nil {
- return err
- }
- out.CAdvisorPort = in.CAdvisorPort
- out.HealthzPort = in.HealthzPort
- out.HealthzBindAddress = in.HealthzBindAddress
- if err := api.Convert_Pointer_int32_To_int32(&in.OOMScoreAdj, &out.OOMScoreAdj, s); err != nil {
- return err
- }
- if err := api.Convert_Pointer_bool_To_bool(&in.RegisterNode, &out.RegisterNode, s); err != nil {
- return err
- }
- out.ClusterDomain = in.ClusterDomain
- out.MasterServiceNamespace = in.MasterServiceNamespace
- out.ClusterDNS = in.ClusterDNS
- out.StreamingConnectionIdleTimeout = in.StreamingConnectionIdleTimeout
- out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
- out.ImageMinimumGCAge = in.ImageMinimumGCAge
- if err := api.Convert_Pointer_int32_To_int32(&in.ImageGCHighThresholdPercent, &out.ImageGCHighThresholdPercent, s); err != nil {
- return err
- }
- if err := api.Convert_Pointer_int32_To_int32(&in.ImageGCLowThresholdPercent, &out.ImageGCLowThresholdPercent, s); err != nil {
- return err
- }
- out.LowDiskSpaceThresholdMB = in.LowDiskSpaceThresholdMB
- out.VolumeStatsAggPeriod = in.VolumeStatsAggPeriod
- out.NetworkPluginName = in.NetworkPluginName
- out.NetworkPluginDir = in.NetworkPluginDir
- out.CNIConfDir = in.CNIConfDir
- out.CNIBinDir = in.CNIBinDir
- out.NetworkPluginMTU = in.NetworkPluginMTU
- out.VolumePluginDir = in.VolumePluginDir
- out.CloudProvider = in.CloudProvider
- out.CloudConfigFile = in.CloudConfigFile
- out.KubeletCgroups = in.KubeletCgroups
- out.RuntimeCgroups = in.RuntimeCgroups
- out.SystemCgroups = in.SystemCgroups
- out.CgroupRoot = in.CgroupRoot
- if err := api.Convert_Pointer_bool_To_bool(&in.CgroupsPerQOS, &out.CgroupsPerQOS, s); err != nil {
- return err
- }
- out.ContainerRuntime = in.ContainerRuntime
- out.RemoteRuntimeEndpoint = in.RemoteRuntimeEndpoint
- out.RemoteImageEndpoint = in.RemoteImageEndpoint
- out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
- out.RktPath = in.RktPath
- out.RktAPIEndpoint = in.RktAPIEndpoint
- out.RktStage1Image = in.RktStage1Image
- if err := api.Convert_Pointer_string_To_string(&in.LockFilePath, &out.LockFilePath, s); err != nil {
- return err
- }
- out.ExitOnLockContention = in.ExitOnLockContention
- if err := api.Convert_Pointer_bool_To_bool(&in.ConfigureCBR0, &out.ConfigureCBR0, s); err != nil {
- return err
- }
- out.HairpinMode = in.HairpinMode
- out.BabysitDaemons = in.BabysitDaemons
- out.MaxPods = in.MaxPods
- out.NvidiaGPUs = in.NvidiaGPUs
- out.DockerExecHandlerName = in.DockerExecHandlerName
- out.PodCIDR = in.PodCIDR
- out.ResolverConfig = in.ResolverConfig
- if err := api.Convert_Pointer_bool_To_bool(&in.CPUCFSQuota, &out.CPUCFSQuota, s); err != nil {
- return err
- }
- if err := api.Convert_Pointer_bool_To_bool(&in.Containerized, &out.Containerized, s); err != nil {
- return err
- }
- out.MaxOpenFiles = in.MaxOpenFiles
- if err := api.Convert_Pointer_bool_To_bool(&in.ReconcileCIDR, &out.ReconcileCIDR, s); err != nil {
- return err
- }
- if err := api.Convert_Pointer_bool_To_bool(&in.RegisterSchedulable, &out.RegisterSchedulable, s); err != nil {
- return err
- }
- out.ContentType = in.ContentType
- if err := api.Convert_Pointer_int32_To_int32(&in.KubeAPIQPS, &out.KubeAPIQPS, s); err != nil {
- return err
- }
- out.KubeAPIBurst = in.KubeAPIBurst
- if err := api.Convert_Pointer_bool_To_bool(&in.SerializeImagePulls, &out.SerializeImagePulls, s); err != nil {
- return err
- }
- out.ExperimentalFlannelOverlay = in.ExperimentalFlannelOverlay
- out.OutOfDiskTransitionFrequency = in.OutOfDiskTransitionFrequency
- out.NodeIP = in.NodeIP
- out.NodeLabels = in.NodeLabels
- out.NonMasqueradeCIDR = in.NonMasqueradeCIDR
- out.EnableCustomMetrics = in.EnableCustomMetrics
- if err := api.Convert_Pointer_string_To_string(&in.EvictionHard, &out.EvictionHard, s); err != nil {
- return err
- }
- out.EvictionSoft = in.EvictionSoft
- out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod
- out.EvictionPressureTransitionPeriod = in.EvictionPressureTransitionPeriod
- out.EvictionMaxPodGracePeriod = in.EvictionMaxPodGracePeriod
- out.EvictionMinimumReclaim = in.EvictionMinimumReclaim
- out.PodsPerCore = in.PodsPerCore
- if err := api.Convert_Pointer_bool_To_bool(&in.EnableControllerAttachDetach, &out.EnableControllerAttachDetach, s); err != nil {
- return err
- }
- if in.SystemReserved != nil {
- in, out := &in.SystemReserved, &out.SystemReserved
- *out = make(config.ConfigurationMap, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.SystemReserved = nil
- }
- if in.KubeReserved != nil {
- in, out := &in.KubeReserved, &out.KubeReserved
- *out = make(config.ConfigurationMap, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.KubeReserved = nil
- }
- out.ProtectKernelDefaults = in.ProtectKernelDefaults
- if err := api.Convert_Pointer_bool_To_bool(&in.MakeIPTablesUtilChains, &out.MakeIPTablesUtilChains, s); err != nil {
- return err
- }
- if err := api.Convert_Pointer_int32_To_int32(&in.IPTablesMasqueradeBit, &out.IPTablesMasqueradeBit, s); err != nil {
- return err
- }
- if err := api.Convert_Pointer_int32_To_int32(&in.IPTablesDropBit, &out.IPTablesDropBit, s); err != nil {
- return err
- }
- out.AllowedUnsafeSysctls = in.AllowedUnsafeSysctls
- out.ExperimentalRuntimeIntegrationType = in.ExperimentalRuntimeIntegrationType
- return nil
-}
-
-func Convert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfiguration(in *KubeletConfiguration, out *componentconfig.KubeletConfiguration, s conversion.Scope) error {
- return autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfiguration(in, out, s)
-}
-
-func autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfiguration(in *componentconfig.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- out.PodManifestPath = in.PodManifestPath
- out.SyncFrequency = in.SyncFrequency
- out.FileCheckFrequency = in.FileCheckFrequency
- out.HTTPCheckFrequency = in.HTTPCheckFrequency
- out.ManifestURL = in.ManifestURL
- out.ManifestURLHeader = in.ManifestURLHeader
- if err := api.Convert_bool_To_Pointer_bool(&in.EnableServer, &out.EnableServer, s); err != nil {
- return err
- }
- out.Address = in.Address
- out.Port = in.Port
- out.ReadOnlyPort = in.ReadOnlyPort
- out.TLSCertFile = in.TLSCertFile
- out.TLSPrivateKeyFile = in.TLSPrivateKeyFile
- out.CertDirectory = in.CertDirectory
- out.HostnameOverride = in.HostnameOverride
- out.PodInfraContainerImage = in.PodInfraContainerImage
- out.DockerEndpoint = in.DockerEndpoint
- out.RootDirectory = in.RootDirectory
- out.SeccompProfileRoot = in.SeccompProfileRoot
- if err := api.Convert_bool_To_Pointer_bool(&in.AllowPrivileged, &out.AllowPrivileged, s); err != nil {
- return err
- }
- out.HostNetworkSources = in.HostNetworkSources
- out.HostPIDSources = in.HostPIDSources
- out.HostIPCSources = in.HostIPCSources
- if err := api.Convert_int32_To_Pointer_int32(&in.RegistryPullQPS, &out.RegistryPullQPS, s); err != nil {
- return err
- }
- out.RegistryBurst = in.RegistryBurst
- if err := api.Convert_int32_To_Pointer_int32(&in.EventRecordQPS, &out.EventRecordQPS, s); err != nil {
- return err
- }
- out.EventBurst = in.EventBurst
- if err := api.Convert_bool_To_Pointer_bool(&in.EnableDebuggingHandlers, &out.EnableDebuggingHandlers, s); err != nil {
- return err
- }
- out.MinimumGCAge = in.MinimumGCAge
- out.MaxPerPodContainerCount = in.MaxPerPodContainerCount
- if err := api.Convert_int32_To_Pointer_int32(&in.MaxContainerCount, &out.MaxContainerCount, s); err != nil {
- return err
- }
- out.CAdvisorPort = in.CAdvisorPort
- out.HealthzPort = in.HealthzPort
- out.HealthzBindAddress = in.HealthzBindAddress
- if err := api.Convert_int32_To_Pointer_int32(&in.OOMScoreAdj, &out.OOMScoreAdj, s); err != nil {
- return err
- }
- if err := api.Convert_bool_To_Pointer_bool(&in.RegisterNode, &out.RegisterNode, s); err != nil {
- return err
- }
- out.ClusterDomain = in.ClusterDomain
- out.MasterServiceNamespace = in.MasterServiceNamespace
- out.ClusterDNS = in.ClusterDNS
- out.StreamingConnectionIdleTimeout = in.StreamingConnectionIdleTimeout
- out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
- out.ImageMinimumGCAge = in.ImageMinimumGCAge
- if err := api.Convert_int32_To_Pointer_int32(&in.ImageGCHighThresholdPercent, &out.ImageGCHighThresholdPercent, s); err != nil {
- return err
- }
- if err := api.Convert_int32_To_Pointer_int32(&in.ImageGCLowThresholdPercent, &out.ImageGCLowThresholdPercent, s); err != nil {
- return err
- }
- out.LowDiskSpaceThresholdMB = in.LowDiskSpaceThresholdMB
- out.VolumeStatsAggPeriod = in.VolumeStatsAggPeriod
- out.NetworkPluginName = in.NetworkPluginName
- out.NetworkPluginMTU = in.NetworkPluginMTU
- out.NetworkPluginDir = in.NetworkPluginDir
- out.CNIConfDir = in.CNIConfDir
- out.CNIBinDir = in.CNIBinDir
- out.VolumePluginDir = in.VolumePluginDir
- out.CloudProvider = in.CloudProvider
- out.CloudConfigFile = in.CloudConfigFile
- out.KubeletCgroups = in.KubeletCgroups
- if err := api.Convert_bool_To_Pointer_bool(&in.CgroupsPerQOS, &out.CgroupsPerQOS, s); err != nil {
- return err
- }
- out.RuntimeCgroups = in.RuntimeCgroups
- out.SystemCgroups = in.SystemCgroups
- out.CgroupRoot = in.CgroupRoot
- out.ContainerRuntime = in.ContainerRuntime
- out.RemoteRuntimeEndpoint = in.RemoteRuntimeEndpoint
- out.RemoteImageEndpoint = in.RemoteImageEndpoint
- out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
- out.RktPath = in.RktPath
- out.RktAPIEndpoint = in.RktAPIEndpoint
- out.RktStage1Image = in.RktStage1Image
- if err := api.Convert_string_To_Pointer_string(&in.LockFilePath, &out.LockFilePath, s); err != nil {
- return err
- }
- out.ExitOnLockContention = in.ExitOnLockContention
- if err := api.Convert_bool_To_Pointer_bool(&in.ConfigureCBR0, &out.ConfigureCBR0, s); err != nil {
- return err
- }
- out.HairpinMode = in.HairpinMode
- out.BabysitDaemons = in.BabysitDaemons
- out.MaxPods = in.MaxPods
- out.NvidiaGPUs = in.NvidiaGPUs
- out.DockerExecHandlerName = in.DockerExecHandlerName
- out.PodCIDR = in.PodCIDR
- out.ResolverConfig = in.ResolverConfig
- if err := api.Convert_bool_To_Pointer_bool(&in.CPUCFSQuota, &out.CPUCFSQuota, s); err != nil {
- return err
- }
- if err := api.Convert_bool_To_Pointer_bool(&in.Containerized, &out.Containerized, s); err != nil {
- return err
- }
- out.MaxOpenFiles = in.MaxOpenFiles
- if err := api.Convert_bool_To_Pointer_bool(&in.ReconcileCIDR, &out.ReconcileCIDR, s); err != nil {
- return err
- }
- if err := api.Convert_bool_To_Pointer_bool(&in.RegisterSchedulable, &out.RegisterSchedulable, s); err != nil {
- return err
- }
- out.ContentType = in.ContentType
- if err := api.Convert_int32_To_Pointer_int32(&in.KubeAPIQPS, &out.KubeAPIQPS, s); err != nil {
- return err
- }
- out.KubeAPIBurst = in.KubeAPIBurst
- if err := api.Convert_bool_To_Pointer_bool(&in.SerializeImagePulls, &out.SerializeImagePulls, s); err != nil {
- return err
- }
- out.ExperimentalFlannelOverlay = in.ExperimentalFlannelOverlay
- out.OutOfDiskTransitionFrequency = in.OutOfDiskTransitionFrequency
- out.NodeIP = in.NodeIP
- out.NodeLabels = in.NodeLabels
- out.NonMasqueradeCIDR = in.NonMasqueradeCIDR
- out.EnableCustomMetrics = in.EnableCustomMetrics
- if err := api.Convert_string_To_Pointer_string(&in.EvictionHard, &out.EvictionHard, s); err != nil {
- return err
- }
- out.EvictionSoft = in.EvictionSoft
- out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod
- out.EvictionPressureTransitionPeriod = in.EvictionPressureTransitionPeriod
- out.EvictionMaxPodGracePeriod = in.EvictionMaxPodGracePeriod
- out.EvictionMinimumReclaim = in.EvictionMinimumReclaim
- out.PodsPerCore = in.PodsPerCore
- if err := api.Convert_bool_To_Pointer_bool(&in.EnableControllerAttachDetach, &out.EnableControllerAttachDetach, s); err != nil {
- return err
- }
- if in.SystemReserved != nil {
- in, out := &in.SystemReserved, &out.SystemReserved
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.SystemReserved = nil
- }
- if in.KubeReserved != nil {
- in, out := &in.KubeReserved, &out.KubeReserved
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.KubeReserved = nil
- }
- out.ProtectKernelDefaults = in.ProtectKernelDefaults
- if err := api.Convert_bool_To_Pointer_bool(&in.MakeIPTablesUtilChains, &out.MakeIPTablesUtilChains, s); err != nil {
- return err
- }
- if err := api.Convert_int32_To_Pointer_int32(&in.IPTablesMasqueradeBit, &out.IPTablesMasqueradeBit, s); err != nil {
- return err
- }
- if err := api.Convert_int32_To_Pointer_int32(&in.IPTablesDropBit, &out.IPTablesDropBit, s); err != nil {
- return err
- }
- out.AllowedUnsafeSysctls = in.AllowedUnsafeSysctls
- out.ExperimentalRuntimeIntegrationType = in.ExperimentalRuntimeIntegrationType
- return nil
-}
-
-func Convert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfiguration(in *componentconfig.KubeletConfiguration, out *KubeletConfiguration, s conversion.Scope) error {
- return autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfiguration(in, out, s)
-}
-
-func autoConvert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *componentconfig.LeaderElectionConfiguration, s conversion.Scope) error {
- SetDefaults_LeaderElectionConfiguration(in)
- if err := api.Convert_Pointer_bool_To_bool(&in.LeaderElect, &out.LeaderElect, s); err != nil {
- return err
- }
- out.LeaseDuration = in.LeaseDuration
- out.RenewDeadline = in.RenewDeadline
- out.RetryPeriod = in.RetryPeriod
- return nil
-}
-
-func Convert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *componentconfig.LeaderElectionConfiguration, s conversion.Scope) error {
- return autoConvert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration(in, out, s)
-}
-
-func autoConvert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *componentconfig.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error {
- if err := api.Convert_bool_To_Pointer_bool(&in.LeaderElect, &out.LeaderElect, s); err != nil {
- return err
- }
- out.LeaseDuration = in.LeaseDuration
- out.RenewDeadline = in.RenewDeadline
- out.RetryPeriod = in.RetryPeriod
- return nil
-}
-
-func Convert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *componentconfig.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error {
- return autoConvert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in, out, s)
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go
deleted file mode 100644
index b3185ddbc..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,436 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 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 (
- conversion "k8s.io/client-go/1.5/pkg/conversion"
- runtime "k8s.io/client-go/1.5/pkg/runtime"
- reflect "reflect"
-)
-
-func init() {
- SchemeBuilder.Register(RegisterDeepCopies)
-}
-
-// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
-// to allow building arbitrary schemes.
-func RegisterDeepCopies(scheme *runtime.Scheme) error {
- return scheme.AddGeneratedDeepCopyFuncs(
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_KubeProxyConfiguration, InType: reflect.TypeOf(&KubeProxyConfiguration{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_KubeSchedulerConfiguration, InType: reflect.TypeOf(&KubeSchedulerConfiguration{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_KubeletConfiguration, InType: reflect.TypeOf(&KubeletConfiguration{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_LeaderElectionConfiguration, InType: reflect.TypeOf(&LeaderElectionConfiguration{})},
- )
-}
-
-func DeepCopy_v1alpha1_KubeProxyConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*KubeProxyConfiguration)
- out := out.(*KubeProxyConfiguration)
- out.TypeMeta = in.TypeMeta
- out.BindAddress = in.BindAddress
- out.ClusterCIDR = in.ClusterCIDR
- out.HealthzBindAddress = in.HealthzBindAddress
- out.HealthzPort = in.HealthzPort
- out.HostnameOverride = in.HostnameOverride
- if in.IPTablesMasqueradeBit != nil {
- in, out := &in.IPTablesMasqueradeBit, &out.IPTablesMasqueradeBit
- *out = new(int32)
- **out = **in
- } else {
- out.IPTablesMasqueradeBit = nil
- }
- out.IPTablesSyncPeriod = in.IPTablesSyncPeriod
- out.KubeconfigPath = in.KubeconfigPath
- out.MasqueradeAll = in.MasqueradeAll
- out.Master = in.Master
- if in.OOMScoreAdj != nil {
- in, out := &in.OOMScoreAdj, &out.OOMScoreAdj
- *out = new(int32)
- **out = **in
- } else {
- out.OOMScoreAdj = nil
- }
- out.Mode = in.Mode
- out.PortRange = in.PortRange
- out.ResourceContainer = in.ResourceContainer
- out.UDPIdleTimeout = in.UDPIdleTimeout
- out.ConntrackMax = in.ConntrackMax
- out.ConntrackMaxPerCore = in.ConntrackMaxPerCore
- out.ConntrackMin = in.ConntrackMin
- out.ConntrackTCPEstablishedTimeout = in.ConntrackTCPEstablishedTimeout
- return nil
- }
-}
-
-func DeepCopy_v1alpha1_KubeSchedulerConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*KubeSchedulerConfiguration)
- out := out.(*KubeSchedulerConfiguration)
- out.TypeMeta = in.TypeMeta
- out.Port = in.Port
- out.Address = in.Address
- out.AlgorithmProvider = in.AlgorithmProvider
- out.PolicyConfigFile = in.PolicyConfigFile
- if in.EnableProfiling != nil {
- in, out := &in.EnableProfiling, &out.EnableProfiling
- *out = new(bool)
- **out = **in
- } else {
- out.EnableProfiling = nil
- }
- out.ContentType = in.ContentType
- out.KubeAPIQPS = in.KubeAPIQPS
- out.KubeAPIBurst = in.KubeAPIBurst
- out.SchedulerName = in.SchedulerName
- out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight
- out.FailureDomains = in.FailureDomains
- if err := DeepCopy_v1alpha1_LeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, c); err != nil {
- return err
- }
- return nil
- }
-}
-
-func DeepCopy_v1alpha1_KubeletConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*KubeletConfiguration)
- out := out.(*KubeletConfiguration)
- out.TypeMeta = in.TypeMeta
- out.PodManifestPath = in.PodManifestPath
- out.SyncFrequency = in.SyncFrequency
- out.FileCheckFrequency = in.FileCheckFrequency
- out.HTTPCheckFrequency = in.HTTPCheckFrequency
- out.ManifestURL = in.ManifestURL
- out.ManifestURLHeader = in.ManifestURLHeader
- if in.EnableServer != nil {
- in, out := &in.EnableServer, &out.EnableServer
- *out = new(bool)
- **out = **in
- } else {
- out.EnableServer = nil
- }
- out.Address = in.Address
- out.Port = in.Port
- out.ReadOnlyPort = in.ReadOnlyPort
- out.TLSCertFile = in.TLSCertFile
- out.TLSPrivateKeyFile = in.TLSPrivateKeyFile
- out.CertDirectory = in.CertDirectory
- out.HostnameOverride = in.HostnameOverride
- out.PodInfraContainerImage = in.PodInfraContainerImage
- out.DockerEndpoint = in.DockerEndpoint
- out.RootDirectory = in.RootDirectory
- out.SeccompProfileRoot = in.SeccompProfileRoot
- if in.AllowPrivileged != nil {
- in, out := &in.AllowPrivileged, &out.AllowPrivileged
- *out = new(bool)
- **out = **in
- } else {
- out.AllowPrivileged = nil
- }
- if in.HostNetworkSources != nil {
- in, out := &in.HostNetworkSources, &out.HostNetworkSources
- *out = make([]string, len(*in))
- copy(*out, *in)
- } else {
- out.HostNetworkSources = nil
- }
- if in.HostPIDSources != nil {
- in, out := &in.HostPIDSources, &out.HostPIDSources
- *out = make([]string, len(*in))
- copy(*out, *in)
- } else {
- out.HostPIDSources = nil
- }
- if in.HostIPCSources != nil {
- in, out := &in.HostIPCSources, &out.HostIPCSources
- *out = make([]string, len(*in))
- copy(*out, *in)
- } else {
- out.HostIPCSources = nil
- }
- if in.RegistryPullQPS != nil {
- in, out := &in.RegistryPullQPS, &out.RegistryPullQPS
- *out = new(int32)
- **out = **in
- } else {
- out.RegistryPullQPS = nil
- }
- out.RegistryBurst = in.RegistryBurst
- if in.EventRecordQPS != nil {
- in, out := &in.EventRecordQPS, &out.EventRecordQPS
- *out = new(int32)
- **out = **in
- } else {
- out.EventRecordQPS = nil
- }
- out.EventBurst = in.EventBurst
- if in.EnableDebuggingHandlers != nil {
- in, out := &in.EnableDebuggingHandlers, &out.EnableDebuggingHandlers
- *out = new(bool)
- **out = **in
- } else {
- out.EnableDebuggingHandlers = nil
- }
- out.MinimumGCAge = in.MinimumGCAge
- out.MaxPerPodContainerCount = in.MaxPerPodContainerCount
- if in.MaxContainerCount != nil {
- in, out := &in.MaxContainerCount, &out.MaxContainerCount
- *out = new(int32)
- **out = **in
- } else {
- out.MaxContainerCount = nil
- }
- out.CAdvisorPort = in.CAdvisorPort
- out.HealthzPort = in.HealthzPort
- out.HealthzBindAddress = in.HealthzBindAddress
- if in.OOMScoreAdj != nil {
- in, out := &in.OOMScoreAdj, &out.OOMScoreAdj
- *out = new(int32)
- **out = **in
- } else {
- out.OOMScoreAdj = nil
- }
- if in.RegisterNode != nil {
- in, out := &in.RegisterNode, &out.RegisterNode
- *out = new(bool)
- **out = **in
- } else {
- out.RegisterNode = nil
- }
- out.ClusterDomain = in.ClusterDomain
- out.MasterServiceNamespace = in.MasterServiceNamespace
- out.ClusterDNS = in.ClusterDNS
- out.StreamingConnectionIdleTimeout = in.StreamingConnectionIdleTimeout
- out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
- out.ImageMinimumGCAge = in.ImageMinimumGCAge
- if in.ImageGCHighThresholdPercent != nil {
- in, out := &in.ImageGCHighThresholdPercent, &out.ImageGCHighThresholdPercent
- *out = new(int32)
- **out = **in
- } else {
- out.ImageGCHighThresholdPercent = nil
- }
- if in.ImageGCLowThresholdPercent != nil {
- in, out := &in.ImageGCLowThresholdPercent, &out.ImageGCLowThresholdPercent
- *out = new(int32)
- **out = **in
- } else {
- out.ImageGCLowThresholdPercent = nil
- }
- out.LowDiskSpaceThresholdMB = in.LowDiskSpaceThresholdMB
- out.VolumeStatsAggPeriod = in.VolumeStatsAggPeriod
- out.NetworkPluginName = in.NetworkPluginName
- out.NetworkPluginDir = in.NetworkPluginDir
- out.CNIConfDir = in.CNIConfDir
- out.CNIBinDir = in.CNIBinDir
- out.NetworkPluginMTU = in.NetworkPluginMTU
- out.VolumePluginDir = in.VolumePluginDir
- out.CloudProvider = in.CloudProvider
- out.CloudConfigFile = in.CloudConfigFile
- out.KubeletCgroups = in.KubeletCgroups
- out.RuntimeCgroups = in.RuntimeCgroups
- out.SystemCgroups = in.SystemCgroups
- out.CgroupRoot = in.CgroupRoot
- if in.CgroupsPerQOS != nil {
- in, out := &in.CgroupsPerQOS, &out.CgroupsPerQOS
- *out = new(bool)
- **out = **in
- } else {
- out.CgroupsPerQOS = nil
- }
- out.ContainerRuntime = in.ContainerRuntime
- out.RemoteRuntimeEndpoint = in.RemoteRuntimeEndpoint
- out.RemoteImageEndpoint = in.RemoteImageEndpoint
- out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
- out.RktPath = in.RktPath
- out.RktAPIEndpoint = in.RktAPIEndpoint
- out.RktStage1Image = in.RktStage1Image
- if in.LockFilePath != nil {
- in, out := &in.LockFilePath, &out.LockFilePath
- *out = new(string)
- **out = **in
- } else {
- out.LockFilePath = nil
- }
- out.ExitOnLockContention = in.ExitOnLockContention
- if in.ConfigureCBR0 != nil {
- in, out := &in.ConfigureCBR0, &out.ConfigureCBR0
- *out = new(bool)
- **out = **in
- } else {
- out.ConfigureCBR0 = nil
- }
- out.HairpinMode = in.HairpinMode
- out.BabysitDaemons = in.BabysitDaemons
- out.MaxPods = in.MaxPods
- out.NvidiaGPUs = in.NvidiaGPUs
- out.DockerExecHandlerName = in.DockerExecHandlerName
- out.PodCIDR = in.PodCIDR
- out.ResolverConfig = in.ResolverConfig
- if in.CPUCFSQuota != nil {
- in, out := &in.CPUCFSQuota, &out.CPUCFSQuota
- *out = new(bool)
- **out = **in
- } else {
- out.CPUCFSQuota = nil
- }
- if in.Containerized != nil {
- in, out := &in.Containerized, &out.Containerized
- *out = new(bool)
- **out = **in
- } else {
- out.Containerized = nil
- }
- out.MaxOpenFiles = in.MaxOpenFiles
- if in.ReconcileCIDR != nil {
- in, out := &in.ReconcileCIDR, &out.ReconcileCIDR
- *out = new(bool)
- **out = **in
- } else {
- out.ReconcileCIDR = nil
- }
- if in.RegisterSchedulable != nil {
- in, out := &in.RegisterSchedulable, &out.RegisterSchedulable
- *out = new(bool)
- **out = **in
- } else {
- out.RegisterSchedulable = nil
- }
- out.ContentType = in.ContentType
- if in.KubeAPIQPS != nil {
- in, out := &in.KubeAPIQPS, &out.KubeAPIQPS
- *out = new(int32)
- **out = **in
- } else {
- out.KubeAPIQPS = nil
- }
- out.KubeAPIBurst = in.KubeAPIBurst
- if in.SerializeImagePulls != nil {
- in, out := &in.SerializeImagePulls, &out.SerializeImagePulls
- *out = new(bool)
- **out = **in
- } else {
- out.SerializeImagePulls = nil
- }
- out.ExperimentalFlannelOverlay = in.ExperimentalFlannelOverlay
- out.OutOfDiskTransitionFrequency = in.OutOfDiskTransitionFrequency
- out.NodeIP = in.NodeIP
- if in.NodeLabels != nil {
- in, out := &in.NodeLabels, &out.NodeLabels
- *out = make(map[string]string)
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.NodeLabels = nil
- }
- out.NonMasqueradeCIDR = in.NonMasqueradeCIDR
- out.EnableCustomMetrics = in.EnableCustomMetrics
- if in.EvictionHard != nil {
- in, out := &in.EvictionHard, &out.EvictionHard
- *out = new(string)
- **out = **in
- } else {
- out.EvictionHard = nil
- }
- out.EvictionSoft = in.EvictionSoft
- out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod
- out.EvictionPressureTransitionPeriod = in.EvictionPressureTransitionPeriod
- out.EvictionMaxPodGracePeriod = in.EvictionMaxPodGracePeriod
- out.EvictionMinimumReclaim = in.EvictionMinimumReclaim
- out.PodsPerCore = in.PodsPerCore
- if in.EnableControllerAttachDetach != nil {
- in, out := &in.EnableControllerAttachDetach, &out.EnableControllerAttachDetach
- *out = new(bool)
- **out = **in
- } else {
- out.EnableControllerAttachDetach = nil
- }
- if in.SystemReserved != nil {
- in, out := &in.SystemReserved, &out.SystemReserved
- *out = make(map[string]string)
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.SystemReserved = nil
- }
- if in.KubeReserved != nil {
- in, out := &in.KubeReserved, &out.KubeReserved
- *out = make(map[string]string)
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.KubeReserved = nil
- }
- out.ProtectKernelDefaults = in.ProtectKernelDefaults
- if in.MakeIPTablesUtilChains != nil {
- in, out := &in.MakeIPTablesUtilChains, &out.MakeIPTablesUtilChains
- *out = new(bool)
- **out = **in
- } else {
- out.MakeIPTablesUtilChains = nil
- }
- if in.IPTablesMasqueradeBit != nil {
- in, out := &in.IPTablesMasqueradeBit, &out.IPTablesMasqueradeBit
- *out = new(int32)
- **out = **in
- } else {
- out.IPTablesMasqueradeBit = nil
- }
- if in.IPTablesDropBit != nil {
- in, out := &in.IPTablesDropBit, &out.IPTablesDropBit
- *out = new(int32)
- **out = **in
- } else {
- out.IPTablesDropBit = nil
- }
- if in.AllowedUnsafeSysctls != nil {
- in, out := &in.AllowedUnsafeSysctls, &out.AllowedUnsafeSysctls
- *out = make([]string, len(*in))
- copy(*out, *in)
- } else {
- out.AllowedUnsafeSysctls = nil
- }
- out.ExperimentalRuntimeIntegrationType = in.ExperimentalRuntimeIntegrationType
- return nil
- }
-}
-
-func DeepCopy_v1alpha1_LeaderElectionConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*LeaderElectionConfiguration)
- out := out.(*LeaderElectionConfiguration)
- if in.LeaderElect != nil {
- in, out := &in.LeaderElect, &out.LeaderElect
- *out = new(bool)
- **out = **in
- } else {
- out.LeaderElect = nil
- }
- out.LeaseDuration = in.LeaseDuration
- out.RenewDeadline = in.RenewDeadline
- out.RetryPeriod = in.RetryPeriod
- return nil
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/zz_generated.deepcopy.go
deleted file mode 100644
index d2b059834..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/componentconfig/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,408 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 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 componentconfig
-
-import (
- conversion "k8s.io/client-go/1.5/pkg/conversion"
- runtime "k8s.io/client-go/1.5/pkg/runtime"
- config "k8s.io/client-go/1.5/pkg/util/config"
- reflect "reflect"
-)
-
-func init() {
- SchemeBuilder.Register(RegisterDeepCopies)
-}
-
-// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
-// to allow building arbitrary schemes.
-func RegisterDeepCopies(scheme *runtime.Scheme) error {
- return scheme.AddGeneratedDeepCopyFuncs(
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_IPVar, InType: reflect.TypeOf(&IPVar{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_KubeControllerManagerConfiguration, InType: reflect.TypeOf(&KubeControllerManagerConfiguration{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_KubeProxyConfiguration, InType: reflect.TypeOf(&KubeProxyConfiguration{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_KubeSchedulerConfiguration, InType: reflect.TypeOf(&KubeSchedulerConfiguration{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_KubeletConfiguration, InType: reflect.TypeOf(&KubeletConfiguration{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_LeaderElectionConfiguration, InType: reflect.TypeOf(&LeaderElectionConfiguration{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_PersistentVolumeRecyclerConfiguration, InType: reflect.TypeOf(&PersistentVolumeRecyclerConfiguration{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_PortRangeVar, InType: reflect.TypeOf(&PortRangeVar{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_VolumeConfiguration, InType: reflect.TypeOf(&VolumeConfiguration{})},
- )
-}
-
-func DeepCopy_componentconfig_IPVar(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*IPVar)
- out := out.(*IPVar)
- if in.Val != nil {
- in, out := &in.Val, &out.Val
- *out = new(string)
- **out = **in
- } else {
- out.Val = nil
- }
- return nil
- }
-}
-
-func DeepCopy_componentconfig_KubeControllerManagerConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*KubeControllerManagerConfiguration)
- out := out.(*KubeControllerManagerConfiguration)
- out.TypeMeta = in.TypeMeta
- out.Port = in.Port
- out.Address = in.Address
- out.CloudProvider = in.CloudProvider
- out.CloudConfigFile = in.CloudConfigFile
- out.ConcurrentEndpointSyncs = in.ConcurrentEndpointSyncs
- out.ConcurrentRSSyncs = in.ConcurrentRSSyncs
- out.ConcurrentRCSyncs = in.ConcurrentRCSyncs
- out.ConcurrentServiceSyncs = in.ConcurrentServiceSyncs
- out.ConcurrentResourceQuotaSyncs = in.ConcurrentResourceQuotaSyncs
- out.ConcurrentDeploymentSyncs = in.ConcurrentDeploymentSyncs
- out.ConcurrentDaemonSetSyncs = in.ConcurrentDaemonSetSyncs
- out.ConcurrentJobSyncs = in.ConcurrentJobSyncs
- out.ConcurrentNamespaceSyncs = in.ConcurrentNamespaceSyncs
- out.ConcurrentSATokenSyncs = in.ConcurrentSATokenSyncs
- out.LookupCacheSizeForRC = in.LookupCacheSizeForRC
- out.LookupCacheSizeForRS = in.LookupCacheSizeForRS
- out.LookupCacheSizeForDaemonSet = in.LookupCacheSizeForDaemonSet
- out.ServiceSyncPeriod = in.ServiceSyncPeriod
- out.NodeSyncPeriod = in.NodeSyncPeriod
- out.RouteReconciliationPeriod = in.RouteReconciliationPeriod
- out.ResourceQuotaSyncPeriod = in.ResourceQuotaSyncPeriod
- out.NamespaceSyncPeriod = in.NamespaceSyncPeriod
- out.PVClaimBinderSyncPeriod = in.PVClaimBinderSyncPeriod
- out.MinResyncPeriod = in.MinResyncPeriod
- out.TerminatedPodGCThreshold = in.TerminatedPodGCThreshold
- out.HorizontalPodAutoscalerSyncPeriod = in.HorizontalPodAutoscalerSyncPeriod
- out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
- out.PodEvictionTimeout = in.PodEvictionTimeout
- out.DeletingPodsQps = in.DeletingPodsQps
- out.DeletingPodsBurst = in.DeletingPodsBurst
- out.NodeMonitorGracePeriod = in.NodeMonitorGracePeriod
- out.RegisterRetryCount = in.RegisterRetryCount
- out.NodeStartupGracePeriod = in.NodeStartupGracePeriod
- out.NodeMonitorPeriod = in.NodeMonitorPeriod
- out.ServiceAccountKeyFile = in.ServiceAccountKeyFile
- out.ClusterSigningCertFile = in.ClusterSigningCertFile
- out.ClusterSigningKeyFile = in.ClusterSigningKeyFile
- out.ApproveAllKubeletCSRsForGroup = in.ApproveAllKubeletCSRsForGroup
- out.EnableProfiling = in.EnableProfiling
- out.ClusterName = in.ClusterName
- out.ClusterCIDR = in.ClusterCIDR
- out.ServiceCIDR = in.ServiceCIDR
- out.NodeCIDRMaskSize = in.NodeCIDRMaskSize
- out.AllocateNodeCIDRs = in.AllocateNodeCIDRs
- out.ConfigureCloudRoutes = in.ConfigureCloudRoutes
- out.RootCAFile = in.RootCAFile
- out.ContentType = in.ContentType
- out.KubeAPIQPS = in.KubeAPIQPS
- out.KubeAPIBurst = in.KubeAPIBurst
- out.LeaderElection = in.LeaderElection
- out.VolumeConfiguration = in.VolumeConfiguration
- out.ControllerStartInterval = in.ControllerStartInterval
- out.EnableGarbageCollector = in.EnableGarbageCollector
- out.ConcurrentGCSyncs = in.ConcurrentGCSyncs
- out.NodeEvictionRate = in.NodeEvictionRate
- out.SecondaryNodeEvictionRate = in.SecondaryNodeEvictionRate
- out.LargeClusterSizeThreshold = in.LargeClusterSizeThreshold
- out.UnhealthyZoneThreshold = in.UnhealthyZoneThreshold
- return nil
- }
-}
-
-func DeepCopy_componentconfig_KubeProxyConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*KubeProxyConfiguration)
- out := out.(*KubeProxyConfiguration)
- out.TypeMeta = in.TypeMeta
- out.BindAddress = in.BindAddress
- out.ClusterCIDR = in.ClusterCIDR
- out.HealthzBindAddress = in.HealthzBindAddress
- out.HealthzPort = in.HealthzPort
- out.HostnameOverride = in.HostnameOverride
- if in.IPTablesMasqueradeBit != nil {
- in, out := &in.IPTablesMasqueradeBit, &out.IPTablesMasqueradeBit
- *out = new(int32)
- **out = **in
- } else {
- out.IPTablesMasqueradeBit = nil
- }
- out.IPTablesSyncPeriod = in.IPTablesSyncPeriod
- out.KubeconfigPath = in.KubeconfigPath
- out.MasqueradeAll = in.MasqueradeAll
- out.Master = in.Master
- if in.OOMScoreAdj != nil {
- in, out := &in.OOMScoreAdj, &out.OOMScoreAdj
- *out = new(int32)
- **out = **in
- } else {
- out.OOMScoreAdj = nil
- }
- out.Mode = in.Mode
- out.PortRange = in.PortRange
- out.ResourceContainer = in.ResourceContainer
- out.UDPIdleTimeout = in.UDPIdleTimeout
- out.ConntrackMax = in.ConntrackMax
- out.ConntrackMaxPerCore = in.ConntrackMaxPerCore
- out.ConntrackMin = in.ConntrackMin
- out.ConntrackTCPEstablishedTimeout = in.ConntrackTCPEstablishedTimeout
- return nil
- }
-}
-
-func DeepCopy_componentconfig_KubeSchedulerConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*KubeSchedulerConfiguration)
- out := out.(*KubeSchedulerConfiguration)
- out.TypeMeta = in.TypeMeta
- out.Port = in.Port
- out.Address = in.Address
- out.AlgorithmProvider = in.AlgorithmProvider
- out.PolicyConfigFile = in.PolicyConfigFile
- out.EnableProfiling = in.EnableProfiling
- out.ContentType = in.ContentType
- out.KubeAPIQPS = in.KubeAPIQPS
- out.KubeAPIBurst = in.KubeAPIBurst
- out.SchedulerName = in.SchedulerName
- out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight
- out.FailureDomains = in.FailureDomains
- out.LeaderElection = in.LeaderElection
- return nil
- }
-}
-
-func DeepCopy_componentconfig_KubeletConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*KubeletConfiguration)
- out := out.(*KubeletConfiguration)
- out.TypeMeta = in.TypeMeta
- out.PodManifestPath = in.PodManifestPath
- out.SyncFrequency = in.SyncFrequency
- out.FileCheckFrequency = in.FileCheckFrequency
- out.HTTPCheckFrequency = in.HTTPCheckFrequency
- out.ManifestURL = in.ManifestURL
- out.ManifestURLHeader = in.ManifestURLHeader
- out.EnableServer = in.EnableServer
- out.Address = in.Address
- out.Port = in.Port
- out.ReadOnlyPort = in.ReadOnlyPort
- out.TLSCertFile = in.TLSCertFile
- out.TLSPrivateKeyFile = in.TLSPrivateKeyFile
- out.CertDirectory = in.CertDirectory
- out.HostnameOverride = in.HostnameOverride
- out.PodInfraContainerImage = in.PodInfraContainerImage
- out.DockerEndpoint = in.DockerEndpoint
- out.RootDirectory = in.RootDirectory
- out.SeccompProfileRoot = in.SeccompProfileRoot
- out.AllowPrivileged = in.AllowPrivileged
- if in.HostNetworkSources != nil {
- in, out := &in.HostNetworkSources, &out.HostNetworkSources
- *out = make([]string, len(*in))
- copy(*out, *in)
- } else {
- out.HostNetworkSources = nil
- }
- if in.HostPIDSources != nil {
- in, out := &in.HostPIDSources, &out.HostPIDSources
- *out = make([]string, len(*in))
- copy(*out, *in)
- } else {
- out.HostPIDSources = nil
- }
- if in.HostIPCSources != nil {
- in, out := &in.HostIPCSources, &out.HostIPCSources
- *out = make([]string, len(*in))
- copy(*out, *in)
- } else {
- out.HostIPCSources = nil
- }
- out.RegistryPullQPS = in.RegistryPullQPS
- out.RegistryBurst = in.RegistryBurst
- out.EventRecordQPS = in.EventRecordQPS
- out.EventBurst = in.EventBurst
- out.EnableDebuggingHandlers = in.EnableDebuggingHandlers
- out.MinimumGCAge = in.MinimumGCAge
- out.MaxPerPodContainerCount = in.MaxPerPodContainerCount
- out.MaxContainerCount = in.MaxContainerCount
- out.CAdvisorPort = in.CAdvisorPort
- out.HealthzPort = in.HealthzPort
- out.HealthzBindAddress = in.HealthzBindAddress
- out.OOMScoreAdj = in.OOMScoreAdj
- out.RegisterNode = in.RegisterNode
- out.ClusterDomain = in.ClusterDomain
- out.MasterServiceNamespace = in.MasterServiceNamespace
- out.ClusterDNS = in.ClusterDNS
- out.StreamingConnectionIdleTimeout = in.StreamingConnectionIdleTimeout
- out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
- out.ImageMinimumGCAge = in.ImageMinimumGCAge
- out.ImageGCHighThresholdPercent = in.ImageGCHighThresholdPercent
- out.ImageGCLowThresholdPercent = in.ImageGCLowThresholdPercent
- out.LowDiskSpaceThresholdMB = in.LowDiskSpaceThresholdMB
- out.VolumeStatsAggPeriod = in.VolumeStatsAggPeriod
- out.NetworkPluginName = in.NetworkPluginName
- out.NetworkPluginMTU = in.NetworkPluginMTU
- out.NetworkPluginDir = in.NetworkPluginDir
- out.CNIConfDir = in.CNIConfDir
- out.CNIBinDir = in.CNIBinDir
- out.VolumePluginDir = in.VolumePluginDir
- out.CloudProvider = in.CloudProvider
- out.CloudConfigFile = in.CloudConfigFile
- out.KubeletCgroups = in.KubeletCgroups
- out.CgroupsPerQOS = in.CgroupsPerQOS
- out.RuntimeCgroups = in.RuntimeCgroups
- out.SystemCgroups = in.SystemCgroups
- out.CgroupRoot = in.CgroupRoot
- out.ContainerRuntime = in.ContainerRuntime
- out.RemoteRuntimeEndpoint = in.RemoteRuntimeEndpoint
- out.RemoteImageEndpoint = in.RemoteImageEndpoint
- out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
- out.RktPath = in.RktPath
- out.RktAPIEndpoint = in.RktAPIEndpoint
- out.RktStage1Image = in.RktStage1Image
- out.LockFilePath = in.LockFilePath
- out.ExitOnLockContention = in.ExitOnLockContention
- out.ConfigureCBR0 = in.ConfigureCBR0
- out.HairpinMode = in.HairpinMode
- out.BabysitDaemons = in.BabysitDaemons
- out.MaxPods = in.MaxPods
- out.NvidiaGPUs = in.NvidiaGPUs
- out.DockerExecHandlerName = in.DockerExecHandlerName
- out.PodCIDR = in.PodCIDR
- out.ResolverConfig = in.ResolverConfig
- out.CPUCFSQuota = in.CPUCFSQuota
- out.Containerized = in.Containerized
- out.MaxOpenFiles = in.MaxOpenFiles
- out.ReconcileCIDR = in.ReconcileCIDR
- out.RegisterSchedulable = in.RegisterSchedulable
- out.ContentType = in.ContentType
- out.KubeAPIQPS = in.KubeAPIQPS
- out.KubeAPIBurst = in.KubeAPIBurst
- out.SerializeImagePulls = in.SerializeImagePulls
- out.ExperimentalFlannelOverlay = in.ExperimentalFlannelOverlay
- out.OutOfDiskTransitionFrequency = in.OutOfDiskTransitionFrequency
- out.NodeIP = in.NodeIP
- if in.NodeLabels != nil {
- in, out := &in.NodeLabels, &out.NodeLabels
- *out = make(map[string]string)
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.NodeLabels = nil
- }
- out.NonMasqueradeCIDR = in.NonMasqueradeCIDR
- out.EnableCustomMetrics = in.EnableCustomMetrics
- out.EvictionHard = in.EvictionHard
- out.EvictionSoft = in.EvictionSoft
- out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod
- out.EvictionPressureTransitionPeriod = in.EvictionPressureTransitionPeriod
- out.EvictionMaxPodGracePeriod = in.EvictionMaxPodGracePeriod
- out.EvictionMinimumReclaim = in.EvictionMinimumReclaim
- out.PodsPerCore = in.PodsPerCore
- out.EnableControllerAttachDetach = in.EnableControllerAttachDetach
- if in.SystemReserved != nil {
- in, out := &in.SystemReserved, &out.SystemReserved
- *out = make(config.ConfigurationMap)
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.SystemReserved = nil
- }
- if in.KubeReserved != nil {
- in, out := &in.KubeReserved, &out.KubeReserved
- *out = make(config.ConfigurationMap)
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.KubeReserved = nil
- }
- out.ProtectKernelDefaults = in.ProtectKernelDefaults
- out.MakeIPTablesUtilChains = in.MakeIPTablesUtilChains
- out.IPTablesMasqueradeBit = in.IPTablesMasqueradeBit
- out.IPTablesDropBit = in.IPTablesDropBit
- if in.AllowedUnsafeSysctls != nil {
- in, out := &in.AllowedUnsafeSysctls, &out.AllowedUnsafeSysctls
- *out = make([]string, len(*in))
- copy(*out, *in)
- } else {
- out.AllowedUnsafeSysctls = nil
- }
- out.ExperimentalRuntimeIntegrationType = in.ExperimentalRuntimeIntegrationType
- return nil
- }
-}
-
-func DeepCopy_componentconfig_LeaderElectionConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*LeaderElectionConfiguration)
- out := out.(*LeaderElectionConfiguration)
- out.LeaderElect = in.LeaderElect
- out.LeaseDuration = in.LeaseDuration
- out.RenewDeadline = in.RenewDeadline
- out.RetryPeriod = in.RetryPeriod
- return nil
- }
-}
-
-func DeepCopy_componentconfig_PersistentVolumeRecyclerConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*PersistentVolumeRecyclerConfiguration)
- out := out.(*PersistentVolumeRecyclerConfiguration)
- out.MaximumRetry = in.MaximumRetry
- out.MinimumTimeoutNFS = in.MinimumTimeoutNFS
- out.PodTemplateFilePathNFS = in.PodTemplateFilePathNFS
- out.IncrementTimeoutNFS = in.IncrementTimeoutNFS
- out.PodTemplateFilePathHostPath = in.PodTemplateFilePathHostPath
- out.MinimumTimeoutHostPath = in.MinimumTimeoutHostPath
- out.IncrementTimeoutHostPath = in.IncrementTimeoutHostPath
- return nil
- }
-}
-
-func DeepCopy_componentconfig_PortRangeVar(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*PortRangeVar)
- out := out.(*PortRangeVar)
- if in.Val != nil {
- in, out := &in.Val, &out.Val
- *out = new(string)
- **out = **in
- } else {
- out.Val = nil
- }
- return nil
- }
-}
-
-func DeepCopy_componentconfig_VolumeConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*VolumeConfiguration)
- out := out.(*VolumeConfiguration)
- out.EnableHostPathProvisioning = in.EnableHostPathProvisioning
- out.EnableDynamicProvisioning = in.EnableDynamicProvisioning
- out.PersistentVolumeRecyclerConfiguration = in.PersistentVolumeRecyclerConfiguration
- out.FlexVolumePluginDir = in.FlexVolumePluginDir
- return nil
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/doc.go
deleted file mode 100644
index 3401639c6..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// +k8s:deepcopy-gen=package,register
-// +groupName=imagepolicy.k8s.io
-// +k8s:openapi-gen=true
-
-package imagepolicy
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/install/install.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/install/install.go
deleted file mode 100644
index 87fd9974b..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/install/install.go
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Copyright 2016 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 install installs the experimental API group, making it available as
-// an option to all of the API encoding/decoding machinery.
-package install
-
-import (
- "k8s.io/client-go/1.5/pkg/apimachinery/announced"
- "k8s.io/client-go/1.5/pkg/apis/imagepolicy"
- "k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1"
- "k8s.io/client-go/1.5/pkg/util/sets"
-)
-
-func init() {
- if err := announced.NewGroupMetaFactory(
- &announced.GroupMetaFactoryArgs{
- GroupName: imagepolicy.GroupName,
- VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version},
- ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/imagepolicy",
- RootScopedKinds: sets.NewString("ImageReview"),
- AddInternalObjectsToScheme: imagepolicy.AddToScheme,
- },
- announced.VersionToSchemeFunc{
- v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme,
- },
- ).Announce().RegisterAndEnable(); err != nil {
- panic(err)
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/register.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/register.go
deleted file mode 100644
index bdf591a08..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/register.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Copyright 2016 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 imagepolicy
-
-import (
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "imagepolicy.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
-
-// Kind takes an unqualified kind and returns a Group qualified GroupKind
-func Kind(kind string) unversioned.GroupKind {
- return SchemeGroupVersion.WithKind(kind).GroupKind()
-}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) unversioned.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- AddToScheme = SchemeBuilder.AddToScheme
-)
-
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &api.ListOptions{},
- &api.DeleteOptions{},
- &api.ExportOptions{},
-
- &ImageReview{},
- )
- // versioned.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/types.generated.go
deleted file mode 100644
index e07028160..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/types.generated.go
+++ /dev/null
@@ -1,2194 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// ************************************************************
-// DO NOT EDIT.
-// THIS FILE IS AUTO-GENERATED BY codecgen.
-// ************************************************************
-
-package imagepolicy
-
-import (
- "errors"
- "fmt"
- codec1978 "github.com/ugorji/go/codec"
- pkg2_api "k8s.io/client-go/1.5/pkg/api"
- pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- pkg3_types "k8s.io/client-go/1.5/pkg/types"
- "reflect"
- "runtime"
- time "time"
-)
-
-const (
- // ----- content types ----
- codecSelferC_UTF81234 = 1
- codecSelferC_RAW1234 = 0
- // ----- value types used ----
- codecSelferValueTypeArray1234 = 10
- codecSelferValueTypeMap1234 = 9
- // ----- containerStateValues ----
- codecSelfer_containerMapKey1234 = 2
- codecSelfer_containerMapValue1234 = 3
- codecSelfer_containerMapEnd1234 = 4
- codecSelfer_containerArrayElem1234 = 6
- codecSelfer_containerArrayEnd1234 = 7
-)
-
-var (
- codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
- codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
-)
-
-type codecSelfer1234 struct{}
-
-func init() {
- if codec1978.GenVersion != 5 {
- _, file, _, _ := runtime.Caller(0)
- err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
- 5, codec1978.GenVersion, file)
- panic(err)
- }
- if false { // reference the types, but skip this branch at build/run time
- var v0 pkg2_api.ObjectMeta
- var v1 pkg1_unversioned.TypeMeta
- var v2 pkg3_types.UID
- var v3 time.Time
- _, _, _, _ = v0, v1, v2, v3
- }
-}
-
-func (x *ImageReview) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [19]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = x.Kind != ""
- yyq2[1] = x.APIVersion != ""
- yyq2[2] = x.Name != ""
- yyq2[3] = x.GenerateName != ""
- yyq2[4] = x.Namespace != ""
- yyq2[5] = x.SelfLink != ""
- yyq2[6] = x.UID != ""
- yyq2[7] = x.ResourceVersion != ""
- yyq2[8] = x.Generation != 0
- yyq2[9] = true
- yyq2[10] = x.ObjectMeta.DeletionTimestamp != nil && x.DeletionTimestamp != nil
- yyq2[11] = x.ObjectMeta.DeletionGracePeriodSeconds != nil && x.DeletionGracePeriodSeconds != nil
- yyq2[12] = len(x.Labels) != 0
- yyq2[13] = len(x.Annotations) != 0
- yyq2[14] = len(x.OwnerReferences) != 0
- yyq2[15] = len(x.Finalizers) != 0
- yyq2[16] = x.ClusterName != ""
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(19)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[1] {
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[2] {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Name))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("name"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym11 := z.EncBinary()
- _ = yym11
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Name))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[3] {
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("generateName"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym14 := z.EncBinary()
- _ = yym14
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[4] {
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[4] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("namespace"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym17 := z.EncBinary()
- _ = yym17
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[5] {
- yym19 := z.EncBinary()
- _ = yym19
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[5] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("selfLink"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym20 := z.EncBinary()
- _ = yym20
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[6] {
- yym22 := z.EncBinary()
- _ = yym22
- if false {
- } else if z.HasExtensions() && z.EncExt(x.UID) {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.UID))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[6] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("uid"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym23 := z.EncBinary()
- _ = yym23
- if false {
- } else if z.HasExtensions() && z.EncExt(x.UID) {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.UID))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[7] {
- yym25 := z.EncBinary()
- _ = yym25
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[7] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym26 := z.EncBinary()
- _ = yym26
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[8] {
- yym28 := z.EncBinary()
- _ = yym28
- if false {
- } else {
- r.EncodeInt(int64(x.Generation))
- }
- } else {
- r.EncodeInt(0)
- }
- } else {
- if yyq2[8] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("generation"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym29 := z.EncBinary()
- _ = yym29
- if false {
- } else {
- r.EncodeInt(int64(x.Generation))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[9] {
- yy31 := &x.CreationTimestamp
- yym32 := z.EncBinary()
- _ = yym32
- if false {
- } else if z.HasExtensions() && z.EncExt(yy31) {
- } else if yym32 {
- z.EncBinaryMarshal(yy31)
- } else if !yym32 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy31)
- } else {
- z.EncFallback(yy31)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[9] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("creationTimestamp"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy33 := &x.CreationTimestamp
- yym34 := z.EncBinary()
- _ = yym34
- if false {
- } else if z.HasExtensions() && z.EncExt(yy33) {
- } else if yym34 {
- z.EncBinaryMarshal(yy33)
- } else if !yym34 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy33)
- } else {
- z.EncFallback(yy33)
- }
- }
- }
- var yyn35 bool
- if x.ObjectMeta.DeletionTimestamp == nil {
- yyn35 = true
- goto LABEL35
- }
- LABEL35:
- if yyr2 || yy2arr2 {
- if yyn35 {
- r.EncodeNil()
- } else {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[10] {
- if x.DeletionTimestamp == nil {
- r.EncodeNil()
- } else {
- yym36 := z.EncBinary()
- _ = yym36
- if false {
- } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
- } else if yym36 {
- z.EncBinaryMarshal(x.DeletionTimestamp)
- } else if !yym36 && z.IsJSONHandle() {
- z.EncJSONMarshal(x.DeletionTimestamp)
- } else {
- z.EncFallback(x.DeletionTimestamp)
- }
- }
- } else {
- r.EncodeNil()
- }
- }
- } else {
- if yyq2[10] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("deletionTimestamp"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if yyn35 {
- r.EncodeNil()
- } else {
- if x.DeletionTimestamp == nil {
- r.EncodeNil()
- } else {
- yym37 := z.EncBinary()
- _ = yym37
- if false {
- } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
- } else if yym37 {
- z.EncBinaryMarshal(x.DeletionTimestamp)
- } else if !yym37 && z.IsJSONHandle() {
- z.EncJSONMarshal(x.DeletionTimestamp)
- } else {
- z.EncFallback(x.DeletionTimestamp)
- }
- }
- }
- }
- }
- var yyn38 bool
- if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
- yyn38 = true
- goto LABEL38
- }
- LABEL38:
- if yyr2 || yy2arr2 {
- if yyn38 {
- r.EncodeNil()
- } else {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[11] {
- if x.DeletionGracePeriodSeconds == nil {
- r.EncodeNil()
- } else {
- yy39 := *x.DeletionGracePeriodSeconds
- yym40 := z.EncBinary()
- _ = yym40
- if false {
- } else {
- r.EncodeInt(int64(yy39))
- }
- }
- } else {
- r.EncodeNil()
- }
- }
- } else {
- if yyq2[11] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("deletionGracePeriodSeconds"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if yyn38 {
- r.EncodeNil()
- } else {
- if x.DeletionGracePeriodSeconds == nil {
- r.EncodeNil()
- } else {
- yy41 := *x.DeletionGracePeriodSeconds
- yym42 := z.EncBinary()
- _ = yym42
- if false {
- } else {
- r.EncodeInt(int64(yy41))
- }
- }
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[12] {
- if x.Labels == nil {
- r.EncodeNil()
- } else {
- yym44 := z.EncBinary()
- _ = yym44
- if false {
- } else {
- z.F.EncMapStringStringV(x.Labels, false, e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[12] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("labels"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Labels == nil {
- r.EncodeNil()
- } else {
- yym45 := z.EncBinary()
- _ = yym45
- if false {
- } else {
- z.F.EncMapStringStringV(x.Labels, false, e)
- }
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[13] {
- if x.Annotations == nil {
- r.EncodeNil()
- } else {
- yym47 := z.EncBinary()
- _ = yym47
- if false {
- } else {
- z.F.EncMapStringStringV(x.Annotations, false, e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[13] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("annotations"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Annotations == nil {
- r.EncodeNil()
- } else {
- yym48 := z.EncBinary()
- _ = yym48
- if false {
- } else {
- z.F.EncMapStringStringV(x.Annotations, false, e)
- }
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[14] {
- if x.OwnerReferences == nil {
- r.EncodeNil()
- } else {
- yym50 := z.EncBinary()
- _ = yym50
- if false {
- } else {
- h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[14] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("ownerReferences"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.OwnerReferences == nil {
- r.EncodeNil()
- } else {
- yym51 := z.EncBinary()
- _ = yym51
- if false {
- } else {
- h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e)
- }
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[15] {
- if x.Finalizers == nil {
- r.EncodeNil()
- } else {
- yym53 := z.EncBinary()
- _ = yym53
- if false {
- } else {
- z.F.EncSliceStringV(x.Finalizers, false, e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[15] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("finalizers"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Finalizers == nil {
- r.EncodeNil()
- } else {
- yym54 := z.EncBinary()
- _ = yym54
- if false {
- } else {
- z.F.EncSliceStringV(x.Finalizers, false, e)
- }
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[16] {
- yym56 := z.EncBinary()
- _ = yym56
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[16] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clusterName"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym57 := z.EncBinary()
- _ = yym57
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy59 := &x.Spec
- yy59.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("Spec"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy60 := &x.Spec
- yy60.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy62 := &x.Status
- yy62.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("Status"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy63 := &x.Status
- yy63.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ImageReview) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym64 := z.DecBinary()
- _ = yym64
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct65 := r.ContainerType()
- if yyct65 == codecSelferValueTypeMap1234 {
- yyl65 := r.ReadMapStart()
- if yyl65 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl65, d)
- }
- } else if yyct65 == codecSelferValueTypeArray1234 {
- yyl65 := r.ReadArrayStart()
- if yyl65 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl65, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ImageReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys66Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys66Slc
- var yyhl66 bool = l >= 0
- for yyj66 := 0; ; yyj66++ {
- if yyhl66 {
- if yyj66 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys66Slc = r.DecodeBytes(yys66Slc, true, true)
- yys66 := string(yys66Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys66 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "name":
- if r.TryDecodeAsNil() {
- x.Name = ""
- } else {
- x.Name = string(r.DecodeString())
- }
- case "generateName":
- if r.TryDecodeAsNil() {
- x.GenerateName = ""
- } else {
- x.GenerateName = string(r.DecodeString())
- }
- case "namespace":
- if r.TryDecodeAsNil() {
- x.Namespace = ""
- } else {
- x.Namespace = string(r.DecodeString())
- }
- case "selfLink":
- if r.TryDecodeAsNil() {
- x.SelfLink = ""
- } else {
- x.SelfLink = string(r.DecodeString())
- }
- case "uid":
- if r.TryDecodeAsNil() {
- x.UID = ""
- } else {
- x.UID = pkg3_types.UID(r.DecodeString())
- }
- case "resourceVersion":
- if r.TryDecodeAsNil() {
- x.ResourceVersion = ""
- } else {
- x.ResourceVersion = string(r.DecodeString())
- }
- case "generation":
- if r.TryDecodeAsNil() {
- x.Generation = 0
- } else {
- x.Generation = int64(r.DecodeInt(64))
- }
- case "creationTimestamp":
- if r.TryDecodeAsNil() {
- x.CreationTimestamp = pkg1_unversioned.Time{}
- } else {
- yyv76 := &x.CreationTimestamp
- yym77 := z.DecBinary()
- _ = yym77
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv76) {
- } else if yym77 {
- z.DecBinaryUnmarshal(yyv76)
- } else if !yym77 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv76)
- } else {
- z.DecFallback(yyv76, false)
- }
- }
- case "deletionTimestamp":
- if x.ObjectMeta.DeletionTimestamp == nil {
- x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
- }
- if r.TryDecodeAsNil() {
- if x.DeletionTimestamp != nil {
- x.DeletionTimestamp = nil
- }
- } else {
- if x.DeletionTimestamp == nil {
- x.DeletionTimestamp = new(pkg1_unversioned.Time)
- }
- yym79 := z.DecBinary()
- _ = yym79
- if false {
- } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
- } else if yym79 {
- z.DecBinaryUnmarshal(x.DeletionTimestamp)
- } else if !yym79 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(x.DeletionTimestamp)
- } else {
- z.DecFallback(x.DeletionTimestamp, false)
- }
- }
- case "deletionGracePeriodSeconds":
- if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
- x.ObjectMeta.DeletionGracePeriodSeconds = new(int64)
- }
- if r.TryDecodeAsNil() {
- if x.DeletionGracePeriodSeconds != nil {
- x.DeletionGracePeriodSeconds = nil
- }
- } else {
- if x.DeletionGracePeriodSeconds == nil {
- x.DeletionGracePeriodSeconds = new(int64)
- }
- yym81 := z.DecBinary()
- _ = yym81
- if false {
- } else {
- *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
- }
- }
- case "labels":
- if r.TryDecodeAsNil() {
- x.Labels = nil
- } else {
- yyv82 := &x.Labels
- yym83 := z.DecBinary()
- _ = yym83
- if false {
- } else {
- z.F.DecMapStringStringX(yyv82, false, d)
- }
- }
- case "annotations":
- if r.TryDecodeAsNil() {
- x.Annotations = nil
- } else {
- yyv84 := &x.Annotations
- yym85 := z.DecBinary()
- _ = yym85
- if false {
- } else {
- z.F.DecMapStringStringX(yyv84, false, d)
- }
- }
- case "ownerReferences":
- if r.TryDecodeAsNil() {
- x.OwnerReferences = nil
- } else {
- yyv86 := &x.OwnerReferences
- yym87 := z.DecBinary()
- _ = yym87
- if false {
- } else {
- h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv86), d)
- }
- }
- case "finalizers":
- if r.TryDecodeAsNil() {
- x.Finalizers = nil
- } else {
- yyv88 := &x.Finalizers
- yym89 := z.DecBinary()
- _ = yym89
- if false {
- } else {
- z.F.DecSliceStringX(yyv88, false, d)
- }
- }
- case "clusterName":
- if r.TryDecodeAsNil() {
- x.ClusterName = ""
- } else {
- x.ClusterName = string(r.DecodeString())
- }
- case "Spec":
- if r.TryDecodeAsNil() {
- x.Spec = ImageReviewSpec{}
- } else {
- yyv91 := &x.Spec
- yyv91.CodecDecodeSelf(d)
- }
- case "Status":
- if r.TryDecodeAsNil() {
- x.Status = ImageReviewStatus{}
- } else {
- yyv92 := &x.Status
- yyv92.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys66)
- } // end switch yys66
- } // end for yyj66
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj93 int
- var yyb93 bool
- var yyhl93 bool = l >= 0
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Name = ""
- } else {
- x.Name = string(r.DecodeString())
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.GenerateName = ""
- } else {
- x.GenerateName = string(r.DecodeString())
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Namespace = ""
- } else {
- x.Namespace = string(r.DecodeString())
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.SelfLink = ""
- } else {
- x.SelfLink = string(r.DecodeString())
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.UID = ""
- } else {
- x.UID = pkg3_types.UID(r.DecodeString())
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ResourceVersion = ""
- } else {
- x.ResourceVersion = string(r.DecodeString())
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Generation = 0
- } else {
- x.Generation = int64(r.DecodeInt(64))
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.CreationTimestamp = pkg1_unversioned.Time{}
- } else {
- yyv103 := &x.CreationTimestamp
- yym104 := z.DecBinary()
- _ = yym104
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv103) {
- } else if yym104 {
- z.DecBinaryUnmarshal(yyv103)
- } else if !yym104 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv103)
- } else {
- z.DecFallback(yyv103, false)
- }
- }
- if x.ObjectMeta.DeletionTimestamp == nil {
- x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time)
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- if x.DeletionTimestamp != nil {
- x.DeletionTimestamp = nil
- }
- } else {
- if x.DeletionTimestamp == nil {
- x.DeletionTimestamp = new(pkg1_unversioned.Time)
- }
- yym106 := z.DecBinary()
- _ = yym106
- if false {
- } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
- } else if yym106 {
- z.DecBinaryUnmarshal(x.DeletionTimestamp)
- } else if !yym106 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(x.DeletionTimestamp)
- } else {
- z.DecFallback(x.DeletionTimestamp, false)
- }
- }
- if x.ObjectMeta.DeletionGracePeriodSeconds == nil {
- x.ObjectMeta.DeletionGracePeriodSeconds = new(int64)
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- if x.DeletionGracePeriodSeconds != nil {
- x.DeletionGracePeriodSeconds = nil
- }
- } else {
- if x.DeletionGracePeriodSeconds == nil {
- x.DeletionGracePeriodSeconds = new(int64)
- }
- yym108 := z.DecBinary()
- _ = yym108
- if false {
- } else {
- *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
- }
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Labels = nil
- } else {
- yyv109 := &x.Labels
- yym110 := z.DecBinary()
- _ = yym110
- if false {
- } else {
- z.F.DecMapStringStringX(yyv109, false, d)
- }
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Annotations = nil
- } else {
- yyv111 := &x.Annotations
- yym112 := z.DecBinary()
- _ = yym112
- if false {
- } else {
- z.F.DecMapStringStringX(yyv111, false, d)
- }
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.OwnerReferences = nil
- } else {
- yyv113 := &x.OwnerReferences
- yym114 := z.DecBinary()
- _ = yym114
- if false {
- } else {
- h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv113), d)
- }
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Finalizers = nil
- } else {
- yyv115 := &x.Finalizers
- yym116 := z.DecBinary()
- _ = yym116
- if false {
- } else {
- z.F.DecSliceStringX(yyv115, false, d)
- }
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ClusterName = ""
- } else {
- x.ClusterName = string(r.DecodeString())
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Spec = ImageReviewSpec{}
- } else {
- yyv118 := &x.Spec
- yyv118.CodecDecodeSelf(d)
- }
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Status = ImageReviewStatus{}
- } else {
- yyv119 := &x.Status
- yyv119.CodecDecodeSelf(d)
- }
- for {
- yyj93++
- if yyhl93 {
- yyb93 = yyj93 > l
- } else {
- yyb93 = r.CheckBreak()
- }
- if yyb93 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj93-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ImageReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym120 := z.EncBinary()
- _ = yym120
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep121 := !z.EncBinary()
- yy2arr121 := z.EncBasicHandle().StructToArray
- var yyq121 [3]bool
- _, _, _ = yysep121, yyq121, yy2arr121
- const yyr121 bool = false
- var yynn121 int
- if yyr121 || yy2arr121 {
- r.EncodeArrayStart(3)
- } else {
- yynn121 = 3
- for _, b := range yyq121 {
- if b {
- yynn121++
- }
- }
- r.EncodeMapStart(yynn121)
- yynn121 = 0
- }
- if yyr121 || yy2arr121 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Containers == nil {
- r.EncodeNil()
- } else {
- yym123 := z.EncBinary()
- _ = yym123
- if false {
- } else {
- h.encSliceImageReviewContainerSpec(([]ImageReviewContainerSpec)(x.Containers), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("Containers"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Containers == nil {
- r.EncodeNil()
- } else {
- yym124 := z.EncBinary()
- _ = yym124
- if false {
- } else {
- h.encSliceImageReviewContainerSpec(([]ImageReviewContainerSpec)(x.Containers), e)
- }
- }
- }
- if yyr121 || yy2arr121 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Annotations == nil {
- r.EncodeNil()
- } else {
- yym126 := z.EncBinary()
- _ = yym126
- if false {
- } else {
- z.F.EncMapStringStringV(x.Annotations, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("Annotations"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Annotations == nil {
- r.EncodeNil()
- } else {
- yym127 := z.EncBinary()
- _ = yym127
- if false {
- } else {
- z.F.EncMapStringStringV(x.Annotations, false, e)
- }
- }
- }
- if yyr121 || yy2arr121 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym129 := z.EncBinary()
- _ = yym129
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("Namespace"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym130 := z.EncBinary()
- _ = yym130
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
- }
- }
- if yyr121 || yy2arr121 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ImageReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym131 := z.DecBinary()
- _ = yym131
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct132 := r.ContainerType()
- if yyct132 == codecSelferValueTypeMap1234 {
- yyl132 := r.ReadMapStart()
- if yyl132 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl132, d)
- }
- } else if yyct132 == codecSelferValueTypeArray1234 {
- yyl132 := r.ReadArrayStart()
- if yyl132 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl132, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ImageReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys133Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys133Slc
- var yyhl133 bool = l >= 0
- for yyj133 := 0; ; yyj133++ {
- if yyhl133 {
- if yyj133 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys133Slc = r.DecodeBytes(yys133Slc, true, true)
- yys133 := string(yys133Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys133 {
- case "Containers":
- if r.TryDecodeAsNil() {
- x.Containers = nil
- } else {
- yyv134 := &x.Containers
- yym135 := z.DecBinary()
- _ = yym135
- if false {
- } else {
- h.decSliceImageReviewContainerSpec((*[]ImageReviewContainerSpec)(yyv134), d)
- }
- }
- case "Annotations":
- if r.TryDecodeAsNil() {
- x.Annotations = nil
- } else {
- yyv136 := &x.Annotations
- yym137 := z.DecBinary()
- _ = yym137
- if false {
- } else {
- z.F.DecMapStringStringX(yyv136, false, d)
- }
- }
- case "Namespace":
- if r.TryDecodeAsNil() {
- x.Namespace = ""
- } else {
- x.Namespace = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys133)
- } // end switch yys133
- } // end for yyj133
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ImageReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj139 int
- var yyb139 bool
- var yyhl139 bool = l >= 0
- yyj139++
- if yyhl139 {
- yyb139 = yyj139 > l
- } else {
- yyb139 = r.CheckBreak()
- }
- if yyb139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Containers = nil
- } else {
- yyv140 := &x.Containers
- yym141 := z.DecBinary()
- _ = yym141
- if false {
- } else {
- h.decSliceImageReviewContainerSpec((*[]ImageReviewContainerSpec)(yyv140), d)
- }
- }
- yyj139++
- if yyhl139 {
- yyb139 = yyj139 > l
- } else {
- yyb139 = r.CheckBreak()
- }
- if yyb139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Annotations = nil
- } else {
- yyv142 := &x.Annotations
- yym143 := z.DecBinary()
- _ = yym143
- if false {
- } else {
- z.F.DecMapStringStringX(yyv142, false, d)
- }
- }
- yyj139++
- if yyhl139 {
- yyb139 = yyj139 > l
- } else {
- yyb139 = r.CheckBreak()
- }
- if yyb139 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Namespace = ""
- } else {
- x.Namespace = string(r.DecodeString())
- }
- for {
- yyj139++
- if yyhl139 {
- yyb139 = yyj139 > l
- } else {
- yyb139 = r.CheckBreak()
- }
- if yyb139 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj139-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ImageReviewContainerSpec) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym145 := z.EncBinary()
- _ = yym145
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep146 := !z.EncBinary()
- yy2arr146 := z.EncBasicHandle().StructToArray
- var yyq146 [1]bool
- _, _, _ = yysep146, yyq146, yy2arr146
- const yyr146 bool = false
- var yynn146 int
- if yyr146 || yy2arr146 {
- r.EncodeArrayStart(1)
- } else {
- yynn146 = 1
- for _, b := range yyq146 {
- if b {
- yynn146++
- }
- }
- r.EncodeMapStart(yynn146)
- yynn146 = 0
- }
- if yyr146 || yy2arr146 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym148 := z.EncBinary()
- _ = yym148
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Image))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("Image"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym149 := z.EncBinary()
- _ = yym149
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Image))
- }
- }
- if yyr146 || yy2arr146 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ImageReviewContainerSpec) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym150 := z.DecBinary()
- _ = yym150
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct151 := r.ContainerType()
- if yyct151 == codecSelferValueTypeMap1234 {
- yyl151 := r.ReadMapStart()
- if yyl151 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl151, d)
- }
- } else if yyct151 == codecSelferValueTypeArray1234 {
- yyl151 := r.ReadArrayStart()
- if yyl151 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl151, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ImageReviewContainerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys152Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys152Slc
- var yyhl152 bool = l >= 0
- for yyj152 := 0; ; yyj152++ {
- if yyhl152 {
- if yyj152 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys152Slc = r.DecodeBytes(yys152Slc, true, true)
- yys152 := string(yys152Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys152 {
- case "Image":
- if r.TryDecodeAsNil() {
- x.Image = ""
- } else {
- x.Image = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys152)
- } // end switch yys152
- } // end for yyj152
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ImageReviewContainerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj154 int
- var yyb154 bool
- var yyhl154 bool = l >= 0
- yyj154++
- if yyhl154 {
- yyb154 = yyj154 > l
- } else {
- yyb154 = r.CheckBreak()
- }
- if yyb154 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Image = ""
- } else {
- x.Image = string(r.DecodeString())
- }
- for {
- yyj154++
- if yyhl154 {
- yyb154 = yyj154 > l
- } else {
- yyb154 = r.CheckBreak()
- }
- if yyb154 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj154-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ImageReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym156 := z.EncBinary()
- _ = yym156
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep157 := !z.EncBinary()
- yy2arr157 := z.EncBasicHandle().StructToArray
- var yyq157 [2]bool
- _, _, _ = yysep157, yyq157, yy2arr157
- const yyr157 bool = false
- var yynn157 int
- if yyr157 || yy2arr157 {
- r.EncodeArrayStart(2)
- } else {
- yynn157 = 2
- for _, b := range yyq157 {
- if b {
- yynn157++
- }
- }
- r.EncodeMapStart(yynn157)
- yynn157 = 0
- }
- if yyr157 || yy2arr157 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym159 := z.EncBinary()
- _ = yym159
- if false {
- } else {
- r.EncodeBool(bool(x.Allowed))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("Allowed"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym160 := z.EncBinary()
- _ = yym160
- if false {
- } else {
- r.EncodeBool(bool(x.Allowed))
- }
- }
- if yyr157 || yy2arr157 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym162 := z.EncBinary()
- _ = yym162
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("Reason"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym163 := z.EncBinary()
- _ = yym163
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
- }
- }
- if yyr157 || yy2arr157 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ImageReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym164 := z.DecBinary()
- _ = yym164
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct165 := r.ContainerType()
- if yyct165 == codecSelferValueTypeMap1234 {
- yyl165 := r.ReadMapStart()
- if yyl165 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl165, d)
- }
- } else if yyct165 == codecSelferValueTypeArray1234 {
- yyl165 := r.ReadArrayStart()
- if yyl165 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl165, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ImageReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys166Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys166Slc
- var yyhl166 bool = l >= 0
- for yyj166 := 0; ; yyj166++ {
- if yyhl166 {
- if yyj166 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys166Slc = r.DecodeBytes(yys166Slc, true, true)
- yys166 := string(yys166Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys166 {
- case "Allowed":
- if r.TryDecodeAsNil() {
- x.Allowed = false
- } else {
- x.Allowed = bool(r.DecodeBool())
- }
- case "Reason":
- if r.TryDecodeAsNil() {
- x.Reason = ""
- } else {
- x.Reason = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys166)
- } // end switch yys166
- } // end for yyj166
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ImageReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj169 int
- var yyb169 bool
- var yyhl169 bool = l >= 0
- yyj169++
- if yyhl169 {
- yyb169 = yyj169 > l
- } else {
- yyb169 = r.CheckBreak()
- }
- if yyb169 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Allowed = false
- } else {
- x.Allowed = bool(r.DecodeBool())
- }
- yyj169++
- if yyhl169 {
- yyb169 = yyj169 > l
- } else {
- yyb169 = r.CheckBreak()
- }
- if yyb169 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Reason = ""
- } else {
- x.Reason = string(r.DecodeString())
- }
- for {
- yyj169++
- if yyhl169 {
- yyb169 = yyj169 > l
- } else {
- yyb169 = r.CheckBreak()
- }
- if yyb169 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj169-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) encSliceapi_OwnerReference(v []pkg2_api.OwnerReference, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv172 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy173 := &yyv172
- yy173.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceapi_OwnerReference(v *[]pkg2_api.OwnerReference, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv174 := *v
- yyh174, yyl174 := z.DecSliceHelperStart()
- var yyc174 bool
- if yyl174 == 0 {
- if yyv174 == nil {
- yyv174 = []pkg2_api.OwnerReference{}
- yyc174 = true
- } else if len(yyv174) != 0 {
- yyv174 = yyv174[:0]
- yyc174 = true
- }
- } else if yyl174 > 0 {
- var yyrr174, yyrl174 int
- var yyrt174 bool
- if yyl174 > cap(yyv174) {
-
- yyrg174 := len(yyv174) > 0
- yyv2174 := yyv174
- yyrl174, yyrt174 = z.DecInferLen(yyl174, z.DecBasicHandle().MaxInitLen, 72)
- if yyrt174 {
- if yyrl174 <= cap(yyv174) {
- yyv174 = yyv174[:yyrl174]
- } else {
- yyv174 = make([]pkg2_api.OwnerReference, yyrl174)
- }
- } else {
- yyv174 = make([]pkg2_api.OwnerReference, yyrl174)
- }
- yyc174 = true
- yyrr174 = len(yyv174)
- if yyrg174 {
- copy(yyv174, yyv2174)
- }
- } else if yyl174 != len(yyv174) {
- yyv174 = yyv174[:yyl174]
- yyc174 = true
- }
- yyj174 := 0
- for ; yyj174 < yyrr174; yyj174++ {
- yyh174.ElemContainerState(yyj174)
- if r.TryDecodeAsNil() {
- yyv174[yyj174] = pkg2_api.OwnerReference{}
- } else {
- yyv175 := &yyv174[yyj174]
- yyv175.CodecDecodeSelf(d)
- }
-
- }
- if yyrt174 {
- for ; yyj174 < yyl174; yyj174++ {
- yyv174 = append(yyv174, pkg2_api.OwnerReference{})
- yyh174.ElemContainerState(yyj174)
- if r.TryDecodeAsNil() {
- yyv174[yyj174] = pkg2_api.OwnerReference{}
- } else {
- yyv176 := &yyv174[yyj174]
- yyv176.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj174 := 0
- for ; !r.CheckBreak(); yyj174++ {
-
- if yyj174 >= len(yyv174) {
- yyv174 = append(yyv174, pkg2_api.OwnerReference{}) // var yyz174 pkg2_api.OwnerReference
- yyc174 = true
- }
- yyh174.ElemContainerState(yyj174)
- if yyj174 < len(yyv174) {
- if r.TryDecodeAsNil() {
- yyv174[yyj174] = pkg2_api.OwnerReference{}
- } else {
- yyv177 := &yyv174[yyj174]
- yyv177.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj174 < len(yyv174) {
- yyv174 = yyv174[:yyj174]
- yyc174 = true
- } else if yyj174 == 0 && yyv174 == nil {
- yyv174 = []pkg2_api.OwnerReference{}
- yyc174 = true
- }
- }
- yyh174.End()
- if yyc174 {
- *v = yyv174
- }
-}
-
-func (x codecSelfer1234) encSliceImageReviewContainerSpec(v []ImageReviewContainerSpec, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv178 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy179 := &yyv178
- yy179.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceImageReviewContainerSpec(v *[]ImageReviewContainerSpec, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv180 := *v
- yyh180, yyl180 := z.DecSliceHelperStart()
- var yyc180 bool
- if yyl180 == 0 {
- if yyv180 == nil {
- yyv180 = []ImageReviewContainerSpec{}
- yyc180 = true
- } else if len(yyv180) != 0 {
- yyv180 = yyv180[:0]
- yyc180 = true
- }
- } else if yyl180 > 0 {
- var yyrr180, yyrl180 int
- var yyrt180 bool
- if yyl180 > cap(yyv180) {
-
- yyrg180 := len(yyv180) > 0
- yyv2180 := yyv180
- yyrl180, yyrt180 = z.DecInferLen(yyl180, z.DecBasicHandle().MaxInitLen, 16)
- if yyrt180 {
- if yyrl180 <= cap(yyv180) {
- yyv180 = yyv180[:yyrl180]
- } else {
- yyv180 = make([]ImageReviewContainerSpec, yyrl180)
- }
- } else {
- yyv180 = make([]ImageReviewContainerSpec, yyrl180)
- }
- yyc180 = true
- yyrr180 = len(yyv180)
- if yyrg180 {
- copy(yyv180, yyv2180)
- }
- } else if yyl180 != len(yyv180) {
- yyv180 = yyv180[:yyl180]
- yyc180 = true
- }
- yyj180 := 0
- for ; yyj180 < yyrr180; yyj180++ {
- yyh180.ElemContainerState(yyj180)
- if r.TryDecodeAsNil() {
- yyv180[yyj180] = ImageReviewContainerSpec{}
- } else {
- yyv181 := &yyv180[yyj180]
- yyv181.CodecDecodeSelf(d)
- }
-
- }
- if yyrt180 {
- for ; yyj180 < yyl180; yyj180++ {
- yyv180 = append(yyv180, ImageReviewContainerSpec{})
- yyh180.ElemContainerState(yyj180)
- if r.TryDecodeAsNil() {
- yyv180[yyj180] = ImageReviewContainerSpec{}
- } else {
- yyv182 := &yyv180[yyj180]
- yyv182.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj180 := 0
- for ; !r.CheckBreak(); yyj180++ {
-
- if yyj180 >= len(yyv180) {
- yyv180 = append(yyv180, ImageReviewContainerSpec{}) // var yyz180 ImageReviewContainerSpec
- yyc180 = true
- }
- yyh180.ElemContainerState(yyj180)
- if yyj180 < len(yyv180) {
- if r.TryDecodeAsNil() {
- yyv180[yyj180] = ImageReviewContainerSpec{}
- } else {
- yyv183 := &yyv180[yyj180]
- yyv183.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj180 < len(yyv180) {
- yyv180 = yyv180[:yyj180]
- yyc180 = true
- } else if yyj180 == 0 && yyv180 == nil {
- yyv180 = []ImageReviewContainerSpec{}
- yyc180 = true
- }
- }
- yyh180.End()
- if yyc180 {
- *v = yyv180
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/types.go
deleted file mode 100644
index 793d20b3f..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/types.go
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-Copyright 2016 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 imagepolicy
-
-import (
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
-)
-
-// +genclient=true
-// +nonNamespaced=true
-// +noMethods=true
-
-// ImageReview checks if the set of images in a pod are allowed.
-type ImageReview struct {
- unversioned.TypeMeta
- api.ObjectMeta
-
- // Spec holds information about the pod being evaluated
- Spec ImageReviewSpec
-
- // Status is filled in by the backend and indicates whether the pod should be allowed.
- Status ImageReviewStatus
-}
-
-// ImageReviewSpec is a description of the pod creation request.
-type ImageReviewSpec struct {
- // Containers is a list of a subset of the information in each container of the Pod being created.
- Containers []ImageReviewContainerSpec
- // Annotations is a list of key-value pairs extracted from the Pod's annotations.
- // It only includes keys which match the pattern `*.image-policy.k8s.io/*`.
- // It is up to each webhook backend to determine how to interpret these annotations, if at all.
- Annotations map[string]string
- // Namespace is the namespace the pod is being created in.
- Namespace string
-}
-
-// ImageReviewContainerSpec is a description of a container within the pod creation request.
-type ImageReviewContainerSpec struct {
- // This can be in the form image:tag or image@SHA:012345679abcdef.
- Image string
- // In future, we may add command line overrides, exec health check command lines, and so on.
-}
-
-// ImageReviewStatus is the result of the token authentication request.
-type ImageReviewStatus struct {
- // Allowed indicates that all images were allowed to be run.
- Allowed bool
- // Reason should be empty unless Allowed is false in which case it
- // may contain a short description of what is wrong. Kubernetes
- // may truncate excessively long errors when displaying to the user.
- Reason string
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/doc.go
deleted file mode 100644
index 6892fbef2..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/doc.go
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// +k8s:deepcopy-gen=package,register
-// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/imagepolicy
-// +k8s:openapi-gen=true
-
-// +groupName=imagepolicy.k8s.io
-package v1alpha1
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/generated.pb.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/generated.pb.go
deleted file mode 100644
index 9acc041f7..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/generated.pb.go
+++ /dev/null
@@ -1,1059 +0,0 @@
-/*
-Copyright 2016 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.
-// source: k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1alpha1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/generated.proto
-
- It has these top-level messages:
- ImageReview
- ImageReviewContainerSpec
- ImageReviewSpec
- ImageReviewStatus
-*/
-package v1alpha1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import strings "strings"
-import reflect "reflect"
-import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
-
-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.
-const _ = proto.GoGoProtoPackageIsVersion1
-
-func (m *ImageReview) Reset() { *m = ImageReview{} }
-func (*ImageReview) ProtoMessage() {}
-func (*ImageReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *ImageReviewContainerSpec) Reset() { *m = ImageReviewContainerSpec{} }
-func (*ImageReviewContainerSpec) ProtoMessage() {}
-func (*ImageReviewContainerSpec) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{1}
-}
-
-func (m *ImageReviewSpec) Reset() { *m = ImageReviewSpec{} }
-func (*ImageReviewSpec) ProtoMessage() {}
-func (*ImageReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *ImageReviewStatus) Reset() { *m = ImageReviewStatus{} }
-func (*ImageReviewStatus) ProtoMessage() {}
-func (*ImageReviewStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func init() {
- proto.RegisterType((*ImageReview)(nil), "k8s.io.client-go.1.5.pkg.apis.imagepolicy.v1alpha1.ImageReview")
- proto.RegisterType((*ImageReviewContainerSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.imagepolicy.v1alpha1.ImageReviewContainerSpec")
- proto.RegisterType((*ImageReviewSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.imagepolicy.v1alpha1.ImageReviewSpec")
- proto.RegisterType((*ImageReviewStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.imagepolicy.v1alpha1.ImageReviewStatus")
-}
-func (m *ImageReview) 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 *ImageReview) 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()))
- n1, err := m.ObjectMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- data[i] = 0x1a
- i++
- i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *ImageReviewContainerSpec) 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 *ImageReviewContainerSpec) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Image)))
- i += copy(data[i:], m.Image)
- return i, nil
-}
-
-func (m *ImageReviewSpec) 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 *ImageReviewSpec) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Containers) > 0 {
- for _, msg := range m.Containers {
- 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 len(m.Annotations) > 0 {
- for k := range m.Annotations {
- data[i] = 0x12
- i++
- v := m.Annotations[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)
- }
- }
- data[i] = 0x1a
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Namespace)))
- i += copy(data[i:], m.Namespace)
- return i, nil
-}
-
-func (m *ImageReviewStatus) 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 *ImageReviewStatus) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0x8
- i++
- if m.Allowed {
- data[i] = 1
- } else {
- data[i] = 0
- }
- i++
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Reason)))
- i += copy(data[i:], m.Reason)
- return i, nil
-}
-
-func encodeFixed64Generated(data []byte, offset int, v uint64) int {
- data[offset] = uint8(v)
- data[offset+1] = uint8(v >> 8)
- data[offset+2] = uint8(v >> 16)
- data[offset+3] = uint8(v >> 24)
- data[offset+4] = uint8(v >> 32)
- data[offset+5] = uint8(v >> 40)
- data[offset+6] = uint8(v >> 48)
- data[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(data []byte, offset int, v uint32) int {
- data[offset] = uint8(v)
- data[offset+1] = uint8(v >> 8)
- data[offset+2] = uint8(v >> 16)
- data[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-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 *ImageReview) 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))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ImageReviewContainerSpec) Size() (n int) {
- var l int
- _ = l
- l = len(m.Image)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ImageReviewSpec) Size() (n int) {
- var l int
- _ = l
- if len(m.Containers) > 0 {
- for _, e := range m.Containers {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Annotations) > 0 {
- for k, v := range m.Annotations {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
- n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
- }
- }
- l = len(m.Namespace)
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ImageReviewStatus) Size() (n int) {
- var l int
- _ = l
- n += 2
- l = len(m.Reason)
- 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 *ImageReview) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ImageReview{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ImageReviewSpec", "ImageReviewSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ImageReviewStatus", "ImageReviewStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ImageReviewContainerSpec) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ImageReviewContainerSpec{`,
- `Image:` + fmt.Sprintf("%v", this.Image) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ImageReviewSpec) String() string {
- if this == nil {
- return "nil"
- }
- keysForAnnotations := make([]string, 0, len(this.Annotations))
- for k := range this.Annotations {
- keysForAnnotations = append(keysForAnnotations, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
- mapStringForAnnotations := "map[string]string{"
- for _, k := range keysForAnnotations {
- mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
- }
- mapStringForAnnotations += "}"
- s := strings.Join([]string{`&ImageReviewSpec{`,
- `Containers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Containers), "ImageReviewContainerSpec", "ImageReviewContainerSpec", 1), `&`, ``, 1) + `,`,
- `Annotations:` + mapStringForAnnotations + `,`,
- `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ImageReviewStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ImageReviewStatus{`,
- `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `}`,
- }, "")
- 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 *ImageReview) 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: ImageReview: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ImageReview: 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 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 *ImageReviewContainerSpec) 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: ImageReviewContainerSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ImageReviewContainerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Image", 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.Image = 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 *ImageReviewSpec) 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: ImageReviewSpec: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ImageReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Containers", 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.Containers = append(m.Containers, ImageReviewContainerSpec{})
- if err := m.Containers[len(m.Containers)-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 Annotations", 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
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- 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
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- 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
- if m.Annotations == nil {
- m.Annotations = make(map[string]string)
- }
- m.Annotations[mapkey] = mapvalue
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = 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 *ImageReviewStatus) 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: ImageReviewStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ImageReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Allowed = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", 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.Reason = 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")
-)
-
-var fileDescriptorGenerated = []byte{
- // 569 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x92, 0xbf, 0x6e, 0x13, 0x4f,
- 0x10, 0xc7, 0xfd, 0x27, 0x76, 0xec, 0xf5, 0xef, 0x47, 0x92, 0x85, 0xc2, 0x72, 0xe1, 0x20, 0x23,
- 0xa1, 0x80, 0xc8, 0xae, 0x1c, 0x09, 0x29, 0xa2, 0x20, 0xe4, 0x10, 0x45, 0x0a, 0x40, 0x2c, 0x0d,
- 0xa2, 0x5b, 0x9f, 0x27, 0x97, 0x8b, 0xcf, 0xbb, 0xa7, 0xdb, 0x3d, 0x47, 0x2e, 0x90, 0x28, 0x29,
- 0x28, 0x78, 0x1b, 0x5e, 0xc1, 0x65, 0x4a, 0xaa, 0x08, 0xc2, 0x8b, 0xb0, 0xb7, 0x77, 0xce, 0x1d,
- 0x76, 0x5c, 0x20, 0x17, 0x23, 0xed, 0xec, 0xec, 0x7c, 0xe6, 0x3b, 0x33, 0x8b, 0x8e, 0x46, 0x87,
- 0x8a, 0xf8, 0x92, 0x8e, 0xe2, 0x01, 0x44, 0x02, 0x34, 0x28, 0x1a, 0x8e, 0x3c, 0xca, 0x43, 0x5f,
- 0x51, 0x7f, 0xcc, 0x3d, 0x08, 0x65, 0xe0, 0xbb, 0x53, 0x3a, 0xe9, 0xf3, 0x20, 0x3c, 0xe3, 0x7d,
- 0xea, 0x81, 0x80, 0x88, 0x6b, 0x18, 0x92, 0x30, 0x92, 0x5a, 0x62, 0x9a, 0x02, 0x48, 0x0e, 0x20,
- 0x06, 0x40, 0x12, 0x00, 0x29, 0x00, 0xc8, 0x1c, 0xd0, 0xd9, 0xf7, 0x7c, 0x7d, 0x16, 0x0f, 0x88,
- 0x2b, 0xc7, 0xd4, 0x93, 0x9e, 0xa4, 0x96, 0x33, 0x88, 0x4f, 0xad, 0x67, 0x1d, 0x7b, 0x4a, 0xf9,
- 0x9d, 0x83, 0x95, 0x02, 0x69, 0x04, 0x4a, 0xc6, 0x91, 0x0b, 0x8b, 0x9a, 0x3a, 0x4f, 0x57, 0xe7,
- 0xc4, 0x62, 0x02, 0x91, 0xf2, 0xa5, 0x80, 0xe1, 0x52, 0xda, 0x93, 0xd5, 0x69, 0x93, 0xa5, 0xc6,
- 0x3b, 0xfb, 0xb7, 0xbf, 0x8e, 0x62, 0xa1, 0xfd, 0xf1, 0xb2, 0xa6, 0xfe, 0xed, 0xcf, 0x63, 0xed,
- 0x07, 0xd4, 0x17, 0x5a, 0xe9, 0x68, 0x31, 0xa5, 0xf7, 0xbd, 0x82, 0x5a, 0x27, 0xc9, 0x08, 0x19,
- 0x4c, 0x7c, 0xb8, 0xc0, 0x1f, 0x50, 0x63, 0x0c, 0x9a, 0x0f, 0xb9, 0xe6, 0xed, 0xf2, 0xfd, 0xf2,
- 0x5e, 0xeb, 0x60, 0x8f, 0xac, 0x9c, 0xbe, 0x19, 0x38, 0x79, 0x3b, 0x38, 0x07, 0x57, 0xbf, 0x36,
- 0x39, 0x0e, 0x9e, 0x5d, 0xed, 0x96, 0xae, 0xaf, 0x76, 0x51, 0x7e, 0xc7, 0x6e, 0x68, 0x78, 0x80,
- 0x36, 0x54, 0x08, 0x6e, 0xbb, 0x62, 0xa9, 0x2f, 0xc8, 0x3f, 0xee, 0x94, 0x14, 0x54, 0xbe, 0x37,
- 0x1c, 0xe7, 0xbf, 0xac, 0xda, 0x46, 0xe2, 0x31, 0xcb, 0xc6, 0xe7, 0xa8, 0xae, 0x34, 0xd7, 0xb1,
- 0x6a, 0x57, 0x6d, 0x15, 0x67, 0xad, 0x2a, 0x96, 0xe4, 0xdc, 0xc9, 0xea, 0xd4, 0x53, 0x9f, 0x65,
- 0x15, 0x7a, 0x47, 0xa8, 0x5d, 0x78, 0xfc, 0x52, 0x0a, 0xcd, 0x7d, 0x33, 0xdb, 0x44, 0x0d, 0x7e,
- 0x80, 0x6a, 0x96, 0x6e, 0x47, 0xd8, 0x74, 0xfe, 0xcf, 0x10, 0xb5, 0x34, 0x21, 0x8d, 0xf5, 0xbe,
- 0x56, 0xd1, 0xd6, 0x42, 0x53, 0xf8, 0x13, 0x42, 0xee, 0x9c, 0xa4, 0x4c, 0x76, 0xd5, 0x34, 0x71,
- 0xb2, 0x4e, 0x13, 0x7f, 0xe9, 0xca, 0x37, 0x74, 0x73, 0xad, 0x58, 0xa1, 0x20, 0xfe, 0x52, 0x46,
- 0x2d, 0x2e, 0x84, 0x34, 0x1d, 0x9a, 0xef, 0xab, 0xcc, 0xae, 0x12, 0x01, 0xef, 0xd6, 0xdd, 0x15,
- 0x39, 0xce, 0x99, 0xaf, 0x84, 0x8e, 0xa6, 0xce, 0xdd, 0x4c, 0x48, 0xab, 0x10, 0x61, 0xc5, 0xd2,
- 0x98, 0xa2, 0xa6, 0xe0, 0x63, 0x50, 0x21, 0x77, 0xc1, 0x6e, 0xb3, 0xe9, 0xec, 0x64, 0x49, 0xcd,
- 0x37, 0xf3, 0x00, 0xcb, 0xdf, 0x74, 0x9e, 0xa3, 0xed, 0xc5, 0x32, 0x78, 0x1b, 0x55, 0x47, 0x30,
- 0x4d, 0xb7, 0xc0, 0x92, 0x23, 0xbe, 0x87, 0x6a, 0x13, 0x1e, 0xc4, 0x60, 0xbf, 0x61, 0x93, 0xa5,
- 0xce, 0xb3, 0xca, 0x61, 0xb9, 0x77, 0x8a, 0x76, 0x96, 0x96, 0x8f, 0x1f, 0xa1, 0x4d, 0x1e, 0x04,
- 0xf2, 0x02, 0x86, 0x16, 0xd2, 0x70, 0xb6, 0x32, 0x0d, 0x9b, 0xc7, 0xe9, 0x35, 0x9b, 0xc7, 0xf1,
- 0x43, 0x54, 0x8f, 0x80, 0x2b, 0x29, 0x52, 0x74, 0xfe, 0x6f, 0x98, 0xbd, 0x65, 0x59, 0xd4, 0x79,
- 0x3c, 0xfb, 0xd5, 0x2d, 0x5d, 0x1a, 0xfb, 0x61, 0xec, 0xf3, 0x75, 0xb7, 0x3c, 0x33, 0x76, 0x69,
- 0xec, 0xa7, 0xb1, 0x6f, 0xbf, 0xbb, 0xa5, 0x8f, 0x8d, 0xf9, 0x1c, 0xff, 0x04, 0x00, 0x00, 0xff,
- 0xff, 0x5b, 0xde, 0x19, 0x74, 0x3a, 0x05, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/generated.proto b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/generated.proto
deleted file mode 100644
index a0797d576..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/generated.proto
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-Copyright 2016 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.kubernetes.pkg.apis.imagepolicy.v1alpha1;
-
-import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
-import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
-import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
-import "k8s.io/kubernetes/pkg/runtime/generated.proto";
-import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1alpha1";
-
-// ImageReview checks if the set of images in a pod are allowed.
-message ImageReview {
- optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
-
- // Spec holds information about the pod being evaluated
- optional ImageReviewSpec spec = 2;
-
- // Status is filled in by the backend and indicates whether the pod should be allowed.
- optional ImageReviewStatus status = 3;
-}
-
-// ImageReviewContainerSpec is a description of a container within the pod creation request.
-message ImageReviewContainerSpec {
- // This can be in the form image:tag or image@SHA:012345679abcdef.
- optional string image = 1;
-}
-
-// ImageReviewSpec is a description of the pod creation request.
-message ImageReviewSpec {
- // Containers is a list of a subset of the information in each container of the Pod being created.
- repeated ImageReviewContainerSpec containers = 1;
-
- // Annotations is a list of key-value pairs extracted from the Pod's annotations.
- // It only includes keys which match the pattern `*.image-policy.k8s.io/*`.
- // It is up to each webhook backend to determine how to interpret these annotations, if at all.
- map<string, string> annotations = 2;
-
- // Namespace is the namespace the pod is being created in.
- optional string namespace = 3;
-}
-
-// ImageReviewStatus is the result of the token authentication request.
-message ImageReviewStatus {
- // Allowed indicates that all images were allowed to be run.
- optional bool allowed = 1;
-
- // Reason should be empty unless Allowed is false in which case it
- // may contain a short description of what is wrong. Kubernetes
- // may truncate excessively long errors when displaying to the user.
- optional string reason = 2;
-}
-
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/register.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/register.go
deleted file mode 100644
index 9b76a4109..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/register.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2016 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/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-// GroupName is the group name for this API.
-const GroupName = "imagepolicy.k8s.io"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
-
-var (
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- AddToScheme = SchemeBuilder.AddToScheme
-)
-
-// Adds the list of known types to api.Scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &v1.ListOptions{},
- &v1.DeleteOptions{},
- &v1.ExportOptions{},
-
- &ImageReview{},
- )
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types.generated.go
deleted file mode 100644
index dbdd6e9b2..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types.generated.go
+++ /dev/null
@@ -1,1208 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// ************************************************************
-// DO NOT EDIT.
-// THIS FILE IS AUTO-GENERATED BY codecgen.
-// ************************************************************
-
-package v1alpha1
-
-import (
- "errors"
- "fmt"
- codec1978 "github.com/ugorji/go/codec"
- pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- pkg2_v1 "k8s.io/client-go/1.5/pkg/api/v1"
- pkg3_types "k8s.io/client-go/1.5/pkg/types"
- "reflect"
- "runtime"
- time "time"
-)
-
-const (
- // ----- content types ----
- codecSelferC_UTF81234 = 1
- codecSelferC_RAW1234 = 0
- // ----- value types used ----
- codecSelferValueTypeArray1234 = 10
- codecSelferValueTypeMap1234 = 9
- // ----- containerStateValues ----
- codecSelfer_containerMapKey1234 = 2
- codecSelfer_containerMapValue1234 = 3
- codecSelfer_containerMapEnd1234 = 4
- codecSelfer_containerArrayElem1234 = 6
- codecSelfer_containerArrayEnd1234 = 7
-)
-
-var (
- codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
- codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
-)
-
-type codecSelfer1234 struct{}
-
-func init() {
- if codec1978.GenVersion != 5 {
- _, file, _, _ := runtime.Caller(0)
- err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
- 5, codec1978.GenVersion, file)
- panic(err)
- }
- if false { // reference the types, but skip this branch at build/run time
- var v0 pkg1_unversioned.TypeMeta
- var v1 pkg2_v1.ObjectMeta
- var v2 pkg3_types.UID
- var v3 time.Time
- _, _, _, _ = v0, v1, v2, v3
- }
-}
-
-func (x *ImageReview) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [5]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- yyq2[0] = x.Kind != ""
- yyq2[1] = x.APIVersion != ""
- yyq2[2] = true
- yyq2[4] = true
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(5)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[0] {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[1] {
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq2[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[2] {
- yy10 := &x.ObjectMeta
- yy10.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy11 := &x.ObjectMeta
- yy11.CodecEncodeSelf(e)
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy13 := &x.Spec
- yy13.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("spec"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy14 := &x.Spec
- yy14.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq2[4] {
- yy16 := &x.Status
- yy16.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq2[4] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("status"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy17 := &x.Status
- yy17.CodecEncodeSelf(e)
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ImageReview) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym18 := z.DecBinary()
- _ = yym18
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct19 := r.ContainerType()
- if yyct19 == codecSelferValueTypeMap1234 {
- yyl19 := r.ReadMapStart()
- if yyl19 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl19, d)
- }
- } else if yyct19 == codecSelferValueTypeArray1234 {
- yyl19 := r.ReadArrayStart()
- if yyl19 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl19, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ImageReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys20Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys20Slc
- var yyhl20 bool = l >= 0
- for yyj20 := 0; ; yyj20++ {
- if yyhl20 {
- if yyj20 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys20Slc = r.DecodeBytes(yys20Slc, true, true)
- yys20 := string(yys20Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys20 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg2_v1.ObjectMeta{}
- } else {
- yyv23 := &x.ObjectMeta
- yyv23.CodecDecodeSelf(d)
- }
- case "spec":
- if r.TryDecodeAsNil() {
- x.Spec = ImageReviewSpec{}
- } else {
- yyv24 := &x.Spec
- yyv24.CodecDecodeSelf(d)
- }
- case "status":
- if r.TryDecodeAsNil() {
- x.Status = ImageReviewStatus{}
- } else {
- yyv25 := &x.Status
- yyv25.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys20)
- } // end switch yys20
- } // end for yyj20
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj26 int
- var yyb26 bool
- var yyhl26 bool = l >= 0
- yyj26++
- if yyhl26 {
- yyb26 = yyj26 > l
- } else {
- yyb26 = r.CheckBreak()
- }
- if yyb26 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj26++
- if yyhl26 {
- yyb26 = yyj26 > l
- } else {
- yyb26 = r.CheckBreak()
- }
- if yyb26 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj26++
- if yyhl26 {
- yyb26 = yyj26 > l
- } else {
- yyb26 = r.CheckBreak()
- }
- if yyb26 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg2_v1.ObjectMeta{}
- } else {
- yyv29 := &x.ObjectMeta
- yyv29.CodecDecodeSelf(d)
- }
- yyj26++
- if yyhl26 {
- yyb26 = yyj26 > l
- } else {
- yyb26 = r.CheckBreak()
- }
- if yyb26 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Spec = ImageReviewSpec{}
- } else {
- yyv30 := &x.Spec
- yyv30.CodecDecodeSelf(d)
- }
- yyj26++
- if yyhl26 {
- yyb26 = yyj26 > l
- } else {
- yyb26 = r.CheckBreak()
- }
- if yyb26 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Status = ImageReviewStatus{}
- } else {
- yyv31 := &x.Status
- yyv31.CodecDecodeSelf(d)
- }
- for {
- yyj26++
- if yyhl26 {
- yyb26 = yyj26 > l
- } else {
- yyb26 = r.CheckBreak()
- }
- if yyb26 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj26-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ImageReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym32 := z.EncBinary()
- _ = yym32
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep33 := !z.EncBinary()
- yy2arr33 := z.EncBasicHandle().StructToArray
- var yyq33 [3]bool
- _, _, _ = yysep33, yyq33, yy2arr33
- const yyr33 bool = false
- yyq33[0] = len(x.Containers) != 0
- yyq33[1] = len(x.Annotations) != 0
- yyq33[2] = x.Namespace != ""
- var yynn33 int
- if yyr33 || yy2arr33 {
- r.EncodeArrayStart(3)
- } else {
- yynn33 = 0
- for _, b := range yyq33 {
- if b {
- yynn33++
- }
- }
- r.EncodeMapStart(yynn33)
- yynn33 = 0
- }
- if yyr33 || yy2arr33 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq33[0] {
- if x.Containers == nil {
- r.EncodeNil()
- } else {
- yym35 := z.EncBinary()
- _ = yym35
- if false {
- } else {
- h.encSliceImageReviewContainerSpec(([]ImageReviewContainerSpec)(x.Containers), e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq33[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("containers"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Containers == nil {
- r.EncodeNil()
- } else {
- yym36 := z.EncBinary()
- _ = yym36
- if false {
- } else {
- h.encSliceImageReviewContainerSpec(([]ImageReviewContainerSpec)(x.Containers), e)
- }
- }
- }
- }
- if yyr33 || yy2arr33 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq33[1] {
- if x.Annotations == nil {
- r.EncodeNil()
- } else {
- yym38 := z.EncBinary()
- _ = yym38
- if false {
- } else {
- z.F.EncMapStringStringV(x.Annotations, false, e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq33[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("annotations"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Annotations == nil {
- r.EncodeNil()
- } else {
- yym39 := z.EncBinary()
- _ = yym39
- if false {
- } else {
- z.F.EncMapStringStringV(x.Annotations, false, e)
- }
- }
- }
- }
- if yyr33 || yy2arr33 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq33[2] {
- yym41 := z.EncBinary()
- _ = yym41
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq33[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("namespace"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym42 := z.EncBinary()
- _ = yym42
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
- }
- }
- }
- if yyr33 || yy2arr33 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ImageReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym43 := z.DecBinary()
- _ = yym43
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct44 := r.ContainerType()
- if yyct44 == codecSelferValueTypeMap1234 {
- yyl44 := r.ReadMapStart()
- if yyl44 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl44, d)
- }
- } else if yyct44 == codecSelferValueTypeArray1234 {
- yyl44 := r.ReadArrayStart()
- if yyl44 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl44, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ImageReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys45Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys45Slc
- var yyhl45 bool = l >= 0
- for yyj45 := 0; ; yyj45++ {
- if yyhl45 {
- if yyj45 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys45Slc = r.DecodeBytes(yys45Slc, true, true)
- yys45 := string(yys45Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys45 {
- case "containers":
- if r.TryDecodeAsNil() {
- x.Containers = nil
- } else {
- yyv46 := &x.Containers
- yym47 := z.DecBinary()
- _ = yym47
- if false {
- } else {
- h.decSliceImageReviewContainerSpec((*[]ImageReviewContainerSpec)(yyv46), d)
- }
- }
- case "annotations":
- if r.TryDecodeAsNil() {
- x.Annotations = nil
- } else {
- yyv48 := &x.Annotations
- yym49 := z.DecBinary()
- _ = yym49
- if false {
- } else {
- z.F.DecMapStringStringX(yyv48, false, d)
- }
- }
- case "namespace":
- if r.TryDecodeAsNil() {
- x.Namespace = ""
- } else {
- x.Namespace = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys45)
- } // end switch yys45
- } // end for yyj45
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ImageReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj51 int
- var yyb51 bool
- var yyhl51 bool = l >= 0
- yyj51++
- if yyhl51 {
- yyb51 = yyj51 > l
- } else {
- yyb51 = r.CheckBreak()
- }
- if yyb51 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Containers = nil
- } else {
- yyv52 := &x.Containers
- yym53 := z.DecBinary()
- _ = yym53
- if false {
- } else {
- h.decSliceImageReviewContainerSpec((*[]ImageReviewContainerSpec)(yyv52), d)
- }
- }
- yyj51++
- if yyhl51 {
- yyb51 = yyj51 > l
- } else {
- yyb51 = r.CheckBreak()
- }
- if yyb51 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Annotations = nil
- } else {
- yyv54 := &x.Annotations
- yym55 := z.DecBinary()
- _ = yym55
- if false {
- } else {
- z.F.DecMapStringStringX(yyv54, false, d)
- }
- }
- yyj51++
- if yyhl51 {
- yyb51 = yyj51 > l
- } else {
- yyb51 = r.CheckBreak()
- }
- if yyb51 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Namespace = ""
- } else {
- x.Namespace = string(r.DecodeString())
- }
- for {
- yyj51++
- if yyhl51 {
- yyb51 = yyj51 > l
- } else {
- yyb51 = r.CheckBreak()
- }
- if yyb51 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj51-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ImageReviewContainerSpec) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym57 := z.EncBinary()
- _ = yym57
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep58 := !z.EncBinary()
- yy2arr58 := z.EncBasicHandle().StructToArray
- var yyq58 [1]bool
- _, _, _ = yysep58, yyq58, yy2arr58
- const yyr58 bool = false
- yyq58[0] = x.Image != ""
- var yynn58 int
- if yyr58 || yy2arr58 {
- r.EncodeArrayStart(1)
- } else {
- yynn58 = 0
- for _, b := range yyq58 {
- if b {
- yynn58++
- }
- }
- r.EncodeMapStart(yynn58)
- yynn58 = 0
- }
- if yyr58 || yy2arr58 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq58[0] {
- yym60 := z.EncBinary()
- _ = yym60
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Image))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq58[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("image"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym61 := z.EncBinary()
- _ = yym61
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Image))
- }
- }
- }
- if yyr58 || yy2arr58 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ImageReviewContainerSpec) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym62 := z.DecBinary()
- _ = yym62
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct63 := r.ContainerType()
- if yyct63 == codecSelferValueTypeMap1234 {
- yyl63 := r.ReadMapStart()
- if yyl63 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl63, d)
- }
- } else if yyct63 == codecSelferValueTypeArray1234 {
- yyl63 := r.ReadArrayStart()
- if yyl63 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl63, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ImageReviewContainerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys64Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys64Slc
- var yyhl64 bool = l >= 0
- for yyj64 := 0; ; yyj64++ {
- if yyhl64 {
- if yyj64 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys64Slc = r.DecodeBytes(yys64Slc, true, true)
- yys64 := string(yys64Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys64 {
- case "image":
- if r.TryDecodeAsNil() {
- x.Image = ""
- } else {
- x.Image = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys64)
- } // end switch yys64
- } // end for yyj64
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ImageReviewContainerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj66 int
- var yyb66 bool
- var yyhl66 bool = l >= 0
- yyj66++
- if yyhl66 {
- yyb66 = yyj66 > l
- } else {
- yyb66 = r.CheckBreak()
- }
- if yyb66 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Image = ""
- } else {
- x.Image = string(r.DecodeString())
- }
- for {
- yyj66++
- if yyhl66 {
- yyb66 = yyj66 > l
- } else {
- yyb66 = r.CheckBreak()
- }
- if yyb66 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj66-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ImageReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym68 := z.EncBinary()
- _ = yym68
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep69 := !z.EncBinary()
- yy2arr69 := z.EncBasicHandle().StructToArray
- var yyq69 [2]bool
- _, _, _ = yysep69, yyq69, yy2arr69
- const yyr69 bool = false
- yyq69[1] = x.Reason != ""
- var yynn69 int
- if yyr69 || yy2arr69 {
- r.EncodeArrayStart(2)
- } else {
- yynn69 = 1
- for _, b := range yyq69 {
- if b {
- yynn69++
- }
- }
- r.EncodeMapStart(yynn69)
- yynn69 = 0
- }
- if yyr69 || yy2arr69 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym71 := z.EncBinary()
- _ = yym71
- if false {
- } else {
- r.EncodeBool(bool(x.Allowed))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("allowed"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym72 := z.EncBinary()
- _ = yym72
- if false {
- } else {
- r.EncodeBool(bool(x.Allowed))
- }
- }
- if yyr69 || yy2arr69 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq69[1] {
- yym74 := z.EncBinary()
- _ = yym74
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq69[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("reason"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym75 := z.EncBinary()
- _ = yym75
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
- }
- }
- }
- if yyr69 || yy2arr69 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ImageReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym76 := z.DecBinary()
- _ = yym76
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct77 := r.ContainerType()
- if yyct77 == codecSelferValueTypeMap1234 {
- yyl77 := r.ReadMapStart()
- if yyl77 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl77, d)
- }
- } else if yyct77 == codecSelferValueTypeArray1234 {
- yyl77 := r.ReadArrayStart()
- if yyl77 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl77, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ImageReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys78Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys78Slc
- var yyhl78 bool = l >= 0
- for yyj78 := 0; ; yyj78++ {
- if yyhl78 {
- if yyj78 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys78Slc = r.DecodeBytes(yys78Slc, true, true)
- yys78 := string(yys78Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys78 {
- case "allowed":
- if r.TryDecodeAsNil() {
- x.Allowed = false
- } else {
- x.Allowed = bool(r.DecodeBool())
- }
- case "reason":
- if r.TryDecodeAsNil() {
- x.Reason = ""
- } else {
- x.Reason = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys78)
- } // end switch yys78
- } // end for yyj78
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ImageReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj81 int
- var yyb81 bool
- var yyhl81 bool = l >= 0
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Allowed = false
- } else {
- x.Allowed = bool(r.DecodeBool())
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Reason = ""
- } else {
- x.Reason = string(r.DecodeString())
- }
- for {
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj81-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) encSliceImageReviewContainerSpec(v []ImageReviewContainerSpec, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv84 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy85 := &yyv84
- yy85.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceImageReviewContainerSpec(v *[]ImageReviewContainerSpec, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv86 := *v
- yyh86, yyl86 := z.DecSliceHelperStart()
- var yyc86 bool
- if yyl86 == 0 {
- if yyv86 == nil {
- yyv86 = []ImageReviewContainerSpec{}
- yyc86 = true
- } else if len(yyv86) != 0 {
- yyv86 = yyv86[:0]
- yyc86 = true
- }
- } else if yyl86 > 0 {
- var yyrr86, yyrl86 int
- var yyrt86 bool
- if yyl86 > cap(yyv86) {
-
- yyrg86 := len(yyv86) > 0
- yyv286 := yyv86
- yyrl86, yyrt86 = z.DecInferLen(yyl86, z.DecBasicHandle().MaxInitLen, 16)
- if yyrt86 {
- if yyrl86 <= cap(yyv86) {
- yyv86 = yyv86[:yyrl86]
- } else {
- yyv86 = make([]ImageReviewContainerSpec, yyrl86)
- }
- } else {
- yyv86 = make([]ImageReviewContainerSpec, yyrl86)
- }
- yyc86 = true
- yyrr86 = len(yyv86)
- if yyrg86 {
- copy(yyv86, yyv286)
- }
- } else if yyl86 != len(yyv86) {
- yyv86 = yyv86[:yyl86]
- yyc86 = true
- }
- yyj86 := 0
- for ; yyj86 < yyrr86; yyj86++ {
- yyh86.ElemContainerState(yyj86)
- if r.TryDecodeAsNil() {
- yyv86[yyj86] = ImageReviewContainerSpec{}
- } else {
- yyv87 := &yyv86[yyj86]
- yyv87.CodecDecodeSelf(d)
- }
-
- }
- if yyrt86 {
- for ; yyj86 < yyl86; yyj86++ {
- yyv86 = append(yyv86, ImageReviewContainerSpec{})
- yyh86.ElemContainerState(yyj86)
- if r.TryDecodeAsNil() {
- yyv86[yyj86] = ImageReviewContainerSpec{}
- } else {
- yyv88 := &yyv86[yyj86]
- yyv88.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj86 := 0
- for ; !r.CheckBreak(); yyj86++ {
-
- if yyj86 >= len(yyv86) {
- yyv86 = append(yyv86, ImageReviewContainerSpec{}) // var yyz86 ImageReviewContainerSpec
- yyc86 = true
- }
- yyh86.ElemContainerState(yyj86)
- if yyj86 < len(yyv86) {
- if r.TryDecodeAsNil() {
- yyv86[yyj86] = ImageReviewContainerSpec{}
- } else {
- yyv89 := &yyv86[yyj86]
- yyv89.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj86 < len(yyv86) {
- yyv86 = yyv86[:yyj86]
- yyc86 = true
- } else if yyj86 == 0 && yyv86 == nil {
- yyv86 = []ImageReviewContainerSpec{}
- yyc86 = true
- }
- }
- yyh86.End()
- if yyc86 {
- *v = yyv86
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types.go
deleted file mode 100644
index afd5f6ecf..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types.go
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-Copyright 2016 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/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
-)
-
-// +genclient=true
-// +nonNamespaced=true
-// +noMethods=true
-
-// ImageReview checks if the set of images in a pod are allowed.
-type ImageReview struct {
- unversioned.TypeMeta `json:",inline"`
- v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec holds information about the pod being evaluated
- Spec ImageReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
-
- // Status is filled in by the backend and indicates whether the pod should be allowed.
- Status ImageReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// ImageReviewSpec is a description of the pod creation request.
-type ImageReviewSpec struct {
- // Containers is a list of a subset of the information in each container of the Pod being created.
- Containers []ImageReviewContainerSpec `json:"containers,omitempty" protobuf:"bytes,1,rep,name=containers"`
- // Annotations is a list of key-value pairs extracted from the Pod's annotations.
- // It only includes keys which match the pattern `*.image-policy.k8s.io/*`.
- // It is up to each webhook backend to determine how to interpret these annotations, if at all.
- Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,2,rep,name=annotations"`
- // Namespace is the namespace the pod is being created in.
- Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
-}
-
-// ImageReviewContainerSpec is a description of a container within the pod creation request.
-type ImageReviewContainerSpec struct {
- // This can be in the form image:tag or image@SHA:012345679abcdef.
- Image string `json:"image,omitempty" protobuf:"bytes,1,opt,name=image"`
- // In future, we may add command line overrides, exec health check command lines, and so on.
-}
-
-// ImageReviewStatus is the result of the token authentication request.
-type ImageReviewStatus struct {
- // Allowed indicates that all images were allowed to be run.
- Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"`
- // Reason should be empty unless Allowed is false in which case it
- // may contain a short description of what is wrong. Kubernetes
- // may truncate excessively long errors when displaying to the user.
- Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types_swagger_doc_generated.go
deleted file mode 100644
index f4b26f5e8..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2016 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
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_ImageReview = map[string]string{
- "": "ImageReview checks if the set of images in a pod are allowed.",
- "spec": "Spec holds information about the pod being evaluated",
- "status": "Status is filled in by the backend and indicates whether the pod should be allowed.",
-}
-
-func (ImageReview) SwaggerDoc() map[string]string {
- return map_ImageReview
-}
-
-var map_ImageReviewContainerSpec = map[string]string{
- "": "ImageReviewContainerSpec is a description of a container within the pod creation request.",
- "image": "This can be in the form image:tag or image@SHA:012345679abcdef.",
-}
-
-func (ImageReviewContainerSpec) SwaggerDoc() map[string]string {
- return map_ImageReviewContainerSpec
-}
-
-var map_ImageReviewSpec = map[string]string{
- "": "ImageReviewSpec is a description of the pod creation request.",
- "containers": "Containers is a list of a subset of the information in each container of the Pod being created.",
- "annotations": "Annotations is a list of key-value pairs extracted from the Pod's annotations. It only includes keys which match the pattern `*.image-policy.k8s.io/*`. It is up to each webhook backend to determine how to interpret these annotations, if at all.",
- "namespace": "Namespace is the namespace the pod is being created in.",
-}
-
-func (ImageReviewSpec) SwaggerDoc() map[string]string {
- return map_ImageReviewSpec
-}
-
-var map_ImageReviewStatus = map[string]string{
- "": "ImageReviewStatus is the result of the token authentication request.",
- "allowed": "Allowed indicates that all images were allowed to be run.",
- "reason": "Reason should be empty unless Allowed is false in which case it may contain a short description of what is wrong. Kubernetes may truncate excessively long errors when displaying to the user.",
-}
-
-func (ImageReviewStatus) SwaggerDoc() map[string]string {
- return map_ImageReviewStatus
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go
deleted file mode 100644
index 15dc52fb7..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 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 conversion-gen. Do not edit it manually!
-
-package v1alpha1
-
-import (
- api "k8s.io/client-go/1.5/pkg/api"
- imagepolicy "k8s.io/client-go/1.5/pkg/apis/imagepolicy"
- conversion "k8s.io/client-go/1.5/pkg/conversion"
- runtime "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-func init() {
- SchemeBuilder.Register(RegisterConversions)
-}
-
-// RegisterConversions adds conversion functions to the given scheme.
-// Public to allow building arbitrary schemes.
-func RegisterConversions(scheme *runtime.Scheme) error {
- return scheme.AddGeneratedConversionFuncs(
- Convert_v1alpha1_ImageReview_To_imagepolicy_ImageReview,
- Convert_imagepolicy_ImageReview_To_v1alpha1_ImageReview,
- Convert_v1alpha1_ImageReviewContainerSpec_To_imagepolicy_ImageReviewContainerSpec,
- Convert_imagepolicy_ImageReviewContainerSpec_To_v1alpha1_ImageReviewContainerSpec,
- Convert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec,
- Convert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec,
- Convert_v1alpha1_ImageReviewStatus_To_imagepolicy_ImageReviewStatus,
- Convert_imagepolicy_ImageReviewStatus_To_v1alpha1_ImageReviewStatus,
- )
-}
-
-func autoConvert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in *ImageReview, out *imagepolicy.ImageReview, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if err := Convert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec(&in.Spec, &out.Spec, s); err != nil {
- return err
- }
- if err := Convert_v1alpha1_ImageReviewStatus_To_imagepolicy_ImageReviewStatus(&in.Status, &out.Status, s); err != nil {
- return err
- }
- return nil
-}
-
-func Convert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in *ImageReview, out *imagepolicy.ImageReview, s conversion.Scope) error {
- return autoConvert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in, out, s)
-}
-
-func autoConvert_imagepolicy_ImageReview_To_v1alpha1_ImageReview(in *imagepolicy.ImageReview, out *ImageReview, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if err := Convert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, s); err != nil {
- return err
- }
- if err := Convert_imagepolicy_ImageReviewStatus_To_v1alpha1_ImageReviewStatus(&in.Status, &out.Status, s); err != nil {
- return err
- }
- return nil
-}
-
-func Convert_imagepolicy_ImageReview_To_v1alpha1_ImageReview(in *imagepolicy.ImageReview, out *ImageReview, s conversion.Scope) error {
- return autoConvert_imagepolicy_ImageReview_To_v1alpha1_ImageReview(in, out, s)
-}
-
-func autoConvert_v1alpha1_ImageReviewContainerSpec_To_imagepolicy_ImageReviewContainerSpec(in *ImageReviewContainerSpec, out *imagepolicy.ImageReviewContainerSpec, s conversion.Scope) error {
- out.Image = in.Image
- return nil
-}
-
-func Convert_v1alpha1_ImageReviewContainerSpec_To_imagepolicy_ImageReviewContainerSpec(in *ImageReviewContainerSpec, out *imagepolicy.ImageReviewContainerSpec, s conversion.Scope) error {
- return autoConvert_v1alpha1_ImageReviewContainerSpec_To_imagepolicy_ImageReviewContainerSpec(in, out, s)
-}
-
-func autoConvert_imagepolicy_ImageReviewContainerSpec_To_v1alpha1_ImageReviewContainerSpec(in *imagepolicy.ImageReviewContainerSpec, out *ImageReviewContainerSpec, s conversion.Scope) error {
- out.Image = in.Image
- return nil
-}
-
-func Convert_imagepolicy_ImageReviewContainerSpec_To_v1alpha1_ImageReviewContainerSpec(in *imagepolicy.ImageReviewContainerSpec, out *ImageReviewContainerSpec, s conversion.Scope) error {
- return autoConvert_imagepolicy_ImageReviewContainerSpec_To_v1alpha1_ImageReviewContainerSpec(in, out, s)
-}
-
-func autoConvert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec(in *ImageReviewSpec, out *imagepolicy.ImageReviewSpec, s conversion.Scope) error {
- if in.Containers != nil {
- in, out := &in.Containers, &out.Containers
- *out = make([]imagepolicy.ImageReviewContainerSpec, len(*in))
- for i := range *in {
- if err := Convert_v1alpha1_ImageReviewContainerSpec_To_imagepolicy_ImageReviewContainerSpec(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Containers = nil
- }
- out.Annotations = in.Annotations
- out.Namespace = in.Namespace
- return nil
-}
-
-func Convert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec(in *ImageReviewSpec, out *imagepolicy.ImageReviewSpec, s conversion.Scope) error {
- return autoConvert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec(in, out, s)
-}
-
-func autoConvert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec(in *imagepolicy.ImageReviewSpec, out *ImageReviewSpec, s conversion.Scope) error {
- if in.Containers != nil {
- in, out := &in.Containers, &out.Containers
- *out = make([]ImageReviewContainerSpec, len(*in))
- for i := range *in {
- if err := Convert_imagepolicy_ImageReviewContainerSpec_To_v1alpha1_ImageReviewContainerSpec(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Containers = nil
- }
- out.Annotations = in.Annotations
- out.Namespace = in.Namespace
- return nil
-}
-
-func Convert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec(in *imagepolicy.ImageReviewSpec, out *ImageReviewSpec, s conversion.Scope) error {
- return autoConvert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec(in, out, s)
-}
-
-func autoConvert_v1alpha1_ImageReviewStatus_To_imagepolicy_ImageReviewStatus(in *ImageReviewStatus, out *imagepolicy.ImageReviewStatus, s conversion.Scope) error {
- out.Allowed = in.Allowed
- out.Reason = in.Reason
- return nil
-}
-
-func Convert_v1alpha1_ImageReviewStatus_To_imagepolicy_ImageReviewStatus(in *ImageReviewStatus, out *imagepolicy.ImageReviewStatus, s conversion.Scope) error {
- return autoConvert_v1alpha1_ImageReviewStatus_To_imagepolicy_ImageReviewStatus(in, out, s)
-}
-
-func autoConvert_imagepolicy_ImageReviewStatus_To_v1alpha1_ImageReviewStatus(in *imagepolicy.ImageReviewStatus, out *ImageReviewStatus, s conversion.Scope) error {
- out.Allowed = in.Allowed
- out.Reason = in.Reason
- return nil
-}
-
-func Convert_imagepolicy_ImageReviewStatus_To_v1alpha1_ImageReviewStatus(in *imagepolicy.ImageReviewStatus, out *ImageReviewStatus, s conversion.Scope) error {
- return autoConvert_imagepolicy_ImageReviewStatus_To_v1alpha1_ImageReviewStatus(in, out, s)
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go
deleted file mode 100644
index b7724df28..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 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 (
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- conversion "k8s.io/client-go/1.5/pkg/conversion"
- runtime "k8s.io/client-go/1.5/pkg/runtime"
- reflect "reflect"
-)
-
-func init() {
- SchemeBuilder.Register(RegisterDeepCopies)
-}
-
-// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
-// to allow building arbitrary schemes.
-func RegisterDeepCopies(scheme *runtime.Scheme) error {
- return scheme.AddGeneratedDeepCopyFuncs(
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ImageReview, InType: reflect.TypeOf(&ImageReview{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ImageReviewContainerSpec, InType: reflect.TypeOf(&ImageReviewContainerSpec{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ImageReviewSpec, InType: reflect.TypeOf(&ImageReviewSpec{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ImageReviewStatus, InType: reflect.TypeOf(&ImageReviewStatus{})},
- )
-}
-
-func DeepCopy_v1alpha1_ImageReview(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ImageReview)
- out := out.(*ImageReview)
- out.TypeMeta = in.TypeMeta
- if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if err := DeepCopy_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil {
- return err
- }
- out.Status = in.Status
- return nil
- }
-}
-
-func DeepCopy_v1alpha1_ImageReviewContainerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ImageReviewContainerSpec)
- out := out.(*ImageReviewContainerSpec)
- out.Image = in.Image
- return nil
- }
-}
-
-func DeepCopy_v1alpha1_ImageReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ImageReviewSpec)
- out := out.(*ImageReviewSpec)
- if in.Containers != nil {
- in, out := &in.Containers, &out.Containers
- *out = make([]ImageReviewContainerSpec, len(*in))
- for i := range *in {
- (*out)[i] = (*in)[i]
- }
- } else {
- out.Containers = nil
- }
- if in.Annotations != nil {
- in, out := &in.Annotations, &out.Annotations
- *out = make(map[string]string)
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.Annotations = nil
- }
- out.Namespace = in.Namespace
- return nil
- }
-}
-
-func DeepCopy_v1alpha1_ImageReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ImageReviewStatus)
- out := out.(*ImageReviewStatus)
- out.Allowed = in.Allowed
- out.Reason = in.Reason
- return nil
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/zz_generated.deepcopy.go
deleted file mode 100644
index 64cc7313d..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/apis/imagepolicy/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 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 imagepolicy
-
-import (
- api "k8s.io/client-go/1.5/pkg/api"
- conversion "k8s.io/client-go/1.5/pkg/conversion"
- runtime "k8s.io/client-go/1.5/pkg/runtime"
- reflect "reflect"
-)
-
-func init() {
- SchemeBuilder.Register(RegisterDeepCopies)
-}
-
-// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
-// to allow building arbitrary schemes.
-func RegisterDeepCopies(scheme *runtime.Scheme) error {
- return scheme.AddGeneratedDeepCopyFuncs(
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_imagepolicy_ImageReview, InType: reflect.TypeOf(&ImageReview{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_imagepolicy_ImageReviewContainerSpec, InType: reflect.TypeOf(&ImageReviewContainerSpec{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_imagepolicy_ImageReviewSpec, InType: reflect.TypeOf(&ImageReviewSpec{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_imagepolicy_ImageReviewStatus, InType: reflect.TypeOf(&ImageReviewStatus{})},
- )
-}
-
-func DeepCopy_imagepolicy_ImageReview(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ImageReview)
- out := out.(*ImageReview)
- out.TypeMeta = in.TypeMeta
- if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if err := DeepCopy_imagepolicy_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil {
- return err
- }
- out.Status = in.Status
- return nil
- }
-}
-
-func DeepCopy_imagepolicy_ImageReviewContainerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ImageReviewContainerSpec)
- out := out.(*ImageReviewContainerSpec)
- out.Image = in.Image
- return nil
- }
-}
-
-func DeepCopy_imagepolicy_ImageReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ImageReviewSpec)
- out := out.(*ImageReviewSpec)
- if in.Containers != nil {
- in, out := &in.Containers, &out.Containers
- *out = make([]ImageReviewContainerSpec, len(*in))
- for i := range *in {
- (*out)[i] = (*in)[i]
- }
- } else {
- out.Containers = nil
- }
- if in.Annotations != nil {
- in, out := &in.Annotations, &out.Annotations
- *out = make(map[string]string)
- for key, val := range *in {
- (*out)[key] = val
- }
- } else {
- out.Annotations = nil
- }
- out.Namespace = in.Namespace
- return nil
- }
-}
-
-func DeepCopy_imagepolicy_ImageReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ImageReviewStatus)
- out := out.(*ImageReviewStatus)
- out.Allowed = in.Allowed
- out.Reason = in.Reason
- return nil
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/doc.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/doc.go
deleted file mode 100644
index 7a45fb7bb..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// +k8s:deepcopy-gen=package,register
-
-package federation
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/install/install.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/install/install.go
deleted file mode 100644
index afc2c021f..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/install/install.go
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
-Copyright 2016 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 install
-
-import (
- "fmt"
-
- "github.com/golang/glog"
-
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/meta"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/apimachinery"
- "k8s.io/client-go/1.5/pkg/apimachinery/registered"
- "k8s.io/client-go/1.5/pkg/federation/apis/federation"
- "k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/util/sets"
-)
-
-const importPrefix = "k8s.io/client-go/1.5/pkg/federation/apis/federation"
-
-var accessor = meta.NewAccessor()
-
-// availableVersions lists all known external versions for this group from most preferred to least preferred
-var availableVersions = []unversioned.GroupVersion{v1beta1.SchemeGroupVersion}
-
-func init() {
- registered.RegisterVersions(availableVersions)
- externalVersions := []unversioned.GroupVersion{}
- for _, v := range availableVersions {
- if registered.IsAllowedVersion(v) {
- externalVersions = append(externalVersions, v)
- }
- }
- if len(externalVersions) == 0 {
- glog.V(4).Infof("No version is registered for group %v", federation.GroupName)
- return
- }
-
- if err := registered.EnableVersions(externalVersions...); err != nil {
- glog.V(4).Infof("%v", err)
- return
- }
- if err := enableVersions(externalVersions); err != nil {
- glog.V(4).Infof("%v", err)
- return
- }
-}
-
-// TODO: enableVersions should be centralized rather than spread in each API
-// group.
-// We can combine registered.RegisterVersions, registered.EnableVersions and
-// registered.RegisterGroup once we have moved enableVersions there.
-func enableVersions(externalVersions []unversioned.GroupVersion) error {
- addVersionsToScheme(externalVersions...)
- preferredExternalVersion := externalVersions[0]
-
- groupMeta := apimachinery.GroupMeta{
- GroupVersion: preferredExternalVersion,
- GroupVersions: externalVersions,
- RESTMapper: newRESTMapper(externalVersions),
- SelfLinker: runtime.SelfLinker(accessor),
- InterfacesFor: interfacesFor,
- }
-
- if err := registered.RegisterGroup(groupMeta); err != nil {
- return err
- }
- return nil
-}
-
-func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper {
- // the list of kinds that are scoped at the root of the api hierarchy
- // if a kind is not enumerated here, it is assumed to have a namespace scope
- rootScoped := sets.NewString(
- "Cluster",
- )
-
- ignoredKinds := sets.NewString()
-
- return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
-}
-
-// interfacesFor returns the default Codec and ResourceVersioner for a given version
-// string, or an error if the version is not known.
-func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
- switch version {
- case v1beta1.SchemeGroupVersion:
- return &meta.VersionInterfaces{
- ObjectConvertor: api.Scheme,
- MetadataAccessor: accessor,
- }, nil
- default:
- g, _ := registered.Group(federation.GroupName)
- return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
- }
-}
-
-func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
- // add the internal version to Scheme
- if err := federation.AddToScheme(api.Scheme); err != nil {
- // Programmer error, detect immediately
- panic(err)
- }
- // add the enabled external versions to Scheme
- for _, v := range externalVersions {
- if !registered.IsEnabledVersion(v) {
- glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
- continue
- }
- switch v {
- case v1beta1.SchemeGroupVersion:
- if err := v1beta1.AddToScheme(api.Scheme); err != nil {
- // Programmer error, detect immediately
- panic(err)
- }
- }
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/register.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/register.go
deleted file mode 100644
index 8c9474ec8..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/register.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-Copyright 2016 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 federation
-
-import (
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "federation"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
-
-// Kind takes an unqualified kind and returns a Group qualified GroupKind
-func Kind(kind string) unversioned.GroupKind {
- return SchemeGroupVersion.WithKind(kind).GroupKind()
-}
-
-// Resource takes an unqualified resource and returns a Group qualified GroupResource
-func Resource(resource string) unversioned.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
- AddToScheme = SchemeBuilder.AddToScheme
-)
-
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Cluster{},
- &ClusterList{},
- &api.ListOptions{},
- &api.DeleteOptions{},
- )
- return nil
-}
-
-func (obj *Cluster) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
-func (obj *ClusterList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/types.generated.go
deleted file mode 100644
index 10bf29dd1..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/types.generated.go
+++ /dev/null
@@ -1,2954 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// ************************************************************
-// DO NOT EDIT.
-// THIS FILE IS AUTO-GENERATED BY codecgen.
-// ************************************************************
-
-package federation
-
-import (
- "errors"
- "fmt"
- codec1978 "github.com/ugorji/go/codec"
- pkg1_api "k8s.io/client-go/1.5/pkg/api"
- pkg2_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- pkg3_types "k8s.io/client-go/1.5/pkg/types"
- "reflect"
- "runtime"
- time "time"
-)
-
-const (
- // ----- content types ----
- codecSelferC_UTF81234 = 1
- codecSelferC_RAW1234 = 0
- // ----- value types used ----
- codecSelferValueTypeArray1234 = 10
- codecSelferValueTypeMap1234 = 9
- // ----- containerStateValues ----
- codecSelfer_containerMapKey1234 = 2
- codecSelfer_containerMapValue1234 = 3
- codecSelfer_containerMapEnd1234 = 4
- codecSelfer_containerArrayElem1234 = 6
- codecSelfer_containerArrayEnd1234 = 7
-)
-
-var (
- codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
- codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
-)
-
-type codecSelfer1234 struct{}
-
-func init() {
- if codec1978.GenVersion != 5 {
- _, file, _, _ := runtime.Caller(0)
- err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
- 5, codec1978.GenVersion, file)
- panic(err)
- }
- if false { // reference the types, but skip this branch at build/run time
- var v0 pkg1_api.LocalObjectReference
- var v1 pkg2_unversioned.Time
- var v2 pkg3_types.UID
- var v3 time.Time
- _, _, _, _ = v0, v1, v2, v3
- }
-}
-
-func (x *ServerAddressByClientCIDR) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [2]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(2)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClientCIDR))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clientCIDR"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClientCIDR))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ServerAddress))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("serverAddress"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ServerAddress))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ServerAddressByClientCIDR) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct10 := r.ContainerType()
- if yyct10 == codecSelferValueTypeMap1234 {
- yyl10 := r.ReadMapStart()
- if yyl10 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl10, d)
- }
- } else if yyct10 == codecSelferValueTypeArray1234 {
- yyl10 := r.ReadArrayStart()
- if yyl10 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl10, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ServerAddressByClientCIDR) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys11Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys11Slc
- var yyhl11 bool = l >= 0
- for yyj11 := 0; ; yyj11++ {
- if yyhl11 {
- if yyj11 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys11Slc = r.DecodeBytes(yys11Slc, true, true)
- yys11 := string(yys11Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys11 {
- case "clientCIDR":
- if r.TryDecodeAsNil() {
- x.ClientCIDR = ""
- } else {
- x.ClientCIDR = string(r.DecodeString())
- }
- case "serverAddress":
- if r.TryDecodeAsNil() {
- x.ServerAddress = ""
- } else {
- x.ServerAddress = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys11)
- } // end switch yys11
- } // end for yyj11
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ServerAddressByClientCIDR) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj14 int
- var yyb14 bool
- var yyhl14 bool = l >= 0
- yyj14++
- if yyhl14 {
- yyb14 = yyj14 > l
- } else {
- yyb14 = r.CheckBreak()
- }
- if yyb14 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ClientCIDR = ""
- } else {
- x.ClientCIDR = string(r.DecodeString())
- }
- yyj14++
- if yyhl14 {
- yyb14 = yyj14 > l
- } else {
- yyb14 = r.CheckBreak()
- }
- if yyb14 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ServerAddress = ""
- } else {
- x.ServerAddress = string(r.DecodeString())
- }
- for {
- yyj14++
- if yyhl14 {
- yyb14 = yyj14 > l
- } else {
- yyb14 = r.CheckBreak()
- }
- if yyb14 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj14-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterSpec) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym17 := z.EncBinary()
- _ = yym17
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep18 := !z.EncBinary()
- yy2arr18 := z.EncBasicHandle().StructToArray
- var yyq18 [2]bool
- _, _, _ = yysep18, yyq18, yy2arr18
- const yyr18 bool = false
- yyq18[1] = x.SecretRef != nil
- var yynn18 int
- if yyr18 || yy2arr18 {
- r.EncodeArrayStart(2)
- } else {
- yynn18 = 1
- for _, b := range yyq18 {
- if b {
- yynn18++
- }
- }
- r.EncodeMapStart(yynn18)
- yynn18 = 0
- }
- if yyr18 || yy2arr18 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.ServerAddressByClientCIDRs == nil {
- r.EncodeNil()
- } else {
- yym20 := z.EncBinary()
- _ = yym20
- if false {
- } else {
- h.encSliceServerAddressByClientCIDR(([]ServerAddressByClientCIDR)(x.ServerAddressByClientCIDRs), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("serverAddressByClientCIDRs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.ServerAddressByClientCIDRs == nil {
- r.EncodeNil()
- } else {
- yym21 := z.EncBinary()
- _ = yym21
- if false {
- } else {
- h.encSliceServerAddressByClientCIDR(([]ServerAddressByClientCIDR)(x.ServerAddressByClientCIDRs), e)
- }
- }
- }
- if yyr18 || yy2arr18 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq18[1] {
- if x.SecretRef == nil {
- r.EncodeNil()
- } else {
- x.SecretRef.CodecEncodeSelf(e)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq18[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.SecretRef == nil {
- r.EncodeNil()
- } else {
- x.SecretRef.CodecEncodeSelf(e)
- }
- }
- }
- if yyr18 || yy2arr18 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterSpec) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym23 := z.DecBinary()
- _ = yym23
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct24 := r.ContainerType()
- if yyct24 == codecSelferValueTypeMap1234 {
- yyl24 := r.ReadMapStart()
- if yyl24 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl24, d)
- }
- } else if yyct24 == codecSelferValueTypeArray1234 {
- yyl24 := r.ReadArrayStart()
- if yyl24 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl24, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys25Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys25Slc
- var yyhl25 bool = l >= 0
- for yyj25 := 0; ; yyj25++ {
- if yyhl25 {
- if yyj25 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys25Slc = r.DecodeBytes(yys25Slc, true, true)
- yys25 := string(yys25Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys25 {
- case "serverAddressByClientCIDRs":
- if r.TryDecodeAsNil() {
- x.ServerAddressByClientCIDRs = nil
- } else {
- yyv26 := &x.ServerAddressByClientCIDRs
- yym27 := z.DecBinary()
- _ = yym27
- if false {
- } else {
- h.decSliceServerAddressByClientCIDR((*[]ServerAddressByClientCIDR)(yyv26), d)
- }
- }
- case "secretRef":
- if r.TryDecodeAsNil() {
- if x.SecretRef != nil {
- x.SecretRef = nil
- }
- } else {
- if x.SecretRef == nil {
- x.SecretRef = new(pkg1_api.LocalObjectReference)
- }
- x.SecretRef.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys25)
- } // end switch yys25
- } // end for yyj25
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj29 int
- var yyb29 bool
- var yyhl29 bool = l >= 0
- yyj29++
- if yyhl29 {
- yyb29 = yyj29 > l
- } else {
- yyb29 = r.CheckBreak()
- }
- if yyb29 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ServerAddressByClientCIDRs = nil
- } else {
- yyv30 := &x.ServerAddressByClientCIDRs
- yym31 := z.DecBinary()
- _ = yym31
- if false {
- } else {
- h.decSliceServerAddressByClientCIDR((*[]ServerAddressByClientCIDR)(yyv30), d)
- }
- }
- yyj29++
- if yyhl29 {
- yyb29 = yyj29 > l
- } else {
- yyb29 = r.CheckBreak()
- }
- if yyb29 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- if x.SecretRef != nil {
- x.SecretRef = nil
- }
- } else {
- if x.SecretRef == nil {
- x.SecretRef = new(pkg1_api.LocalObjectReference)
- }
- x.SecretRef.CodecDecodeSelf(d)
- }
- for {
- yyj29++
- if yyhl29 {
- yyb29 = yyj29 > l
- } else {
- yyb29 = r.CheckBreak()
- }
- if yyb29 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj29-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x ClusterConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- yym33 := z.EncBinary()
- _ = yym33
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x))
- }
-}
-
-func (x *ClusterConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym34 := z.DecBinary()
- _ = yym34
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- *((*string)(x)) = r.DecodeString()
- }
-}
-
-func (x *ClusterCondition) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym35 := z.EncBinary()
- _ = yym35
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep36 := !z.EncBinary()
- yy2arr36 := z.EncBasicHandle().StructToArray
- var yyq36 [6]bool
- _, _, _ = yysep36, yyq36, yy2arr36
- const yyr36 bool = false
- yyq36[2] = true
- yyq36[3] = true
- yyq36[4] = x.Reason != ""
- yyq36[5] = x.Message != ""
- var yynn36 int
- if yyr36 || yy2arr36 {
- r.EncodeArrayStart(6)
- } else {
- yynn36 = 2
- for _, b := range yyq36 {
- if b {
- yynn36++
- }
- }
- r.EncodeMapStart(yynn36)
- yynn36 = 0
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- x.Type.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("type"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- x.Type.CodecEncodeSelf(e)
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym39 := z.EncBinary()
- _ = yym39
- if false {
- } else if z.HasExtensions() && z.EncExt(x.Status) {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Status))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("status"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym40 := z.EncBinary()
- _ = yym40
- if false {
- } else if z.HasExtensions() && z.EncExt(x.Status) {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Status))
- }
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq36[2] {
- yy42 := &x.LastProbeTime
- yym43 := z.EncBinary()
- _ = yym43
- if false {
- } else if z.HasExtensions() && z.EncExt(yy42) {
- } else if yym43 {
- z.EncBinaryMarshal(yy42)
- } else if !yym43 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy42)
- } else {
- z.EncFallback(yy42)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq36[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy44 := &x.LastProbeTime
- yym45 := z.EncBinary()
- _ = yym45
- if false {
- } else if z.HasExtensions() && z.EncExt(yy44) {
- } else if yym45 {
- z.EncBinaryMarshal(yy44)
- } else if !yym45 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy44)
- } else {
- z.EncFallback(yy44)
- }
- }
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq36[3] {
- yy47 := &x.LastTransitionTime
- yym48 := z.EncBinary()
- _ = yym48
- if false {
- } else if z.HasExtensions() && z.EncExt(yy47) {
- } else if yym48 {
- z.EncBinaryMarshal(yy47)
- } else if !yym48 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy47)
- } else {
- z.EncFallback(yy47)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq36[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy49 := &x.LastTransitionTime
- yym50 := z.EncBinary()
- _ = yym50
- if false {
- } else if z.HasExtensions() && z.EncExt(yy49) {
- } else if yym50 {
- z.EncBinaryMarshal(yy49)
- } else if !yym50 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy49)
- } else {
- z.EncFallback(yy49)
- }
- }
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq36[4] {
- yym52 := z.EncBinary()
- _ = yym52
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq36[4] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("reason"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym53 := z.EncBinary()
- _ = yym53
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
- }
- }
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq36[5] {
- yym55 := z.EncBinary()
- _ = yym55
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Message))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq36[5] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("message"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym56 := z.EncBinary()
- _ = yym56
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Message))
- }
- }
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterCondition) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym57 := z.DecBinary()
- _ = yym57
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct58 := r.ContainerType()
- if yyct58 == codecSelferValueTypeMap1234 {
- yyl58 := r.ReadMapStart()
- if yyl58 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl58, d)
- }
- } else if yyct58 == codecSelferValueTypeArray1234 {
- yyl58 := r.ReadArrayStart()
- if yyl58 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl58, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys59Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys59Slc
- var yyhl59 bool = l >= 0
- for yyj59 := 0; ; yyj59++ {
- if yyhl59 {
- if yyj59 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys59Slc = r.DecodeBytes(yys59Slc, true, true)
- yys59 := string(yys59Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys59 {
- case "type":
- if r.TryDecodeAsNil() {
- x.Type = ""
- } else {
- x.Type = ClusterConditionType(r.DecodeString())
- }
- case "status":
- if r.TryDecodeAsNil() {
- x.Status = ""
- } else {
- x.Status = pkg1_api.ConditionStatus(r.DecodeString())
- }
- case "lastProbeTime":
- if r.TryDecodeAsNil() {
- x.LastProbeTime = pkg2_unversioned.Time{}
- } else {
- yyv62 := &x.LastProbeTime
- yym63 := z.DecBinary()
- _ = yym63
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv62) {
- } else if yym63 {
- z.DecBinaryUnmarshal(yyv62)
- } else if !yym63 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv62)
- } else {
- z.DecFallback(yyv62, false)
- }
- }
- case "lastTransitionTime":
- if r.TryDecodeAsNil() {
- x.LastTransitionTime = pkg2_unversioned.Time{}
- } else {
- yyv64 := &x.LastTransitionTime
- yym65 := z.DecBinary()
- _ = yym65
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv64) {
- } else if yym65 {
- z.DecBinaryUnmarshal(yyv64)
- } else if !yym65 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv64)
- } else {
- z.DecFallback(yyv64, false)
- }
- }
- case "reason":
- if r.TryDecodeAsNil() {
- x.Reason = ""
- } else {
- x.Reason = string(r.DecodeString())
- }
- case "message":
- if r.TryDecodeAsNil() {
- x.Message = ""
- } else {
- x.Message = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys59)
- } // end switch yys59
- } // end for yyj59
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj68 int
- var yyb68 bool
- var yyhl68 bool = l >= 0
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Type = ""
- } else {
- x.Type = ClusterConditionType(r.DecodeString())
- }
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Status = ""
- } else {
- x.Status = pkg1_api.ConditionStatus(r.DecodeString())
- }
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LastProbeTime = pkg2_unversioned.Time{}
- } else {
- yyv71 := &x.LastProbeTime
- yym72 := z.DecBinary()
- _ = yym72
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv71) {
- } else if yym72 {
- z.DecBinaryUnmarshal(yyv71)
- } else if !yym72 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv71)
- } else {
- z.DecFallback(yyv71, false)
- }
- }
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LastTransitionTime = pkg2_unversioned.Time{}
- } else {
- yyv73 := &x.LastTransitionTime
- yym74 := z.DecBinary()
- _ = yym74
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv73) {
- } else if yym74 {
- z.DecBinaryUnmarshal(yyv73)
- } else if !yym74 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv73)
- } else {
- z.DecFallback(yyv73, false)
- }
- }
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Reason = ""
- } else {
- x.Reason = string(r.DecodeString())
- }
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Message = ""
- } else {
- x.Message = string(r.DecodeString())
- }
- for {
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj68-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym77 := z.EncBinary()
- _ = yym77
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep78 := !z.EncBinary()
- yy2arr78 := z.EncBasicHandle().StructToArray
- var yyq78 [3]bool
- _, _, _ = yysep78, yyq78, yy2arr78
- const yyr78 bool = false
- yyq78[0] = len(x.Conditions) != 0
- yyq78[1] = len(x.Zones) != 0
- yyq78[2] = x.Region != ""
- var yynn78 int
- if yyr78 || yy2arr78 {
- r.EncodeArrayStart(3)
- } else {
- yynn78 = 0
- for _, b := range yyq78 {
- if b {
- yynn78++
- }
- }
- r.EncodeMapStart(yynn78)
- yynn78 = 0
- }
- if yyr78 || yy2arr78 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq78[0] {
- if x.Conditions == nil {
- r.EncodeNil()
- } else {
- yym80 := z.EncBinary()
- _ = yym80
- if false {
- } else {
- h.encSliceClusterCondition(([]ClusterCondition)(x.Conditions), e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq78[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("conditions"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Conditions == nil {
- r.EncodeNil()
- } else {
- yym81 := z.EncBinary()
- _ = yym81
- if false {
- } else {
- h.encSliceClusterCondition(([]ClusterCondition)(x.Conditions), e)
- }
- }
- }
- }
- if yyr78 || yy2arr78 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq78[1] {
- if x.Zones == nil {
- r.EncodeNil()
- } else {
- yym83 := z.EncBinary()
- _ = yym83
- if false {
- } else {
- z.F.EncSliceStringV(x.Zones, false, e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq78[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("zones"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Zones == nil {
- r.EncodeNil()
- } else {
- yym84 := z.EncBinary()
- _ = yym84
- if false {
- } else {
- z.F.EncSliceStringV(x.Zones, false, e)
- }
- }
- }
- }
- if yyr78 || yy2arr78 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq78[2] {
- yym86 := z.EncBinary()
- _ = yym86
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Region))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq78[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("region"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym87 := z.EncBinary()
- _ = yym87
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Region))
- }
- }
- }
- if yyr78 || yy2arr78 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterStatus) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym88 := z.DecBinary()
- _ = yym88
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct89 := r.ContainerType()
- if yyct89 == codecSelferValueTypeMap1234 {
- yyl89 := r.ReadMapStart()
- if yyl89 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl89, d)
- }
- } else if yyct89 == codecSelferValueTypeArray1234 {
- yyl89 := r.ReadArrayStart()
- if yyl89 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl89, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys90Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys90Slc
- var yyhl90 bool = l >= 0
- for yyj90 := 0; ; yyj90++ {
- if yyhl90 {
- if yyj90 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys90Slc = r.DecodeBytes(yys90Slc, true, true)
- yys90 := string(yys90Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys90 {
- case "conditions":
- if r.TryDecodeAsNil() {
- x.Conditions = nil
- } else {
- yyv91 := &x.Conditions
- yym92 := z.DecBinary()
- _ = yym92
- if false {
- } else {
- h.decSliceClusterCondition((*[]ClusterCondition)(yyv91), d)
- }
- }
- case "zones":
- if r.TryDecodeAsNil() {
- x.Zones = nil
- } else {
- yyv93 := &x.Zones
- yym94 := z.DecBinary()
- _ = yym94
- if false {
- } else {
- z.F.DecSliceStringX(yyv93, false, d)
- }
- }
- case "region":
- if r.TryDecodeAsNil() {
- x.Region = ""
- } else {
- x.Region = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys90)
- } // end switch yys90
- } // end for yyj90
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj96 int
- var yyb96 bool
- var yyhl96 bool = l >= 0
- yyj96++
- if yyhl96 {
- yyb96 = yyj96 > l
- } else {
- yyb96 = r.CheckBreak()
- }
- if yyb96 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Conditions = nil
- } else {
- yyv97 := &x.Conditions
- yym98 := z.DecBinary()
- _ = yym98
- if false {
- } else {
- h.decSliceClusterCondition((*[]ClusterCondition)(yyv97), d)
- }
- }
- yyj96++
- if yyhl96 {
- yyb96 = yyj96 > l
- } else {
- yyb96 = r.CheckBreak()
- }
- if yyb96 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Zones = nil
- } else {
- yyv99 := &x.Zones
- yym100 := z.DecBinary()
- _ = yym100
- if false {
- } else {
- z.F.DecSliceStringX(yyv99, false, d)
- }
- }
- yyj96++
- if yyhl96 {
- yyb96 = yyj96 > l
- } else {
- yyb96 = r.CheckBreak()
- }
- if yyb96 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Region = ""
- } else {
- x.Region = string(r.DecodeString())
- }
- for {
- yyj96++
- if yyhl96 {
- yyb96 = yyj96 > l
- } else {
- yyb96 = r.CheckBreak()
- }
- if yyb96 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj96-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym102 := z.EncBinary()
- _ = yym102
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep103 := !z.EncBinary()
- yy2arr103 := z.EncBasicHandle().StructToArray
- var yyq103 [5]bool
- _, _, _ = yysep103, yyq103, yy2arr103
- const yyr103 bool = false
- yyq103[0] = x.Kind != ""
- yyq103[1] = x.APIVersion != ""
- yyq103[2] = true
- yyq103[3] = true
- yyq103[4] = true
- var yynn103 int
- if yyr103 || yy2arr103 {
- r.EncodeArrayStart(5)
- } else {
- yynn103 = 0
- for _, b := range yyq103 {
- if b {
- yynn103++
- }
- }
- r.EncodeMapStart(yynn103)
- yynn103 = 0
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq103[0] {
- yym105 := z.EncBinary()
- _ = yym105
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq103[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym106 := z.EncBinary()
- _ = yym106
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq103[1] {
- yym108 := z.EncBinary()
- _ = yym108
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq103[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym109 := z.EncBinary()
- _ = yym109
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq103[2] {
- yy111 := &x.ObjectMeta
- yy111.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq103[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy112 := &x.ObjectMeta
- yy112.CodecEncodeSelf(e)
- }
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq103[3] {
- yy114 := &x.Spec
- yy114.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq103[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("spec"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy115 := &x.Spec
- yy115.CodecEncodeSelf(e)
- }
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq103[4] {
- yy117 := &x.Status
- yy117.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq103[4] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("status"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy118 := &x.Status
- yy118.CodecEncodeSelf(e)
- }
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *Cluster) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym119 := z.DecBinary()
- _ = yym119
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct120 := r.ContainerType()
- if yyct120 == codecSelferValueTypeMap1234 {
- yyl120 := r.ReadMapStart()
- if yyl120 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl120, d)
- }
- } else if yyct120 == codecSelferValueTypeArray1234 {
- yyl120 := r.ReadArrayStart()
- if yyl120 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl120, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *Cluster) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys121Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys121Slc
- var yyhl121 bool = l >= 0
- for yyj121 := 0; ; yyj121++ {
- if yyhl121 {
- if yyj121 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys121Slc = r.DecodeBytes(yys121Slc, true, true)
- yys121 := string(yys121Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys121 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg1_api.ObjectMeta{}
- } else {
- yyv124 := &x.ObjectMeta
- yyv124.CodecDecodeSelf(d)
- }
- case "spec":
- if r.TryDecodeAsNil() {
- x.Spec = ClusterSpec{}
- } else {
- yyv125 := &x.Spec
- yyv125.CodecDecodeSelf(d)
- }
- case "status":
- if r.TryDecodeAsNil() {
- x.Status = ClusterStatus{}
- } else {
- yyv126 := &x.Status
- yyv126.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys121)
- } // end switch yys121
- } // end for yyj121
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj127 int
- var yyb127 bool
- var yyhl127 bool = l >= 0
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg1_api.ObjectMeta{}
- } else {
- yyv130 := &x.ObjectMeta
- yyv130.CodecDecodeSelf(d)
- }
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Spec = ClusterSpec{}
- } else {
- yyv131 := &x.Spec
- yyv131.CodecDecodeSelf(d)
- }
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Status = ClusterStatus{}
- } else {
- yyv132 := &x.Status
- yyv132.CodecDecodeSelf(d)
- }
- for {
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj127-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterList) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym133 := z.EncBinary()
- _ = yym133
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep134 := !z.EncBinary()
- yy2arr134 := z.EncBasicHandle().StructToArray
- var yyq134 [4]bool
- _, _, _ = yysep134, yyq134, yy2arr134
- const yyr134 bool = false
- yyq134[0] = x.Kind != ""
- yyq134[1] = x.APIVersion != ""
- yyq134[2] = true
- var yynn134 int
- if yyr134 || yy2arr134 {
- r.EncodeArrayStart(4)
- } else {
- yynn134 = 1
- for _, b := range yyq134 {
- if b {
- yynn134++
- }
- }
- r.EncodeMapStart(yynn134)
- yynn134 = 0
- }
- if yyr134 || yy2arr134 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq134[0] {
- yym136 := z.EncBinary()
- _ = yym136
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq134[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym137 := z.EncBinary()
- _ = yym137
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr134 || yy2arr134 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq134[1] {
- yym139 := z.EncBinary()
- _ = yym139
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq134[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym140 := z.EncBinary()
- _ = yym140
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr134 || yy2arr134 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq134[2] {
- yy142 := &x.ListMeta
- yym143 := z.EncBinary()
- _ = yym143
- if false {
- } else if z.HasExtensions() && z.EncExt(yy142) {
- } else {
- z.EncFallback(yy142)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq134[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy144 := &x.ListMeta
- yym145 := z.EncBinary()
- _ = yym145
- if false {
- } else if z.HasExtensions() && z.EncExt(yy144) {
- } else {
- z.EncFallback(yy144)
- }
- }
- }
- if yyr134 || yy2arr134 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym147 := z.EncBinary()
- _ = yym147
- if false {
- } else {
- h.encSliceCluster(([]Cluster)(x.Items), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("items"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym148 := z.EncBinary()
- _ = yym148
- if false {
- } else {
- h.encSliceCluster(([]Cluster)(x.Items), e)
- }
- }
- }
- if yyr134 || yy2arr134 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterList) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym149 := z.DecBinary()
- _ = yym149
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct150 := r.ContainerType()
- if yyct150 == codecSelferValueTypeMap1234 {
- yyl150 := r.ReadMapStart()
- if yyl150 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl150, d)
- }
- } else if yyct150 == codecSelferValueTypeArray1234 {
- yyl150 := r.ReadArrayStart()
- if yyl150 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl150, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys151Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys151Slc
- var yyhl151 bool = l >= 0
- for yyj151 := 0; ; yyj151++ {
- if yyhl151 {
- if yyj151 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys151Slc = r.DecodeBytes(yys151Slc, true, true)
- yys151 := string(yys151Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys151 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv154 := &x.ListMeta
- yym155 := z.DecBinary()
- _ = yym155
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv154) {
- } else {
- z.DecFallback(yyv154, false)
- }
- }
- case "items":
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv156 := &x.Items
- yym157 := z.DecBinary()
- _ = yym157
- if false {
- } else {
- h.decSliceCluster((*[]Cluster)(yyv156), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys151)
- } // end switch yys151
- } // end for yyj151
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj158 int
- var yyb158 bool
- var yyhl158 bool = l >= 0
- yyj158++
- if yyhl158 {
- yyb158 = yyj158 > l
- } else {
- yyb158 = r.CheckBreak()
- }
- if yyb158 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj158++
- if yyhl158 {
- yyb158 = yyj158 > l
- } else {
- yyb158 = r.CheckBreak()
- }
- if yyb158 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj158++
- if yyhl158 {
- yyb158 = yyj158 > l
- } else {
- yyb158 = r.CheckBreak()
- }
- if yyb158 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv161 := &x.ListMeta
- yym162 := z.DecBinary()
- _ = yym162
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv161) {
- } else {
- z.DecFallback(yyv161, false)
- }
- }
- yyj158++
- if yyhl158 {
- yyb158 = yyj158 > l
- } else {
- yyb158 = r.CheckBreak()
- }
- if yyb158 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv163 := &x.Items
- yym164 := z.DecBinary()
- _ = yym164
- if false {
- } else {
- h.decSliceCluster((*[]Cluster)(yyv163), d)
- }
- }
- for {
- yyj158++
- if yyhl158 {
- yyb158 = yyj158 > l
- } else {
- yyb158 = r.CheckBreak()
- }
- if yyb158 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj158-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *FederatedReplicaSetPreferences) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym165 := z.EncBinary()
- _ = yym165
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep166 := !z.EncBinary()
- yy2arr166 := z.EncBasicHandle().StructToArray
- var yyq166 [2]bool
- _, _, _ = yysep166, yyq166, yy2arr166
- const yyr166 bool = false
- yyq166[0] = x.Rebalance != false
- yyq166[1] = len(x.Clusters) != 0
- var yynn166 int
- if yyr166 || yy2arr166 {
- r.EncodeArrayStart(2)
- } else {
- yynn166 = 0
- for _, b := range yyq166 {
- if b {
- yynn166++
- }
- }
- r.EncodeMapStart(yynn166)
- yynn166 = 0
- }
- if yyr166 || yy2arr166 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq166[0] {
- yym168 := z.EncBinary()
- _ = yym168
- if false {
- } else {
- r.EncodeBool(bool(x.Rebalance))
- }
- } else {
- r.EncodeBool(false)
- }
- } else {
- if yyq166[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("rebalance"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym169 := z.EncBinary()
- _ = yym169
- if false {
- } else {
- r.EncodeBool(bool(x.Rebalance))
- }
- }
- }
- if yyr166 || yy2arr166 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq166[1] {
- if x.Clusters == nil {
- r.EncodeNil()
- } else {
- yym171 := z.EncBinary()
- _ = yym171
- if false {
- } else {
- h.encMapstringClusterReplicaSetPreferences((map[string]ClusterReplicaSetPreferences)(x.Clusters), e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq166[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clusters"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Clusters == nil {
- r.EncodeNil()
- } else {
- yym172 := z.EncBinary()
- _ = yym172
- if false {
- } else {
- h.encMapstringClusterReplicaSetPreferences((map[string]ClusterReplicaSetPreferences)(x.Clusters), e)
- }
- }
- }
- }
- if yyr166 || yy2arr166 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *FederatedReplicaSetPreferences) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym173 := z.DecBinary()
- _ = yym173
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct174 := r.ContainerType()
- if yyct174 == codecSelferValueTypeMap1234 {
- yyl174 := r.ReadMapStart()
- if yyl174 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl174, d)
- }
- } else if yyct174 == codecSelferValueTypeArray1234 {
- yyl174 := r.ReadArrayStart()
- if yyl174 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl174, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *FederatedReplicaSetPreferences) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys175Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys175Slc
- var yyhl175 bool = l >= 0
- for yyj175 := 0; ; yyj175++ {
- if yyhl175 {
- if yyj175 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys175Slc = r.DecodeBytes(yys175Slc, true, true)
- yys175 := string(yys175Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys175 {
- case "rebalance":
- if r.TryDecodeAsNil() {
- x.Rebalance = false
- } else {
- x.Rebalance = bool(r.DecodeBool())
- }
- case "clusters":
- if r.TryDecodeAsNil() {
- x.Clusters = nil
- } else {
- yyv177 := &x.Clusters
- yym178 := z.DecBinary()
- _ = yym178
- if false {
- } else {
- h.decMapstringClusterReplicaSetPreferences((*map[string]ClusterReplicaSetPreferences)(yyv177), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys175)
- } // end switch yys175
- } // end for yyj175
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *FederatedReplicaSetPreferences) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj179 int
- var yyb179 bool
- var yyhl179 bool = l >= 0
- yyj179++
- if yyhl179 {
- yyb179 = yyj179 > l
- } else {
- yyb179 = r.CheckBreak()
- }
- if yyb179 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Rebalance = false
- } else {
- x.Rebalance = bool(r.DecodeBool())
- }
- yyj179++
- if yyhl179 {
- yyb179 = yyj179 > l
- } else {
- yyb179 = r.CheckBreak()
- }
- if yyb179 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Clusters = nil
- } else {
- yyv181 := &x.Clusters
- yym182 := z.DecBinary()
- _ = yym182
- if false {
- } else {
- h.decMapstringClusterReplicaSetPreferences((*map[string]ClusterReplicaSetPreferences)(yyv181), d)
- }
- }
- for {
- yyj179++
- if yyhl179 {
- yyb179 = yyj179 > l
- } else {
- yyb179 = r.CheckBreak()
- }
- if yyb179 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj179-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterReplicaSetPreferences) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym183 := z.EncBinary()
- _ = yym183
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep184 := !z.EncBinary()
- yy2arr184 := z.EncBasicHandle().StructToArray
- var yyq184 [3]bool
- _, _, _ = yysep184, yyq184, yy2arr184
- const yyr184 bool = false
- yyq184[0] = x.MinReplicas != 0
- yyq184[1] = x.MaxReplicas != nil
- var yynn184 int
- if yyr184 || yy2arr184 {
- r.EncodeArrayStart(3)
- } else {
- yynn184 = 1
- for _, b := range yyq184 {
- if b {
- yynn184++
- }
- }
- r.EncodeMapStart(yynn184)
- yynn184 = 0
- }
- if yyr184 || yy2arr184 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq184[0] {
- yym186 := z.EncBinary()
- _ = yym186
- if false {
- } else {
- r.EncodeInt(int64(x.MinReplicas))
- }
- } else {
- r.EncodeInt(0)
- }
- } else {
- if yyq184[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("minReplicas"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym187 := z.EncBinary()
- _ = yym187
- if false {
- } else {
- r.EncodeInt(int64(x.MinReplicas))
- }
- }
- }
- if yyr184 || yy2arr184 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq184[1] {
- if x.MaxReplicas == nil {
- r.EncodeNil()
- } else {
- yy189 := *x.MaxReplicas
- yym190 := z.EncBinary()
- _ = yym190
- if false {
- } else {
- r.EncodeInt(int64(yy189))
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq184[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("maxReplicas"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.MaxReplicas == nil {
- r.EncodeNil()
- } else {
- yy191 := *x.MaxReplicas
- yym192 := z.EncBinary()
- _ = yym192
- if false {
- } else {
- r.EncodeInt(int64(yy191))
- }
- }
- }
- }
- if yyr184 || yy2arr184 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym194 := z.EncBinary()
- _ = yym194
- if false {
- } else {
- r.EncodeInt(int64(x.Weight))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("Weight"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym195 := z.EncBinary()
- _ = yym195
- if false {
- } else {
- r.EncodeInt(int64(x.Weight))
- }
- }
- if yyr184 || yy2arr184 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterReplicaSetPreferences) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym196 := z.DecBinary()
- _ = yym196
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct197 := r.ContainerType()
- if yyct197 == codecSelferValueTypeMap1234 {
- yyl197 := r.ReadMapStart()
- if yyl197 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl197, d)
- }
- } else if yyct197 == codecSelferValueTypeArray1234 {
- yyl197 := r.ReadArrayStart()
- if yyl197 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl197, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterReplicaSetPreferences) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys198Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys198Slc
- var yyhl198 bool = l >= 0
- for yyj198 := 0; ; yyj198++ {
- if yyhl198 {
- if yyj198 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys198Slc = r.DecodeBytes(yys198Slc, true, true)
- yys198 := string(yys198Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys198 {
- case "minReplicas":
- if r.TryDecodeAsNil() {
- x.MinReplicas = 0
- } else {
- x.MinReplicas = int64(r.DecodeInt(64))
- }
- case "maxReplicas":
- if r.TryDecodeAsNil() {
- if x.MaxReplicas != nil {
- x.MaxReplicas = nil
- }
- } else {
- if x.MaxReplicas == nil {
- x.MaxReplicas = new(int64)
- }
- yym201 := z.DecBinary()
- _ = yym201
- if false {
- } else {
- *((*int64)(x.MaxReplicas)) = int64(r.DecodeInt(64))
- }
- }
- case "Weight":
- if r.TryDecodeAsNil() {
- x.Weight = 0
- } else {
- x.Weight = int64(r.DecodeInt(64))
- }
- default:
- z.DecStructFieldNotFound(-1, yys198)
- } // end switch yys198
- } // end for yyj198
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterReplicaSetPreferences) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj203 int
- var yyb203 bool
- var yyhl203 bool = l >= 0
- yyj203++
- if yyhl203 {
- yyb203 = yyj203 > l
- } else {
- yyb203 = r.CheckBreak()
- }
- if yyb203 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.MinReplicas = 0
- } else {
- x.MinReplicas = int64(r.DecodeInt(64))
- }
- yyj203++
- if yyhl203 {
- yyb203 = yyj203 > l
- } else {
- yyb203 = r.CheckBreak()
- }
- if yyb203 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- if x.MaxReplicas != nil {
- x.MaxReplicas = nil
- }
- } else {
- if x.MaxReplicas == nil {
- x.MaxReplicas = new(int64)
- }
- yym206 := z.DecBinary()
- _ = yym206
- if false {
- } else {
- *((*int64)(x.MaxReplicas)) = int64(r.DecodeInt(64))
- }
- }
- yyj203++
- if yyhl203 {
- yyb203 = yyj203 > l
- } else {
- yyb203 = r.CheckBreak()
- }
- if yyb203 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Weight = 0
- } else {
- x.Weight = int64(r.DecodeInt(64))
- }
- for {
- yyj203++
- if yyhl203 {
- yyb203 = yyj203 > l
- } else {
- yyb203 = r.CheckBreak()
- }
- if yyb203 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj203-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) encSliceServerAddressByClientCIDR(v []ServerAddressByClientCIDR, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv208 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy209 := &yyv208
- yy209.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceServerAddressByClientCIDR(v *[]ServerAddressByClientCIDR, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv210 := *v
- yyh210, yyl210 := z.DecSliceHelperStart()
- var yyc210 bool
- if yyl210 == 0 {
- if yyv210 == nil {
- yyv210 = []ServerAddressByClientCIDR{}
- yyc210 = true
- } else if len(yyv210) != 0 {
- yyv210 = yyv210[:0]
- yyc210 = true
- }
- } else if yyl210 > 0 {
- var yyrr210, yyrl210 int
- var yyrt210 bool
- if yyl210 > cap(yyv210) {
-
- yyrg210 := len(yyv210) > 0
- yyv2210 := yyv210
- yyrl210, yyrt210 = z.DecInferLen(yyl210, z.DecBasicHandle().MaxInitLen, 32)
- if yyrt210 {
- if yyrl210 <= cap(yyv210) {
- yyv210 = yyv210[:yyrl210]
- } else {
- yyv210 = make([]ServerAddressByClientCIDR, yyrl210)
- }
- } else {
- yyv210 = make([]ServerAddressByClientCIDR, yyrl210)
- }
- yyc210 = true
- yyrr210 = len(yyv210)
- if yyrg210 {
- copy(yyv210, yyv2210)
- }
- } else if yyl210 != len(yyv210) {
- yyv210 = yyv210[:yyl210]
- yyc210 = true
- }
- yyj210 := 0
- for ; yyj210 < yyrr210; yyj210++ {
- yyh210.ElemContainerState(yyj210)
- if r.TryDecodeAsNil() {
- yyv210[yyj210] = ServerAddressByClientCIDR{}
- } else {
- yyv211 := &yyv210[yyj210]
- yyv211.CodecDecodeSelf(d)
- }
-
- }
- if yyrt210 {
- for ; yyj210 < yyl210; yyj210++ {
- yyv210 = append(yyv210, ServerAddressByClientCIDR{})
- yyh210.ElemContainerState(yyj210)
- if r.TryDecodeAsNil() {
- yyv210[yyj210] = ServerAddressByClientCIDR{}
- } else {
- yyv212 := &yyv210[yyj210]
- yyv212.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj210 := 0
- for ; !r.CheckBreak(); yyj210++ {
-
- if yyj210 >= len(yyv210) {
- yyv210 = append(yyv210, ServerAddressByClientCIDR{}) // var yyz210 ServerAddressByClientCIDR
- yyc210 = true
- }
- yyh210.ElemContainerState(yyj210)
- if yyj210 < len(yyv210) {
- if r.TryDecodeAsNil() {
- yyv210[yyj210] = ServerAddressByClientCIDR{}
- } else {
- yyv213 := &yyv210[yyj210]
- yyv213.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj210 < len(yyv210) {
- yyv210 = yyv210[:yyj210]
- yyc210 = true
- } else if yyj210 == 0 && yyv210 == nil {
- yyv210 = []ServerAddressByClientCIDR{}
- yyc210 = true
- }
- }
- yyh210.End()
- if yyc210 {
- *v = yyv210
- }
-}
-
-func (x codecSelfer1234) encSliceClusterCondition(v []ClusterCondition, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv214 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy215 := &yyv214
- yy215.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceClusterCondition(v *[]ClusterCondition, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv216 := *v
- yyh216, yyl216 := z.DecSliceHelperStart()
- var yyc216 bool
- if yyl216 == 0 {
- if yyv216 == nil {
- yyv216 = []ClusterCondition{}
- yyc216 = true
- } else if len(yyv216) != 0 {
- yyv216 = yyv216[:0]
- yyc216 = true
- }
- } else if yyl216 > 0 {
- var yyrr216, yyrl216 int
- var yyrt216 bool
- if yyl216 > cap(yyv216) {
-
- yyrg216 := len(yyv216) > 0
- yyv2216 := yyv216
- yyrl216, yyrt216 = z.DecInferLen(yyl216, z.DecBasicHandle().MaxInitLen, 112)
- if yyrt216 {
- if yyrl216 <= cap(yyv216) {
- yyv216 = yyv216[:yyrl216]
- } else {
- yyv216 = make([]ClusterCondition, yyrl216)
- }
- } else {
- yyv216 = make([]ClusterCondition, yyrl216)
- }
- yyc216 = true
- yyrr216 = len(yyv216)
- if yyrg216 {
- copy(yyv216, yyv2216)
- }
- } else if yyl216 != len(yyv216) {
- yyv216 = yyv216[:yyl216]
- yyc216 = true
- }
- yyj216 := 0
- for ; yyj216 < yyrr216; yyj216++ {
- yyh216.ElemContainerState(yyj216)
- if r.TryDecodeAsNil() {
- yyv216[yyj216] = ClusterCondition{}
- } else {
- yyv217 := &yyv216[yyj216]
- yyv217.CodecDecodeSelf(d)
- }
-
- }
- if yyrt216 {
- for ; yyj216 < yyl216; yyj216++ {
- yyv216 = append(yyv216, ClusterCondition{})
- yyh216.ElemContainerState(yyj216)
- if r.TryDecodeAsNil() {
- yyv216[yyj216] = ClusterCondition{}
- } else {
- yyv218 := &yyv216[yyj216]
- yyv218.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj216 := 0
- for ; !r.CheckBreak(); yyj216++ {
-
- if yyj216 >= len(yyv216) {
- yyv216 = append(yyv216, ClusterCondition{}) // var yyz216 ClusterCondition
- yyc216 = true
- }
- yyh216.ElemContainerState(yyj216)
- if yyj216 < len(yyv216) {
- if r.TryDecodeAsNil() {
- yyv216[yyj216] = ClusterCondition{}
- } else {
- yyv219 := &yyv216[yyj216]
- yyv219.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj216 < len(yyv216) {
- yyv216 = yyv216[:yyj216]
- yyc216 = true
- } else if yyj216 == 0 && yyv216 == nil {
- yyv216 = []ClusterCondition{}
- yyc216 = true
- }
- }
- yyh216.End()
- if yyc216 {
- *v = yyv216
- }
-}
-
-func (x codecSelfer1234) encSliceCluster(v []Cluster, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv220 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy221 := &yyv220
- yy221.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceCluster(v *[]Cluster, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv222 := *v
- yyh222, yyl222 := z.DecSliceHelperStart()
- var yyc222 bool
- if yyl222 == 0 {
- if yyv222 == nil {
- yyv222 = []Cluster{}
- yyc222 = true
- } else if len(yyv222) != 0 {
- yyv222 = yyv222[:0]
- yyc222 = true
- }
- } else if yyl222 > 0 {
- var yyrr222, yyrl222 int
- var yyrt222 bool
- if yyl222 > cap(yyv222) {
-
- yyrg222 := len(yyv222) > 0
- yyv2222 := yyv222
- yyrl222, yyrt222 = z.DecInferLen(yyl222, z.DecBasicHandle().MaxInitLen, 352)
- if yyrt222 {
- if yyrl222 <= cap(yyv222) {
- yyv222 = yyv222[:yyrl222]
- } else {
- yyv222 = make([]Cluster, yyrl222)
- }
- } else {
- yyv222 = make([]Cluster, yyrl222)
- }
- yyc222 = true
- yyrr222 = len(yyv222)
- if yyrg222 {
- copy(yyv222, yyv2222)
- }
- } else if yyl222 != len(yyv222) {
- yyv222 = yyv222[:yyl222]
- yyc222 = true
- }
- yyj222 := 0
- for ; yyj222 < yyrr222; yyj222++ {
- yyh222.ElemContainerState(yyj222)
- if r.TryDecodeAsNil() {
- yyv222[yyj222] = Cluster{}
- } else {
- yyv223 := &yyv222[yyj222]
- yyv223.CodecDecodeSelf(d)
- }
-
- }
- if yyrt222 {
- for ; yyj222 < yyl222; yyj222++ {
- yyv222 = append(yyv222, Cluster{})
- yyh222.ElemContainerState(yyj222)
- if r.TryDecodeAsNil() {
- yyv222[yyj222] = Cluster{}
- } else {
- yyv224 := &yyv222[yyj222]
- yyv224.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj222 := 0
- for ; !r.CheckBreak(); yyj222++ {
-
- if yyj222 >= len(yyv222) {
- yyv222 = append(yyv222, Cluster{}) // var yyz222 Cluster
- yyc222 = true
- }
- yyh222.ElemContainerState(yyj222)
- if yyj222 < len(yyv222) {
- if r.TryDecodeAsNil() {
- yyv222[yyj222] = Cluster{}
- } else {
- yyv225 := &yyv222[yyj222]
- yyv225.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj222 < len(yyv222) {
- yyv222 = yyv222[:yyj222]
- yyc222 = true
- } else if yyj222 == 0 && yyv222 == nil {
- yyv222 = []Cluster{}
- yyc222 = true
- }
- }
- yyh222.End()
- if yyc222 {
- *v = yyv222
- }
-}
-
-func (x codecSelfer1234) encMapstringClusterReplicaSetPreferences(v map[string]ClusterReplicaSetPreferences, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeMapStart(len(v))
- for yyk226, yyv226 := range v {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- yym227 := z.EncBinary()
- _ = yym227
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(yyk226))
- }
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy228 := &yyv226
- yy228.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x codecSelfer1234) decMapstringClusterReplicaSetPreferences(v *map[string]ClusterReplicaSetPreferences, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv229 := *v
- yyl229 := r.ReadMapStart()
- yybh229 := z.DecBasicHandle()
- if yyv229 == nil {
- yyrl229, _ := z.DecInferLen(yyl229, yybh229.MaxInitLen, 40)
- yyv229 = make(map[string]ClusterReplicaSetPreferences, yyrl229)
- *v = yyv229
- }
- var yymk229 string
- var yymv229 ClusterReplicaSetPreferences
- var yymg229 bool
- if yybh229.MapValueReset {
- yymg229 = true
- }
- if yyl229 > 0 {
- for yyj229 := 0; yyj229 < yyl229; yyj229++ {
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- if r.TryDecodeAsNil() {
- yymk229 = ""
- } else {
- yymk229 = string(r.DecodeString())
- }
-
- if yymg229 {
- yymv229 = yyv229[yymk229]
- } else {
- yymv229 = ClusterReplicaSetPreferences{}
- }
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- if r.TryDecodeAsNil() {
- yymv229 = ClusterReplicaSetPreferences{}
- } else {
- yyv231 := &yymv229
- yyv231.CodecDecodeSelf(d)
- }
-
- if yyv229 != nil {
- yyv229[yymk229] = yymv229
- }
- }
- } else if yyl229 < 0 {
- for yyj229 := 0; !r.CheckBreak(); yyj229++ {
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- if r.TryDecodeAsNil() {
- yymk229 = ""
- } else {
- yymk229 = string(r.DecodeString())
- }
-
- if yymg229 {
- yymv229 = yyv229[yymk229]
- } else {
- yymv229 = ClusterReplicaSetPreferences{}
- }
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- if r.TryDecodeAsNil() {
- yymv229 = ClusterReplicaSetPreferences{}
- } else {
- yyv233 := &yymv229
- yyv233.CodecDecodeSelf(d)
- }
-
- if yyv229 != nil {
- yyv229[yymk229] = yymv229
- }
- }
- } // else len==0: TODO: Should we clear map entries?
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/types.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/types.go
deleted file mode 100644
index 0c944be9b..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/types.go
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
-Copyright 2016 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 federation
-
-import (
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
-)
-
-// ServerAddressByClientCIDR helps the client to 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 the server address that they should use.
- ClientCIDR string `json:"clientCIDR" 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.
- ServerAddress string `json:"serverAddress" protobuf:"bytes,2,opt,name=serverAddress"`
-}
-
-// ClusterSpec describes the attributes of a kubernetes cluster.
-type ClusterSpec struct {
- // A map of client CIDR to server address.
- // 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.
- ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" patchStrategy:"merge" patchMergeKey:"clientCIDR"`
- // Name of the secret containing kubeconfig to access this cluster.
- // The secret is read from the kubernetes cluster that is hosting federation control plane.
- // Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key "kubeconfig".
- // This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets.
- // This can be left empty if the cluster allows insecure access.
- SecretRef *api.LocalObjectReference `json:"secretRef,omitempty"`
-}
-
-type ClusterConditionType string
-
-// These are valid conditions of a cluster.
-const (
- // ClusterReady means the cluster is ready to accept workloads.
- ClusterReady ClusterConditionType = "Ready"
- // ClusterOffline means the cluster is temporarily down or not reachable
- ClusterOffline ClusterConditionType = "Offline"
-)
-
-// ClusterCondition describes current state of a cluster.
-type ClusterCondition struct {
- // Type of cluster condition, Complete or Failed.
- Type ClusterConditionType `json:"type"`
- // Status of the condition, one of True, False, Unknown.
- Status api.ConditionStatus `json:"status"`
- // Last time the condition was checked.
- LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
- // Last time the condition transit from one status to another.
- LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
- // (brief) reason for the condition's last transition.
- Reason string `json:"reason,omitempty"`
- // Human readable message indicating details about last transition.
- Message string `json:"message,omitempty"`
-}
-
-// ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.
-type ClusterStatus struct {
- // Conditions is an array of current cluster conditions.
- Conditions []ClusterCondition `json:"conditions,omitempty"`
- // Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
- // These will always be in the same region.
- Zones []string `json:"zones,omitempty"`
- // Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
- Region string `json:"region,omitempty"`
-}
-
-// +genclient=true
-// +nonNamespaced=true
-
-// Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.
-type Cluster struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
- api.ObjectMeta `json:"metadata,omitempty"`
-
- // Spec defines the behavior of the Cluster.
- Spec ClusterSpec `json:"spec,omitempty"`
- // Status describes the current status of a Cluster
- Status ClusterStatus `json:"status,omitempty"`
-}
-
-// A list of all the kubernetes clusters registered to the federation
-type ClusterList struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
- unversioned.ListMeta `json:"metadata,omitempty"`
-
- // List of Cluster objects.
- Items []Cluster `json:"items"`
-}
-
-// Temporary/alpha structures to support custom replica assignments within FederatedReplicaSet.
-
-// A set of preferences that can be added to federated version of ReplicaSet as a json-serialized annotation.
-// The preferences allow the user to express in which culsters he wants to put his replicas within the
-// mentiond FederatedReplicaSet.
-type FederatedReplicaSetPreferences struct {
- // If set to true then already scheduled and running replicas may be moved to other clusters to
- // in order to bring cluster replicasets towards a desired state. Otherwise, if set to false,
- // up and running replicas will not be moved.
- Rebalance bool `json:"rebalance,omitempty"`
-
- // A mapping between cluser names and preferences regarding local replicasets in these clusters.
- // "*" (if provided) applies to all clusters if an explicit mapping is not provided. If there is no
- // "*" that clusters without explicit preferences should not have any replicas scheduled.
- Clusters map[string]ClusterReplicaSetPreferences `json:"clusters,omitempty"`
-}
-
-// Preferences regarding number of replicas assigned to a cluster replicaset within a federated replicaset.
-type ClusterReplicaSetPreferences struct {
- // Minimum number of replicas that should be assigned to this Local ReplicaSet. 0 by default.
- MinReplicas int64 `json:"minReplicas,omitempty"`
-
- // Maximum number of replicas that should be assigned to this Local ReplicaSet. Unbounded if no value provided (default).
- MaxReplicas *int64 `json:"maxReplicas,omitempty"`
-
- // A number expressing the preference to put an additional replica to this LocalReplicaSet. 0 by default.
- Weight int64
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/conversion.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/conversion.go
deleted file mode 100644
index e4fd1afb8..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/conversion.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-Copyright 2016 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 v1beta1
-
-import (
- "fmt"
-
- "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-func addConversionFuncs(scheme *runtime.Scheme) error {
- return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.String(), "Cluster",
- func(label, value string) (string, string, error) {
- switch label {
- case "metadata.name":
- return label, value, nil
- default:
- return "", "", fmt.Errorf("field label not supported: %s", label)
- }
- },
- )
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/defaults.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/defaults.go
deleted file mode 100644
index d29eb3d4d..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/defaults.go
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2016 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 v1beta1
-
-import (
- "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-func addDefaultingFuncs(scheme *runtime.Scheme) error {
- return nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/doc.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/doc.go
deleted file mode 100644
index 00ebe857e..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// +k8s:deepcopy-gen=package,register
-// +k8s:conversion-gen=k8s.io/kubernetes/federation/apis/federation
-// +k8s:openapi-gen=true
-package v1beta1
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/generated.pb.go
deleted file mode 100644
index 6ff3ec1ee..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/generated.pb.go
+++ /dev/null
@@ -1,1540 +0,0 @@
-/*
-Copyright 2016 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.
-// source: k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.proto
-// DO NOT EDIT!
-
-/*
- Package v1beta1 is a generated protocol buffer package.
-
- It is generated from these files:
- k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.proto
-
- It has these top-level messages:
- Cluster
- ClusterCondition
- ClusterList
- ClusterSpec
- ClusterStatus
- ServerAddressByClientCIDR
-*/
-package v1beta1
-
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/1.5/pkg/api/v1"
-
-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.
-const _ = proto.GoGoProtoPackageIsVersion1
-
-func (m *Cluster) Reset() { *m = Cluster{} }
-func (*Cluster) ProtoMessage() {}
-func (*Cluster) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
-
-func (m *ClusterCondition) Reset() { *m = ClusterCondition{} }
-func (*ClusterCondition) ProtoMessage() {}
-func (*ClusterCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
-
-func (m *ClusterList) Reset() { *m = ClusterList{} }
-func (*ClusterList) ProtoMessage() {}
-func (*ClusterList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
-
-func (m *ClusterSpec) Reset() { *m = ClusterSpec{} }
-func (*ClusterSpec) ProtoMessage() {}
-func (*ClusterSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
-
-func (m *ClusterStatus) Reset() { *m = ClusterStatus{} }
-func (*ClusterStatus) ProtoMessage() {}
-func (*ClusterStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
-
-func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} }
-func (*ServerAddressByClientCIDR) ProtoMessage() {}
-func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) {
- return fileDescriptorGenerated, []int{5}
-}
-
-func init() {
- proto.RegisterType((*Cluster)(nil), "k8s.io.client-go.1.5.federation.apis.federation.v1beta1.Cluster")
- proto.RegisterType((*ClusterCondition)(nil), "k8s.io.client-go.1.5.federation.apis.federation.v1beta1.ClusterCondition")
- proto.RegisterType((*ClusterList)(nil), "k8s.io.client-go.1.5.federation.apis.federation.v1beta1.ClusterList")
- proto.RegisterType((*ClusterSpec)(nil), "k8s.io.client-go.1.5.federation.apis.federation.v1beta1.ClusterSpec")
- proto.RegisterType((*ClusterStatus)(nil), "k8s.io.client-go.1.5.federation.apis.federation.v1beta1.ClusterStatus")
- proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.client-go.1.5.federation.apis.federation.v1beta1.ServerAddressByClientCIDR")
-}
-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()))
- n1, err := m.ObjectMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
- n2, err := m.Spec.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- data[i] = 0x1a
- i++
- i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
- n3, err := m.Status.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- return i, nil
-}
-
-func (m *ClusterCondition) 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 *ClusterCondition) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Type)))
- i += copy(data[i:], m.Type)
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Status)))
- i += copy(data[i:], m.Status)
- data[i] = 0x1a
- i++
- i = encodeVarintGenerated(data, i, uint64(m.LastProbeTime.Size()))
- n4, err := m.LastProbeTime.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- data[i] = 0x22
- i++
- i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size()))
- n5, err := m.LastTransitionTime.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- data[i] = 0x2a
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Reason)))
- i += copy(data[i:], m.Reason)
- data[i] = 0x32
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Message)))
- i += copy(data[i:], m.Message)
- 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()))
- n6, err := m.ListMeta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- 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
- if len(m.ServerAddressByClientCIDRs) > 0 {
- for _, msg := range m.ServerAddressByClientCIDRs {
- 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.SecretRef != nil {
- data[i] = 0x12
- i++
- i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size()))
- n7, err := m.SecretRef.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
- if len(m.Conditions) > 0 {
- for _, msg := range m.Conditions {
- 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 len(m.Zones) > 0 {
- for _, s := range m.Zones {
- data[i] = 0x2a
- i++
- l = len(s)
- for l >= 1<<7 {
- data[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- data[i] = uint8(l)
- i++
- i += copy(data[i:], s)
- }
- }
- data[i] = 0x32
- i++
- i = encodeVarintGenerated(data, i, uint64(len(m.Region)))
- i += copy(data[i:], m.Region)
- 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 encodeFixed64Generated(data []byte, offset int, v uint64) int {
- data[offset] = uint8(v)
- data[offset+1] = uint8(v >> 8)
- data[offset+2] = uint8(v >> 16)
- data[offset+3] = uint8(v >> 24)
- data[offset+4] = uint8(v >> 32)
- data[offset+5] = uint8(v >> 40)
- data[offset+6] = uint8(v >> 48)
- data[offset+7] = uint8(v >> 56)
- return offset + 8
-}
-func encodeFixed32Generated(data []byte, offset int, v uint32) int {
- data[offset] = uint8(v)
- data[offset+1] = uint8(v >> 8)
- data[offset+2] = uint8(v >> 16)
- data[offset+3] = uint8(v >> 24)
- return offset + 4
-}
-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 *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))
- l = m.Status.Size()
- n += 1 + l + sovGenerated(uint64(l))
- return n
-}
-
-func (m *ClusterCondition) Size() (n int) {
- var l int
- _ = l
- l = len(m.Type)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Status)
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastProbeTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = m.LastTransitionTime.Size()
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Reason)
- n += 1 + l + sovGenerated(uint64(l))
- l = len(m.Message)
- 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
- if len(m.ServerAddressByClientCIDRs) > 0 {
- for _, e := range m.ServerAddressByClientCIDRs {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if m.SecretRef != nil {
- l = m.SecretRef.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- return n
-}
-
-func (m *ClusterStatus) Size() (n int) {
- var l int
- _ = l
- if len(m.Conditions) > 0 {
- for _, e := range m.Conditions {
- l = e.Size()
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- if len(m.Zones) > 0 {
- for _, s := range m.Zones {
- l = len(s)
- n += 1 + l + sovGenerated(uint64(l))
- }
- }
- l = len(m.Region)
- 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 *Cluster) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Cluster{`,
- `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterSpec", "ClusterSpec", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ClusterStatus", "ClusterStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterCondition) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterCondition{`,
- `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
- `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
- `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`,
- `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`,
- `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
- `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
- `}`,
- }, "")
- 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_kubernetes_pkg_api_unversioned.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{`,
- `ServerAddressByClientCIDRs:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ServerAddressByClientCIDRs), "ServerAddressByClientCIDR", "ServerAddressByClientCIDR", 1), `&`, ``, 1) + `,`,
- `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "k8s_io_kubernetes_pkg_api_v1.LocalObjectReference", 1) + `,`,
- `}`,
- }, "")
- return s
-}
-func (this *ClusterStatus) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ClusterStatus{`,
- `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ClusterCondition", "ClusterCondition", 1), `&`, ``, 1) + `,`,
- `Zones:` + fmt.Sprintf("%v", this.Zones) + `,`,
- `Region:` + fmt.Sprintf("%v", this.Region) + `,`,
- `}`,
- }, "")
- 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 *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 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 *ClusterCondition) 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: ClusterCondition: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ClusterCondition: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", 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.Type = ClusterConditionType(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", 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.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastProbeTime", 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.LastProbeTime.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", 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.LastTransitionTime.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Reason", 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.Reason = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", 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.Message = 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 *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 ServerAddressByClientCIDRs", 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.ServerAddressByClientCIDRs = append(m.ServerAddressByClientCIDRs, ServerAddressByClientCIDR{})
- if err := m.ServerAddressByClientCIDRs[len(m.ServerAddressByClientCIDRs)-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 SecretRef", 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.SecretRef == nil {
- m.SecretRef = &k8s_io_kubernetes_pkg_api_v1.LocalObjectReference{}
- }
- if err := m.SecretRef.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 {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", 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.Conditions = append(m.Conditions, ClusterCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Zones", 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.Zones = append(m.Zones, string(data[iNdEx:postIndex]))
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Region", 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.Region = 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 *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")
-)
-
-var fileDescriptorGenerated = []byte{
- // 776 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x54, 0xdf, 0x6a, 0x13, 0x4d,
- 0x14, 0x6f, 0xfe, 0x37, 0xd3, 0x2f, 0xdf, 0x57, 0x86, 0x4f, 0x88, 0xb9, 0x68, 0x24, 0x88, 0xb4,
- 0x68, 0x77, 0x69, 0x50, 0x28, 0x88, 0x42, 0x37, 0x45, 0x28, 0xa4, 0x54, 0xa6, 0x45, 0xa4, 0x20,
- 0xb2, 0xd9, 0x9c, 0xa6, 0x6b, 0x92, 0xdd, 0x30, 0x33, 0x5b, 0x69, 0xaf, 0x7c, 0x00, 0x2f, 0x7c,
- 0x08, 0xdf, 0x40, 0x7c, 0x87, 0x5e, 0xf6, 0xc2, 0x0b, 0xf1, 0xa2, 0x68, 0x7d, 0x0b, 0xaf, 0x9c,
- 0x99, 0x9d, 0x6c, 0x76, 0xbb, 0x4d, 0xd0, 0xf6, 0x62, 0x60, 0xcf, 0xd9, 0x73, 0x7e, 0xbf, 0xdf,
- 0x9c, 0x73, 0xe6, 0xa0, 0xcd, 0xfe, 0x3a, 0x33, 0x5c, 0xdf, 0xec, 0x07, 0x1d, 0xa0, 0x1e, 0x70,
- 0x60, 0xe6, 0x01, 0x74, 0x81, 0xda, 0xdc, 0xf5, 0x3d, 0xd3, 0x1e, 0xb9, 0x09, 0xfb, 0x68, 0xad,
- 0x03, 0xdc, 0x5e, 0x33, 0x7b, 0xe0, 0x49, 0x17, 0x74, 0x8d, 0x11, 0xf5, 0xb9, 0x8f, 0x1f, 0x86,
- 0x28, 0xc6, 0x04, 0xc5, 0x98, 0x64, 0x19, 0x12, 0x25, 0x6e, 0x6b, 0x94, 0xda, 0x6a, 0xcf, 0xe5,
- 0x87, 0x41, 0xc7, 0x70, 0xfc, 0xa1, 0xd9, 0xf3, 0x7b, 0xbe, 0xa9, 0xc0, 0x3a, 0xc1, 0x81, 0xb2,
- 0x94, 0xa1, 0xbe, 0x42, 0x92, 0x5a, 0x33, 0x2d, 0x75, 0xd4, 0xef, 0x49, 0x8d, 0x26, 0x05, 0xe6,
- 0x07, 0xd4, 0x81, 0xcb, 0xc2, 0x6a, 0x8f, 0xa6, 0xe7, 0x04, 0xde, 0x11, 0x50, 0x26, 0xf4, 0x40,
- 0x37, 0x95, 0xf6, 0x60, 0x7a, 0xda, 0x51, 0xea, 0xf6, 0xb5, 0xd5, 0xab, 0xa3, 0x69, 0xe0, 0x71,
- 0x77, 0x98, 0xd6, 0xb4, 0x76, 0x75, 0x78, 0xc0, 0xdd, 0x81, 0xe9, 0x7a, 0x9c, 0x71, 0x7a, 0x39,
- 0xa5, 0xf1, 0x39, 0x8b, 0x4a, 0xad, 0x41, 0xc0, 0x38, 0x50, 0xfc, 0x12, 0xcd, 0x0f, 0x45, 0xf9,
- 0xba, 0x36, 0xb7, 0xab, 0x99, 0x3b, 0x99, 0xe5, 0x85, 0xe6, 0xb2, 0x91, 0x2e, 0xbf, 0x40, 0x94,
- 0x75, 0x17, 0xb5, 0x36, 0x76, 0x3a, 0x6f, 0xc0, 0xe1, 0xdb, 0x22, 0xc7, 0xc2, 0xa7, 0xe7, 0xf5,
- 0xb9, 0x8b, 0xf3, 0x3a, 0x9a, 0xf8, 0x48, 0x84, 0x86, 0x1d, 0x94, 0x67, 0x23, 0x70, 0xaa, 0x59,
- 0x85, 0xba, 0x61, 0x5c, 0xa7, 0xa9, 0x86, 0x96, 0xb9, 0x2b, 0x80, 0xac, 0x7f, 0x34, 0x5d, 0x5e,
- 0x5a, 0x44, 0x81, 0xe3, 0x3e, 0x2a, 0x32, 0x6e, 0xf3, 0x80, 0x55, 0x73, 0x8a, 0xa6, 0x75, 0x33,
- 0x1a, 0x05, 0x65, 0xfd, 0xab, 0x89, 0x8a, 0xa1, 0x4d, 0x34, 0x45, 0xe3, 0x5b, 0x0e, 0x2d, 0xea,
- 0xc8, 0x96, 0xef, 0x75, 0x5d, 0x09, 0x81, 0xd7, 0x51, 0x9e, 0x1f, 0x8f, 0x40, 0x15, 0xaf, 0x6c,
- 0xdd, 0x1d, 0x6b, 0xdc, 0x13, 0xbe, 0x5f, 0xe7, 0xf5, 0xff, 0x2f, 0xc7, 0x4b, 0x3f, 0x51, 0x19,
- 0xf8, 0x45, 0xa4, 0x3d, 0xab, 0x72, 0x9f, 0x26, 0x69, 0x45, 0xf6, 0xcc, 0xc1, 0x31, 0x22, 0xcc,
- 0xa4, 0x4c, 0x7c, 0x88, 0x2a, 0x03, 0x9b, 0xf1, 0xe7, 0xd4, 0xef, 0xc0, 0x9e, 0x18, 0x19, 0x5d,
- 0x9a, 0xfb, 0x33, 0xfa, 0x1a, 0x9b, 0x5e, 0x43, 0xa6, 0x58, 0xb7, 0xb4, 0x96, 0x4a, 0x3b, 0x8e,
- 0x44, 0x92, 0xc0, 0xf8, 0x2d, 0xc2, 0xd2, 0xb1, 0x47, 0x6d, 0x8f, 0x85, 0xb7, 0x93, 0x74, 0xf9,
- 0xbf, 0xa7, 0xab, 0x69, 0x3a, 0xdc, 0x4e, 0xc1, 0x91, 0x2b, 0x28, 0xf0, 0x3d, 0x54, 0xa4, 0x60,
- 0x33, 0xdf, 0xab, 0x16, 0x54, 0xe9, 0xa2, 0x8e, 0x11, 0xe5, 0x25, 0xfa, 0x2f, 0x5e, 0x41, 0xa5,
- 0x21, 0x30, 0x66, 0xf7, 0xa0, 0x5a, 0x54, 0x81, 0xff, 0xe9, 0xc0, 0xd2, 0x76, 0xe8, 0x26, 0xe3,
- 0xff, 0x8d, 0xb3, 0x0c, 0x5a, 0xd0, 0xcd, 0x6a, 0xbb, 0x8c, 0xe3, 0x57, 0xa9, 0x87, 0x61, 0xfe,
- 0xe1, 0x8d, 0x64, 0xba, 0x7a, 0x1f, 0x8b, 0x9a, 0x6c, 0x7e, 0xec, 0x89, 0xbd, 0x8e, 0x0e, 0x2a,
- 0xb8, 0x1c, 0x86, 0xb2, 0xf7, 0x39, 0x81, 0xfd, 0xe4, 0x46, 0x73, 0x6b, 0x55, 0x34, 0x53, 0x61,
- 0x4b, 0x62, 0x92, 0x10, 0xba, 0xf1, 0x31, 0x1b, 0x5d, 0x49, 0x3e, 0x19, 0xfc, 0x29, 0x83, 0x6a,
- 0x0c, 0xa8, 0x50, 0xba, 0xd1, 0xed, 0x8a, 0x25, 0xc7, 0xac, 0xe3, 0xd6, 0xc0, 0x05, 0x8f, 0xb7,
- 0xb6, 0x36, 0x09, 0x13, 0xb7, 0x94, 0x4a, 0x76, 0xae, 0xa7, 0x64, 0x77, 0x1a, 0xae, 0xd5, 0xd0,
- 0xda, 0x6a, 0x53, 0x43, 0x18, 0x99, 0x21, 0x0b, 0xbf, 0x46, 0x65, 0x06, 0x0e, 0x05, 0x4e, 0xe0,
- 0x40, 0x2f, 0x93, 0xe6, 0xec, 0x15, 0xd5, 0xf6, 0x1d, 0x7b, 0x10, 0xee, 0x24, 0x91, 0x03, 0x14,
- 0x3c, 0x07, 0xac, 0x8a, 0x90, 0x50, 0xde, 0x1d, 0x03, 0x91, 0x09, 0x66, 0xe3, 0x4b, 0x06, 0x55,
- 0x12, 0x0b, 0x00, 0x9f, 0x20, 0xe4, 0x8c, 0x1f, 0xd7, 0xb8, 0x2e, 0xcf, 0x6e, 0xd4, 0xa1, 0xe8,
- 0xad, 0x4e, 0x96, 0x66, 0xe4, 0x62, 0x24, 0xc6, 0x86, 0xeb, 0xa8, 0x70, 0x22, 0xc6, 0x88, 0x89,
- 0xc9, 0xce, 0x89, 0x81, 0x2d, 0xcb, 0xae, 0xee, 0x4b, 0x07, 0x09, 0xfd, 0xe1, 0xec, 0xf7, 0x44,
- 0xac, 0x1e, 0xe9, 0xd8, 0xec, 0x4b, 0x2f, 0xd1, 0x7f, 0x1b, 0xef, 0x33, 0xe8, 0xf6, 0xd4, 0x92,
- 0xe3, 0xa6, 0xb8, 0x62, 0x64, 0xe9, 0xe5, 0x35, 0x91, 0x16, 0xfd, 0x21, 0xb1, 0x28, 0xfc, 0x18,
- 0x55, 0x12, 0x7d, 0xd2, 0x7b, 0x2b, 0xda, 0x15, 0x09, 0x36, 0x92, 0x8c, 0xb5, 0x56, 0x4e, 0x7f,
- 0x2c, 0xcd, 0x9d, 0x89, 0xf3, 0x55, 0x9c, 0x77, 0x17, 0x4b, 0x99, 0x53, 0x71, 0xce, 0xc4, 0xf9,
- 0x2e, 0xce, 0x87, 0x9f, 0x4b, 0x73, 0xfb, 0x25, 0x5d, 0xb3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff,
- 0x48, 0x5d, 0x6b, 0x0c, 0x46, 0x08, 0x00, 0x00,
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/generated.proto b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/generated.proto
deleted file mode 100644
index 30c5533c2..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/generated.proto
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-Copyright 2016 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.kubernetes.federation.apis.federation.v1beta1;
-
-import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
-import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
-import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
-import "k8s.io/kubernetes/pkg/runtime/generated.proto";
-import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
-
-// Package-wide variables from generator "generated".
-option go_package = "v1beta1";
-
-// Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.
-message Cluster {
- // Standard object's metadata.
- // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
- optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
-
- // Spec defines the behavior of the Cluster.
- optional ClusterSpec spec = 2;
-
- // Status describes the current status of a Cluster
- optional ClusterStatus status = 3;
-}
-
-// ClusterCondition describes current state of a cluster.
-message ClusterCondition {
- // Type of cluster condition, Complete or Failed.
- optional string type = 1;
-
- // Status of the condition, one of True, False, Unknown.
- optional string status = 2;
-
- // Last time the condition was checked.
- optional k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3;
-
- // Last time the condition transit from one status to another.
- optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4;
-
- // (brief) reason for the condition's last transition.
- optional string reason = 5;
-
- // Human readable message indicating details about last transition.
- optional string message = 6;
-}
-
-// A list of all the kubernetes clusters registered to the federation
-message ClusterList {
- // Standard list metadata.
- // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
- optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
-
- // List of Cluster objects.
- repeated Cluster items = 2;
-}
-
-// ClusterSpec describes the attributes of a kubernetes cluster.
-message ClusterSpec {
- // A map of client CIDR to server address.
- // 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.
- repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 1;
-
- // Name of the secret containing kubeconfig to access this cluster.
- // The secret is read from the kubernetes cluster that is hosting federation control plane.
- // Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key "kubeconfig".
- // This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets.
- // This can be left empty if the cluster allows insecure access.
- optional k8s.io.kubernetes.pkg.api.v1.LocalObjectReference secretRef = 2;
-}
-
-// ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.
-message ClusterStatus {
- // Conditions is an array of current cluster conditions.
- repeated ClusterCondition conditions = 1;
-
- // Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
- // These will always be in the same region.
- repeated string zones = 5;
-
- // Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
- optional string region = 6;
-}
-
-// ServerAddressByClientCIDR helps the client to 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 the server address that they should use.
- 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 string serverAddress = 2;
-}
-
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/register.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/register.go
deleted file mode 100644
index 53969e6f1..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/register.go
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-Copyright 2016 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 v1beta1
-
-import (
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/pkg/runtime"
- versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned"
-)
-
-// GroupName is the group name use in this package
-const GroupName = "federation"
-
-// SchemeGroupVersion is group version used to register these objects
-var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"}
-
-var (
- SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
- AddToScheme = SchemeBuilder.AddToScheme
-)
-
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &Cluster{},
- &ClusterList{},
- &v1.ListOptions{},
- &v1.DeleteOptions{},
- )
- versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
-
-func (obj *Cluster) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
-func (obj *ClusterList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types.generated.go
deleted file mode 100644
index cc0193729..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types.generated.go
+++ /dev/null
@@ -1,2334 +0,0 @@
-/*
-Copyright 2016 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.
-*/
-
-// ************************************************************
-// DO NOT EDIT.
-// THIS FILE IS AUTO-GENERATED BY codecgen.
-// ************************************************************
-
-package v1beta1
-
-import (
- "errors"
- "fmt"
- codec1978 "github.com/ugorji/go/codec"
- pkg2_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned"
- pkg1_v1 "k8s.io/client-go/1.5/pkg/api/v1"
- pkg3_types "k8s.io/client-go/1.5/pkg/types"
- "reflect"
- "runtime"
- time "time"
-)
-
-const (
- // ----- content types ----
- codecSelferC_UTF81234 = 1
- codecSelferC_RAW1234 = 0
- // ----- value types used ----
- codecSelferValueTypeArray1234 = 10
- codecSelferValueTypeMap1234 = 9
- // ----- containerStateValues ----
- codecSelfer_containerMapKey1234 = 2
- codecSelfer_containerMapValue1234 = 3
- codecSelfer_containerMapEnd1234 = 4
- codecSelfer_containerArrayElem1234 = 6
- codecSelfer_containerArrayEnd1234 = 7
-)
-
-var (
- codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
- codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
-)
-
-type codecSelfer1234 struct{}
-
-func init() {
- if codec1978.GenVersion != 5 {
- _, file, _, _ := runtime.Caller(0)
- err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
- 5, codec1978.GenVersion, file)
- panic(err)
- }
- if false { // reference the types, but skip this branch at build/run time
- var v0 pkg2_unversioned.Time
- var v1 pkg1_v1.LocalObjectReference
- var v2 pkg3_types.UID
- var v3 time.Time
- _, _, _, _ = v0, v1, v2, v3
- }
-}
-
-func (x *ServerAddressByClientCIDR) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [2]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(2)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClientCIDR))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("clientCIDR"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ClientCIDR))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ServerAddress))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("serverAddress"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.ServerAddress))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ServerAddressByClientCIDR) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct10 := r.ContainerType()
- if yyct10 == codecSelferValueTypeMap1234 {
- yyl10 := r.ReadMapStart()
- if yyl10 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl10, d)
- }
- } else if yyct10 == codecSelferValueTypeArray1234 {
- yyl10 := r.ReadArrayStart()
- if yyl10 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl10, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ServerAddressByClientCIDR) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys11Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys11Slc
- var yyhl11 bool = l >= 0
- for yyj11 := 0; ; yyj11++ {
- if yyhl11 {
- if yyj11 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys11Slc = r.DecodeBytes(yys11Slc, true, true)
- yys11 := string(yys11Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys11 {
- case "clientCIDR":
- if r.TryDecodeAsNil() {
- x.ClientCIDR = ""
- } else {
- x.ClientCIDR = string(r.DecodeString())
- }
- case "serverAddress":
- if r.TryDecodeAsNil() {
- x.ServerAddress = ""
- } else {
- x.ServerAddress = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys11)
- } // end switch yys11
- } // end for yyj11
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ServerAddressByClientCIDR) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj14 int
- var yyb14 bool
- var yyhl14 bool = l >= 0
- yyj14++
- if yyhl14 {
- yyb14 = yyj14 > l
- } else {
- yyb14 = r.CheckBreak()
- }
- if yyb14 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ClientCIDR = ""
- } else {
- x.ClientCIDR = string(r.DecodeString())
- }
- yyj14++
- if yyhl14 {
- yyb14 = yyj14 > l
- } else {
- yyb14 = r.CheckBreak()
- }
- if yyb14 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ServerAddress = ""
- } else {
- x.ServerAddress = string(r.DecodeString())
- }
- for {
- yyj14++
- if yyhl14 {
- yyb14 = yyj14 > l
- } else {
- yyb14 = r.CheckBreak()
- }
- if yyb14 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj14-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterSpec) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym17 := z.EncBinary()
- _ = yym17
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep18 := !z.EncBinary()
- yy2arr18 := z.EncBasicHandle().StructToArray
- var yyq18 [2]bool
- _, _, _ = yysep18, yyq18, yy2arr18
- const yyr18 bool = false
- yyq18[1] = x.SecretRef != nil
- var yynn18 int
- if yyr18 || yy2arr18 {
- r.EncodeArrayStart(2)
- } else {
- yynn18 = 1
- for _, b := range yyq18 {
- if b {
- yynn18++
- }
- }
- r.EncodeMapStart(yynn18)
- yynn18 = 0
- }
- if yyr18 || yy2arr18 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.ServerAddressByClientCIDRs == nil {
- r.EncodeNil()
- } else {
- yym20 := z.EncBinary()
- _ = yym20
- if false {
- } else {
- h.encSliceServerAddressByClientCIDR(([]ServerAddressByClientCIDR)(x.ServerAddressByClientCIDRs), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("serverAddressByClientCIDRs"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.ServerAddressByClientCIDRs == nil {
- r.EncodeNil()
- } else {
- yym21 := z.EncBinary()
- _ = yym21
- if false {
- } else {
- h.encSliceServerAddressByClientCIDR(([]ServerAddressByClientCIDR)(x.ServerAddressByClientCIDRs), e)
- }
- }
- }
- if yyr18 || yy2arr18 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq18[1] {
- if x.SecretRef == nil {
- r.EncodeNil()
- } else {
- x.SecretRef.CodecEncodeSelf(e)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq18[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.SecretRef == nil {
- r.EncodeNil()
- } else {
- x.SecretRef.CodecEncodeSelf(e)
- }
- }
- }
- if yyr18 || yy2arr18 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterSpec) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym23 := z.DecBinary()
- _ = yym23
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct24 := r.ContainerType()
- if yyct24 == codecSelferValueTypeMap1234 {
- yyl24 := r.ReadMapStart()
- if yyl24 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl24, d)
- }
- } else if yyct24 == codecSelferValueTypeArray1234 {
- yyl24 := r.ReadArrayStart()
- if yyl24 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl24, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys25Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys25Slc
- var yyhl25 bool = l >= 0
- for yyj25 := 0; ; yyj25++ {
- if yyhl25 {
- if yyj25 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys25Slc = r.DecodeBytes(yys25Slc, true, true)
- yys25 := string(yys25Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys25 {
- case "serverAddressByClientCIDRs":
- if r.TryDecodeAsNil() {
- x.ServerAddressByClientCIDRs = nil
- } else {
- yyv26 := &x.ServerAddressByClientCIDRs
- yym27 := z.DecBinary()
- _ = yym27
- if false {
- } else {
- h.decSliceServerAddressByClientCIDR((*[]ServerAddressByClientCIDR)(yyv26), d)
- }
- }
- case "secretRef":
- if r.TryDecodeAsNil() {
- if x.SecretRef != nil {
- x.SecretRef = nil
- }
- } else {
- if x.SecretRef == nil {
- x.SecretRef = new(pkg1_v1.LocalObjectReference)
- }
- x.SecretRef.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys25)
- } // end switch yys25
- } // end for yyj25
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj29 int
- var yyb29 bool
- var yyhl29 bool = l >= 0
- yyj29++
- if yyhl29 {
- yyb29 = yyj29 > l
- } else {
- yyb29 = r.CheckBreak()
- }
- if yyb29 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ServerAddressByClientCIDRs = nil
- } else {
- yyv30 := &x.ServerAddressByClientCIDRs
- yym31 := z.DecBinary()
- _ = yym31
- if false {
- } else {
- h.decSliceServerAddressByClientCIDR((*[]ServerAddressByClientCIDR)(yyv30), d)
- }
- }
- yyj29++
- if yyhl29 {
- yyb29 = yyj29 > l
- } else {
- yyb29 = r.CheckBreak()
- }
- if yyb29 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- if x.SecretRef != nil {
- x.SecretRef = nil
- }
- } else {
- if x.SecretRef == nil {
- x.SecretRef = new(pkg1_v1.LocalObjectReference)
- }
- x.SecretRef.CodecDecodeSelf(d)
- }
- for {
- yyj29++
- if yyhl29 {
- yyb29 = yyj29 > l
- } else {
- yyb29 = r.CheckBreak()
- }
- if yyb29 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj29-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x ClusterConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- yym33 := z.EncBinary()
- _ = yym33
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x))
- }
-}
-
-func (x *ClusterConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym34 := z.DecBinary()
- _ = yym34
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- *((*string)(x)) = r.DecodeString()
- }
-}
-
-func (x *ClusterCondition) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym35 := z.EncBinary()
- _ = yym35
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep36 := !z.EncBinary()
- yy2arr36 := z.EncBasicHandle().StructToArray
- var yyq36 [6]bool
- _, _, _ = yysep36, yyq36, yy2arr36
- const yyr36 bool = false
- yyq36[2] = true
- yyq36[3] = true
- yyq36[4] = x.Reason != ""
- yyq36[5] = x.Message != ""
- var yynn36 int
- if yyr36 || yy2arr36 {
- r.EncodeArrayStart(6)
- } else {
- yynn36 = 2
- for _, b := range yyq36 {
- if b {
- yynn36++
- }
- }
- r.EncodeMapStart(yynn36)
- yynn36 = 0
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- x.Type.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("type"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- x.Type.CodecEncodeSelf(e)
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yym39 := z.EncBinary()
- _ = yym39
- if false {
- } else if z.HasExtensions() && z.EncExt(x.Status) {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Status))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("status"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym40 := z.EncBinary()
- _ = yym40
- if false {
- } else if z.HasExtensions() && z.EncExt(x.Status) {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Status))
- }
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq36[2] {
- yy42 := &x.LastProbeTime
- yym43 := z.EncBinary()
- _ = yym43
- if false {
- } else if z.HasExtensions() && z.EncExt(yy42) {
- } else if yym43 {
- z.EncBinaryMarshal(yy42)
- } else if !yym43 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy42)
- } else {
- z.EncFallback(yy42)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq36[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy44 := &x.LastProbeTime
- yym45 := z.EncBinary()
- _ = yym45
- if false {
- } else if z.HasExtensions() && z.EncExt(yy44) {
- } else if yym45 {
- z.EncBinaryMarshal(yy44)
- } else if !yym45 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy44)
- } else {
- z.EncFallback(yy44)
- }
- }
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq36[3] {
- yy47 := &x.LastTransitionTime
- yym48 := z.EncBinary()
- _ = yym48
- if false {
- } else if z.HasExtensions() && z.EncExt(yy47) {
- } else if yym48 {
- z.EncBinaryMarshal(yy47)
- } else if !yym48 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy47)
- } else {
- z.EncFallback(yy47)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq36[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy49 := &x.LastTransitionTime
- yym50 := z.EncBinary()
- _ = yym50
- if false {
- } else if z.HasExtensions() && z.EncExt(yy49) {
- } else if yym50 {
- z.EncBinaryMarshal(yy49)
- } else if !yym50 && z.IsJSONHandle() {
- z.EncJSONMarshal(yy49)
- } else {
- z.EncFallback(yy49)
- }
- }
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq36[4] {
- yym52 := z.EncBinary()
- _ = yym52
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq36[4] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("reason"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym53 := z.EncBinary()
- _ = yym53
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
- }
- }
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq36[5] {
- yym55 := z.EncBinary()
- _ = yym55
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Message))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq36[5] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("message"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym56 := z.EncBinary()
- _ = yym56
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Message))
- }
- }
- }
- if yyr36 || yy2arr36 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterCondition) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym57 := z.DecBinary()
- _ = yym57
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct58 := r.ContainerType()
- if yyct58 == codecSelferValueTypeMap1234 {
- yyl58 := r.ReadMapStart()
- if yyl58 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl58, d)
- }
- } else if yyct58 == codecSelferValueTypeArray1234 {
- yyl58 := r.ReadArrayStart()
- if yyl58 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl58, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys59Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys59Slc
- var yyhl59 bool = l >= 0
- for yyj59 := 0; ; yyj59++ {
- if yyhl59 {
- if yyj59 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys59Slc = r.DecodeBytes(yys59Slc, true, true)
- yys59 := string(yys59Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys59 {
- case "type":
- if r.TryDecodeAsNil() {
- x.Type = ""
- } else {
- x.Type = ClusterConditionType(r.DecodeString())
- }
- case "status":
- if r.TryDecodeAsNil() {
- x.Status = ""
- } else {
- x.Status = pkg1_v1.ConditionStatus(r.DecodeString())
- }
- case "lastProbeTime":
- if r.TryDecodeAsNil() {
- x.LastProbeTime = pkg2_unversioned.Time{}
- } else {
- yyv62 := &x.LastProbeTime
- yym63 := z.DecBinary()
- _ = yym63
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv62) {
- } else if yym63 {
- z.DecBinaryUnmarshal(yyv62)
- } else if !yym63 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv62)
- } else {
- z.DecFallback(yyv62, false)
- }
- }
- case "lastTransitionTime":
- if r.TryDecodeAsNil() {
- x.LastTransitionTime = pkg2_unversioned.Time{}
- } else {
- yyv64 := &x.LastTransitionTime
- yym65 := z.DecBinary()
- _ = yym65
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv64) {
- } else if yym65 {
- z.DecBinaryUnmarshal(yyv64)
- } else if !yym65 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv64)
- } else {
- z.DecFallback(yyv64, false)
- }
- }
- case "reason":
- if r.TryDecodeAsNil() {
- x.Reason = ""
- } else {
- x.Reason = string(r.DecodeString())
- }
- case "message":
- if r.TryDecodeAsNil() {
- x.Message = ""
- } else {
- x.Message = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys59)
- } // end switch yys59
- } // end for yyj59
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj68 int
- var yyb68 bool
- var yyhl68 bool = l >= 0
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Type = ""
- } else {
- x.Type = ClusterConditionType(r.DecodeString())
- }
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Status = ""
- } else {
- x.Status = pkg1_v1.ConditionStatus(r.DecodeString())
- }
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LastProbeTime = pkg2_unversioned.Time{}
- } else {
- yyv71 := &x.LastProbeTime
- yym72 := z.DecBinary()
- _ = yym72
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv71) {
- } else if yym72 {
- z.DecBinaryUnmarshal(yyv71)
- } else if !yym72 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv71)
- } else {
- z.DecFallback(yyv71, false)
- }
- }
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.LastTransitionTime = pkg2_unversioned.Time{}
- } else {
- yyv73 := &x.LastTransitionTime
- yym74 := z.DecBinary()
- _ = yym74
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv73) {
- } else if yym74 {
- z.DecBinaryUnmarshal(yyv73)
- } else if !yym74 && z.IsJSONHandle() {
- z.DecJSONUnmarshal(yyv73)
- } else {
- z.DecFallback(yyv73, false)
- }
- }
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Reason = ""
- } else {
- x.Reason = string(r.DecodeString())
- }
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Message = ""
- } else {
- x.Message = string(r.DecodeString())
- }
- for {
- yyj68++
- if yyhl68 {
- yyb68 = yyj68 > l
- } else {
- yyb68 = r.CheckBreak()
- }
- if yyb68 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj68-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym77 := z.EncBinary()
- _ = yym77
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep78 := !z.EncBinary()
- yy2arr78 := z.EncBasicHandle().StructToArray
- var yyq78 [3]bool
- _, _, _ = yysep78, yyq78, yy2arr78
- const yyr78 bool = false
- yyq78[0] = len(x.Conditions) != 0
- yyq78[1] = len(x.Zones) != 0
- yyq78[2] = x.Region != ""
- var yynn78 int
- if yyr78 || yy2arr78 {
- r.EncodeArrayStart(3)
- } else {
- yynn78 = 0
- for _, b := range yyq78 {
- if b {
- yynn78++
- }
- }
- r.EncodeMapStart(yynn78)
- yynn78 = 0
- }
- if yyr78 || yy2arr78 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq78[0] {
- if x.Conditions == nil {
- r.EncodeNil()
- } else {
- yym80 := z.EncBinary()
- _ = yym80
- if false {
- } else {
- h.encSliceClusterCondition(([]ClusterCondition)(x.Conditions), e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq78[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("conditions"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Conditions == nil {
- r.EncodeNil()
- } else {
- yym81 := z.EncBinary()
- _ = yym81
- if false {
- } else {
- h.encSliceClusterCondition(([]ClusterCondition)(x.Conditions), e)
- }
- }
- }
- }
- if yyr78 || yy2arr78 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq78[1] {
- if x.Zones == nil {
- r.EncodeNil()
- } else {
- yym83 := z.EncBinary()
- _ = yym83
- if false {
- } else {
- z.F.EncSliceStringV(x.Zones, false, e)
- }
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq78[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("zones"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Zones == nil {
- r.EncodeNil()
- } else {
- yym84 := z.EncBinary()
- _ = yym84
- if false {
- } else {
- z.F.EncSliceStringV(x.Zones, false, e)
- }
- }
- }
- }
- if yyr78 || yy2arr78 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq78[2] {
- yym86 := z.EncBinary()
- _ = yym86
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Region))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq78[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("region"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym87 := z.EncBinary()
- _ = yym87
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Region))
- }
- }
- }
- if yyr78 || yy2arr78 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterStatus) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym88 := z.DecBinary()
- _ = yym88
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct89 := r.ContainerType()
- if yyct89 == codecSelferValueTypeMap1234 {
- yyl89 := r.ReadMapStart()
- if yyl89 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl89, d)
- }
- } else if yyct89 == codecSelferValueTypeArray1234 {
- yyl89 := r.ReadArrayStart()
- if yyl89 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl89, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys90Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys90Slc
- var yyhl90 bool = l >= 0
- for yyj90 := 0; ; yyj90++ {
- if yyhl90 {
- if yyj90 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys90Slc = r.DecodeBytes(yys90Slc, true, true)
- yys90 := string(yys90Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys90 {
- case "conditions":
- if r.TryDecodeAsNil() {
- x.Conditions = nil
- } else {
- yyv91 := &x.Conditions
- yym92 := z.DecBinary()
- _ = yym92
- if false {
- } else {
- h.decSliceClusterCondition((*[]ClusterCondition)(yyv91), d)
- }
- }
- case "zones":
- if r.TryDecodeAsNil() {
- x.Zones = nil
- } else {
- yyv93 := &x.Zones
- yym94 := z.DecBinary()
- _ = yym94
- if false {
- } else {
- z.F.DecSliceStringX(yyv93, false, d)
- }
- }
- case "region":
- if r.TryDecodeAsNil() {
- x.Region = ""
- } else {
- x.Region = string(r.DecodeString())
- }
- default:
- z.DecStructFieldNotFound(-1, yys90)
- } // end switch yys90
- } // end for yyj90
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj96 int
- var yyb96 bool
- var yyhl96 bool = l >= 0
- yyj96++
- if yyhl96 {
- yyb96 = yyj96 > l
- } else {
- yyb96 = r.CheckBreak()
- }
- if yyb96 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Conditions = nil
- } else {
- yyv97 := &x.Conditions
- yym98 := z.DecBinary()
- _ = yym98
- if false {
- } else {
- h.decSliceClusterCondition((*[]ClusterCondition)(yyv97), d)
- }
- }
- yyj96++
- if yyhl96 {
- yyb96 = yyj96 > l
- } else {
- yyb96 = r.CheckBreak()
- }
- if yyb96 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Zones = nil
- } else {
- yyv99 := &x.Zones
- yym100 := z.DecBinary()
- _ = yym100
- if false {
- } else {
- z.F.DecSliceStringX(yyv99, false, d)
- }
- }
- yyj96++
- if yyhl96 {
- yyb96 = yyj96 > l
- } else {
- yyb96 = r.CheckBreak()
- }
- if yyb96 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Region = ""
- } else {
- x.Region = string(r.DecodeString())
- }
- for {
- yyj96++
- if yyhl96 {
- yyb96 = yyj96 > l
- } else {
- yyb96 = r.CheckBreak()
- }
- if yyb96 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj96-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym102 := z.EncBinary()
- _ = yym102
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep103 := !z.EncBinary()
- yy2arr103 := z.EncBasicHandle().StructToArray
- var yyq103 [5]bool
- _, _, _ = yysep103, yyq103, yy2arr103
- const yyr103 bool = false
- yyq103[0] = x.Kind != ""
- yyq103[1] = x.APIVersion != ""
- yyq103[2] = true
- yyq103[3] = true
- yyq103[4] = true
- var yynn103 int
- if yyr103 || yy2arr103 {
- r.EncodeArrayStart(5)
- } else {
- yynn103 = 0
- for _, b := range yyq103 {
- if b {
- yynn103++
- }
- }
- r.EncodeMapStart(yynn103)
- yynn103 = 0
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq103[0] {
- yym105 := z.EncBinary()
- _ = yym105
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq103[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym106 := z.EncBinary()
- _ = yym106
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq103[1] {
- yym108 := z.EncBinary()
- _ = yym108
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq103[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym109 := z.EncBinary()
- _ = yym109
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq103[2] {
- yy111 := &x.ObjectMeta
- yy111.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq103[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy112 := &x.ObjectMeta
- yy112.CodecEncodeSelf(e)
- }
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq103[3] {
- yy114 := &x.Spec
- yy114.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq103[3] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("spec"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy115 := &x.Spec
- yy115.CodecEncodeSelf(e)
- }
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq103[4] {
- yy117 := &x.Status
- yy117.CodecEncodeSelf(e)
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq103[4] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("status"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy118 := &x.Status
- yy118.CodecEncodeSelf(e)
- }
- }
- if yyr103 || yy2arr103 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *Cluster) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym119 := z.DecBinary()
- _ = yym119
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct120 := r.ContainerType()
- if yyct120 == codecSelferValueTypeMap1234 {
- yyl120 := r.ReadMapStart()
- if yyl120 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl120, d)
- }
- } else if yyct120 == codecSelferValueTypeArray1234 {
- yyl120 := r.ReadArrayStart()
- if yyl120 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl120, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *Cluster) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys121Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys121Slc
- var yyhl121 bool = l >= 0
- for yyj121 := 0; ; yyj121++ {
- if yyhl121 {
- if yyj121 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys121Slc = r.DecodeBytes(yys121Slc, true, true)
- yys121 := string(yys121Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys121 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg1_v1.ObjectMeta{}
- } else {
- yyv124 := &x.ObjectMeta
- yyv124.CodecDecodeSelf(d)
- }
- case "spec":
- if r.TryDecodeAsNil() {
- x.Spec = ClusterSpec{}
- } else {
- yyv125 := &x.Spec
- yyv125.CodecDecodeSelf(d)
- }
- case "status":
- if r.TryDecodeAsNil() {
- x.Status = ClusterStatus{}
- } else {
- yyv126 := &x.Status
- yyv126.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys121)
- } // end switch yys121
- } // end for yyj121
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj127 int
- var yyb127 bool
- var yyhl127 bool = l >= 0
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ObjectMeta = pkg1_v1.ObjectMeta{}
- } else {
- yyv130 := &x.ObjectMeta
- yyv130.CodecDecodeSelf(d)
- }
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Spec = ClusterSpec{}
- } else {
- yyv131 := &x.Spec
- yyv131.CodecDecodeSelf(d)
- }
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Status = ClusterStatus{}
- } else {
- yyv132 := &x.Status
- yyv132.CodecDecodeSelf(d)
- }
- for {
- yyj127++
- if yyhl127 {
- yyb127 = yyj127 > l
- } else {
- yyb127 = r.CheckBreak()
- }
- if yyb127 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj127-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x *ClusterList) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym133 := z.EncBinary()
- _ = yym133
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep134 := !z.EncBinary()
- yy2arr134 := z.EncBasicHandle().StructToArray
- var yyq134 [4]bool
- _, _, _ = yysep134, yyq134, yy2arr134
- const yyr134 bool = false
- yyq134[0] = x.Kind != ""
- yyq134[1] = x.APIVersion != ""
- yyq134[2] = true
- var yynn134 int
- if yyr134 || yy2arr134 {
- r.EncodeArrayStart(4)
- } else {
- yynn134 = 1
- for _, b := range yyq134 {
- if b {
- yynn134++
- }
- }
- r.EncodeMapStart(yynn134)
- yynn134 = 0
- }
- if yyr134 || yy2arr134 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq134[0] {
- yym136 := z.EncBinary()
- _ = yym136
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq134[0] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("kind"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym137 := z.EncBinary()
- _ = yym137
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
- }
- }
- }
- if yyr134 || yy2arr134 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq134[1] {
- yym139 := z.EncBinary()
- _ = yym139
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- } else {
- r.EncodeString(codecSelferC_UTF81234, "")
- }
- } else {
- if yyq134[1] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yym140 := z.EncBinary()
- _ = yym140
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
- }
- }
- }
- if yyr134 || yy2arr134 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if yyq134[2] {
- yy142 := &x.ListMeta
- yym143 := z.EncBinary()
- _ = yym143
- if false {
- } else if z.HasExtensions() && z.EncExt(yy142) {
- } else {
- z.EncFallback(yy142)
- }
- } else {
- r.EncodeNil()
- }
- } else {
- if yyq134[2] {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- yy144 := &x.ListMeta
- yym145 := z.EncBinary()
- _ = yym145
- if false {
- } else if z.HasExtensions() && z.EncExt(yy144) {
- } else {
- z.EncFallback(yy144)
- }
- }
- }
- if yyr134 || yy2arr134 {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym147 := z.EncBinary()
- _ = yym147
- if false {
- } else {
- h.encSliceCluster(([]Cluster)(x.Items), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey1234)
- r.EncodeString(codecSelferC_UTF81234, string("items"))
- z.EncSendContainerState(codecSelfer_containerMapValue1234)
- if x.Items == nil {
- r.EncodeNil()
- } else {
- yym148 := z.EncBinary()
- _ = yym148
- if false {
- } else {
- h.encSliceCluster(([]Cluster)(x.Items), e)
- }
- }
- }
- if yyr134 || yy2arr134 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd1234)
- }
- }
- }
-}
-
-func (x *ClusterList) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym149 := z.DecBinary()
- _ = yym149
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct150 := r.ContainerType()
- if yyct150 == codecSelferValueTypeMap1234 {
- yyl150 := r.ReadMapStart()
- if yyl150 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
- } else {
- x.codecDecodeSelfFromMap(yyl150, d)
- }
- } else if yyct150 == codecSelferValueTypeArray1234 {
- yyl150 := r.ReadArrayStart()
- if yyl150 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- } else {
- x.codecDecodeSelfFromArray(yyl150, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
- }
- }
-}
-
-func (x *ClusterList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys151Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys151Slc
- var yyhl151 bool = l >= 0
- for yyj151 := 0; ; yyj151++ {
- if yyhl151 {
- if yyj151 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey1234)
- yys151Slc = r.DecodeBytes(yys151Slc, true, true)
- yys151 := string(yys151Slc)
- z.DecSendContainerState(codecSelfer_containerMapValue1234)
- switch yys151 {
- case "kind":
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- case "apiVersion":
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- case "metadata":
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv154 := &x.ListMeta
- yym155 := z.DecBinary()
- _ = yym155
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv154) {
- } else {
- z.DecFallback(yyv154, false)
- }
- }
- case "items":
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv156 := &x.Items
- yym157 := z.DecBinary()
- _ = yym157
- if false {
- } else {
- h.decSliceCluster((*[]Cluster)(yyv156), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys151)
- } // end switch yys151
- } // end for yyj151
- z.DecSendContainerState(codecSelfer_containerMapEnd1234)
-}
-
-func (x *ClusterList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj158 int
- var yyb158 bool
- var yyhl158 bool = l >= 0
- yyj158++
- if yyhl158 {
- yyb158 = yyj158 > l
- } else {
- yyb158 = r.CheckBreak()
- }
- if yyb158 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Kind = ""
- } else {
- x.Kind = string(r.DecodeString())
- }
- yyj158++
- if yyhl158 {
- yyb158 = yyj158 > l
- } else {
- yyb158 = r.CheckBreak()
- }
- if yyb158 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.APIVersion = ""
- } else {
- x.APIVersion = string(r.DecodeString())
- }
- yyj158++
- if yyhl158 {
- yyb158 = yyj158 > l
- } else {
- yyb158 = r.CheckBreak()
- }
- if yyb158 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.ListMeta = pkg2_unversioned.ListMeta{}
- } else {
- yyv161 := &x.ListMeta
- yym162 := z.DecBinary()
- _ = yym162
- if false {
- } else if z.HasExtensions() && z.DecExt(yyv161) {
- } else {
- z.DecFallback(yyv161, false)
- }
- }
- yyj158++
- if yyhl158 {
- yyb158 = yyj158 > l
- } else {
- yyb158 = r.CheckBreak()
- }
- if yyb158 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- if r.TryDecodeAsNil() {
- x.Items = nil
- } else {
- yyv163 := &x.Items
- yym164 := z.DecBinary()
- _ = yym164
- if false {
- } else {
- h.decSliceCluster((*[]Cluster)(yyv163), d)
- }
- }
- for {
- yyj158++
- if yyhl158 {
- yyb158 = yyj158 > l
- } else {
- yyb158 = r.CheckBreak()
- }
- if yyb158 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem1234)
- z.DecStructFieldNotFound(yyj158-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) encSliceServerAddressByClientCIDR(v []ServerAddressByClientCIDR, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv165 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy166 := &yyv165
- yy166.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceServerAddressByClientCIDR(v *[]ServerAddressByClientCIDR, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv167 := *v
- yyh167, yyl167 := z.DecSliceHelperStart()
- var yyc167 bool
- if yyl167 == 0 {
- if yyv167 == nil {
- yyv167 = []ServerAddressByClientCIDR{}
- yyc167 = true
- } else if len(yyv167) != 0 {
- yyv167 = yyv167[:0]
- yyc167 = true
- }
- } else if yyl167 > 0 {
- var yyrr167, yyrl167 int
- var yyrt167 bool
- if yyl167 > cap(yyv167) {
-
- yyrg167 := len(yyv167) > 0
- yyv2167 := yyv167
- yyrl167, yyrt167 = z.DecInferLen(yyl167, z.DecBasicHandle().MaxInitLen, 32)
- if yyrt167 {
- if yyrl167 <= cap(yyv167) {
- yyv167 = yyv167[:yyrl167]
- } else {
- yyv167 = make([]ServerAddressByClientCIDR, yyrl167)
- }
- } else {
- yyv167 = make([]ServerAddressByClientCIDR, yyrl167)
- }
- yyc167 = true
- yyrr167 = len(yyv167)
- if yyrg167 {
- copy(yyv167, yyv2167)
- }
- } else if yyl167 != len(yyv167) {
- yyv167 = yyv167[:yyl167]
- yyc167 = true
- }
- yyj167 := 0
- for ; yyj167 < yyrr167; yyj167++ {
- yyh167.ElemContainerState(yyj167)
- if r.TryDecodeAsNil() {
- yyv167[yyj167] = ServerAddressByClientCIDR{}
- } else {
- yyv168 := &yyv167[yyj167]
- yyv168.CodecDecodeSelf(d)
- }
-
- }
- if yyrt167 {
- for ; yyj167 < yyl167; yyj167++ {
- yyv167 = append(yyv167, ServerAddressByClientCIDR{})
- yyh167.ElemContainerState(yyj167)
- if r.TryDecodeAsNil() {
- yyv167[yyj167] = ServerAddressByClientCIDR{}
- } else {
- yyv169 := &yyv167[yyj167]
- yyv169.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj167 := 0
- for ; !r.CheckBreak(); yyj167++ {
-
- if yyj167 >= len(yyv167) {
- yyv167 = append(yyv167, ServerAddressByClientCIDR{}) // var yyz167 ServerAddressByClientCIDR
- yyc167 = true
- }
- yyh167.ElemContainerState(yyj167)
- if yyj167 < len(yyv167) {
- if r.TryDecodeAsNil() {
- yyv167[yyj167] = ServerAddressByClientCIDR{}
- } else {
- yyv170 := &yyv167[yyj167]
- yyv170.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj167 < len(yyv167) {
- yyv167 = yyv167[:yyj167]
- yyc167 = true
- } else if yyj167 == 0 && yyv167 == nil {
- yyv167 = []ServerAddressByClientCIDR{}
- yyc167 = true
- }
- }
- yyh167.End()
- if yyc167 {
- *v = yyv167
- }
-}
-
-func (x codecSelfer1234) encSliceClusterCondition(v []ClusterCondition, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv171 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy172 := &yyv171
- yy172.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceClusterCondition(v *[]ClusterCondition, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv173 := *v
- yyh173, yyl173 := z.DecSliceHelperStart()
- var yyc173 bool
- if yyl173 == 0 {
- if yyv173 == nil {
- yyv173 = []ClusterCondition{}
- yyc173 = true
- } else if len(yyv173) != 0 {
- yyv173 = yyv173[:0]
- yyc173 = true
- }
- } else if yyl173 > 0 {
- var yyrr173, yyrl173 int
- var yyrt173 bool
- if yyl173 > cap(yyv173) {
-
- yyrg173 := len(yyv173) > 0
- yyv2173 := yyv173
- yyrl173, yyrt173 = z.DecInferLen(yyl173, z.DecBasicHandle().MaxInitLen, 112)
- if yyrt173 {
- if yyrl173 <= cap(yyv173) {
- yyv173 = yyv173[:yyrl173]
- } else {
- yyv173 = make([]ClusterCondition, yyrl173)
- }
- } else {
- yyv173 = make([]ClusterCondition, yyrl173)
- }
- yyc173 = true
- yyrr173 = len(yyv173)
- if yyrg173 {
- copy(yyv173, yyv2173)
- }
- } else if yyl173 != len(yyv173) {
- yyv173 = yyv173[:yyl173]
- yyc173 = true
- }
- yyj173 := 0
- for ; yyj173 < yyrr173; yyj173++ {
- yyh173.ElemContainerState(yyj173)
- if r.TryDecodeAsNil() {
- yyv173[yyj173] = ClusterCondition{}
- } else {
- yyv174 := &yyv173[yyj173]
- yyv174.CodecDecodeSelf(d)
- }
-
- }
- if yyrt173 {
- for ; yyj173 < yyl173; yyj173++ {
- yyv173 = append(yyv173, ClusterCondition{})
- yyh173.ElemContainerState(yyj173)
- if r.TryDecodeAsNil() {
- yyv173[yyj173] = ClusterCondition{}
- } else {
- yyv175 := &yyv173[yyj173]
- yyv175.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj173 := 0
- for ; !r.CheckBreak(); yyj173++ {
-
- if yyj173 >= len(yyv173) {
- yyv173 = append(yyv173, ClusterCondition{}) // var yyz173 ClusterCondition
- yyc173 = true
- }
- yyh173.ElemContainerState(yyj173)
- if yyj173 < len(yyv173) {
- if r.TryDecodeAsNil() {
- yyv173[yyj173] = ClusterCondition{}
- } else {
- yyv176 := &yyv173[yyj173]
- yyv176.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj173 < len(yyv173) {
- yyv173 = yyv173[:yyj173]
- yyc173 = true
- } else if yyj173 == 0 && yyv173 == nil {
- yyv173 = []ClusterCondition{}
- yyc173 = true
- }
- }
- yyh173.End()
- if yyc173 {
- *v = yyv173
- }
-}
-
-func (x codecSelfer1234) encSliceCluster(v []Cluster, e *codec1978.Encoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv177 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem1234)
- yy178 := &yyv177
- yy178.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
-}
-
-func (x codecSelfer1234) decSliceCluster(v *[]Cluster, d *codec1978.Decoder) {
- var h codecSelfer1234
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv179 := *v
- yyh179, yyl179 := z.DecSliceHelperStart()
- var yyc179 bool
- if yyl179 == 0 {
- if yyv179 == nil {
- yyv179 = []Cluster{}
- yyc179 = true
- } else if len(yyv179) != 0 {
- yyv179 = yyv179[:0]
- yyc179 = true
- }
- } else if yyl179 > 0 {
- var yyrr179, yyrl179 int
- var yyrt179 bool
- if yyl179 > cap(yyv179) {
-
- yyrg179 := len(yyv179) > 0
- yyv2179 := yyv179
- yyrl179, yyrt179 = z.DecInferLen(yyl179, z.DecBasicHandle().MaxInitLen, 352)
- if yyrt179 {
- if yyrl179 <= cap(yyv179) {
- yyv179 = yyv179[:yyrl179]
- } else {
- yyv179 = make([]Cluster, yyrl179)
- }
- } else {
- yyv179 = make([]Cluster, yyrl179)
- }
- yyc179 = true
- yyrr179 = len(yyv179)
- if yyrg179 {
- copy(yyv179, yyv2179)
- }
- } else if yyl179 != len(yyv179) {
- yyv179 = yyv179[:yyl179]
- yyc179 = true
- }
- yyj179 := 0
- for ; yyj179 < yyrr179; yyj179++ {
- yyh179.ElemContainerState(yyj179)
- if r.TryDecodeAsNil() {
- yyv179[yyj179] = Cluster{}
- } else {
- yyv180 := &yyv179[yyj179]
- yyv180.CodecDecodeSelf(d)
- }
-
- }
- if yyrt179 {
- for ; yyj179 < yyl179; yyj179++ {
- yyv179 = append(yyv179, Cluster{})
- yyh179.ElemContainerState(yyj179)
- if r.TryDecodeAsNil() {
- yyv179[yyj179] = Cluster{}
- } else {
- yyv181 := &yyv179[yyj179]
- yyv181.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj179 := 0
- for ; !r.CheckBreak(); yyj179++ {
-
- if yyj179 >= len(yyv179) {
- yyv179 = append(yyv179, Cluster{}) // var yyz179 Cluster
- yyc179 = true
- }
- yyh179.ElemContainerState(yyj179)
- if yyj179 < len(yyv179) {
- if r.TryDecodeAsNil() {
- yyv179[yyj179] = Cluster{}
- } else {
- yyv182 := &yyv179[yyj179]
- yyv182.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj179 < len(yyv179) {
- yyv179 = yyv179[:yyj179]
- yyc179 = true
- } else if yyj179 == 0 && yyv179 == nil {
- yyv179 = []Cluster{}
- yyc179 = true
- }
- }
- yyh179.End()
- if yyc179 {
- *v = yyv179
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types.go
deleted file mode 100644
index f0c53dd9d..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types.go
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-Copyright 2016 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 v1beta1
-
-import (
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
-)
-
-// ServerAddressByClientCIDR helps the client to 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 the server address that they should use.
- ClientCIDR string `json:"clientCIDR" 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.
- ServerAddress string `json:"serverAddress" protobuf:"bytes,2,opt,name=serverAddress"`
-}
-
-// ClusterSpec describes the attributes of a kubernetes cluster.
-type ClusterSpec struct {
- // A map of client CIDR to server address.
- // 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.
- ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" patchStrategy:"merge" patchMergeKey:"clientCIDR" protobuf:"bytes,1,rep,name=serverAddressByClientCIDRs"`
- // Name of the secret containing kubeconfig to access this cluster.
- // The secret is read from the kubernetes cluster that is hosting federation control plane.
- // Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key "kubeconfig".
- // This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets.
- // This can be left empty if the cluster allows insecure access.
- SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,2,opt,name=secretRef"`
-}
-
-type ClusterConditionType string
-
-// These are valid conditions of a cluster.
-const (
- // ClusterReady means the cluster is ready to accept workloads.
- ClusterReady ClusterConditionType = "Ready"
- // ClusterOffline means the cluster is temporarily down or not reachable
- ClusterOffline ClusterConditionType = "Offline"
-)
-
-// ClusterCondition describes current state of a cluster.
-type ClusterCondition struct {
- // Type of cluster condition, Complete or Failed.
- Type ClusterConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ClusterConditionType"`
- // Status of the condition, one of True, False, Unknown.
- Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
- // Last time the condition was checked.
- LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
- // Last time the condition transit from one status to another.
- LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
- // (brief) reason for the condition's last transition.
- Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
- // Human readable message indicating details about last transition.
- Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
-}
-
-// ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.
-type ClusterStatus struct {
- // Conditions is an array of current cluster conditions.
- Conditions []ClusterCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
- // Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
- // These will always be in the same region.
- Zones []string `json:"zones,omitempty" protobuf:"bytes,5,rep,name=zones"`
- // Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
- Region string `json:"region,omitempty" protobuf:"bytes,6,opt,name=region"`
-}
-
-// +genclient=true
-// +nonNamespaced=true
-
-// Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.
-type Cluster struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard object's metadata.
- // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
- v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
-
- // Spec defines the behavior of the Cluster.
- Spec ClusterSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
- // Status describes the current status of a Cluster
- Status ClusterStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
-}
-
-// A list of all the kubernetes clusters registered to the federation
-type ClusterList struct {
- unversioned.TypeMeta `json:",inline"`
- // Standard list metadata.
- // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
- unversioned.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/client-go/1.5/pkg/federation/apis/federation/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types_swagger_doc_generated.go
deleted file mode 100644
index 55985fcb8..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/types_swagger_doc_generated.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-Copyright 2016 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 v1beta1
-
-// This file contains a collection of methods that can be used from go-restful to
-// generate Swagger API documentation for its models. Please read this PR for more
-// information on the implementation: https://github.com/emicklei/go-restful/pull/215
-//
-// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
-// they are on one line! For multiple line or blocks that you want to ignore use ---.
-// Any context after a --- is ignored.
-//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
-
-// AUTO-GENERATED FUNCTIONS START HERE
-var map_Cluster = map[string]string{
- "": "Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.",
- "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
- "spec": "Spec defines the behavior of the Cluster.",
- "status": "Status describes the current status of a Cluster",
-}
-
-func (Cluster) SwaggerDoc() map[string]string {
- return map_Cluster
-}
-
-var map_ClusterCondition = map[string]string{
- "": "ClusterCondition describes current state of a cluster.",
- "type": "Type of cluster condition, Complete or Failed.",
- "status": "Status of the condition, one of True, False, Unknown.",
- "lastProbeTime": "Last time the condition was checked.",
- "lastTransitionTime": "Last time the condition transit from one status to another.",
- "reason": "(brief) reason for the condition's last transition.",
- "message": "Human readable message indicating details about last transition.",
-}
-
-func (ClusterCondition) SwaggerDoc() map[string]string {
- return map_ClusterCondition
-}
-
-var map_ClusterList = map[string]string{
- "": "A list of all the kubernetes clusters registered to the federation",
- "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
- "items": "List of Cluster objects.",
-}
-
-func (ClusterList) SwaggerDoc() map[string]string {
- return map_ClusterList
-}
-
-var map_ClusterSpec = map[string]string{
- "": "ClusterSpec describes the attributes of a kubernetes cluster.",
- "serverAddressByClientCIDRs": "A map of client CIDR to server address. 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.",
- "secretRef": "Name of the secret containing kubeconfig to access this cluster. The secret is read from the kubernetes cluster that is hosting federation control plane. Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key \"kubeconfig\". This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets. This can be left empty if the cluster allows insecure access.",
-}
-
-func (ClusterSpec) SwaggerDoc() map[string]string {
- return map_ClusterSpec
-}
-
-var map_ClusterStatus = map[string]string{
- "": "ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.",
- "conditions": "Conditions is an array of current cluster conditions.",
- "zones": "Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. These will always be in the same region.",
- "region": "Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.",
-}
-
-func (ClusterStatus) SwaggerDoc() map[string]string {
- return map_ClusterStatus
-}
-
-var map_ServerAddressByClientCIDR = map[string]string{
- "": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.",
- "clientCIDR": "The CIDR with which clients can match their IP to figure out the server address that they should use.",
- "serverAddress": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.",
-}
-
-func (ServerAddressByClientCIDR) SwaggerDoc() map[string]string {
- return map_ServerAddressByClientCIDR
-}
-
-// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/zz_generated.conversion.go
deleted file mode 100644
index e832b05c3..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/zz_generated.conversion.go
+++ /dev/null
@@ -1,300 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 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 conversion-gen. Do not edit it manually!
-
-package v1beta1
-
-import (
- api "k8s.io/client-go/1.5/pkg/api"
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- conversion "k8s.io/client-go/1.5/pkg/conversion"
- federation "k8s.io/client-go/1.5/pkg/federation/apis/federation"
- runtime "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-func init() {
- SchemeBuilder.Register(RegisterConversions)
-}
-
-// RegisterConversions adds conversion functions to the given scheme.
-// Public to allow building arbitrary schemes.
-func RegisterConversions(scheme *runtime.Scheme) error {
- return scheme.AddGeneratedConversionFuncs(
- Convert_v1beta1_Cluster_To_federation_Cluster,
- Convert_federation_Cluster_To_v1beta1_Cluster,
- Convert_v1beta1_ClusterCondition_To_federation_ClusterCondition,
- Convert_federation_ClusterCondition_To_v1beta1_ClusterCondition,
- Convert_v1beta1_ClusterList_To_federation_ClusterList,
- Convert_federation_ClusterList_To_v1beta1_ClusterList,
- Convert_v1beta1_ClusterSpec_To_federation_ClusterSpec,
- Convert_federation_ClusterSpec_To_v1beta1_ClusterSpec,
- Convert_v1beta1_ClusterStatus_To_federation_ClusterStatus,
- Convert_federation_ClusterStatus_To_v1beta1_ClusterStatus,
- Convert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR,
- Convert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR,
- )
-}
-
-func autoConvert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if err := Convert_v1beta1_ClusterSpec_To_federation_ClusterSpec(&in.Spec, &out.Spec, s); err != nil {
- return err
- }
- if err := Convert_v1beta1_ClusterStatus_To_federation_ClusterStatus(&in.Status, &out.Status, s); err != nil {
- return err
- }
- return nil
-}
-
-func Convert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error {
- return autoConvert_v1beta1_Cluster_To_federation_Cluster(in, out, s)
-}
-
-func autoConvert_federation_Cluster_To_v1beta1_Cluster(in *federation.Cluster, out *Cluster, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
- return err
- }
- if err := Convert_federation_ClusterSpec_To_v1beta1_ClusterSpec(&in.Spec, &out.Spec, s); err != nil {
- return err
- }
- if err := Convert_federation_ClusterStatus_To_v1beta1_ClusterStatus(&in.Status, &out.Status, s); err != nil {
- return err
- }
- return nil
-}
-
-func Convert_federation_Cluster_To_v1beta1_Cluster(in *federation.Cluster, out *Cluster, s conversion.Scope) error {
- return autoConvert_federation_Cluster_To_v1beta1_Cluster(in, out, s)
-}
-
-func autoConvert_v1beta1_ClusterCondition_To_federation_ClusterCondition(in *ClusterCondition, out *federation.ClusterCondition, s conversion.Scope) error {
- out.Type = federation.ClusterConditionType(in.Type)
- out.Status = api.ConditionStatus(in.Status)
- if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
- return err
- }
- out.Reason = in.Reason
- out.Message = in.Message
- return nil
-}
-
-func Convert_v1beta1_ClusterCondition_To_federation_ClusterCondition(in *ClusterCondition, out *federation.ClusterCondition, s conversion.Scope) error {
- return autoConvert_v1beta1_ClusterCondition_To_federation_ClusterCondition(in, out, s)
-}
-
-func autoConvert_federation_ClusterCondition_To_v1beta1_ClusterCondition(in *federation.ClusterCondition, out *ClusterCondition, s conversion.Scope) error {
- out.Type = ClusterConditionType(in.Type)
- out.Status = v1.ConditionStatus(in.Status)
- if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil {
- return err
- }
- out.Reason = in.Reason
- out.Message = in.Message
- return nil
-}
-
-func Convert_federation_ClusterCondition_To_v1beta1_ClusterCondition(in *federation.ClusterCondition, out *ClusterCondition, s conversion.Scope) error {
- return autoConvert_federation_ClusterCondition_To_v1beta1_ClusterCondition(in, out, s)
-}
-
-func autoConvert_v1beta1_ClusterList_To_federation_ClusterList(in *ClusterList, out *federation.ClusterList, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
- return err
- }
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]federation.Cluster, len(*in))
- for i := range *in {
- if err := Convert_v1beta1_Cluster_To_federation_Cluster(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func Convert_v1beta1_ClusterList_To_federation_ClusterList(in *ClusterList, out *federation.ClusterList, s conversion.Scope) error {
- return autoConvert_v1beta1_ClusterList_To_federation_ClusterList(in, out, s)
-}
-
-func autoConvert_federation_ClusterList_To_v1beta1_ClusterList(in *federation.ClusterList, out *ClusterList, s conversion.Scope) error {
- if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
- return err
- }
- if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
- return err
- }
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Cluster, len(*in))
- for i := range *in {
- if err := Convert_federation_Cluster_To_v1beta1_Cluster(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
-}
-
-func Convert_federation_ClusterList_To_v1beta1_ClusterList(in *federation.ClusterList, out *ClusterList, s conversion.Scope) error {
- return autoConvert_federation_ClusterList_To_v1beta1_ClusterList(in, out, s)
-}
-
-func autoConvert_v1beta1_ClusterSpec_To_federation_ClusterSpec(in *ClusterSpec, out *federation.ClusterSpec, s conversion.Scope) error {
- if in.ServerAddressByClientCIDRs != nil {
- in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
- *out = make([]federation.ServerAddressByClientCIDR, len(*in))
- for i := range *in {
- if err := Convert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.ServerAddressByClientCIDRs = nil
- }
- if in.SecretRef != nil {
- in, out := &in.SecretRef, &out.SecretRef
- *out = new(api.LocalObjectReference)
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(*in, *out, 0); err != nil {
- return err
- }
- } else {
- out.SecretRef = nil
- }
- return nil
-}
-
-func Convert_v1beta1_ClusterSpec_To_federation_ClusterSpec(in *ClusterSpec, out *federation.ClusterSpec, s conversion.Scope) error {
- return autoConvert_v1beta1_ClusterSpec_To_federation_ClusterSpec(in, out, s)
-}
-
-func autoConvert_federation_ClusterSpec_To_v1beta1_ClusterSpec(in *federation.ClusterSpec, out *ClusterSpec, s conversion.Scope) error {
- if in.ServerAddressByClientCIDRs != nil {
- in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
- *out = make([]ServerAddressByClientCIDR, len(*in))
- for i := range *in {
- if err := Convert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.ServerAddressByClientCIDRs = nil
- }
- if in.SecretRef != nil {
- in, out := &in.SecretRef, &out.SecretRef
- *out = new(v1.LocalObjectReference)
- // TODO: Inefficient conversion - can we improve it?
- if err := s.Convert(*in, *out, 0); err != nil {
- return err
- }
- } else {
- out.SecretRef = nil
- }
- return nil
-}
-
-func Convert_federation_ClusterSpec_To_v1beta1_ClusterSpec(in *federation.ClusterSpec, out *ClusterSpec, s conversion.Scope) error {
- return autoConvert_federation_ClusterSpec_To_v1beta1_ClusterSpec(in, out, s)
-}
-
-func autoConvert_v1beta1_ClusterStatus_To_federation_ClusterStatus(in *ClusterStatus, out *federation.ClusterStatus, s conversion.Scope) error {
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]federation.ClusterCondition, len(*in))
- for i := range *in {
- if err := Convert_v1beta1_ClusterCondition_To_federation_ClusterCondition(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Conditions = nil
- }
- out.Zones = in.Zones
- out.Region = in.Region
- return nil
-}
-
-func Convert_v1beta1_ClusterStatus_To_federation_ClusterStatus(in *ClusterStatus, out *federation.ClusterStatus, s conversion.Scope) error {
- return autoConvert_v1beta1_ClusterStatus_To_federation_ClusterStatus(in, out, s)
-}
-
-func autoConvert_federation_ClusterStatus_To_v1beta1_ClusterStatus(in *federation.ClusterStatus, out *ClusterStatus, s conversion.Scope) error {
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]ClusterCondition, len(*in))
- for i := range *in {
- if err := Convert_federation_ClusterCondition_To_v1beta1_ClusterCondition(&(*in)[i], &(*out)[i], s); err != nil {
- return err
- }
- }
- } else {
- out.Conditions = nil
- }
- out.Zones = in.Zones
- out.Region = in.Region
- return nil
-}
-
-func Convert_federation_ClusterStatus_To_v1beta1_ClusterStatus(in *federation.ClusterStatus, out *ClusterStatus, s conversion.Scope) error {
- return autoConvert_federation_ClusterStatus_To_v1beta1_ClusterStatus(in, out, s)
-}
-
-func autoConvert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(in *ServerAddressByClientCIDR, out *federation.ServerAddressByClientCIDR, s conversion.Scope) error {
- out.ClientCIDR = in.ClientCIDR
- out.ServerAddress = in.ServerAddress
- return nil
-}
-
-func Convert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(in *ServerAddressByClientCIDR, out *federation.ServerAddressByClientCIDR, s conversion.Scope) error {
- return autoConvert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(in, out, s)
-}
-
-func autoConvert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR(in *federation.ServerAddressByClientCIDR, out *ServerAddressByClientCIDR, s conversion.Scope) error {
- out.ClientCIDR = in.ClientCIDR
- out.ServerAddress = in.ServerAddress
- return nil
-}
-
-func Convert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR(in *federation.ServerAddressByClientCIDR, out *ServerAddressByClientCIDR, s conversion.Scope) error {
- return autoConvert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR(in, out, s)
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index 307c0355e..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 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 v1beta1
-
-import (
- v1 "k8s.io/client-go/1.5/pkg/api/v1"
- conversion "k8s.io/client-go/1.5/pkg/conversion"
- runtime "k8s.io/client-go/1.5/pkg/runtime"
- reflect "reflect"
-)
-
-func init() {
- SchemeBuilder.Register(RegisterDeepCopies)
-}
-
-// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
-// to allow building arbitrary schemes.
-func RegisterDeepCopies(scheme *runtime.Scheme) error {
- return scheme.AddGeneratedDeepCopyFuncs(
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Cluster, InType: reflect.TypeOf(&Cluster{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterCondition, InType: reflect.TypeOf(&ClusterCondition{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterList, InType: reflect.TypeOf(&ClusterList{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterSpec, InType: reflect.TypeOf(&ClusterSpec{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterStatus, InType: reflect.TypeOf(&ClusterStatus{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ServerAddressByClientCIDR, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})},
- )
-}
-
-func DeepCopy_v1beta1_Cluster(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*Cluster)
- out := out.(*Cluster)
- out.TypeMeta = in.TypeMeta
- if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if err := DeepCopy_v1beta1_ClusterSpec(&in.Spec, &out.Spec, c); err != nil {
- return err
- }
- if err := DeepCopy_v1beta1_ClusterStatus(&in.Status, &out.Status, c); err != nil {
- return err
- }
- return nil
- }
-}
-
-func DeepCopy_v1beta1_ClusterCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ClusterCondition)
- out := out.(*ClusterCondition)
- out.Type = in.Type
- out.Status = in.Status
- out.LastProbeTime = in.LastProbeTime.DeepCopy()
- out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
- out.Reason = in.Reason
- out.Message = in.Message
- return nil
- }
-}
-
-func DeepCopy_v1beta1_ClusterList(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ClusterList)
- out := out.(*ClusterList)
- 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 {
- if err := DeepCopy_v1beta1_Cluster(&(*in)[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
- }
-}
-
-func DeepCopy_v1beta1_ClusterSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ClusterSpec)
- out := out.(*ClusterSpec)
- if in.ServerAddressByClientCIDRs != nil {
- in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
- *out = make([]ServerAddressByClientCIDR, len(*in))
- for i := range *in {
- (*out)[i] = (*in)[i]
- }
- } else {
- out.ServerAddressByClientCIDRs = nil
- }
- if in.SecretRef != nil {
- in, out := &in.SecretRef, &out.SecretRef
- *out = new(v1.LocalObjectReference)
- **out = **in
- } else {
- out.SecretRef = nil
- }
- return nil
- }
-}
-
-func DeepCopy_v1beta1_ClusterStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ClusterStatus)
- out := out.(*ClusterStatus)
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]ClusterCondition, len(*in))
- for i := range *in {
- if err := DeepCopy_v1beta1_ClusterCondition(&(*in)[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Conditions = nil
- }
- if in.Zones != nil {
- in, out := &in.Zones, &out.Zones
- *out = make([]string, len(*in))
- copy(*out, *in)
- } else {
- out.Zones = nil
- }
- out.Region = in.Region
- return nil
- }
-}
-
-func DeepCopy_v1beta1_ServerAddressByClientCIDR(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ServerAddressByClientCIDR)
- out := out.(*ServerAddressByClientCIDR)
- out.ClientCIDR = in.ClientCIDR
- out.ServerAddress = in.ServerAddress
- return nil
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/zz_generated.deepcopy.go
deleted file mode 100644
index dc56536f6..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/federation/apis/federation/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,200 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2016 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 federation
-
-import (
- api "k8s.io/client-go/1.5/pkg/api"
- conversion "k8s.io/client-go/1.5/pkg/conversion"
- runtime "k8s.io/client-go/1.5/pkg/runtime"
- reflect "reflect"
-)
-
-func init() {
- SchemeBuilder.Register(RegisterDeepCopies)
-}
-
-// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
-// to allow building arbitrary schemes.
-func RegisterDeepCopies(scheme *runtime.Scheme) error {
- return scheme.AddGeneratedDeepCopyFuncs(
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_Cluster, InType: reflect.TypeOf(&Cluster{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterCondition, InType: reflect.TypeOf(&ClusterCondition{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterList, InType: reflect.TypeOf(&ClusterList{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterReplicaSetPreferences, InType: reflect.TypeOf(&ClusterReplicaSetPreferences{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterSpec, InType: reflect.TypeOf(&ClusterSpec{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterStatus, InType: reflect.TypeOf(&ClusterStatus{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_FederatedReplicaSetPreferences, InType: reflect.TypeOf(&FederatedReplicaSetPreferences{})},
- conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ServerAddressByClientCIDR, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})},
- )
-}
-
-func DeepCopy_federation_Cluster(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*Cluster)
- out := out.(*Cluster)
- out.TypeMeta = in.TypeMeta
- if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
- return err
- }
- if err := DeepCopy_federation_ClusterSpec(&in.Spec, &out.Spec, c); err != nil {
- return err
- }
- if err := DeepCopy_federation_ClusterStatus(&in.Status, &out.Status, c); err != nil {
- return err
- }
- return nil
- }
-}
-
-func DeepCopy_federation_ClusterCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ClusterCondition)
- out := out.(*ClusterCondition)
- out.Type = in.Type
- out.Status = in.Status
- out.LastProbeTime = in.LastProbeTime.DeepCopy()
- out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
- out.Reason = in.Reason
- out.Message = in.Message
- return nil
- }
-}
-
-func DeepCopy_federation_ClusterList(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ClusterList)
- out := out.(*ClusterList)
- 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 {
- if err := DeepCopy_federation_Cluster(&(*in)[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Items = nil
- }
- return nil
- }
-}
-
-func DeepCopy_federation_ClusterReplicaSetPreferences(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ClusterReplicaSetPreferences)
- out := out.(*ClusterReplicaSetPreferences)
- out.MinReplicas = in.MinReplicas
- if in.MaxReplicas != nil {
- in, out := &in.MaxReplicas, &out.MaxReplicas
- *out = new(int64)
- **out = **in
- } else {
- out.MaxReplicas = nil
- }
- out.Weight = in.Weight
- return nil
- }
-}
-
-func DeepCopy_federation_ClusterSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ClusterSpec)
- out := out.(*ClusterSpec)
- if in.ServerAddressByClientCIDRs != nil {
- in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
- *out = make([]ServerAddressByClientCIDR, len(*in))
- for i := range *in {
- (*out)[i] = (*in)[i]
- }
- } else {
- out.ServerAddressByClientCIDRs = nil
- }
- if in.SecretRef != nil {
- in, out := &in.SecretRef, &out.SecretRef
- *out = new(api.LocalObjectReference)
- **out = **in
- } else {
- out.SecretRef = nil
- }
- return nil
- }
-}
-
-func DeepCopy_federation_ClusterStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ClusterStatus)
- out := out.(*ClusterStatus)
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]ClusterCondition, len(*in))
- for i := range *in {
- if err := DeepCopy_federation_ClusterCondition(&(*in)[i], &(*out)[i], c); err != nil {
- return err
- }
- }
- } else {
- out.Conditions = nil
- }
- if in.Zones != nil {
- in, out := &in.Zones, &out.Zones
- *out = make([]string, len(*in))
- copy(*out, *in)
- } else {
- out.Zones = nil
- }
- out.Region = in.Region
- return nil
- }
-}
-
-func DeepCopy_federation_FederatedReplicaSetPreferences(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*FederatedReplicaSetPreferences)
- out := out.(*FederatedReplicaSetPreferences)
- out.Rebalance = in.Rebalance
- if in.Clusters != nil {
- in, out := &in.Clusters, &out.Clusters
- *out = make(map[string]ClusterReplicaSetPreferences)
- for key, val := range *in {
- newVal := new(ClusterReplicaSetPreferences)
- if err := DeepCopy_federation_ClusterReplicaSetPreferences(&val, newVal, c); err != nil {
- return err
- }
- (*out)[key] = *newVal
- }
- } else {
- out.Clusters = nil
- }
- return nil
- }
-}
-
-func DeepCopy_federation_ServerAddressByClientCIDR(in interface{}, out interface{}, c *conversion.Cloner) error {
- {
- in := in.(*ServerAddressByClientCIDR)
- out := out.(*ServerAddressByClientCIDR)
- out.ClientCIDR = in.ClientCIDR
- out.ServerAddress = in.ServerAddress
- return nil
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/doc.go b/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/doc.go
deleted file mode 100644
index ebc1cc598..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/doc.go
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2015 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 qos contains helper functions for quality of service.
-// For each resource (memory, CPU) Kubelet supports three classes of containers.
-// Memory guaranteed containers will receive the highest priority and will get all the resources
-// they need.
-// Burstable containers will be guaranteed their request and can “burst” and use more resources
-// when available.
-// Best-Effort containers, which don’t specify a request, can use resources only if not being used
-// by other pods.
-package qos
diff --git a/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/policy.go b/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/policy.go
deleted file mode 100644
index b32352ef2..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/policy.go
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-Copyright 2015 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 qos
-
-import (
- "k8s.io/client-go/1.5/pkg/api"
-)
-
-const (
- // PodInfraOOMAdj is very docker specific. For arbitrary runtime, it may not make
- // sense to set sandbox level oom score, e.g. a sandbox could only be a namespace
- // without a process.
- // TODO: Handle infra container oom score adj in a runtime agnostic way.
- PodInfraOOMAdj int = -998
- KubeletOOMScoreAdj int = -999
- DockerOOMScoreAdj int = -999
- KubeProxyOOMScoreAdj int = -999
- guaranteedOOMScoreAdj int = -998
- besteffortOOMScoreAdj int = 1000
-)
-
-// GetContainerOOMAdjust returns the amount by which the OOM score of all processes in the
-// container should be adjusted.
-// The OOM score of a process is the percentage of memory it consumes
-// multiplied by 10 (barring exceptional cases) + a configurable quantity which is between -1000
-// and 1000. Containers with higher OOM scores are killed if the system runs out of memory.
-// See https://lwn.net/Articles/391222/ for more information.
-func GetContainerOOMScoreAdjust(pod *api.Pod, container *api.Container, memoryCapacity int64) int {
- switch GetPodQOS(pod) {
- case Guaranteed:
- // Guaranteed containers should be the last to get killed.
- return guaranteedOOMScoreAdj
- case BestEffort:
- return besteffortOOMScoreAdj
- }
-
- // Burstable containers are a middle tier, between Guaranteed and Best-Effort. Ideally,
- // we want to protect Burstable containers that consume less memory than requested.
- // The formula below is a heuristic. A container requesting for 10% of a system's
- // memory will have an OOM score adjust of 900. If a process in container Y
- // uses over 10% of memory, its OOM score will be 1000. The idea is that containers
- // which use more than their request will have an OOM score of 1000 and will be prime
- // targets for OOM kills.
- // Note that this is a heuristic, it won't work if a container has many small processes.
- memoryRequest := container.Resources.Requests.Memory().Value()
- oomScoreAdjust := 1000 - (1000*memoryRequest)/memoryCapacity
- // A guaranteed pod using 100% of memory can have an OOM score of 10. Ensure
- // that burstable pods have a higher OOM score adjustment.
- if int(oomScoreAdjust) < (1000 + guaranteedOOMScoreAdj) {
- return (1000 + guaranteedOOMScoreAdj)
- }
- // Give burstable pods a higher chance of survival over besteffort pods.
- if int(oomScoreAdjust) == besteffortOOMScoreAdj {
- return int(oomScoreAdjust - 1)
- }
- return int(oomScoreAdjust)
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/qos.go b/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/qos.go
deleted file mode 100644
index 52cfadfc1..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/qos.go
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
-Copyright 2015 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 qos
-
-import (
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/resource"
- "k8s.io/client-go/1.5/pkg/util/sets"
-)
-
-// isResourceGuaranteed returns true if the container's resource requirements are Guaranteed.
-func isResourceGuaranteed(container *api.Container, resource api.ResourceName) bool {
- // A container resource is guaranteed if its request == limit.
- // If request == limit, the user is very confident of resource consumption.
- req, hasReq := container.Resources.Requests[resource]
- limit, hasLimit := container.Resources.Limits[resource]
- if !hasReq || !hasLimit {
- return false
- }
- return req.Cmp(limit) == 0 && req.Value() != 0
-}
-
-// isResourceBestEffort returns true if the container's resource requirements are best-effort.
-func isResourceBestEffort(container *api.Container, resource api.ResourceName) bool {
- // A container resource is best-effort if its request is unspecified or 0.
- // If a request is specified, then the user expects some kind of resource guarantee.
- req, hasReq := container.Resources.Requests[resource]
- return !hasReq || req.Value() == 0
-}
-
-// GetPodQOS returns the QoS class of a pod.
-// A pod is besteffort if none of its containers have specified any requests or limits.
-// A pod is guaranteed only when requests and limits are specified for all the containers and they are equal.
-// A pod is burstable if limits and requests do not match across all containers.
-func GetPodQOS(pod *api.Pod) QOSClass {
- requests := api.ResourceList{}
- limits := api.ResourceList{}
- zeroQuantity := resource.MustParse("0")
- isGuaranteed := true
- for _, container := range pod.Spec.Containers {
- // process requests
- for name, quantity := range container.Resources.Requests {
- if !supportedQoSComputeResources.Has(string(name)) {
- continue
- }
- if quantity.Cmp(zeroQuantity) == 1 {
- delta := quantity.Copy()
- if _, exists := requests[name]; !exists {
- requests[name] = *delta
- } else {
- delta.Add(requests[name])
- requests[name] = *delta
- }
- }
- }
- // process limits
- for name, quantity := range container.Resources.Limits {
- if !supportedQoSComputeResources.Has(string(name)) {
- continue
- }
- if quantity.Cmp(zeroQuantity) == 1 {
- delta := quantity.Copy()
- if _, exists := limits[name]; !exists {
- limits[name] = *delta
- } else {
- delta.Add(limits[name])
- limits[name] = *delta
- }
- }
- }
- if len(limits) != len(supportedQoSComputeResources) {
- isGuaranteed = false
- }
- }
- if len(requests) == 0 && len(limits) == 0 {
- return BestEffort
- }
- // Check is requests match limits for all resources.
- if isGuaranteed {
- for name, req := range requests {
- if lim, exists := limits[name]; !exists || lim.Cmp(req) != 0 {
- isGuaranteed = false
- break
- }
- }
- }
- if isGuaranteed &&
- len(requests) == len(limits) {
- return Guaranteed
- }
- return Burstable
-}
-
-// QOSList is a set of (resource name, QoS class) pairs.
-type QOSList map[api.ResourceName]QOSClass
-
-// GetQOS returns a mapping of resource name to QoS class of a container
-func GetQOS(container *api.Container) QOSList {
- resourceToQOS := QOSList{}
- for resource := range allResources(container) {
- switch {
- case isResourceGuaranteed(container, resource):
- resourceToQOS[resource] = Guaranteed
- case isResourceBestEffort(container, resource):
- resourceToQOS[resource] = BestEffort
- default:
- resourceToQOS[resource] = Burstable
- }
- }
- return resourceToQOS
-}
-
-// supportedComputeResources is the list of compute resources for with QoS is supported.
-var supportedQoSComputeResources = sets.NewString(string(api.ResourceCPU), string(api.ResourceMemory))
-
-// allResources returns a set of all possible resources whose mapped key value is true if present on the container
-func allResources(container *api.Container) map[api.ResourceName]bool {
- resources := map[api.ResourceName]bool{}
- for _, resource := range supportedQoSComputeResources.List() {
- resources[api.ResourceName(resource)] = false
- }
- for resource := range container.Resources.Requests {
- resources[resource] = true
- }
- for resource := range container.Resources.Limits {
- resources[resource] = true
- }
- return resources
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/types.go b/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/types.go
deleted file mode 100644
index e52dece45..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/kubelet/qos/types.go
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-Copyright 2016 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 qos
-
-// QOSClass defines the supported qos classes of Pods/Containers.
-type QOSClass string
-
-const (
- // Guaranteed is the Guaranteed qos class.
- Guaranteed QOSClass = "Guaranteed"
- // Burstable is the Burstable qos class.
- Burstable QOSClass = "Burstable"
- // BestEffort is the BestEffort qos class.
- BestEffort QOSClass = "BestEffort"
-)
diff --git a/vendor/k8s.io/client-go/1.5/pkg/kubelet/server/portforward/constants.go b/vendor/k8s.io/client-go/1.5/pkg/kubelet/server/portforward/constants.go
deleted file mode 100644
index 1b73be299..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/kubelet/server/portforward/constants.go
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2015 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 portforward contains server-side logic for handling port forwarding requests.
-package portforward
-
-// The subprotocol "portforward.k8s.io" is used for port forwarding.
-const PortForwardProtocolV1Name = "portforward.k8s.io"
diff --git a/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/constants.go b/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/constants.go
deleted file mode 100644
index eeabba017..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/constants.go
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-Copyright 2015 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 types
-
-const (
- // system default DNS resolver configuration
- ResolvConfDefault = "/etc/resolv.conf"
-)
diff --git a/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/doc.go b/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/doc.go
deleted file mode 100644
index 0d9efe50f..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2015 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.
-*/
-
-// Common types in the Kubelet.
-package types
diff --git a/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/labels.go b/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/labels.go
deleted file mode 100644
index c4dad6302..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/labels.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Copyright 2016 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 types
-
-const (
- KubernetesPodNameLabel = "io.kubernetes.pod.name"
- KubernetesPodNamespaceLabel = "io.kubernetes.pod.namespace"
- KubernetesPodUIDLabel = "io.kubernetes.pod.uid"
- KubernetesContainerNameLabel = "io.kubernetes.container.name"
-)
-
-func GetContainerName(labels map[string]string) string {
- return labels[KubernetesContainerNameLabel]
-}
-
-func GetPodName(labels map[string]string) string {
- return labels[KubernetesPodNameLabel]
-}
-
-func GetPodUID(labels map[string]string) string {
- return labels[KubernetesPodUIDLabel]
-}
-
-func GetPodNamespace(labels map[string]string) string {
- return labels[KubernetesPodNamespaceLabel]
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/pod_update.go b/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/pod_update.go
deleted file mode 100644
index 58516fbbb..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/pod_update.go
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-Copyright 2014 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 types
-
-import (
- "fmt"
-
- "k8s.io/client-go/1.5/pkg/api"
-)
-
-const ConfigSourceAnnotationKey = "kubernetes.io/config.source"
-const ConfigMirrorAnnotationKey = "kubernetes.io/config.mirror"
-const ConfigFirstSeenAnnotationKey = "kubernetes.io/config.seen"
-const ConfigHashAnnotationKey = "kubernetes.io/config.hash"
-
-// PodOperation defines what changes will be made on a pod configuration.
-type PodOperation int
-
-const (
- // This is the current pod configuration
- SET PodOperation = iota
- // Pods with the given ids are new to this source
- ADD
- // Pods with the given ids are gracefully deleted from this source
- DELETE
- // Pods with the given ids have been removed from this source
- REMOVE
- // Pods with the given ids have been updated in this source
- UPDATE
- // Pods with the given ids have unexpected status in this source,
- // kubelet should reconcile status with this source
- RECONCILE
-
- // These constants identify the sources of pods
- // Updates from a file
- FileSource = "file"
- // Updates from querying a web page
- HTTPSource = "http"
- // Updates from Kubernetes API Server
- ApiserverSource = "api"
- // Updates from all sources
- AllSource = "*"
-
- NamespaceDefault = api.NamespaceDefault
-)
-
-// PodUpdate defines an operation sent on the channel. You can add or remove single services by
-// sending an array of size one and Op == ADD|REMOVE (with REMOVE, only the ID is required).
-// For setting the state of the system to a given state for this source configuration, set
-// Pods as desired and Op to SET, which will reset the system state to that specified in this
-// operation for this source channel. To remove all pods, set Pods to empty object and Op to SET.
-//
-// Additionally, Pods should never be nil - it should always point to an empty slice. While
-// functionally similar, this helps our unit tests properly check that the correct PodUpdates
-// are generated.
-type PodUpdate struct {
- Pods []*api.Pod
- Op PodOperation
- Source string
-}
-
-// Gets all validated sources from the specified sources.
-func GetValidatedSources(sources []string) ([]string, error) {
- validated := make([]string, 0, len(sources))
- for _, source := range sources {
- switch source {
- case AllSource:
- return []string{FileSource, HTTPSource, ApiserverSource}, nil
- case FileSource, HTTPSource, ApiserverSource:
- validated = append(validated, source)
- break
- case "":
- break
- default:
- return []string{}, fmt.Errorf("unknown pod source %q", source)
- }
- }
- return validated, nil
-}
-
-// GetPodSource returns the source of the pod based on the annotation.
-func GetPodSource(pod *api.Pod) (string, error) {
- if pod.Annotations != nil {
- if source, ok := pod.Annotations[ConfigSourceAnnotationKey]; ok {
- return source, nil
- }
- }
- return "", fmt.Errorf("cannot get source of pod %q", pod.UID)
-}
-
-// SyncPodType classifies pod updates, eg: create, update.
-type SyncPodType int
-
-const (
- // SyncPodSync is when the pod is synced to ensure desired state
- SyncPodSync SyncPodType = iota
- // SyncPodUpdate is when the pod is updated from source
- SyncPodUpdate
- // SyncPodCreate is when the pod is created from source
- SyncPodCreate
- // SyncPodKill is when the pod is killed based on a trigger internal to the kubelet for eviction.
- // If a SyncPodKill request is made to pod workers, the request is never dropped, and will always be processed.
- SyncPodKill
-)
-
-func (sp SyncPodType) String() string {
- switch sp {
- case SyncPodCreate:
- return "create"
- case SyncPodUpdate:
- return "update"
- case SyncPodSync:
- return "sync"
- case SyncPodKill:
- return "kill"
- default:
- return "unknown"
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/types.go b/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/types.go
deleted file mode 100644
index 21a49eb1c..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/kubelet/types/types.go
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-Copyright 2015 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 types
-
-import (
- "net/http"
- "time"
-
- "k8s.io/client-go/1.5/pkg/api"
-)
-
-// TODO: Reconcile custom types in kubelet/types and this subpackage
-
-type HttpGetter interface {
- Get(url string) (*http.Response, error)
-}
-
-// Timestamp wraps around time.Time and offers utilities to format and parse
-// the time using RFC3339Nano
-type Timestamp struct {
- time time.Time
-}
-
-// NewTimestamp returns a Timestamp object using the current time.
-func NewTimestamp() *Timestamp {
- return &Timestamp{time.Now()}
-}
-
-// ConvertToTimestamp takes a string, parses it using the RFC3339Nano layout,
-// and converts it to a Timestamp object.
-func ConvertToTimestamp(timeString string) *Timestamp {
- parsed, _ := time.Parse(time.RFC3339Nano, timeString)
- return &Timestamp{parsed}
-}
-
-// Get returns the time as time.Time.
-func (t *Timestamp) Get() time.Time {
- return t.time
-}
-
-// GetString returns the time in the string format using the RFC3339Nano
-// layout.
-func (t *Timestamp) GetString() string {
- return t.time.Format(time.RFC3339Nano)
-}
-
-// A type to help sort container statuses based on container names.
-type SortedContainerStatuses []api.ContainerStatus
-
-func (s SortedContainerStatuses) Len() int { return len(s) }
-func (s SortedContainerStatuses) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-
-func (s SortedContainerStatuses) Less(i, j int) bool {
- return s[i].Name < s[j].Name
-}
-
-// SortInitContainerStatuses ensures that statuses are in the order that their
-// init container appears in the pod spec
-func SortInitContainerStatuses(p *api.Pod, statuses []api.ContainerStatus) {
- containers := p.Spec.InitContainers
- current := 0
- for _, container := range containers {
- for j := current; j < len(statuses); j++ {
- if container.Name == statuses[j].Name {
- statuses[current], statuses[j] = statuses[j], statuses[current]
- current++
- break
- }
- }
- }
-}
-
-// Reservation represents reserved resources for non-pod components.
-type Reservation struct {
- // System represents resources reserved for non-kubernetes components.
- System api.ResourceList
- // Kubernetes represents resources reserved for kubernetes system components.
- Kubernetes api.ResourceList
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/master/ports/doc.go b/vendor/k8s.io/client-go/1.5/pkg/master/ports/doc.go
deleted file mode 100644
index a2a002101..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/master/ports/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2014 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 ports defines ports used by various pieces of the kubernetes
-// infrastructure.
-package ports
diff --git a/vendor/k8s.io/client-go/1.5/pkg/master/ports/ports.go b/vendor/k8s.io/client-go/1.5/pkg/master/ports/ports.go
deleted file mode 100644
index 9c597ba47..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/master/ports/ports.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Copyright 2014 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 ports
-
-const (
- // ProxyPort is the default port for the proxy healthz server.
- // May be overridden by a flag at startup.
- ProxyStatusPort = 10249
- // KubeletPort is the default port for the kubelet server on each host machine.
- // May be overridden by a flag at startup.
- KubeletPort = 10250
- // SchedulerPort is the default port for the scheduler status server.
- // May be overridden by a flag at startup.
- SchedulerPort = 10251
- // ControllerManagerPort is the default port for the controller manager status server.
- // May be overridden by a flag at startup.
- ControllerManagerPort = 10252
- // Port for flannel daemon.
- FlannelDaemonPort = 10253
- // KubeletReadOnlyPort exposes basic read-only services from the kubelet.
- // May be overridden by a flag at startup.
- // This is necessary for heapster to collect monitoring stats from the kubelet
- // until heapster can transition to using the SSL endpoint.
- // TODO(roberthbailey): Remove this once we have a better solution for heapster.
- KubeletReadOnlyPort = 10255
-)
diff --git a/vendor/k8s.io/client-go/1.5/pkg/third_party/forked/golang/json/fields.go b/vendor/k8s.io/client-go/1.5/pkg/third_party/forked/golang/json/fields.go
deleted file mode 100644
index 1d17270ee..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/third_party/forked/golang/json/fields.go
+++ /dev/null
@@ -1,501 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package json is forked from the Go standard library to enable us to find the
-// field of a struct that a given JSON key maps to.
-package json
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "sort"
- "strings"
- "sync"
- "unicode"
- "unicode/utf8"
-)
-
-// Finds the patchStrategy and patchMergeKey struct tag fields on a given
-// struct field given the struct type and the JSON name of the field.
-// TODO: fix the returned errors to be introspectable.
-func LookupPatchMetadata(t reflect.Type, jsonField string) (reflect.Type, string, string, error) {
- if t.Kind() == reflect.Map {
- return t.Elem(), "", "", nil
- }
- if t.Kind() != reflect.Struct {
- return nil, "", "", fmt.Errorf("merging an object in json but data type is not map or struct, instead is: %s",
- t.Kind().String())
- }
- jf := []byte(jsonField)
- // Find the field that the JSON library would use.
- var f *field
- fields := cachedTypeFields(t)
- for i := range fields {
- ff := &fields[i]
- if bytes.Equal(ff.nameBytes, jf) {
- f = ff
- break
- }
- // Do case-insensitive comparison.
- if f == nil && ff.equalFold(ff.nameBytes, jf) {
- f = ff
- }
- }
- if f != nil {
- // Find the reflect.Value of the most preferential struct field.
- tjf := t.Field(f.index[0])
- // we must navigate down all the anonymously included structs in the chain
- for i := 1; i < len(f.index); i++ {
- tjf = tjf.Type.Field(f.index[i])
- }
- patchStrategy := tjf.Tag.Get("patchStrategy")
- patchMergeKey := tjf.Tag.Get("patchMergeKey")
- return tjf.Type, patchStrategy, patchMergeKey, nil
- }
- return nil, "", "", fmt.Errorf("unable to find api field in struct %s for the json field %q", t.Name(), jsonField)
-}
-
-// A field represents a single field found in a struct.
-type field struct {
- name string
- nameBytes []byte // []byte(name)
- equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent
-
- tag bool
- // index is the sequence of indexes from the containing type fields to this field.
- // it is a slice because anonymous structs will need multiple navigation steps to correctly
- // resolve the proper fields
- index []int
- typ reflect.Type
- omitEmpty bool
- quoted bool
-}
-
-func (f field) String() string {
- return fmt.Sprintf("{name: %s, type: %v, tag: %v, index: %v, omitEmpty: %v, quoted: %v}", f.name, f.typ, f.tag, f.index, f.omitEmpty, f.quoted)
-}
-
-func fillField(f field) field {
- f.nameBytes = []byte(f.name)
- f.equalFold = foldFunc(f.nameBytes)
- return f
-}
-
-// byName sorts field by name, breaking ties with depth,
-// then breaking ties with "name came from json tag", then
-// breaking ties with index sequence.
-type byName []field
-
-func (x byName) Len() int { return len(x) }
-
-func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byName) Less(i, j int) bool {
- if x[i].name != x[j].name {
- return x[i].name < x[j].name
- }
- if len(x[i].index) != len(x[j].index) {
- return len(x[i].index) < len(x[j].index)
- }
- if x[i].tag != x[j].tag {
- return x[i].tag
- }
- return byIndex(x).Less(i, j)
-}
-
-// byIndex sorts field by index sequence.
-type byIndex []field
-
-func (x byIndex) Len() int { return len(x) }
-
-func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byIndex) Less(i, j int) bool {
- for k, xik := range x[i].index {
- if k >= len(x[j].index) {
- return false
- }
- if xik != x[j].index[k] {
- return xik < x[j].index[k]
- }
- }
- return len(x[i].index) < len(x[j].index)
-}
-
-// typeFields returns a list of fields that JSON should recognize for the given type.
-// The algorithm is breadth-first search over the set of structs to include - the top struct
-// and then any reachable anonymous structs.
-func typeFields(t reflect.Type) []field {
- // Anonymous fields to explore at the current level and the next.
- current := []field{}
- next := []field{{typ: t}}
-
- // Count of queued names for current level and the next.
- count := map[reflect.Type]int{}
- nextCount := map[reflect.Type]int{}
-
- // Types already visited at an earlier level.
- visited := map[reflect.Type]bool{}
-
- // Fields found.
- var fields []field
-
- for len(next) > 0 {
- current, next = next, current[:0]
- count, nextCount = nextCount, map[reflect.Type]int{}
-
- for _, f := range current {
- if visited[f.typ] {
- continue
- }
- visited[f.typ] = true
-
- // Scan f.typ for fields to include.
- for i := 0; i < f.typ.NumField(); i++ {
- sf := f.typ.Field(i)
- if sf.PkgPath != "" { // unexported
- continue
- }
- tag := sf.Tag.Get("json")
- if tag == "-" {
- continue
- }
- name, opts := parseTag(tag)
- if !isValidTag(name) {
- name = ""
- }
- index := make([]int, len(f.index)+1)
- copy(index, f.index)
- index[len(f.index)] = i
-
- ft := sf.Type
- if ft.Name() == "" && ft.Kind() == reflect.Ptr {
- // Follow pointer.
- ft = ft.Elem()
- }
-
- // Record found field and index sequence.
- if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
- tagged := name != ""
- if name == "" {
- name = sf.Name
- }
- fields = append(fields, fillField(field{
- name: name,
- tag: tagged,
- index: index,
- typ: ft,
- omitEmpty: opts.Contains("omitempty"),
- quoted: opts.Contains("string"),
- }))
- if count[f.typ] > 1 {
- // If there were multiple instances, add a second,
- // so that the annihilation code will see a duplicate.
- // It only cares about the distinction between 1 or 2,
- // so don't bother generating any more copies.
- fields = append(fields, fields[len(fields)-1])
- }
- continue
- }
-
- // Record new anonymous struct to explore in next round.
- nextCount[ft]++
- if nextCount[ft] == 1 {
- next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft}))
- }
- }
- }
- }
-
- sort.Sort(byName(fields))
-
- // Delete all fields that are hidden by the Go rules for embedded fields,
- // except that fields with JSON tags are promoted.
-
- // The fields are sorted in primary order of name, secondary order
- // of field index length. Loop over names; for each name, delete
- // hidden fields by choosing the one dominant field that survives.
- out := fields[:0]
- for advance, i := 0, 0; i < len(fields); i += advance {
- // One iteration per name.
- // Find the sequence of fields with the name of this first field.
- fi := fields[i]
- name := fi.name
- for advance = 1; i+advance < len(fields); advance++ {
- fj := fields[i+advance]
- if fj.name != name {
- break
- }
- }
- if advance == 1 { // Only one field with this name
- out = append(out, fi)
- continue
- }
- dominant, ok := dominantField(fields[i : i+advance])
- if ok {
- out = append(out, dominant)
- }
- }
-
- fields = out
- sort.Sort(byIndex(fields))
-
- return fields
-}
-
-// dominantField looks through the fields, all of which are known to
-// have the same name, to find the single field that dominates the
-// others using Go's embedding rules, modified by the presence of
-// JSON tags. If there are multiple top-level fields, the boolean
-// will be false: This condition is an error in Go and we skip all
-// the fields.
-func dominantField(fields []field) (field, bool) {
- // The fields are sorted in increasing index-length order. The winner
- // must therefore be one with the shortest index length. Drop all
- // longer entries, which is easy: just truncate the slice.
- length := len(fields[0].index)
- tagged := -1 // Index of first tagged field.
- for i, f := range fields {
- if len(f.index) > length {
- fields = fields[:i]
- break
- }
- if f.tag {
- if tagged >= 0 {
- // Multiple tagged fields at the same level: conflict.
- // Return no field.
- return field{}, false
- }
- tagged = i
- }
- }
- if tagged >= 0 {
- return fields[tagged], true
- }
- // All remaining fields have the same length. If there's more than one,
- // we have a conflict (two fields named "X" at the same level) and we
- // return no field.
- if len(fields) > 1 {
- return field{}, false
- }
- return fields[0], true
-}
-
-var fieldCache struct {
- sync.RWMutex
- m map[reflect.Type][]field
-}
-
-// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.
-func cachedTypeFields(t reflect.Type) []field {
- fieldCache.RLock()
- f := fieldCache.m[t]
- fieldCache.RUnlock()
- if f != nil {
- return f
- }
-
- // Compute fields without lock.
- // Might duplicate effort but won't hold other computations back.
- f = typeFields(t)
- if f == nil {
- f = []field{}
- }
-
- fieldCache.Lock()
- if fieldCache.m == nil {
- fieldCache.m = map[reflect.Type][]field{}
- }
- fieldCache.m[t] = f
- fieldCache.Unlock()
- return f
-}
-
-func isValidTag(s string) bool {
- if s == "" {
- return false
- }
- for _, c := range s {
- switch {
- case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c):
- // Backslash and quote chars are reserved, but
- // otherwise any punctuation chars are allowed
- // in a tag name.
- default:
- if !unicode.IsLetter(c) && !unicode.IsDigit(c) {
- return false
- }
- }
- }
- return true
-}
-
-const (
- caseMask = ^byte(0x20) // Mask to ignore case in ASCII.
- kelvin = '\u212a'
- smallLongEss = '\u017f'
-)
-
-// foldFunc returns one of four different case folding equivalence
-// functions, from most general (and slow) to fastest:
-//
-// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8
-// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S')
-// 3) asciiEqualFold, no special, but includes non-letters (including _)
-// 4) simpleLetterEqualFold, no specials, no non-letters.
-//
-// The letters S and K are special because they map to 3 runes, not just 2:
-// * S maps to s and to U+017F 'ſ' Latin small letter long s
-// * k maps to K and to U+212A 'K' Kelvin sign
-// See http://play.golang.org/p/tTxjOc0OGo
-//
-// The returned function is specialized for matching against s and
-// should only be given s. It's not curried for performance reasons.
-func foldFunc(s []byte) func(s, t []byte) bool {
- nonLetter := false
- special := false // special letter
- for _, b := range s {
- if b >= utf8.RuneSelf {
- return bytes.EqualFold
- }
- upper := b & caseMask
- if upper < 'A' || upper > 'Z' {
- nonLetter = true
- } else if upper == 'K' || upper == 'S' {
- // See above for why these letters are special.
- special = true
- }
- }
- if special {
- return equalFoldRight
- }
- if nonLetter {
- return asciiEqualFold
- }
- return simpleLetterEqualFold
-}
-
-// equalFoldRight is a specialization of bytes.EqualFold when s is
-// known to be all ASCII (including punctuation), but contains an 's',
-// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t.
-// See comments on foldFunc.
-func equalFoldRight(s, t []byte) bool {
- for _, sb := range s {
- if len(t) == 0 {
- return false
- }
- tb := t[0]
- if tb < utf8.RuneSelf {
- if sb != tb {
- sbUpper := sb & caseMask
- if 'A' <= sbUpper && sbUpper <= 'Z' {
- if sbUpper != tb&caseMask {
- return false
- }
- } else {
- return false
- }
- }
- t = t[1:]
- continue
- }
- // sb is ASCII and t is not. t must be either kelvin
- // sign or long s; sb must be s, S, k, or K.
- tr, size := utf8.DecodeRune(t)
- switch sb {
- case 's', 'S':
- if tr != smallLongEss {
- return false
- }
- case 'k', 'K':
- if tr != kelvin {
- return false
- }
- default:
- return false
- }
- t = t[size:]
-
- }
- if len(t) > 0 {
- return false
- }
- return true
-}
-
-// asciiEqualFold is a specialization of bytes.EqualFold for use when
-// s is all ASCII (but may contain non-letters) and contains no
-// special-folding letters.
-// See comments on foldFunc.
-func asciiEqualFold(s, t []byte) bool {
- if len(s) != len(t) {
- return false
- }
- for i, sb := range s {
- tb := t[i]
- if sb == tb {
- continue
- }
- if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') {
- if sb&caseMask != tb&caseMask {
- return false
- }
- } else {
- return false
- }
- }
- return true
-}
-
-// simpleLetterEqualFold is a specialization of bytes.EqualFold for
-// use when s is all ASCII letters (no underscores, etc) and also
-// doesn't contain 'k', 'K', 's', or 'S'.
-// See comments on foldFunc.
-func simpleLetterEqualFold(s, t []byte) bool {
- if len(s) != len(t) {
- return false
- }
- for i, b := range s {
- if b&caseMask != t[i]&caseMask {
- return false
- }
- }
- return true
-}
-
-// tagOptions is the string following a comma in a struct field's "json"
-// tag, or the empty string. It does not include the leading comma.
-type tagOptions string
-
-// parseTag splits a struct field's json tag into its name and
-// comma-separated options.
-func parseTag(tag string) (string, tagOptions) {
- if idx := strings.Index(tag, ","); idx != -1 {
- return tag[:idx], tagOptions(tag[idx+1:])
- }
- return tag, tagOptions("")
-}
-
-// Contains reports whether a comma-separated list of options
-// contains a particular substr flag. substr must be surrounded by a
-// string boundary or commas.
-func (o tagOptions) Contains(optionName string) bool {
- if len(o) == 0 {
- return false
- }
- s := string(o)
- for s != "" {
- var next string
- i := strings.Index(s, ",")
- if i >= 0 {
- s, next = s[:i], s[i+1:]
- }
- if s == optionName {
- return true
- }
- s = next
- }
- return false
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/config/config.go b/vendor/k8s.io/client-go/1.5/pkg/util/config/config.go
deleted file mode 100644
index 9b567352e..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/util/config/config.go
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
-Copyright 2014 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 config
-
-import (
- "sync"
-
- "k8s.io/client-go/1.5/pkg/util/wait"
-)
-
-type Merger interface {
- // Invoked when a change from a source is received. May also function as an incremental
- // merger if you wish to consume changes incrementally. Must be reentrant when more than
- // one source is defined.
- Merge(source string, update interface{}) error
-}
-
-// MergeFunc implements the Merger interface
-type MergeFunc func(source string, update interface{}) error
-
-func (f MergeFunc) Merge(source string, update interface{}) error {
- return f(source, update)
-}
-
-// Mux is a class for merging configuration from multiple sources. Changes are
-// pushed via channels and sent to the merge function.
-type Mux struct {
- // Invoked when an update is sent to a source.
- merger Merger
-
- // Sources and their lock.
- sourceLock sync.RWMutex
- // Maps source names to channels
- sources map[string]chan interface{}
-}
-
-// NewMux creates a new mux that can merge changes from multiple sources.
-func NewMux(merger Merger) *Mux {
- mux := &Mux{
- sources: make(map[string]chan interface{}),
- merger: merger,
- }
- return mux
-}
-
-// Channel returns a channel where a configuration source
-// can send updates of new configurations. Multiple calls with the same
-// source will return the same channel. This allows change and state based sources
-// to use the same channel. Different source names however will be treated as a
-// union.
-func (m *Mux) Channel(source string) chan interface{} {
- if len(source) == 0 {
- panic("Channel given an empty name")
- }
- m.sourceLock.Lock()
- defer m.sourceLock.Unlock()
- channel, exists := m.sources[source]
- if exists {
- return channel
- }
- newChannel := make(chan interface{})
- m.sources[source] = newChannel
- go wait.Until(func() { m.listen(source, newChannel) }, 0, wait.NeverStop)
- return newChannel
-}
-
-func (m *Mux) listen(source string, listenChannel <-chan interface{}) {
- for update := range listenChannel {
- m.merger.Merge(source, update)
- }
-}
-
-// Accessor is an interface for retrieving the current merge state.
-type Accessor interface {
- // MergedState returns a representation of the current merge state.
- // Must be reentrant when more than one source is defined.
- MergedState() interface{}
-}
-
-// AccessorFunc implements the Accessor interface.
-type AccessorFunc func() interface{}
-
-func (f AccessorFunc) MergedState() interface{} {
- return f()
-}
-
-type Listener interface {
- // OnUpdate is invoked when a change is made to an object.
- OnUpdate(instance interface{})
-}
-
-// ListenerFunc receives a representation of the change or object.
-type ListenerFunc func(instance interface{})
-
-func (f ListenerFunc) OnUpdate(instance interface{}) {
- f(instance)
-}
-
-type Broadcaster struct {
- // Listeners for changes and their lock.
- listenerLock sync.RWMutex
- listeners []Listener
-}
-
-// NewBroadcaster registers a set of listeners that support the Listener interface
-// and notifies them all on changes.
-func NewBroadcaster() *Broadcaster {
- return &Broadcaster{}
-}
-
-// Add registers listener to receive updates of changes.
-func (b *Broadcaster) Add(listener Listener) {
- b.listenerLock.Lock()
- defer b.listenerLock.Unlock()
- b.listeners = append(b.listeners, listener)
-}
-
-// Notify notifies all listeners.
-func (b *Broadcaster) Notify(instance interface{}) {
- b.listenerLock.RLock()
- listeners := b.listeners
- b.listenerLock.RUnlock()
- for _, listener := range listeners {
- listener.OnUpdate(instance)
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/config/configuration_map.go b/vendor/k8s.io/client-go/1.5/pkg/util/config/configuration_map.go
deleted file mode 100644
index 0acbde56f..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/util/config/configuration_map.go
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright 2014 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 config
-
-import (
- "fmt"
- "sort"
- "strings"
-)
-
-type ConfigurationMap map[string]string
-
-func (m *ConfigurationMap) String() string {
- pairs := []string{}
- for k, v := range *m {
- pairs = append(pairs, fmt.Sprintf("%s=%s", k, v))
- }
- sort.Strings(pairs)
- return strings.Join(pairs, ",")
-}
-
-func (m *ConfigurationMap) Set(value string) error {
- for _, s := range strings.Split(value, ",") {
- if len(s) == 0 {
- continue
- }
- arr := strings.SplitN(s, "=", 2)
- if len(arr) == 2 {
- (*m)[strings.TrimSpace(arr[0])] = strings.TrimSpace(arr[1])
- } else {
- (*m)[strings.TrimSpace(arr[0])] = ""
- }
- }
- return nil
-}
-
-func (*ConfigurationMap) Type() string {
- return "mapStringString"
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/config/doc.go b/vendor/k8s.io/client-go/1.5/pkg/util/config/doc.go
deleted file mode 100644
index 5dbb37d44..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/util/config/doc.go
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2014 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 config provides utility objects for decoupling sources of configuration and the
-// actual configuration state. Consumers must implement the Merger interface to unify
-// the sources of change into an object.
-package config
diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/config/feature_gate.go b/vendor/k8s.io/client-go/1.5/pkg/util/config/feature_gate.go
deleted file mode 100644
index c8782c4c4..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/util/config/feature_gate.go
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
-Copyright 2016 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 config
-
-import (
- "fmt"
- "sort"
- "strconv"
- "strings"
-
- "github.com/golang/glog"
- "github.com/spf13/pflag"
-)
-
-const (
- flagName = "feature-gates"
-
- // All known feature keys
- // To add a new feature, define a key for it below and add
- // a featureSpec entry to knownFeatures.
-
- // allAlphaGate is a global toggle for alpha features. Per-feature key
- // values override the default set by allAlphaGate. Examples:
- // AllAlpha=false,NewFeature=true will result in newFeature=true
- // AllAlpha=true,NewFeature=false will result in newFeature=false
- allAlphaGate = "AllAlpha"
- externalTrafficLocalOnly = "AllowExtTrafficLocalEndpoints"
- appArmor = "AppArmor"
- dynamicKubeletConfig = "DynamicKubeletConfig"
- dynamicVolumeProvisioning = "DynamicVolumeProvisioning"
-)
-
-var (
- // Default values for recorded features. Every new feature gate should be
- // represented here.
- knownFeatures = map[string]featureSpec{
- allAlphaGate: {false, alpha},
- externalTrafficLocalOnly: {false, alpha},
- appArmor: {true, beta},
- dynamicKubeletConfig: {false, alpha},
- dynamicVolumeProvisioning: {true, alpha},
- }
-
- // Special handling for a few gates.
- specialFeatures = map[string]func(f *featureGate, val bool){
- allAlphaGate: setUnsetAlphaGates,
- }
-
- // DefaultFeatureGate is a shared global FeatureGate.
- DefaultFeatureGate = &featureGate{
- known: knownFeatures,
- special: specialFeatures,
- }
-)
-
-type featureSpec struct {
- enabled bool
- prerelease prerelease
-}
-
-type prerelease string
-
-const (
- // Values for prerelease.
- alpha = prerelease("ALPHA")
- beta = prerelease("BETA")
- ga = prerelease("")
-)
-
-// FeatureGate parses and stores flag gates for known features from
-// a string like feature1=true,feature2=false,...
-type FeatureGate interface {
- AddFlag(fs *pflag.FlagSet)
-
- // Every feature gate should add method here following this template:
- //
- // // owner: @username
- // // alpha: v1.4
- // MyFeature() bool
-
- // owner: @timstclair
- // beta: v1.4
- AppArmor() bool
-
- // owner: @girishkalele
- // alpha: v1.4
- ExternalTrafficLocalOnly() bool
-
- // owner: @saad-ali
- // alpha: v1.3
- DynamicVolumeProvisioning() bool
-
- // owner: mtaufen
- // alpha: v1.4
- DynamicKubeletConfig() bool
-}
-
-// featureGate implements FeatureGate as well as pflag.Value for flag parsing.
-type featureGate struct {
- known map[string]featureSpec
- special map[string]func(*featureGate, bool)
- enabled map[string]bool
-}
-
-func setUnsetAlphaGates(f *featureGate, val bool) {
- for k, v := range f.known {
- if v.prerelease == alpha {
- if _, found := f.enabled[k]; !found {
- f.enabled[k] = val
- }
- }
- }
-}
-
-// Set, String, and Type implement pflag.Value
-
-// Set Parses a string of the form // "key1=value1,key2=value2,..." into a
-// map[string]bool of known keys or returns an error.
-func (f *featureGate) Set(value string) error {
- f.enabled = make(map[string]bool)
- for _, s := range strings.Split(value, ",") {
- if len(s) == 0 {
- continue
- }
- arr := strings.SplitN(s, "=", 2)
- k := strings.TrimSpace(arr[0])
- _, ok := f.known[k]
- if !ok {
- return fmt.Errorf("unrecognized key: %s", k)
- }
- if len(arr) != 2 {
- return fmt.Errorf("missing bool value for %s", k)
- }
- v := strings.TrimSpace(arr[1])
- boolValue, err := strconv.ParseBool(v)
- if err != nil {
- return fmt.Errorf("invalid value of %s: %s, err: %v", k, v, err)
- }
- f.enabled[k] = boolValue
-
- // Handle "special" features like "all alpha gates"
- if fn, found := f.special[k]; found {
- fn(f, boolValue)
- }
- }
-
- glog.Infof("feature gates: %v", f.enabled)
- return nil
-}
-
-func (f *featureGate) String() string {
- pairs := []string{}
- for k, v := range f.enabled {
- pairs = append(pairs, fmt.Sprintf("%s=%t", k, v))
- }
- sort.Strings(pairs)
- return strings.Join(pairs, ",")
-}
-
-func (f *featureGate) Type() string {
- return "mapStringBool"
-}
-
-// ExternalTrafficLocalOnly returns value for AllowExtTrafficLocalEndpoints
-func (f *featureGate) ExternalTrafficLocalOnly() bool {
- return f.lookup(externalTrafficLocalOnly)
-}
-
-// AppArmor returns the value for the AppArmor feature gate.
-func (f *featureGate) AppArmor() bool {
- return f.lookup(appArmor)
-}
-
-// DynamicKubeletConfig returns value for dynamicKubeletConfig
-func (f *featureGate) DynamicKubeletConfig() bool {
- return f.lookup(dynamicKubeletConfig)
-}
-
-// DynamicVolumeProvisioning returns value for dynamicVolumeProvisioning
-func (f *featureGate) DynamicVolumeProvisioning() bool {
- return f.lookup(dynamicVolumeProvisioning)
-}
-
-func (f *featureGate) lookup(key string) bool {
- defaultValue := f.known[key].enabled
- if f.enabled != nil {
- if v, ok := f.enabled[key]; ok {
- return v
- }
- }
- return defaultValue
-
-}
-
-// AddFlag adds a flag for setting global feature gates to the specified FlagSet.
-func (f *featureGate) AddFlag(fs *pflag.FlagSet) {
- var known []string
- for k, v := range f.known {
- pre := ""
- if v.prerelease != ga {
- pre = fmt.Sprintf("%s - ", v.prerelease)
- }
- known = append(known, fmt.Sprintf("%s=true|false (%sdefault=%t)", k, pre, v.enabled))
- }
- sort.Strings(known)
- fs.Var(f, flagName, ""+
- "A set of key=value pairs that describe feature gates for alpha/experimental features. "+
- "Options are:\n"+strings.Join(known, "\n"))
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/diff/diff.go b/vendor/k8s.io/client-go/1.5/pkg/util/diff/diff.go
deleted file mode 100644
index ae1956eea..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/util/diff/diff.go
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
-Copyright 2014 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 diff
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "reflect"
- "sort"
- "strings"
- "text/tabwriter"
-
- "github.com/davecgh/go-spew/spew"
-
- "k8s.io/client-go/1.5/pkg/util/validation/field"
-)
-
-// StringDiff diffs a and b and returns a human readable diff.
-func StringDiff(a, b string) string {
- ba := []byte(a)
- bb := []byte(b)
- out := []byte{}
- i := 0
- for ; i < len(ba) && i < len(bb); i++ {
- if ba[i] != bb[i] {
- break
- }
- out = append(out, ba[i])
- }
- out = append(out, []byte("\n\nA: ")...)
- out = append(out, ba[i:]...)
- out = append(out, []byte("\n\nB: ")...)
- out = append(out, bb[i:]...)
- out = append(out, []byte("\n\n")...)
- return string(out)
-}
-
-// ObjectDiff writes the two objects out as JSON and prints out the identical part of
-// the objects followed by the remaining part of 'a' and finally the remaining part of 'b'.
-// For debugging tests.
-func ObjectDiff(a, b interface{}) string {
- ab, err := json.Marshal(a)
- if err != nil {
- panic(fmt.Sprintf("a: %v", err))
- }
- bb, err := json.Marshal(b)
- if err != nil {
- panic(fmt.Sprintf("b: %v", err))
- }
- return StringDiff(string(ab), string(bb))
-}
-
-// ObjectGoPrintDiff is like ObjectDiff, but uses go-spew to print the objects,
-// which shows absolutely everything by recursing into every single pointer
-// (go's %#v formatters OTOH stop at a certain point). This is needed when you
-// can't figure out why reflect.DeepEqual is returning false and nothing is
-// showing you differences. This will.
-func ObjectGoPrintDiff(a, b interface{}) string {
- s := spew.ConfigState{DisableMethods: true}
- return StringDiff(
- s.Sprintf("%#v", a),
- s.Sprintf("%#v", b),
- )
-}
-
-func ObjectReflectDiff(a, b interface{}) string {
- vA, vB := reflect.ValueOf(a), reflect.ValueOf(b)
- if vA.Type() != vB.Type() {
- return fmt.Sprintf("type A %T and type B %T do not match", a, b)
- }
- diffs := objectReflectDiff(field.NewPath("object"), vA, vB)
- if len(diffs) == 0 {
- return ""
- }
- out := []string{""}
- for _, d := range diffs {
- out = append(out,
- fmt.Sprintf("%s:", d.path),
- limit(fmt.Sprintf(" a: %#v", d.a), 80),
- limit(fmt.Sprintf(" b: %#v", d.b), 80),
- )
- }
- return strings.Join(out, "\n")
-}
-
-func limit(s string, max int) string {
- if len(s) > max {
- return s[:max]
- }
- return s
-}
-
-func public(s string) bool {
- if len(s) == 0 {
- return false
- }
- return s[:1] == strings.ToUpper(s[:1])
-}
-
-type diff struct {
- path *field.Path
- a, b interface{}
-}
-
-type orderedDiffs []diff
-
-func (d orderedDiffs) Len() int { return len(d) }
-func (d orderedDiffs) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
-func (d orderedDiffs) Less(i, j int) bool {
- a, b := d[i].path.String(), d[j].path.String()
- if a < b {
- return true
- }
- return false
-}
-
-func objectReflectDiff(path *field.Path, a, b reflect.Value) []diff {
- switch a.Type().Kind() {
- case reflect.Struct:
- var changes []diff
- for i := 0; i < a.Type().NumField(); i++ {
- if !public(a.Type().Field(i).Name) {
- if reflect.DeepEqual(a.Interface(), b.Interface()) {
- return nil
- }
- return []diff{{path: path, a: fmt.Sprintf("%#v", a), b: fmt.Sprintf("%#v", b)}}
- }
- if sub := objectReflectDiff(path.Child(a.Type().Field(i).Name), a.Field(i), b.Field(i)); len(sub) > 0 {
- changes = append(changes, sub...)
- }
- }
- return changes
- case reflect.Ptr, reflect.Interface:
- if a.IsNil() || b.IsNil() {
- switch {
- case a.IsNil() && b.IsNil():
- return nil
- case a.IsNil():
- return []diff{{path: path, a: nil, b: b.Interface()}}
- default:
- return []diff{{path: path, a: a.Interface(), b: nil}}
- }
- }
- return objectReflectDiff(path, a.Elem(), b.Elem())
- case reflect.Chan:
- if !reflect.DeepEqual(a.Interface(), b.Interface()) {
- return []diff{{path: path, a: a.Interface(), b: b.Interface()}}
- }
- return nil
- case reflect.Slice:
- if reflect.DeepEqual(a, b) {
- return nil
- }
- lA, lB := a.Len(), b.Len()
- l := lA
- if lB < lA {
- l = lB
- }
- for i := 0; i < l; i++ {
- if !reflect.DeepEqual(a.Index(i), b.Index(i)) {
- return objectReflectDiff(path.Index(i), a.Index(i), b.Index(i))
- }
- }
- var diffs []diff
- for i := l; i < lA; i++ {
- diffs = append(diffs, diff{path: path.Index(i), a: a.Index(i), b: nil})
- }
- for i := l; i < lB; i++ {
- diffs = append(diffs, diff{path: path.Index(i), a: nil, b: b.Index(i)})
- }
- return diffs
- case reflect.Map:
- if reflect.DeepEqual(a, b) {
- return nil
- }
- aKeys := make(map[interface{}]interface{})
- for _, key := range a.MapKeys() {
- aKeys[key.Interface()] = a.MapIndex(key).Interface()
- }
- var missing []diff
- for _, key := range b.MapKeys() {
- if _, ok := aKeys[key.Interface()]; ok {
- delete(aKeys, key.Interface())
- if reflect.DeepEqual(a.MapIndex(key).Interface(), b.MapIndex(key).Interface()) {
- continue
- }
- missing = append(missing, objectReflectDiff(path.Key(fmt.Sprintf("%s", key.Interface())), a.MapIndex(key), b.MapIndex(key))...)
- continue
- }
- missing = append(missing, diff{path: path.Key(fmt.Sprintf("%s", key.Interface())), a: nil, b: b.MapIndex(key).Interface()})
- }
- for key, value := range aKeys {
- missing = append(missing, diff{path: path.Key(fmt.Sprintf("%s", key)), a: value, b: nil})
- }
- sort.Sort(orderedDiffs(missing))
- return missing
- default:
- if reflect.DeepEqual(a.Interface(), b.Interface()) {
- return nil
- }
- if !a.CanInterface() {
- return []diff{{path: path, a: fmt.Sprintf("%#v", a), b: fmt.Sprintf("%#v", b)}}
- }
- return []diff{{path: path, a: a.Interface(), b: b.Interface()}}
- }
-}
-
-// ObjectGoPrintSideBySide prints a and b as textual dumps side by side,
-// enabling easy visual scanning for mismatches.
-func ObjectGoPrintSideBySide(a, b interface{}) string {
- s := spew.ConfigState{
- Indent: " ",
- // Extra deep spew.
- DisableMethods: true,
- }
- sA := s.Sdump(a)
- sB := s.Sdump(b)
-
- linesA := strings.Split(sA, "\n")
- linesB := strings.Split(sB, "\n")
- width := 0
- for _, s := range linesA {
- l := len(s)
- if l > width {
- width = l
- }
- }
- for _, s := range linesB {
- l := len(s)
- if l > width {
- width = l
- }
- }
- buf := &bytes.Buffer{}
- w := tabwriter.NewWriter(buf, width, 0, 1, ' ', 0)
- max := len(linesA)
- if len(linesB) > max {
- max = len(linesB)
- }
- for i := 0; i < max; i++ {
- var a, b string
- if i < len(linesA) {
- a = linesA[i]
- }
- if i < len(linesB) {
- b = linesB[i]
- }
- fmt.Fprintf(w, "%s\t%s\n", a, b)
- }
- w.Flush()
- return buf.String()
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/httpstream/doc.go b/vendor/k8s.io/client-go/1.5/pkg/util/httpstream/doc.go
deleted file mode 100644
index 1da83f14b..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/util/httpstream/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2015 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 httpstream adds multiplexed streaming support to HTTP requests and
-// responses via connection upgrades.
-package httpstream
diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/httpstream/httpstream.go b/vendor/k8s.io/client-go/1.5/pkg/util/httpstream/httpstream.go
deleted file mode 100644
index 7c9b791d4..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/util/httpstream/httpstream.go
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
-Copyright 2015 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 httpstream
-
-import (
- "fmt"
- "io"
- "net/http"
- "strings"
- "time"
-)
-
-const (
- HeaderConnection = "Connection"
- HeaderUpgrade = "Upgrade"
- HeaderProtocolVersion = "X-Stream-Protocol-Version"
- HeaderAcceptedProtocolVersions = "X-Accepted-Stream-Protocol-Versions"
-)
-
-// NewStreamHandler defines a function that is called when a new Stream is
-// received. If no error is returned, the Stream is accepted; otherwise,
-// the stream is rejected. After the reply frame has been sent, replySent is closed.
-type NewStreamHandler func(stream Stream, replySent <-chan struct{}) error
-
-// NoOpNewStreamHandler is a stream handler that accepts a new stream and
-// performs no other logic.
-func NoOpNewStreamHandler(stream Stream, replySent <-chan struct{}) error { return nil }
-
-// Dialer knows how to open a streaming connection to a server.
-type Dialer interface {
-
- // Dial opens a streaming connection to a server using one of the protocols
- // specified (in order of most preferred to least preferred).
- Dial(protocols ...string) (Connection, string, error)
-}
-
-// UpgradeRoundTripper is a type of http.RoundTripper that is able to upgrade
-// HTTP requests to support multiplexed bidirectional streams. After RoundTrip()
-// is invoked, if the upgrade is successful, clients may retrieve the upgraded
-// connection by calling UpgradeRoundTripper.Connection().
-type UpgradeRoundTripper interface {
- http.RoundTripper
- // NewConnection validates the response and creates a new Connection.
- NewConnection(resp *http.Response) (Connection, error)
-}
-
-// ResponseUpgrader knows how to upgrade HTTP requests and responses to
-// add streaming support to them.
-type ResponseUpgrader interface {
- // UpgradeResponse upgrades an HTTP response to one that supports multiplexed
- // streams. newStreamHandler will be called asynchronously whenever the
- // other end of the upgraded connection creates a new stream.
- UpgradeResponse(w http.ResponseWriter, req *http.Request, newStreamHandler NewStreamHandler) Connection
-}
-
-// Connection represents an upgraded HTTP connection.
-type Connection interface {
- // CreateStream creates a new Stream with the supplied headers.
- CreateStream(headers http.Header) (Stream, error)
- // Close resets all streams and closes the connection.
- Close() error
- // CloseChan returns a channel that is closed when the underlying connection is closed.
- CloseChan() <-chan bool
- // SetIdleTimeout sets the amount of time the connection may remain idle before
- // it is automatically closed.
- SetIdleTimeout(timeout time.Duration)
-}
-
-// Stream represents a bidirectional communications channel that is part of an
-// upgraded connection.
-type Stream interface {
- io.ReadWriteCloser
- // Reset closes both directions of the stream, indicating that neither client
- // or server can use it any more.
- Reset() error
- // Headers returns the headers used to create the stream.
- Headers() http.Header
- // Identifier returns the stream's ID.
- Identifier() uint32
-}
-
-// IsUpgradeRequest returns true if the given request is a connection upgrade request
-func IsUpgradeRequest(req *http.Request) bool {
- for _, h := range req.Header[http.CanonicalHeaderKey(HeaderConnection)] {
- if strings.Contains(strings.ToLower(h), strings.ToLower(HeaderUpgrade)) {
- return true
- }
- }
- return false
-}
-
-func negotiateProtocol(clientProtocols, serverProtocols []string) string {
- for i := range clientProtocols {
- for j := range serverProtocols {
- if clientProtocols[i] == serverProtocols[j] {
- return clientProtocols[i]
- }
- }
- }
- return ""
-}
-
-// Handshake performs a subprotocol negotiation. If the client did request a
-// subprotocol, Handshake will select the first common value found in
-// serverProtocols. If a match is found, Handshake adds a response header
-// indicating the chosen subprotocol. If no match is found, HTTP forbidden is
-// returned, along with a response header containing the list of protocols the
-// server can accept.
-func Handshake(req *http.Request, w http.ResponseWriter, serverProtocols []string) (string, error) {
- clientProtocols := req.Header[http.CanonicalHeaderKey(HeaderProtocolVersion)]
- if len(clientProtocols) == 0 {
- // Kube 1.0 clients didn't support subprotocol negotiation.
- // TODO require clientProtocols once Kube 1.0 is no longer supported
- return "", nil
- }
-
- if len(serverProtocols) == 0 {
- // Kube 1.0 servers didn't support subprotocol negotiation. This is mainly for testing.
- // TODO require serverProtocols once Kube 1.0 is no longer supported
- return "", nil
- }
-
- negotiatedProtocol := negotiateProtocol(clientProtocols, serverProtocols)
- if len(negotiatedProtocol) == 0 {
- w.WriteHeader(http.StatusForbidden)
- for i := range serverProtocols {
- w.Header().Add(HeaderAcceptedProtocolVersions, serverProtocols[i])
- }
- fmt.Fprintf(w, "unable to upgrade: unable to negotiate protocol: client supports %v, server accepts %v", clientProtocols, serverProtocols)
- return "", fmt.Errorf("unable to upgrade: unable to negotiate protocol: client supports %v, server supports %v", clientProtocols, serverProtocols)
- }
-
- w.Header().Add(HeaderProtocolVersion, negotiatedProtocol)
- return negotiatedProtocol, nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/strategicpatch/patch.go b/vendor/k8s.io/client-go/1.5/pkg/util/strategicpatch/patch.go
deleted file mode 100644
index 830f04ce5..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/util/strategicpatch/patch.go
+++ /dev/null
@@ -1,1265 +0,0 @@
-/*
-Copyright 2014 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 strategicpatch
-
-import (
- "fmt"
- "reflect"
- "sort"
-
- forkedjson "k8s.io/client-go/1.5/pkg/third_party/forked/golang/json"
- "k8s.io/client-go/1.5/pkg/util/json"
-
- "github.com/davecgh/go-spew/spew"
- "github.com/ghodss/yaml"
-)
-
-// An alternate implementation of JSON Merge Patch
-// (https://tools.ietf.org/html/rfc7386) which supports the ability to annotate
-// certain fields with metadata that indicates whether the elements of JSON
-// lists should be merged or replaced.
-//
-// For more information, see the PATCH section of docs/devel/api-conventions.md.
-//
-// Some of the content of this package was borrowed with minor adaptations from
-// evanphx/json-patch and openshift/origin.
-
-const (
- directiveMarker = "$patch"
- deleteDirective = "delete"
- replaceDirective = "replace"
- mergeDirective = "merge"
-)
-
-// IsPreconditionFailed returns true if the provided error indicates
-// a precondition failed.
-func IsPreconditionFailed(err error) bool {
- _, ok := err.(errPreconditionFailed)
- return ok
-}
-
-type errPreconditionFailed struct {
- message string
-}
-
-func newErrPreconditionFailed(target map[string]interface{}) errPreconditionFailed {
- s := fmt.Sprintf("precondition failed for: %v", target)
- return errPreconditionFailed{s}
-}
-
-func (err errPreconditionFailed) Error() string {
- return err.message
-}
-
-type errConflict struct {
- message string
-}
-
-func newErrConflict(patch, current string) errConflict {
- s := fmt.Sprintf("patch:\n%s\nconflicts with changes made from original to current:\n%s\n", patch, current)
- return errConflict{s}
-}
-
-func (err errConflict) Error() string {
- return err.message
-}
-
-// IsConflict returns true if the provided error indicates
-// a conflict between the patch and the current configuration.
-func IsConflict(err error) bool {
- _, ok := err.(errConflict)
- return ok
-}
-
-var errBadJSONDoc = fmt.Errorf("Invalid JSON document")
-var errNoListOfLists = fmt.Errorf("Lists of lists are not supported")
-
-// The following code is adapted from github.com/openshift/origin/pkg/util/jsonmerge.
-// Instead of defining a Delta that holds an original, a patch and a set of preconditions,
-// the reconcile method accepts a set of preconditions as an argument.
-
-// PreconditionFunc asserts that an incompatible change is not present within a patch.
-type PreconditionFunc func(interface{}) bool
-
-// RequireKeyUnchanged returns a precondition function that fails if the provided key
-// is present in the patch (indicating that its value has changed).
-func RequireKeyUnchanged(key string) PreconditionFunc {
- return func(patch interface{}) bool {
- patchMap, ok := patch.(map[string]interface{})
- if !ok {
- return true
- }
-
- // The presence of key means that its value has been changed, so the test fails.
- _, ok = patchMap[key]
- return !ok
- }
-}
-
-// RequireMetadataKeyUnchanged creates a precondition function that fails
-// if the metadata.key is present in the patch (indicating its value
-// has changed).
-func RequireMetadataKeyUnchanged(key string) PreconditionFunc {
- return func(patch interface{}) bool {
- patchMap, ok := patch.(map[string]interface{})
- if !ok {
- return true
- }
- patchMap1, ok := patchMap["metadata"]
- if !ok {
- return true
- }
- patchMap2, ok := patchMap1.(map[string]interface{})
- if !ok {
- return true
- }
- _, ok = patchMap2[key]
- return !ok
- }
-}
-
-// Deprecated: Use the synonym CreateTwoWayMergePatch, instead.
-func CreateStrategicMergePatch(original, modified []byte, dataStruct interface{}) ([]byte, error) {
- return CreateTwoWayMergePatch(original, modified, dataStruct)
-}
-
-// CreateTwoWayMergePatch creates a patch that can be passed to StrategicMergePatch from an original
-// document and a modified document, which are passed to the method as json encoded content. It will
-// return a patch that yields the modified document when applied to the original document, or an error
-// if either of the two documents is invalid.
-func CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}, fns ...PreconditionFunc) ([]byte, error) {
- originalMap := map[string]interface{}{}
- if len(original) > 0 {
- if err := json.Unmarshal(original, &originalMap); err != nil {
- return nil, errBadJSONDoc
- }
- }
-
- modifiedMap := map[string]interface{}{}
- if len(modified) > 0 {
- if err := json.Unmarshal(modified, &modifiedMap); err != nil {
- return nil, errBadJSONDoc
- }
- }
-
- t, err := getTagStructType(dataStruct)
- if err != nil {
- return nil, err
- }
-
- patchMap, err := diffMaps(originalMap, modifiedMap, t, false, false)
- if err != nil {
- return nil, err
- }
-
- // Apply the preconditions to the patch, and return an error if any of them fail.
- for _, fn := range fns {
- if !fn(patchMap) {
- return nil, newErrPreconditionFailed(patchMap)
- }
- }
-
- return json.Marshal(patchMap)
-}
-
-// Returns a (recursive) strategic merge patch that yields modified when applied to original.
-func diffMaps(original, modified map[string]interface{}, t reflect.Type, ignoreChangesAndAdditions, ignoreDeletions bool) (map[string]interface{}, error) {
- patch := map[string]interface{}{}
- if t.Kind() == reflect.Ptr {
- t = t.Elem()
- }
-
- for key, modifiedValue := range modified {
- originalValue, ok := original[key]
- if !ok {
- // Key was added, so add to patch
- if !ignoreChangesAndAdditions {
- patch[key] = modifiedValue
- }
-
- continue
- }
-
- if key == directiveMarker {
- originalString, ok := originalValue.(string)
- if !ok {
- return nil, fmt.Errorf("invalid value for special key: %s", directiveMarker)
- }
-
- modifiedString, ok := modifiedValue.(string)
- if !ok {
- return nil, fmt.Errorf("invalid value for special key: %s", directiveMarker)
- }
-
- if modifiedString != originalString {
- patch[directiveMarker] = modifiedValue
- }
-
- continue
- }
-
- if reflect.TypeOf(originalValue) != reflect.TypeOf(modifiedValue) {
- // Types have changed, so add to patch
- if !ignoreChangesAndAdditions {
- patch[key] = modifiedValue
- }
-
- continue
- }
-
- // Types are the same, so compare values
- switch originalValueTyped := originalValue.(type) {
- case map[string]interface{}:
- modifiedValueTyped := modifiedValue.(map[string]interface{})
- fieldType, _, _, err := forkedjson.LookupPatchMetadata(t, key)
- if err != nil {
- return nil, err
- }
-
- patchValue, err := diffMaps(originalValueTyped, modifiedValueTyped, fieldType, ignoreChangesAndAdditions, ignoreDeletions)
- if err != nil {
- return nil, err
- }
-
- if len(patchValue) > 0 {
- patch[key] = patchValue
- }
-
- continue
- case []interface{}:
- modifiedValueTyped := modifiedValue.([]interface{})
- fieldType, fieldPatchStrategy, fieldPatchMergeKey, err := forkedjson.LookupPatchMetadata(t, key)
- if err != nil {
- return nil, err
- }
-
- if fieldPatchStrategy == mergeDirective {
- patchValue, err := diffLists(originalValueTyped, modifiedValueTyped, fieldType.Elem(), fieldPatchMergeKey, ignoreChangesAndAdditions, ignoreDeletions)
- if err != nil {
- return nil, err
- }
-
- if len(patchValue) > 0 {
- patch[key] = patchValue
- }
-
- continue
- }
- }
-
- if !ignoreChangesAndAdditions {
- if !reflect.DeepEqual(originalValue, modifiedValue) {
- // Values are different, so add to patch
- patch[key] = modifiedValue
- }
- }
- }
-
- if !ignoreDeletions {
- // Add nils for deleted values
- for key := range original {
- _, found := modified[key]
- if !found {
- patch[key] = nil
- }
- }
- }
-
- return patch, nil
-}
-
-// Returns a (recursive) strategic merge patch that yields modified when applied to original,
-// for a pair of lists with merge semantics.
-func diffLists(original, modified []interface{}, t reflect.Type, mergeKey string, ignoreChangesAndAdditions, ignoreDeletions bool) ([]interface{}, error) {
- if len(original) == 0 {
- if len(modified) == 0 || ignoreChangesAndAdditions {
- return nil, nil
- }
-
- return modified, nil
- }
-
- elementType, err := sliceElementType(original, modified)
- if err != nil {
- return nil, err
- }
-
- var patch []interface{}
-
- if elementType.Kind() == reflect.Map {
- patch, err = diffListsOfMaps(original, modified, t, mergeKey, ignoreChangesAndAdditions, ignoreDeletions)
- } else if !ignoreChangesAndAdditions {
- patch, err = diffListsOfScalars(original, modified)
- }
-
- if err != nil {
- return nil, err
- }
-
- return patch, nil
-}
-
-// Returns a (recursive) strategic merge patch that yields modified when applied to original,
-// for a pair of lists of scalars with merge semantics.
-func diffListsOfScalars(original, modified []interface{}) ([]interface{}, error) {
- if len(modified) == 0 {
- // There is no need to check the length of original because there is no way to create
- // a patch that deletes a scalar from a list of scalars with merge semantics.
- return nil, nil
- }
-
- patch := []interface{}{}
-
- originalScalars := uniqifyAndSortScalars(original)
- modifiedScalars := uniqifyAndSortScalars(modified)
- originalIndex, modifiedIndex := 0, 0
-
-loopB:
- for ; modifiedIndex < len(modifiedScalars); modifiedIndex++ {
- for ; originalIndex < len(originalScalars); originalIndex++ {
- originalString := fmt.Sprintf("%v", original[originalIndex])
- modifiedString := fmt.Sprintf("%v", modified[modifiedIndex])
- if originalString >= modifiedString {
- if originalString != modifiedString {
- patch = append(patch, modified[modifiedIndex])
- }
-
- continue loopB
- }
- // There is no else clause because there is no way to create a patch that deletes
- // a scalar from a list of scalars with merge semantics.
- }
-
- break
- }
-
- // Add any remaining items found only in modified
- for ; modifiedIndex < len(modifiedScalars); modifiedIndex++ {
- patch = append(patch, modified[modifiedIndex])
- }
-
- return patch, nil
-}
-
-var errNoMergeKeyFmt = "map: %v does not contain declared merge key: %s"
-var errBadArgTypeFmt = "expected a %s, but received a %s"
-
-// Returns a (recursive) strategic merge patch that yields modified when applied to original,
-// for a pair of lists of maps with merge semantics.
-func diffListsOfMaps(original, modified []interface{}, t reflect.Type, mergeKey string, ignoreChangesAndAdditions, ignoreDeletions bool) ([]interface{}, error) {
- patch := make([]interface{}, 0)
-
- originalSorted, err := sortMergeListsByNameArray(original, t, mergeKey, false)
- if err != nil {
- return nil, err
- }
-
- modifiedSorted, err := sortMergeListsByNameArray(modified, t, mergeKey, false)
- if err != nil {
- return nil, err
- }
-
- originalIndex, modifiedIndex := 0, 0
-
-loopB:
- for ; modifiedIndex < len(modifiedSorted); modifiedIndex++ {
- modifiedMap, ok := modifiedSorted[modifiedIndex].(map[string]interface{})
- if !ok {
- t := reflect.TypeOf(modifiedSorted[modifiedIndex])
- return nil, fmt.Errorf(errBadArgTypeFmt, "map[string]interface{}", t.Kind().String())
- }
-
- modifiedValue, ok := modifiedMap[mergeKey]
- if !ok {
- return nil, fmt.Errorf(errNoMergeKeyFmt, modifiedMap, mergeKey)
- }
-
- for ; originalIndex < len(originalSorted); originalIndex++ {
- originalMap, ok := originalSorted[originalIndex].(map[string]interface{})
- if !ok {
- t := reflect.TypeOf(originalSorted[originalIndex])
- return nil, fmt.Errorf(errBadArgTypeFmt, "map[string]interface{}", t.Kind().String())
- }
-
- originalValue, ok := originalMap[mergeKey]
- if !ok {
- return nil, fmt.Errorf(errNoMergeKeyFmt, originalMap, mergeKey)
- }
-
- // Assume that the merge key values are comparable strings
- originalString := fmt.Sprintf("%v", originalValue)
- modifiedString := fmt.Sprintf("%v", modifiedValue)
- if originalString >= modifiedString {
- if originalString == modifiedString {
- // Merge key values are equal, so recurse
- patchValue, err := diffMaps(originalMap, modifiedMap, t, ignoreChangesAndAdditions, ignoreDeletions)
- if err != nil {
- return nil, err
- }
-
- originalIndex++
- if len(patchValue) > 0 {
- patchValue[mergeKey] = modifiedValue
- patch = append(patch, patchValue)
- }
- } else if !ignoreChangesAndAdditions {
- // Item was added, so add to patch
- patch = append(patch, modifiedMap)
- }
-
- continue loopB
- }
-
- if !ignoreDeletions {
- // Item was deleted, so add delete directive
- patch = append(patch, map[string]interface{}{mergeKey: originalValue, directiveMarker: deleteDirective})
- }
- }
-
- break
- }
-
- if !ignoreDeletions {
- // Delete any remaining items found only in original
- for ; originalIndex < len(originalSorted); originalIndex++ {
- originalMap, ok := originalSorted[originalIndex].(map[string]interface{})
- if !ok {
- t := reflect.TypeOf(originalSorted[originalIndex])
- return nil, fmt.Errorf(errBadArgTypeFmt, "map[string]interface{}", t.Kind().String())
- }
-
- originalValue, ok := originalMap[mergeKey]
- if !ok {
- return nil, fmt.Errorf(errNoMergeKeyFmt, originalMap, mergeKey)
- }
-
- patch = append(patch, map[string]interface{}{mergeKey: originalValue, directiveMarker: deleteDirective})
- }
- }
-
- if !ignoreChangesAndAdditions {
- // Add any remaining items found only in modified
- for ; modifiedIndex < len(modifiedSorted); modifiedIndex++ {
- patch = append(patch, modifiedSorted[modifiedIndex])
- }
- }
-
- return patch, nil
-}
-
-// Deprecated: StrategicMergePatchData is deprecated. Use the synonym StrategicMergePatch,
-// instead, which follows the naming convention of evanphx/json-patch.
-func StrategicMergePatchData(original, patch []byte, dataStruct interface{}) ([]byte, error) {
- return StrategicMergePatch(original, patch, dataStruct)
-}
-
-// StrategicMergePatch applies a strategic merge patch. The patch and the original document
-// must be json encoded content. A patch can be created from an original and a modified document
-// by calling CreateStrategicMergePatch.
-func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte, error) {
- if original == nil {
- original = []byte("{}")
- }
-
- if patch == nil {
- patch = []byte("{}")
- }
-
- originalMap := map[string]interface{}{}
- err := json.Unmarshal(original, &originalMap)
- if err != nil {
- return nil, errBadJSONDoc
- }
-
- patchMap := map[string]interface{}{}
- err = json.Unmarshal(patch, &patchMap)
- if err != nil {
- return nil, errBadJSONDoc
- }
-
- t, err := getTagStructType(dataStruct)
- if err != nil {
- return nil, err
- }
-
- result, err := mergeMap(originalMap, patchMap, t)
- if err != nil {
- return nil, err
- }
-
- return json.Marshal(result)
-}
-
-func getTagStructType(dataStruct interface{}) (reflect.Type, error) {
- if dataStruct == nil {
- return nil, fmt.Errorf(errBadArgTypeFmt, "struct", "nil")
- }
-
- t := reflect.TypeOf(dataStruct)
- if t.Kind() == reflect.Ptr {
- t = t.Elem()
- }
-
- if t.Kind() != reflect.Struct {
- return nil, fmt.Errorf(errBadArgTypeFmt, "struct", t.Kind().String())
- }
-
- return t, nil
-}
-
-var errBadPatchTypeFmt = "unknown patch type: %s in map: %v"
-
-// Merge fields from a patch map into the original map. Note: This may modify
-// both the original map and the patch because getting a deep copy of a map in
-// golang is highly non-trivial.
-func mergeMap(original, patch map[string]interface{}, t reflect.Type) (map[string]interface{}, error) {
- if v, ok := patch[directiveMarker]; ok {
- if v == replaceDirective {
- // If the patch contains "$patch: replace", don't merge it, just use the
- // patch directly. Later on, we can add a single level replace that only
- // affects the map that the $patch is in.
- delete(patch, directiveMarker)
- return patch, nil
- }
-
- if v == deleteDirective {
- // If the patch contains "$patch: delete", don't merge it, just return
- // an empty map.
- return map[string]interface{}{}, nil
- }
-
- return nil, fmt.Errorf(errBadPatchTypeFmt, v, patch)
- }
-
- // nil is an accepted value for original to simplify logic in other places.
- // If original is nil, replace it with an empty map and then apply the patch.
- if original == nil {
- original = map[string]interface{}{}
- }
-
- // Start merging the patch into the original.
- for k, patchV := range patch {
- // If the value of this key is null, delete the key if it exists in the
- // original. Otherwise, skip it.
- if patchV == nil {
- if _, ok := original[k]; ok {
- delete(original, k)
- }
-
- continue
- }
-
- _, ok := original[k]
- if !ok {
- // If it's not in the original document, just take the patch value.
- original[k] = patchV
- continue
- }
-
- // If the data type is a pointer, resolve the element.
- if t.Kind() == reflect.Ptr {
- t = t.Elem()
- }
-
- // If they're both maps or lists, recurse into the value.
- originalType := reflect.TypeOf(original[k])
- patchType := reflect.TypeOf(patchV)
- if originalType == patchType {
- // First find the fieldPatchStrategy and fieldPatchMergeKey.
- fieldType, fieldPatchStrategy, fieldPatchMergeKey, err := forkedjson.LookupPatchMetadata(t, k)
- if err != nil {
- return nil, err
- }
-
- if originalType.Kind() == reflect.Map && fieldPatchStrategy != replaceDirective {
- typedOriginal := original[k].(map[string]interface{})
- typedPatch := patchV.(map[string]interface{})
- var err error
- original[k], err = mergeMap(typedOriginal, typedPatch, fieldType)
- if err != nil {
- return nil, err
- }
-
- continue
- }
-
- if originalType.Kind() == reflect.Slice && fieldPatchStrategy == mergeDirective {
- elemType := fieldType.Elem()
- typedOriginal := original[k].([]interface{})
- typedPatch := patchV.([]interface{})
- var err error
- original[k], err = mergeSlice(typedOriginal, typedPatch, elemType, fieldPatchMergeKey)
- if err != nil {
- return nil, err
- }
-
- continue
- }
- }
-
- // If originalType and patchType are different OR the types are both
- // maps or slices but we're just supposed to replace them, just take
- // the value from patch.
- original[k] = patchV
- }
-
- return original, nil
-}
-
-// Merge two slices together. Note: This may modify both the original slice and
-// the patch because getting a deep copy of a slice in golang is highly
-// non-trivial.
-func mergeSlice(original, patch []interface{}, elemType reflect.Type, mergeKey string) ([]interface{}, error) {
- if len(original) == 0 && len(patch) == 0 {
- return original, nil
- }
-
- // All the values must be of the same type, but not a list.
- t, err := sliceElementType(original, patch)
- if err != nil {
- return nil, err
- }
-
- // If the elements are not maps, merge the slices of scalars.
- if t.Kind() != reflect.Map {
- // Maybe in the future add a "concat" mode that doesn't
- // uniqify.
- both := append(original, patch...)
- return uniqifyScalars(both), nil
- }
-
- if mergeKey == "" {
- return nil, fmt.Errorf("cannot merge lists without merge key for type %s", elemType.Kind().String())
- }
-
- // First look for any special $patch elements.
- patchWithoutSpecialElements := []interface{}{}
- replace := false
- for _, v := range patch {
- typedV := v.(map[string]interface{})
- patchType, ok := typedV[directiveMarker]
- if ok {
- if patchType == deleteDirective {
- mergeValue, ok := typedV[mergeKey]
- if ok {
- _, originalKey, found, err := findMapInSliceBasedOnKeyValue(original, mergeKey, mergeValue)
- if err != nil {
- return nil, err
- }
-
- if found {
- // Delete the element at originalKey.
- original = append(original[:originalKey], original[originalKey+1:]...)
- }
- } else {
- return nil, fmt.Errorf("delete patch type with no merge key defined")
- }
- } else if patchType == replaceDirective {
- replace = true
- // Continue iterating through the array to prune any other $patch elements.
- } else if patchType == mergeDirective {
- return nil, fmt.Errorf("merging lists cannot yet be specified in the patch")
- } else {
- return nil, fmt.Errorf(errBadPatchTypeFmt, patchType, typedV)
- }
- } else {
- patchWithoutSpecialElements = append(patchWithoutSpecialElements, v)
- }
- }
-
- if replace {
- return patchWithoutSpecialElements, nil
- }
-
- patch = patchWithoutSpecialElements
-
- // Merge patch into original.
- for _, v := range patch {
- // Because earlier we confirmed that all the elements are maps.
- typedV := v.(map[string]interface{})
- mergeValue, ok := typedV[mergeKey]
- if !ok {
- return nil, fmt.Errorf(errNoMergeKeyFmt, typedV, mergeKey)
- }
-
- // If we find a value with this merge key value in original, merge the
- // maps. Otherwise append onto original.
- originalMap, originalKey, found, err := findMapInSliceBasedOnKeyValue(original, mergeKey, mergeValue)
- if err != nil {
- return nil, err
- }
-
- if found {
- var mergedMaps interface{}
- var err error
- // Merge into original.
- mergedMaps, err = mergeMap(originalMap, typedV, elemType)
- if err != nil {
- return nil, err
- }
-
- original[originalKey] = mergedMaps
- } else {
- original = append(original, v)
- }
- }
-
- return original, nil
-}
-
-// This method no longer panics if any element of the slice is not a map.
-func findMapInSliceBasedOnKeyValue(m []interface{}, key string, value interface{}) (map[string]interface{}, int, bool, error) {
- for k, v := range m {
- typedV, ok := v.(map[string]interface{})
- if !ok {
- return nil, 0, false, fmt.Errorf("value for key %v is not a map.", k)
- }
-
- valueToMatch, ok := typedV[key]
- if ok && valueToMatch == value {
- return typedV, k, true, nil
- }
- }
-
- return nil, 0, false, nil
-}
-
-// This function takes a JSON map and sorts all the lists that should be merged
-// by key. This is needed by tests because in JSON, list order is significant,
-// but in Strategic Merge Patch, merge lists do not have significant order.
-// Sorting the lists allows for order-insensitive comparison of patched maps.
-func sortMergeListsByName(mapJSON []byte, dataStruct interface{}) ([]byte, error) {
- var m map[string]interface{}
- err := json.Unmarshal(mapJSON, &m)
- if err != nil {
- return nil, err
- }
-
- newM, err := sortMergeListsByNameMap(m, reflect.TypeOf(dataStruct))
- if err != nil {
- return nil, err
- }
-
- return json.Marshal(newM)
-}
-
-func sortMergeListsByNameMap(s map[string]interface{}, t reflect.Type) (map[string]interface{}, error) {
- newS := map[string]interface{}{}
- for k, v := range s {
- if k != directiveMarker {
- fieldType, fieldPatchStrategy, fieldPatchMergeKey, err := forkedjson.LookupPatchMetadata(t, k)
- if err != nil {
- return nil, err
- }
-
- // If v is a map or a merge slice, recurse.
- if typedV, ok := v.(map[string]interface{}); ok {
- var err error
- v, err = sortMergeListsByNameMap(typedV, fieldType)
- if err != nil {
- return nil, err
- }
- } else if typedV, ok := v.([]interface{}); ok {
- if fieldPatchStrategy == mergeDirective {
- var err error
- v, err = sortMergeListsByNameArray(typedV, fieldType.Elem(), fieldPatchMergeKey, true)
- if err != nil {
- return nil, err
- }
- }
- }
- }
-
- newS[k] = v
- }
-
- return newS, nil
-}
-
-func sortMergeListsByNameArray(s []interface{}, elemType reflect.Type, mergeKey string, recurse bool) ([]interface{}, error) {
- if len(s) == 0 {
- return s, nil
- }
-
- // We don't support lists of lists yet.
- t, err := sliceElementType(s)
- if err != nil {
- return nil, err
- }
-
- // If the elements are not maps...
- if t.Kind() != reflect.Map {
- // Sort the elements, because they may have been merged out of order.
- return uniqifyAndSortScalars(s), nil
- }
-
- // Elements are maps - if one of the keys of the map is a map or a
- // list, we may need to recurse into it.
- newS := []interface{}{}
- for _, elem := range s {
- if recurse {
- typedElem := elem.(map[string]interface{})
- newElem, err := sortMergeListsByNameMap(typedElem, elemType)
- if err != nil {
- return nil, err
- }
-
- newS = append(newS, newElem)
- } else {
- newS = append(newS, elem)
- }
- }
-
- // Sort the maps.
- newS = sortMapsBasedOnField(newS, mergeKey)
- return newS, nil
-}
-
-func sortMapsBasedOnField(m []interface{}, fieldName string) []interface{} {
- mapM := mapSliceFromSlice(m)
- ss := SortableSliceOfMaps{mapM, fieldName}
- sort.Sort(ss)
- newS := sliceFromMapSlice(ss.s)
- return newS
-}
-
-func mapSliceFromSlice(m []interface{}) []map[string]interface{} {
- newM := []map[string]interface{}{}
- for _, v := range m {
- vt := v.(map[string]interface{})
- newM = append(newM, vt)
- }
-
- return newM
-}
-
-func sliceFromMapSlice(s []map[string]interface{}) []interface{} {
- newS := []interface{}{}
- for _, v := range s {
- newS = append(newS, v)
- }
-
- return newS
-}
-
-type SortableSliceOfMaps struct {
- s []map[string]interface{}
- k string // key to sort on
-}
-
-func (ss SortableSliceOfMaps) Len() int {
- return len(ss.s)
-}
-
-func (ss SortableSliceOfMaps) Less(i, j int) bool {
- iStr := fmt.Sprintf("%v", ss.s[i][ss.k])
- jStr := fmt.Sprintf("%v", ss.s[j][ss.k])
- return sort.StringsAreSorted([]string{iStr, jStr})
-}
-
-func (ss SortableSliceOfMaps) Swap(i, j int) {
- tmp := ss.s[i]
- ss.s[i] = ss.s[j]
- ss.s[j] = tmp
-}
-
-func uniqifyAndSortScalars(s []interface{}) []interface{} {
- s = uniqifyScalars(s)
-
- ss := SortableSliceOfScalars{s}
- sort.Sort(ss)
- return ss.s
-}
-
-func uniqifyScalars(s []interface{}) []interface{} {
- // Clever algorithm to uniqify.
- length := len(s) - 1
- for i := 0; i < length; i++ {
- for j := i + 1; j <= length; j++ {
- if s[i] == s[j] {
- s[j] = s[length]
- s = s[0:length]
- length--
- j--
- }
- }
- }
-
- return s
-}
-
-type SortableSliceOfScalars struct {
- s []interface{}
-}
-
-func (ss SortableSliceOfScalars) Len() int {
- return len(ss.s)
-}
-
-func (ss SortableSliceOfScalars) Less(i, j int) bool {
- iStr := fmt.Sprintf("%v", ss.s[i])
- jStr := fmt.Sprintf("%v", ss.s[j])
- return sort.StringsAreSorted([]string{iStr, jStr})
-}
-
-func (ss SortableSliceOfScalars) Swap(i, j int) {
- tmp := ss.s[i]
- ss.s[i] = ss.s[j]
- ss.s[j] = tmp
-}
-
-// Returns the type of the elements of N slice(s). If the type is different,
-// another slice or undefined, returns an error.
-func sliceElementType(slices ...[]interface{}) (reflect.Type, error) {
- var prevType reflect.Type
- for _, s := range slices {
- // Go through elements of all given slices and make sure they are all the same type.
- for _, v := range s {
- currentType := reflect.TypeOf(v)
- if prevType == nil {
- prevType = currentType
- // We don't support lists of lists yet.
- if prevType.Kind() == reflect.Slice {
- return nil, errNoListOfLists
- }
- } else {
- if prevType != currentType {
- return nil, fmt.Errorf("list element types are not identical: %v", fmt.Sprint(slices))
- }
- prevType = currentType
- }
- }
- }
-
- if prevType == nil {
- return nil, fmt.Errorf("no elements in any of the given slices")
- }
-
- return prevType, nil
-}
-
-// HasConflicts returns true if the left and right JSON interface objects overlap with
-// different values in any key. All keys are required to be strings. Since patches of the
-// same Type have congruent keys, this is valid for multiple patch types. This method
-// supports JSON merge patch semantics.
-func HasConflicts(left, right interface{}) (bool, error) {
- switch typedLeft := left.(type) {
- case map[string]interface{}:
- switch typedRight := right.(type) {
- case map[string]interface{}:
- for key, leftValue := range typedLeft {
- rightValue, ok := typedRight[key]
- if !ok {
- return false, nil
- }
- return HasConflicts(leftValue, rightValue)
- }
-
- return false, nil
- default:
- return true, nil
- }
- case []interface{}:
- switch typedRight := right.(type) {
- case []interface{}:
- if len(typedLeft) != len(typedRight) {
- return true, nil
- }
-
- for i := range typedLeft {
- return HasConflicts(typedLeft[i], typedRight[i])
- }
-
- return false, nil
- default:
- return true, nil
- }
- case string, float64, bool, int, int64, nil:
- return !reflect.DeepEqual(left, right), nil
- default:
- return true, fmt.Errorf("unknown type: %v", reflect.TypeOf(left))
- }
-}
-
-// MergingMapsHaveConflicts returns true if the left and right JSON interface
-// objects overlap with different values in any key. All keys are required to be
-// strings. Since patches of the same Type have congruent keys, this is valid
-// for multiple patch types. This method supports strategic merge patch semantics.
-func MergingMapsHaveConflicts(left, right map[string]interface{}, dataStruct interface{}) (bool, error) {
- t, err := getTagStructType(dataStruct)
- if err != nil {
- return true, err
- }
-
- return mergingMapFieldsHaveConflicts(left, right, t, "", "")
-}
-
-func mergingMapFieldsHaveConflicts(
- left, right interface{},
- fieldType reflect.Type,
- fieldPatchStrategy, fieldPatchMergeKey string,
-) (bool, error) {
- switch leftType := left.(type) {
- case map[string]interface{}:
- switch rightType := right.(type) {
- case map[string]interface{}:
- leftMarker, okLeft := leftType[directiveMarker]
- rightMarker, okRight := rightType[directiveMarker]
- // if one or the other has a directive marker,
- // then we need to consider that before looking at the individual keys,
- // since a directive operates on the whole map.
- if okLeft || okRight {
- // if one has a directive marker and the other doesn't,
- // then we have a conflict, since one is deleting or replacing the whole map,
- // and the other is doing things to individual keys.
- if okLeft != okRight {
- return true, nil
- }
-
- // if they both have markers, but they are not the same directive,
- // then we have a conflict because they're doing different things to the map.
- if leftMarker != rightMarker {
- return true, nil
- }
- }
-
- // Check the individual keys.
- return mapsHaveConflicts(leftType, rightType, fieldType)
- default:
- return true, nil
- }
- case []interface{}:
- switch rightType := right.(type) {
- case []interface{}:
- return slicesHaveConflicts(leftType, rightType, fieldType, fieldPatchStrategy, fieldPatchMergeKey)
- default:
- return true, nil
- }
- case string, float64, bool, int, int64, nil:
- return !reflect.DeepEqual(left, right), nil
- default:
- return true, fmt.Errorf("unknown type: %v", reflect.TypeOf(left))
- }
-}
-
-func mapsHaveConflicts(typedLeft, typedRight map[string]interface{}, structType reflect.Type) (bool, error) {
- for key, leftValue := range typedLeft {
- if key != directiveMarker {
- if rightValue, ok := typedRight[key]; ok {
- fieldType, fieldPatchStrategy, fieldPatchMergeKey, err := forkedjson.LookupPatchMetadata(structType, key)
- if err != nil {
- return true, err
- }
-
- if hasConflicts, err := mergingMapFieldsHaveConflicts(leftValue, rightValue,
- fieldType, fieldPatchStrategy, fieldPatchMergeKey); hasConflicts {
- return true, err
- }
- }
- }
- }
-
- return false, nil
-}
-
-func slicesHaveConflicts(
- typedLeft, typedRight []interface{},
- fieldType reflect.Type,
- fieldPatchStrategy, fieldPatchMergeKey string,
-) (bool, error) {
- elementType, err := sliceElementType(typedLeft, typedRight)
- if err != nil {
- return true, err
- }
-
- valueType := fieldType.Elem()
- if fieldPatchStrategy == mergeDirective {
- // Merging lists of scalars have no conflicts by definition
- // So we only need to check further if the elements are maps
- if elementType.Kind() != reflect.Map {
- return false, nil
- }
-
- // Build a map for each slice and then compare the two maps
- leftMap, err := sliceOfMapsToMapOfMaps(typedLeft, fieldPatchMergeKey)
- if err != nil {
- return true, err
- }
-
- rightMap, err := sliceOfMapsToMapOfMaps(typedRight, fieldPatchMergeKey)
- if err != nil {
- return true, err
- }
-
- return mapsOfMapsHaveConflicts(leftMap, rightMap, valueType)
- }
-
- // Either we don't have type information, or these are non-merging lists
- if len(typedLeft) != len(typedRight) {
- return true, nil
- }
-
- // Sort scalar slices to prevent ordering issues
- // We have no way to sort non-merging lists of maps
- if elementType.Kind() != reflect.Map {
- typedLeft = uniqifyAndSortScalars(typedLeft)
- typedRight = uniqifyAndSortScalars(typedRight)
- }
-
- // Compare the slices element by element in order
- // This test will fail if the slices are not sorted
- for i := range typedLeft {
- if hasConflicts, err := mergingMapFieldsHaveConflicts(typedLeft[i], typedRight[i], valueType, "", ""); hasConflicts {
- return true, err
- }
- }
-
- return false, nil
-}
-
-func sliceOfMapsToMapOfMaps(slice []interface{}, mergeKey string) (map[string]interface{}, error) {
- result := make(map[string]interface{}, len(slice))
- for _, value := range slice {
- typedValue, ok := value.(map[string]interface{})
- if !ok {
- return nil, fmt.Errorf("invalid element type in merging list:%v", slice)
- }
-
- mergeValue, ok := typedValue[mergeKey]
- if !ok {
- return nil, fmt.Errorf("cannot find merge key `%s` in merging list element:%v", mergeKey, typedValue)
- }
-
- result[fmt.Sprintf("%s", mergeValue)] = typedValue
- }
-
- return result, nil
-}
-
-func mapsOfMapsHaveConflicts(typedLeft, typedRight map[string]interface{}, structType reflect.Type) (bool, error) {
- for key, leftValue := range typedLeft {
- if rightValue, ok := typedRight[key]; ok {
- if hasConflicts, err := mergingMapFieldsHaveConflicts(leftValue, rightValue, structType, "", ""); hasConflicts {
- return true, err
- }
- }
- }
-
- return false, nil
-}
-
-// CreateThreeWayMergePatch reconciles a modified configuration with an original configuration,
-// while preserving any changes or deletions made to the original configuration in the interim,
-// and not overridden by the current configuration. All three documents must be passed to the
-// method as json encoded content. It will return a strategic merge patch, or an error if any
-// of the documents is invalid, or if there are any preconditions that fail against the modified
-// configuration, or, if overwrite is false and there are conflicts between the modified and current
-// configurations. Conflicts are defined as keys changed differently from original to modified
-// than from original to current. In other words, a conflict occurs if modified changes any key
-// in a way that is different from how it is changed in current (e.g., deleting it, changing its
-// value).
-func CreateThreeWayMergePatch(original, modified, current []byte, dataStruct interface{}, overwrite bool, fns ...PreconditionFunc) ([]byte, error) {
- originalMap := map[string]interface{}{}
- if len(original) > 0 {
- if err := json.Unmarshal(original, &originalMap); err != nil {
- return nil, errBadJSONDoc
- }
- }
-
- modifiedMap := map[string]interface{}{}
- if len(modified) > 0 {
- if err := json.Unmarshal(modified, &modifiedMap); err != nil {
- return nil, errBadJSONDoc
- }
- }
-
- currentMap := map[string]interface{}{}
- if len(current) > 0 {
- if err := json.Unmarshal(current, &currentMap); err != nil {
- return nil, errBadJSONDoc
- }
- }
-
- t, err := getTagStructType(dataStruct)
- if err != nil {
- return nil, err
- }
-
- // The patch is the difference from current to modified without deletions, plus deletions
- // from original to modified. To find it, we compute deletions, which are the deletions from
- // original to modified, and delta, which is the difference from current to modified without
- // deletions, and then apply delta to deletions as a patch, which should be strictly additive.
- deltaMap, err := diffMaps(currentMap, modifiedMap, t, false, true)
- if err != nil {
- return nil, err
- }
-
- deletionsMap, err := diffMaps(originalMap, modifiedMap, t, true, false)
- if err != nil {
- return nil, err
- }
-
- patchMap, err := mergeMap(deletionsMap, deltaMap, t)
- if err != nil {
- return nil, err
- }
-
- // Apply the preconditions to the patch, and return an error if any of them fail.
- for _, fn := range fns {
- if !fn(patchMap) {
- return nil, newErrPreconditionFailed(patchMap)
- }
- }
-
- // If overwrite is false, and the patch contains any keys that were changed differently,
- // then return a conflict error.
- if !overwrite {
- changedMap, err := diffMaps(originalMap, currentMap, t, false, false)
- if err != nil {
- return nil, err
- }
-
- hasConflicts, err := MergingMapsHaveConflicts(patchMap, changedMap, dataStruct)
- if err != nil {
- return nil, err
- }
-
- if hasConflicts {
- return nil, newErrConflict(toYAMLOrError(patchMap), toYAMLOrError(changedMap))
- }
- }
-
- return json.Marshal(patchMap)
-}
-
-func toYAMLOrError(v interface{}) string {
- y, err := toYAML(v)
- if err != nil {
- return err.Error()
- }
-
- return y
-}
-
-func toYAML(v interface{}) (string, error) {
- y, err := yaml.Marshal(v)
- if err != nil {
- return "", fmt.Errorf("yaml marshal failed:%v\n%v\n", err, spew.Sdump(v))
- }
-
- return string(y), nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/testing/fake_handler.go b/vendor/k8s.io/client-go/1.5/pkg/util/testing/fake_handler.go
deleted file mode 100644
index 64a357fd7..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/util/testing/fake_handler.go
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-Copyright 2014 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 testing
-
-import (
- "io/ioutil"
- "net/http"
- "net/url"
- "reflect"
- "sync"
-)
-
-// TestInterface is a simple interface providing Errorf, to make injection for
-// testing easier (insert 'yo dawg' meme here).
-type TestInterface interface {
- Errorf(format string, args ...interface{})
- Logf(format string, args ...interface{})
-}
-
-// LogInterface is a simple interface to allow injection of Logf to report serving errors.
-type LogInterface interface {
- Logf(format string, args ...interface{})
-}
-
-// FakeHandler is to assist in testing HTTP requests. Notice that FakeHandler is
-// not thread safe and you must not direct traffic to except for the request
-// you want to test. You can do this by hiding it in an http.ServeMux.
-type FakeHandler struct {
- RequestReceived *http.Request
- RequestBody string
- StatusCode int
- ResponseBody string
- // For logging - you can use a *testing.T
- // This will keep log messages associated with the test.
- T LogInterface
-
- // Enforce "only one use" constraint.
- lock sync.Mutex
- requestCount int
- hasBeenChecked bool
-}
-
-func (f *FakeHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) {
- f.lock.Lock()
- defer f.lock.Unlock()
- f.requestCount++
- if f.hasBeenChecked {
- panic("got request after having been validated")
- }
-
- f.RequestReceived = request
- response.Header().Set("Content-Type", "application/json")
- response.WriteHeader(f.StatusCode)
- response.Write([]byte(f.ResponseBody))
-
- bodyReceived, err := ioutil.ReadAll(request.Body)
- if err != nil && f.T != nil {
- f.T.Logf("Received read error: %v", err)
- }
- f.RequestBody = string(bodyReceived)
-}
-
-func (f *FakeHandler) ValidateRequestCount(t TestInterface, count int) bool {
- ok := true
- f.lock.Lock()
- defer f.lock.Unlock()
- if f.requestCount != count {
- ok = false
- t.Errorf("Expected %d call, but got %d. Only the last call is recorded and checked.", count, f.requestCount)
- }
- f.hasBeenChecked = true
- return ok
-}
-
-// ValidateRequest verifies that FakeHandler received a request with expected path, method, and body.
-func (f *FakeHandler) ValidateRequest(t TestInterface, expectedPath, expectedMethod string, body *string) {
- f.lock.Lock()
- defer f.lock.Unlock()
- if f.requestCount != 1 {
- t.Logf("Expected 1 call, but got %v. Only the last call is recorded and checked.", f.requestCount)
- }
- f.hasBeenChecked = true
-
- expectURL, err := url.Parse(expectedPath)
- if err != nil {
- t.Errorf("Couldn't parse %v as a URL.", expectedPath)
- }
- if f.RequestReceived == nil {
- t.Errorf("Unexpected nil request received for %s", expectedPath)
- return
- }
- if f.RequestReceived.URL.Path != expectURL.Path {
- t.Errorf("Unexpected request path for request %#v, received: %q, expected: %q", f.RequestReceived, f.RequestReceived.URL.Path, expectURL.Path)
- }
- if e, a := expectURL.Query(), f.RequestReceived.URL.Query(); !reflect.DeepEqual(e, a) {
- t.Errorf("Unexpected query for request %#v, received: %q, expected: %q", f.RequestReceived, a, e)
- }
- if f.RequestReceived.Method != expectedMethod {
- t.Errorf("Unexpected method: %q, expected: %q", f.RequestReceived.Method, expectedMethod)
- }
- if body != nil {
- if *body != f.RequestBody {
- t.Errorf("Received body:\n%s\n Doesn't match expected body:\n%s", f.RequestBody, *body)
- }
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/testing/tmpdir.go b/vendor/k8s.io/client-go/1.5/pkg/util/testing/tmpdir.go
deleted file mode 100644
index 3b2d885fc..000000000
--- a/vendor/k8s.io/client-go/1.5/pkg/util/testing/tmpdir.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Copyright 2016 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 testing
-
-import (
- "io/ioutil"
- "os"
-)
-
-// MkTmpdir creates a temporary directory based upon the prefix passed in.
-// If successful, it returns the temporary directory path. The directory can be
-// deleted with a call to "os.RemoveAll(...)".
-// In case of error, it'll return an empty string and the error.
-func MkTmpdir(prefix string) (string, error) {
- tmpDir, err := ioutil.TempDir(os.TempDir(), prefix)
- if err != nil {
- return "", err
- }
- return tmpDir, nil
-}
-
-// MkTmpdir does the same work as "MkTmpdir", except in case of
-// errors, it'll trigger a panic.
-func MkTmpdirOrDie(prefix string) string {
- tmpDir, err := MkTmpdir(prefix)
- if err != nil {
- panic(err)
- }
- return tmpDir
-}
diff --git a/vendor/k8s.io/client-go/1.5/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go b/vendor/k8s.io/client-go/1.5/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go
deleted file mode 100644
index ae7353ff2..000000000
--- a/vendor/k8s.io/client-go/1.5/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
-Copyright 2016 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 testing
-
-import (
- "bytes"
- "crypto/rand"
- "crypto/rsa"
- "crypto/tls"
- "crypto/x509"
- "crypto/x509/pkix"
- "encoding/json"
- "encoding/pem"
- "fmt"
- "io/ioutil"
- "math/big"
- "net"
- "net/http"
- "net/http/httptest"
- "net/url"
- "os"
- "path"
- "path/filepath"
- "testing"
- "time"
-
- "github.com/coreos/go-oidc/jose"
- "github.com/coreos/go-oidc/key"
- "github.com/coreos/go-oidc/oidc"
-)
-
-// NewOIDCProvider provides a bare minimum OIDC IdP Server useful for testing.
-func NewOIDCProvider(t *testing.T, issuerPath string) *OIDCProvider {
- privKey, err := key.GeneratePrivateKey()
- if err != nil {
- t.Fatalf("Cannot create OIDC Provider: %v", err)
- return nil
- }
-
- op := &OIDCProvider{
- Mux: http.NewServeMux(),
- PrivKey: privKey,
- issuerPath: issuerPath,
- }
-
- op.Mux.HandleFunc(path.Join(issuerPath, "/.well-known/openid-configuration"), op.handleConfig)
- op.Mux.HandleFunc(path.Join(issuerPath, "/keys"), op.handleKeys)
-
- return op
-}
-
-type OIDCProvider struct {
- Mux *http.ServeMux
- PCFG oidc.ProviderConfig
- PrivKey *key.PrivateKey
- issuerPath string
-}
-
-func (op *OIDCProvider) ServeTLSWithKeyPair(cert, key string) (*httptest.Server, error) {
- srv := httptest.NewUnstartedServer(op.Mux)
-
- srv.TLS = &tls.Config{Certificates: make([]tls.Certificate, 1)}
- var err error
- srv.TLS.Certificates[0], err = tls.LoadX509KeyPair(cert, key)
- if err != nil {
- return nil, fmt.Errorf("Cannot load cert/key pair: %v", err)
- }
- srv.StartTLS()
-
- // The issuer's URL is extended by an optional path. This ensures that the plugin can
- // handle issuers that use a non-root path for discovery (see kubernetes/kubernetes#29749).
- srv.URL = srv.URL + op.issuerPath
-
- u, err := url.Parse(srv.URL)
- if err != nil {
- return nil, err
- }
- pathFor := func(p string) *url.URL {
- u2 := *u // Shallow copy.
- u2.Path = path.Join(u2.Path, p)
- return &u2
- }
-
- op.PCFG = oidc.ProviderConfig{
- Issuer: u,
- AuthEndpoint: pathFor("/auth"),
- TokenEndpoint: pathFor("/token"),
- KeysEndpoint: pathFor("/keys"),
- ResponseTypesSupported: []string{"code"},
- SubjectTypesSupported: []string{"public"},
- IDTokenSigningAlgValues: []string{"RS256"},
- }
- return srv, nil
-}
-
-func (op *OIDCProvider) handleConfig(w http.ResponseWriter, req *http.Request) {
- b, err := json.Marshal(&op.PCFG)
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
- w.Header().Set("Content-Type", "application/json")
- w.Write(b)
-}
-
-func (op *OIDCProvider) handleKeys(w http.ResponseWriter, req *http.Request) {
- keys := struct {
- Keys []jose.JWK `json:"keys"`
- }{
- Keys: []jose.JWK{op.PrivKey.JWK()},
- }
-
- b, err := json.Marshal(keys)
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
-
- w.Header().Set("Cache-Control", fmt.Sprintf("public, max-age=%d", int(time.Hour.Seconds())))
- w.Header().Set("Expires", time.Now().Add(time.Hour).Format(time.RFC1123))
- w.Header().Set("Content-Type", "application/json")
- w.Write(b)
-}
-
-// generateSelfSignedCert generates a self-signed cert/key pairs and writes to the certPath/keyPath.
-// This method is mostly identical to crypto.GenerateSelfSignedCert except for the 'IsCA' and 'KeyUsage'
-// in the certificate template. (Maybe we can merge these two methods).
-func GenerateSelfSignedCert(t *testing.T, host, certPath, keyPath string) {
- priv, err := rsa.GenerateKey(rand.Reader, 2048)
- if err != nil {
- t.Fatal(err)
- }
-
- template := x509.Certificate{
- SerialNumber: big.NewInt(1),
- Subject: pkix.Name{
- CommonName: fmt.Sprintf("%s@%d", host, time.Now().Unix()),
- },
- NotBefore: time.Now(),
- NotAfter: time.Now().Add(time.Hour * 24 * 365),
-
- KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
- ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
- BasicConstraintsValid: true,
- IsCA: true,
- }
-
- if ip := net.ParseIP(host); ip != nil {
- template.IPAddresses = append(template.IPAddresses, ip)
- } else {
- template.DNSNames = append(template.DNSNames, host)
- }
-
- derBytes, err := x509.CreateCertificate(rand.Reader, &template, &template, &priv.PublicKey, priv)
- if err != nil {
- t.Fatal(err)
- }
-
- // Generate cert
- certBuffer := bytes.Buffer{}
- if err := pem.Encode(&certBuffer, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}); err != nil {
- t.Fatal(err)
- }
-
- // Generate key
- keyBuffer := bytes.Buffer{}
- if err := pem.Encode(&keyBuffer, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)}); err != nil {
- t.Fatal(err)
- }
-
- // Write cert
- if err := os.MkdirAll(filepath.Dir(certPath), os.FileMode(0755)); err != nil {
- t.Fatal(err)
- }
- if err := ioutil.WriteFile(certPath, certBuffer.Bytes(), os.FileMode(0644)); err != nil {
- t.Fatal(err)
- }
-
- // Write key
- if err := os.MkdirAll(filepath.Dir(keyPath), os.FileMode(0755)); err != nil {
- t.Fatal(err)
- }
- if err := ioutil.WriteFile(keyPath, keyBuffer.Bytes(), os.FileMode(0600)); err != nil {
- t.Fatal(err)
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/testing/actions.go b/vendor/k8s.io/client-go/1.5/testing/actions.go
deleted file mode 100644
index 8b3112b69..000000000
--- a/vendor/k8s.io/client-go/1.5/testing/actions.go
+++ /dev/null
@@ -1,487 +0,0 @@
-/*
-Copyright 2015 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 testing
-
-import (
- "path"
- "strings"
-
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/fields"
- "k8s.io/client-go/1.5/pkg/labels"
- "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-func NewRootGetAction(resource unversioned.GroupVersionResource, name string) GetActionImpl {
- action := GetActionImpl{}
- action.Verb = "get"
- action.Resource = resource
- action.Name = name
-
- return action
-}
-
-func NewGetAction(resource unversioned.GroupVersionResource, namespace, name string) GetActionImpl {
- action := GetActionImpl{}
- action.Verb = "get"
- action.Resource = resource
- action.Namespace = namespace
- action.Name = name
-
- return action
-}
-
-func NewRootListAction(resource unversioned.GroupVersionResource, opts api.ListOptions) ListActionImpl {
- action := ListActionImpl{}
- action.Verb = "list"
- action.Resource = resource
- labelSelector := opts.LabelSelector
- if labelSelector == nil {
- labelSelector = labels.Everything()
- }
- fieldSelector := opts.FieldSelector
- if fieldSelector == nil {
- fieldSelector = fields.Everything()
- }
- action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector}
-
- return action
-}
-
-func NewListAction(resource unversioned.GroupVersionResource, namespace string, opts api.ListOptions) ListActionImpl {
- action := ListActionImpl{}
- action.Verb = "list"
- action.Resource = resource
- action.Namespace = namespace
- labelSelector := opts.LabelSelector
- if labelSelector == nil {
- labelSelector = labels.Everything()
- }
- fieldSelector := opts.FieldSelector
- if fieldSelector == nil {
- fieldSelector = fields.Everything()
- }
- action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector}
-
- return action
-}
-
-func NewRootCreateAction(resource unversioned.GroupVersionResource, object runtime.Object) CreateActionImpl {
- action := CreateActionImpl{}
- action.Verb = "create"
- action.Resource = resource
- action.Object = object
-
- return action
-}
-
-func NewCreateAction(resource unversioned.GroupVersionResource, namespace string, object runtime.Object) CreateActionImpl {
- action := CreateActionImpl{}
- action.Verb = "create"
- action.Resource = resource
- action.Namespace = namespace
- action.Object = object
-
- return action
-}
-
-func NewRootUpdateAction(resource unversioned.GroupVersionResource, object runtime.Object) UpdateActionImpl {
- action := UpdateActionImpl{}
- action.Verb = "update"
- action.Resource = resource
- action.Object = object
-
- return action
-}
-
-func NewUpdateAction(resource unversioned.GroupVersionResource, namespace string, object runtime.Object) UpdateActionImpl {
- action := UpdateActionImpl{}
- action.Verb = "update"
- action.Resource = resource
- action.Namespace = namespace
- action.Object = object
-
- return action
-}
-
-func NewRootPatchAction(resource unversioned.GroupVersionResource, name string, patch []byte) PatchActionImpl {
- action := PatchActionImpl{}
- action.Verb = "patch"
- action.Resource = resource
- action.Name = name
- action.Patch = patch
-
- return action
-}
-
-func NewPatchAction(resource unversioned.GroupVersionResource, namespace string, name string, patch []byte) PatchActionImpl {
- action := PatchActionImpl{}
- action.Verb = "patch"
- action.Resource = resource
- action.Namespace = namespace
- action.Name = name
- action.Patch = patch
-
- return action
-}
-
-func NewRootPatchSubresourceAction(resource unversioned.GroupVersionResource, name string, patch []byte, subresources ...string) PatchActionImpl {
- action := PatchActionImpl{}
- action.Verb = "patch"
- action.Resource = resource
- action.Subresource = path.Join(subresources...)
- action.Name = name
- action.Patch = patch
-
- return action
-}
-
-func NewPatchSubresourceAction(resource unversioned.GroupVersionResource, namespace, name string, patch []byte, subresources ...string) PatchActionImpl {
- action := PatchActionImpl{}
- action.Verb = "patch"
- action.Resource = resource
- action.Subresource = path.Join(subresources...)
- action.Namespace = namespace
- action.Name = name
- action.Patch = patch
-
- return action
-}
-
-func NewRootUpdateSubresourceAction(resource unversioned.GroupVersionResource, subresource string, object runtime.Object) UpdateActionImpl {
- action := UpdateActionImpl{}
- action.Verb = "update"
- action.Resource = resource
- action.Subresource = subresource
- action.Object = object
-
- return action
-}
-func NewUpdateSubresourceAction(resource unversioned.GroupVersionResource, subresource string, namespace string, object runtime.Object) UpdateActionImpl {
- action := UpdateActionImpl{}
- action.Verb = "update"
- action.Resource = resource
- action.Subresource = subresource
- action.Namespace = namespace
- action.Object = object
-
- return action
-}
-
-func NewRootDeleteAction(resource unversioned.GroupVersionResource, name string) DeleteActionImpl {
- action := DeleteActionImpl{}
- action.Verb = "delete"
- action.Resource = resource
- action.Name = name
-
- return action
-}
-
-func NewDeleteAction(resource unversioned.GroupVersionResource, namespace, name string) DeleteActionImpl {
- action := DeleteActionImpl{}
- action.Verb = "delete"
- action.Resource = resource
- action.Namespace = namespace
- action.Name = name
-
- return action
-}
-
-func NewRootDeleteCollectionAction(resource unversioned.GroupVersionResource, opts api.ListOptions) DeleteCollectionActionImpl {
- action := DeleteCollectionActionImpl{}
- action.Verb = "delete-collection"
- action.Resource = resource
- labelSelector := opts.LabelSelector
- if labelSelector == nil {
- labelSelector = labels.Everything()
- }
- fieldSelector := opts.FieldSelector
- if fieldSelector == nil {
- fieldSelector = fields.Everything()
- }
- action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector}
-
- return action
-}
-
-func NewDeleteCollectionAction(resource unversioned.GroupVersionResource, namespace string, opts api.ListOptions) DeleteCollectionActionImpl {
- action := DeleteCollectionActionImpl{}
- action.Verb = "delete-collection"
- action.Resource = resource
- action.Namespace = namespace
- labelSelector := opts.LabelSelector
- if labelSelector == nil {
- labelSelector = labels.Everything()
- }
- fieldSelector := opts.FieldSelector
- if fieldSelector == nil {
- fieldSelector = fields.Everything()
- }
- action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector}
-
- return action
-}
-
-func NewRootWatchAction(resource unversioned.GroupVersionResource, opts api.ListOptions) WatchActionImpl {
- action := WatchActionImpl{}
- action.Verb = "watch"
- action.Resource = resource
- labelSelector := opts.LabelSelector
- if labelSelector == nil {
- labelSelector = labels.Everything()
- }
- fieldSelector := opts.FieldSelector
- if fieldSelector == nil {
- fieldSelector = fields.Everything()
- }
- action.WatchRestrictions = WatchRestrictions{labelSelector, fieldSelector, opts.ResourceVersion}
-
- return action
-}
-
-func NewWatchAction(resource unversioned.GroupVersionResource, namespace string, opts api.ListOptions) WatchActionImpl {
- action := WatchActionImpl{}
- action.Verb = "watch"
- action.Resource = resource
- action.Namespace = namespace
- labelSelector := opts.LabelSelector
- if labelSelector == nil {
- labelSelector = labels.Everything()
- }
- fieldSelector := opts.FieldSelector
- if fieldSelector == nil {
- fieldSelector = fields.Everything()
- }
- action.WatchRestrictions = WatchRestrictions{labelSelector, fieldSelector, opts.ResourceVersion}
-
- return action
-}
-
-func NewProxyGetAction(resource unversioned.GroupVersionResource, namespace, scheme, name, port, path string, params map[string]string) ProxyGetActionImpl {
- action := ProxyGetActionImpl{}
- action.Verb = "get"
- action.Resource = resource
- action.Namespace = namespace
- action.Scheme = scheme
- action.Name = name
- action.Port = port
- action.Path = path
- action.Params = params
- return action
-}
-
-type ListRestrictions struct {
- Labels labels.Selector
- Fields fields.Selector
-}
-type WatchRestrictions struct {
- Labels labels.Selector
- Fields fields.Selector
- ResourceVersion string
-}
-
-type Action interface {
- GetNamespace() string
- GetVerb() string
- GetResource() unversioned.GroupVersionResource
- GetSubresource() string
- Matches(verb, resource string) bool
-}
-
-type GenericAction interface {
- Action
- GetValue() interface{}
-}
-
-type GetAction interface {
- Action
- GetName() string
-}
-
-type ListAction interface {
- Action
- GetListRestrictions() ListRestrictions
-}
-
-type CreateAction interface {
- Action
- GetObject() runtime.Object
-}
-
-type UpdateAction interface {
- Action
- GetObject() runtime.Object
-}
-
-type DeleteAction interface {
- Action
- GetName() string
-}
-
-type WatchAction interface {
- Action
- GetWatchRestrictions() WatchRestrictions
-}
-
-type ProxyGetAction interface {
- Action
- GetScheme() string
- GetName() string
- GetPort() string
- GetPath() string
- GetParams() map[string]string
-}
-
-type ActionImpl struct {
- Namespace string
- Verb string
- Resource unversioned.GroupVersionResource
- Subresource string
-}
-
-func (a ActionImpl) GetNamespace() string {
- return a.Namespace
-}
-func (a ActionImpl) GetVerb() string {
- return a.Verb
-}
-func (a ActionImpl) GetResource() unversioned.GroupVersionResource {
- return a.Resource
-}
-func (a ActionImpl) GetSubresource() string {
- return a.Subresource
-}
-func (a ActionImpl) Matches(verb, resource string) bool {
- return strings.ToLower(verb) == strings.ToLower(a.Verb) &&
- strings.ToLower(resource) == strings.ToLower(a.Resource.Resource)
-}
-
-type GenericActionImpl struct {
- ActionImpl
- Value interface{}
-}
-
-func (a GenericActionImpl) GetValue() interface{} {
- return a.Value
-}
-
-type GetActionImpl struct {
- ActionImpl
- Name string
-}
-
-func (a GetActionImpl) GetName() string {
- return a.Name
-}
-
-type ListActionImpl struct {
- ActionImpl
- ListRestrictions ListRestrictions
-}
-
-func (a ListActionImpl) GetListRestrictions() ListRestrictions {
- return a.ListRestrictions
-}
-
-type CreateActionImpl struct {
- ActionImpl
- Object runtime.Object
-}
-
-func (a CreateActionImpl) GetObject() runtime.Object {
- return a.Object
-}
-
-type UpdateActionImpl struct {
- ActionImpl
- Object runtime.Object
-}
-
-func (a UpdateActionImpl) GetObject() runtime.Object {
- return a.Object
-}
-
-type PatchActionImpl struct {
- ActionImpl
- Name string
- Patch []byte
-}
-
-func (a PatchActionImpl) GetName() string {
- return a.Name
-}
-
-func (a PatchActionImpl) GetPatch() []byte {
- return a.Patch
-}
-
-type DeleteActionImpl struct {
- ActionImpl
- Name string
-}
-
-func (a DeleteActionImpl) GetName() string {
- return a.Name
-}
-
-type DeleteCollectionActionImpl struct {
- ActionImpl
- ListRestrictions ListRestrictions
-}
-
-func (a DeleteCollectionActionImpl) GetListRestrictions() ListRestrictions {
- return a.ListRestrictions
-}
-
-type WatchActionImpl struct {
- ActionImpl
- WatchRestrictions WatchRestrictions
-}
-
-func (a WatchActionImpl) GetWatchRestrictions() WatchRestrictions {
- return a.WatchRestrictions
-}
-
-type ProxyGetActionImpl struct {
- ActionImpl
- Scheme string
- Name string
- Port string
- Path string
- Params map[string]string
-}
-
-func (a ProxyGetActionImpl) GetScheme() string {
- return a.Scheme
-}
-
-func (a ProxyGetActionImpl) GetName() string {
- return a.Name
-}
-
-func (a ProxyGetActionImpl) GetPort() string {
- return a.Port
-}
-
-func (a ProxyGetActionImpl) GetPath() string {
- return a.Path
-}
-
-func (a ProxyGetActionImpl) GetParams() map[string]string {
- return a.Params
-}
diff --git a/vendor/k8s.io/client-go/1.5/testing/fake.go b/vendor/k8s.io/client-go/1.5/testing/fake.go
deleted file mode 100644
index 208efec67..000000000
--- a/vendor/k8s.io/client-go/1.5/testing/fake.go
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
-Copyright 2016 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 testing
-
-import (
- "fmt"
- "sync"
-
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/version"
- "k8s.io/client-go/1.5/pkg/watch"
- "k8s.io/client-go/1.5/rest"
-)
-
-// Fake implements client.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 Fake struct {
- sync.RWMutex
- actions []Action // these may be castable to other types, but "Action" is the minimum
-
- // ReactionChain is the list of reactors that will be attempted for every
- // request in the order they are tried.
- ReactionChain []Reactor
- // WatchReactionChain is the list of watch reactors that will be attempted
- // for every request in the order they are tried.
- WatchReactionChain []WatchReactor
- // ProxyReactionChain is the list of proxy reactors that will be attempted
- // for every request in the order they are tried.
- ProxyReactionChain []ProxyReactor
-
- Resources map[string]*unversioned.APIResourceList
-}
-
-// Reactor is an interface to allow the composition of reaction functions.
-type Reactor interface {
- // Handles indicates whether or not this Reactor deals with a given
- // action.
- Handles(action Action) bool
- // React handles the action and returns results. It may choose to
- // delegate by indicated handled=false.
- React(action Action) (handled bool, ret runtime.Object, err error)
-}
-
-// WatchReactor is an interface to allow the composition of watch functions.
-type WatchReactor interface {
- // Handles indicates whether or not this Reactor deals with a given
- // action.
- Handles(action Action) bool
- // React handles a watch action and returns results. It may choose to
- // delegate by indicating handled=false.
- React(action Action) (handled bool, ret watch.Interface, err error)
-}
-
-// ProxyReactor is an interface to allow the composition of proxy get
-// functions.
-type ProxyReactor interface {
- // Handles indicates whether or not this Reactor deals with a given
- // action.
- Handles(action Action) bool
- // React handles a watch action and returns results. It may choose to
- // delegate by indicating handled=false.
- React(action Action) (handled bool, ret rest.ResponseWrapper, err error)
-}
-
-// ReactionFunc is a function that returns an object or error for a given
-// Action. If "handled" is false, then the test client will ignore the
-// results and continue to the next ReactionFunc. A ReactionFunc can describe
-// reactions on subresources by testing the result of the action's
-// GetSubresource() method.
-type ReactionFunc func(action Action) (handled bool, ret runtime.Object, err error)
-
-// WatchReactionFunc is a function that returns a watch interface. If
-// "handled" is false, then the test client will ignore the results and
-// continue to the next ReactionFunc.
-type WatchReactionFunc func(action Action) (handled bool, ret watch.Interface, err error)
-
-// ProxyReactionFunc is a function that returns a ResponseWrapper interface
-// for a given Action. If "handled" is false, then the test client will
-// ignore the results and continue to the next ProxyReactionFunc.
-type ProxyReactionFunc func(action Action) (handled bool, ret rest.ResponseWrapper, err error)
-
-// AddReactor appends a reactor to the end of the chain.
-func (c *Fake) AddReactor(verb, resource string, reaction ReactionFunc) {
- c.ReactionChain = append(c.ReactionChain, &SimpleReactor{verb, resource, reaction})
-}
-
-// PrependReactor adds a reactor to the beginning of the chain.
-func (c *Fake) PrependReactor(verb, resource string, reaction ReactionFunc) {
- c.ReactionChain = append([]Reactor{&SimpleReactor{verb, resource, reaction}}, c.ReactionChain...)
-}
-
-// AddWatchReactor appends a reactor to the end of the chain.
-func (c *Fake) AddWatchReactor(resource string, reaction WatchReactionFunc) {
- c.WatchReactionChain = append(c.WatchReactionChain, &SimpleWatchReactor{resource, reaction})
-}
-
-// PrependWatchReactor adds a reactor to the beginning of the chain.
-func (c *Fake) PrependWatchReactor(resource string, reaction WatchReactionFunc) {
- c.WatchReactionChain = append([]WatchReactor{&SimpleWatchReactor{resource, reaction}}, c.WatchReactionChain...)
-}
-
-// AddProxyReactor appends a reactor to the end of the chain.
-func (c *Fake) AddProxyReactor(resource string, reaction ProxyReactionFunc) {
- c.ProxyReactionChain = append(c.ProxyReactionChain, &SimpleProxyReactor{resource, reaction})
-}
-
-// PrependProxyReactor adds a reactor to the beginning of the chain.
-func (c *Fake) PrependProxyReactor(resource string, reaction ProxyReactionFunc) {
- c.ProxyReactionChain = append([]ProxyReactor{&SimpleProxyReactor{resource, reaction}}, c.ProxyReactionChain...)
-}
-
-// Invokes records the provided Action and then invokes the ReactionFunc that
-// handles the action if one exists. defaultReturnObj is expected to be of the
-// same type a normal call would return.
-func (c *Fake) Invokes(action Action, defaultReturnObj runtime.Object) (runtime.Object, error) {
- c.Lock()
- defer c.Unlock()
-
- c.actions = append(c.actions, action)
- for _, reactor := range c.ReactionChain {
- if !reactor.Handles(action) {
- continue
- }
-
- handled, ret, err := reactor.React(action)
- if !handled {
- continue
- }
-
- return ret, err
- }
-
- return defaultReturnObj, nil
-}
-
-// InvokesWatch records the provided Action and then invokes the ReactionFunc
-// that handles the action if one exists.
-func (c *Fake) InvokesWatch(action Action) (watch.Interface, error) {
- c.Lock()
- defer c.Unlock()
-
- c.actions = append(c.actions, action)
- for _, reactor := range c.WatchReactionChain {
- if !reactor.Handles(action) {
- continue
- }
-
- handled, ret, err := reactor.React(action)
- if !handled {
- continue
- }
-
- return ret, err
- }
-
- return nil, fmt.Errorf("unhandled watch: %#v", action)
-}
-
-// InvokesProxy records the provided Action and then invokes the ReactionFunc
-// that handles the action if one exists.
-func (c *Fake) InvokesProxy(action Action) rest.ResponseWrapper {
- c.Lock()
- defer c.Unlock()
-
- c.actions = append(c.actions, action)
- for _, reactor := range c.ProxyReactionChain {
- if !reactor.Handles(action) {
- continue
- }
-
- handled, ret, err := reactor.React(action)
- if !handled || err != nil {
- continue
- }
-
- return ret
- }
-
- return nil
-}
-
-// ClearActions clears the history of actions called on the fake client.
-func (c *Fake) ClearActions() {
- c.Lock()
- defer c.Unlock()
-
- c.actions = make([]Action, 0)
-}
-
-// Actions returns a chronologically ordered slice fake actions called on the
-// fake client.
-func (c *Fake) Actions() []Action {
- c.RLock()
- defer c.RUnlock()
- fa := make([]Action, len(c.actions))
- copy(fa, c.actions)
- return fa
-}
-
-// TODO: this probably should be moved to somewhere else.
-type FakeDiscovery struct {
- *Fake
-}
-
-func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error) {
- action := ActionImpl{
- Verb: "get",
- Resource: unversioned.GroupVersionResource{Resource: "resource"},
- }
- c.Invokes(action, nil)
- return c.Resources[groupVersion], nil
-}
-
-func (c *FakeDiscovery) ServerResources() (map[string]*unversioned.APIResourceList, error) {
- action := ActionImpl{
- Verb: "get",
- Resource: unversioned.GroupVersionResource{Resource: "resource"},
- }
- c.Invokes(action, nil)
- return c.Resources, nil
-}
-
-func (c *FakeDiscovery) ServerGroups() (*unversioned.APIGroupList, error) {
- return nil, nil
-}
-
-func (c *FakeDiscovery) ServerVersion() (*version.Info, error) {
- action := ActionImpl{}
- action.Verb = "get"
- action.Resource = unversioned.GroupVersionResource{Resource: "version"}
-
- c.Invokes(action, nil)
- versionInfo := version.Get()
- return &versionInfo, nil
-}
diff --git a/vendor/k8s.io/client-go/1.5/testing/fixture.go b/vendor/k8s.io/client-go/1.5/testing/fixture.go
deleted file mode 100644
index 996d803fb..000000000
--- a/vendor/k8s.io/client-go/1.5/testing/fixture.go
+++ /dev/null
@@ -1,490 +0,0 @@
-/*
-Copyright 2015 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 testing
-
-import (
- "fmt"
- "sync"
-
- "k8s.io/client-go/1.5/pkg/api/errors"
- "k8s.io/client-go/1.5/pkg/api/meta"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/apimachinery/registered"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/watch"
- "k8s.io/client-go/1.5/rest"
-)
-
-// ObjectTracker keeps track of objects. It is intended to be used to
-// fake calls to a server by returning objects based on their kind,
-// namespace and name.
-type ObjectTracker interface {
- // Add adds an object to the tracker. If object being added
- // is a list, its items are added separately.
- Add(obj runtime.Object) error
-
- // Get retrieves the object by its kind, namespace and name.
- Get(gvk unversioned.GroupVersionKind, ns, name string) (runtime.Object, error)
-
- // Update updates an existing object in the tracker.
- Update(obj runtime.Object) error
-
- // List retrieves all objects of a given kind in the given
- // namespace. Only non-List kinds are accepted.
- List(gvk unversioned.GroupVersionKind, ns string) (runtime.Object, error)
-
- // Delete deletes an existing object from the tracker. If object
- // didn't exist in the tracker prior to deletion, Delete returns
- // no error.
- Delete(gvk unversioned.GroupVersionKind, ns, name string) error
-}
-
-// ObjectScheme abstracts the implementation of common operations on objects.
-type ObjectScheme interface {
- runtime.ObjectCreater
- runtime.ObjectCopier
- runtime.ObjectTyper
-}
-
-// ObjectReaction returns a ReactionFunc that applies core.Action to
-// the given tracker.
-func ObjectReaction(tracker ObjectTracker, mapper meta.RESTMapper) ReactionFunc {
- return func(action Action) (bool, runtime.Object, error) {
- ns := action.GetNamespace()
- gvr := action.GetResource()
-
- gvk, err := mapper.KindFor(gvr)
- if err != nil {
- return false, nil, fmt.Errorf("error getting kind for resource %q: %s", gvr, err)
- }
-
- // This is a temporary fix. Because there is no internal resource, so
- // the caller has no way to express that it expects to get an internal
- // kind back. A more proper fix will be directly specify the Kind when
- // build the action.
- gvk.Version = gvr.Version
- if len(gvk.Version) == 0 {
- gvk.Version = runtime.APIVersionInternal
- }
-
- // Here and below we need to switch on implementation types,
- // not on interfaces, as some interfaces are identical
- // (e.g. UpdateAction and CreateAction), so if we use them,
- // updates and creates end up matching the same case branch.
- switch action := action.(type) {
-
- case ListActionImpl:
- obj, err := tracker.List(gvk, ns)
- return true, obj, err
-
- case GetActionImpl:
- obj, err := tracker.Get(gvk, ns, action.GetName())
- return true, obj, err
-
- case CreateActionImpl:
- objMeta, err := meta.Accessor(action.GetObject())
- if err != nil {
- return true, nil, err
- }
- if action.GetSubresource() == "" {
- err = tracker.Add(action.GetObject())
- } else {
- // TODO: Currently we're handling subresource creation as an update
- // on the enclosing resource. This works for some subresources but
- // might not be generic enough.
- err = tracker.Update(action.GetObject())
- }
- if err != nil {
- return true, nil, err
- }
- obj, err := tracker.Get(gvk, ns, objMeta.GetName())
- return true, obj, err
-
- case UpdateActionImpl:
- objMeta, err := meta.Accessor(action.GetObject())
- if err != nil {
- return true, nil, err
- }
- err = tracker.Update(action.GetObject())
- if err != nil {
- return true, nil, err
- }
- obj, err := tracker.Get(gvk, ns, objMeta.GetName())
- return true, obj, err
-
- case DeleteActionImpl:
- err := tracker.Delete(gvk, ns, action.GetName())
- if err != nil {
- return true, nil, err
- }
- return true, nil, nil
-
- default:
- return false, nil, fmt.Errorf("no reaction implemented for %s", action)
- }
- }
-}
-
-type tracker struct {
- scheme ObjectScheme
- decoder runtime.Decoder
- lock sync.RWMutex
- objects map[unversioned.GroupVersionKind][]runtime.Object
-}
-
-var _ ObjectTracker = &tracker{}
-
-// NewObjectTracker returns an ObjectTracker that can be used to keep track
-// of objects for the fake clientset. Mostly useful for unit tests.
-func NewObjectTracker(scheme ObjectScheme, decoder runtime.Decoder) ObjectTracker {
- return &tracker{
- scheme: scheme,
- decoder: decoder,
- objects: make(map[unversioned.GroupVersionKind][]runtime.Object),
- }
-}
-
-func (t *tracker) List(gvk unversioned.GroupVersionKind, ns string) (runtime.Object, error) {
- // Heuristic for list kind: original kind + List suffix. Might
- // not always be true but this tracker has a pretty limited
- // understanding of the actual API model.
- listGVK := gvk
- listGVK.Kind = listGVK.Kind + "List"
-
- list, err := t.scheme.New(listGVK)
- if err != nil {
- return nil, err
- }
-
- if !meta.IsListType(list) {
- return nil, fmt.Errorf("%q is not a list type", listGVK.Kind)
- }
-
- t.lock.RLock()
- defer t.lock.RUnlock()
-
- objs, ok := t.objects[gvk]
- if !ok {
- return list, nil
- }
-
- matchingObjs, err := filterByNamespaceAndName(objs, ns, "")
- if err != nil {
- return nil, err
- }
- if err := meta.SetList(list, matchingObjs); err != nil {
- return nil, err
- }
- if list, err = t.scheme.Copy(list); err != nil {
- return nil, err
- }
- return list, nil
-}
-
-func (t *tracker) Get(gvk unversioned.GroupVersionKind, ns, name string) (runtime.Object, error) {
- if err := checkNamespace(gvk, ns); err != nil {
- return nil, err
- }
-
- errNotFound := errors.NewNotFound(unversioned.GroupResource{Group: gvk.Group, Resource: gvk.Kind}, name)
-
- t.lock.RLock()
- defer t.lock.RUnlock()
-
- objs, ok := t.objects[gvk]
- if !ok {
- return nil, errNotFound
- }
-
- matchingObjs, err := filterByNamespaceAndName(objs, ns, name)
- if err != nil {
- return nil, err
- }
- if len(matchingObjs) == 0 {
- return nil, errNotFound
- }
- if len(matchingObjs) > 1 {
- return nil, fmt.Errorf("more than one object matched gvk %s, ns: %q name: %q", gvk, ns, name)
- }
-
- // Only one object should match in the tracker if it works
- // correctly, as Add/Update methods enforce kind/namespace/name
- // uniqueness.
- obj, err := t.scheme.Copy(matchingObjs[0])
- if err != nil {
- return nil, err
- }
-
- if status, ok := obj.(*unversioned.Status); ok {
- if status.Details != nil {
- status.Details.Kind = gvk.Kind
- }
- if status.Status != unversioned.StatusSuccess {
- return nil, &errors.StatusError{ErrStatus: *status}
- }
- }
-
- return obj, nil
-}
-
-func (t *tracker) Add(obj runtime.Object) error {
- return t.add(obj, false)
-}
-
-func (t *tracker) Update(obj runtime.Object) error {
- return t.add(obj, true)
-}
-
-func (t *tracker) add(obj runtime.Object, replaceExisting bool) error {
- if meta.IsListType(obj) {
- return t.addList(obj, replaceExisting)
- }
-
- gvks, _, err := t.scheme.ObjectKinds(obj)
- if err != nil {
- return err
- }
- if len(gvks) == 0 {
- return fmt.Errorf("no registered kinds for %v", obj)
- }
-
- t.lock.Lock()
- defer t.lock.Unlock()
-
- for _, gvk := range gvks {
- gr := unversioned.GroupResource{Group: gvk.Group, Resource: gvk.Kind}
-
- // To avoid the object from being accidentally modified by caller
- // after it's been added to the tracker, we always store the deep
- // copy.
- obj, err = t.scheme.Copy(obj)
- if err != nil {
- return err
- }
-
- if status, ok := obj.(*unversioned.Status); ok && status.Details != nil {
- gvk.Kind = status.Details.Kind
- }
-
- newMeta, err := meta.Accessor(obj)
- if err != nil {
- return err
- }
-
- if err := checkNamespace(gvk, newMeta.GetNamespace()); err != nil {
- return err
- }
-
- for i, existingObj := range t.objects[gvk] {
- oldMeta, err := meta.Accessor(existingObj)
- if err != nil {
- return err
- }
- if oldMeta.GetNamespace() == newMeta.GetNamespace() && oldMeta.GetName() == newMeta.GetName() {
- if replaceExisting {
- t.objects[gvk][i] = obj
- return nil
- }
- return errors.NewAlreadyExists(gr, newMeta.GetName())
- }
- }
-
- if replaceExisting {
- // Tried to update but no matching object was found.
- return errors.NewNotFound(gr, newMeta.GetName())
- }
-
- t.objects[gvk] = append(t.objects[gvk], obj)
- }
-
- return nil
-}
-
-func (t *tracker) addList(obj runtime.Object, replaceExisting bool) error {
- list, err := meta.ExtractList(obj)
- if err != nil {
- return err
- }
- errs := runtime.DecodeList(list, t.decoder)
- if len(errs) > 0 {
- return errs[0]
- }
- for _, obj := range list {
- err := t.add(obj, replaceExisting)
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-func (t *tracker) Delete(gvk unversioned.GroupVersionKind, ns, name string) error {
- if err := checkNamespace(gvk, ns); err != nil {
- return err
- }
-
- t.lock.Lock()
- defer t.lock.Unlock()
-
- found := false
-
- for i, existingObj := range t.objects[gvk] {
- objMeta, err := meta.Accessor(existingObj)
- if err != nil {
- return err
- }
- if objMeta.GetNamespace() == ns && objMeta.GetName() == name {
- t.objects[gvk] = append(t.objects[gvk][:i], t.objects[gvk][i+1:]...)
- found = true
- break
- }
- }
-
- if found {
- return nil
- }
-
- return errors.NewNotFound(unversioned.GroupResource{Group: gvk.Group, Resource: gvk.Kind}, name)
-}
-
-// filterByNamespaceAndName returns all objects in the collection that
-// match provided namespace and name. Empty namespace matches
-// non-namespaced objects.
-func filterByNamespaceAndName(objs []runtime.Object, ns, name string) ([]runtime.Object, error) {
- var res []runtime.Object
-
- for _, obj := range objs {
- acc, err := meta.Accessor(obj)
- if err != nil {
- return nil, err
- }
- if ns != "" && acc.GetNamespace() != ns {
- continue
- }
- if name != "" && acc.GetName() != name {
- continue
- }
- res = append(res, obj)
- }
-
- return res, nil
-}
-
-// checkNamespace makes sure that the scope of gvk matches ns. It
-// returns an error if namespace is empty but gvk is a namespaced
-// kind, or if ns is non-empty and gvk is a namespaced kind.
-func checkNamespace(gvk unversioned.GroupVersionKind, ns string) error {
- group, err := registered.Group(gvk.Group)
- if err != nil {
- return err
- }
- mapping, err := group.RESTMapper.RESTMapping(gvk.GroupKind(), gvk.Version)
- if err != nil {
- return err
- }
- switch mapping.Scope.Name() {
- case meta.RESTScopeNameRoot:
- if ns != "" {
- return fmt.Errorf("namespace specified for a non-namespaced kind %s", gvk)
- }
- case meta.RESTScopeNameNamespace:
- if ns == "" {
- // Skipping this check for Events, since
- // controllers emit events that have no namespace,
- // even though Event is a namespaced resource.
- if gvk.Kind != "Event" {
- return fmt.Errorf("no namespace specified for a namespaced kind %s", gvk)
- }
- }
- }
-
- return nil
-}
-
-func DefaultWatchReactor(watchInterface watch.Interface, err error) WatchReactionFunc {
- return func(action Action) (bool, watch.Interface, error) {
- return true, watchInterface, err
- }
-}
-
-// SimpleReactor is a Reactor. Each reaction function is attached to a given verb,resource tuple. "*" in either field matches everything for that value.
-// For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions
-type SimpleReactor struct {
- Verb string
- Resource string
-
- Reaction ReactionFunc
-}
-
-func (r *SimpleReactor) Handles(action Action) bool {
- verbCovers := r.Verb == "*" || r.Verb == action.GetVerb()
- if !verbCovers {
- return false
- }
- resourceCovers := r.Resource == "*" || r.Resource == action.GetResource().Resource
- if !resourceCovers {
- return false
- }
-
- return true
-}
-
-func (r *SimpleReactor) React(action Action) (bool, runtime.Object, error) {
- return r.Reaction(action)
-}
-
-// SimpleWatchReactor is a WatchReactor. Each reaction function is attached to a given resource. "*" matches everything for that value.
-// For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions
-type SimpleWatchReactor struct {
- Resource string
-
- Reaction WatchReactionFunc
-}
-
-func (r *SimpleWatchReactor) Handles(action Action) bool {
- resourceCovers := r.Resource == "*" || r.Resource == action.GetResource().Resource
- if !resourceCovers {
- return false
- }
-
- return true
-}
-
-func (r *SimpleWatchReactor) React(action Action) (bool, watch.Interface, error) {
- return r.Reaction(action)
-}
-
-// SimpleProxyReactor is a ProxyReactor. Each reaction function is attached to a given resource. "*" matches everything for that value.
-// For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions.
-type SimpleProxyReactor struct {
- Resource string
-
- Reaction ProxyReactionFunc
-}
-
-func (r *SimpleProxyReactor) Handles(action Action) bool {
- resourceCovers := r.Resource == "*" || r.Resource == action.GetResource().Resource
- if !resourceCovers {
- return false
- }
-
- return true
-}
-
-func (r *SimpleProxyReactor) React(action Action) (bool, rest.ResponseWrapper, error) {
- return r.Reaction(action)
-}
diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/testing/fake_controller_source.go b/vendor/k8s.io/client-go/1.5/tools/cache/testing/fake_controller_source.go
deleted file mode 100644
index 0f5565137..000000000
--- a/vendor/k8s.io/client-go/1.5/tools/cache/testing/fake_controller_source.go
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
-Copyright 2015 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 framework
-
-import (
- "errors"
- "math/rand"
- "strconv"
- "sync"
-
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/api/meta"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/types"
- "k8s.io/client-go/1.5/pkg/watch"
-)
-
-func NewFakeControllerSource() *FakeControllerSource {
- return &FakeControllerSource{
- Items: map[nnu]runtime.Object{},
- Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull),
- }
-}
-
-func NewFakePVControllerSource() *FakePVControllerSource {
- return &FakePVControllerSource{
- FakeControllerSource{
- Items: map[nnu]runtime.Object{},
- Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull),
- }}
-}
-
-func NewFakePVCControllerSource() *FakePVCControllerSource {
- return &FakePVCControllerSource{
- FakeControllerSource{
- Items: map[nnu]runtime.Object{},
- Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull),
- }}
-}
-
-// FakeControllerSource implements listing/watching for testing.
-type FakeControllerSource struct {
- lock sync.RWMutex
- Items map[nnu]runtime.Object
- changes []watch.Event // one change per resourceVersion
- Broadcaster *watch.Broadcaster
-}
-
-type FakePVControllerSource struct {
- FakeControllerSource
-}
-
-type FakePVCControllerSource struct {
- FakeControllerSource
-}
-
-// namespace, name, uid to be used as a key.
-type nnu struct {
- namespace, name string
- uid types.UID
-}
-
-// Add adds an object to the set and sends an add event to watchers.
-// obj's ResourceVersion is set.
-func (f *FakeControllerSource) Add(obj runtime.Object) {
- f.Change(watch.Event{Type: watch.Added, Object: obj}, 1)
-}
-
-// Modify updates an object in the set and sends a modified event to watchers.
-// obj's ResourceVersion is set.
-func (f *FakeControllerSource) Modify(obj runtime.Object) {
- f.Change(watch.Event{Type: watch.Modified, Object: obj}, 1)
-}
-
-// Delete deletes an object from the set and sends a delete event to watchers.
-// obj's ResourceVersion is set.
-func (f *FakeControllerSource) Delete(lastValue runtime.Object) {
- f.Change(watch.Event{Type: watch.Deleted, Object: lastValue}, 1)
-}
-
-// AddDropWatch adds an object to the set but forgets to send an add event to
-// watchers.
-// obj's ResourceVersion is set.
-func (f *FakeControllerSource) AddDropWatch(obj runtime.Object) {
- f.Change(watch.Event{Type: watch.Added, Object: obj}, 0)
-}
-
-// ModifyDropWatch updates an object in the set but forgets to send a modify
-// event to watchers.
-// obj's ResourceVersion is set.
-func (f *FakeControllerSource) ModifyDropWatch(obj runtime.Object) {
- f.Change(watch.Event{Type: watch.Modified, Object: obj}, 0)
-}
-
-// DeleteDropWatch deletes an object from the set but forgets to send a delete
-// event to watchers.
-// obj's ResourceVersion is set.
-func (f *FakeControllerSource) DeleteDropWatch(lastValue runtime.Object) {
- f.Change(watch.Event{Type: watch.Deleted, Object: lastValue}, 0)
-}
-
-func (f *FakeControllerSource) key(accessor meta.Object) nnu {
- return nnu{accessor.GetNamespace(), accessor.GetName(), accessor.GetUID()}
-}
-
-// Change records the given event (setting the object's resource version) and
-// sends a watch event with the specified probability.
-func (f *FakeControllerSource) Change(e watch.Event, watchProbability float64) {
- f.lock.Lock()
- defer f.lock.Unlock()
-
- accessor, err := meta.Accessor(e.Object)
- if err != nil {
- panic(err) // this is test code only
- }
-
- resourceVersion := len(f.changes) + 1
- accessor.SetResourceVersion(strconv.Itoa(resourceVersion))
- f.changes = append(f.changes, e)
- key := f.key(accessor)
- switch e.Type {
- case watch.Added, watch.Modified:
- f.Items[key] = e.Object
- case watch.Deleted:
- delete(f.Items, key)
- }
-
- if rand.Float64() < watchProbability {
- f.Broadcaster.Action(e.Type, e.Object)
- }
-}
-
-func (f *FakeControllerSource) getListItemsLocked() ([]runtime.Object, error) {
- list := make([]runtime.Object, 0, len(f.Items))
- for _, obj := range f.Items {
- // Must make a copy to allow clients to modify the object.
- // Otherwise, if they make a change and write it back, they
- // will inadvertently change our canonical copy (in
- // addition to racing with other clients).
- objCopy, err := api.Scheme.DeepCopy(obj)
- if err != nil {
- return nil, err
- }
- list = append(list, objCopy.(runtime.Object))
- }
- return list, nil
-}
-
-// List returns a list object, with its resource version set.
-func (f *FakeControllerSource) List(options api.ListOptions) (runtime.Object, error) {
- f.lock.RLock()
- defer f.lock.RUnlock()
- list, err := f.getListItemsLocked()
- if err != nil {
- return nil, err
- }
- listObj := &api.List{}
- if err := meta.SetList(listObj, list); err != nil {
- return nil, err
- }
- objMeta, err := api.ListMetaFor(listObj)
- if err != nil {
- return nil, err
- }
- resourceVersion := len(f.changes)
- objMeta.ResourceVersion = strconv.Itoa(resourceVersion)
- return listObj, nil
-}
-
-// List returns a list object, with its resource version set.
-func (f *FakePVControllerSource) List(options api.ListOptions) (runtime.Object, error) {
- f.lock.RLock()
- defer f.lock.RUnlock()
- list, err := f.FakeControllerSource.getListItemsLocked()
- if err != nil {
- return nil, err
- }
- listObj := &api.PersistentVolumeList{}
- if err := meta.SetList(listObj, list); err != nil {
- return nil, err
- }
- objMeta, err := api.ListMetaFor(listObj)
- if err != nil {
- return nil, err
- }
- resourceVersion := len(f.changes)
- objMeta.ResourceVersion = strconv.Itoa(resourceVersion)
- return listObj, nil
-}
-
-// List returns a list object, with its resource version set.
-func (f *FakePVCControllerSource) List(options api.ListOptions) (runtime.Object, error) {
- f.lock.RLock()
- defer f.lock.RUnlock()
- list, err := f.FakeControllerSource.getListItemsLocked()
- if err != nil {
- return nil, err
- }
- listObj := &api.PersistentVolumeClaimList{}
- if err := meta.SetList(listObj, list); err != nil {
- return nil, err
- }
- objMeta, err := api.ListMetaFor(listObj)
- if err != nil {
- return nil, err
- }
- resourceVersion := len(f.changes)
- objMeta.ResourceVersion = strconv.Itoa(resourceVersion)
- return listObj, nil
-}
-
-// Watch returns a watch, which will be pre-populated with all changes
-// after resourceVersion.
-func (f *FakeControllerSource) Watch(options api.ListOptions) (watch.Interface, error) {
- f.lock.RLock()
- defer f.lock.RUnlock()
- rc, err := strconv.Atoi(options.ResourceVersion)
- if err != nil {
- return nil, err
- }
- if rc < len(f.changes) {
- changes := []watch.Event{}
- for _, c := range f.changes[rc:] {
- // Must make a copy to allow clients to modify the
- // object. Otherwise, if they make a change and write
- // it back, they will inadvertently change the our
- // canonical copy (in addition to racing with other
- // clients).
- objCopy, err := api.Scheme.DeepCopy(c.Object)
- if err != nil {
- return nil, err
- }
- changes = append(changes, watch.Event{Type: c.Type, Object: objCopy.(runtime.Object)})
- }
- return f.Broadcaster.WatchWithPrefix(changes), nil
- } else if rc > len(f.changes) {
- return nil, errors.New("resource version in the future not supported by this fake")
- }
- return f.Broadcaster.Watch(), nil
-}
-
-// Shutdown closes the underlying broadcaster, waiting for events to be
-// delivered. It's an error to call any method after calling shutdown. This is
-// enforced by Shutdown() leaving f locked.
-func (f *FakeControllerSource) Shutdown() {
- f.lock.Lock() // Purposely no unlock.
- f.Broadcaster.Shutdown()
-}
diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/testing/fake_controller_source_test.go b/vendor/k8s.io/client-go/1.5/tools/cache/testing/fake_controller_source_test.go
deleted file mode 100644
index 135af37b7..000000000
--- a/vendor/k8s.io/client-go/1.5/tools/cache/testing/fake_controller_source_test.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2015 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 framework
-
-import (
- "sync"
- "testing"
-
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/watch"
-)
-
-// ensure the watch delivers the requested and only the requested items.
-func consume(t *testing.T, w watch.Interface, rvs []string, done *sync.WaitGroup) {
- defer done.Done()
- for _, rv := range rvs {
- got, ok := <-w.ResultChan()
- if !ok {
- t.Errorf("%#v: unexpected channel close, wanted %v", rvs, rv)
- return
- }
- gotRV := got.Object.(*api.Pod).ObjectMeta.ResourceVersion
- if e, a := rv, gotRV; e != a {
- t.Errorf("wanted %v, got %v", e, a)
- } else {
- t.Logf("Got %v as expected", gotRV)
- }
- }
- // We should not get anything else.
- got, open := <-w.ResultChan()
- if open {
- t.Errorf("%#v: unwanted object %#v", rvs, got)
- }
-}
-
-func TestRCNumber(t *testing.T) {
- pod := func(name string) *api.Pod {
- return &api.Pod{
- ObjectMeta: api.ObjectMeta{
- Name: name,
- },
- }
- }
-
- wg := &sync.WaitGroup{}
- wg.Add(3)
-
- source := NewFakeControllerSource()
- source.Add(pod("foo"))
- source.Modify(pod("foo"))
- source.Modify(pod("foo"))
-
- w, err := source.Watch(api.ListOptions{ResourceVersion: "1"})
- if err != nil {
- t.Fatalf("Unexpected error: %v", err)
- }
- go consume(t, w, []string{"2", "3"}, wg)
-
- list, err := source.List(api.ListOptions{})
- if err != nil {
- t.Fatalf("Unexpected error: %v", err)
- }
- if e, a := "3", list.(*api.List).ResourceVersion; e != a {
- t.Errorf("wanted %v, got %v", e, a)
- }
-
- w2, err := source.Watch(api.ListOptions{ResourceVersion: "2"})
- if err != nil {
- t.Fatalf("Unexpected error: %v", err)
- }
- go consume(t, w2, []string{"3"}, wg)
-
- w3, err := source.Watch(api.ListOptions{ResourceVersion: "3"})
- if err != nil {
- t.Fatalf("Unexpected error: %v", err)
- }
- go consume(t, w3, []string{}, wg)
- source.Shutdown()
- wg.Wait()
-}
diff --git a/vendor/k8s.io/client-go/1.5/tools/portforward/doc.go b/vendor/k8s.io/client-go/1.5/tools/portforward/doc.go
deleted file mode 100644
index 82dbacbef..000000000
--- a/vendor/k8s.io/client-go/1.5/tools/portforward/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-Copyright 2015 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 portforward adds support for SSH-like port forwarding from the client's
-// local host to remote containers.
-package portforward // import "k8s.io/client-go/1.5/tools/portforward"
diff --git a/vendor/k8s.io/client-go/1.5/tools/portforward/portforward.go b/vendor/k8s.io/client-go/1.5/tools/portforward/portforward.go
deleted file mode 100644
index 80cb4f103..000000000
--- a/vendor/k8s.io/client-go/1.5/tools/portforward/portforward.go
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
-Copyright 2015 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 portforward
-
-import (
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "net"
- "net/http"
- "strconv"
- "strings"
- "sync"
-
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/pkg/kubelet/server/portforward"
- "k8s.io/client-go/1.5/pkg/util/httpstream"
- "k8s.io/client-go/1.5/pkg/util/runtime"
-)
-
-// PortForwarder knows how to listen for local connections and forward them to
-// a remote pod via an upgraded HTTP request.
-type PortForwarder struct {
- ports []ForwardedPort
- stopChan <-chan struct{}
-
- dialer httpstream.Dialer
- streamConn httpstream.Connection
- listeners []io.Closer
- Ready chan struct{}
- requestIDLock sync.Mutex
- requestID int
- out io.Writer
- errOut io.Writer
-}
-
-// ForwardedPort contains a Local:Remote port pairing.
-type ForwardedPort struct {
- Local uint16
- Remote uint16
-}
-
-/*
- valid port specifications:
-
- 5000
- - forwards from localhost:5000 to pod:5000
-
- 8888:5000
- - forwards from localhost:8888 to pod:5000
-
- 0:5000
- :5000
- - selects a random available local port,
- forwards from localhost:<random port> to pod:5000
-*/
-func parsePorts(ports []string) ([]ForwardedPort, error) {
- var forwards []ForwardedPort
- for _, portString := range ports {
- parts := strings.Split(portString, ":")
- var localString, remoteString string
- if len(parts) == 1 {
- localString = parts[0]
- remoteString = parts[0]
- } else if len(parts) == 2 {
- localString = parts[0]
- if localString == "" {
- // support :5000
- localString = "0"
- }
- remoteString = parts[1]
- } else {
- return nil, fmt.Errorf("Invalid port format '%s'", portString)
- }
-
- localPort, err := strconv.ParseUint(localString, 10, 16)
- if err != nil {
- return nil, fmt.Errorf("Error parsing local port '%s': %s", localString, err)
- }
-
- remotePort, err := strconv.ParseUint(remoteString, 10, 16)
- if err != nil {
- return nil, fmt.Errorf("Error parsing remote port '%s': %s", remoteString, err)
- }
- if remotePort == 0 {
- return nil, fmt.Errorf("Remote port must be > 0")
- }
-
- forwards = append(forwards, ForwardedPort{uint16(localPort), uint16(remotePort)})
- }
-
- return forwards, nil
-}
-
-// New creates a new PortForwarder.
-func New(dialer httpstream.Dialer, ports []string, stopChan <-chan struct{}, readyChan chan struct{}, out, errOut io.Writer) (*PortForwarder, error) {
- if len(ports) == 0 {
- return nil, errors.New("You must specify at least 1 port")
- }
- parsedPorts, err := parsePorts(ports)
- if err != nil {
- return nil, err
- }
- return &PortForwarder{
- dialer: dialer,
- ports: parsedPorts,
- stopChan: stopChan,
- Ready: readyChan,
- out: out,
- errOut: errOut,
- }, nil
-}
-
-// ForwardPorts formats and executes a port forwarding request. The connection will remain
-// open until stopChan is closed.
-func (pf *PortForwarder) ForwardPorts() error {
- defer pf.Close()
-
- var err error
- pf.streamConn, _, err = pf.dialer.Dial(portforward.PortForwardProtocolV1Name)
- if err != nil {
- return fmt.Errorf("error upgrading connection: %s", err)
- }
- defer pf.streamConn.Close()
-
- return pf.forward()
-}
-
-// forward dials the remote host specific in req, upgrades the request, starts
-// listeners for each port specified in ports, and forwards local connections
-// to the remote host via streams.
-func (pf *PortForwarder) forward() error {
- var err error
-
- listenSuccess := false
- for _, port := range pf.ports {
- err = pf.listenOnPort(&port)
- switch {
- case err == nil:
- listenSuccess = true
- default:
- if pf.errOut != nil {
- fmt.Fprintf(pf.errOut, "Unable to listen on port %d: %v\n", port.Local, err)
- }
- }
- }
-
- if !listenSuccess {
- return fmt.Errorf("Unable to listen on any of the requested ports: %v", pf.ports)
- }
-
- if pf.Ready != nil {
- close(pf.Ready)
- }
-
- // wait for interrupt or conn closure
- select {
- case <-pf.stopChan:
- case <-pf.streamConn.CloseChan():
- runtime.HandleError(errors.New("lost connection to pod"))
- }
-
- return nil
-}
-
-// listenOnPort delegates tcp4 and tcp6 listener creation and waits for connections on both of these addresses.
-// If both listener creation fail, an error is raised.
-func (pf *PortForwarder) listenOnPort(port *ForwardedPort) error {
- errTcp4 := pf.listenOnPortAndAddress(port, "tcp4", "127.0.0.1")
- errTcp6 := pf.listenOnPortAndAddress(port, "tcp6", "[::1]")
- if errTcp4 != nil && errTcp6 != nil {
- return fmt.Errorf("All listeners failed to create with the following errors: %s, %s", errTcp4, errTcp6)
- }
- return nil
-}
-
-// listenOnPortAndAddress delegates listener creation and waits for new connections
-// in the background f
-func (pf *PortForwarder) listenOnPortAndAddress(port *ForwardedPort, protocol string, address string) error {
- listener, err := pf.getListener(protocol, address, port)
- if err != nil {
- return err
- }
- pf.listeners = append(pf.listeners, listener)
- go pf.waitForConnection(listener, *port)
- return nil
-}
-
-// getListener creates a listener on the interface targeted by the given hostname on the given port with
-// the given protocol. protocol is in net.Listen style which basically admits values like tcp, tcp4, tcp6
-func (pf *PortForwarder) getListener(protocol string, hostname string, port *ForwardedPort) (net.Listener, error) {
- listener, err := net.Listen(protocol, fmt.Sprintf("%s:%d", hostname, port.Local))
- if err != nil {
- runtime.HandleError(fmt.Errorf("Unable to create listener: Error %s", err))
- return nil, err
- }
- listenerAddress := listener.Addr().String()
- host, localPort, _ := net.SplitHostPort(listenerAddress)
- localPortUInt, err := strconv.ParseUint(localPort, 10, 16)
-
- if err != nil {
- return nil, fmt.Errorf("Error parsing local port: %s from %s (%s)", err, listenerAddress, host)
- }
- port.Local = uint16(localPortUInt)
- if pf.out != nil {
- fmt.Fprintf(pf.out, "Forwarding from %s:%d -> %d\n", hostname, localPortUInt, port.Remote)
- }
-
- return listener, nil
-}
-
-// waitForConnection waits for new connections to listener and handles them in
-// the background.
-func (pf *PortForwarder) waitForConnection(listener net.Listener, port ForwardedPort) {
- for {
- conn, err := listener.Accept()
- if err != nil {
- // TODO consider using something like https://github.com/hydrogen18/stoppableListener?
- if !strings.Contains(strings.ToLower(err.Error()), "use of closed network connection") {
- runtime.HandleError(fmt.Errorf("Error accepting connection on port %d: %v", port.Local, err))
- }
- return
- }
- go pf.handleConnection(conn, port)
- }
-}
-
-func (pf *PortForwarder) nextRequestID() int {
- pf.requestIDLock.Lock()
- defer pf.requestIDLock.Unlock()
- id := pf.requestID
- pf.requestID++
- return id
-}
-
-// handleConnection copies data between the local connection and the stream to
-// the remote server.
-func (pf *PortForwarder) handleConnection(conn net.Conn, port ForwardedPort) {
- defer conn.Close()
-
- if pf.out != nil {
- fmt.Fprintf(pf.out, "Handling connection for %d\n", port.Local)
- }
-
- requestID := pf.nextRequestID()
-
- // create error stream
- headers := http.Header{}
- headers.Set(api.StreamType, api.StreamTypeError)
- headers.Set(api.PortHeader, fmt.Sprintf("%d", port.Remote))
- headers.Set(api.PortForwardRequestIDHeader, strconv.Itoa(requestID))
- errorStream, err := pf.streamConn.CreateStream(headers)
- if err != nil {
- runtime.HandleError(fmt.Errorf("error creating error stream for port %d -> %d: %v", port.Local, port.Remote, err))
- return
- }
- // we're not writing to this stream
- errorStream.Close()
-
- errorChan := make(chan error)
- go func() {
- message, err := ioutil.ReadAll(errorStream)
- switch {
- case err != nil:
- errorChan <- fmt.Errorf("error reading from error stream for port %d -> %d: %v", port.Local, port.Remote, err)
- case len(message) > 0:
- errorChan <- fmt.Errorf("an error occurred forwarding %d -> %d: %v", port.Local, port.Remote, string(message))
- }
- close(errorChan)
- }()
-
- // create data stream
- headers.Set(api.StreamType, api.StreamTypeData)
- dataStream, err := pf.streamConn.CreateStream(headers)
- if err != nil {
- runtime.HandleError(fmt.Errorf("error creating forwarding stream for port %d -> %d: %v", port.Local, port.Remote, err))
- return
- }
-
- localError := make(chan struct{})
- remoteDone := make(chan struct{})
-
- go func() {
- // Copy from the remote side to the local port.
- if _, err := io.Copy(conn, dataStream); err != nil && !strings.Contains(err.Error(), "use of closed network connection") {
- runtime.HandleError(fmt.Errorf("error copying from remote stream to local connection: %v", err))
- }
-
- // inform the select below that the remote copy is done
- close(remoteDone)
- }()
-
- go func() {
- // inform server we're not sending any more data after copy unblocks
- defer dataStream.Close()
-
- // Copy from the local port to the remote side.
- if _, err := io.Copy(dataStream, conn); err != nil && !strings.Contains(err.Error(), "use of closed network connection") {
- runtime.HandleError(fmt.Errorf("error copying from local connection to remote stream: %v", err))
- // break out of the select below without waiting for the other copy to finish
- close(localError)
- }
- }()
-
- // wait for either a local->remote error or for copying from remote->local to finish
- select {
- case <-remoteDone:
- case <-localError:
- }
-
- // always expect something on errorChan (it may be nil)
- err = <-errorChan
- if err != nil {
- runtime.HandleError(err)
- }
-}
-
-func (pf *PortForwarder) Close() {
- // stop all listeners
- for _, l := range pf.listeners {
- if err := l.Close(); err != nil {
- runtime.HandleError(fmt.Errorf("error closing listener: %v", err))
- }
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/tools/record/doc.go b/vendor/k8s.io/client-go/1.5/tools/record/doc.go
deleted file mode 100644
index a3d6d8ce5..000000000
--- a/vendor/k8s.io/client-go/1.5/tools/record/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2014 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 record has all client logic for recording and reporting events.
-package record // import "k8s.io/client-go/1.5/tools/record"
diff --git a/vendor/k8s.io/client-go/1.5/tools/record/event.go b/vendor/k8s.io/client-go/1.5/tools/record/event.go
deleted file mode 100644
index f8ba8c7c3..000000000
--- a/vendor/k8s.io/client-go/1.5/tools/record/event.go
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
-Copyright 2014 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 record
-
-import (
- "fmt"
- "math/rand"
- "time"
-
- "k8s.io/client-go/1.5/pkg/api/errors"
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/util/clock"
- utilruntime "k8s.io/client-go/1.5/pkg/util/runtime"
- "k8s.io/client-go/1.5/pkg/watch"
- "k8s.io/client-go/1.5/rest"
-
- "net/http"
-
- "github.com/golang/glog"
-)
-
-const maxTriesPerEvent = 12
-
-var defaultSleepDuration = 10 * time.Second
-
-const maxQueuedEvents = 1000
-
-// EventSink knows how to store events (client.Client implements it.)
-// EventSink must respect the namespace that will be embedded in 'event'.
-// It is assumed that EventSink will return the same sorts of errors as
-// pkg/client's REST client.
-type EventSink interface {
- Create(event *v1.Event) (*v1.Event, error)
- Update(event *v1.Event) (*v1.Event, error)
- Patch(oldEvent *v1.Event, data []byte) (*v1.Event, error)
-}
-
-// EventRecorder knows how to record events on behalf of an EventSource.
-type EventRecorder interface {
- // Event constructs an event from the given information and puts it in the queue for sending.
- // 'object' is the object this event is about. Event will make a reference-- or you may also
- // pass a reference to the object directly.
- // 'type' of this event, and can be one of Normal, Warning. New types could be added in future
- // 'reason' is the reason this event is generated. 'reason' should be short and unique; it
- // should be in UpperCamelCase format (starting with a capital letter). "reason" will be used
- // to automate handling of events, so imagine people writing switch statements to handle them.
- // You want to make that easy.
- // 'message' is intended to be human readable.
- //
- // The resulting event will be created in the same namespace as the reference object.
- Event(object runtime.Object, eventtype, reason, message string)
-
- // Eventf is just like Event, but with Sprintf for the message field.
- Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{})
-
- // PastEventf is just like Eventf, but with an option to specify the event's 'timestamp' field.
- PastEventf(object runtime.Object, timestamp unversioned.Time, eventtype, reason, messageFmt string, args ...interface{})
-}
-
-// EventBroadcaster knows how to receive events and send them to any EventSink, watcher, or log.
-type EventBroadcaster interface {
- // StartEventWatcher starts sending events received from this EventBroadcaster to the given
- // event handler function. The return value can be ignored or used to stop recording, if
- // desired.
- StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface
-
- // StartRecordingToSink starts sending events received from this EventBroadcaster to the given
- // sink. The return value can be ignored or used to stop recording, if desired.
- StartRecordingToSink(sink EventSink) watch.Interface
-
- // StartLogging starts sending events received from this EventBroadcaster to the given logging
- // function. The return value can be ignored or used to stop recording, if desired.
- StartLogging(logf func(format string, args ...interface{})) watch.Interface
-
- // NewRecorder returns an EventRecorder that can be used to send events to this EventBroadcaster
- // with the event source set to the given event source.
- NewRecorder(source v1.EventSource) EventRecorder
-}
-
-// Creates a new event broadcaster.
-func NewBroadcaster() EventBroadcaster {
- return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), defaultSleepDuration}
-}
-
-func NewBroadcasterForTests(sleepDuration time.Duration) EventBroadcaster {
- return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), sleepDuration}
-}
-
-type eventBroadcasterImpl struct {
- *watch.Broadcaster
- sleepDuration time.Duration
-}
-
-// StartRecordingToSink starts sending events received from the specified eventBroadcaster to the given sink.
-// The return value can be ignored or used to stop recording, if desired.
-// TODO: make me an object with parameterizable queue length and retry interval
-func (eventBroadcaster *eventBroadcasterImpl) StartRecordingToSink(sink EventSink) watch.Interface {
- // The default math/rand package functions aren't thread safe, so create a
- // new Rand object for each StartRecording call.
- randGen := rand.New(rand.NewSource(time.Now().UnixNano()))
- eventCorrelator := NewEventCorrelator(clock.RealClock{})
- return eventBroadcaster.StartEventWatcher(
- func(event *v1.Event) {
- recordToSink(sink, event, eventCorrelator, randGen, eventBroadcaster.sleepDuration)
- })
-}
-
-func recordToSink(sink EventSink, event *v1.Event, eventCorrelator *EventCorrelator, randGen *rand.Rand, sleepDuration time.Duration) {
- // Make a copy before modification, because there could be multiple listeners.
- // Events are safe to copy like this.
- eventCopy := *event
- event = &eventCopy
- result, err := eventCorrelator.EventCorrelate(event)
- if err != nil {
- utilruntime.HandleError(err)
- }
- if result.Skip {
- return
- }
- tries := 0
- for {
- if recordEvent(sink, result.Event, result.Patch, result.Event.Count > 1, eventCorrelator) {
- break
- }
- tries++
- if tries >= maxTriesPerEvent {
- glog.Errorf("Unable to write event '%#v' (retry limit exceeded!)", event)
- break
- }
- // Randomize the first sleep so that various clients won't all be
- // synced up if the master goes down.
- if tries == 1 {
- time.Sleep(time.Duration(float64(sleepDuration) * randGen.Float64()))
- } else {
- time.Sleep(sleepDuration)
- }
- }
-}
-
-func isKeyNotFoundError(err error) bool {
- statusErr, _ := err.(*errors.StatusError)
-
- if statusErr != nil && statusErr.Status().Code == http.StatusNotFound {
- return true
- }
-
- return false
-}
-
-// recordEvent attempts to write event to a sink. It returns true if the event
-// was successfully recorded or discarded, false if it should be retried.
-// If updateExistingEvent is false, it creates a new event, otherwise it updates
-// existing event.
-func recordEvent(sink EventSink, event *v1.Event, patch []byte, updateExistingEvent bool, eventCorrelator *EventCorrelator) bool {
- var newEvent *v1.Event
- var err error
- if updateExistingEvent {
- newEvent, err = sink.Patch(event, patch)
- }
- // Update can fail because the event may have been removed and it no longer exists.
- if !updateExistingEvent || (updateExistingEvent && isKeyNotFoundError(err)) {
- // Making sure that ResourceVersion is empty on creation
- event.ResourceVersion = ""
- newEvent, err = sink.Create(event)
- }
- if err == nil {
- // we need to update our event correlator with the server returned state to handle name/resourceversion
- eventCorrelator.UpdateState(newEvent)
- return true
- }
-
- // If we can't contact the server, then hold everything while we keep trying.
- // Otherwise, something about the event is malformed and we should abandon it.
- switch err.(type) {
- case *rest.RequestConstructionError:
- // We will construct the request the same next time, so don't keep trying.
- glog.Errorf("Unable to construct event '%#v': '%v' (will not retry!)", event, err)
- return true
- case *errors.StatusError:
- if errors.IsAlreadyExists(err) {
- glog.V(5).Infof("Server rejected event '%#v': '%v' (will not retry!)", event, err)
- } else {
- glog.Errorf("Server rejected event '%#v': '%v' (will not retry!)", event, err)
- }
- return true
- case *errors.UnexpectedObjectError:
- // We don't expect this; it implies the server's response didn't match a
- // known pattern. Go ahead and retry.
- default:
- // This case includes actual http transport errors. Go ahead and retry.
- }
- glog.Errorf("Unable to write event: '%v' (may retry after sleeping)", err)
- return false
-}
-
-// StartLogging starts sending events received from this EventBroadcaster to the given logging function.
-// The return value can be ignored or used to stop recording, if desired.
-func (eventBroadcaster *eventBroadcasterImpl) StartLogging(logf func(format string, args ...interface{})) watch.Interface {
- return eventBroadcaster.StartEventWatcher(
- func(e *v1.Event) {
- logf("Event(%#v): type: '%v' reason: '%v' %v", e.InvolvedObject, e.Type, e.Reason, e.Message)
- })
-}
-
-// StartEventWatcher starts sending events received from this EventBroadcaster to the given event handler function.
-// The return value can be ignored or used to stop recording, if desired.
-func (eventBroadcaster *eventBroadcasterImpl) StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface {
- watcher := eventBroadcaster.Watch()
- go func() {
- defer utilruntime.HandleCrash()
- for {
- watchEvent, open := <-watcher.ResultChan()
- if !open {
- return
- }
- event, ok := watchEvent.Object.(*v1.Event)
- if !ok {
- // This is all local, so there's no reason this should
- // ever happen.
- continue
- }
- eventHandler(event)
- }
- }()
- return watcher
-}
-
-// NewRecorder returns an EventRecorder that records events with the given event source.
-func (eventBroadcaster *eventBroadcasterImpl) NewRecorder(source v1.EventSource) EventRecorder {
- return &recorderImpl{source, eventBroadcaster.Broadcaster, clock.RealClock{}}
-}
-
-type recorderImpl struct {
- source v1.EventSource
- *watch.Broadcaster
- clock clock.Clock
-}
-
-func (recorder *recorderImpl) generateEvent(object runtime.Object, timestamp unversioned.Time, eventtype, reason, message string) {
- ref, err := v1.GetReference(object)
- if err != nil {
- glog.Errorf("Could not construct reference to: '%#v' due to: '%v'. Will not report event: '%v' '%v' '%v'", object, err, eventtype, reason, message)
- return
- }
-
- if !validateEventType(eventtype) {
- glog.Errorf("Unsupported event type: '%v'", eventtype)
- return
- }
-
- event := recorder.makeEvent(ref, eventtype, reason, message)
- event.Source = recorder.source
-
- go func() {
- // NOTE: events should be a non-blocking operation
- defer utilruntime.HandleCrash()
- recorder.Action(watch.Added, event)
- }()
-}
-
-func validateEventType(eventtype string) bool {
- switch eventtype {
- case v1.EventTypeNormal, v1.EventTypeWarning:
- return true
- }
- return false
-}
-
-func (recorder *recorderImpl) Event(object runtime.Object, eventtype, reason, message string) {
- recorder.generateEvent(object, unversioned.Now(), eventtype, reason, message)
-}
-
-func (recorder *recorderImpl) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) {
- recorder.Event(object, eventtype, reason, fmt.Sprintf(messageFmt, args...))
-}
-
-func (recorder *recorderImpl) PastEventf(object runtime.Object, timestamp unversioned.Time, eventtype, reason, messageFmt string, args ...interface{}) {
- recorder.generateEvent(object, timestamp, eventtype, reason, fmt.Sprintf(messageFmt, args...))
-}
-
-func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, eventtype, reason, message string) *v1.Event {
- t := unversioned.Time{Time: recorder.clock.Now()}
- namespace := ref.Namespace
- if namespace == "" {
- namespace = v1.NamespaceDefault
- }
- return &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()),
- Namespace: namespace,
- },
- InvolvedObject: *ref,
- Reason: reason,
- Message: message,
- FirstTimestamp: t,
- LastTimestamp: t,
- Count: 1,
- Type: eventtype,
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/tools/record/event_test.go b/vendor/k8s.io/client-go/1.5/tools/record/event_test.go
deleted file mode 100644
index cdef349c5..000000000
--- a/vendor/k8s.io/client-go/1.5/tools/record/event_test.go
+++ /dev/null
@@ -1,914 +0,0 @@
-/*
-Copyright 2014 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 record
-
-import (
- "encoding/json"
- "fmt"
- "math/rand"
- "net/http"
- "strconv"
- "testing"
- "time"
-
- "k8s.io/client-go/1.5/pkg/api/errors"
- _ "k8s.io/client-go/1.5/pkg/api/install" // To register api.Pod used in tests below
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
- k8sruntime "k8s.io/client-go/1.5/pkg/runtime"
- "k8s.io/client-go/1.5/pkg/util/clock"
- "k8s.io/client-go/1.5/pkg/util/strategicpatch"
- "k8s.io/client-go/1.5/rest"
-)
-
-type testEventSink struct {
- OnCreate func(e *v1.Event) (*v1.Event, error)
- OnUpdate func(e *v1.Event) (*v1.Event, error)
- OnPatch func(e *v1.Event, p []byte) (*v1.Event, error)
-}
-
-// CreateEvent records the event for testing.
-func (t *testEventSink) Create(e *v1.Event) (*v1.Event, error) {
- if t.OnCreate != nil {
- return t.OnCreate(e)
- }
- return e, nil
-}
-
-// UpdateEvent records the event for testing.
-func (t *testEventSink) Update(e *v1.Event) (*v1.Event, error) {
- if t.OnUpdate != nil {
- return t.OnUpdate(e)
- }
- return e, nil
-}
-
-// PatchEvent records the event for testing.
-func (t *testEventSink) Patch(e *v1.Event, p []byte) (*v1.Event, error) {
- if t.OnPatch != nil {
- return t.OnPatch(e, p)
- }
- return e, nil
-}
-
-type OnCreateFunc func(*v1.Event) (*v1.Event, error)
-
-func OnCreateFactory(testCache map[string]*v1.Event, createEvent chan<- *v1.Event) OnCreateFunc {
- return func(event *v1.Event) (*v1.Event, error) {
- testCache[getEventKey(event)] = event
- createEvent <- event
- return event, nil
- }
-}
-
-type OnPatchFunc func(*v1.Event, []byte) (*v1.Event, error)
-
-func OnPatchFactory(testCache map[string]*v1.Event, patchEvent chan<- *v1.Event) OnPatchFunc {
- return func(event *v1.Event, patch []byte) (*v1.Event, error) {
- cachedEvent, found := testCache[getEventKey(event)]
- if !found {
- return nil, fmt.Errorf("unexpected error: couldn't find Event in testCache.")
- }
- originalData, err := json.Marshal(cachedEvent)
- if err != nil {
- return nil, fmt.Errorf("unexpected error: %v", err)
- }
- patched, err := strategicpatch.StrategicMergePatch(originalData, patch, event)
- if err != nil {
- return nil, fmt.Errorf("unexpected error: %v", err)
- }
- patchedObj := &v1.Event{}
- err = json.Unmarshal(patched, patchedObj)
- if err != nil {
- return nil, fmt.Errorf("unexpected error: %v", err)
- }
- patchEvent <- patchedObj
- return patchedObj, nil
- }
-}
-
-func TestEventf(t *testing.T) {
- testPod := &v1.Pod{
- ObjectMeta: v1.ObjectMeta{
- SelfLink: "/api/version/pods/foo",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- },
- }
- testPod2 := &v1.Pod{
- ObjectMeta: v1.ObjectMeta{
- SelfLink: "/api/version/pods/foo",
- Name: "foo",
- Namespace: "baz",
- UID: "differentUid",
- },
- }
- testRef, err := v1.GetPartialReference(testPod, "spec.containers[2]")
- testRef2, err := v1.GetPartialReference(testPod2, "spec.containers[3]")
- if err != nil {
- t.Fatal(err)
- }
- table := []struct {
- obj k8sruntime.Object
- eventtype string
- reason string
- messageFmt string
- elements []interface{}
- expect *v1.Event
- expectLog string
- expectUpdate bool
- }{
- {
- obj: testRef,
- eventtype: v1.EventTypeNormal,
- reason: "Started",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- APIVersion: "version",
- FieldPath: "spec.containers[2]",
- },
- Reason: "Started",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 1,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
- expectUpdate: false,
- },
- {
- obj: testPod,
- eventtype: v1.EventTypeNormal,
- reason: "Killed",
- messageFmt: "some other verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- APIVersion: "version",
- },
- Reason: "Killed",
- Message: "some other verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 1,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'Killed' some other verbose message: 1`,
- expectUpdate: false,
- },
- {
- obj: testRef,
- eventtype: v1.EventTypeNormal,
- reason: "Started",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- APIVersion: "version",
- FieldPath: "spec.containers[2]",
- },
- Reason: "Started",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 2,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
- expectUpdate: true,
- },
- {
- obj: testRef2,
- eventtype: v1.EventTypeNormal,
- reason: "Started",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "differentUid",
- APIVersion: "version",
- FieldPath: "spec.containers[3]",
- },
- Reason: "Started",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 1,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
- expectUpdate: false,
- },
- {
- obj: testRef,
- eventtype: v1.EventTypeNormal,
- reason: "Started",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- APIVersion: "version",
- FieldPath: "spec.containers[2]",
- },
- Reason: "Started",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 3,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
- expectUpdate: true,
- },
- {
- obj: testRef2,
- eventtype: v1.EventTypeNormal,
- reason: "Stopped",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "differentUid",
- APIVersion: "version",
- FieldPath: "spec.containers[3]",
- },
- Reason: "Stopped",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 1,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`,
- expectUpdate: false,
- },
- {
- obj: testRef2,
- eventtype: v1.EventTypeNormal,
- reason: "Stopped",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "differentUid",
- APIVersion: "version",
- FieldPath: "spec.containers[3]",
- },
- Reason: "Stopped",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 2,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`,
- expectUpdate: true,
- },
- }
-
- testCache := map[string]*v1.Event{}
- logCalled := make(chan struct{})
- createEvent := make(chan *v1.Event)
- updateEvent := make(chan *v1.Event)
- patchEvent := make(chan *v1.Event)
- testEvents := testEventSink{
- OnCreate: OnCreateFactory(testCache, createEvent),
- OnUpdate: func(event *v1.Event) (*v1.Event, error) {
- updateEvent <- event
- return event, nil
- },
- OnPatch: OnPatchFactory(testCache, patchEvent),
- }
- eventBroadcaster := NewBroadcasterForTests(0)
- sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents)
-
- clock := clock.NewFakeClock(time.Now())
- recorder := recorderWithFakeClock(v1.EventSource{Component: "eventTest"}, eventBroadcaster, clock)
- for index, item := range table {
- clock.Step(1 * time.Second)
- logWatcher := eventBroadcaster.StartLogging(func(formatter string, args ...interface{}) {
- if e, a := item.expectLog, fmt.Sprintf(formatter, args...); e != a {
- t.Errorf("Expected '%v', got '%v'", e, a)
- }
- logCalled <- struct{}{}
- })
- recorder.Eventf(item.obj, item.eventtype, item.reason, item.messageFmt, item.elements...)
-
- <-logCalled
-
- // validate event
- if item.expectUpdate {
- actualEvent := <-patchEvent
- validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
- } else {
- actualEvent := <-createEvent
- validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
- }
- logWatcher.Stop()
- }
- sinkWatcher.Stop()
-}
-
-func recorderWithFakeClock(eventSource v1.EventSource, eventBroadcaster EventBroadcaster, clock clock.Clock) EventRecorder {
- return &recorderImpl{eventSource, eventBroadcaster.(*eventBroadcasterImpl).Broadcaster, clock}
-}
-
-func TestWriteEventError(t *testing.T) {
- type entry struct {
- timesToSendError int
- attemptsWanted int
- err error
- }
- table := map[string]*entry{
- "giveUp1": {
- timesToSendError: 1000,
- attemptsWanted: 1,
- err: &rest.RequestConstructionError{},
- },
- "giveUp2": {
- timesToSendError: 1000,
- attemptsWanted: 1,
- err: &errors.StatusError{},
- },
- "retry1": {
- timesToSendError: 1000,
- attemptsWanted: 12,
- err: &errors.UnexpectedObjectError{},
- },
- "retry2": {
- timesToSendError: 1000,
- attemptsWanted: 12,
- err: fmt.Errorf("A weird error"),
- },
- "succeedEventually": {
- timesToSendError: 2,
- attemptsWanted: 2,
- err: fmt.Errorf("A weird error"),
- },
- }
-
- eventCorrelator := NewEventCorrelator(clock.RealClock{})
- randGen := rand.New(rand.NewSource(time.Now().UnixNano()))
-
- for caseName, ent := range table {
- attempts := 0
- sink := &testEventSink{
- OnCreate: func(event *v1.Event) (*v1.Event, error) {
- attempts++
- if attempts < ent.timesToSendError {
- return nil, ent.err
- }
- return event, nil
- },
- }
- ev := &v1.Event{}
- recordToSink(sink, ev, eventCorrelator, randGen, 0)
- if attempts != ent.attemptsWanted {
- t.Errorf("case %v: wanted %d, got %d attempts", caseName, ent.attemptsWanted, attempts)
- }
- }
-}
-
-func TestUpdateExpiredEvent(t *testing.T) {
- eventCorrelator := NewEventCorrelator(clock.RealClock{})
- randGen := rand.New(rand.NewSource(time.Now().UnixNano()))
-
- var createdEvent *v1.Event
-
- sink := &testEventSink{
- OnPatch: func(*v1.Event, []byte) (*v1.Event, error) {
- return nil, &errors.StatusError{
- ErrStatus: unversioned.Status{
- Code: http.StatusNotFound,
- Reason: unversioned.StatusReasonNotFound,
- }}
- },
- OnCreate: func(event *v1.Event) (*v1.Event, error) {
- createdEvent = event
- return event, nil
- },
- }
-
- ev := &v1.Event{}
- ev.ResourceVersion = "updated-resource-version"
- ev.Count = 2
- recordToSink(sink, ev, eventCorrelator, randGen, 0)
-
- if createdEvent == nil {
- t.Error("Event did not get created after patch failed")
- return
- }
-
- if createdEvent.ResourceVersion != "" {
- t.Errorf("Event did not have its resource version cleared, was %s", createdEvent.ResourceVersion)
- }
-}
-
-func TestLotsOfEvents(t *testing.T) {
- recorderCalled := make(chan struct{})
- loggerCalled := make(chan struct{})
-
- // Fail each event a few times to ensure there's some load on the tested code.
- var counts [1000]int
- testEvents := testEventSink{
- OnCreate: func(event *v1.Event) (*v1.Event, error) {
- num, err := strconv.Atoi(event.Message)
- if err != nil {
- t.Error(err)
- return event, nil
- }
- counts[num]++
- if counts[num] < 5 {
- return nil, fmt.Errorf("fake error")
- }
- recorderCalled <- struct{}{}
- return event, nil
- },
- }
-
- eventBroadcaster := NewBroadcasterForTests(0)
- sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents)
- logWatcher := eventBroadcaster.StartLogging(func(formatter string, args ...interface{}) {
- loggerCalled <- struct{}{}
- })
- recorder := eventBroadcaster.NewRecorder(v1.EventSource{Component: "eventTest"})
- ref := &v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- APIVersion: "version",
- }
- for i := 0; i < maxQueuedEvents; i++ {
- // we need to vary the reason to prevent aggregation
- go recorder.Eventf(ref, v1.EventTypeNormal, "Reason-"+string(i), strconv.Itoa(i))
- }
- // Make sure no events were dropped by either of the listeners.
- for i := 0; i < maxQueuedEvents; i++ {
- <-recorderCalled
- <-loggerCalled
- }
- // Make sure that every event was attempted 5 times
- for i := 0; i < maxQueuedEvents; i++ {
- if counts[i] < 5 {
- t.Errorf("Only attempted to record event '%d' %d times.", i, counts[i])
- }
- }
- sinkWatcher.Stop()
- logWatcher.Stop()
-}
-
-func TestEventfNoNamespace(t *testing.T) {
- testPod := &v1.Pod{
- ObjectMeta: v1.ObjectMeta{
- SelfLink: "/api/version/pods/foo",
- Name: "foo",
- UID: "bar",
- },
- }
- testRef, err := v1.GetPartialReference(testPod, "spec.containers[2]")
- if err != nil {
- t.Fatal(err)
- }
- table := []struct {
- obj k8sruntime.Object
- eventtype string
- reason string
- messageFmt string
- elements []interface{}
- expect *v1.Event
- expectLog string
- expectUpdate bool
- }{
- {
- obj: testRef,
- eventtype: v1.EventTypeNormal,
- reason: "Started",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "default",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "",
- UID: "bar",
- APIVersion: "version",
- FieldPath: "spec.containers[2]",
- },
- Reason: "Started",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 1,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
- expectUpdate: false,
- },
- }
-
- testCache := map[string]*v1.Event{}
- logCalled := make(chan struct{})
- createEvent := make(chan *v1.Event)
- updateEvent := make(chan *v1.Event)
- patchEvent := make(chan *v1.Event)
- testEvents := testEventSink{
- OnCreate: OnCreateFactory(testCache, createEvent),
- OnUpdate: func(event *v1.Event) (*v1.Event, error) {
- updateEvent <- event
- return event, nil
- },
- OnPatch: OnPatchFactory(testCache, patchEvent),
- }
- eventBroadcaster := NewBroadcasterForTests(0)
- sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents)
-
- clock := clock.NewFakeClock(time.Now())
- recorder := recorderWithFakeClock(v1.EventSource{Component: "eventTest"}, eventBroadcaster, clock)
-
- for index, item := range table {
- clock.Step(1 * time.Second)
- logWatcher := eventBroadcaster.StartLogging(func(formatter string, args ...interface{}) {
- if e, a := item.expectLog, fmt.Sprintf(formatter, args...); e != a {
- t.Errorf("Expected '%v', got '%v'", e, a)
- }
- logCalled <- struct{}{}
- })
- recorder.Eventf(item.obj, item.eventtype, item.reason, item.messageFmt, item.elements...)
-
- <-logCalled
-
- // validate event
- if item.expectUpdate {
- actualEvent := <-patchEvent
- validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
- } else {
- actualEvent := <-createEvent
- validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
- }
-
- logWatcher.Stop()
- }
- sinkWatcher.Stop()
-}
-
-func TestMultiSinkCache(t *testing.T) {
- testPod := &v1.Pod{
- ObjectMeta: v1.ObjectMeta{
- SelfLink: "/api/version/pods/foo",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- },
- }
- testPod2 := &v1.Pod{
- ObjectMeta: v1.ObjectMeta{
- SelfLink: "/api/version/pods/foo",
- Name: "foo",
- Namespace: "baz",
- UID: "differentUid",
- },
- }
- testRef, err := v1.GetPartialReference(testPod, "spec.containers[2]")
- testRef2, err := v1.GetPartialReference(testPod2, "spec.containers[3]")
- if err != nil {
- t.Fatal(err)
- }
- table := []struct {
- obj k8sruntime.Object
- eventtype string
- reason string
- messageFmt string
- elements []interface{}
- expect *v1.Event
- expectLog string
- expectUpdate bool
- }{
- {
- obj: testRef,
- eventtype: v1.EventTypeNormal,
- reason: "Started",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- APIVersion: "version",
- FieldPath: "spec.containers[2]",
- },
- Reason: "Started",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 1,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
- expectUpdate: false,
- },
- {
- obj: testPod,
- eventtype: v1.EventTypeNormal,
- reason: "Killed",
- messageFmt: "some other verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- APIVersion: "version",
- },
- Reason: "Killed",
- Message: "some other verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 1,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'Killed' some other verbose message: 1`,
- expectUpdate: false,
- },
- {
- obj: testRef,
- eventtype: v1.EventTypeNormal,
- reason: "Started",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- APIVersion: "version",
- FieldPath: "spec.containers[2]",
- },
- Reason: "Started",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 2,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
- expectUpdate: true,
- },
- {
- obj: testRef2,
- eventtype: v1.EventTypeNormal,
- reason: "Started",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "differentUid",
- APIVersion: "version",
- FieldPath: "spec.containers[3]",
- },
- Reason: "Started",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 1,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
- expectUpdate: false,
- },
- {
- obj: testRef,
- eventtype: v1.EventTypeNormal,
- reason: "Started",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "bar",
- APIVersion: "version",
- FieldPath: "spec.containers[2]",
- },
- Reason: "Started",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 3,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`,
- expectUpdate: true,
- },
- {
- obj: testRef2,
- eventtype: v1.EventTypeNormal,
- reason: "Stopped",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "differentUid",
- APIVersion: "version",
- FieldPath: "spec.containers[3]",
- },
- Reason: "Stopped",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 1,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`,
- expectUpdate: false,
- },
- {
- obj: testRef2,
- eventtype: v1.EventTypeNormal,
- reason: "Stopped",
- messageFmt: "some verbose message: %v",
- elements: []interface{}{1},
- expect: &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: "foo",
- Namespace: "baz",
- },
- InvolvedObject: v1.ObjectReference{
- Kind: "Pod",
- Name: "foo",
- Namespace: "baz",
- UID: "differentUid",
- APIVersion: "version",
- FieldPath: "spec.containers[3]",
- },
- Reason: "Stopped",
- Message: "some verbose message: 1",
- Source: v1.EventSource{Component: "eventTest"},
- Count: 2,
- Type: v1.EventTypeNormal,
- },
- expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`,
- expectUpdate: true,
- },
- }
-
- testCache := map[string]*v1.Event{}
- createEvent := make(chan *v1.Event)
- updateEvent := make(chan *v1.Event)
- patchEvent := make(chan *v1.Event)
- testEvents := testEventSink{
- OnCreate: OnCreateFactory(testCache, createEvent),
- OnUpdate: func(event *v1.Event) (*v1.Event, error) {
- updateEvent <- event
- return event, nil
- },
- OnPatch: OnPatchFactory(testCache, patchEvent),
- }
-
- testCache2 := map[string]*v1.Event{}
- createEvent2 := make(chan *v1.Event)
- updateEvent2 := make(chan *v1.Event)
- patchEvent2 := make(chan *v1.Event)
- testEvents2 := testEventSink{
- OnCreate: OnCreateFactory(testCache2, createEvent2),
- OnUpdate: func(event *v1.Event) (*v1.Event, error) {
- updateEvent2 <- event
- return event, nil
- },
- OnPatch: OnPatchFactory(testCache2, patchEvent2),
- }
-
- eventBroadcaster := NewBroadcasterForTests(0)
- clock := clock.NewFakeClock(time.Now())
- recorder := recorderWithFakeClock(v1.EventSource{Component: "eventTest"}, eventBroadcaster, clock)
-
- sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents)
- for index, item := range table {
- clock.Step(1 * time.Second)
- recorder.Eventf(item.obj, item.eventtype, item.reason, item.messageFmt, item.elements...)
-
- // validate event
- if item.expectUpdate {
- actualEvent := <-patchEvent
- validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
- } else {
- actualEvent := <-createEvent
- validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
- }
- }
-
- // Another StartRecordingToSink call should start to record events with new clean cache.
- sinkWatcher2 := eventBroadcaster.StartRecordingToSink(&testEvents2)
- for index, item := range table {
- clock.Step(1 * time.Second)
- recorder.Eventf(item.obj, item.eventtype, item.reason, item.messageFmt, item.elements...)
-
- // validate event
- if item.expectUpdate {
- actualEvent := <-patchEvent2
- validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
- } else {
- actualEvent := <-createEvent2
- validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
- }
- }
-
- sinkWatcher.Stop()
- sinkWatcher2.Stop()
-}
diff --git a/vendor/k8s.io/client-go/1.5/tools/record/events_cache.go b/vendor/k8s.io/client-go/1.5/tools/record/events_cache.go
deleted file mode 100644
index 5bd8b8d2b..000000000
--- a/vendor/k8s.io/client-go/1.5/tools/record/events_cache.go
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
-Copyright 2015 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 record
-
-import (
- "encoding/json"
- "fmt"
- "strings"
- "sync"
- "time"
-
- "github.com/golang/groupcache/lru"
-
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/pkg/util/clock"
- "k8s.io/client-go/1.5/pkg/util/sets"
- "k8s.io/client-go/1.5/pkg/util/strategicpatch"
-)
-
-const (
- maxLruCacheEntries = 4096
-
- // if we see the same event that varies only by message
- // more than 10 times in a 10 minute period, aggregate the event
- defaultAggregateMaxEvents = 10
- defaultAggregateIntervalInSeconds = 600
-)
-
-// getEventKey builds unique event key based on source, involvedObject, reason, message
-func getEventKey(event *v1.Event) string {
- return strings.Join([]string{
- event.Source.Component,
- event.Source.Host,
- event.InvolvedObject.Kind,
- event.InvolvedObject.Namespace,
- event.InvolvedObject.Name,
- string(event.InvolvedObject.UID),
- event.InvolvedObject.APIVersion,
- event.Type,
- event.Reason,
- event.Message,
- },
- "")
-}
-
-// EventFilterFunc is a function that returns true if the event should be skipped
-type EventFilterFunc func(event *v1.Event) bool
-
-// DefaultEventFilterFunc returns false for all incoming events
-func DefaultEventFilterFunc(event *v1.Event) bool {
- return false
-}
-
-// EventAggregatorKeyFunc is responsible for grouping events for aggregation
-// It returns a tuple of the following:
-// aggregateKey - key the identifies the aggregate group to bucket this event
-// localKey - key that makes this event in the local group
-type EventAggregatorKeyFunc func(event *v1.Event) (aggregateKey string, localKey string)
-
-// EventAggregatorByReasonFunc aggregates events by exact match on event.Source, event.InvolvedObject, event.Type and event.Reason
-func EventAggregatorByReasonFunc(event *v1.Event) (string, string) {
- return strings.Join([]string{
- event.Source.Component,
- event.Source.Host,
- event.InvolvedObject.Kind,
- event.InvolvedObject.Namespace,
- event.InvolvedObject.Name,
- string(event.InvolvedObject.UID),
- event.InvolvedObject.APIVersion,
- event.Type,
- event.Reason,
- },
- ""), event.Message
-}
-
-// EventAggregatorMessageFunc is responsible for producing an aggregation message
-type EventAggregatorMessageFunc func(event *v1.Event) string
-
-// EventAggregratorByReasonMessageFunc returns an aggregate message by prefixing the incoming message
-func EventAggregatorByReasonMessageFunc(event *v1.Event) string {
- return "(events with common reason combined)"
-}
-
-// EventAggregator identifies similar events and aggregates them into a single event
-type EventAggregator struct {
- sync.RWMutex
-
- // The cache that manages aggregation state
- cache *lru.Cache
-
- // The function that groups events for aggregation
- keyFunc EventAggregatorKeyFunc
-
- // The function that generates a message for an aggregate event
- messageFunc EventAggregatorMessageFunc
-
- // The maximum number of events in the specified interval before aggregation occurs
- maxEvents int
-
- // The amount of time in seconds that must transpire since the last occurrence of a similar event before it's considered new
- maxIntervalInSeconds int
-
- // clock is used to allow for testing over a time interval
- clock clock.Clock
-}
-
-// NewEventAggregator returns a new instance of an EventAggregator
-func NewEventAggregator(lruCacheSize int, keyFunc EventAggregatorKeyFunc, messageFunc EventAggregatorMessageFunc,
- maxEvents int, maxIntervalInSeconds int, clock clock.Clock) *EventAggregator {
- return &EventAggregator{
- cache: lru.New(lruCacheSize),
- keyFunc: keyFunc,
- messageFunc: messageFunc,
- maxEvents: maxEvents,
- maxIntervalInSeconds: maxIntervalInSeconds,
- clock: clock,
- }
-}
-
-// aggregateRecord holds data used to perform aggregation decisions
-type aggregateRecord struct {
- // we track the number of unique local keys we have seen in the aggregate set to know when to actually aggregate
- // if the size of this set exceeds the max, we know we need to aggregate
- localKeys sets.String
- // The last time at which the aggregate was recorded
- lastTimestamp unversioned.Time
-}
-
-// EventAggregate identifies similar events and groups into a common event if required
-func (e *EventAggregator) EventAggregate(newEvent *v1.Event) (*v1.Event, error) {
- aggregateKey, localKey := e.keyFunc(newEvent)
- now := unversioned.NewTime(e.clock.Now())
- record := aggregateRecord{localKeys: sets.NewString(), lastTimestamp: now}
- e.Lock()
- defer e.Unlock()
- value, found := e.cache.Get(aggregateKey)
- if found {
- record = value.(aggregateRecord)
- }
-
- // if the last event was far enough in the past, it is not aggregated, and we must reset state
- maxInterval := time.Duration(e.maxIntervalInSeconds) * time.Second
- interval := now.Time.Sub(record.lastTimestamp.Time)
- if interval > maxInterval {
- record = aggregateRecord{localKeys: sets.NewString()}
- }
- record.localKeys.Insert(localKey)
- record.lastTimestamp = now
- e.cache.Add(aggregateKey, record)
-
- if record.localKeys.Len() < e.maxEvents {
- return newEvent, nil
- }
-
- // do not grow our local key set any larger than max
- record.localKeys.PopAny()
-
- // create a new aggregate event
- eventCopy := &v1.Event{
- ObjectMeta: v1.ObjectMeta{
- Name: fmt.Sprintf("%v.%x", newEvent.InvolvedObject.Name, now.UnixNano()),
- Namespace: newEvent.Namespace,
- },
- Count: 1,
- FirstTimestamp: now,
- InvolvedObject: newEvent.InvolvedObject,
- LastTimestamp: now,
- Message: e.messageFunc(newEvent),
- Type: newEvent.Type,
- Reason: newEvent.Reason,
- Source: newEvent.Source,
- }
- return eventCopy, nil
-}
-
-// eventLog records data about when an event was observed
-type eventLog struct {
- // The number of times the event has occurred since first occurrence.
- count int
-
- // The time at which the event was first recorded.
- firstTimestamp unversioned.Time
-
- // The unique name of the first occurrence of this event
- name string
-
- // Resource version returned from previous interaction with server
- resourceVersion string
-}
-
-// eventLogger logs occurrences of an event
-type eventLogger struct {
- sync.RWMutex
- cache *lru.Cache
- clock clock.Clock
-}
-
-// newEventLogger observes events and counts their frequencies
-func newEventLogger(lruCacheEntries int, clock clock.Clock) *eventLogger {
- return &eventLogger{cache: lru.New(lruCacheEntries), clock: clock}
-}
-
-// eventObserve records the event, and determines if its frequency should update
-func (e *eventLogger) eventObserve(newEvent *v1.Event) (*v1.Event, []byte, error) {
- var (
- patch []byte
- err error
- )
- key := getEventKey(newEvent)
- eventCopy := *newEvent
- event := &eventCopy
-
- e.Lock()
- defer e.Unlock()
-
- lastObservation := e.lastEventObservationFromCache(key)
-
- // we have seen this event before, so we must prepare a patch
- if lastObservation.count > 0 {
- // update the event based on the last observation so patch will work as desired
- event.Name = lastObservation.name
- event.ResourceVersion = lastObservation.resourceVersion
- event.FirstTimestamp = lastObservation.firstTimestamp
- event.Count = int32(lastObservation.count) + 1
-
- eventCopy2 := *event
- eventCopy2.Count = 0
- eventCopy2.LastTimestamp = unversioned.NewTime(time.Unix(0, 0))
-
- newData, _ := json.Marshal(event)
- oldData, _ := json.Marshal(eventCopy2)
- patch, err = strategicpatch.CreateStrategicMergePatch(oldData, newData, event)
- }
-
- // record our new observation
- e.cache.Add(
- key,
- eventLog{
- count: int(event.Count),
- firstTimestamp: event.FirstTimestamp,
- name: event.Name,
- resourceVersion: event.ResourceVersion,
- },
- )
- return event, patch, err
-}
-
-// updateState updates its internal tracking information based on latest server state
-func (e *eventLogger) updateState(event *v1.Event) {
- key := getEventKey(event)
- e.Lock()
- defer e.Unlock()
- // record our new observation
- e.cache.Add(
- key,
- eventLog{
- count: int(event.Count),
- firstTimestamp: event.FirstTimestamp,
- name: event.Name,
- resourceVersion: event.ResourceVersion,
- },
- )
-}
-
-// lastEventObservationFromCache returns the event from the cache, reads must be protected via external lock
-func (e *eventLogger) lastEventObservationFromCache(key string) eventLog {
- value, ok := e.cache.Get(key)
- if ok {
- observationValue, ok := value.(eventLog)
- if ok {
- return observationValue
- }
- }
- return eventLog{}
-}
-
-// EventCorrelator processes all incoming events and performs analysis to avoid overwhelming the system. It can filter all
-// incoming events to see if the event should be filtered from further processing. It can aggregate similar events that occur
-// frequently to protect the system from spamming events that are difficult for users to distinguish. It performs de-duplication
-// to ensure events that are observed multiple times are compacted into a single event with increasing counts.
-type EventCorrelator struct {
- // the function to filter the event
- filterFunc EventFilterFunc
- // the object that performs event aggregation
- aggregator *EventAggregator
- // the object that observes events as they come through
- logger *eventLogger
-}
-
-// EventCorrelateResult is the result of a Correlate
-type EventCorrelateResult struct {
- // the event after correlation
- Event *v1.Event
- // if provided, perform a strategic patch when updating the record on the server
- Patch []byte
- // if true, do no further processing of the event
- Skip bool
-}
-
-// NewEventCorrelator returns an EventCorrelator configured with default values.
-//
-// The EventCorrelator is responsible for event filtering, aggregating, and counting
-// prior to interacting with the API server to record the event.
-//
-// The default behavior is as follows:
-// * No events are filtered from being recorded
-// * Aggregation is performed if a similar event is recorded 10 times in a
-// in a 10 minute rolling interval. A similar event is an event that varies only by
-// the Event.Message field. Rather than recording the precise event, aggregation
-// will create a new event whose message reports that it has combined events with
-// the same reason.
-// * Events are incrementally counted if the exact same event is encountered multiple
-// times.
-func NewEventCorrelator(clock clock.Clock) *EventCorrelator {
- cacheSize := maxLruCacheEntries
- return &EventCorrelator{
- filterFunc: DefaultEventFilterFunc,
- aggregator: NewEventAggregator(
- cacheSize,
- EventAggregatorByReasonFunc,
- EventAggregatorByReasonMessageFunc,
- defaultAggregateMaxEvents,
- defaultAggregateIntervalInSeconds,
- clock),
- logger: newEventLogger(cacheSize, clock),
- }
-}
-
-// EventCorrelate filters, aggregates, counts, and de-duplicates all incoming events
-func (c *EventCorrelator) EventCorrelate(newEvent *v1.Event) (*EventCorrelateResult, error) {
- if c.filterFunc(newEvent) {
- return &EventCorrelateResult{Skip: true}, nil
- }
- aggregateEvent, err := c.aggregator.EventAggregate(newEvent)
- if err != nil {
- return &EventCorrelateResult{}, err
- }
- observedEvent, patch, err := c.logger.eventObserve(aggregateEvent)
- return &EventCorrelateResult{Event: observedEvent, Patch: patch}, err
-}
-
-// UpdateState based on the latest observed state from server
-func (c *EventCorrelator) UpdateState(event *v1.Event) {
- c.logger.updateState(event)
-}
diff --git a/vendor/k8s.io/client-go/1.5/tools/record/events_cache_test.go b/vendor/k8s.io/client-go/1.5/tools/record/events_cache_test.go
deleted file mode 100644
index 629d0962d..000000000
--- a/vendor/k8s.io/client-go/1.5/tools/record/events_cache_test.go
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
-Copyright 2015 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 record
-
-import (
- "reflect"
- "strings"
- "testing"
- "time"
-
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/api/v1"
- "k8s.io/client-go/1.5/pkg/util/clock"
- "k8s.io/client-go/1.5/pkg/util/diff"
-)
-
-func makeObjectReference(kind, name, namespace string) v1.ObjectReference {
- return v1.ObjectReference{
- Kind: kind,
- Name: name,
- Namespace: namespace,
- UID: "C934D34AFB20242",
- APIVersion: "version",
- }
-}
-
-func makeEvent(reason, message string, involvedObject v1.ObjectReference) v1.Event {
- eventTime := unversioned.Now()
- event := v1.Event{
- Reason: reason,
- Message: message,
- InvolvedObject: involvedObject,
- Source: v1.EventSource{
- Component: "kubelet",
- Host: "kublet.node1",
- },
- Count: 1,
- FirstTimestamp: eventTime,
- LastTimestamp: eventTime,
- Type: v1.EventTypeNormal,
- }
- return event
-}
-
-func makeEvents(num int, template v1.Event) []v1.Event {
- events := []v1.Event{}
- for i := 0; i < num; i++ {
- events = append(events, template)
- }
- return events
-}
-
-func makeUniqueEvents(num int) []v1.Event {
- events := []v1.Event{}
- kind := "Pod"
- for i := 0; i < num; i++ {
- reason := strings.Join([]string{"reason", string(i)}, "-")
- message := strings.Join([]string{"message", string(i)}, "-")
- name := strings.Join([]string{"pod", string(i)}, "-")
- namespace := strings.Join([]string{"ns", string(i)}, "-")
- involvedObject := makeObjectReference(kind, name, namespace)
- events = append(events, makeEvent(reason, message, involvedObject))
- }
- return events
-}
-
-func makeSimilarEvents(num int, template v1.Event, messagePrefix string) []v1.Event {
- events := makeEvents(num, template)
- for i := range events {
- events[i].Message = strings.Join([]string{messagePrefix, string(i), events[i].Message}, "-")
- }
- return events
-}
-
-func setCount(event v1.Event, count int) v1.Event {
- event.Count = int32(count)
- return event
-}
-
-func validateEvent(messagePrefix string, actualEvent *v1.Event, expectedEvent *v1.Event, t *testing.T) (*v1.Event, error) {
- recvEvent := *actualEvent
- expectCompression := expectedEvent.Count > 1
- t.Logf("%v - expectedEvent.Count is %d\n", messagePrefix, expectedEvent.Count)
- // Just check that the timestamp was set.
- if recvEvent.FirstTimestamp.IsZero() || recvEvent.LastTimestamp.IsZero() {
- t.Errorf("%v - timestamp wasn't set: %#v", messagePrefix, recvEvent)
- }
- actualFirstTimestamp := recvEvent.FirstTimestamp
- actualLastTimestamp := recvEvent.LastTimestamp
- if actualFirstTimestamp.Equal(actualLastTimestamp) {
- if expectCompression {
- t.Errorf("%v - FirstTimestamp (%q) and LastTimestamp (%q) must be different to indicate event compression happened, but were the same. Actual Event: %#v", messagePrefix, actualFirstTimestamp, actualLastTimestamp, recvEvent)
- }
- } else {
- if expectedEvent.Count == 1 {
- t.Errorf("%v - FirstTimestamp (%q) and LastTimestamp (%q) must be equal to indicate only one occurrence of the event, but were different. Actual Event: %#v", messagePrefix, actualFirstTimestamp, actualLastTimestamp, recvEvent)
- }
- }
- // Temp clear time stamps for comparison because actual values don't matter for comparison
- recvEvent.FirstTimestamp = expectedEvent.FirstTimestamp
- recvEvent.LastTimestamp = expectedEvent.LastTimestamp
- // Check that name has the right prefix.
- if n, en := recvEvent.Name, expectedEvent.Name; !strings.HasPrefix(n, en) {
- t.Errorf("%v - Name '%v' does not contain prefix '%v'", messagePrefix, n, en)
- }
- recvEvent.Name = expectedEvent.Name
- if e, a := expectedEvent, &recvEvent; !reflect.DeepEqual(e, a) {
- t.Errorf("%v - diff: %s", messagePrefix, diff.ObjectGoPrintDiff(e, a))
- }
- recvEvent.FirstTimestamp = actualFirstTimestamp
- recvEvent.LastTimestamp = actualLastTimestamp
- return actualEvent, nil
-}
-
-// TestDefaultEventFilterFunc ensures that no events are filtered
-func TestDefaultEventFilterFunc(t *testing.T) {
- event := makeEvent("end-of-world", "it was fun", makeObjectReference("Pod", "pod1", "other"))
- if DefaultEventFilterFunc(&event) {
- t.Fatalf("DefaultEventFilterFunc should always return false")
- }
-}
-
-// TestEventAggregatorByReasonFunc ensures that two events are aggregated if they vary only by event.message
-func TestEventAggregatorByReasonFunc(t *testing.T) {
- event1 := makeEvent("end-of-world", "it was fun", makeObjectReference("Pod", "pod1", "other"))
- event2 := makeEvent("end-of-world", "it was awful", makeObjectReference("Pod", "pod1", "other"))
- event3 := makeEvent("nevermind", "it was a bug", makeObjectReference("Pod", "pod1", "other"))
-
- aggKey1, localKey1 := EventAggregatorByReasonFunc(&event1)
- aggKey2, localKey2 := EventAggregatorByReasonFunc(&event2)
- aggKey3, _ := EventAggregatorByReasonFunc(&event3)
-
- if aggKey1 != aggKey2 {
- t.Errorf("Expected %v equal %v", aggKey1, aggKey2)
- }
- if localKey1 == localKey2 {
- t.Errorf("Expected %v to not equal %v", aggKey1, aggKey3)
- }
- if aggKey1 == aggKey3 {
- t.Errorf("Expected %v to not equal %v", aggKey1, aggKey3)
- }
-}
-
-// TestEventAggregatorByReasonMessageFunc validates the proper output for an aggregate message
-func TestEventAggregatorByReasonMessageFunc(t *testing.T) {
- expected := "(events with common reason combined)"
- event1 := makeEvent("end-of-world", "it was fun", makeObjectReference("Pod", "pod1", "other"))
- if actual := EventAggregatorByReasonMessageFunc(&event1); expected != actual {
- t.Errorf("Expected %v got %v", expected, actual)
- }
-}
-
-// TestEventCorrelator validates proper counting, aggregation of events
-func TestEventCorrelator(t *testing.T) {
- firstEvent := makeEvent("first", "i am first", makeObjectReference("Pod", "my-pod", "my-ns"))
- duplicateEvent := makeEvent("duplicate", "me again", makeObjectReference("Pod", "my-pod", "my-ns"))
- uniqueEvent := makeEvent("unique", "snowflake", makeObjectReference("Pod", "my-pod", "my-ns"))
- similarEvent := makeEvent("similar", "similar message", makeObjectReference("Pod", "my-pod", "my-ns"))
- aggregateEvent := makeEvent(similarEvent.Reason, EventAggregatorByReasonMessageFunc(&similarEvent), similarEvent.InvolvedObject)
- scenario := map[string]struct {
- previousEvents []v1.Event
- newEvent v1.Event
- expectedEvent v1.Event
- intervalSeconds int
- }{
- "create-a-single-event": {
- previousEvents: []v1.Event{},
- newEvent: firstEvent,
- expectedEvent: setCount(firstEvent, 1),
- intervalSeconds: 5,
- },
- "the-same-event-should-just-count": {
- previousEvents: makeEvents(1, duplicateEvent),
- newEvent: duplicateEvent,
- expectedEvent: setCount(duplicateEvent, 2),
- intervalSeconds: 5,
- },
- "the-same-event-should-just-count-even-if-more-than-aggregate": {
- previousEvents: makeEvents(defaultAggregateMaxEvents, duplicateEvent),
- newEvent: duplicateEvent,
- expectedEvent: setCount(duplicateEvent, defaultAggregateMaxEvents+1),
- intervalSeconds: 5,
- },
- "create-many-unique-events": {
- previousEvents: makeUniqueEvents(30),
- newEvent: uniqueEvent,
- expectedEvent: setCount(uniqueEvent, 1),
- intervalSeconds: 5,
- },
- "similar-events-should-aggregate-event": {
- previousEvents: makeSimilarEvents(defaultAggregateMaxEvents-1, similarEvent, similarEvent.Message),
- newEvent: similarEvent,
- expectedEvent: setCount(aggregateEvent, 1),
- intervalSeconds: 5,
- },
- "similar-events-many-times-should-count-the-aggregate": {
- previousEvents: makeSimilarEvents(defaultAggregateMaxEvents, similarEvent, similarEvent.Message),
- newEvent: similarEvent,
- expectedEvent: setCount(aggregateEvent, 2),
- intervalSeconds: 5,
- },
- "similar-events-whose-interval-is-greater-than-aggregate-interval-do-not-aggregate": {
- previousEvents: makeSimilarEvents(defaultAggregateMaxEvents-1, similarEvent, similarEvent.Message),
- newEvent: similarEvent,
- expectedEvent: setCount(similarEvent, 1),
- intervalSeconds: defaultAggregateIntervalInSeconds,
- },
- }
-
- for testScenario, testInput := range scenario {
- eventInterval := time.Duration(testInput.intervalSeconds) * time.Second
- clock := clock.IntervalClock{Time: time.Now(), Duration: eventInterval}
- correlator := NewEventCorrelator(&clock)
- for i := range testInput.previousEvents {
- event := testInput.previousEvents[i]
- now := unversioned.NewTime(clock.Now())
- event.FirstTimestamp = now
- event.LastTimestamp = now
- result, err := correlator.EventCorrelate(&event)
- if err != nil {
- t.Errorf("scenario %v: unexpected error playing back prevEvents %v", testScenario, err)
- }
- correlator.UpdateState(result.Event)
- }
-
- // update the input to current clock value
- now := unversioned.NewTime(clock.Now())
- testInput.newEvent.FirstTimestamp = now
- testInput.newEvent.LastTimestamp = now
- result, err := correlator.EventCorrelate(&testInput.newEvent)
- if err != nil {
- t.Errorf("scenario %v: unexpected error correlating input event %v", testScenario, err)
- }
-
- _, err = validateEvent(testScenario, result.Event, &testInput.expectedEvent, t)
- if err != nil {
- t.Errorf("scenario %v: unexpected error validating result %v", testScenario, err)
- }
- }
-}
diff --git a/vendor/k8s.io/client-go/1.5/tools/record/fake.go b/vendor/k8s.io/client-go/1.5/tools/record/fake.go
deleted file mode 100644
index 712d4ff29..000000000
--- a/vendor/k8s.io/client-go/1.5/tools/record/fake.go
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-Copyright 2015 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 record
-
-import (
- "fmt"
-
- "k8s.io/client-go/1.5/pkg/api/unversioned"
- "k8s.io/client-go/1.5/pkg/runtime"
-)
-
-// FakeRecorder is used as a fake during tests. It is thread safe. It is usable
-// when created manually and not by NewFakeRecorder, however all events may be
-// thrown away in this case.
-type FakeRecorder struct {
- Events chan string
-}
-
-func (f *FakeRecorder) Event(object runtime.Object, eventtype, reason, message string) {
- if f.Events != nil {
- f.Events <- fmt.Sprintf("%s %s %s", eventtype, reason, message)
- }
-}
-
-func (f *FakeRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) {
- if f.Events != nil {
- f.Events <- fmt.Sprintf(eventtype+" "+reason+" "+messageFmt, args...)
- }
-}
-
-func (f *FakeRecorder) PastEventf(object runtime.Object, timestamp unversioned.Time, eventtype, reason, messageFmt string, args ...interface{}) {
-}
-
-// NewFakeRecorder creates new fake event recorder with event channel with
-// buffer of given size.
-func NewFakeRecorder(bufferSize int) *FakeRecorder {
- return &FakeRecorder{
- Events: make(chan string, bufferSize),
- }
-}
diff --git a/vendor/k8s.io/client-go/examples/in-cluster/main.go b/vendor/k8s.io/client-go/examples/in-cluster/main.go
deleted file mode 100644
index b0135a737..000000000
--- a/vendor/k8s.io/client-go/examples/in-cluster/main.go
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-Copyright 2016 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 main
-
-import (
- "fmt"
- "time"
-
- "k8s.io/client-go/1.5/kubernetes"
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/rest"
-)
-
-func main() {
- // creates the in-cluster config
- config, err := rest.InClusterConfig()
- if err != nil {
- panic(err.Error())
- }
- // creates the clientset
- clientset, err := kubernetes.NewForConfig(config)
- if err != nil {
- panic(err.Error())
- }
- for {
- pods, err := clientset.Core().Pods("").List(api.ListOptions{})
- if err != nil {
- panic(err.Error())
- }
- fmt.Printf("There are %d pods in the cluster\n", len(pods.Items))
- time.Sleep(10 * time.Second)
- }
-}
diff --git a/vendor/k8s.io/client-go/examples/out-of-cluster/main.go b/vendor/k8s.io/client-go/examples/out-of-cluster/main.go
deleted file mode 100644
index bedf0dfc4..000000000
--- a/vendor/k8s.io/client-go/examples/out-of-cluster/main.go
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright 2016 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 main
-
-import (
- "flag"
- "fmt"
- "time"
-
- "k8s.io/client-go/1.5/kubernetes"
- "k8s.io/client-go/1.5/pkg/api"
- "k8s.io/client-go/1.5/tools/clientcmd"
-)
-
-var (
- kubeconfig = flag.String("kubeconfig", "./config", "absolute path to the kubeconfig file")
-)
-
-func main() {
- flag.Parse()
- // uses the current context in kubeconfig
- config, err := clientcmd.BuildConfigFromFlags("", *kubeconfig)
- if err != nil {
- panic(err.Error())
- }
- // creates the clientset
- clientset, err := kubernetes.NewForConfig(config)
- if err != nil {
- panic(err.Error())
- }
- for {
- pods, err := clientset.Core().Pods("").List(api.ListOptions{})
- if err != nil {
- panic(err.Error())
- }
- fmt.Printf("There are %d pods in the cluster\n", len(pods.Items))
- time.Sleep(10 * time.Second)
- }
-}