From cbbe745769d624709a9ac796307b89d20b7a49e1 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 19 Sep 2018 23:03:41 -0700 Subject: [PATCH] vendor: Glide update, droppping tectonic-node-controller and trimming cluster-api Generated with: $ glide update --strip-vendor $ glide-vc --use-lock-file --no-tests --only-code $ bazel run //:gazelle using: $ glide --version (cd $GOPATH/src/github.com/Masterminds/glide && git describe) v0.13.1-7-g3e13fd1 $ (cd $GOPATH/src/github.com/sgotti/glide-vc && git describe) v0.1.0-2-g6ddf6ee $ bazel version Build label: 0.16.1- (@non-git) Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Mon Aug 13 16:42:29 2018 (1534178549) Build timestamp: 1534178549 Build timestamp as int: 1534178549 The tectonic-node-controller removal catches us up with 596591b8 (.*: replace tectonic node controller with machine config operator, 2018-09-10, #232). The cluster-api trim adjusts the content from b00e40e1 (vendor: Add client from sigs.k8s.io/cluster-api, 2018-09-04, #119). Because cluster-api wasn't in glide.lock, I suspect neither glide nor glide-vc were run before that commit. --- glide.lock | 3 +- .../tectonic-node-controller/BUILD.bazel | 10 - .../config/tectonic-node-controller/config.go | 47 - .../.github/PULL_REQUEST_TEMPLATE.md | 25 - vendor/sigs.k8s.io/cluster-api/.gitignore | 18 - vendor/sigs.k8s.io/cluster-api/BUILD.bazel | 14 - .../sigs.k8s.io/cluster-api/CONTRIBUTING.md | 118 - vendor/sigs.k8s.io/cluster-api/Gopkg.lock | 966 - vendor/sigs.k8s.io/cluster-api/Gopkg.toml | 67 - vendor/sigs.k8s.io/cluster-api/Makefile | 25 - vendor/sigs.k8s.io/cluster-api/OWNERS | 6 - vendor/sigs.k8s.io/cluster-api/OWNERS_ALIASES | 24 - vendor/sigs.k8s.io/cluster-api/README.md | 39 - .../sigs.k8s.io/cluster-api/SECURITY_CONTACTS | 16 - vendor/sigs.k8s.io/cluster-api/WORKSPACE | 12 - .../sigs.k8s.io/cluster-api/architecture.png | Bin 197396 -> 0 bytes .../cluster-api/boilerplate.go.txt | 15 - .../cluster-api/cloud/google/BUILD.bazel | 59 - .../cluster-api/cloud/google/README.md | 64 - .../cloud/google/clients/BUILD.bazel | 20 - .../cloud/google/clients/computeservice.go | 66 - .../google/clients/computeservice_test.go | 156 - .../cmd/gce-machine-controller/.gitignore | 1 - .../cmd/gce-machine-controller/BUILD.bazel | 22 - .../cmd/gce-machine-controller/Dockerfile | 30 - .../cmd/gce-machine-controller/Makefile | 38 - .../cmd/gce-machine-controller/README.md | 28 - .../gce-machine-controller/app/BUILD.bazel | 31 - .../gce-machine-controller/app/controller.go | 165 - .../app/options/BUILD.bazel | 13 - .../app/options/options.go | 40 - .../google/cmd/gce-machine-controller/main.go | 43 - .../google/cmd/generate-image/BUILD.bazel | 19 - .../cloud/google/cmd/generate-image/main.go | 71 - .../cloud/google/config/BUILD.bazel | 9 - .../cloud/google/config/configtemplate.go | 487 - .../cloud/google/delete-service-accounts.sh | 29 - .../google/gceproviderconfig/BUILD.bazel | 19 - .../cloud/google/gceproviderconfig/doc.go | 22 - .../google/gceproviderconfig/register.go | 54 - .../cloud/google/gceproviderconfig/types.go | 49 - .../gceproviderconfig/v1alpha1/BUILD.bazel | 22 - .../google/gceproviderconfig/v1alpha1/doc.go | 22 - .../gceproviderconfig/v1alpha1/register.go | 108 - .../gceproviderconfig/v1alpha1/types.go | 50 - .../v1alpha1/zz_generated.deepcopy.go | 75 - .../zz_generated.deepcopy.go | 75 - .../cloud/google/instancestatus.go | 105 - .../cloud/google/machineactuator.go | 884 - .../cloud/google/machineactuator_test.go | 432 - .../cloud/google/machinesetup/BUILD.bazel | 24 - .../cloud/google/machinesetup/config_types.go | 161 - .../google/machinesetup/config_types_test.go | 365 - .../cluster-api/cloud/google/metadata.go | 138 - .../cluster-api/cloud/google/pods.go | 232 - .../cloud/google/serviceaccount.go | 223 - .../cluster-api/cloud/google/ssh.go | 118 - .../cloud/google/testdata/ca/ca.crt | 17 - .../cloud/google/testdata/ca/ca.key | 27 - .../cluster-api/cloud/vsphere/BUILD.bazel | 31 - .../cluster-api/cloud/vsphere/README.md | 26 - .../cmd/vsphere-machine-controller/.gitignore | 1 - .../vsphere-machine-controller/BUILD.bazel | 27 - .../cmd/vsphere-machine-controller/Dockerfile | 67 - .../cmd/vsphere-machine-controller/Makefile | 38 - .../cmd/vsphere-machine-controller/main.go | 70 - .../cloud/vsphere/config/BUILD.bazel | 9 - .../cloud/vsphere/config/configtemplate.go | 280 - .../cluster-api/cloud/vsphere/deployer.go | 71 - .../cloud/vsphere/instancestatus.go | 98 - .../cloud/vsphere/machineactuator.go | 763 - .../cloud/vsphere/namedmachines/BUILD.bazel | 10 - .../vsphere/namedmachines/namedmachines.go | 93 - .../cluster-api/cloud/vsphere/pods.go | 201 - .../cluster-api/cloud/vsphere/templates.go | 809 - .../vsphere/vsphereproviderconfig/BUILD.bazel | 19 - .../vsphere/vsphereproviderconfig/doc.go | 22 - .../vsphere/vsphereproviderconfig/register.go | 52 - .../vsphere/vsphereproviderconfig/types.go | 42 - .../v1alpha1/BUILD.bazel | 21 - .../vsphereproviderconfig/v1alpha1/doc.go | 22 - .../v1alpha1/register.go | 58 - .../vsphereproviderconfig/v1alpha1/types.go | 42 - .../v1alpha1/zz_generated.deepcopy.go | 84 - .../zz_generated.deepcopy.go | 84 - .../cluster-api/clusterctl/.gitignore | 2 - .../cluster-api/clusterctl/BUILD.bazel | 16 - .../cluster-api/clusterctl/CONTRIBUTING.md | 26 - .../cluster-api/clusterctl/README.md | 70 - .../clusterctl/clusterdeployer/BUILD.bazel | 39 - .../clusterdeployer/clusterapiserver.go | 110 - .../clusterapiservertemplate.go | 241 - .../clusterdeployer/clusterclient.go | 245 - .../clusterdeployer/clusterclient_test.go | 20 - .../clusterdeployer/clusterclientfactory.go | 27 - .../clusterdeployer/clusterdeployer.go | 405 - .../clusterdeployer/clusterdeployer_test.go | 360 - .../clusterdeployer/minikube/BUILD.bazel | 16 - .../clusterdeployer/minikube/minikube.go | 72 - .../clusterdeployer/minikube/minikube_test.go | 106 - .../cluster-api/clusterctl/cmd/BUILD.bazel | 41 - .../cluster-api/clusterctl/cmd/create.go | 31 - .../clusterctl/cmd/create_cluster.go | 166 - .../clusterctl/cmd/create_cluster_test.go | 168 - .../cluster-api/clusterctl/cmd/delete.go | 31 - .../clusterctl/cmd/delete_cluster.go | 51 - .../cluster-api/clusterctl/cmd/root.go | 58 - .../cluster-api/clusterctl/cmd/validate.go | 31 - .../clusterctl/cmd/validate_cluster.go | 42 - .../clusterctl/cmd/validate_cluster_test.go | 30 - .../clusterctl/examples/google/.gitignore | 1 - .../clusterctl/examples/google/README.md | 24 - .../examples/google/addons.yaml.template | 205 - .../examples/google/cluster.yaml.template | 21 - .../examples/google/generate-yaml.sh | 155 - .../examples/google/machines.yaml.template | 46 - .../google/provider-components.yaml.template | 348 - .../clusterctl/examples/vsphere/.gitignore | 6 - .../clusterctl/examples/vsphere/README.md | 24 - .../examples/vsphere/cluster.yaml.template | 18 - .../examples/vsphere/generate-yaml.sh | 72 - .../examples/vsphere/machines.yaml.template | 29 - .../examples/vsphere/machineset.yaml.template | 34 - .../vsphere/provider-components.yaml.template | 393 - .../cluster-api/clusterctl/main.go | 23 - .../clusterctl/main_integration_test.go | 184 - ...create-cluster-no-args-invalid-flag.golden | 25 - .../testdata/create-cluster-no-args.golden | 25 - .../create-no-args-invalid-flag.golden | 23 - .../clusterctl/testdata/create-no-args.golden | 22 - ...delete-cluster-no-args-invalid-flag.golden | 18 - .../testdata/delete-cluster-no-args.golden | 18 - .../delete-no-args-invalid-flag.golden | 23 - .../clusterctl/testdata/delete-no-args.golden | 22 - .../testdata/no-args-invalid-flag.golden | 25 - .../clusterctl/testdata/no-args.golden | 24 - .../validate-no-args-invalid-flag.golden | 23 - .../testdata/validate-no-args.golden | 22 - .../cluster-api/cmd/apiserver/.gitignore | 1 - .../cluster-api/cmd/apiserver/BUILD | 24 - .../cluster-api/cmd/apiserver/Dockerfile | 29 - .../cluster-api/cmd/apiserver/Makefile | 38 - .../cluster-api/cmd/apiserver/main.go | 36 - .../cmd/controller-manager/.gitignore | 1 - .../cluster-api/cmd/controller-manager/BUILD | 24 - .../cmd/controller-manager/Dockerfile | 29 - .../cmd/controller-manager/Makefile | 38 - .../cmd/controller-manager/main.go | 50 - .../cluster-api/code-of-conduct.md | 3 - .../docs/examples/cluster/cluster.yaml | 7 - .../docs/examples/machine/machine.yaml | 7 - .../machinedeployment/machinedeployment.yaml | 7 - .../docs/examples/machineset/machineset.yaml | 7 - .../docs/proposals/machine-api-proposal.md | 164 - .../cluster-api/errors/BUILD.bazel | 13 - .../cluster-api/errors/deployer.go | 23 - .../cluster-api/errors/machines.go | 61 - .../cluster-api/gcp-deployer/.gitignore | 3 - .../cluster-api/gcp-deployer/BUILD.bazel | 16 - .../cluster-api/gcp-deployer/CONTRIBUTING.md | 155 - .../cluster-api/gcp-deployer/README.md | 110 - .../gcp-deployer/cluster.yaml.template | 16 - .../cluster-api/gcp-deployer/cmd/BUILD.bazel | 24 - .../cluster-api/gcp-deployer/cmd/add.go | 63 - .../cluster-api/gcp-deployer/cmd/create.go | 102 - .../cluster-api/gcp-deployer/cmd/delete.go | 43 - .../cluster-api/gcp-deployer/cmd/root.go | 87 - .../gcp-deployer/deploy/BUILD.bazel | 28 - .../cluster-api/gcp-deployer/deploy/deploy.go | 153 - .../gcp-deployer/deploy/deploy_helper.go | 326 - .../gcp-deployer/deploy/machinedeployer.go | 27 - .../cluster-api/gcp-deployer/generate-yaml.sh | 53 - .../gcp-deployer/machine_setup_configs.yaml | 228 - .../gcp-deployer/machines.yaml.template | 46 - .../cluster-api/gcp-deployer/main.go | 23 - .../cluster-api/kubeadm/BUILD.bazel | 17 - .../cluster-api/kubeadm/kubeadm.go | 74 - .../cluster-api/kubeadm/kubeadm_test.go | 103 - vendor/sigs.k8s.io/cluster-api/pkg/BUILD | 9 - vendor/sigs.k8s.io/cluster-api/pkg/apis/BUILD | 17 - .../pkg/apis/cluster/{BUILD => BUILD.bazel} | 0 .../pkg/apis/cluster/install/BUILD | 18 - .../pkg/apis/cluster/install/doc.go | 20 - .../install/zz_generated.api.register.go | 34 - .../cluster/v1alpha1/{BUILD => BUILD.bazel} | 27 +- .../cluster/v1alpha1/cluster_types_test.go | 173 - .../cluster/v1alpha1/machine_types_test.go | 91 - .../v1alpha1/machinedeployment_types_test.go | 429 - .../cluster/v1alpha1/machineset_types_test.go | 184 - .../cluster/v1alpha1/testutil/BUILD.bazel | 10 - .../cluster/v1alpha1/testutil/testutil.go | 36 - .../cluster/v1alpha1/v1alpha1_suite_test.go | 51 - .../sigs.k8s.io/cluster-api/pkg/apis/doc.go | 24 - .../pkg/apis/zz_generated.api.register.go | 46 - .../cluster-api/pkg/cert/BUILD.bazel | 16 - .../cluster-api/pkg/cert/cert_authority.go | 73 - .../pkg/cert/cert_authority_test.go | 131 - .../clientset/{BUILD => BUILD.bazel} | 0 .../clientset_generated/clientset/fake/BUILD | 27 - .../clientset/fake/clientset_generated.go | 70 - .../clientset_generated/clientset/fake/doc.go | 17 - .../clientset/fake/register.go | 52 - .../clientset/scheme/{BUILD => BUILD.bazel} | 0 .../cluster/v1alpha1/{BUILD => BUILD.bazel} | 0 .../typed/cluster/v1alpha1/fake/BUILD | 27 - .../typed/cluster/v1alpha1/fake/doc.go | 17 - .../cluster/v1alpha1/fake/fake_cluster.go | 137 - .../v1alpha1/fake/fake_cluster_client.go | 49 - .../cluster/v1alpha1/fake/fake_machine.go | 137 - .../v1alpha1/fake/fake_machinedeployment.go | 137 - .../cluster/v1alpha1/fake/fake_machineset.go | 137 - .../externalversions/BUILD | 22 - .../externalversions/cluster/BUILD | 13 - .../externalversions/cluster/interface.go | 46 - .../externalversions/cluster/v1alpha1/BUILD | 25 - .../cluster/v1alpha1/cluster.go | 88 - .../cluster/v1alpha1/interface.go | 66 - .../cluster/v1alpha1/machine.go | 88 - .../cluster/v1alpha1/machinedeployment.go | 88 - .../cluster/v1alpha1/machineset.go | 88 - .../externalversions/factory.go | 130 - .../externalversions/generic.go | 67 - .../externalversions/internalinterfaces/BUILD | 15 - .../internalinterfaces/factory_interfaces.go | 37 - .../listers_generated/cluster/v1alpha1/BUILD | 21 - .../cluster/v1alpha1/cluster.go | 94 - .../cluster/v1alpha1/expansion_generated.go | 51 - .../cluster/v1alpha1/machine.go | 94 - .../cluster/v1alpha1/machinedeployment.go | 94 - .../cluster/v1alpha1/machineset.go | 94 - .../cluster-api/pkg/cmd-runner/BUILD.bazel | 15 - .../cluster-api/pkg/cmd-runner/cmd_runner.go | 21 - .../pkg/cmd-runner/cmd_runner_test.go | 68 - .../cluster-api/pkg/controller/BUILD | 19 - .../cluster-api/pkg/controller/cluster/BUILD | 58 - .../pkg/controller/cluster/actuator.go | 30 - .../controller/cluster/cluster_suite_test.go | 53 - .../pkg/controller/cluster/controller.go | 98 - .../pkg/controller/cluster/controller_test.go | 89 - .../pkg/controller/cluster/queue.go | 50 - .../pkg/controller/cluster/reconcile_test.go | 147 - .../pkg/controller/cluster/testactuator.go | 68 - .../cluster/zz_generated.api.register.go | 114 - .../pkg/controller/config/BUILD.bazel | 14 - .../pkg/controller/config/configuration.go | 118 - .../cluster-api/pkg/controller/doc.go | 21 - .../cluster-api/pkg/controller/machine/BUILD | 70 - .../pkg/controller/machine/actuator.go | 34 - .../pkg/controller/machine/controller.go | 174 - .../pkg/controller/machine/controller_test.go | 148 - .../controller/machine/machine_suite_test.go | 65 - .../pkg/controller/machine/node.go | 158 - .../pkg/controller/machine/node_test.go | 251 - .../pkg/controller/machine/queue.go | 50 - .../pkg/controller/machine/reconcile_test.go | 185 - .../pkg/controller/machine/testactuator.go | 96 - .../machine/zz_generated.api.register.go | 114 - .../controller/machinedeployment/BUILD.bazel | 68 - .../machinedeployment/controller.go | 373 - .../machinedeployment/controller_test.go | 908 - .../machinedeployment_suite_test.go | 46 - .../controller/machinedeployment/rolling.go | 266 - .../machinedeployment/rolling_test.go | 433 - .../pkg/controller/machinedeployment/sync.go | 458 - .../controller/machinedeployment/sync_test.go | 435 - .../machinedeployment/util/BUILD.bazel | 39 - .../controller/machinedeployment/util/util.go | 696 - .../machinedeployment/util/util_test.go | 841 - .../zz_generated.api.register.go | 124 - .../pkg/controller/machineset/BUILD.bazel | 69 - .../pkg/controller/machineset/controller.go | 372 - .../controller/machineset/controller_test.go | 102 - .../pkg/controller/machineset/machine.go | 118 - .../pkg/controller/machineset/machine_test.go | 176 - .../machineset/machineset_suite_test.go | 47 - .../controller/machineset/reconcile_test.go | 428 - .../pkg/controller/machineset/status.go | 129 - .../pkg/controller/machineset/status_test.go | 283 - .../machineset/zz_generated.api.register.go | 124 - .../pkg/controller/noderefutil/BUILD.bazel | 23 - .../pkg/controller/noderefutil/util.go | 72 - .../pkg/controller/noderefutil/util_test.go | 294 - .../pkg/controller/sharedinformers/BUILD | 20 - .../pkg/controller/sharedinformers/doc.go | 21 - .../controller/sharedinformers/informers.go | 31 - .../zz_generated.api.register.go | 121 - .../controller/zz_generated.api.register.go | 36 - vendor/sigs.k8s.io/cluster-api/pkg/doc.go | 21 - .../sigs.k8s.io/cluster-api/pkg/openapi/BUILD | 19 - .../cluster-api/pkg/openapi/doc.go | 21 - .../pkg/openapi/openapi_generated.go | 24536 ---------------- .../pkg/test-cmd-runner/BUILD.bazel | 15 - .../pkg/test-cmd-runner/test_cmd_runner.go | 103 - .../test-cmd-runner/test_cmd_runner_test.go | 100 - .../cluster-api/sample/cluster.yaml | 5 - .../cluster-api/sample/machine.yaml | 5 - .../cluster-api/sample/machinedeployment.yaml | 29 - .../cluster-api/sample/machineset.yaml | 25 - .../cluster-api/scripts/ci-build.sh | 23 - .../cluster-api/scripts/ci-test.sh | 23 - .../sigs.k8s.io/cluster-api/tools/README.md | 3 - .../cluster-api/tools/repair/.gitignore | 1 - .../cluster-api/tools/repair/BUILD.bazel | 16 - .../cluster-api/tools/repair/README.md | 20 - .../cluster-api/tools/repair/cmd/BUILD.bazel | 15 - .../cluster-api/tools/repair/cmd/root.go | 65 - .../cluster-api/tools/repair/main.go | 25 - .../cluster-api/tools/repair/util/BUILD.bazel | 17 - .../cluster-api/tools/repair/util/repair.go | 114 - .../cluster-api/tools/upgrader/.gitignore | 1 - .../cluster-api/tools/upgrader/BUILD.bazel | 16 - .../cluster-api/tools/upgrader/README.md | 18 - .../tools/upgrader/cmd/BUILD.bazel | 15 - .../cluster-api/tools/upgrader/cmd/root.go | 68 - .../cluster-api/tools/upgrader/main.go | 23 - .../tools/upgrader/util/BUILD.bazel | 20 - .../tools/upgrader/util/upgrade.go | 188 - .../sigs.k8s.io/cluster-api/util/BUILD.bazel | 24 - vendor/sigs.k8s.io/cluster-api/util/retry.go | 51 - vendor/sigs.k8s.io/cluster-api/util/util.go | 215 - 320 files changed, 2 insertions(+), 54310 deletions(-) delete mode 100644 vendor/github.com/coreos/tectonic-config/config/tectonic-node-controller/BUILD.bazel delete mode 100644 vendor/github.com/coreos/tectonic-config/config/tectonic-node-controller/config.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/CONTRIBUTING.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/Gopkg.lock delete mode 100644 vendor/sigs.k8s.io/cluster-api/Gopkg.toml delete mode 100644 vendor/sigs.k8s.io/cluster-api/Makefile delete mode 100644 vendor/sigs.k8s.io/cluster-api/OWNERS delete mode 100644 vendor/sigs.k8s.io/cluster-api/OWNERS_ALIASES delete mode 100644 vendor/sigs.k8s.io/cluster-api/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/SECURITY_CONTACTS delete mode 100644 vendor/sigs.k8s.io/cluster-api/WORKSPACE delete mode 100644 vendor/sigs.k8s.io/cluster-api/architecture.png delete mode 100644 vendor/sigs.k8s.io/cluster-api/boilerplate.go.txt delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/clients/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/clients/computeservice.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/clients/computeservice_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/Dockerfile delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/Makefile delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/controller.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options/options.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/main.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/generate-image/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/generate-image/main.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/config/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/config/configtemplate.go delete mode 100755 vendor/sigs.k8s.io/cluster-api/cloud/google/delete-service-accounts.sh delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/types.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/types.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/zz_generated.deepcopy.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/zz_generated.deepcopy.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/instancestatus.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/machineactuator.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/machineactuator_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/config_types.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/config_types_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/metadata.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/pods.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/serviceaccount.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/ssh.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/testdata/ca/ca.crt delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/google/testdata/ca/ca.key delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/Dockerfile delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/Makefile delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/main.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/config/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/config/configtemplate.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/deployer.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/instancestatus.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/machineactuator.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines/namedmachines.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/pods.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/templates.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/types.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/types.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/zz_generated.deepcopy.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/zz_generated.deepcopy.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/CONTRIBUTING.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterapiserver.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterapiservertemplate.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclient.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclient_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclientfactory.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterdeployer.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterdeployer_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/minikube.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/minikube_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create_cluster.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create_cluster_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/delete.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/delete_cluster.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/root.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate_cluster.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate_cluster_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/addons.yaml.template delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/cluster.yaml.template delete mode 100755 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/generate-yaml.sh delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/machines.yaml.template delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/provider-components.yaml.template delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/cluster.yaml.template delete mode 100755 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/generate-yaml.sh delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/machines.yaml.template delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/machineset.yaml.template delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/provider-components.yaml.template delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/main.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/main_integration_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/create-cluster-no-args-invalid-flag.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/create-cluster-no-args.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/create-no-args-invalid-flag.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/create-no-args.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/delete-cluster-no-args-invalid-flag.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/delete-cluster-no-args.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/delete-no-args-invalid-flag.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/delete-no-args.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/no-args-invalid-flag.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/no-args.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/validate-no-args-invalid-flag.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/clusterctl/testdata/validate-no-args.golden delete mode 100644 vendor/sigs.k8s.io/cluster-api/cmd/apiserver/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/cmd/apiserver/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/cmd/apiserver/Dockerfile delete mode 100644 vendor/sigs.k8s.io/cluster-api/cmd/apiserver/Makefile delete mode 100644 vendor/sigs.k8s.io/cluster-api/cmd/apiserver/main.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/Dockerfile delete mode 100644 vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/Makefile delete mode 100644 vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/main.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/code-of-conduct.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/docs/examples/cluster/cluster.yaml delete mode 100644 vendor/sigs.k8s.io/cluster-api/docs/examples/machine/machine.yaml delete mode 100644 vendor/sigs.k8s.io/cluster-api/docs/examples/machinedeployment/machinedeployment.yaml delete mode 100644 vendor/sigs.k8s.io/cluster-api/docs/examples/machineset/machineset.yaml delete mode 100644 vendor/sigs.k8s.io/cluster-api/docs/proposals/machine-api-proposal.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/errors/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/errors/deployer.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/errors/machines.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/CONTRIBUTING.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/cluster.yaml.template delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/add.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/create.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/delete.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/root.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/deploy.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/deploy_helper.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/machinedeployer.go delete mode 100755 vendor/sigs.k8s.io/cluster-api/gcp-deployer/generate-yaml.sh delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/machine_setup_configs.yaml delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/machines.yaml.template delete mode 100644 vendor/sigs.k8s.io/cluster-api/gcp-deployer/main.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/kubeadm/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/kubeadm/kubeadm.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/kubeadm/kubeadm_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/BUILD rename vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/{BUILD => BUILD.bazel} (100%) delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/zz_generated.api.register.go rename vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/{BUILD => BUILD.bazel} (57%) delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/cluster_types_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machine_types_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machinedeployment_types_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineset_types_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil/testutil.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/v1alpha1_suite_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/apis/zz_generated.api.register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/cert/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/cert/cert_authority.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/cert/cert_authority_test.go rename vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/{BUILD => BUILD.bazel} (100%) delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/clientset_generated.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/register.go rename vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/scheme/{BUILD => BUILD.bazel} (100%) rename vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/{BUILD => BUILD.bazel} (100%) delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster_client.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machine.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machinedeployment.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineset.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/interface.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/cluster.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/interface.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machine.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machinedeployment.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineset.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/factory.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/generic.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/cluster.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/expansion_generated.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machine.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machinedeployment.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machineset.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/cmd_runner.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/cmd_runner_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/actuator.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/cluster_suite_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/controller.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/controller_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/queue.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/reconcile_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/testactuator.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/zz_generated.api.register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/config/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/config/configuration.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/actuator.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/controller.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/controller_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/machine_suite_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/node.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/node_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/queue.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/reconcile_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/testactuator.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/zz_generated.api.register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/controller.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/controller_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/machinedeployment_suite_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/rolling.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/rolling_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/sync.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/sync_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/util.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/util_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/zz_generated.api.register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/controller.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/controller_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machine.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machine_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machineset_suite_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/reconcile_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/status.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/status_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/zz_generated.api.register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/util.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/util_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/informers.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/zz_generated.api.register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/controller/zz_generated.api.register.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/openapi/BUILD delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/openapi/doc.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/openapi/openapi_generated.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/test_cmd_runner.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/test_cmd_runner_test.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/sample/cluster.yaml delete mode 100644 vendor/sigs.k8s.io/cluster-api/sample/machine.yaml delete mode 100644 vendor/sigs.k8s.io/cluster-api/sample/machinedeployment.yaml delete mode 100644 vendor/sigs.k8s.io/cluster-api/sample/machineset.yaml delete mode 100755 vendor/sigs.k8s.io/cluster-api/scripts/ci-build.sh delete mode 100755 vendor/sigs.k8s.io/cluster-api/scripts/ci-test.sh delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/repair/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/repair/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/repair/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/repair/cmd/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/repair/cmd/root.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/repair/main.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/repair/util/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/repair/util/repair.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/upgrader/.gitignore delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/upgrader/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/upgrader/README.md delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/upgrader/cmd/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/upgrader/cmd/root.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/upgrader/main.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/upgrader/util/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/tools/upgrader/util/upgrade.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/util/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/cluster-api/util/retry.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/util/util.go diff --git a/glide.lock b/glide.lock index 2e296bdd7a6..2ba4e54df88 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ hash: d6bf25b67ab333514303587db3945ca988e7d92ec02e474759687d94e331e2fc -updated: 2018-09-03T17:24:54.201614+02:00 +updated: 2018-09-19T23:01:47.359616568-07:00 imports: - name: bitbucket.org/ww/goautoneg version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675 @@ -121,7 +121,6 @@ imports: - config/kube-addon - config/kube-core - config/tectonic-network - - config/tectonic-node-controller - config/tectonic-utility - name: github.com/davecgh/go-spew version: 782f4967f2dc4564575ca782fe2d04090b5faca8 diff --git a/vendor/github.com/coreos/tectonic-config/config/tectonic-node-controller/BUILD.bazel b/vendor/github.com/coreos/tectonic-config/config/tectonic-node-controller/BUILD.bazel deleted file mode 100644 index c4de370ce58..00000000000 --- a/vendor/github.com/coreos/tectonic-config/config/tectonic-node-controller/BUILD.bazel +++ /dev/null @@ -1,10 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["config.go"], - importmap = "installer/vendor/github.com/coreos/tectonic-config/config/tectonic-node-controller", - importpath = "github.com/coreos/tectonic-config/config/tectonic-node-controller", - visibility = ["//visibility:public"], - deps = ["//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"], -) diff --git a/vendor/github.com/coreos/tectonic-config/config/tectonic-node-controller/config.go b/vendor/github.com/coreos/tectonic-config/config/tectonic-node-controller/config.go deleted file mode 100644 index 74af029a564..00000000000 --- a/vendor/github.com/coreos/tectonic-config/config/tectonic-node-controller/config.go +++ /dev/null @@ -1,47 +0,0 @@ -package tnc - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -const ( - // TNCConfigKind is the TypeMeta.Kind for the TNC config. - TNCConfigKind = "TectonicNodeControllerConfig" - // TNCConfigAPIVersion is the TypeMeta.APIVersion for the TNC config. - TNCConfigAPIVersion = "v1" - - // TNCOConfigKind is the TypeMeta.Kind for the TNC Operator's config. - TNCOConfigKind = "TectonicNodeControllerOperatorConfig" - // TNCOConfigAPIVersion is the TypeMeta.APIVersion for the TNC Operator's config. - TNCOConfigAPIVersion = "v1" -) - -// ControllerConfig is the config structure TNC to generate NodeConfigs -type ControllerConfig struct { - metav1.TypeMeta `json:",inline"` - ClusterDNSIP string `json:"clusterDNSIP"` - CloudProviderConfig string `json:"cloudProviderConfig"` - ClusterName string `json:"clusterName"` - - // The tectonic platform, e.g. "libvirt" or "aws" - Platform string `json:"platform"` - - BaseDomain string `json:"baseDomain"` - - // Size of the initial etcd cluster. - EtcdInitialCount int `json:"etcdInitialCount"` - - // User customizations, list of node configs in the cluster to collect and apply as part of the final config - AdditionalConfigs []string `json:"additionalConfigs"` - - // Pool update limits allowing individual roles to have a specific percentage or constant number of nodes that can be upgrading at a given time. If an empty string is provided only a single node will be updated at a given time - NodePoolUpdateLimit map[string]string `json:"nodePoolUpdateLimit"` -} - -// OperatorConfig defines the configuration needed by the Tectonic Node Controller Operator. -type OperatorConfig struct { - metav1.TypeMeta `json:",inline"` - - // ControllerConfig is the config that will be consumed by the TNC. - ControllerConfig `json:"controllerConfig"` -} diff --git a/vendor/sigs.k8s.io/cluster-api/.github/PULL_REQUEST_TEMPLATE.md b/vendor/sigs.k8s.io/cluster-api/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 756bc9e116b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,25 +0,0 @@ - - -**What this PR does / why we need it**: - -**Which issue(s) this PR fixes** *(optional, in `fixes #(, fixes #, ...)` format, will close the issue(s) when PR gets merged)*: -Fixes # - -**Special notes for your reviewer**: - -**Release note**: - -```release-note - -``` - - -@kubernetes/kube-deploy-reviewers diff --git a/vendor/sigs.k8s.io/cluster-api/.gitignore b/vendor/sigs.k8s.io/cluster-api/.gitignore deleted file mode 100644 index 31c32a205c6..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ - -# IntelliJ -.idea/ -*.iml \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/BUILD.bazel deleted file mode 100644 index 72120c2eb80..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -# gazelle:proto disable -# gazelle:exclude vendor -load("@io_bazel_rules_go//go:def.bzl", "gazelle") - -gazelle( - name = "gazelle", - args = [ - "-build_file_name", - "BUILD,BUILD.bazel", - ], - command = "fix", - external = "vendored", - prefix = "k8s.io/kube-deploy/cluster-api", -) diff --git a/vendor/sigs.k8s.io/cluster-api/CONTRIBUTING.md b/vendor/sigs.k8s.io/cluster-api/CONTRIBUTING.md deleted file mode 100644 index 0b236ec9829..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/CONTRIBUTING.md +++ /dev/null @@ -1,118 +0,0 @@ -# Contributing Guidelines - -Read the following guide if you're interested in contributing to cluster-api. - -## Contributor License Agreements - -We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles. - -Please fill out either the individual or corporate Contributor License Agreement (CLA). More information about the CLA and instructions for signing it [can be found here](https://github.com/kubernetes/community/blob/master/CLA.md). - -***NOTE***: Only original source code from you and other people that have signed the CLA can be accepted into the repository. - -## Finding Things That Need Help - -If you're new to the project and want to help, but don't know where to start, we have a semi-curated list of issues that should not need deep knowledge of the system. [Have a look and see if anything sounds interesting](https://github.com/kubernetes-sigs/cluster-api/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). Alternatively, read some of the docs on other controllers and try to write your own, file and fix any/all issues that come up, including gaps in documentation! - -## Contributing a Patch - -1. If you haven't already done so, sign a Contributor License Agreement (see details above). -1. Fork the desired repo, develop and test your code changes. -1. Submit a pull request. - -All changes must be code reviewed. Coding conventions and standards are explained in the official [developer docs](https://github.com/kubernetes/community/tree/master/contributors/devel). Expect reviewers to request that you avoid common [go style mistakes](https://github.com/golang/go/wiki/CodeReviewComments) in your PRs. - -### Merge Approval - -Cluster API maintainers may add "LGTM" (Looks Good To Me) or an equivalent comment to indicate that a PR is acceptable. Any change requires at least one LGTM. No pull requests can be merged until at least one Cluster API maintainer signs off with an LGTM. - -## Cloud Provider Dev Guide - -### Overview - -The Cluster API is a Kubernetes project to bring declarative, Kubernetes-style APIs to cluster creation, configuration, and management. It provides optional, additive functionality on top of core Kubernetes. - -This document is meant to help OSS contributors implement support for providers (cloud or on-prem). - -As part of adding support for a provider (cloud or on-prem), you will need to: - -1. Create tooling that conforms to the Cluster API (described further below) -1. A machine controller that can run independent of the cluster. This controller should handle the lifecycle of the machines, whether it's run in-cluster or out-cluster. - -The machine controller should be able to act on a subset of machines that form a cluster (for example using a label selector). - -### Resources - -* [Cluster Management API KEP](https://github.com/kubernetes/community/blob/master/keps/sig-cluster-lifecycle/0003-cluster-api.md) -* [Cluster type](https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/cluster/v1alpha1/cluster_types.go#L40) -* [Machine type](https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/cluster/v1alpha1/machine_types.go#L42) - -### Boostrapping - -To minimize code duplication and maximize flexibility, bootstrap clusters with an external Cluster Management API Stack. A Cluster Management API Stack contains all the components needed to provide Kubernetes Cluster Management API for a cluster. [Bootstrap Process Design Details](https://docs.google.com/document/d/1CnzIXtitfbO6Y7ZxVWROGO8jr19t0vooDx-YQ7c2nbI/edit?usp=sharing). - -### A new Machine can be created in a declarative way - -**A new Machine can be created in a declarative way, including Kubernetes version and container runtime version. It should also be able to specify provider-specific information such as OS image, instance type, disk configuration, etc., though this will not be portable.** - -When a cluster is first created with a cluster config file, there is no master node or api server. So the user will need to bootstrap a cluster. While the implementation details are specific to the provider, the following guidance should help you: - -* Your tool should spin up the external apiserver and the machine controller. -* POST the objects to the apiserver. -* The machine controller creates resources (Machines etc) -* Pivot the apiserver and the machine controller in to the cluster. - -#### Configurable Machine Setup - -While not mandatory, it is suggested for new providers to support configurable machine setups for creating new machines. -This is to allow flexibility in what startup scripts are used and what versions are supported instead of hardcoding startup scripts into the machine controller. -You can find an example implementation for GCE [here](https://github.com/kubernetes-sigs/cluster-api/blob/master/cloud/google/machinesetup/config_types.go). - -##### GCE Implementation - -For GCE, a [config map](https://github.com/kubernetes-sigs/cluster-api/blob/6aecf9c80a1ca29b45cb43ebfd50ac0d57eb7132/clusterctl/examples/google/provider-components.yaml.template#L118) holds the list of valid machine setup configs, -and the yaml file is volume mounted into the machine controller using a ConfigMap named `machine-setup`. - -A [config type](https://github.com/kubernetes-sigs/cluster-api/blob/master/cloud/google/machinesetup/config_types.go#L45) defines a set of parameters that can be taken from the machine object being created, and maps those parameters to startup scripts and other relevant information. -In GCE, the OS, machine roles, and version info are the parameters that map to a GCP image path and metadata (which contains the startup script). - -When creating a new machine, there should be a check for whether the machine setup is supported. -This is done by looking through the valid configs parsed out of the yaml for a config with matching parameters. -If a match is found, then the machine can be created with the startup script found in the config. -If no match is found, then the given machine configuration is not supported. -Getting the script onto the machine and running it on startup is a provider specific implementation detail. - -More details can be found in the [design doc](https://docs.google.com/document/d/1OfykBDOXP_t6QEtiYBA-Ax7nSpqohFofyX-wOxrQrnw/edit?ts=5ae11208#heading=h.xgjl2srtytjt), but note that it is GCE specific. - -### A specific Machine can be deleted, freeing external resources associated with it. - -When the client deletes a Machine object, your controller's reconciler should trigger the deletion of the Machine that backs that machine. The delete is provider specific, but usually requires deleting the VM and freeing up any external resources (like IP). - -### A specific Machine can be upgraded or downgraded - -These include: - -* A specific Machine can have its kubelet version upgraded or downgraded. -* A specific Machine can have its container runtime changed, or its version upgraded or downgraded. -* A specific Machine can have its OS image upgraded or downgraded. - -A sample implementation for an upgrader is [provided here](https://github.com/kubernetes-sigs/cluster-api/blob/master/tools/upgrader/util/upgrade.go). Each machine is upgraded serially, which can amount to: - -``` -for machine in machines: - upgrade machine -``` - -The specific upgrade logic will be implement as part of the machine controller, and is specific to the provider. The user provided provider config will be in `machine.Spec.ProviderConfig`. - -Discussion around in-place vs replace upgrades [is here](https://github.com/kubernetes/community/blob/master/keps/sig-cluster-lifecycle/0003-cluster-api.md#in-place-vs-replace). - -## Support Channels - -Whether you are a user or contributor, official support channels include: - -- GitHub issues: https://github.com/kubernetes-sigs/cluster-api/issues/new -- Slack: Chat with us on [Slack](http://slack.k8s.io/): #cluster-api -- Email: [kubernetes-sig-cluster-lifecycle](https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle) mailing list - -Before opening a new issue or submitting a new pull request, it's helpful to search the project - it's likely that another user has already reported the issue you're facing, or it's a known issue that we're already aware of. diff --git a/vendor/sigs.k8s.io/cluster-api/Gopkg.lock b/vendor/sigs.k8s.io/cluster-api/Gopkg.lock deleted file mode 100644 index 074403001de..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/Gopkg.lock +++ /dev/null @@ -1,966 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - branch = "default" - name = "bitbucket.org/ww/goautoneg" - packages = ["."] - revision = "75cd24fc2f2c2a2088577d12123ddee5f54e0675" - -[[projects]] - name = "cloud.google.com/go" - packages = ["compute/metadata"] - revision = "4b98a6370e36d7a85192e7bad08a4ebd82eac2a8" - version = "v0.20.0" - -[[projects]] - name = "github.com/Azure/go-autorest" - packages = [ - "autorest", - "autorest/adal", - "autorest/azure", - "autorest/date" - ] - revision = "fc3b03a2d2d1f43fad3007038bd16f044f870722" - version = "v9.10.0" - -[[projects]] - name = "github.com/NYTimes/gziphandler" - packages = ["."] - revision = "2600fb119af974220d3916a5916d6e31176aac1b" - version = "v1.0.1" - -[[projects]] - name = "github.com/PuerkitoBio/purell" - packages = ["."] - revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4" - version = "v1.1.0" - -[[projects]] - branch = "master" - name = "github.com/PuerkitoBio/urlesc" - packages = ["."] - revision = "de5bf2ad457846296e2031421a34e2568e304e35" - -[[projects]] - name = "github.com/asaskevich/govalidator" - packages = ["."] - revision = "ccb8e960c48f04d6935e72476ae4a51028f9e22f" - version = "v9" - -[[projects]] - branch = "master" - name = "github.com/beorn7/perks" - packages = ["quantile"] - revision = "3a771d992973f24aa725d07868b467d1ddfceafb" - -[[projects]] - name = "github.com/coreos/etcd" - packages = [ - "auth/authpb", - "client", - "clientv3", - "etcdserver/api/v3rpc/rpctypes", - "etcdserver/etcdserverpb", - "mvcc/mvccpb", - "pkg/pathutil", - "pkg/srv", - "pkg/tlsutil", - "pkg/transport", - "pkg/types", - "version" - ] - revision = "c9d46ab3799b7f2174268e75f72d01e6d6aac953" - version = "v3.3.2" - -[[projects]] - name = "github.com/coreos/go-semver" - packages = ["semver"] - revision = "8ab6407b697782a06568d4b7f1db25550ec2e4c6" - version = "v0.2.0" - -[[projects]] - name = "github.com/coreos/go-systemd" - packages = ["daemon"] - revision = "40e2722dffead74698ca12a750f64ef313ddce05" - version = "v16" - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - name = "github.com/dgrijalva/jwt-go" - packages = ["."] - revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" - version = "v3.2.0" - -[[projects]] - branch = "master" - name = "github.com/dustin/go-humanize" - packages = ["."] - revision = "bb3d318650d48840a39aa21a027c6630e198e626" - -[[projects]] - name = "github.com/elazarl/go-bindata-assetfs" - packages = ["."] - revision = "30f82fa23fd844bd5bb1e5f216db87fd77b5eb43" - version = "v1.0.0" - -[[projects]] - name = "github.com/emicklei/go-restful" - packages = [ - ".", - "log" - ] - revision = "26b41036311f2da8242db402557a0dbd09dc83da" - version = "v2.6.0" - -[[projects]] - name = "github.com/emicklei/go-restful-swagger12" - packages = ["."] - revision = "dcef7f55730566d41eae5db10e7d6981829720f6" - version = "1.0.1" - -[[projects]] - name = "github.com/evanphx/json-patch" - packages = ["."] - revision = "afac545df32f2287a079e2dfb7ba2745a643747e" - version = "v3.0.0" - -[[projects]] - name = "github.com/ghodss/yaml" - packages = ["."] - revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/analysis" - packages = ["."] - revision = "f59a71f0ece6f9dfb438be7f45148f006cbad88e" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/errors" - packages = ["."] - revision = "7bcb96a367bac6b76e6e42fa84155bb5581dcff8" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/jsonpointer" - packages = ["."] - revision = "3a0015ad55fa9873f41605d3e8f28cd279c32ab2" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/jsonreference" - packages = ["."] - revision = "3fb327e6747da3043567ee86abd02bb6376b6be2" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/loads" - packages = ["."] - revision = "2a2b323bab96e6b1fdee110e57d959322446e9c9" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/spec" - packages = ["."] - revision = "9acd88844bc186c3ec7f318cd3d56f1114b4ab99" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/strfmt" - packages = ["."] - revision = "6ba31556a6c60db8615afb9d8eddae7aae15eb48" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/swag" - packages = ["."] - revision = "ceb469cb0fdf2d792f28d771bc05da6c606f55e5" - -[[projects]] - name = "github.com/gogo/protobuf" - packages = [ - "gogoproto", - "proto", - "protoc-gen-gogo/descriptor", - "sortkeys" - ] - revision = "1adfc126b41513cc696b209667c8656ea7aac67c" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "github.com/golang/glog" - packages = ["."] - revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998" - -[[projects]] - branch = "master" - name = "github.com/golang/groupcache" - packages = ["lru"] - revision = "66deaeb636dff1ac7d938ce666d090556056a4b0" - -[[projects]] - name = "github.com/golang/protobuf" - packages = [ - "proto", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/timestamp" - ] - revision = "925541529c1fa6821df4e44ce2723319eb2be768" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "github.com/google/btree" - packages = ["."] - revision = "e89373fe6b4a7413d7acd6da1725b83ef713e6e4" - -[[projects]] - branch = "master" - name = "github.com/google/gofuzz" - packages = ["."] - revision = "24818f796faf91cd76ec7bddd72458fbced7a6c1" - -[[projects]] - name = "github.com/googleapis/gnostic" - packages = [ - "OpenAPIv2", - "compiler", - "extensions" - ] - revision = "ee43cbb60db7bd22502942cccbc39059117352ab" - version = "v0.1.0" - -[[projects]] - branch = "master" - name = "github.com/gophercloud/gophercloud" - packages = [ - ".", - "openstack", - "openstack/identity/v2/tenants", - "openstack/identity/v2/tokens", - "openstack/identity/v3/tokens", - "openstack/utils", - "pagination" - ] - revision = "2daf3049f2a9913e6e5bf54926fd90efb1f9a0f0" - -[[projects]] - branch = "master" - name = "github.com/gregjones/httpcache" - packages = [ - ".", - "diskcache" - ] - revision = "9cad4c3443a7200dd6400aef47183728de563a38" - -[[projects]] - branch = "master" - name = "github.com/hashicorp/golang-lru" - packages = [ - ".", - "simplelru" - ] - revision = "0fb14efe8c47ae851c0034ed7a448854d3d34cf3" - -[[projects]] - branch = "master" - name = "github.com/howeyc/gopass" - packages = ["."] - revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8" - -[[projects]] - name = "github.com/imdario/mergo" - packages = ["."] - revision = "163f41321a19dd09362d4c63cc2489db2015f1f4" - version = "0.3.2" - -[[projects]] - name = "github.com/inconshreveable/mousetrap" - packages = ["."] - revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" - version = "v1.0" - -[[projects]] - name = "github.com/json-iterator/go" - packages = ["."] - revision = "ca39e5af3ece67bbcda3d0f4f56a8e24d9f2dad4" - version = "1.1.3" - -[[projects]] - name = "github.com/juju/ratelimit" - packages = ["."] - revision = "59fac5042749a5afb9af70e813da1dd5474f0167" - version = "1.0.1" - -[[projects]] - name = "github.com/kubernetes-incubator/apiserver-builder" - packages = [ - "pkg/apiserver", - "pkg/builders", - "pkg/cmd/server", - "pkg/controller", - "pkg/test", - "pkg/validators" - ] - revision = "e809ac2f9f0c238f08d08a876f8b3f499604f941" - version = "v1.9-alpha.3" - -[[projects]] - branch = "master" - name = "github.com/mailru/easyjson" - packages = [ - "buffer", - "jlexer", - "jwriter" - ] - revision = "8b799c424f57fa123fc63a99d6383bc6e4c02578" - -[[projects]] - name = "github.com/matttproud/golang_protobuf_extensions" - packages = ["pbutil"] - revision = "3247c84500bff8d9fb6d579d800f20b3e091582c" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "github.com/mitchellh/mapstructure" - packages = ["."] - revision = "00c29f56e2386353d58c599509e8dc3801b0d716" - -[[projects]] - name = "github.com/modern-go/concurrent" - packages = ["."] - revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" - version = "1.0.3" - -[[projects]] - name = "github.com/modern-go/reflect2" - packages = ["."] - revision = "1df9eeb2bb81f327b96228865c5687bc2194af3f" - version = "1.0.0" - -[[projects]] - branch = "master" - name = "github.com/mxk/go-flowrate" - packages = ["flowrate"] - revision = "cca7078d478f8520f85629ad7c68962d31ed7682" - -[[projects]] - name = "github.com/onsi/ginkgo" - packages = [ - "config", - "types" - ] - revision = "9eda700730cba42af70d53180f9dcce9266bc2bc" - version = "v1.4.0" - -[[projects]] - name = "github.com/pborman/uuid" - packages = ["."] - revision = "e790cca94e6cc75c7064b1332e63811d4aae1a53" - version = "v1.1" - -[[projects]] - branch = "master" - name = "github.com/petar/GoLLRB" - packages = ["llrb"] - revision = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4" - -[[projects]] - name = "github.com/peterbourgon/diskv" - packages = ["."] - revision = "5f041e8faa004a95c88a202771f4cc3e991971e6" - version = "v2.0.1" - -[[projects]] - name = "github.com/prometheus/client_golang" - packages = ["prometheus"] - revision = "c5b7fccd204277076155f10851dad72b76a49317" - version = "v0.8.0" - -[[projects]] - branch = "master" - name = "github.com/prometheus/client_model" - packages = ["go"] - revision = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c" - -[[projects]] - branch = "master" - name = "github.com/prometheus/common" - packages = [ - "expfmt", - "internal/bitbucket.org/ww/goautoneg", - "model" - ] - revision = "38c53a9f4bfcd932d1b00bfc65e256a7fba6b37a" - -[[projects]] - branch = "master" - name = "github.com/prometheus/procfs" - packages = [ - ".", - "internal/util", - "nfs", - "xfs" - ] - revision = "780932d4fbbe0e69b84c34c20f5c8d0981e109ea" - -[[projects]] - name = "github.com/spf13/cobra" - packages = ["."] - revision = "7b2c5ac9fc04fc5efafb60700713d4fa609b777b" - version = "v0.0.1" - -[[projects]] - name = "github.com/spf13/pflag" - packages = ["."] - revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66" - version = "v1.0.0" - -[[projects]] - name = "github.com/ugorji/go" - packages = ["codec"] - revision = "9831f2c3ac1068a78f50999a30db84270f647af6" - version = "v1.1" - -[[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = ["ssh/terminal"] - revision = "88942b9c40a4c9d203b82b3731787b672d6e809b" - -[[projects]] - branch = "master" - name = "golang.org/x/net" - packages = [ - "context", - "context/ctxhttp", - "html", - "html/atom", - "http2", - "http2/hpack", - "idna", - "internal/timeseries", - "lex/httplex", - "trace", - "websocket" - ] - revision = "6078986fec03a1dcc236c34816c71b0e05018fda" - -[[projects]] - branch = "master" - name = "golang.org/x/oauth2" - packages = [ - ".", - "google", - "internal", - "jws", - "jwt" - ] - revision = "fdc9e635145ae97e6c2cb777c48305600cf515cb" - -[[projects]] - branch = "master" - name = "golang.org/x/sys" - packages = [ - "unix", - "windows" - ] - revision = "13d03a9a82fba647c21a0ef8fba44a795d0f0835" - -[[projects]] - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - "width" - ] - revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" - version = "v0.3.0" - -[[projects]] - branch = "master" - name = "golang.org/x/tools" - packages = [ - "go/ast/astutil", - "imports" - ] - revision = "ac136b6c2db7c4d43955e4bc7174db36dc0539c0" - -[[projects]] - branch = "master" - name = "google.golang.org/api" - packages = [ - "compute/v1", - "gensupport", - "googleapi", - "googleapi/internal/uritemplates" - ] - revision = "a213db537ac9b393526194a5c85ad6e546f7923f" - -[[projects]] - name = "google.golang.org/appengine" - packages = [ - ".", - "internal", - "internal/app_identity", - "internal/base", - "internal/datastore", - "internal/log", - "internal/modules", - "internal/remote_api", - "internal/urlfetch", - "urlfetch" - ] - revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "google.golang.org/genproto" - packages = ["googleapis/rpc/status"] - revision = "ab0870e398d5dd054b868c0db1481ab029b9a9f2" - -[[projects]] - name = "google.golang.org/grpc" - packages = [ - ".", - "balancer", - "balancer/base", - "balancer/roundrobin", - "codes", - "connectivity", - "credentials", - "encoding", - "encoding/proto", - "grpclb/grpc_lb_v1/messages", - "grpclog", - "health/grpc_health_v1", - "internal", - "keepalive", - "metadata", - "naming", - "peer", - "resolver", - "resolver/dns", - "resolver/passthrough", - "stats", - "status", - "tap", - "transport" - ] - revision = "afc05b9e1d36f289ea16ba294894486a3e458246" - version = "v1.11.0" - -[[projects]] - name = "gopkg.in/inf.v0" - packages = ["."] - revision = "d2d2541c53f18d2a059457998ce2876cc8e67cbf" - version = "v0.9.1" - -[[projects]] - branch = "v2" - name = "gopkg.in/mgo.v2" - packages = [ - "bson", - "internal/json" - ] - revision = "3f83fa5005286a7fe593b055f0d7771a7dce4655" - -[[projects]] - name = "gopkg.in/natefinch/lumberjack.v2" - packages = ["."] - revision = "a96e63847dc3c67d17befa69c303767e2f84e54f" - version = "v2.1" - -[[projects]] - name = "gopkg.in/yaml.v2" - packages = ["."] - revision = "86f5ed62f8a0ee96bd888d2efdfd6d4fb100a4eb" - version = "v2.2.0" - -[[projects]] - branch = "release-1.9" - name = "k8s.io/api" - packages = [ - "admission/v1beta1", - "admissionregistration/v1alpha1", - "admissionregistration/v1beta1", - "apps/v1", - "apps/v1beta1", - "apps/v1beta2", - "authentication/v1", - "authentication/v1beta1", - "authorization/v1", - "authorization/v1beta1", - "autoscaling/v1", - "autoscaling/v2beta1", - "batch/v1", - "batch/v1beta1", - "batch/v2alpha1", - "certificates/v1beta1", - "core/v1", - "events/v1beta1", - "extensions/v1beta1", - "networking/v1", - "policy/v1beta1", - "rbac/v1", - "rbac/v1alpha1", - "rbac/v1beta1", - "scheduling/v1alpha1", - "settings/v1alpha1", - "storage/v1", - "storage/v1alpha1", - "storage/v1beta1" - ] - revision = "c6c40fa5f71e46739e69d43b8ce08fad9720bab9" - -[[projects]] - branch = "release-1.9" - name = "k8s.io/apimachinery" - packages = [ - "pkg/api/equality", - "pkg/api/errors", - "pkg/api/meta", - "pkg/api/resource", - "pkg/api/validation", - "pkg/api/validation/path", - "pkg/apimachinery", - "pkg/apimachinery/announced", - "pkg/apimachinery/registered", - "pkg/apis/meta/internalversion", - "pkg/apis/meta/v1", - "pkg/apis/meta/v1/unstructured", - "pkg/apis/meta/v1/validation", - "pkg/apis/meta/v1alpha1", - "pkg/conversion", - "pkg/conversion/queryparams", - "pkg/fields", - "pkg/labels", - "pkg/runtime", - "pkg/runtime/schema", - "pkg/runtime/serializer", - "pkg/runtime/serializer/json", - "pkg/runtime/serializer/protobuf", - "pkg/runtime/serializer/recognizer", - "pkg/runtime/serializer/streaming", - "pkg/runtime/serializer/versioning", - "pkg/selection", - "pkg/types", - "pkg/util/cache", - "pkg/util/clock", - "pkg/util/diff", - "pkg/util/errors", - "pkg/util/framer", - "pkg/util/httpstream", - "pkg/util/intstr", - "pkg/util/json", - "pkg/util/mergepatch", - "pkg/util/net", - "pkg/util/proxy", - "pkg/util/rand", - "pkg/util/runtime", - "pkg/util/sets", - "pkg/util/strategicpatch", - "pkg/util/uuid", - "pkg/util/validation", - "pkg/util/validation/field", - "pkg/util/wait", - "pkg/util/waitgroup", - "pkg/util/yaml", - "pkg/version", - "pkg/watch", - "third_party/forked/golang/json", - "third_party/forked/golang/netutil", - "third_party/forked/golang/reflect" - ] - revision = "cb88e003047fb517f284ff8af294451b20f0b403" - -[[projects]] - branch = "release-1.9" - name = "k8s.io/apiserver" - packages = [ - "pkg/admission", - "pkg/admission/configuration", - "pkg/admission/initializer", - "pkg/admission/metrics", - "pkg/admission/plugin/initialization", - "pkg/admission/plugin/namespace/lifecycle", - "pkg/admission/plugin/webhook/config", - "pkg/admission/plugin/webhook/config/apis/webhookadmission", - "pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1", - "pkg/admission/plugin/webhook/errors", - "pkg/admission/plugin/webhook/mutating", - "pkg/admission/plugin/webhook/namespace", - "pkg/admission/plugin/webhook/request", - "pkg/admission/plugin/webhook/rules", - "pkg/admission/plugin/webhook/validating", - "pkg/admission/plugin/webhook/versioned", - "pkg/apis/apiserver", - "pkg/apis/apiserver/install", - "pkg/apis/apiserver/v1alpha1", - "pkg/apis/audit", - "pkg/apis/audit/install", - "pkg/apis/audit/v1alpha1", - "pkg/apis/audit/v1beta1", - "pkg/apis/audit/validation", - "pkg/audit", - "pkg/audit/policy", - "pkg/authentication/authenticator", - "pkg/authentication/authenticatorfactory", - "pkg/authentication/group", - "pkg/authentication/request/anonymous", - "pkg/authentication/request/bearertoken", - "pkg/authentication/request/headerrequest", - "pkg/authentication/request/union", - "pkg/authentication/request/websocket", - "pkg/authentication/request/x509", - "pkg/authentication/serviceaccount", - "pkg/authentication/token/tokenfile", - "pkg/authentication/user", - "pkg/authorization/authorizer", - "pkg/authorization/authorizerfactory", - "pkg/authorization/union", - "pkg/endpoints", - "pkg/endpoints/discovery", - "pkg/endpoints/filters", - "pkg/endpoints/handlers", - "pkg/endpoints/handlers/negotiation", - "pkg/endpoints/handlers/responsewriters", - "pkg/endpoints/metrics", - "pkg/endpoints/openapi", - "pkg/endpoints/request", - "pkg/features", - "pkg/registry/generic", - "pkg/registry/generic/registry", - "pkg/registry/rest", - "pkg/server", - "pkg/server/filters", - "pkg/server/healthz", - "pkg/server/httplog", - "pkg/server/mux", - "pkg/server/options", - "pkg/server/routes", - "pkg/server/routes/data/swagger", - "pkg/server/storage", - "pkg/storage", - "pkg/storage/errors", - "pkg/storage/etcd", - "pkg/storage/etcd/metrics", - "pkg/storage/etcd/util", - "pkg/storage/etcd3", - "pkg/storage/etcd3/preflight", - "pkg/storage/names", - "pkg/storage/storagebackend", - "pkg/storage/storagebackend/factory", - "pkg/storage/value", - "pkg/util/feature", - "pkg/util/flag", - "pkg/util/flushwriter", - "pkg/util/logs", - "pkg/util/trace", - "pkg/util/webhook", - "pkg/util/wsstream", - "plugin/pkg/audit/log", - "plugin/pkg/audit/webhook", - "plugin/pkg/authenticator/token/webhook", - "plugin/pkg/authorizer/webhook" - ] - revision = "1aadb24971a7156fe20eb831ea805c60c61158de" - -[[projects]] - branch = "release-6.0" - name = "k8s.io/client-go" - packages = [ - "discovery", - "discovery/fake", - "informers", - "informers/admissionregistration", - "informers/admissionregistration/v1alpha1", - "informers/admissionregistration/v1beta1", - "informers/apps", - "informers/apps/v1", - "informers/apps/v1beta1", - "informers/apps/v1beta2", - "informers/autoscaling", - "informers/autoscaling/v1", - "informers/autoscaling/v2beta1", - "informers/batch", - "informers/batch/v1", - "informers/batch/v1beta1", - "informers/batch/v2alpha1", - "informers/certificates", - "informers/certificates/v1beta1", - "informers/core", - "informers/core/v1", - "informers/events", - "informers/events/v1beta1", - "informers/extensions", - "informers/extensions/v1beta1", - "informers/internalinterfaces", - "informers/networking", - "informers/networking/v1", - "informers/policy", - "informers/policy/v1beta1", - "informers/rbac", - "informers/rbac/v1", - "informers/rbac/v1alpha1", - "informers/rbac/v1beta1", - "informers/scheduling", - "informers/scheduling/v1alpha1", - "informers/settings", - "informers/settings/v1alpha1", - "informers/storage", - "informers/storage/v1", - "informers/storage/v1alpha1", - "informers/storage/v1beta1", - "kubernetes", - "kubernetes/scheme", - "kubernetes/typed/admissionregistration/v1alpha1", - "kubernetes/typed/admissionregistration/v1beta1", - "kubernetes/typed/apps/v1", - "kubernetes/typed/apps/v1beta1", - "kubernetes/typed/apps/v1beta2", - "kubernetes/typed/authentication/v1", - "kubernetes/typed/authentication/v1beta1", - "kubernetes/typed/authorization/v1", - "kubernetes/typed/authorization/v1beta1", - "kubernetes/typed/autoscaling/v1", - "kubernetes/typed/autoscaling/v2beta1", - "kubernetes/typed/batch/v1", - "kubernetes/typed/batch/v1beta1", - "kubernetes/typed/batch/v2alpha1", - "kubernetes/typed/certificates/v1beta1", - "kubernetes/typed/core/v1", - "kubernetes/typed/events/v1beta1", - "kubernetes/typed/extensions/v1beta1", - "kubernetes/typed/networking/v1", - "kubernetes/typed/policy/v1beta1", - "kubernetes/typed/rbac/v1", - "kubernetes/typed/rbac/v1alpha1", - "kubernetes/typed/rbac/v1beta1", - "kubernetes/typed/scheduling/v1alpha1", - "kubernetes/typed/settings/v1alpha1", - "kubernetes/typed/storage/v1", - "kubernetes/typed/storage/v1alpha1", - "kubernetes/typed/storage/v1beta1", - "listers/admissionregistration/v1alpha1", - "listers/admissionregistration/v1beta1", - "listers/apps/v1", - "listers/apps/v1beta1", - "listers/apps/v1beta2", - "listers/autoscaling/v1", - "listers/autoscaling/v2beta1", - "listers/batch/v1", - "listers/batch/v1beta1", - "listers/batch/v2alpha1", - "listers/certificates/v1beta1", - "listers/core/v1", - "listers/events/v1beta1", - "listers/extensions/v1beta1", - "listers/networking/v1", - "listers/policy/v1beta1", - "listers/rbac/v1", - "listers/rbac/v1alpha1", - "listers/rbac/v1beta1", - "listers/scheduling/v1alpha1", - "listers/settings/v1alpha1", - "listers/storage/v1", - "listers/storage/v1alpha1", - "listers/storage/v1beta1", - "pkg/version", - "plugin/pkg/client/auth", - "plugin/pkg/client/auth/azure", - "plugin/pkg/client/auth/gcp", - "plugin/pkg/client/auth/oidc", - "plugin/pkg/client/auth/openstack", - "rest", - "rest/watch", - "testing", - "third_party/forked/golang/template", - "tools/auth", - "tools/cache", - "tools/clientcmd", - "tools/clientcmd/api", - "tools/clientcmd/api/latest", - "tools/clientcmd/api/v1", - "tools/leaderelection", - "tools/leaderelection/resourcelock", - "tools/metrics", - "tools/pager", - "tools/record", - "tools/reference", - "transport", - "util/buffer", - "util/cert", - "util/cert/triple", - "util/flowcontrol", - "util/homedir", - "util/integer", - "util/jsonpath", - "util/workqueue" - ] - revision = "90539b4e75a8daaf7f67c3874c6180bfb1a63936" - -[[projects]] - name = "k8s.io/code-generator" - packages = [ - "cmd/conversion-gen", - "cmd/conversion-gen/generators" - ] - revision = "91d3f6a57905178524105a085085901bb73bd3dc" - version = "kubernetes-1.9.1" - -[[projects]] - branch = "master" - name = "k8s.io/gengo" - packages = [ - "args", - "generator", - "namer", - "parser", - "types" - ] - revision = "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" - -[[projects]] - branch = "master" - name = "k8s.io/kube-openapi" - packages = [ - "pkg/builder", - "pkg/common", - "pkg/handler", - "pkg/util", - "pkg/util/proto" - ] - revision = "50ae88d24ede7b8bad68e23c805b5d3da5c8abaf" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "e3e5af3f93950e21d1b9d087811efb8520757396d819e6ec5f163c659b0da4a2" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/sigs.k8s.io/cluster-api/Gopkg.toml b/vendor/sigs.k8s.io/cluster-api/Gopkg.toml deleted file mode 100644 index 6c0c1bc26ee..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/Gopkg.toml +++ /dev/null @@ -1,67 +0,0 @@ - -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" - -required = [ - "github.com/Azure/go-autorest/autorest/adal", # added so we can apply the constraint below - "k8s.io/code-generator/cmd/conversion-gen" -] - -[[constraint]] - name = "github.com/ghodss/yaml" - version = "1.0.0" - -[[constraint]] - name = "github.com/spf13/cobra" - version = "0.0.1" - -[[constraint]] - name = "github.com/spf13/pflag" - version = "1.0.0" - -[[constraint]] - name = "k8s.io/api" - branch = "release-1.9" - -[[constraint]] - name = "k8s.io/apimachinery" - branch = "release-1.9" - -[[constraint]] - name = "k8s.io/apiserver" - branch = "release-1.9" - -[[constraint]] - name = "k8s.io/client-go" - branch = "release-6.0" - -# client-go needs this version -[[constraint]] - name = "github.com/Azure/go-autorest" - version = "v9.1.0" - -[[constraint]] - name = "github.com/kubernetes-incubator/apiserver-builder" - version = "v1.9-alpha.3" - -[[constraint]] - name = "k8s.io/code-generator" - version = "kubernetes-1.9.6" diff --git a/vendor/sigs.k8s.io/cluster-api/Makefile b/vendor/sigs.k8s.io/cluster-api/Makefile deleted file mode 100644 index 9d94f1f2d01..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -.PHONY: genapi genconversion - -all: genapi genconversion - -genapi: - go install github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen - apiregister-gen -i ./pkg/apis,./pkg/apis/cluster/v1alpha1 - -genconversion: - go install k8s.io/code-generator/cmd/conversion-gen - conversion-gen -i ./pkg/apis/cluster/v1alpha1/ -O zz_generated.conversion diff --git a/vendor/sigs.k8s.io/cluster-api/OWNERS b/vendor/sigs.k8s.io/cluster-api/OWNERS deleted file mode 100644 index e41f45aed79..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -# See the OWNERS docs: https://git.k8s.io/community/contributors/devel/owners.md - -approvers: - - sig-cluster-lifecycle-leads - - cluster-api-admins - - cluster-api-maintainers diff --git a/vendor/sigs.k8s.io/cluster-api/OWNERS_ALIASES b/vendor/sigs.k8s.io/cluster-api/OWNERS_ALIASES deleted file mode 100644 index 845bbe480ea..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/OWNERS_ALIASES +++ /dev/null @@ -1,24 +0,0 @@ -# See the OWNERS docs: https://git.k8s.io/community/docs/devel/owners.md - -aliases: - sig-cluster-lifecycle-leads: - - lukemarsden - - luxas - - roberthbailey - - timothysc - cluster-api-admins: - - justinsb - - krousey - - luxas - - roberthbailey - - kris-nova - cluster-api-maintainers: - - jessicaochen - - k4leung4 - - karan - - kris-nova - - krousey - - medinatiger - - roberthbailey - - rsdcastro - - spew diff --git a/vendor/sigs.k8s.io/cluster-api/README.md b/vendor/sigs.k8s.io/cluster-api/README.md deleted file mode 100644 index a5dfc3133a5..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Cluster API -## What is the Cluster API? - -The Cluster API is a Kubernetes project to bring declarative, Kubernetes-style -APIs to cluster creation, configuration, and management. It provides optional, -additive functionality on top of core Kubernetes. - -Note that Cluster API effort is still in the prototype stage while we get -feedback on the API types themselves. All of the code here is to experiment with -the API and demo its abilities, in order to drive more technical feedback to the -API design. Because of this, all of the prototype code is rapidly changing. - -![Cluster API Architecture](architecture.png "Cluster API Architecture") - -To learn more, see the [Cluster API KEP][cluster-api-kep]. - -## Get involved! - -* Join our Cluster API working group sessions - * Weekly on Wednesdays @ 10:00 PT on [Zoom][zoomMeeting] - * Previous meetings: \[ [notes][notes] | [recordings][recordings] \] -* Chat with us on [Slack](http://slack.k8s.io/): #cluster-api - -## Getting Started -### Prerequisites -* `kubectl` is required, see [here](http://kubernetes.io/docs/user-guide/prereqs/). -* `clusterctl` is a SIG-cluster-lifecycle sponsored tool to manage Cluster API clusters. See [here](clusterctl) - -## How to use the API - -To see how to build tooling on top of the Cluster API, please check out a few examples below: - -* [upgrader](tools/upgrader/README.md): a cluster upgrade tool. -* [repair](tools/repair/README.md): detect problematic nodes and fix them. - -[cluster-api-kep]: https://github.com/kubernetes/community/blob/master/keps/sig-cluster-lifecycle/0003-cluster-api.md -[notes]: https://docs.google.com/document/d/16ils69KImmE94RlmzjWDrkmFZysgB2J4lGnYMRN89WM/edit -[recordings]: https://www.youtube.com/playlist?list=PL69nYSiGNLP29D0nYgAGWt1ZFqS9Z7lw4 -[zoomMeeting]: https://zoom.us/j/166836624 diff --git a/vendor/sigs.k8s.io/cluster-api/SECURITY_CONTACTS b/vendor/sigs.k8s.io/cluster-api/SECURITY_CONTACTS deleted file mode 100644 index 68675766313..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/SECURITY_CONTACTS +++ /dev/null @@ -1,16 +0,0 @@ -# Defined below are the security contacts for this repo. -# -# They are the contact point for the Product Security Team to reach out -# to for triaging and handling of incoming issues. -# -# The below names agree to abide by the -# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) -# and will be removed and replaced if they violate that agreement. -# -# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE -# INSTRUCTIONS AT https://kubernetes.io/security/ - -lukemarsden -luxas -roberthbailey -timothysc diff --git a/vendor/sigs.k8s.io/cluster-api/WORKSPACE b/vendor/sigs.k8s.io/cluster-api/WORKSPACE deleted file mode 100644 index 36776d0f55b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/WORKSPACE +++ /dev/null @@ -1,12 +0,0 @@ - -http_archive( - name = "io_bazel_rules_go", - url = "https://github.com/bazelbuild/rules_go/releases/download/0.6.0/rules_go-0.6.0.tar.gz", - sha256 = "ba6feabc94a5d205013e70792accb6cce989169476668fbaf98ea9b342e13b59", -) -load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") -go_rules_dependencies() -go_register_toolchains() - -load("@io_bazel_rules_go//proto:def.bzl", "proto_register_toolchains") -proto_register_toolchains() diff --git a/vendor/sigs.k8s.io/cluster-api/architecture.png b/vendor/sigs.k8s.io/cluster-api/architecture.png deleted file mode 100644 index 8fe44100459fd052abda4ed1a5a51d83f7ed1b62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 197396 zcmd43WmuG5+doPO7=%hUA_z)@bccY_(jX<>-3*8b2ofTSbSg;q(2Ph)g9t-6jC3== zFtFEnKliiW_kZkfdwFXAJkMV&qBPZ&h;Gu{#KOWNdaA7O919DN2@4B% z;W|Eeg_-MD7Wn6yt*n|X7FK2atqTi0@H3O8@^dvTtbhktSg+n-VV#4QUj4zs^5(_D z+Azn$5=+LyqI64d)RF*i;J;K+Qoy>x{LOADNCdCka8ow)#KNLV!+c>s^$z<8UL^2( zs`i9n35NuWO<;KEl@mB4)>8#p9lxn9G$iQbal;=}$WCO+Q~nzyp&ha^ub;oW9+qVE zS>|&seqfNnyQz~%@ti*N;aI?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-5vBXj@H*P{u(`zMV0}AcjrnM-a;Gq}(7-Tyw zcz)>{+bF7ZTs)4*?Bc5-4N2GHOLz4LBk})nQr=&NK^zX5d8nIQlG diff --git a/vendor/sigs.k8s.io/cluster-api/boilerplate.go.txt b/vendor/sigs.k8s.io/cluster-api/boilerplate.go.txt deleted file mode 100644 index 8a0dbd55013..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/boilerplate.go.txt +++ /dev/null @@ -1,15 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/google/BUILD.bazel deleted file mode 100644 index ef70abd23a4..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/BUILD.bazel +++ /dev/null @@ -1,59 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "instancestatus.go", - "machineactuator.go", - "metadata.go", - "pods.go", - "serviceaccount.go", - "ssh.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/google", - importpath = "sigs.k8s.io/cluster-api/cloud/google", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/golang.org/x/oauth2/google:go_default_library", - "//vendor/google.golang.org/api/compute/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - "//vendor/k8s.io/client-go/util/cert/triple:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/clients:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/config:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/errors:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/kubeadm:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/cert:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["machineactuator_test.go"], - data = glob(["testdata/**"]), - embed = [":go_default_library"], - deps = [ - "//vendor/google.golang.org/api/compute/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/kubeadm:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/cert:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/README.md b/vendor/sigs.k8s.io/cluster-api/cloud/google/README.md deleted file mode 100644 index 058150157a3..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# Cluster API GCP Cloud Provider - -## Cluster Deletion - -This guide explains how to delete all resources that were created as part of -your Cluster API Kubernetes cluster. - -If your cluster was created using the gcp-deployer tool, see the -[gcp-deployer docs](../../gcp-deployer/README.md). - -1. Remember the service accounts that were created for your cluster - - ```bash - export MASTER_SERVICE_ACCOUNT=$(kubectl get cluster -o=jsonpath='{.items[0].metadata.annotations.gce\.clusterapi\.k8s\.io\/service-account-k8s-master}') - export WORKER_SERVICE_ACCOUNT=$(kubectl get cluster -o=jsonpath='{.items[0].metadata.annotations.gce\.clusterapi\.k8s\.io\/service-account-k8s-worker}') - export INGRESS_CONTROLLER_SERVICE_ACCOUNT=$(kubectl get cluster -o=jsonpath='{.items[0].metadata.annotations.gce\.clusterapi\.k8s\.io\/service-account-k8s-ingress-controller}') - export MACHINE_CONTROLLER_SERVICE_ACCOUNT=$(kubectl get cluster -o=jsonpath='{.items[0].metadata.annotations.gce\.clusterapi\.k8s\.io\/service-account-k8s-machine-controller}') - ``` - -1. Remember the name and zone of the master VM - - ```bash - export MASTER_VM_NAME=$(kubectl get machines -l set=master | awk '{print $1}' | tail -n +2) - export MASTER_VM_ZONE=$(kubectl get machines -l set=master -o=jsonpath='{.items[0].metadata.annotations.gcp-zone}') - ``` - -1. Delete all of the node Machines in the cluster. Make sure to wait for the -corresponding Nodes to be deleted before moving onto the next step. After this -step, the master node will be the only remaining node. - - ```bash - kubectl delete machines -l set=node - kubectl get nodes - ``` - -1. Delete any Kubernetes objects that may have created GCE resources on your -behalf, make sure to run these commands for each namespace that you created: - - ```bash - # See ingress controller docs for information about resources created for - # ingress objects: https://github.com/kubernetes/ingress-gce - kubectl delete ingress --all - - # Services can create a GCE load balancer if the type of the service is - # LoadBalancer. Additionally, both types LoadBalancer and NodePort will - # create a firewall rule in your project. - kubectl delete svc --all - - # Persistent volume claims can create a GCE disk if the type of the pvc - # is gcePersistentDisk. - kubectl delete pvc --all - ``` - -1. Delete the VM that is running your cluster's control plane - - ```bash - gcloud compute instances delete --zone=$MASTER_VM_ZONE $MASTER_VM_NAME - ``` - -1. Delete the roles and service accounts that were created for your cluster - - ```bash - ./delete-service-accounts.sh - ``` \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/clients/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/google/clients/BUILD.bazel deleted file mode 100644 index 4c95813f516..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/clients/BUILD.bazel +++ /dev/null @@ -1,20 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["computeservice.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/google/clients", - importpath = "sigs.k8s.io/cluster-api/cloud/google/clients", - visibility = ["//visibility:public"], - deps = ["//vendor/google.golang.org/api/compute/v1:go_default_library"], -) - -go_test( - name = "go_default_test", - srcs = ["computeservice_test.go"], - embed = [":go_default_library"], - deps = [ - "//vendor/google.golang.org/api/compute/v1:go_default_library", - "//vendor/google.golang.org/api/googleapi:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/clients/computeservice.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/clients/computeservice.go deleted file mode 100644 index 9ba2c36655f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/clients/computeservice.go +++ /dev/null @@ -1,66 +0,0 @@ -package clients - -import ( - compute "google.golang.org/api/compute/v1" - "net/http" - "net/url" -) - -// ComputeService is a pass through wrapper for google.golang.org/api/compute/v1/compute -// The purpose of the ComputeService's wrap of the GCE client is to enable tests to mock this struct and control behavior. -type ComputeService struct { - service *compute.Service -} - -func NewComputeService(client *http.Client) (*ComputeService, error) { - service, err := compute.New(client) - if err != nil { - return nil, err - } - return &ComputeService{ - service: service, - }, nil -} - -func NewComputeServiceForURL(client *http.Client, baseURL string) (*ComputeService, error) { - computeService, err := NewComputeService(client) - if err != nil { - return nil, err - } - url, err := url.Parse(computeService.service.BasePath) - if err != nil { - return nil, err - } - computeService.service.BasePath = baseURL + url.Path - return computeService, err -} - -// A pass through wrapper for compute.Service.Images.Get(...) -func (c *ComputeService) ImagesGet(project string, image string) (*compute.Image, error) { - return c.service.Images.Get(project, image).Do() -} - -// A pass through wrapper for compute.Service.Images.GetFromFamily(...) -func (c *ComputeService) ImagesGetFromFamily(project string, family string) (*compute.Image, error) { - return c.service.Images.GetFromFamily(project, family).Do() -} - -// A pass through wrapper for compute.Service.Instances.Delete(...) -func (c *ComputeService) InstancesDelete(project string, zone string, targetInstance string) (*compute.Operation, error) { - return c.service.Instances.Delete(project, zone, targetInstance).Do() -} - -// A pass through wrapper for compute.Service.Instances.Get(...) -func (c *ComputeService) InstancesGet(project string, zone string, instance string) (*compute.Instance, error) { - return c.service.Instances.Get(project, zone, instance).Do() -} - -// A pass through wrapper for compute.Service.Instances.Insert(...) -func (c *ComputeService) InstancesInsert(project string, zone string, instance *compute.Instance) (*compute.Operation, error) { - return c.service.Instances.Insert(project, zone, instance).Do() -} - -// A pass through wrapper for compute.Service.ZoneOperations.Get(...) -func (c *ComputeService) ZoneOperationsGet(project string, zone string, operation string) (*compute.Operation, error) { - return c.service.ZoneOperations.Get(project, zone, operation).Do() -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/clients/computeservice_test.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/clients/computeservice_test.go deleted file mode 100644 index 670db957d33..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/clients/computeservice_test.go +++ /dev/null @@ -1,156 +0,0 @@ -package clients_test - -import ( - compute "google.golang.org/api/compute/v1" - "encoding/json" - "google.golang.org/api/googleapi" - "net/http" - "net/http/httptest" - "sigs.k8s.io/cluster-api/cloud/google/clients" - "testing" -) - -func TestImagesGet(t *testing.T) { - mux, server, client := createMuxServerAndClient() - defer server.Close() - responseImage := compute.Image{ - Name: "imageName", - ArchiveSizeBytes: 544, - } - mux.Handle("/compute/v1/projects/projectName/global/images/imageName", handler(nil, &responseImage)) - image, err := client.ImagesGet("projectName", "imageName") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if image == nil { - t.Error("expected a valid image") - } - if "imageName" != image.Name { - t.Errorf("expected imageName got %v", image.Name) - } - if image.ArchiveSizeBytes != int64(544) { - t.Errorf("expected %v got %v", image.ArchiveSizeBytes, 544) - } -} - -func TestImagesGetFromFamily(t *testing.T) { - mux, server, client := createMuxServerAndClient() - defer server.Close() - responseImage := compute.Image{ - Name: "imageName", - ArchiveSizeBytes: 544, - } - mux.Handle("/compute/v1/projects/projectName/global/images/family/familyName", handler(nil, &responseImage)) - image, err := client.ImagesGetFromFamily("projectName", "familyName") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if image == nil { - t.Error("expected a valid image") - } - if "imageName" != image.Name { - t.Errorf("expected imageName got %v", image.Name) - } - if image.ArchiveSizeBytes != int64(544) { - t.Errorf("expected %v got %v", image.ArchiveSizeBytes, 544) - } -} - -func TestInstancesDelete(t *testing.T) { - mux, server, client := createMuxServerAndClient() - defer server.Close() - responseOperation := compute.Operation{ - Id: 4501, - } - mux.Handle("/compute/v1/projects/projectName/zones/zoneName/instances/instanceName", handler(nil, &responseOperation)) - op, err := client.InstancesDelete("projectName", "zoneName", "instanceName") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if op == nil { - t.Error("expected a valid operation") - } - if responseOperation.Id != uint64(4501) { - t.Errorf("expected %v got %v", responseOperation.Id, 4501) - } -} - -func TestInstancesGet(t *testing.T) { - mux, server, client := createMuxServerAndClient() - defer server.Close() - responseInstance := compute.Instance{ - Name: "instanceName", - Zone: "zoneName", - } - mux.Handle("/compute/v1/projects/projectName/zones/zoneName/instances/instanceName", handler(nil, &responseInstance)) - instance, err := client.InstancesGet("projectName", "zoneName", "instanceName") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if instance == nil { - t.Error("expected a valid instance") - } - if "instanceName" != instance.Name { - t.Errorf("expected instanceName got %v", instance.Name) - } - if "zoneName" != instance.Zone { - t.Errorf("expected zoneName got %v", instance.Zone) - } -} - -func TestInstancesInsert(t *testing.T) { - mux, server, client := createMuxServerAndClient() - defer server.Close() - responseOperation := compute.Operation{ - Id: 3001, - } - mux.Handle("/compute/v1/projects/projectName/zones/zoneName/instances", handler(nil, &responseOperation)) - op, err := client.InstancesInsert("projectName", "zoneName", nil) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if op == nil { - t.Error("expected a valid operation") - } - if responseOperation.Id != uint64(3001) { - t.Errorf("expected %v got %v", responseOperation.Id, 3001) - } -} - -func createMuxServerAndClient() (*http.ServeMux, *httptest.Server, *clients.ComputeService) { - mux := http.NewServeMux() - server := httptest.NewServer(mux) - client, _ := clients.NewComputeServiceForURL(server.Client(), server.URL) - return mux, server, client -} - -func handler(err *googleapi.Error, obj interface{}) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - handleTestRequest(w, err, obj) - } -} - -func handleTestRequest(w http.ResponseWriter, handleErr *googleapi.Error, obj interface{}) { - if handleErr != nil { - http.Error(w, errMsg(handleErr), handleErr.Code) - return - } - res, err := json.Marshal(obj) - if err != nil { - http.Error(w, "json marshal error", http.StatusInternalServerError) - return - } - w.Write(res) -} - -func errMsg(e *googleapi.Error) string { - res, err := json.Marshal(&errorReply{e}) - if err != nil { - return "json marshal error" - } - return string(res) -} - -type errorReply struct { - Error *googleapi.Error `json:"error"` -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/.gitignore b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/.gitignore deleted file mode 100644 index eb1c440ff31..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/.gitignore +++ /dev/null @@ -1 +0,0 @@ -gce-machine-controller \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/BUILD.bazel deleted file mode 100644 index 91561e07946..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/BUILD.bazel +++ /dev/null @@ -1,22 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller", - importpath = "sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller", - visibility = ["//visibility:private"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options:go_default_library", - ], -) - -go_binary( - name = "gce-machine-controller", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/Dockerfile b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/Dockerfile deleted file mode 100644 index dc93becf92b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Reproducible builder image -FROM golang:1.10.0 as builder -WORKDIR /go/src/sigs.k8s.io/cluster-api -# This expects that the context passed to the docker build command is -# the cluster-api directory. -# e.g. docker build -t -f -COPY . . - -RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller - -# Final container -FROM debian:stretch-slim -RUN apt-get update && apt-get install -y ca-certificates openssh-server && rm -rf /var/lib/apt/lists/* - -COPY --from=builder /go/bin/gce-machine-controller . - diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/Makefile b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/Makefile deleted file mode 100644 index 170b675c516..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -.PHONY: image push dev_image dev_push fix_gcs_permissions - -GCR_BUCKET = k8s-cluster-api -PREFIX = gcr.io/$(GCR_BUCKET) -DEV_PREFIX ?= gcr.io/$(shell gcloud config get-value project) -NAME = gce-machine-controller -TAG = 0.0.13 - -image: - docker build -t "$(PREFIX)/$(NAME):$(TAG)" -f ./Dockerfile ../../../.. - -push: image - docker push "$(PREFIX)/$(NAME):$(TAG)" - $(MAKE) fix_gcs_permissions - -fix_gcs_permissions: - gsutil acl ch -u AllUsers:READ gs://artifacts.$(GCR_BUCKET).appspot.com - gsutil -m acl ch -r -u AllUsers:READ gs://artifacts.$(GCR_BUCKET).appspot.com - -dev_image: - docker build -t "$(DEV_PREFIX)/$(NAME):$(TAG)-dev" -f ./Dockerfile ../../../.. - -dev_push: dev_image - docker push "$(DEV_PREFIX)/$(NAME):$(TAG)-dev" diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/README.md b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/README.md deleted file mode 100644 index 8e4cbe5c3d4..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# GCE Machine Controller - -The GCE Machine Controller is a machine controller implementation for clusters running on Google Compute Engine. - -## Development -The instructions below will enable you to get started with running your own version of the gce-machine-controller on a GCE Kubernetes cluster. - -### Prerequisites - -1. Follow the "Before you begin" section from the google cloud container registry [pushing and pulling images documentation](https://cloud.google.com/container-registry/docs/pushing-and-pulling). -1. From this directory, run `make dev_push`. -1. Note from the ouput of the above step the name of the image. It should be in this format, `gcr.io/MY-GCP-PROJECT-NAME/gce-machine-controller:VERSION-dev`. -1. From the same terminal in which you will create your cluster using gcp-deployer, run `export MACHINE_CONTROLLER_IMAGE=gcr.io/MY-GCP-PROJECT-NAME/gce-machine-controller:VERSION-dev`. Note that the value should be equal to the name of the image you noted in the output from the previous step. -1. Follow the steps listed at [gcp-deployer](../../../../gcp-deployer/) and create a new cluster. -1. Run the following command to ensure that new images are fetched for every new gce-machine-controller container, `kubectl patch deployment clusterapi -p "{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"gce-machine-controller\",\"imagePullPolicy\":\"Always\"}]}}}}"`. - -### Running a Custom GCE Machine Controller - -1. Make a change to gce-machine-controller. For example, edit main.go and insert the following print statement `glog.Error("Hello World!")` below `logs.InitLogs()`. -1. From this folder, run `make dev_push`. -1. Run `kubectl patch deployment clusterapi -p "{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"gce-machine-controller\",\"env\":[{\"name\":\"DATE\",\"value\":\"$(date +'%s')\"}]}]}}}}"`. This command inserts or updates an environment variable named `DATE` which triggers a new deployment. - -### Verifying Your Environment - -1. Install `jq`. Instructions can be found [here](https://stedolan.github.io/jq/download/). -1. Run the following, `kubectl get pods -o json | jq '.items[].status.containerStatuses[] | select(.name=="gce-machine-controller")'`. Validate the the hash in the `imageID` field matches the image you built above. -1. Run the following, it will store, in `${POD_NAME}`, the name of your main clusterapi pod, `POD_NAME=$(kubectl get pods -o json | jq '.items[] | select(.status.containerStatuses[].name=="gce-machine-controller") | .metadata.name' --raw-output)`. -1. Run `kubectl logs --namespace=default ${POD_NAME} -c gce-machine-controller`. Look for the output or change that you added to gce-machine-controller. \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/BUILD.bazel deleted file mode 100644 index 8d095abfcab..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/BUILD.bazel +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["controller.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app", - importpath = "sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/leaderelection:go_default_library", - "//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", - "//vendor/k8s.io/client-go/tools/record:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/scheme:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/config:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/machine:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/controller.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/controller.go deleted file mode 100644 index fc328e141bd..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/controller.go +++ /dev/null @@ -1,165 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package app - -import ( - "os" - - "github.com/golang/glog" - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/uuid" - "k8s.io/client-go/kubernetes" - v1core "k8s.io/client-go/kubernetes/typed/core/v1" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/leaderelection" - "k8s.io/client-go/tools/leaderelection/resourcelock" - "k8s.io/client-go/tools/record" - "sigs.k8s.io/cluster-api/cloud/google" - "sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options" - "sigs.k8s.io/cluster-api/cloud/google/machinesetup" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - clusterapiclientsetscheme "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/scheme" - "sigs.k8s.io/cluster-api/pkg/controller/config" - "sigs.k8s.io/cluster-api/pkg/controller/machine" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" -) - -const ( - gceMachineControllerName = "gce-machine-controller" -) - -func StartMachineController(server *options.MachineControllerServer, shutdown <-chan struct{}) { - config, err := controller.GetConfig(server.CommonConfig.Kubeconfig) - if err != nil { - glog.Fatalf("Could not create Config for talking to the apiserver: %v", err) - } - - client, err := clientset.NewForConfig(config) - if err != nil { - glog.Fatalf("Could not create client for talking to the apiserver: %v", err) - } - - configWatch, err := machinesetup.NewConfigWatch(server.MachineSetupConfigsPath) - if err != nil { - glog.Fatalf("Could not create config watch: %v", err) - } - params := google.MachineActuatorParams{ - V1Alpha1Client: client.ClusterV1alpha1(), - MachineSetupConfigGetter: configWatch, - } - actuator, err := google.NewMachineActuator(params) - - if err != nil { - glog.Fatalf("Could not create Google machine actuator: %v", err) - } - - si := sharedinformers.NewSharedInformers(config, shutdown) - // If this doesn't compile, the code generator probably - // overwrote the customized NewMachineController function. - c := machine.NewMachineController(config, si, actuator) - c.RunAsync(shutdown) - - select {} -} - -func Run(server *options.MachineControllerServer) error { - kubeConfig, err := controller.GetConfig(server.CommonConfig.Kubeconfig) - if err != nil { - glog.Errorf("Could not create Config for talking to the apiserver: %v", err) - return err - } - - kubeClientControl, err := kubernetes.NewForConfig( - rest.AddUserAgent(kubeConfig, "machine-controller-manager"), - ) - if err != nil { - glog.Errorf("Invalid API configuration for kubeconfig-control: %v", err) - return err - } - - recorder, err := createRecorder(kubeClientControl) - if err != nil { - glog.Errorf("Could not create event recorder : %v", err) - return err - } - - // run function will block and never return. - run := func(stop <-chan struct{}) { - StartMachineController(server, stop) - } - - leaderElectConfig := config.GetLeaderElectionConfig() - if !leaderElectConfig.LeaderElect { - run(make(<-chan (struct{}))) - } - - // Identity used to distinguish between multiple machine controller instances. - id, err := os.Hostname() - if err != nil { - return err - } - - leaderElectionClient := kubernetes.NewForConfigOrDie(rest.AddUserAgent(kubeConfig, "machine-leader-election")) - - id = id + "-" + string(uuid.NewUUID()) - // Lock required for leader election - rl, err := resourcelock.New( - leaderElectConfig.ResourceLock, - metav1.NamespaceSystem, - gceMachineControllerName, - leaderElectionClient.CoreV1(), - resourcelock.ResourceLockConfig{ - Identity: id + "-" + gceMachineControllerName, - EventRecorder: recorder, - }) - if err != nil { - return err - } - - // Try and become the leader and start machine controller loops - leaderelection.RunOrDie(leaderelection.LeaderElectionConfig{ - Lock: rl, - LeaseDuration: leaderElectConfig.LeaseDuration.Duration, - RenewDeadline: leaderElectConfig.RenewDeadline.Duration, - RetryPeriod: leaderElectConfig.RetryPeriod.Duration, - Callbacks: leaderelection.LeaderCallbacks{ - OnStartedLeading: run, - OnStoppedLeading: func() { - glog.Fatalf("leaderelection lost") - }, - }, - }) - panic("unreachable") -} - -func createRecorder(kubeClient *kubernetes.Clientset) (record.EventRecorder, error) { - - eventsScheme := runtime.NewScheme() - if err := corev1.AddToScheme(eventsScheme); err != nil { - return nil, err - } - // We also emit events for our own types - clusterapiclientsetscheme.AddToScheme(eventsScheme) - - eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(glog.Infof) - eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: v1core.New(kubeClient.CoreV1().RESTClient()).Events("")}) - return eventBroadcaster.NewRecorder(eventsScheme, corev1.EventSource{Component: gceMachineControllerName}), nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options/BUILD.bazel deleted file mode 100644 index 05a570f264f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["options.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options", - importpath = "sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/config:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options/options.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options/options.go deleted file mode 100644 index 160d2fa53f4..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options/options.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package options - -import ( - "github.com/spf13/pflag" - "sigs.k8s.io/cluster-api/pkg/controller/config" -) - -type MachineControllerServer struct { - CommonConfig *config.Configuration - MachineSetupConfigsPath string -} - -func NewMachineControllerServer() *MachineControllerServer { - s := MachineControllerServer{ - CommonConfig: &config.ControllerConfig, - } - return &s -} - -func (s *MachineControllerServer) AddFlags(fs *pflag.FlagSet) { - fs.StringVar(&s.MachineSetupConfigsPath, "machinesetup", s.MachineSetupConfigsPath, "path to machine setup configs file") - - config.ControllerConfig.AddFlags(pflag.CommandLine) -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/main.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/main.go deleted file mode 100644 index 0a2d18f543f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/main.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "github.com/golang/glog" - "github.com/spf13/pflag" - "k8s.io/apiserver/pkg/util/logs" - "sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app" - "sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller/app/options" - "flag" -) - -func main() { - - s := options.NewMachineControllerServer() - s.AddFlags(pflag.CommandLine) - - pflag.Parse() - // the following line exists to make glog happy, for more information, see: https://github.com/kubernetes/kubernetes/issues/17162 - flag.CommandLine.Parse([]string{}) - - logs.InitLogs() - defer logs.FlushLogs() - - if err := app.Run(s); err != nil { - glog.Errorf("Failed to start machine controller. Err: %v", err) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/generate-image/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/generate-image/BUILD.bazel deleted file mode 100644 index c850140c947..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/generate-image/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/generate-image", - importpath = "sigs.k8s.io/cluster-api/cloud/google/cmd/generate-image", - visibility = ["//visibility:private"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/cobra:go_default_library", - ], -) - -go_binary( - name = "generate-image", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/generate-image/main.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/generate-image/main.go deleted file mode 100644 index e3b1468239b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/cmd/generate-image/main.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "fmt" - - "io/ioutil" - "os" - - "github.com/golang/glog" - "github.com/spf13/cobra" -) - -type options struct { - script string -} - -var opts options - -var generateCmd = &cobra.Command{ - Use: "generate_image", - Short: "Outputs a script to generate a preloaded image", - Run: func(cmd *cobra.Command, args []string) { - if opts.script == "" { - glog.Error("Please provide a startup script.") - cmd.Help() - os.Exit(1) - } - - if err := runGenerate(opts); err != nil { - glog.Exit(err) - } - }, -} - -func init() { - generateCmd.Flags().StringVar(&opts.script, "script", "", "The path to the machine's startup script") -} - -func runGenerate(o options) error { - bytes, err := ioutil.ReadFile(o.script) - if err != nil { - return err - } - - // just print the script for now - // TODO actually start a VM, let it run the script, stop the VM, then create the image - fmt.Println(string(bytes)) - return nil -} - -func main() { - if err := generateCmd.Execute(); err != nil { - glog.Exit(err) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/config/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/google/config/BUILD.bazel deleted file mode 100644 index efbe6c22e79..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/config/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["configtemplate.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/google/config", - importpath = "sigs.k8s.io/cluster-api/cloud/google/config", - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/config/configtemplate.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/config/configtemplate.go deleted file mode 100644 index 2510d296066..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/config/configtemplate.go +++ /dev/null @@ -1,487 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package config - -const ClusterAPIDeployConfigTemplate = ` -apiVersion: apiregistration.k8s.io/v1beta1 -kind: APIService -metadata: - name: v1alpha1.cluster.k8s.io - labels: - api: clusterapi - apiserver: "true" -spec: - version: v1alpha1 - group: cluster.k8s.io - groupPriorityMinimum: 2000 - priority: 200 - service: - name: clusterapi - namespace: default - versionPriority: 10 - caBundle: {{ .CABundle }} ---- -apiVersion: v1 -kind: Service -metadata: - name: clusterapi - namespace: default - labels: - api: clusterapi - apiserver: "true" -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 443 - selector: - api: clusterapi - apiserver: "true" ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: clusterapi - namespace: default - labels: - api: clusterapi - apiserver: "true" -spec: - replicas: 1 - template: - metadata: - labels: - api: clusterapi - apiserver: "true" - spec: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - key: CriticalAddonsOnly - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/notReady - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/unreachable - operator: Exists - containers: - - name: apiserver - image: {{ .APIServerImage }} - volumeMounts: - - name: cluster-apiserver-certs - mountPath: /apiserver.local.config/certificates - readOnly: true - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - command: - - "./apiserver" - args: - - "--etcd-servers=http://etcd-clusterapi-svc:2379" - - "--tls-cert-file=/apiserver.local.config/certificates/tls.crt" - - "--tls-private-key-file=/apiserver.local.config/certificates/tls.key" - - "--audit-log-path=-" - - "--audit-log-maxage=0" - - "--audit-log-maxbackup=0" - - "--authorization-kubeconfig=/etc/kubernetes/admin.conf" - - "--kubeconfig=/etc/kubernetes/admin.conf" - resources: - requests: - cpu: 100m - memory: 20Mi - limits: - cpu: 100m - memory: 30Mi - - name: controller-manager - image: {{ .ControllerManagerImage }} - volumeMounts: - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - command: - - "./controller-manager" - args: - - --kubeconfig=/etc/kubernetes/admin.conf - resources: - requests: - cpu: 100m - memory: 20Mi - limits: - cpu: 100m - memory: 30Mi - - name: gce-machine-controller - image: {{ .MachineControllerImage }} - volumeMounts: - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - - name: credentials - mountPath: /etc/credentials - - name: sshkeys - mountPath: /etc/sshkeys - - name: machine-setup - mountPath: /etc/machinesetup - - name: kubeadm - mountPath: /usr/bin/kubeadm - env: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: /etc/credentials/service-account.json - command: - - "./gce-machine-controller" - args: - - --kubeconfig=/etc/kubernetes/admin.conf - - --machinesetup=/etc/machinesetup/machine_setup_configs.yaml - resources: - requests: - cpu: 100m - memory: 20Mi - limits: - cpu: 100m - memory: 30Mi - volumes: - - name: cluster-apiserver-certs - secret: - secretName: cluster-apiserver-certs - - name: config - hostPath: - path: /etc/kubernetes - - name: certs - hostPath: - path: /etc/ssl/certs - - name: sshkeys - secret: - secretName: machine-controller-sshkeys - defaultMode: 256 - - name: credentials - secret: - secretName: machine-controller-credential - - name: machine-setup - configMap: - name: machine-setup - - name: kubeadm - hostPath: - path: /usr/bin/kubeadm ---- -apiVersion: apps/v1beta1 -kind: StatefulSet -metadata: - name: etcd-clusterapi - namespace: default -spec: - serviceName: "etcd" - replicas: 1 - template: - metadata: - labels: - app: etcd - spec: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - key: CriticalAddonsOnly - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/notReady - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/unreachable - operator: Exists - volumes: - - hostPath: - path: /var/lib/etcd2 - type: DirectoryOrCreate - name: etcd-data-dir - terminationGracePeriodSeconds: 10 - containers: - - name: etcd - image: quay.io/coreos/etcd:latest - imagePullPolicy: Always - resources: - requests: - cpu: 100m - memory: 20Mi - limits: - cpu: 100m - memory: 30Mi - env: - - name: ETCD_DATA_DIR - value: /etcd-data-dir - command: - - /usr/local/bin/etcd - - --listen-client-urls - - http://0.0.0.0:2379 - - --advertise-client-urls - - http://localhost:2379 - ports: - - containerPort: 2379 - volumeMounts: - - name: etcd-data-dir - mountPath: /etcd-data-dir - readinessProbe: - httpGet: - port: 2379 - path: /health - failureThreshold: 1 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 - livenessProbe: - httpGet: - port: 2379 - path: /health - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 ---- -apiVersion: v1 -kind: Service -metadata: - name: etcd-clusterapi-svc - namespace: default - labels: - app: etcd -spec: - ports: - - port: 2379 - name: etcd - targetPort: 2379 - selector: - app: etcd ---- -apiVersion: v1 -kind: Secret -type: kubernetes.io/tls -metadata: - name: cluster-apiserver-certs - namespace: default - labels: - api: clusterapi - apiserver: "true" -data: - tls.crt: {{ .TLSCrt }} - tls.key: {{ .TLSKey }} -` - -const StorageClassConfigTemplate = ` -kind: StorageClass -apiVersion: storage.k8s.io/v1 -metadata: - name: standard - annotations: - storageclass.kubernetes.io/is-default-class: "true" -provisioner: kubernetes.io/gce-pd -parameters: - type: pd-standard -` - -const IngressControllerConfigTemplate = ` -apiVersion: v1 -kind: ServiceAccount -metadata: - name: glbc - namespace: kube-system ---- -apiVersion: rbac.authorization.k8s.io/ -kind: ClusterRole -metadata: - name: system:controller:glbc -rules: -- apiGroups: [""] - resources: ["secrets", "endpoints", "services", "pods", "nodes", "namespaces"] - verbs: ["describe", "get", "list", "watch"] -- apiGroups: [""] - resources: ["events", "configmaps"] - verbs: ["describe", "get", "list", "watch", "update", "create", "patch"] -- apiGroups: ["extensions"] - resources: ["ingresses"] - verbs: ["get", "list", "watch", "update"] -- apiGroups: ["extensions"] - resources: ["ingresses/status"] - verbs: ["update"] ---- -apiVersion: rbac.authorization.k8s.io/ -kind: ClusterRoleBinding -metadata: - name: system:controller:glbc -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:controller:glbc -subjects: -- kind: ServiceAccount - name: glbc - namespace: kube-system ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: l7-default-backend - namespace: kube-system - labels: - k8s-app: glbc - kubernetes.io/name: "GLBC" - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -spec: - replicas: 1 - selector: - matchLabels: - k8s-app: glbc - template: - metadata: - labels: - k8s-app: glbc - name: glbc - spec: - containers: - - name: default-http-backend - # Any image is permissible as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: gcr.io/google_containers/defaultbackend:1.4 - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 10m - memory: 20Mi - requests: - cpu: 10m - memory: 20Mi ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: ingress-controller-config - namespace: kube-system -data: - gce.conf: | - [global] - token-url = nil - network = default - project-id = {{ .Project }} - node-tags = {{ .NodeTag }} ---- -apiVersion: v1 -kind: Service -metadata: - # This must match the --default-backend-service argument of the l7 lb - # controller and is required because GCE mandates a default backend. - name: default-http-backend - namespace: kube-system - labels: - k8s-app: glbc - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "GLBCDefaultBackend" -spec: - # The default backend must be of type NodePort. - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - name: http - selector: - k8s-app: glbc ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - namespace: kube-system - name: l7-lb-controller - annotations: - scheduler.alpha.kubernetes.io/critical-pod: '' - labels: - k8s-app: glbc - version: v1.1.1 - kubernetes.io/name: "GLBC" -spec: - # There should never be more than 1 controller alive simultaneously. - replicas: 1 - selector: - matchLabels: - k8s-app: glbc - version: v1.1.1 - template: - metadata: - labels: - k8s-app: glbc - version: v1.1.1 - name: glbc - spec: - serviceAccountName: glbc - terminationGracePeriodSeconds: 600 - containers: - - image: k8s.gcr.io/ingress-gce-glbc-amd64:v1.1.1 - livenessProbe: - httpGet: - path: /healthz - port: 8086 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - env: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: /etc/credentials/service-account.json - name: l7-lb-controller - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 50Mi - command: - - sh - - -c - - 'exec /glbc --gce-ratelimit=ga.Operations.Get,qps,10,100 --gce-ratelimit=alpha.Operations.Get,qps,10,100 --gce-ratelimit=ga.BackendServices.Get,qps,1.8,1 --gce-ratelimit=ga.HealthChecks.Get,qps,1.8,1 --gce-ratelimit=alpha.HealthChecks.Get,qps,1.8,1 --verbose --default-backend-service=kube-system/default-http-backend --sync-period=600s --running-in-cluster=true --use-real-cloud=true --config-file-path=/etc/ingress-config/gce.conf --healthz-port=8086 2>&1' - volumeMounts: - - mountPath: /etc/ingress-config - name: cloudconfig - readOnly: true - - mountPath: /etc/credentials - name: credentials - readOnly: true - volumes: - - name: cloudconfig - configMap: - name: ingress-controller-config - - name: credentials - secret: - secretName: glbc-gcp-key -` diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/delete-service-accounts.sh b/vendor/sigs.k8s.io/cluster-api/cloud/google/delete-service-accounts.sh deleted file mode 100755 index e7e1f746fc1..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/delete-service-accounts.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -set -e - -#Delete service accounts - -gcloud iam service-accounts delete $MASTER_SERVICE_ACCOUNT -gcloud iam service-accounts delete $WORKER_SERVICE_ACCOUNT -gcloud iam service-accounts delete $INGRESS_CONTROLLER_SERVICE_ACCOUNT -gcloud iam service-accounts delete $MACHINE_CONTROLLER_SERVICE_ACCOUNT - -#Delete roles - -export PROJECT_ID=$(gcloud config get-value project) - -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$MASTER_SERVICE_ACCOUNT --role='roles/compute.instanceAdmin' -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$MASTER_SERVICE_ACCOUNT --role='roles/compute.networkAdmin' -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$MASTER_SERVICE_ACCOUNT --role='roles/compute.securityAdmin' -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$MASTER_SERVICE_ACCOUNT --role='roles/compute.viewer' -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$MASTER_SERVICE_ACCOUNT --role='roles/iam.serviceAccountUser' -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$MASTER_SERVICE_ACCOUNT --role='roles/storage.admin' -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$MASTER_SERVICE_ACCOUNT --role='roles/storage.objectViewer' - -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$INGRESS_CONTROLLER_SERVICE_ACCOUNT --role='roles/compute.instanceAdmin.v1' -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$INGRESS_CONTROLLER_SERVICE_ACCOUNT --role='roles/compute.networkAdmin' -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$INGRESS_CONTROLLER_SERVICE_ACCOUNT --role='roles/compute.securityAdmin' -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$INGRESS_CONTROLLER_SERVICE_ACCOUNT --role='roles/iam.serviceAccountActor' - -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$MACHINE_CONTROLLER_SERVICE_ACCOUNT --role='roles/compute.instanceAdmin.v1' -gcloud projects remove-iam-policy-binding $PROJECT_ID --member=serviceAccount:$MACHINE_CONTROLLER_SERVICE_ACCOUNT --role='roles/iam.serviceAccountActor' diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/BUILD.bazel deleted file mode 100644 index b55540d358b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig", - importpath = "sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/doc.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/doc.go deleted file mode 100644 index a7135857c0c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/machinecontroller/cloud/google/gceproviderconfig -// +k8s:openapi-gen=true -// +k8s:defaulter-gen=TypeMeta - -package gceproviderconfig diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/register.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/register.go deleted file mode 100644 index 161871cc269..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/register.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gceproviderconfig - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - SchemeBuilder runtime.SchemeBuilder - AddToScheme = SchemeBuilder.AddToScheme - localSchemeBuilder = &SchemeBuilder -) - -func init() { - localSchemeBuilder.Register(addKnownTypes) -} - -const GroupName = "gceproviderconfig" - -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &GCEMachineProviderConfig{}, - ) - scheme.AddKnownTypes(SchemeGroupVersion, - &GCEClusterProviderConfig{}, - ) - return nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/types.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/types.go deleted file mode 100644 index e9de3bb48a3..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/types.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gceproviderconfig - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type GCEMachineProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - Zone string `json:"zone"` - MachineType string `json:"machineType"` - - // The name of the OS to be installed on the machine. - OS string `json:"os"` - Disks []Disk `json:"disks"` -} - -type Disk struct { - InitializeParams DiskInitializeParams `json:"initializeParams"` -} - -type DiskInitializeParams struct { - DiskSizeGb int64 `json:"diskSizeGb"` - DiskType string `json:"diskType"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type GCEClusterProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - Project string `json:"project"` -} \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/BUILD.bazel deleted file mode 100644 index 25bcd51ef3b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/BUILD.bazel +++ /dev/null @@ -1,22 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1", - importpath = "sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/doc.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/doc.go deleted file mode 100644 index d1d709462bd..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/machinecontroller/cloud/google/gceproviderconfig -// +k8s:openapi-gen=true -// +k8s:defaulter-gen=TypeMeta - -package v1alpha1 diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/register.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/register.go deleted file mode 100644 index a588328f896..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/register.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "bytes" - "fmt" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/runtime/serializer" - "sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -type GCEProviderConfigCodec struct { - encoder runtime.Encoder - decoder runtime.Decoder -} - -const GroupName = "gceproviderconfig" - -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - localSchemeBuilder.Register(addKnownTypes) -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &GCEMachineProviderConfig{}, - ) - scheme.AddKnownTypes(SchemeGroupVersion, - &GCEClusterProviderConfig{}, - ) - return nil -} - -func NewScheme() (*runtime.Scheme, error) { - scheme := runtime.NewScheme() - if err := AddToScheme(scheme); err != nil { - return nil, err - } - if err := gceproviderconfig.AddToScheme(scheme); err != nil { - return nil, err - } - return scheme, nil -} - -func NewCodec() (*GCEProviderConfigCodec, error) { - scheme, err := NewScheme() - if err != nil { - return nil, err - } - codecFactory := serializer.NewCodecFactory(scheme) - encoder, err := newEncoder(&codecFactory) - if err != nil { - return nil, err - } - codec := GCEProviderConfigCodec{ - encoder: encoder, - decoder: codecFactory.UniversalDecoder(SchemeGroupVersion), - } - return &codec, nil -} - -func (codec *GCEProviderConfigCodec) DecodeFromProviderConfig(providerConfig clusterv1.ProviderConfig, out runtime.Object) (error) { - _, _, err := codec.decoder.Decode(providerConfig.Value.Raw, nil, out) - if err != nil { - return fmt.Errorf("decoding failure: %v", err) - } - return nil -} - -func (codec *GCEProviderConfigCodec) EncodeToProviderConfig(in runtime.Object) (*clusterv1.ProviderConfig, error) { - var buf bytes.Buffer - if err := codec.encoder.Encode(in, &buf); err != nil { - return nil, fmt.Errorf("encoding failed: %v", err) - } - return &clusterv1.ProviderConfig{ - Value: &runtime.RawExtension{Raw: buf.Bytes()}, - }, nil -} - -func newEncoder(codecFactory *serializer.CodecFactory) (runtime.Encoder, error) { - serializerInfos := codecFactory.SupportedMediaTypes() - if len(serializerInfos) == 0 { - return nil, fmt.Errorf("unable to find any serlializers") - } - encoder := codecFactory.EncoderForVersion(serializerInfos[0].Serializer, SchemeGroupVersion) - return encoder, nil -} \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/types.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/types.go deleted file mode 100644 index f85be9c1057..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/types.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type GCEMachineProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - Zone string `json:"zone"` - MachineType string `json:"machineType"` - - // The name of the OS to be installed on the machine. - OS string `json:"os"` - Disks []Disk `json:"disks"` -} - -type Disk struct { - InitializeParams DiskInitializeParams `json:"initializeParams"` -} - -type DiskInitializeParams struct { - DiskSizeGb int64 `json:"diskSizeGb"` - DiskType string `json:"diskType"` -} - - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type GCEClusterProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - Project string `json:"project"` -} \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 3d7d54d08f5..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,75 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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 deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCEClusterProviderConfig) DeepCopyInto(out *GCEClusterProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCEClusterProviderConfig. -func (in *GCEClusterProviderConfig) DeepCopy() *GCEClusterProviderConfig { - if in == nil { - return nil - } - out := new(GCEClusterProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GCEClusterProviderConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCEMachineProviderConfig) DeepCopyInto(out *GCEMachineProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCEMachineProviderConfig. -func (in *GCEMachineProviderConfig) DeepCopy() *GCEMachineProviderConfig { - if in == nil { - return nil - } - out := new(GCEMachineProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GCEMachineProviderConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/zz_generated.deepcopy.go deleted file mode 100644 index f655f885701..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/zz_generated.deepcopy.go +++ /dev/null @@ -1,75 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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 deepcopy-gen. DO NOT EDIT. - -package gceproviderconfig - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCEClusterProviderConfig) DeepCopyInto(out *GCEClusterProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCEClusterProviderConfig. -func (in *GCEClusterProviderConfig) DeepCopy() *GCEClusterProviderConfig { - if in == nil { - return nil - } - out := new(GCEClusterProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GCEClusterProviderConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCEMachineProviderConfig) DeepCopyInto(out *GCEMachineProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCEMachineProviderConfig. -func (in *GCEMachineProviderConfig) DeepCopy() *GCEMachineProviderConfig { - if in == nil { - return nil - } - out := new(GCEMachineProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GCEMachineProviderConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/instancestatus.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/instancestatus.go deleted file mode 100644 index 42a0ab6cebe..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/instancestatus.go +++ /dev/null @@ -1,105 +0,0 @@ -package google - -import ( - "bytes" - "fmt" - - "k8s.io/apimachinery/pkg/runtime/serializer/json" - - "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" -) - -// Long term, we should retrieve the current status by asking k8s, gce etc. for all the needed info. -// For now, it is stored in the matching CRD under an annotation. This is similar to -// the spec and status concept where the machine CRD is the instance spec and the annotation is the instance status. - -const InstanceStatusAnnotationKey = "instance-status" - -type instanceStatus *clusterv1.Machine - -// Get the status of the instance identified by the given machine -func (gce *GCEClient) instanceStatus(machine *clusterv1.Machine) (instanceStatus, error) { - if gce.v1Alpha1Client == nil { - return nil, nil - } - currentMachine, err := util.GetMachineIfExists(gce.v1Alpha1Client.Machines(machine.Namespace), machine.ObjectMeta.Name) - if err != nil { - return nil, err - } - - if currentMachine == nil { - // The current status no longer exists because the matching CRD has been deleted (or does not exist yet ie. bootstrapping) - return nil, nil - } - return gce.machineInstanceStatus(currentMachine) -} - -// Sets the status of the instance identified by the given machine to the given machine -func (gce *GCEClient) updateInstanceStatus(machine *clusterv1.Machine) error { - if gce.v1Alpha1Client == nil { - return nil - } - status := instanceStatus(machine) - currentMachine, err := util.GetMachineIfExists(gce.v1Alpha1Client.Machines(machine.Namespace), machine.ObjectMeta.Name) - if err != nil { - return err - } - - if currentMachine == nil { - // The current status no longer exists because the matching CRD has been deleted. - return fmt.Errorf("Machine has already been deleted. Cannot update current instance status for machine %v", machine.ObjectMeta.Name) - } - - m, err := gce.setMachineInstanceStatus(currentMachine, status) - if err != nil { - return err - } - - _, err = gce.v1Alpha1Client.Machines(machine.Namespace).Update(m) - return err -} - -// Gets the state of the instance stored on the given machine CRD -func (gce *GCEClient) machineInstanceStatus(machine *clusterv1.Machine) (instanceStatus, error) { - if machine.ObjectMeta.Annotations == nil { - // No state - return nil, nil - } - - a := machine.ObjectMeta.Annotations[InstanceStatusAnnotationKey] - if a == "" { - // No state - return nil, nil - } - - serializer := json.NewSerializer(json.DefaultMetaFactory, gce.scheme, gce.scheme, false) - var status clusterv1.Machine - _, _, err := serializer.Decode([]byte(a), &schema.GroupVersionKind{Group: "", Version: "cluster.k8s.io/v1alpha1", Kind: "Machine"}, &status) - if err != nil { - return nil, fmt.Errorf("decoding failure: %v", err) - } - - return instanceStatus(&status), nil -} - -// Applies the state of an instance onto a given machine CRD -func (gce *GCEClient) setMachineInstanceStatus(machine *clusterv1.Machine, status instanceStatus) (*clusterv1.Machine, error) { - // Avoid status within status within status ... - status.ObjectMeta.Annotations[InstanceStatusAnnotationKey] = "" - - serializer := json.NewSerializer(json.DefaultMetaFactory, gce.scheme, gce.scheme, false) - b := []byte{} - buff := bytes.NewBuffer(b) - err := serializer.Encode((*clusterv1.Machine)(status), buff) - if err != nil { - return nil, fmt.Errorf("encoding failure: %v", err) - } - - if machine.ObjectMeta.Annotations == nil { - machine.ObjectMeta.Annotations = make(map[string]string) - } - machine.ObjectMeta.Annotations[InstanceStatusAnnotationKey] = buff.String() - return machine, nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/machineactuator.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/machineactuator.go deleted file mode 100644 index 62a23d1d51d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/machineactuator.go +++ /dev/null @@ -1,884 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package google - -import ( - "bytes" - "errors" - "fmt" - "io/ioutil" - "os" - "path" - "reflect" - "strings" - "time" - - "github.com/golang/glog" - "golang.org/x/net/context" - "golang.org/x/oauth2/google" - compute "google.golang.org/api/compute/v1" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - - "regexp" - - "encoding/base64" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/client-go/kubernetes" - "sigs.k8s.io/cluster-api/cloud/google/clients" - gceconfigv1 "sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1" - "sigs.k8s.io/cluster-api/cloud/google/machinesetup" - apierrors "sigs.k8s.io/cluster-api/errors" - "sigs.k8s.io/cluster-api/kubeadm" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/cert" - client "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" -) - -const ( - ProjectAnnotationKey = "gcp-project" - ZoneAnnotationKey = "gcp-zone" - NameAnnotationKey = "gcp-name" - - BootstrapLabelKey = "boostrap" - - // This file is a yaml that will be used to create the machine-setup configmap on the machine controller. - // It contains the supported machine configurations along with the startup scripts and OS image paths that correspond to each supported configuration. - MachineSetupConfigsFilename = "machine_setup_configs.yaml" -) - -type SshCreds struct { - user string - privateKeyPath string -} - -type GCEClientKubeadm interface { - TokenCreate(params kubeadm.TokenCreateParams) (string, error) -} - -type GCEClientMachineSetupConfigGetter interface { - GetMachineSetupConfig() (machinesetup.MachineSetupConfig, error) -} - -type GCEClientComputeService interface { - ImagesGet(project string, image string) (*compute.Image, error) - ImagesGetFromFamily(project string, family string) (*compute.Image, error) - InstancesDelete(project string, zone string, targetInstance string) (*compute.Operation, error) - InstancesGet(project string, zone string, instance string) (*compute.Instance, error) - InstancesInsert(project string, zone string, instance *compute.Instance) (*compute.Operation, error) - ZoneOperationsGet(project string, zone string, operation string) (*compute.Operation, error) -} - -type GCEClient struct { - certificateAuthority *cert.CertificateAuthority - computeService GCEClientComputeService - gceProviderConfigCodec *gceconfigv1.GCEProviderConfigCodec - kubeadm GCEClientKubeadm - scheme *runtime.Scheme - codecFactory *serializer.CodecFactory - sshCreds SshCreds - v1Alpha1Client client.ClusterV1alpha1Interface - machineSetupConfigGetter GCEClientMachineSetupConfigGetter -} - -type MachineActuatorParams struct { - CertificateAuthority *cert.CertificateAuthority - ComputeService GCEClientComputeService - Kubeadm GCEClientKubeadm - V1Alpha1Client client.ClusterV1alpha1Interface - MachineSetupConfigGetter GCEClientMachineSetupConfigGetter -} - -const ( - gceTimeout = time.Minute * 10 - gceWaitSleep = time.Second * 5 -) - -func NewMachineActuator(params MachineActuatorParams) (*GCEClient, error) { - computeService, err := getOrNewComputeService(params) - if err != nil { - return nil, err - } - - scheme, err := gceconfigv1.NewScheme() - if err != nil { - return nil, err - } - codec, err := gceconfigv1.NewCodec() - if err != nil { - return nil, err - } - - // Only applicable if it's running inside machine controller pod. - var privateKeyPath, user string - if _, err := os.Stat("/etc/sshkeys/private"); err == nil { - privateKeyPath = "/etc/sshkeys/private" - - b, err := ioutil.ReadFile("/etc/sshkeys/user") - if err == nil { - user = string(b) - } else { - return nil, err - } - } - - return &GCEClient{ - certificateAuthority: params.CertificateAuthority, - computeService: computeService, - kubeadm: getOrNewKubeadm(params), - scheme: scheme, - gceProviderConfigCodec: codec, - sshCreds: SshCreds{ - privateKeyPath: privateKeyPath, - user: user, - }, - v1Alpha1Client: params.V1Alpha1Client, - machineSetupConfigGetter: params.MachineSetupConfigGetter, - }, nil -} - -func (gce *GCEClient) CreateMachineController(cluster *clusterv1.Cluster, initialMachines []*clusterv1.Machine, clientSet kubernetes.Clientset) error { - if gce.machineSetupConfigGetter == nil { - return errors.New("a valid machineSetupConfigGetter is required") - } - if err := gce.CreateMachineControllerServiceAccount(cluster, initialMachines); err != nil { - return err - } - - // Setup SSH access to master VM - if err := gce.setupSSHAccess(cluster, util.GetMaster(initialMachines)); err != nil { - return err - } - - if err := CreateExtApiServerRoleBinding(); err != nil { - return err - } - - machineSetupConfig, err := gce.machineSetupConfigGetter.GetMachineSetupConfig() - if err != nil { - return err - } - yaml, err := machineSetupConfig.GetYaml() - if err != nil { - return err - } - configMap := corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{Name: "machine-setup"}, - Data: map[string]string{ - MachineSetupConfigsFilename: yaml, - }, - } - configMaps := clientSet.CoreV1().ConfigMaps(corev1.NamespaceDefault) - if _, err := configMaps.Create(&configMap); err != nil { - return err - } - - if err := CreateApiServerAndController(); err != nil { - return err - } - return nil -} - -func (gce *GCEClient) ProvisionClusterDependencies(cluster *clusterv1.Cluster, initialMachines []*clusterv1.Machine) error { - err := gce.CreateWorkerNodeServiceAccount(cluster, initialMachines) - if err != nil { - return err - } - - return gce.CreateMasterNodeServiceAccount(cluster, initialMachines) -} - -func (gce *GCEClient) Create(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { - if gce.machineSetupConfigGetter == nil { - return errors.New("a valid machineSetupConfigGetter is required") - } - machineConfig, err := gce.machineproviderconfig(machine.Spec.ProviderConfig) - if err != nil { - return gce.handleMachineError(machine, apierrors.InvalidMachineConfiguration( - "Cannot unmarshal machine's providerConfig field: %v", err)) - } - clusterConfig, err := gce.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return gce.handleMachineError(machine, apierrors.InvalidMachineConfiguration( - "Cannot unmarshal cluster's providerConfig field: %v", err)) - } - - if verr := gce.validateMachine(machine, machineConfig); verr != nil { - return gce.handleMachineError(machine, verr) - } - - configParams := &machinesetup.ConfigParams{ - OS: machineConfig.OS, - Roles: machine.Spec.Roles, - Versions: machine.Spec.Versions, - } - machineSetupConfigs, err := gce.machineSetupConfigGetter.GetMachineSetupConfig() - if err != nil { - return err - } - image, err := machineSetupConfigs.GetImage(configParams) - if err != nil { - return err - } - imagePath := gce.getImagePath(image) - metadata, err := gce.getMetadata(cluster, machine, clusterConfig, configParams) - if err != nil { - return err - } - - instance, err := gce.instanceIfExists(cluster, machine) - if err != nil { - return err - } - - name := machine.ObjectMeta.Name - project := clusterConfig.Project - zone := machineConfig.Zone - - if instance == nil { - labels := map[string]string{} - if gce.v1Alpha1Client == nil { - labels[BootstrapLabelKey] = "true" - } - - op, err := gce.computeService.InstancesInsert(project, zone, &compute.Instance{ - Name: name, - MachineType: fmt.Sprintf("zones/%s/machineTypes/%s", zone, machineConfig.MachineType), - CanIpForward: true, - NetworkInterfaces: []*compute.NetworkInterface{ - { - Network: "global/networks/default", - AccessConfigs: []*compute.AccessConfig{ - { - Type: "ONE_TO_ONE_NAT", - Name: "External NAT", - }, - }, - }, - }, - Disks: newDisks(machineConfig, zone, imagePath, int64(30)), - Metadata: metadata, - Tags: &compute.Tags{ - Items: []string{ - "https-server", - fmt.Sprintf("%s-worker", cluster.Name)}, - }, - Labels: labels, - ServiceAccounts: []*compute.ServiceAccount{ - { - Email: gce.GetDefaultServiceAccountForMachine(cluster, machine), - Scopes: []string{ - compute.CloudPlatformScope, - }, - }, - }, - }) - - if err == nil { - err = gce.waitForOperation(clusterConfig, op) - } - - if err != nil { - return gce.handleMachineError(machine, apierrors.CreateMachine( - "error creating GCE instance: %v", err)) - } - - // If we have a v1Alpha1Client, then annotate the machine so that we - // remember exactly what VM we created for it. - if gce.v1Alpha1Client != nil { - return gce.updateAnnotations(cluster, machine) - } - } else { - glog.Infof("Skipped creating a VM that already exists.\n") - } - - return nil -} - -func (gce *GCEClient) Delete(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { - instance, err := gce.instanceIfExists(cluster, machine) - if err != nil { - return err - } - - if instance == nil { - glog.Infof("Skipped deleting a VM that is already deleted.\n") - return nil - } - - machineConfig, err := gce.machineproviderconfig(machine.Spec.ProviderConfig) - if err != nil { - return gce.handleMachineError(machine, - apierrors.InvalidMachineConfiguration("Cannot unmarshal machine's providerConfig field: %v", err)) - } - - clusterConfig, err := gce.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return gce.handleMachineError(machine, - apierrors.InvalidMachineConfiguration("Cannot unmarshal cluster's providerConfig field: %v", err)) - } - - if verr := gce.validateMachine(machine, machineConfig); verr != nil { - return gce.handleMachineError(machine, verr) - } - - var project, zone, name string - - if machine.ObjectMeta.Annotations != nil { - project = machine.ObjectMeta.Annotations[ProjectAnnotationKey] - zone = machine.ObjectMeta.Annotations[ZoneAnnotationKey] - name = machine.ObjectMeta.Annotations[NameAnnotationKey] - } - - // If the annotations are missing, fall back on providerConfig - if project == "" || zone == "" || name == "" { - project = clusterConfig.Project - zone = machineConfig.Zone - name = machine.ObjectMeta.Name - } - - op, err := gce.computeService.InstancesDelete(project, zone, name) - if err == nil { - err = gce.waitForOperation(clusterConfig, op) - } - if err != nil { - return gce.handleMachineError(machine, apierrors.DeleteMachine( - "error deleting GCE instance: %v", err)) - } - - if gce.v1Alpha1Client != nil { - // Remove the finalizer - machine.ObjectMeta.Finalizers = util.Filter(machine.ObjectMeta.Finalizers, clusterv1.MachineFinalizer) - _, err = gce.v1Alpha1Client.Machines(machine.Namespace).Update(machine) - } - - return err -} - -func (gce *GCEClient) PostCreate(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error { - err := CreateDefaultStorageClass() - if err != nil { - return fmt.Errorf("error creating default storage class: %v", err) - } - - err = gce.CreateIngressControllerServiceAccount(cluster, machines) - if err != nil { - return fmt.Errorf("error creating service account for ingress controller: %v", err) - } - - clusterConfig, err := gce.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return fmt.Errorf("Cannot unmarshal cluster's providerConfig field: %v", err) - } - err = CreateIngressController(clusterConfig.Project, cluster.Name) - if err != nil { - return fmt.Errorf("error creating ingress controller: %v", err) - } - - return nil -} - -func (gce *GCEClient) PostDelete(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error { - if err := gce.DeleteMasterNodeServiceAccount(cluster, machines); err != nil { - return fmt.Errorf("error deleting master node service account: %v", err) - } - if err := gce.DeleteWorkerNodeServiceAccount(cluster, machines); err != nil { - return fmt.Errorf("error deleting worker node service account: %v", err) - } - if err := gce.DeleteIngressControllerServiceAccount(cluster, machines); err != nil { - return fmt.Errorf("error deleting ingress controller service account: %v", err) - } - if err := gce.DeleteMachineControllerServiceAccount(cluster, machines); err != nil { - return fmt.Errorf("error deleting machine controller service account: %v", err) - } - return nil -} - -func (gce *GCEClient) Update(cluster *clusterv1.Cluster, goalMachine *clusterv1.Machine) error { - // Before updating, do some basic validation of the object first. - config, err := gce.machineproviderconfig(goalMachine.Spec.ProviderConfig) - if err != nil { - return gce.handleMachineError(goalMachine, - apierrors.InvalidMachineConfiguration("Cannot unmarshal machine's providerConfig field: %v", err)) - } - if verr := gce.validateMachine(goalMachine, config); verr != nil { - return gce.handleMachineError(goalMachine, verr) - } - - status, err := gce.instanceStatus(goalMachine) - if err != nil { - return err - } - - currentMachine := (*clusterv1.Machine)(status) - if currentMachine == nil { - instance, err := gce.instanceIfExists(cluster, goalMachine) - if err != nil { - return err - } - if instance != nil && instance.Labels[BootstrapLabelKey] != "" { - glog.Infof("Populating current state for boostrap machine %v", goalMachine.ObjectMeta.Name) - return gce.updateAnnotations(cluster, goalMachine) - } else { - return fmt.Errorf("Cannot retrieve current state to update machine %v", goalMachine.ObjectMeta.Name) - } - } - - if !gce.requiresUpdate(currentMachine, goalMachine) { - return nil - } - - if util.IsMaster(currentMachine) { - glog.Infof("Doing an in-place upgrade for master.\n") - // TODO: should we support custom CAs here? - err = gce.updateMasterInplace(cluster, currentMachine, goalMachine) - if err != nil { - glog.Errorf("master inplace update failed: %v", err) - } - } else { - glog.Infof("re-creating machine %s for update.", currentMachine.ObjectMeta.Name) - err = gce.Delete(cluster, currentMachine) - if err != nil { - glog.Errorf("delete machine %s for update failed: %v", currentMachine.ObjectMeta.Name, err) - } else { - err = gce.Create(cluster, goalMachine) - if err != nil { - glog.Errorf("create machine %s for update failed: %v", goalMachine.ObjectMeta.Name, err) - } - } - } - if err != nil { - return err - } - err = gce.updateInstanceStatus(goalMachine) - return err -} - -func (gce *GCEClient) Exists(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error) { - i, err := gce.instanceIfExists(cluster, machine) - if err != nil { - return false, err - } - return (i != nil), err -} - -func (gce *GCEClient) GetIP(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error) { - machineConfig, err := gce.machineproviderconfig(machine.Spec.ProviderConfig) - if err != nil { - return "", err - } - - clusterConfig, err := gce.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return "", err - } - - instance, err := gce.computeService.InstancesGet(clusterConfig.Project, machineConfig.Zone, machine.ObjectMeta.Name) - if err != nil { - return "", err - } - - var publicIP string - - for _, networkInterface := range instance.NetworkInterfaces { - if networkInterface.Name == "nic0" { - for _, accessConfigs := range networkInterface.AccessConfigs { - publicIP = accessConfigs.NatIP - } - } - } - return publicIP, nil -} - -func (gce *GCEClient) GetKubeConfig(cluster *clusterv1.Cluster, master *clusterv1.Machine) (string, error) { - machineConfig, err := gce.machineproviderconfig(master.Spec.ProviderConfig) - if err != nil { - return "", err - } - - clusterConfig, err := gce.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return "", err - } - - command := "sudo cat /etc/kubernetes/admin.conf" - result := strings.TrimSpace(util.ExecCommand( - "gcloud", "compute", "ssh", "--project", clusterConfig.Project, - "--zone", machineConfig.Zone, master.ObjectMeta.Name, "--command", command, "--", "-q")) - return result, nil -} - -func (gce *GCEClient) updateAnnotations(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { - machineConfig, err := gce.machineproviderconfig(machine.Spec.ProviderConfig) - name := machine.ObjectMeta.Name - zone := machineConfig.Zone - if err != nil { - return gce.handleMachineError(machine, - apierrors.InvalidMachineConfiguration("Cannot unmarshal machine's providerConfig field: %v", err)) - } - - clusterConfig, err := gce.clusterproviderconfig(cluster.Spec.ProviderConfig) - project := clusterConfig.Project - if err != nil { - return gce.handleMachineError(machine, - apierrors.InvalidMachineConfiguration("Cannot unmarshal cluster's providerConfig field: %v", err)) - } - - if machine.ObjectMeta.Annotations == nil { - machine.ObjectMeta.Annotations = make(map[string]string) - } - machine.ObjectMeta.Annotations[ProjectAnnotationKey] = project - machine.ObjectMeta.Annotations[ZoneAnnotationKey] = zone - machine.ObjectMeta.Annotations[NameAnnotationKey] = name - _, err = gce.v1Alpha1Client.Machines(machine.Namespace).Update(machine) - if err != nil { - return err - } - err = gce.updateInstanceStatus(machine) - return err -} - -// The two machines differ in a way that requires an update -func (gce *GCEClient) requiresUpdate(a *clusterv1.Machine, b *clusterv1.Machine) bool { - // Do not want status changes. Do want changes that impact machine provisioning - return !reflect.DeepEqual(a.Spec.ObjectMeta, b.Spec.ObjectMeta) || - !reflect.DeepEqual(a.Spec.ProviderConfig, b.Spec.ProviderConfig) || - !reflect.DeepEqual(a.Spec.Roles, b.Spec.Roles) || - !reflect.DeepEqual(a.Spec.Versions, b.Spec.Versions) || - a.ObjectMeta.Name != b.ObjectMeta.Name -} - -// Gets the instance represented by the given machine -func (gce *GCEClient) instanceIfExists(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (*compute.Instance, error) { - identifyingMachine := machine - - // Try to use the last saved status locating the machine - // in case instance details like the proj or zone has changed - status, err := gce.instanceStatus(machine) - if err != nil { - return nil, err - } - - if status != nil { - identifyingMachine = (*clusterv1.Machine)(status) - } - - // Get the VM via specified location and name - machineConfig, err := gce.machineproviderconfig(identifyingMachine.Spec.ProviderConfig) - if err != nil { - return nil, err - } - - clusterConfig, err := gce.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return nil, err - } - - instance, err := gce.computeService.InstancesGet(clusterConfig.Project, machineConfig.Zone, identifyingMachine.ObjectMeta.Name) - if err != nil { - // TODO: Use formal way to check for error code 404 - if strings.Contains(err.Error(), "Error 404") { - return nil, nil - } - return nil, err - } - - return instance, nil -} - -func (gce *GCEClient) machineproviderconfig(providerConfig clusterv1.ProviderConfig) (*gceconfigv1.GCEMachineProviderConfig, error) { - var config gceconfigv1.GCEMachineProviderConfig - err := gce.gceProviderConfigCodec.DecodeFromProviderConfig(providerConfig, &config) - if err != nil { - return nil, err - } - return &config, nil -} - -func (gce *GCEClient) clusterproviderconfig(providerConfig clusterv1.ProviderConfig) (*gceconfigv1.GCEClusterProviderConfig, error) { - var config gceconfigv1.GCEClusterProviderConfig - err := gce.gceProviderConfigCodec.DecodeFromProviderConfig(providerConfig, &config) - if err != nil { - return nil, err - } - return &config, nil -} - -func (gce *GCEClient) waitForOperation(c *gceconfigv1.GCEClusterProviderConfig, op *compute.Operation) error { - glog.Infof("Wait for %v %q...", op.OperationType, op.Name) - defer glog.Infof("Finish wait for %v %q...", op.OperationType, op.Name) - - start := time.Now() - ctx, cf := context.WithTimeout(context.Background(), gceTimeout) - defer cf() - - var err error - for { - if err = gce.checkOp(op, err); err != nil || op.Status == "DONE" { - return err - } - glog.V(1).Infof("Wait for %v %q: %v (%d%%): %v", op.OperationType, op.Name, op.Status, op.Progress, op.StatusMessage) - select { - case <-ctx.Done(): - return fmt.Errorf("gce operation %v %q timed out after %v", op.OperationType, op.Name, time.Since(start)) - case <-time.After(gceWaitSleep): - } - op, err = gce.getOp(c, op) - } -} - -// getOp returns an updated operation. -func (gce *GCEClient) getOp(c *gceconfigv1.GCEClusterProviderConfig, op *compute.Operation) (*compute.Operation, error) { - return gce.computeService.ZoneOperationsGet(c.Project, path.Base(op.Zone), op.Name) -} - -func (gce *GCEClient) checkOp(op *compute.Operation, err error) error { - if err != nil || op.Error == nil || len(op.Error.Errors) == 0 { - return err - } - - var errs bytes.Buffer - for _, v := range op.Error.Errors { - errs.WriteString(v.Message) - errs.WriteByte('\n') - } - return errors.New(errs.String()) -} - -func (gce *GCEClient) updateMasterInplace(cluster *clusterv1.Cluster, oldMachine *clusterv1.Machine, newMachine *clusterv1.Machine) error { - if oldMachine.Spec.Versions.ControlPlane != newMachine.Spec.Versions.ControlPlane { - cmd := fmt.Sprintf( - "curl -sSL https://dl.k8s.io/release/v%s/bin/linux/amd64/kubeadm | sudo tee /usr/bin/kubeadm > /dev/null; "+ - "sudo chmod a+rx /usr/bin/kubeadm", newMachine.Spec.Versions.ControlPlane) - _, err := gce.remoteSshCommand(cluster, newMachine, cmd) - if err != nil { - glog.Infof("remotesshcomand error: %v", err) - return err - } - - // TODO: We might want to upgrade kubeadm if the target control plane version is newer. - // Upgrade control plan. - cmd = fmt.Sprintf("sudo kubeadm upgrade apply %s -y", "v"+newMachine.Spec.Versions.ControlPlane) - _, err = gce.remoteSshCommand(cluster, newMachine, cmd) - if err != nil { - glog.Infof("remotesshcomand error: %v", err) - return err - } - } - - // Upgrade kubelet. - if oldMachine.Spec.Versions.Kubelet != newMachine.Spec.Versions.Kubelet { - cmd := fmt.Sprintf("sudo kubectl drain %s --kubeconfig /etc/kubernetes/admin.conf --ignore-daemonsets", newMachine.Name) - // The errors are intentionally ignored as master has static pods. - gce.remoteSshCommand(cluster, newMachine, cmd) - // Upgrade kubelet to desired version. - cmd = fmt.Sprintf("sudo apt-get install kubelet=%s", newMachine.Spec.Versions.Kubelet+"-00") - _, err := gce.remoteSshCommand(cluster, newMachine, cmd) - if err != nil { - glog.Infof("remotesshcomand error: %v", err) - return err - } - cmd = fmt.Sprintf("sudo kubectl uncordon %s --kubeconfig /etc/kubernetes/admin.conf", newMachine.Name) - _, err = gce.remoteSshCommand(cluster, newMachine, cmd) - if err != nil { - glog.Infof("remotesshcomand error: %v", err) - return err - } - } - - return nil -} - -func (gce *GCEClient) validateMachine(machine *clusterv1.Machine, config *gceconfigv1.GCEMachineProviderConfig) *apierrors.MachineError { - if machine.Spec.Versions.Kubelet == "" { - return apierrors.InvalidMachineConfiguration("spec.versions.kubelet can't be empty") - } - return nil -} - -// If the GCEClient has a client for updating Machine objects, this will set -// the appropriate reason/message on the Machine.Status. If not, such as during -// cluster installation, it will operate as a no-op. It also returns the -// original error for convenience, so callers can do "return handleMachineError(...)". -func (gce *GCEClient) handleMachineError(machine *clusterv1.Machine, err *apierrors.MachineError) error { - if gce.v1Alpha1Client != nil { - reason := err.Reason - message := err.Message - machine.Status.ErrorReason = &reason - machine.Status.ErrorMessage = &message - gce.v1Alpha1Client.Machines(machine.Namespace).UpdateStatus(machine) - } - - glog.Errorf("Machine error: %v", err.Message) - return err -} - -func (gce *GCEClient) getImagePath(img string) (imagePath string) { - defaultImg := "projects/ubuntu-os-cloud/global/images/family/ubuntu-1710" - - // A full image path must match the regex format. If it doesn't, we will fall back to a default base image. - matches := regexp.MustCompile("projects/(.+)/global/images/(family/)*(.+)").FindStringSubmatch(img) - if matches != nil { - // Check to see if the image exists in the given path. The presence of "family" in the path dictates which API call we need to make. - project, family, name := matches[1], matches[2], matches[3] - var err error - if family == "" { - _, err = gce.computeService.ImagesGet(project, name) - } else { - _, err = gce.computeService.ImagesGetFromFamily(project, name) - } - - if err == nil { - return img - } - } - - // Otherwise, fall back to the base image. - glog.Infof("Could not find image at %s. Defaulting to %s.", img, defaultImg) - return defaultImg -} - -func newDisks(config *gceconfigv1.GCEMachineProviderConfig, zone string, imagePath string, minDiskSizeGb int64) []*compute.AttachedDisk { - var disks []*compute.AttachedDisk - for idx, disk := range config.Disks { - diskSizeGb := disk.InitializeParams.DiskSizeGb - d := compute.AttachedDisk{ - AutoDelete: true, - InitializeParams: &compute.AttachedDiskInitializeParams{ - DiskSizeGb: diskSizeGb, - DiskType: fmt.Sprintf("zones/%s/diskTypes/%s", zone, disk.InitializeParams.DiskType), - }, - } - if idx == 0 { - d.InitializeParams.SourceImage = imagePath - d.Boot = true - if diskSizeGb < minDiskSizeGb { - glog.Info("increasing disk size to %v gb, the supplied disk size of %v gb is below the minimum", minDiskSizeGb, diskSizeGb) - d.InitializeParams.DiskSizeGb = minDiskSizeGb - } - } - disks = append(disks, &d) - } - return disks -} - -// Just a temporary hack to grab a single range from the config. -func getSubnet(netRange clusterv1.NetworkRanges) string { - if len(netRange.CIDRBlocks) == 0 { - return "" - } - return netRange.CIDRBlocks[0] -} - -func (gce *GCEClient) getKubeadmToken() (string, error) { - tokenParams := kubeadm.TokenCreateParams{ - Ttl: time.Duration(10) * time.Minute, - } - output, err := gce.kubeadm.TokenCreate(tokenParams) - if err != nil { - glog.Errorf("unable to create token: %v", err) - return "", err - } - return strings.TrimSpace(output), err -} - -func getOrNewKubeadm(params MachineActuatorParams) GCEClientKubeadm { - if params.Kubeadm == nil { - return kubeadm.New() - } - return params.Kubeadm -} - -func getOrNewComputeService(params MachineActuatorParams) (GCEClientComputeService, error) { - if params.ComputeService != nil { - return params.ComputeService, nil - } - // The default GCP client expects the environment variable - // GOOGLE_APPLICATION_CREDENTIALS to point to a file with service credentials. - client, err := google.DefaultClient(context.TODO(), compute.ComputeScope) - if err != nil { - return nil, err - } - computeService, err := clients.NewComputeService(client) - if err != nil { - return nil, err - } - return computeService, nil -} - -func (gce *GCEClient) getMetadata(cluster *clusterv1.Cluster, machine *clusterv1.Machine, clusterConfig *gceconfigv1.GCEClusterProviderConfig, configParams *machinesetup.ConfigParams) (*compute.Metadata, error) { - var metadataMap map[string]string - if machine.Spec.Versions.Kubelet == "" { - return nil, errors.New("invalid master configuration: missing Machine.Spec.Versions.Kubelet") - } - machineSetupConfigs, err := gce.machineSetupConfigGetter.GetMachineSetupConfig() - if err != nil { - return nil, err - } - machineSetupMetadata, err := machineSetupConfigs.GetMetadata(configParams) - if err != nil { - return nil, err - } - if util.IsMaster(machine) { - if machine.Spec.Versions.ControlPlane == "" { - return nil, gce.handleMachineError(machine, apierrors.InvalidMachineConfiguration( - "invalid master configuration: missing Machine.Spec.Versions.ControlPlane")) - } - var err error - metadataMap, err = masterMetadata(cluster, machine, clusterConfig.Project, &machineSetupMetadata) - if err != nil { - return nil, err - } - ca := gce.certificateAuthority - if ca != nil { - metadataMap["ca-cert"] = base64.StdEncoding.EncodeToString(ca.Certificate) - metadataMap["ca-key"] = base64.StdEncoding.EncodeToString(ca.PrivateKey) - } - } else { - var err error - kubeadmToken, err := gce.getKubeadmToken() - if err != nil { - return nil, err - } - metadataMap, err = nodeMetadata(kubeadmToken, cluster, machine, clusterConfig.Project, &machineSetupMetadata) - if err != nil { - return nil, err - } - } - var metadataItems []*compute.MetadataItems - for k, v := range metadataMap { - v := v // rebind scope to avoid loop aliasing below - metadataItems = append(metadataItems, &compute.MetadataItems{ - Key: k, - Value: &v, - }) - } - metadata := compute.Metadata{ - Items: metadataItems, - } - return &metadata, nil -} - -// TODO: We need to change this when we create dedicated service account for apiserver/controller -// pod. -// -func CreateExtApiServerRoleBinding() error { - return run("kubectl", "create", "rolebinding", - "-n", "kube-system", "machine-controller", "--role=extension-apiserver-authentication-reader", - "--serviceaccount=default:default") -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/machineactuator_test.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/machineactuator_test.go deleted file mode 100644 index c1fee4d83c9..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/machineactuator_test.go +++ /dev/null @@ -1,432 +0,0 @@ -package google_test - -import ( - "encoding/base64" - "fmt" - compute "google.golang.org/api/compute/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1" - "os" - "sigs.k8s.io/cluster-api/cloud/google" - gceconfigv1 "sigs.k8s.io/cluster-api/cloud/google/gceproviderconfig/v1alpha1" - "sigs.k8s.io/cluster-api/cloud/google/machinesetup" - "sigs.k8s.io/cluster-api/kubeadm" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/cert" - "sigs.k8s.io/cluster-api/pkg/test-cmd-runner" - "strings" - "testing" -) - -func init() { - test_cmd_runner.RegisterCallback(tokenCreateCommandCallback) - test_cmd_runner.RegisterCallback(tokenCreateErrorCommandCallback) -} - -const ( - tokenCreateCmdOutput = "c582f9.65a6f54fa78da5ae\n" - tokenCreateCmdError = "failed to load admin kubeconfig [open /etc/kubernetes/admin.conf: permission denied]" -) - -func TestMain(m *testing.M) { - test_cmd_runner.TestMain(m) -} - -type GCEClientComputeServiceMock struct { - mockImagesGet func(project string, image string) (*compute.Image, error) - mockImagesGetFromFamily func(project string, family string) (*compute.Image, error) - mockInstancesDelete func(project string, zone string, targetInstance string) (*compute.Operation, error) - mockInstancesGet func(project string, zone string, instance string) (*compute.Instance, error) - mockInstancesInsert func(project string, zone string, instance *compute.Instance) (*compute.Operation, error) - mockZoneOperationsGet func(project string, zone string, operation string) (*compute.Operation, error) -} - -func (c *GCEClientComputeServiceMock) ImagesGet(project string, image string) (*compute.Image, error) { - if c.mockImagesGet == nil { - return nil, nil - } - return c.mockImagesGet(project, image) -} - -func (c *GCEClientComputeServiceMock) ImagesGetFromFamily(project string, family string) (*compute.Image, error) { - if c.mockImagesGetFromFamily == nil { - return nil, nil - } - return c.mockImagesGetFromFamily(project, family) -} - -func (c *GCEClientComputeServiceMock) InstancesDelete(project string, zone string, targetInstance string) (*compute.Operation, error) { - if c.mockInstancesDelete == nil { - return nil, nil - } - return c.mockInstancesDelete(project, zone, targetInstance) -} - -func (c *GCEClientComputeServiceMock) InstancesGet(project string, zone string, instance string) (*compute.Instance, error) { - if c.mockInstancesGet == nil { - return nil, nil - } - return c.mockInstancesGet(project, zone, instance) -} - -func (c *GCEClientComputeServiceMock) InstancesInsert(project string, zone string, instance *compute.Instance) (*compute.Operation, error) { - if c.mockInstancesInsert == nil { - return nil, nil - } - return c.mockInstancesInsert(project, zone, instance) -} - -func (c *GCEClientComputeServiceMock) ZoneOperationsGet(project string, zone string, operation string) (*compute.Operation, error) { - if c.mockZoneOperationsGet == nil { - return nil, nil - } - return c.mockZoneOperationsGet(project, zone, operation) -} - -type GCEClientMachineSetupConfigMock struct { - mockGetYaml func() (string, error) - mockGetImage func(params *machinesetup.ConfigParams) (string, error) - mockGetMetadata func(params *machinesetup.ConfigParams) (machinesetup.Metadata, error) -} - -func (m *GCEClientMachineSetupConfigMock) GetYaml() (string, error) { - if m.mockGetYaml == nil { - return "", nil - } - return m.mockGetYaml() -} - -func (m *GCEClientMachineSetupConfigMock) GetImage(params *machinesetup.ConfigParams) (string, error) { - if m.mockGetYaml == nil { - return "", nil - } - return m.mockGetImage(params) -} - -func (m *GCEClientMachineSetupConfigMock) GetMetadata(params *machinesetup.ConfigParams) (machinesetup.Metadata, error) { - if m.mockGetYaml == nil { - return machinesetup.Metadata{}, nil - } - return m.mockGetMetadata(params) -} - -func TestKubeadmTokenShouldBeInStartupScript(t *testing.T) { - config := newGCEMachineProviderConfigFixture() - receivedInstance, computeServiceMock := newInsertInstanceCapturingMock() - kubeadm := kubeadm.NewWithCmdRunner(test_cmd_runner.NewTestRunnerFailOnErr(t, tokenCreateCommandCallback)) - machine := newMachine(t, config, common.NodeRole) - err := createCluster(t, machine, computeServiceMock, nil, kubeadm) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if receivedInstance.Metadata.Items == nil { - t.Fatalf("expected the instance to have valid metadata items") - } - startupScript := getMetadataItem(t, receivedInstance.Metadata, "startup-script") - expected := fmt.Sprintf("TOKEN=%v\n", strings.Trim(tokenCreateCmdOutput, "\n")) - if !strings.Contains(*startupScript.Value, expected) { - t.Errorf("startup-script metadata is missing the expected TOKEN variable") - } -} - -func tokenCreateCommandCallback(cmd string, args ...string) int { - fmt.Print(tokenCreateCmdOutput) - return 0 -} - -func TestTokenCreateCommandError(t *testing.T) { - config := newGCEMachineProviderConfigFixture() - _, computeServiceMock := newInsertInstanceCapturingMock() - kubeadm := kubeadm.NewWithCmdRunner(test_cmd_runner.NewTestRunnerFailOnErr(t, tokenCreateErrorCommandCallback)) - machine := newMachine(t, config, common.NodeRole) - err := createCluster(t, machine, computeServiceMock, nil, kubeadm) - if err == nil { - t.Fatalf("expected error, got nil") - } -} - -func tokenCreateErrorCommandCallback(cmd string, args ...string) int { - fmt.Fprintf(os.Stderr, tokenCreateCmdError) - return 1 -} - -func TestNoDisks(t *testing.T) { - config := newGCEMachineProviderConfigFixture() - config.Disks = make([]gceconfigv1.Disk, 0) - receivedInstance, computeServiceMock := newInsertInstanceCapturingMock() - createClusterAndFailOnError(t, config, computeServiceMock, nil) - checkInstanceValues(t, receivedInstance, 0) -} - -func TestMinimumSizeShouldBeEnforced(t *testing.T) { - config := newGCEMachineProviderConfigFixture() - config.Disks = []gceconfigv1.Disk{ - { - InitializeParams: gceconfigv1.DiskInitializeParams{ - DiskType: "pd-ssd", - DiskSizeGb: int64(6), - }, - }, - } - receivedInstance, computeServiceMock := newInsertInstanceCapturingMock() - createClusterAndFailOnError(t, config, computeServiceMock, nil) - checkInstanceValues(t, receivedInstance, 1) - checkDiskValues(t, receivedInstance.Disks[0], true, 30, "pd-ssd", "projects/ubuntu-os-cloud/global/images/family/ubuntu-1710") -} - -func TestOneDisk(t *testing.T) { - config := newGCEMachineProviderConfigFixture() - config.Disks = []gceconfigv1.Disk{ - { - InitializeParams: gceconfigv1.DiskInitializeParams{ - DiskType: "pd-ssd", - DiskSizeGb: 37, - }, - }, - } - receivedInstance, computeServiceMock := newInsertInstanceCapturingMock() - createClusterAndFailOnError(t, config, computeServiceMock, nil) - checkInstanceValues(t, receivedInstance, 1) - checkDiskValues(t, receivedInstance.Disks[0], true, 37, "pd-ssd", "projects/ubuntu-os-cloud/global/images/family/ubuntu-1710") -} - -func TestTwoDisks(t *testing.T) { - config := newGCEMachineProviderConfigFixture() - config.Disks = []gceconfigv1.Disk{ - { - InitializeParams: gceconfigv1.DiskInitializeParams{ - DiskType: "pd-ssd", - DiskSizeGb: 32, - }, - }, - { - InitializeParams: gceconfigv1.DiskInitializeParams{ - DiskType: "pd-standard", - DiskSizeGb: 45, - }, - }, - } - receivedInstance, computeServiceMock := newInsertInstanceCapturingMock() - createClusterAndFailOnError(t, config, computeServiceMock, nil) - checkInstanceValues(t, receivedInstance, 2) - checkDiskValues(t, receivedInstance.Disks[0], true, 32, "pd-ssd", "projects/ubuntu-os-cloud/global/images/family/ubuntu-1710") - checkDiskValues(t, receivedInstance.Disks[1], false, 45, "pd-standard", "") -} - -func getMetadataItem(t *testing.T, metadata *compute.Metadata, itemKey string) *compute.MetadataItems { - for _, i := range metadata.Items { - if i.Key == itemKey { - return i - } - } - t.Fatalf("missing metadata item with key: %v", itemKey) - return nil -} - -func checkInstanceValues(t *testing.T, instance *compute.Instance, diskCount int) { - t.Helper() - if instance == nil { - t.Error("expected a valid instance") - } - if len(instance.Disks) != diskCount { - t.Errorf("invalid disk count: expected '%v' got '%v'", diskCount, len(instance.Disks)) - } -} - -func checkDiskValues(t *testing.T, disk *compute.AttachedDisk, boot bool, sizeGb int64, diskType string, image string) { - t.Helper() - if disk.Boot != boot { - t.Errorf("invalid disk.Boot value: expected '%v' got '%v'", boot, disk.Boot) - } - if disk.InitializeParams.DiskSizeGb != sizeGb { - t.Errorf("invalid disk size: expected '%v' got '%v'", sizeGb, disk.InitializeParams.DiskSizeGb) - } - if !strings.Contains(disk.InitializeParams.DiskType, diskType) { - t.Errorf("invalid disk type '%v': expected it to contain '%v'", disk.InitializeParams.DiskType, diskType) - } - if disk.InitializeParams.SourceImage != image { - t.Errorf("invalid image: expected '%v' got '%v'", image, disk.InitializeParams.SourceImage) - } -} - -func TestCreateWithCAShouldPopulateMetadata(t *testing.T) { - config := newGCEMachineProviderConfigFixture() - receivedInstance, computeServiceMock := newInsertInstanceCapturingMock() - ca, err := cert.Load("testdata/ca") - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - createClusterAndFailOnError(t, config, computeServiceMock, ca) - if receivedInstance.Metadata.Items == nil { - t.Fatalf("expected the instance to have valid metadata items") - } - checkMetadataItem(t, receivedInstance.Metadata, "ca-cert", string(ca.Certificate)) - checkMetadataItem(t, receivedInstance.Metadata, "ca-key", string(ca.PrivateKey)) -} - -func checkMetadataItem(t *testing.T, metadata *compute.Metadata, key string, expectedValue string) { - item := getMetadataItem(t, metadata, key) - value, err := base64.StdEncoding.DecodeString(*item.Value) - if err != nil { - t.Fatalf("unable to base64 decode %v's value: %v", item.Key, *item.Value) - } - if string(value) != expectedValue { - t.Errorf("invalid value for %v, expected %v got %v", key, expectedValue, value) - } -} - -func createClusterAndFailOnError(t *testing.T, config gceconfigv1.GCEMachineProviderConfig, computeServiceMock *GCEClientComputeServiceMock, ca *cert.CertificateAuthority) { - machine := newMachine(t, config, common.MasterRole) - err := createCluster(t, machine, computeServiceMock, ca, nil) - if err != nil { - t.Fatalf("unable to create cluster: %v", err) - } -} - -func createCluster(t *testing.T, machine *v1alpha1.Machine, computeServiceMock *GCEClientComputeServiceMock, ca *cert.CertificateAuthority, kubeadm *kubeadm.Kubeadm) error { - cluster := newDefaultClusterFixture(t) - configWatch := newMachineSetupConfigWatcher() - params := google.MachineActuatorParams{ - CertificateAuthority: ca, - ComputeService: computeServiceMock, - Kubeadm: kubeadm, - MachineSetupConfigGetter: configWatch, - } - gce, err := google.NewMachineActuator(params) - if err != nil { - t.Fatalf("unable to create machine actuator: %v", err) - } - return gce.Create(cluster, machine) -} - -func newInsertInstanceCapturingMock() (*compute.Instance, *GCEClientComputeServiceMock) { - var receivedInstance compute.Instance - computeServiceMock := GCEClientComputeServiceMock{ - mockInstancesInsert: func(project string, zone string, instance *compute.Instance) (*compute.Operation, error) { - receivedInstance = *instance - return &compute.Operation{ - Status: "DONE", - }, nil - }, - } - return &receivedInstance, &computeServiceMock -} - -func newMachineSetupConfigMock() *GCEClientMachineSetupConfigMock { - return &GCEClientMachineSetupConfigMock{ - mockGetYaml: func() (string, error) { - return "", nil - }, - mockGetMetadata: func(params *machinesetup.ConfigParams) (machinesetup.Metadata, error) { - metadata := machinesetup.Metadata{} - return metadata, nil - }, - mockGetImage: func(params *machinesetup.ConfigParams) (string, error) { - return "image-name", nil - }, - } -} - -type TestMachineSetupConfigWatcher struct { - machineSetupConfigMock *GCEClientMachineSetupConfigMock -} - -func newMachineSetupConfigWatcher() *TestMachineSetupConfigWatcher { - return &TestMachineSetupConfigWatcher{ - machineSetupConfigMock: newMachineSetupConfigMock(), - } -} - -func (cw *TestMachineSetupConfigWatcher) GetMachineSetupConfig() (machinesetup.MachineSetupConfig, error) { - return cw.machineSetupConfigMock, nil -} - -func newMachine(t *testing.T, gceProviderConfig gceconfigv1.GCEMachineProviderConfig, role common.MachineRole) *v1alpha1.Machine { - gceProviderConfigCodec, err := gceconfigv1.NewCodec() - if err != nil { - t.Fatalf("unable to create GCE provider config codec: %v", err) - } - providerConfig, err := gceProviderConfigCodec.EncodeToProviderConfig(&gceProviderConfig) - if err != nil { - t.Fatalf("unable to encode provider config: %v", err) - } - - return &v1alpha1.Machine{ - Spec: v1alpha1.MachineSpec{ - ProviderConfig: *providerConfig, - Versions: v1alpha1.MachineVersionInfo{ - Kubelet: "1.9.4", - ControlPlane: "1.9.4", - }, - Roles: []common.MachineRole{ - role, - }, - }, - } -} - -func newGCEMachineProviderConfigFixture() gceconfigv1.GCEMachineProviderConfig { - return gceconfigv1.GCEMachineProviderConfig{ - TypeMeta: v1.TypeMeta{ - APIVersion: "gceproviderconfig/v1alpha1", - Kind: "GCEMachineProviderConfig", - }, - Zone: "us-west5-f", - OS: "os-name", - Disks: make([]gceconfigv1.Disk, 0), - } -} - -func newGCEClusterProviderConfigFixture() gceconfigv1.GCEClusterProviderConfig { - return gceconfigv1.GCEClusterProviderConfig{ - TypeMeta: v1.TypeMeta{ - APIVersion: "gceproviderconfig/v1alpha1", - Kind: "GCEClusterProviderConfig", - }, - Project: "project-name-2000", - } -} - -func newDefaultClusterFixture(t *testing.T) *v1alpha1.Cluster { - gceProviderConfigCodec, err := gceconfigv1.NewCodec() - if err != nil { - t.Fatalf("unable to create GCE provider config codec: %v", err) - } - gceProviderConfig := newGCEClusterProviderConfigFixture() - providerConfig, err := gceProviderConfigCodec.EncodeToProviderConfig(&gceProviderConfig) - if err != nil { - t.Fatalf("unable to encode provider config: %v", err) - } - - return &v1alpha1.Cluster{ - TypeMeta: v1.TypeMeta{ - Kind: "Cluster", - }, - ObjectMeta: v1.ObjectMeta{ - Name: "cluster-test", - }, - Spec: v1alpha1.ClusterSpec{ - ClusterNetwork: v1alpha1.ClusterNetworkingConfig{ - Services: v1alpha1.NetworkRanges{ - CIDRBlocks: []string{ - "10.96.0.0/12", - }, - }, - Pods: v1alpha1.NetworkRanges{ - CIDRBlocks: []string{ - "192.168.0.0/16", - }, - }, - }, - ProviderConfig: *providerConfig, - }, - Status: v1alpha1.ClusterStatus{ - APIEndpoints: []v1alpha1.APIEndpoint{ - { - Host: "172.12.0.1", - Port: 1234, - }, - }, - }, - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/BUILD.bazel deleted file mode 100644 index e2a30b7c3cd..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["config_types.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup", - importpath = "sigs.k8s.io/cluster-api/cloud/google/machinesetup", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["config_types_test.go"], - embed = [":go_default_library"], - deps = [ - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/config_types.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/config_types.go deleted file mode 100644 index 802ab085ffc..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/config_types.go +++ /dev/null @@ -1,161 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machinesetup - -import ( - "fmt" - "io" - "io/ioutil" - "os" - - "reflect" - - "github.com/ghodss/yaml" - clustercommon "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -type MachineSetupConfig interface { - GetYaml() (string, error) - GetImage(params *ConfigParams) (string, error) - GetMetadata(params *ConfigParams) (Metadata, error) -} - -// Config Watch holds the path to the machine setup configs yaml file. -// This works directly with a yaml file is used instead of a ConfigMap object so that we don't take a dependency on the API Server. -type ConfigWatch struct { - path string -} - -// The valid machine setup configs parsed out of the machine setup configs yaml file held in ConfigWatch. -type ValidConfigs struct { - configList *configList -} - -type configList struct { - Items []config `json:"items"` -} - -// A single valid machine setup config that maps a machine's params to the corresponding image and metadata. -type config struct { - // A list of the valid combinations of ConfigParams that will - // map to the given Image and Metadata. - Params []ConfigParams `json:"machineParams"` - - // The fully specified image path. e.g. - // projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts - // projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20180405 - Image string `json:"image"` - Metadata Metadata `json:"metadata"` -} - -type Metadata struct { - StartupScript string `json:"startupScript"` -} - -type ConfigParams struct { - OS string - Roles []clustercommon.MachineRole - Versions clusterv1.MachineVersionInfo -} - -func NewConfigWatch(path string) (*ConfigWatch, error) { - if _, err := os.Stat(path); err != nil { - return nil, err - } - return &ConfigWatch{path: path}, nil -} - -func (cw *ConfigWatch) GetMachineSetupConfig() (MachineSetupConfig, error) { - file, err := os.Open(cw.path) - if err != nil { - return nil, err - } - return parseMachineSetupYaml(file) -} - -func parseMachineSetupYaml(reader io.Reader) (*ValidConfigs, error) { - bytes, err := ioutil.ReadAll(reader) - if err != nil { - return nil, err - } - - configList := &configList{} - err = yaml.Unmarshal(bytes, configList) - if err != nil { - return nil, err - } - - return &ValidConfigs{configList}, nil -} - -func (vc *ValidConfigs) GetYaml() (string, error) { - bytes, err := yaml.Marshal(vc.configList) - if err != nil { - return "", err - } - return string(bytes), nil -} - -func (vc *ValidConfigs) GetImage(params *ConfigParams) (string, error) { - machineSetupConfig, err := vc.matchMachineSetupConfig(params) - if err != nil { - return "", err - } - return machineSetupConfig.Image, nil -} - -func (vc *ValidConfigs) GetMetadata(params *ConfigParams) (Metadata, error) { - machineSetupConfig, err := vc.matchMachineSetupConfig(params) - if err != nil { - return Metadata{}, err - } - return machineSetupConfig.Metadata, nil -} - -func (vc *ValidConfigs) matchMachineSetupConfig(params *ConfigParams) (*config, error) { - matchingConfigs := make([]config, 0) - for _, conf := range vc.configList.Items { - for _, validParams := range conf.Params { - if params.OS != validParams.OS { - continue - } - validRoles := rolesToMap(validParams.Roles) - paramRoles := rolesToMap(params.Roles) - if !reflect.DeepEqual(paramRoles, validRoles) { - continue - } - if params.Versions != validParams.Versions { - continue - } - matchingConfigs = append(matchingConfigs, conf) - } - } - - if len(matchingConfigs) == 1 { - return &matchingConfigs[0], nil - } else if len(matchingConfigs) == 0 { - return nil, fmt.Errorf("could not find a matching machine setup config for params %+v", params) - } else { - return nil, fmt.Errorf("found multiple matching machine setup configs for params %+v", params) - } -} - -func rolesToMap(roles []clustercommon.MachineRole) map[clustercommon.MachineRole]int { - rolesMap := map[clustercommon.MachineRole]int{} - for _, role := range roles { - rolesMap[role] = rolesMap[role] + 1 - } - return rolesMap -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/config_types_test.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/config_types_test.go deleted file mode 100644 index 14d2f36893d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup/config_types_test.go +++ /dev/null @@ -1,365 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machinesetup - -import ( - "io" - "reflect" - "strings" - "testing" - - clustercommon "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -func TestParseMachineSetupYaml(t *testing.T) { - testTables := []struct { - reader io.Reader - expectedErr bool - }{ - { - reader: strings.NewReader(`items: -- machineParams: - - os: ubuntu-1710 - roles: - - Master - versions: - kubelet: 1.9.3 - controlPlane: 1.9.3 - - os: ubuntu-1710 - roles: - - Master - versions: - kubelet: 1.9.4 - controlPlane: 1.9.4 - image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1710 - metadata: - startupScript: | - #!/bin/bash -- machineParams: - - os: ubuntu-1710 - roles: - - Node - versions: - kubelet: 1.9.3 - - os: ubuntu-1710 - roles: - - Node - versions: - kubelet: 1.9.4 - image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1710 - metadata: - startupScript: | - #!/bin/bash - echo this is the node config.`), - expectedErr: false, - }, - { - reader: strings.NewReader("Not valid yaml"), - expectedErr: true, - }, - } - - for _, table := range testTables { - validConfigs, err := parseMachineSetupYaml(table.reader) - if table.expectedErr { - if err == nil { - t.Errorf("An error was not received as expected.") - } - if validConfigs != nil { - t.Errorf("GetMachineSetupConfigs should be nil, got %v", validConfigs) - } - } - if !table.expectedErr { - if err != nil { - t.Errorf("Got unexpected error: %s", err) - } - if validConfigs == nil { - t.Errorf("GetMachineSetupConfigs should have been parsed, but was nil") - } - } - } -} - -func TestGetYaml(t *testing.T) { - testTables := []struct { - validConfigs ValidConfigs - expectedStrings []string - expectedErr bool - }{ - { - validConfigs: ValidConfigs{ - configList: &configList{ - Items: []config{ - { - Params: []ConfigParams{ - { - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.4", - ControlPlane: "1.9.4", - }, - }, - }, - Image: "projects/ubuntu-os-cloud/global/images/family/ubuntu-1710", - Metadata: Metadata{ - StartupScript: "Master startup script", - }, - }, - { - Params: []ConfigParams{ - { - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.NodeRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.4", - }, - }, - }, - Image: "projects/ubuntu-os-cloud/global/images/family/ubuntu-1710", - Metadata: Metadata{ - StartupScript: "Node startup script", - }, - }, - }, - }, - }, - expectedStrings: []string{"startupScript: Master startup script", "startupScript: Node startup script"}, - expectedErr: false, - }, - } - - for _, table := range testTables { - yaml, err := table.validConfigs.GetYaml() - if err == nil && table.expectedErr { - t.Errorf("An error was not received as expected.") - } - if err != nil && !table.expectedErr { - t.Errorf("Got unexpected error: %s", err) - } - for _, expectedString := range table.expectedStrings { - if !strings.Contains(yaml, expectedString) { - t.Errorf("Yaml did not contain expected string, got:\n%s\nwant:\n%s", yaml, expectedString) - } - } - } -} - -func validConfigs(configs ...config) ValidConfigs { - return ValidConfigs{ - configList: &configList{ - Items: configs, - }, - } -} - -func TestMatchMachineSetupConfig(t *testing.T) { - masterMachineSetupConfig := config{ - Params: []ConfigParams{ - { - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.3", - ControlPlane: "1.9.3", - }, - }, - { - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.4", - ControlPlane: "1.9.4", - }, - }, - }, - Image: "projects/ubuntu-os-cloud/global/images/family/ubuntu-1710", - Metadata: Metadata{ - StartupScript: "Master startup script", - }, - } - nodeMachineSetupConfig := config{ - Params: []ConfigParams{ - { - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.NodeRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.3", - }, - }, - { - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.NodeRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.4", - }, - }, - }, - Image: "projects/ubuntu-os-cloud/global/images/family/ubuntu-1710", - Metadata: Metadata{ - StartupScript: "Node startup script", - }, - } - multiRoleSetupConfig := config{ - Params: []ConfigParams{ - { - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole, clustercommon.NodeRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.5", - ControlPlane: "1.9.5", - }, - }, - }, - Image: "projects/ubuntu-os-cloud/global/images/family/ubuntu-1710", - Metadata: Metadata{ - StartupScript: "Multi-role startup script", - }, - } - duplicateMasterMachineSetupConfig := config{ - Params: []ConfigParams{ - { - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.3", - ControlPlane: "1.9.3", - }, - }, - { - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.4", - ControlPlane: "1.9.4", - }, - }, - }, - Image: "projects/ubuntu-os-cloud/global/images/family/ubuntu-1710", - Metadata: Metadata{ - StartupScript: "Duplicate master startup script", - }, - } - - testTables := []struct { - validConfigs ValidConfigs - params ConfigParams - expectedMatch *config - expectedErr bool - }{ - { - validConfigs: validConfigs(masterMachineSetupConfig, nodeMachineSetupConfig, multiRoleSetupConfig), - params: ConfigParams{ - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.4", - ControlPlane: "1.9.4", - }, - }, - expectedMatch: &masterMachineSetupConfig, - expectedErr: false, - }, - { - validConfigs: validConfigs(masterMachineSetupConfig, nodeMachineSetupConfig, multiRoleSetupConfig), - params: ConfigParams{ - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.NodeRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.4", - }, - }, - expectedMatch: &nodeMachineSetupConfig, - expectedErr: false, - }, - { - validConfigs: validConfigs(masterMachineSetupConfig, nodeMachineSetupConfig, multiRoleSetupConfig), - params: ConfigParams{ - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole, clustercommon.NodeRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.5", - ControlPlane: "1.9.5", - }, - }, - expectedMatch: &multiRoleSetupConfig, - expectedErr: false, - }, - { - validConfigs: validConfigs(masterMachineSetupConfig, nodeMachineSetupConfig, multiRoleSetupConfig), - params: ConfigParams{ - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.5", - ControlPlane: "1.9.5", - }, - }, - expectedMatch: nil, - expectedErr: true, - }, - { - validConfigs: validConfigs(masterMachineSetupConfig, nodeMachineSetupConfig, multiRoleSetupConfig), - params: ConfigParams{ - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole, clustercommon.NodeRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.3", - }, - }, - expectedMatch: nil, - expectedErr: true, - }, - { - validConfigs: validConfigs(masterMachineSetupConfig, nodeMachineSetupConfig, multiRoleSetupConfig), - params: ConfigParams{ - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole, clustercommon.MasterRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.5", - ControlPlane: "1.9.5", - }, - }, - expectedMatch: nil, - expectedErr: true, - }, - { - validConfigs: validConfigs(masterMachineSetupConfig, nodeMachineSetupConfig, multiRoleSetupConfig, duplicateMasterMachineSetupConfig), - params: ConfigParams{ - OS: "ubuntu-1710", - Roles: []clustercommon.MachineRole{clustercommon.MasterRole}, - Versions: clusterv1.MachineVersionInfo{ - Kubelet: "1.9.4", - ControlPlane: "1.9.4", - }, - }, - expectedMatch: nil, - expectedErr: true, - }, - } - - for _, table := range testTables { - matched, err := table.validConfigs.matchMachineSetupConfig(&table.params) - if !reflect.DeepEqual(matched, table.expectedMatch) { - t.Errorf("Matched machine setup config was incorrect, got: %+v,\n want %+v.", matched, table.expectedMatch) - } - if err == nil && table.expectedErr { - t.Errorf("An error was not received as expected.") - } - if err != nil && !table.expectedErr { - t.Errorf("Got unexpected error: %s", err) - } - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/metadata.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/metadata.go deleted file mode 100644 index 47e428a8521..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/metadata.go +++ /dev/null @@ -1,138 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package google - -import ( - "bytes" - "text/template" - - "fmt" - "sigs.k8s.io/cluster-api/cloud/google/machinesetup" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -type metadataParams struct { - Token string - Cluster *clusterv1.Cluster - Machine *clusterv1.Machine - DockerImages []string - Project string - Metadata *machinesetup.Metadata - - // These fields are set when executing the template if they are necessary. - PodCIDR string - ServiceCIDR string - MasterEndpoint string -} - -func nodeMetadata(token string, cluster *clusterv1.Cluster, machine *clusterv1.Machine, project string, metadata *machinesetup.Metadata) (map[string]string, error) { - params := metadataParams{ - Token: token, - Cluster: cluster, - Machine: machine, - Project: project, - Metadata: metadata, - PodCIDR: getSubnet(cluster.Spec.ClusterNetwork.Pods), - ServiceCIDR: getSubnet(cluster.Spec.ClusterNetwork.Services), - MasterEndpoint: getEndpoint(cluster.Status.APIEndpoints[0]), - } - - nodeMetadata := map[string]string{} - var buf bytes.Buffer - if err := nodeEnvironmentVarsTemplate.Execute(&buf, params); err != nil { - return nil, err - } - buf.WriteString(params.Metadata.StartupScript) - nodeMetadata["startup-script"] = buf.String() - return nodeMetadata, nil -} - -func masterMetadata(cluster *clusterv1.Cluster, machine *clusterv1.Machine, project string, metadata *machinesetup.Metadata) (map[string]string, error) { - params := metadataParams{ - Cluster: cluster, - Machine: machine, - Project: project, - Metadata: metadata, - PodCIDR: getSubnet(cluster.Spec.ClusterNetwork.Pods), - ServiceCIDR: getSubnet(cluster.Spec.ClusterNetwork.Services), - } - - masterMetadata := map[string]string{} - var buf bytes.Buffer - if err := masterEnvironmentVarsTemplate.Execute(&buf, params); err != nil { - return nil, err - } - buf.WriteString(params.Metadata.StartupScript) - masterMetadata["startup-script"] = buf.String() - return masterMetadata, nil -} - -func getEndpoint(apiEndpoint clusterv1.APIEndpoint) string { - return fmt.Sprintf("%s:%d", apiEndpoint.Host, apiEndpoint.Port) -} - -var ( - masterEnvironmentVarsTemplate *template.Template - nodeEnvironmentVarsTemplate *template.Template -) - -func init() { - masterEnvironmentVarsTemplate = template.Must(template.New("masterEnvironmentVars").Parse(masterEnvironmentVars)) - nodeEnvironmentVarsTemplate = template.Must(template.New("nodeEnvironmentVars").Parse(nodeEnvironmentVars)) -} - -// TODO(kcoronado): replace with actual network and node tag args when they are added into provider config. -const masterEnvironmentVars = ` -#!/bin/bash -KUBELET_VERSION={{ .Machine.Spec.Versions.Kubelet }} -VERSION=v${KUBELET_VERSION} -PORT=443 -NAMESPACE={{ .Machine.ObjectMeta.Namespace }} -MACHINE=$NAMESPACE -MACHINE+="/" -MACHINE+={{ .Machine.ObjectMeta.Name }} -CONTROL_PLANE_VERSION={{ .Machine.Spec.Versions.ControlPlane }} -CLUSTER_DNS_DOMAIN={{ .Cluster.Spec.ClusterNetwork.ServiceDomain }} -POD_CIDR={{ .PodCIDR }} -SERVICE_CIDR={{ .ServiceCIDR }} -# Environment variables for GCE cloud config -PROJECT={{ .Project }} -NETWORK=default -SUBNETWORK=kubernetes -CLUSTER_NAME={{ .Cluster.Name }} -NODE_TAG="$CLUSTER_NAME-worker" -` - -const nodeEnvironmentVars = ` -#!/bin/bash -KUBELET_VERSION={{ .Machine.Spec.Versions.Kubelet }} -TOKEN={{ .Token }} -MASTER={{ .MasterEndpoint }} -NAMESPACE={{ .Machine.ObjectMeta.Namespace }} -MACHINE=$NAMESPACE -MACHINE+="/" -MACHINE+={{ .Machine.ObjectMeta.Name }} -CLUSTER_DNS_DOMAIN={{ .Cluster.Spec.ClusterNetwork.ServiceDomain }} -POD_CIDR={{ .PodCIDR }} -SERVICE_CIDR={{ .ServiceCIDR }} -# Environment variables for GCE cloud config -PROJECT={{ .Project }} -NETWORK=default -SUBNETWORK=kubernetes -CLUSTER_NAME={{ .Cluster.Name }} -NODE_TAG="$CLUSTER_NAME-worker" -` diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/pods.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/pods.go deleted file mode 100644 index d2dbed16826..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/pods.go +++ /dev/null @@ -1,232 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package google - -import ( - "bytes" - "encoding/base64" - "fmt" - "os" - "os/exec" - "text/template" - "time" - - "github.com/golang/glog" - corev1 "k8s.io/api/core/v1" - "k8s.io/client-go/util/cert" - "k8s.io/client-go/util/cert/triple" - "sigs.k8s.io/cluster-api/cloud/google/config" -) - -var apiServerImage = "gcr.io/k8s-cluster-api/cluster-apiserver:0.0.5" -var controllerManagerImage = "gcr.io/k8s-cluster-api/controller-manager:0.0.7" -var machineControllerImage = "gcr.io/k8s-cluster-api/gce-machine-controller:0.0.13" - -func init() { - if img, ok := os.LookupEnv("MACHINE_CONTROLLER_IMAGE"); ok { - machineControllerImage = img - } - - if img, ok := os.LookupEnv("CLUSTER_API_SERVER_IMAGE"); ok { - apiServerImage = img - } - - if img, ok := os.LookupEnv("CONTROLLER_MANAGER_IMAGE"); ok { - controllerManagerImage = img - } -} - -type caCertParams struct { - caBundle string - tlsCrt string - tlsKey string -} - -func getApiServerCerts() (*caCertParams, error) { - const name = "clusterapi" - const namespace = corev1.NamespaceDefault - - caKeyPair, err := triple.NewCA(fmt.Sprintf("%s-certificate-authority", name)) - if err != nil { - return nil, fmt.Errorf("failed to create root-ca: %v", err) - } - - apiServerKeyPair, err := triple.NewServerKeyPair( - caKeyPair, - fmt.Sprintf("%s.%s.svc", name, namespace), - name, - namespace, - "cluster.local", - []string{}, - []string{}) - if err != nil { - return nil, fmt.Errorf("failed to create apiserver key pair: %v", err) - } - - certParams := &caCertParams{ - caBundle: base64.StdEncoding.EncodeToString(cert.EncodeCertPEM(caKeyPair.Cert)), - tlsKey: base64.StdEncoding.EncodeToString(cert.EncodePrivateKeyPEM(apiServerKeyPair.Key)), - tlsCrt: base64.StdEncoding.EncodeToString(cert.EncodeCertPEM(apiServerKeyPair.Cert)), - } - - return certParams, nil -} - -func CreateApiServerAndController() error { - tmpl, err := template.New("config").Parse(config.ClusterAPIDeployConfigTemplate) - if err != nil { - return err - } - - certParms, err := getApiServerCerts() - if err != nil { - glog.Errorf("Error: %v", err) - return err - } - - type params struct { - APIServerImage string - ControllerManagerImage string - MachineControllerImage string - CABundle string - TLSCrt string - TLSKey string - } - - var tmplBuf bytes.Buffer - err = tmpl.Execute(&tmplBuf, params{ - APIServerImage: apiServerImage, - ControllerManagerImage: controllerManagerImage, - MachineControllerImage: machineControllerImage, - CABundle: certParms.caBundle, - TLSCrt: certParms.tlsCrt, - TLSKey: certParms.tlsKey, - }) - if err != nil { - return err - } - - maxTries := 5 - for tries := 0; tries < maxTries; tries++ { - err = deployConfig(tmplBuf.Bytes()) - if err == nil { - return nil - } else { - if tries < maxTries-1 { - glog.Infof("Retrying scheduling machine controller after encountering error: %v\n", err) - time.Sleep(3 * time.Second) - } - } - } - - if err != nil { - return fmt.Errorf("couldn't start machine controller: %v\n", err) - } else { - return nil - } -} - -func CreateIngressController(project string, clusterName string) error { - tmpl, err := template.New("config").Parse(config.IngressControllerConfigTemplate) - if err != nil { - return err - } - - type params struct { - Project string - NodeTag string - } - - var tmplBuf bytes.Buffer - err = tmpl.Execute(&tmplBuf, params{ - Project: project, - NodeTag: clusterName + "-worker", - }) - if err != nil { - return err - } - - maxTries := 5 - for tries := 0; tries < maxTries; tries++ { - err = deployConfig(tmplBuf.Bytes()) - if err == nil { - return nil - } else { - if tries < maxTries-1 { - glog.Infof("Error scheduling ingress controller. Will retry... %v\n", err) - time.Sleep(3 * time.Second) - } - } - } - - if err != nil { - return fmt.Errorf("couldn't start ingress controller: %v\n", err) - } else { - return nil - } -} - -func CreateDefaultStorageClass() error { - tmpl, err := template.New("config").Parse(config.StorageClassConfigTemplate) - if err != nil { - return err - } - var tmplBuf bytes.Buffer - err = tmpl.Execute(&tmplBuf, nil) - if err != nil { - return err - } - - maxTries := 5 - for tries := 0; tries < maxTries; tries++ { - err = deployConfig(tmplBuf.Bytes()) - if err == nil { - return nil - } else { - if tries < maxTries-1 { - glog.Info("Error creating default storage class. Will retry...\n") - time.Sleep(3 * time.Second) - } - } - } - - if err != nil { - return fmt.Errorf("couldn't create default storage class: %v\n", err) - } else { - return nil - } -} - -func deployConfig(manifest []byte) error { - cmd := exec.Command("kubectl", "create", "-f", "-") - stdin, err := cmd.StdinPipe() - if err != nil { - return err - } - - go func() { - defer stdin.Close() - stdin.Write(manifest) - }() - - out, err := cmd.CombinedOutput() - if err == nil { - return nil - } else { - return fmt.Errorf("couldn't create pod: %v, output: %s", err, string(out)) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/serviceaccount.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/serviceaccount.go deleted file mode 100644 index 057edaf808c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/serviceaccount.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package google - -import ( - "fmt" - "os/exec" - - "github.com/golang/glog" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" -) - -const ( - MasterNodeServiceAccountPrefix = "k8s-master" - WorkerNodeServiceAccountPrefix = "k8s-worker" - IngressControllerServiceAccountPrefix = "k8s-ingress-controller" - MachineControllerServiceAccountPrefix = "k8s-machine-controller" - - IngressControllerSecret = "glbc-gcp-key" - MachineControllerSecret = "machine-controller-credential" - - ClusterAnnotationPrefix = "gce.clusterapi.k8s.io/service-account-" -) - -var ( - MasterNodeRoles = []string{ - "compute.instanceAdmin", - "compute.networkAdmin", - "compute.securityAdmin", - "compute.viewer", - "iam.serviceAccountUser", - "storage.admin", - "storage.objectViewer", - } - WorkerNodeRoles = []string{} - IngressControllerRoles = []string{ - "compute.instanceAdmin.v1", - "compute.networkAdmin", - "compute.securityAdmin", - "iam.serviceAccountActor", - } - MachineControllerRoles = []string{ - "compute.instanceAdmin.v1", - "iam.serviceAccountActor", - } -) - -// Returns the email address of the service account that should be used -// as the default service account for this machine -func (gce *GCEClient) GetDefaultServiceAccountForMachine(cluster *clusterv1.Cluster, machine *clusterv1.Machine) string { - if util.IsMaster(machine) { - return cluster.ObjectMeta.Annotations[ClusterAnnotationPrefix+MasterNodeServiceAccountPrefix] - } else { - return cluster.ObjectMeta.Annotations[ClusterAnnotationPrefix+WorkerNodeServiceAccountPrefix] - } -} - -// Creates a GCP service account for the master node, granted permissions -// that allow the control plane to provision disks and networking resources -func (gce *GCEClient) CreateMasterNodeServiceAccount(cluster *clusterv1.Cluster, initialMachines []*clusterv1.Machine) error { - _, _, err := gce.createServiceAccount(MasterNodeServiceAccountPrefix, MasterNodeRoles, cluster, initialMachines) - - return err -} - -// Creates a GCP service account for the worker node -func (gce *GCEClient) CreateWorkerNodeServiceAccount(cluster *clusterv1.Cluster, initialMachines []*clusterv1.Machine) error { - _, _, err := gce.createServiceAccount(WorkerNodeServiceAccountPrefix, WorkerNodeRoles, cluster, initialMachines) - - return err -} - -// Creates a GCP service account for the ingress controller -func (gce *GCEClient) CreateIngressControllerServiceAccount(cluster *clusterv1.Cluster, initialMachines []*clusterv1.Machine) error { - accountId, project, err := gce.createServiceAccount(IngressControllerServiceAccountPrefix, IngressControllerRoles, cluster, initialMachines) - if err != nil { - return err - } - - return gce.createSecretForServiceAccountKey(accountId, project, IngressControllerSecret, "kube-system") -} - -// Creates a GCP service account for the machine controller, granted the -// permissions to manage compute instances, and stores its credentials as a -// Kubernetes secret. -func (gce *GCEClient) CreateMachineControllerServiceAccount(cluster *clusterv1.Cluster, initialMachines []*clusterv1.Machine) error { - accountId, project, err := gce.createServiceAccount(MachineControllerServiceAccountPrefix, MachineControllerRoles, cluster, initialMachines) - if err != nil { - return err - } - - return gce.createSecretForServiceAccountKey(accountId, project, MachineControllerSecret, "default") -} - -func (gce *GCEClient) createSecretForServiceAccountKey(accountId string, project string, secretName string, namespace string) error { - email := fmt.Sprintf("%s@%s.iam.gserviceaccount.com", accountId, project) - - localFile := accountId + "-key.json" - err := run("gcloud", "--project", project, "iam", "service-accounts", "keys", "create", localFile, "--iam-account", email) - if err != nil { - return fmt.Errorf("couldn't create service account key: %v", err) - } - - err = run("kubectl", "create", "secret", "generic", secretName, "--from-file=service-account.json="+localFile, "--namespace="+namespace) - if err != nil { - return fmt.Errorf("couldn't import service account key as credential: %v", err) - } - - if err := run("rm", localFile); err != nil { - glog.Error(err) - } - - return nil -} - -// creates a service account with the roles specifed. Returns the account id -// of the created account and the project it belongs to. -func (gce *GCEClient) createServiceAccount(serviceAccountPrefix string, roles []string, cluster *clusterv1.Cluster, initialMachines []*clusterv1.Machine) (string, string, error) { - if len(initialMachines) == 0 { - return "", "", fmt.Errorf("machine count is zero, cannot create service a/c") - } - - config, err := gce.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return "", "", err - } - - accountId := serviceAccountPrefix + "-" + util.RandomString(5) - - err = run("gcloud", "--project", config.Project, "iam", "service-accounts", "create", "--display-name="+serviceAccountPrefix+" service account", accountId) - if err != nil { - return "", "", fmt.Errorf("couldn't create service account: %v", err) - } - - email := fmt.Sprintf("%s@%s.iam.gserviceaccount.com", accountId, config.Project) - - for _, role := range roles { - err = run("gcloud", "projects", "add-iam-policy-binding", config.Project, "--member=serviceAccount:"+email, "--role=roles/"+role) - if err != nil { - return "", "", fmt.Errorf("couldn't grant permissions to service account: %v", err) - } - } - - if cluster.ObjectMeta.Annotations == nil { - cluster.ObjectMeta.Annotations = make(map[string]string) - } - cluster.ObjectMeta.Annotations[ClusterAnnotationPrefix+serviceAccountPrefix] = email - - return accountId, config.Project, nil -} - -func (gce *GCEClient) DeleteMasterNodeServiceAccount(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error { - return gce.deleteServiceAccount(MasterNodeServiceAccountPrefix, MasterNodeRoles, cluster, machines) -} - -func (gce *GCEClient) DeleteWorkerNodeServiceAccount(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error { - return gce.deleteServiceAccount(WorkerNodeServiceAccountPrefix, WorkerNodeRoles, cluster, machines) -} - -func (gce *GCEClient) DeleteIngressControllerServiceAccount(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error { - return gce.deleteServiceAccount(IngressControllerServiceAccountPrefix, IngressControllerRoles, cluster, machines) -} - -func (gce *GCEClient) DeleteMachineControllerServiceAccount(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error { - return gce.deleteServiceAccount(MachineControllerServiceAccountPrefix, MachineControllerRoles, cluster, machines) -} - -func (gce *GCEClient) deleteServiceAccount(serviceAccountPrefix string, roles []string, cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error { - if len(machines) == 0 { - glog.Info("machine count is zero, cannot determine project for service a/c deletion") - return nil - } - - config, err := gce.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - glog.Info("cannot parse cluster providerConfig field") - return nil - } - - var email string - if cluster.ObjectMeta.Annotations != nil { - email = cluster.ObjectMeta.Annotations[ClusterAnnotationPrefix+serviceAccountPrefix] - } - - if email == "" { - glog.Info("No service a/c found in cluster.") - return nil - } - - for _, role := range roles { - err = run("gcloud", "projects", "remove-iam-policy-binding", config.Project, "--member=serviceAccount:"+email, "--role=roles/"+role) - } - - if err != nil { - return fmt.Errorf("couldn't remove permissions to service account: %v", err) - } - - err = run("gcloud", "--project", config.Project, "iam", "service-accounts", "delete", email) - if err != nil { - return fmt.Errorf("couldn't delete service account: %v", err) - } - return nil -} - -func run(cmd string, args ...string) error { - c := exec.Command(cmd, args...) - if out, err := c.CombinedOutput(); err != nil { - return fmt.Errorf("error: %v, output: %s", err, string(out)) - } - return nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/ssh.go b/vendor/sigs.k8s.io/cluster-api/cloud/google/ssh.go deleted file mode 100644 index ceb4a555df7..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/ssh.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package google - -import ( - "fmt" - "io/ioutil" - "os" - "os/exec" - "strings" - - "github.com/golang/glog" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -const ( - MachineControllerSshKeySecret = "machine-controller-sshkeys" - // Arbitrary name used for SSH. - SshUser = "clusterapi" - SshKeyFile = "clusterapi-key" - SshKeyFilePublic = SshKeyFile + ".pub" - SshKeyFilePublicGcloud = SshKeyFilePublic + ".gcloud" -) - -func createSshKeyPairs() error { - err := run("ssh-keygen", "-t", "rsa", "-f", SshKeyFile, "-C", SshUser, "-N", "") - if err != nil { - return fmt.Errorf("couldn't generate RSA keys: %v", err) - } - - // Prepare a gce format public key file - outfile, err := os.Create(SshKeyFilePublicGcloud) - if err != nil { - return err - } - defer outfile.Close() - - b, err := ioutil.ReadFile(SshKeyFilePublic) - if err == nil { - outfile.WriteString(SshUser + ":" + string(b)) - } - - return err -} - -func cleanupSshKeyPairs() { - os.Remove(SshKeyFile) - os.Remove(SshKeyFilePublic) - os.Remove(SshKeyFilePublicGcloud) -} - -// It creates secret to store private key. -func (gce *GCEClient) setupSSHAccess(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { - // Create public/private key pairs - err := createSshKeyPairs() - if err != nil { - return err - } - - machineConfig, err := gce.machineproviderconfig(machine.Spec.ProviderConfig) - if err != nil { - return err - } - - clusterConfig, err := gce.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return err - } - - err = run("gcloud", "compute", "instances", "add-metadata", machine.Name, - "--metadata-from-file", "ssh-keys="+SshKeyFile+".pub.gcloud", - "--project", clusterConfig.Project, "--zone", machineConfig.Zone) - if err != nil { - return err - } - - // Create secrets so that machine controller container can load them. - err = run("kubectl", "create", "secret", "generic", MachineControllerSshKeySecret, "--from-file=private="+SshKeyFile, "--from-literal=user="+SshUser) - if err != nil { - return fmt.Errorf("couldn't create service account key as credential: %v", err) - } - - cleanupSshKeyPairs() - - return err -} - -func (gce *GCEClient) remoteSshCommand(cluster *clusterv1.Cluster, machine *clusterv1.Machine, cmd string) (string, error) { - glog.Infof("Remote SSH execution '%s' on %s", cmd, machine.ObjectMeta.Name) - - publicIP, err := gce.GetIP(cluster, machine) - if err != nil { - return "", err - } - - command := fmt.Sprintf("%s", cmd) - c := exec.Command("ssh", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-i", gce.sshCreds.privateKeyPath, "-q", gce.sshCreds.user+"@"+publicIP, command) - out, err := c.CombinedOutput() - if err != nil { - return "", fmt.Errorf("error: %v, output: %s", err, string(out)) - } - result := strings.TrimSpace(string(out)) - return result, nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/testdata/ca/ca.crt b/vendor/sigs.k8s.io/cluster-api/cloud/google/testdata/ca/ca.crt deleted file mode 100644 index b0b173a693f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/testdata/ca/ca.crt +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICyDCCAbCgAwIBAgIBADANBgkqhkiG9w0BAQsFADAVMRMwEQYDVQQDEwprdWJl -cm5ldGVzMB4XDTE4MDUwMzE3MTk0OVoXDTI4MDQzMDE3MTk0OVowFTETMBEGA1UE -AxMKa3ViZXJuZXRlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALkG -6Aygr2E/6zY9RlLB8gzu2vH0uL10bPi15Mu0p0Xu1caR7+iy9d16oHZvHAUB8pDm -o2cjA8QKpqbT2ffTQs1Khd+NVI0+Lm2qTQHSY60dnnc7KqX08pTFzIzz6UNxID0H -0Tw0e8nz1SSRmzmsnAOb6ib2qruamJgojBdzpDSguaM5b0Mj/uit5G5iMtM/YhLv -n+0T/011ep9S661P86BeTRQct0XuTq+nDuEgAdH1c9KcIQJfzTnvGjOZxVtGdnla -Qi3lDwIGd69k1rYXyVtiyPjmG3rDUJwLdBFCVEOiKfZO4QTFMIyKSgBv6bMS5QKv -6VY/btqNx5MjjDL+46sCAwEAAaMjMCEwDgYDVR0PAQH/BAQDAgKkMA8GA1UdEwEB -/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAJCaNTZCYnuIZ0yRBSsC3n9+q6+N -s9oXi3ogS74aBh++cKIWDbM1u6teNMgldyOdgZJ5IxZjgE/Fp6ZtYtFyAB30NlzE -Mx7gP84EnRgki0N11PpCZ32+Yl0p/R6rzx64HNrf+TQISkXJ2DRrC+P3Ft8oyNrh -r6/+jxds1TLEmmsjQs6JLqlqsuYD6O30Rl72tvTT4yOjpvkkk3xRFmjjAUg59M0P -ZpGn+Gn550KvgSyMriRrepwNOKF1u/EIQDQ45m8x4w6b9uLDl2wsuEMeddRD5dNs -I3uChxe0PmkUXISTBdCBFwoqV5ADbLEZkJceN2qvQX+IKELDE7hGrupN1Ec= ------END CERTIFICATE----- diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/google/testdata/ca/ca.key b/vendor/sigs.k8s.io/cluster-api/cloud/google/testdata/ca/ca.key deleted file mode 100644 index bd184e8194f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/google/testdata/ca/ca.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAuQboDKCvYT/rNj1GUsHyDO7a8fS4vXRs+LXky7SnRe7VxpHv -6LL13Xqgdm8cBQHykOajZyMDxAqmptPZ99NCzUqF341UjT4ubapNAdJjrR2edzsq -pfTylMXMjPPpQ3EgPQfRPDR7yfPVJJGbOaycA5vqJvaqu5qYmCiMF3OkNKC5ozlv -QyP+6K3kbmIy0z9iEu+f7RP/TXV6n1LrrU/zoF5NFBy3Re5Or6cO4SAB0fVz0pwh -Al/NOe8aM5nFW0Z2eVpCLeUPAgZ3r2TWthfJW2LI+OYbesNQnAt0EUJUQ6Ip9k7h -BMUwjIpKAG/psxLlAq/pVj9u2o3HkyOMMv7jqwIDAQABAoIBAHqyBMES8RnZLB3M -pkyMxfkjj1bxhGxFv1lyLSWUR3RNe79w2RmDSx0yiyPebEM51mOWPfdPtdiTg42P -YLRBiMPfzkS/ULlU6a7ZRrWVkXmj8Yh5WL+yXgaf4BP8TsvlQY6XF34IA6qZIddd -IwUs3ExcYPqzieZcDyKfiL6oddRbO7NMOAWvBNRhPtQIjYZEi9EMhHE0te7rXF1L -7a1eBUeUx9HqahtXr8K11YBGlMKU0hpDI0GygfXALSj0X0Fjfapdz7CKynkutWwf -jV3C3QzyXKBDGm5gh58dxb9Ty7QJlanREhuge/PtqZHTcJyPxR4beSJ0RkEJ3t3v -EbjBR6kCgYEA0F+QaEYQBACS3ol7zk7d5nxTzj/uxY887tI0ucBOaQp119+3KecQ -jFd9CWR6+0BSBgBBVbctcHO872a8l5yHRuczq2LI5Xw4jmU8oYd65bmhVNASdntt -Votu9YR9WOJPgYB8pei1g9gCVS+hnzb9yV95TjodO5tX5K+MuoLOlK8CgYEA41FK -pubLK00zI1DrcwtenREpLFEZDIFegOZVfAQiY7Q6BdIoWUH938iHqEXzKJMN+u5G -VT2yZBO4soxvbHI3rw5qjfeZVOg8QCjUASYC3lfch423gEE9ftXeKeU1Ny7AE/Ac -oTac0/CrqwtvXHf9+7qVcXs8LfMM0Uh73yAxV8UCgYEAuqKd6Ye3mJ4a7pAeAC/L -uUHqnnXNG86sOQy2hRmmIZdo7a5HlJSN0eYa7Gq/bIOz9AQOgQPNA0fnFlbi3Lkq -wWsccInOfx3AWmp64ANFJLYbtqeXod/zkuzYubetvgsWQ1weSUwiKLE1ha9gCAdt -UQzezh5nSJhfJUnHttaqyakCgYA3A7SSgibHmw52TJ4/IJBMaRvS2um6ChFKFvS3 -Z/S+tp6YTA1x1LPRliGmyw8XUce/ZC1nceAbsl4v8CcDUv1BA7csFrFoSDBUwszU -XlOxZgg8UkMH6kIs0SvMbemcKldYO/Nh3OrFrGiPo9vWwD+azcRfS5j78ee3Otin -3o2ylQKBgQDFr6TLYNd5ygOQQs2TAB2SDUywz5bl1uHqyBv5+2xgOlaCthg4GQUb -EcvN7sqq0Re2o2lbPbpwLZPrxSf306rqSoHbxjIaZUZjf/lWs6TtZdWx020ZuImv -vWi9YCVEAL08emdMrMgAM3KJIVUujmzHWkkgH2iYAK9NLjqiDOtKoA== ------END RSA PRIVATE KEY----- diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/BUILD.bazel deleted file mode 100644 index 0c9cd709fa6..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/BUILD.bazel +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "deployer.go", - "instancestatus.go", - "machineactuator.go", - "pods.go", - "templates.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/vsphere", - importpath = "sigs.k8s.io/cluster-api/cloud/vsphere", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/vsphere/config:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/errors:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/README.md b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/README.md deleted file mode 100644 index db590383aca..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Cluster API vSphere Provider - -## Delete Cluster - -This guide explains how to delete all resources that were created as part of -your Cluster API Kubernetes cluster. - -The provider currently only creates resources specified in the named machine -config map. The default examples only provision VMs. If your custom HCL config -configures load balancers, or provisions other resources, amend this guide as -necessary. - -1. Delete all of the node `Machine`s in the cluster. Make sure to wait for the corresponding Nodes to be deleted before moving onto the next step. After this step, the master node will be the only remaining node. - -```bash -kubectl get nodes - -# For each non-master node (See the "ROLES" column) -kubectl delete machines $MACHINE-NAME -``` - -2. Delete the VM that is running your cluster's control plane. You can either do this from the vCenter UI or using govc. - -```bash -govc vm.destroy $MACHINE-NAME -``` diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/.gitignore b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/.gitignore deleted file mode 100644 index bd62db75d2b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vsphere-machine-controller \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/BUILD.bazel deleted file mode 100644 index 37d7707cdb9..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/BUILD.bazel +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller", - importpath = "sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller", - visibility = ["//visibility:private"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/vsphere:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/config:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/machine:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - ], -) - -go_binary( - name = "vsphere-machine-controller", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/Dockerfile b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/Dockerfile deleted file mode 100644 index 8ffad43135c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Reproducible builder image -FROM golang:1.10.0 as builder -WORKDIR /go/src/sigs.k8s.io/cluster-api -# This expects that the context passed to the docker build command is -# the cluster-api directory. -# e.g. docker build -t -f -COPY . . - -RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller - -# Final container -FROM debian:stretch-slim - -ENV TERRAFORM_VERSION=0.11.7 -ENV TERRAFORM_ZIP=terraform_${TERRAFORM_VERSION}_linux_amd64.zip -ENV TERRAFORM_SHA256SUM=6b8ce67647a59b2a3f70199c304abca0ddec0e49fd060944c26f666298e23418 -ENV TERRAFORM_SHAFILE=terraform_${TERRAFORM_VERSION}_SHA256SUMS - -RUN apt-get update && apt-get install -y ca-certificates curl openssh-server unzip && \ - curl https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/${TERRAFORM_ZIP} > ${TERRAFORM_ZIP} && \ - echo "${TERRAFORM_SHA256SUM} ${TERRAFORM_ZIP}" > ${TERRAFORM_SHAFILE} && \ - sha256sum --quiet -c ${TERRAFORM_SHAFILE} && \ - unzip ${TERRAFORM_ZIP} -d /bin && \ - rm -f ${TERRAFORM_ZIP} ${TERRAFORM_SHAFILE} && \ - rm -rf /var/lib/apt/lists/* - -# Setup template provider -ENV TEMPLATE_PROVIDER_VERSION=1.0.0 -ENV TEMPLATE_PROVIDER_ZIP=terraform-provider-template_${TEMPLATE_PROVIDER_VERSION}_linux_amd64.zip -ENV TEMPLATE_PROVIDER_SHA256SUM=f54c2764bd4d4c62c1c769681206dde7aa94b64b814a43cb05680f1ec8911977 -ENV TEMPLATE_PROVIDER_SHAFILE=terraform-provider-template_${TEMPLATE_PROVIDER_VERSION}_SHA256SUMS - -RUN curl https://releases.hashicorp.com/terraform-provider-template/${TEMPLATE_PROVIDER_VERSION}/${TEMPLATE_PROVIDER_ZIP} > ${TEMPLATE_PROVIDER_ZIP} && \ - echo "${TEMPLATE_PROVIDER_SHA256SUM} ${TEMPLATE_PROVIDER_ZIP}" > ${TEMPLATE_PROVIDER_SHAFILE} && \ - sha256sum --quiet -c ${TEMPLATE_PROVIDER_SHAFILE} && \ - mkdir -p ~/.terraform.d/plugins/linux_amd64/ && \ - unzip ${TEMPLATE_PROVIDER_ZIP} -d ~/.terraform.d/plugins/linux_amd64/ && \ - rm -f ${TEMPLATE_PROVIDER_ZIP} ${TEMPLATE_PROVIDER_SHAFILE} - -# Setup vsphere provider -ENV VSPHERE_PROVIDER_VERSION=1.5.0 -ENV VSPHERE_PROVIDER_ZIP=terraform-provider-vsphere_${VSPHERE_PROVIDER_VERSION}_linux_amd64.zip -ENV VSPHERE_PROVIDER_SHA256SUM=6dd495feeb83aa8b098d4e9b0224b9e18b758153504449ff4ac2c6510ed4bb52 -ENV VSPHERE_PROVIDER_SHAFILE=terraform-provider-vsphere_${VSPHERE_PROVIDER_VERSION}_SHA256SUMS - -RUN curl https://releases.hashicorp.com/terraform-provider-vsphere/${VSPHERE_PROVIDER_VERSION}/${VSPHERE_PROVIDER_ZIP} > ${VSPHERE_PROVIDER_ZIP} && \ - echo "${VSPHERE_PROVIDER_SHA256SUM} ${VSPHERE_PROVIDER_ZIP}" > ${VSPHERE_PROVIDER_SHAFILE} && \ - sha256sum --quiet -c ${VSPHERE_PROVIDER_SHAFILE} && \ - mkdir -p ~/.terraform.d/plugins/linux_amd64/ && \ - unzip ${VSPHERE_PROVIDER_ZIP} -d ~/.terraform.d/plugins/linux_amd64/ && \ - rm -f ${VSPHERE_PROVIDER_ZIP} ${VSPHERE_PROVIDER_SHAFILE} - -COPY --from=builder /go/bin/vsphere-machine-controller . diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/Makefile b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/Makefile deleted file mode 100644 index b790e6ce3ff..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -.PHONY: image push dev_image dev_push - -GCR_BUCKET = k8s-cluster-api -PREFIX = gcr.io/$(GCR_BUCKET) -DEV_PREFIX ?= gcr.io/$(shell gcloud config get-value project) -NAME = vsphere-machine-controller -TAG = 0.0.9 - -image: - docker build -t "$(PREFIX)/$(NAME):$(TAG)" -f ./Dockerfile ../../../.. - -push: image - docker push "$(PREFIX)/$(NAME):$(TAG)" - $(MAKE) fix_gcs_permissions - -fix_gcs_permissions: - gsutil acl ch -u AllUsers:READ gs://artifacts.$(GCR_BUCKET).appspot.com - gsutil -m acl ch -r -u AllUsers:READ gs://artifacts.$(GCR_BUCKET).appspot.com - -dev_image: - docker build -t "$(DEV_PREFIX)/$(NAME):$(TAG)-dev" -f ./Dockerfile ../../../.. - -dev_push: dev_image - docker push "$(DEV_PREFIX)/$(NAME):$(TAG)-dev" diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/main.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/main.go deleted file mode 100644 index 9bf4286a9f5..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/cmd/vsphere-machine-controller/main.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "github.com/golang/glog" - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - "github.com/spf13/pflag" - corev1 "k8s.io/api/core/v1" - "k8s.io/apiserver/pkg/util/logs" - - "sigs.k8s.io/cluster-api/cloud/vsphere" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/pkg/controller/config" - "sigs.k8s.io/cluster-api/pkg/controller/machine" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" -) - -var ( - kubeadmToken = pflag.String("token", "", "Kubeadm token to use to join new machines") - namedMachinesPath = pflag.String("namedmachines", "", "path to named machines yaml file") -) - -func init() { - config.ControllerConfig.AddFlags(pflag.CommandLine) -} - -func main() { - pflag.Parse() - - logs.InitLogs() - defer logs.FlushLogs() - - config, err := controller.GetConfig(config.ControllerConfig.Kubeconfig) - if err != nil { - glog.Fatalf("Could not create Config for talking to the apiserver: %v", err) - } - - client, err := clientset.NewForConfig(config) - if err != nil { - glog.Fatalf("Could not create client for talking to the apiserver: %v", err) - } - - actuator, err := vsphere.NewMachineActuator(*kubeadmToken, client.ClusterV1alpha1().Machines(corev1.NamespaceDefault), *namedMachinesPath) - if err != nil { - glog.Fatalf("Could not create vSphere machine actuator: %v", err) - } - - shutdown := make(chan struct{}) - si := sharedinformers.NewSharedInformers(config, shutdown) - // If this doesn't compile, the code generator probably - // overwrote the customized NewMachineController function. - c := machine.NewMachineController(config, si, actuator) - c.RunAsync(shutdown) - select {} -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/config/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/config/BUILD.bazel deleted file mode 100644 index 089dfa4c0cc..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/config/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["configtemplate.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/config", - importpath = "sigs.k8s.io/cluster-api/cloud/vsphere/config", - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/config/configtemplate.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/config/configtemplate.go deleted file mode 100644 index 930dd6d463f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/config/configtemplate.go +++ /dev/null @@ -1,280 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package config - -const ClusterAPIDeployConfigTemplate = ` -apiVersion: apiregistration.k8s.io/v1beta1 -kind: APIService -metadata: - name: v1alpha1.cluster.k8s.io - labels: - api: clusterapi - apiserver: "true" -spec: - version: v1alpha1 - group: cluster.k8s.io - groupPriorityMinimum: 2000 - priority: 200 - service: - name: clusterapi - namespace: default - versionPriority: 10 - caBundle: {{ .CABundle }} ---- -apiVersion: v1 -kind: Service -metadata: - name: clusterapi - namespace: default - labels: - api: clusterapi - apiserver: "true" -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 443 - selector: - api: clusterapi - apiserver: "true" ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: clusterapi - namespace: default - labels: - api: clusterapi - apiserver: "true" -spec: - replicas: 1 - template: - metadata: - labels: - api: clusterapi - apiserver: "true" - spec: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - key: CriticalAddonsOnly - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/notReady - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/unreachable - operator: Exists - containers: - - name: apiserver - image: {{ .APIServerImage }} - volumeMounts: - - name: cluster-apiserver-certs - mountPath: /apiserver.local.config/certificates - readOnly: true - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - command: - - "./apiserver" - args: - - "--etcd-servers=http://etcd-clusterapi-svc:2379" - - "--tls-cert-file=/apiserver.local.config/certificates/tls.crt" - - "--tls-private-key-file=/apiserver.local.config/certificates/tls.key" - - "--audit-log-path=-" - - "--audit-log-maxage=0" - - "--audit-log-maxbackup=0" - - "--authorization-kubeconfig=/etc/kubernetes/admin.conf" - - "--kubeconfig=/etc/kubernetes/admin.conf" - resources: - requests: - cpu: 100m - memory: 20Mi - limits: - cpu: 100m - memory: 30Mi - - name: controller-manager - image: {{ .ControllerManagerImage }} - volumeMounts: - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - command: - - "./controller-manager" - args: - - --kubeconfig=/etc/kubernetes/admin.conf - resources: - requests: - cpu: 100m - memory: 20Mi - limits: - cpu: 100m - memory: 30Mi - - name: vsphere-machine-controller - image: {{ .MachineControllerImage }} - volumeMounts: - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - - name: machines-stage - mountPath: /tmp/cluster-api/machines/ - - name: sshkeys - mountPath: /root/.ssh - - name: named-machines - mountPath: /etc/named-machines - command: - - "./vsphere-machine-controller" - args: - - --kubeconfig=/etc/kubernetes/admin.conf - - --token={{ .Token }} - - --namedmachines=/etc/named-machines/vsphere_named_machines.yaml - resources: - requests: - cpu: 200m - memory: 200Mi - limits: - cpu: 400m - memory: 500Mi - volumes: - - name: cluster-apiserver-certs - secret: - secretName: cluster-apiserver-certs - - name: config - hostPath: - path: /etc/kubernetes - - name: certs - hostPath: - path: /etc/ssl/certs - - name: machines-stage - hostPath: - path: /tmp/cluster-api/machines/ - - name: sshkeys - hostPath: - path: /home/ubuntu/.ssh - - name: named-machines - configMap: - name: named-machines ---- -apiVersion: apps/v1beta1 -kind: StatefulSet -metadata: - name: etcd-clusterapi - namespace: default -spec: - serviceName: "etcd" - replicas: 1 - template: - metadata: - labels: - app: etcd - spec: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - key: CriticalAddonsOnly - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/notReady - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/unreachable - operator: Exists - volumes: - - hostPath: - path: /var/lib/etcd2 - type: DirectoryOrCreate - name: etcd-data-dir - terminationGracePeriodSeconds: 10 - containers: - - name: etcd - image: quay.io/coreos/etcd:latest - imagePullPolicy: Always - resources: - requests: - cpu: 100m - memory: 20Mi - limits: - cpu: 100m - memory: 30Mi - env: - - name: ETCD_DATA_DIR - value: /etcd-data-dir - command: - - /usr/local/bin/etcd - - --listen-client-urls - - http://0.0.0.0:2379 - - --advertise-client-urls - - http://localhost:2379 - ports: - - containerPort: 2379 - volumeMounts: - - name: etcd-data-dir - mountPath: /etcd-data-dir - readinessProbe: - httpGet: - port: 2379 - path: /health - failureThreshold: 1 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 - livenessProbe: - httpGet: - port: 2379 - path: /health - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 ---- -apiVersion: v1 -kind: Service -metadata: - name: etcd-clusterapi-svc - namespace: default - labels: - app: etcd -spec: - ports: - - port: 2379 - name: etcd - targetPort: 2379 - selector: - app: etcd ---- -apiVersion: v1 -kind: Secret -type: kubernetes.io/tls -metadata: - name: cluster-apiserver-certs - namespace: default - labels: - api: clusterapi - apiserver: "true" -data: - tls.crt: {{ .TLSCrt }} - tls.key: {{ .TLSKey }} -` diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/deployer.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/deployer.go deleted file mode 100644 index 964f8fb0a6c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/deployer.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package vsphere - -import ( - "bytes" - "errors" - "fmt" - "os" - "os/exec" - "strings" - - "github.com/golang/glog" - - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// Contains vsphere-specific deployment logic -// intended to eventually implement ProviderDeployer interface at -// sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterdeployer.go -// Currently implements a subset of the machineDeployer interface at -// sigs.k8s.io/cluster-api/vsphere-deployer/deploy/machinedeployer.go -// till vsphere-deployer gets deleted -type DeploymentClient struct{} - -func NewDeploymentClient() *DeploymentClient { - return &DeploymentClient{} -} - -func (*DeploymentClient) GetIP(machine *clusterv1.Machine) (string, error) { - if machine.ObjectMeta.Annotations != nil { - if ip, ok := machine.ObjectMeta.Annotations[VmIpAnnotationKey]; ok { - glog.Infof("Returning IP from machine annotation %s", ip) - return ip, nil - } - } - - return "", errors.New("could not get IP") -} - -func (d *DeploymentClient) GetKubeConfig(master *clusterv1.Machine) (string, error) { - ip, err := d.GetIP(master) - if err != nil { - return "", err - } - - var out bytes.Buffer - cmd := exec.Command( - "ssh", "-i", "~/.ssh/vsphere_tmp", - "-q", - "-o", "StrictHostKeyChecking no", - "-o", "UserKnownHostsFile /dev/null", - fmt.Sprintf("ubuntu@%s", ip), - "sudo cat /etc/kubernetes/admin.conf") - cmd.Stdout = &out - cmd.Stderr = os.Stderr - cmd.Run() - result := strings.TrimSpace(out.String()) - return result, nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/instancestatus.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/instancestatus.go deleted file mode 100644 index c0568052f21..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/instancestatus.go +++ /dev/null @@ -1,98 +0,0 @@ -package vsphere - -import ( - "bytes" - "fmt" - "k8s.io/apimachinery/pkg/runtime/serializer/json" - - "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" -) - -// Long term, we should retrieve the current status by asking k8s, gce etc. for all the needed info. -// For now, it is stored in the matching CRD under an annotation. This is similar to -// the spec and status concept where the machine CRD is the instance spec and the annotation is the instance status. - -const InstanceStatusAnnotationKey = "instance-status" - -type instanceStatus *clusterv1.Machine - -// Get the status of the instance identified by the given machine -func (vc *VsphereClient) instanceStatus(machine *clusterv1.Machine) (instanceStatus, error) { - currentMachine, err := util.GetMachineIfExists(vc.machineClient, machine.ObjectMeta.Name) - if err != nil { - return nil, err - } - - if currentMachine == nil { - // The current status no longer exists because the matching CRD has been deleted (or does not exist yet ie. bootstrapping) - return nil, nil - } - return vc.machineInstanceStatus(currentMachine) -} - -// Sets the status of the instance identified by the given machine to the given machine -func (vc *VsphereClient) updateInstanceStatus(machine *clusterv1.Machine) error { - status := instanceStatus(machine) - currentMachine, err := util.GetMachineIfExists(vc.machineClient, machine.ObjectMeta.Name) - if err != nil { - return err - } - - if currentMachine == nil { - // The current status no longer exists because the matching CRD has been deleted. - return fmt.Errorf("Machine has already been deleted. Cannot update current instance status for machine %v", machine.ObjectMeta.Name) - } - - m, err := vc.setMachineInstanceStatus(currentMachine, status) - if err != nil { - return err - } - - _, err = vc.machineClient.Update(m) - return err -} - -// Gets the state of the instance stored on the given machine CRD -func (vc *VsphereClient) machineInstanceStatus(machine *clusterv1.Machine) (instanceStatus, error) { - if machine.ObjectMeta.Annotations == nil { - // No state - return nil, nil - } - - a := machine.ObjectMeta.Annotations[InstanceStatusAnnotationKey] - if a == "" { - // No state - return nil, nil - } - - serializer := json.NewSerializer(json.DefaultMetaFactory, vc.scheme, vc.scheme, false) - var status clusterv1.Machine - _, _, err := serializer.Decode([]byte(a), &schema.GroupVersionKind{Group: "", Version: "cluster.k8s.io/v1alpha1", Kind: "Machine"}, &status) - if err != nil { - return nil, fmt.Errorf("decoding failure: %v", err) - } - - return instanceStatus(&status), nil -} - -// Applies the state of an instance onto a given machine CRD -func (vc *VsphereClient) setMachineInstanceStatus(machine *clusterv1.Machine, status instanceStatus) (*clusterv1.Machine, error) { - // Avoid status within status within status ... - status.ObjectMeta.Annotations[InstanceStatusAnnotationKey] = "" - - serializer := json.NewSerializer(json.DefaultMetaFactory, vc.scheme, vc.scheme, false) - b := []byte{} - buff := bytes.NewBuffer(b) - err := serializer.Encode((*clusterv1.Machine)(status), buff) - if err != nil { - return nil, fmt.Errorf("encoding failure: %v", err) - } - - if machine.ObjectMeta.Annotations == nil { - machine.ObjectMeta.Annotations = make(map[string]string) - } - machine.ObjectMeta.Annotations[InstanceStatusAnnotationKey] = buff.String() - return machine, nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/machineactuator.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/machineactuator.go deleted file mode 100644 index 3468d9f9226..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/machineactuator.go +++ /dev/null @@ -1,763 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package vsphere - -import ( - "bytes" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "os/exec" - "path" - "regexp" - "strings" - - "github.com/golang/glog" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - - "encoding/base64" - "sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines" - vsphereconfig "sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig" - vsphereconfigv1 "sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1" - apierrors "sigs.k8s.io/cluster-api/errors" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - client "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" -) - -const ( - VmIpAnnotationKey = "vm-ip-address" - ControlPlaneVersionAnnotationKey = "control-plane-version" - KubeletVersionAnnotationKey = "kubelet-version" - - // Filename in which named machines are saved using a ConfigMap (in master). - NamedMachinesFilename = "vsphere_named_machines.yaml" - - // The contents of the tfstate file for a machine. - StatusMachineTerraformState = "tf-state" -) - -const ( - StageDir = "/tmp/cluster-api/machines" - MachinePathStageFormat = "/tmp/cluster-api/machines/%s/" - TfConfigFilename = "terraform.tf" - TfVarsFilename = "variables.tfvars" - TfStateFilename = "terraform.tfstate" -) - -type VsphereClient struct { - scheme *runtime.Scheme - codecFactory *serializer.CodecFactory - kubeadmToken string - machineClient client.MachineInterface - namedMachineWatch *namedmachines.ConfigWatch - // Once the vsphere-deployer is deleted, both DeploymentClient and VsphereClient can depend on - // something that implements GetIP instead of the VsphereClient depending on DeploymentClient. - *DeploymentClient -} - -func NewMachineActuator(kubeadmToken string, machineClient client.MachineInterface, namedMachinePath string) (*VsphereClient, error) { - scheme, codecFactory, err := vsphereconfigv1.NewSchemeAndCodecs() - if err != nil { - return nil, err - } - - // DEPRECATED: Remove when vsphere-deployer is deleted. - var nmWatch *namedmachines.ConfigWatch - nmWatch, err = namedmachines.NewConfigWatch(namedMachinePath) - if err != nil { - glog.Errorf("error creating named machine config watch: %+v", err) - } - return &VsphereClient{ - scheme: scheme, - codecFactory: codecFactory, - kubeadmToken: kubeadmToken, - machineClient: machineClient, - namedMachineWatch: nmWatch, - DeploymentClient: NewDeploymentClient(), - }, nil -} - -func saveFile(contents, path string, perm os.FileMode) error { - return ioutil.WriteFile(path, []byte(contents), perm) -} - -// Stage the machine for running terraform. -// Return: machine's staging dir path, error -func (vc *VsphereClient) prepareStageMachineDir(machine *clusterv1.Machine) (string, error) { - err := vc.cleanUpStagingDir(machine) - if err != nil { - return "", err - } - - machineName := machine.ObjectMeta.Name - config, err := vc.machineproviderconfig(machine.Spec.ProviderConfig) - if err != nil { - return "", vc.handleMachineError(machine, apierrors.InvalidMachineConfiguration( - "Cannot unmarshal providerConfig field: %v", err)) - } - - machinePath := fmt.Sprintf(MachinePathStageFormat, machineName) - if _, err := os.Stat(machinePath); os.IsNotExist(err) { - os.MkdirAll(machinePath, 0755) - } - - // Save the config file and variables file to the machinePath - tfConfigPath := path.Join(machinePath, TfConfigFilename) - tfVarsPath := path.Join(machinePath, TfVarsFilename) - - namedMachines, err := vc.namedMachineWatch.NamedMachines() - if err != nil { - return "", err - } - matchedMachine, err := namedMachines.MatchMachine(config.VsphereMachine) - if err != nil { - return "", err - } - if err := saveFile(matchedMachine.MachineHcl, tfConfigPath, 0644); err != nil { - return "", err - } - - var tfVarsContents []string - for key, value := range config.MachineVariables { - tfVarsContents = append(tfVarsContents, fmt.Sprintf("%s=\"%s\"", key, value)) - } - if err := saveFile(strings.Join(tfVarsContents, "\n"), tfVarsPath, 0644); err != nil { - return "", err - } - - // Save the tfstate file (if not bootstrapping). - _, err = vc.stageTfState(machine) - if err != nil { - return "", err - } - - return machinePath, nil -} - -// Returns the path to the tfstate file staged from the tf state in annotations. -func (vc *VsphereClient) stageTfState(machine *clusterv1.Machine) (string, error) { - machinePath := fmt.Sprintf(MachinePathStageFormat, machine.ObjectMeta.Name) - tfStateFilePath := path.Join(machinePath, TfStateFilename) - - if _, err := os.Stat(machinePath); os.IsNotExist(err) { - os.MkdirAll(machinePath, 0755) - } - - // Attempt to stage the file from annotations. - glog.Infof("Attempting to stage tf state for machine %s", machine.ObjectMeta.Name) - if machine.ObjectMeta.Annotations == nil { - glog.Infof("machine does not have annotations, state does not exist") - return "", nil - } - - if _, ok := machine.ObjectMeta.Annotations[StatusMachineTerraformState]; !ok { - glog.Info("machine does not have annotation for tf state.") - return "", nil - } - - tfStateB64, _ := machine.ObjectMeta.Annotations[StatusMachineTerraformState] - tfState, err := base64.StdEncoding.DecodeString(tfStateB64) - if err != nil { - glog.Errorf("error decoding tfstate while staging. %+v", err) - return "", err - } - if err := saveFile(string(tfState), tfStateFilePath, 0644); err != nil { - return "", err - } - - return tfStateFilePath, nil -} - -// Cleans up the staging directory. -func (vc *VsphereClient) cleanUpStagingDir(machine *clusterv1.Machine) error { - glog.Infof("Cleaning up the staging dir for machine %s", machine.ObjectMeta.Name) - return os.RemoveAll(fmt.Sprintf(MachinePathStageFormat, machine.ObjectMeta.Name)) -} - -// Builds and saves the startup script for the passed machine and cluster. -func (vc *VsphereClient) saveStartupScript(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { - preloaded := false - var startupScript string - - if util.IsMaster(machine) { - if machine.Spec.Versions.ControlPlane == "" { - return vc.handleMachineError(machine, apierrors.InvalidMachineConfiguration( - "invalid master configuration: missing Machine.Spec.Versions.ControlPlane")) - } - var err error - startupScript, err = getMasterStartupScript( - templateParams{ - Token: vc.kubeadmToken, - Cluster: cluster, - Machine: machine, - Preloaded: preloaded, - }, - ) - if err != nil { - return err - } - } else { - if len(cluster.Status.APIEndpoints) == 0 { - return errors.New("invalid cluster state: cannot create a Kubernetes node without an API endpoint") - } - var err error - startupScript, err = getNodeStartupScript( - templateParams{ - Token: vc.kubeadmToken, - Cluster: cluster, - Machine: machine, - Preloaded: preloaded, - }, - ) - if err != nil { - return err - } - } - - glog.Infof("Saving startup script for machine %s", machine.ObjectMeta.Name) - - // Save the startup script. - if err := saveFile(startupScript, path.Join("/tmp", "machine-startup.sh"), 0644); err != nil { - return errors.New(fmt.Sprintf("Could not write startup script %s", err)) - } - - return nil -} - -func (vc *VsphereClient) Create(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { - config, err := vc.machineproviderconfig(machine.Spec.ProviderConfig) - if err != nil { - return vc.handleMachineError(machine, apierrors.InvalidMachineConfiguration( - "Cannot unmarshal providerConfig field: %v", err)) - } - - clusterConfig, err := vc.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return err - } - - if verr := vc.validateMachine(machine, config); verr != nil { - return vc.handleMachineError(machine, verr) - } - - if verr := vc.validateCluster(cluster); verr != nil { - return verr - } - - machinePath, err := vc.prepareStageMachineDir(machine) - if err != nil { - return errors.New(fmt.Sprintf("error while staging machine: %+v", err)) - } - - glog.Infof("Staged for machine create at %s", machinePath) - - // Save the startup script. - err = vc.saveStartupScript(cluster, machine) - if err != nil { - return errors.New(fmt.Sprintf("could not write startup script %+v", err)) - } - - glog.Infof("Checking if machine %s exists", machine.ObjectMeta.Name) - instance, err := vc.instanceIfExists(machine) - if err != nil { - return err - } - - if instance == nil { - glog.Infof("Machine instance does not exist. will create %s", machine.ObjectMeta.Name) - - var args []string - args = append(args, "apply") - args = append(args, "-auto-approve") - args = append(args, "-input=false") - args = append(args, "-var") - args = append(args, fmt.Sprintf("vm_name=%s", machine.ObjectMeta.Name)) - args = append(args, "-var") - args = append(args, fmt.Sprintf("vsphere_user=%s", clusterConfig.VsphereUser)) - args = append(args, "-var") - args = append(args, fmt.Sprintf("vsphere_password=%s", clusterConfig.VspherePassword)) - args = append(args, "-var") - args = append(args, fmt.Sprintf("vsphere_server=%s", clusterConfig.VsphereServer)) - args = append(args, fmt.Sprintf("-var-file=%s", path.Join(machinePath, TfVarsFilename))) - - _, cmdErr := runTerraformCmd(false, machinePath, args...) - if cmdErr != nil { - return errors.New(fmt.Sprintf("could not run terraform to create machine: %s", cmdErr)) - } - - // Get the IP address - out, cmdErr := runTerraformCmd(false, machinePath, "output", "ip_address") - if cmdErr != nil { - return fmt.Errorf("could not obtain 'ip_address' output variable: %s", cmdErr) - } - vmIp := strings.TrimSpace(out.String()) - glog.Infof("Machine %s created with ip address %s", machine.ObjectMeta.Name, vmIp) - - // Annotate the machine so that we remember exactly what VM we created for it. - tfState, _ := vc.GetTfState(machine) - vc.cleanUpStagingDir(machine) - return vc.updateAnnotations(machine, vmIp, tfState) - } else { - glog.Infof("Skipped creating a VM for machine %s that already exists.", machine.ObjectMeta.Name) - } - - return nil -} - -// Assumes the staging dir (workingDir) is set up correctly. That means have the .tf, .tfstate and .tfvars -// there as needed. -// Set stdout=true to redirect process's standard out to sys stdout. -// Otherwise returns a byte buffer of stdout. -func runTerraformCmd(stdout bool, workingDir string, arg ...string) (bytes.Buffer, error) { - var out bytes.Buffer - - terraformPath, err := exec.LookPath("terraform") - if err != nil { - return bytes.Buffer{}, errors.New("terraform binary not found") - } - glog.Infof("terraform path: %s", terraformPath) - - // Check if we need to terraform init - tfInitExists, e := pathExists(path.Join(workingDir, ".terraform/")) - if e != nil { - return bytes.Buffer{}, errors.New(fmt.Sprintf("Could not get the path of .terraform for machine: %+v", e)) - } - if !tfInitExists { - glog.Infof("Terraform not initialized. Running terraform init.") - cmd := exec.Command(terraformPath, "init") - cmd.Stdout = os.Stdout - cmd.Stdin = os.Stdin - cmd.Stderr = os.Stderr - cmd.Dir = workingDir - - initErr := cmd.Run() - if initErr != nil { - return bytes.Buffer{}, errors.New(fmt.Sprintf("Could not run terraform: %+v", initErr)) - } - } - - cmd := exec.Command(terraformPath, arg...) - // If stdout, only show in stdout - if stdout { - cmd.Stdout = os.Stdout - } else { - // Otherwise, save to buffer, and to a local log file. - logFileName := fmt.Sprintf("/tmp/cluster-api-%s.log", util.RandomToken()) - f, _ := os.Create(logFileName) - glog.Infof("Executing terraform. Logs are saved in %s", logFileName) - multiWriter := io.MultiWriter(&out, f) - cmd.Stdout = multiWriter - } - cmd.Stdin = os.Stdin - cmd.Stderr = os.Stderr - cmd.Dir = workingDir - err = cmd.Run() - if err != nil { - return out, err - } - - return out, nil -} - -func (vc *VsphereClient) Delete(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { - // Check if the instance exists, return if it doesn't - instance, err := vc.instanceIfExists(machine) - if err != nil { - return err - } - if instance == nil { - return nil - } - - clusterConfig, err := vc.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return err - } - - machinePath, err := vc.prepareStageMachineDir(machine) - - // The machine HCL reads the startup script, so we need to have something there for terraform - // to not fail. - if err := saveFile("", path.Join("/tmp", "machine-startup.sh"), 0644); err != nil { - return errors.New(fmt.Sprintf("Could not write startup script %s", err)) - } - - // destroy it - args := []string{ - "destroy", - "-auto-approve", - "-input=false", - "-var", fmt.Sprintf("vm_name=%s", machine.ObjectMeta.Name), - "-var", fmt.Sprintf("vsphere_user=%s", clusterConfig.VsphereUser), - "-var", fmt.Sprintf("vsphere_password=%s", clusterConfig.VspherePassword), - "-var", fmt.Sprintf("vsphere_server=%s", clusterConfig.VsphereServer), - "-var-file=variables.tfvars", - } - _, err = runTerraformCmd(false, machinePath, args...) - if err != nil { - return fmt.Errorf("could not run terraform: %s", err) - } - - vc.cleanUpStagingDir(machine) - - // Update annotation for the state and remove finalizer. - machine.ObjectMeta.Annotations[StatusMachineTerraformState] = "" - machine.ObjectMeta.Finalizers = util.Filter(machine.ObjectMeta.Finalizers, clusterv1.MachineFinalizer) - _, err = vc.machineClient.Update(machine) - - return err -} - -func (vc *VsphereClient) PostDelete(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error { - return nil -} - -func (vc *VsphereClient) Update(cluster *clusterv1.Cluster, goalMachine *clusterv1.Machine) error { - // Check if the annotations we want to track exist, if not, the user likely created a master machine with their own annotation. - if _, ok := goalMachine.ObjectMeta.Annotations[ControlPlaneVersionAnnotationKey]; !ok { - ip, _ := vc.DeploymentClient.GetIP(goalMachine) - glog.Info("Version annotations do not exist. Populating existing state for bootstrapped machine.") - tfState, _ := vc.GetTfState(goalMachine) - return vc.updateAnnotations(goalMachine, ip, tfState) - } - - if util.IsMaster(goalMachine) { - // Master upgrades - glog.Info("Upgrade for master machine.. Check if upgrade needed.") - - // If the saved versions and new versions differ, do in-place upgrade. - if vc.needsMasterUpdate(goalMachine) { - glog.Infof("Doing in-place upgrade for master from v%s to v%s", goalMachine.Annotations[ControlPlaneVersionAnnotationKey], goalMachine.Spec.Versions.ControlPlane) - err := vc.updateMasterInPlace(goalMachine) - if err != nil { - glog.Errorf("Master in-place upgrade failed: %+v", err) - return err - } - } else { - glog.Info("UNSUPPORTED MASTER UPDATE.") - } - } else { - if vc.needsNodeUpdate(goalMachine) { - // Node upgrades - if err := vc.updateNode(cluster, goalMachine); err != nil { - glog.Errorf("Node %s update failed: %+v", goalMachine.ObjectMeta.Name, err) - return err - } - } else { - glog.Info("UNSUPPORTED NODE UPDATE.") - } - } - - return nil -} - -func (vc *VsphereClient) needsControlPlaneUpdate(machine *clusterv1.Machine) bool { - return machine.Spec.Versions.ControlPlane != machine.Annotations[ControlPlaneVersionAnnotationKey] -} - -func (vc *VsphereClient) needsKubeletUpdate(machine *clusterv1.Machine) bool { - return machine.Spec.Versions.Kubelet != machine.Annotations[KubeletVersionAnnotationKey] -} - -// Returns true if the node is needed to be upgraded. -func (vc *VsphereClient) needsNodeUpdate(machine *clusterv1.Machine) bool { - return !util.IsMaster(machine) && - vc.needsKubeletUpdate(machine) -} - -// Returns true if the master is needed to be upgraded. -func (vc *VsphereClient) needsMasterUpdate(machine *clusterv1.Machine) bool { - return util.IsMaster(machine) && - vc.needsControlPlaneUpdate(machine) - // TODO: we should support kubelet upgrades here as well. -} - -func (vc *VsphereClient) updateKubelet(machine *clusterv1.Machine) error { - if vc.needsKubeletUpdate(machine) { - // Kubelet packages are versioned 1.10.1-00 and so on. - kubeletAptVersion := machine.Spec.Versions.Kubelet + "-00" - cmd := fmt.Sprintf("sudo apt-get install kubelet=%s", kubeletAptVersion) - if _, err := vc.remoteSshCommand(machine, cmd, "~/.ssh/vsphere_tmp", "ubuntu"); err != nil { - glog.Errorf("remoteSshCommand while installing new kubelet version: %v", err) - return err - } - } - return nil -} - -func (vc *VsphereClient) updateControlPlane(machine *clusterv1.Machine) error { - if vc.needsControlPlaneUpdate(machine) { - // Pull the kudeadm for target version K8s. - cmd := fmt.Sprintf("curl -sSL https://dl.k8s.io/release/v%s/bin/linux/amd64/kubeadm | sudo tee /usr/bin/kubeadm > /dev/null; "+ - "sudo chmod a+rx /usr/bin/kubeadm", machine.Spec.Versions.ControlPlane) - if _, err := vc.remoteSshCommand(machine, cmd, "~/.ssh/vsphere_tmp", "ubuntu"); err != nil { - glog.Infof("remoteSshCommand failed while downloading new kubeadm: %+v", err) - return err - } - - // Next upgrade control plane - cmd = fmt.Sprintf("sudo kubeadm upgrade apply %s -y", "v"+machine.Spec.Versions.ControlPlane) - if _, err := vc.remoteSshCommand(machine, cmd, "~/.ssh/vsphere_tmp", "ubuntu"); err != nil { - glog.Infof("remoteSshCommand failed while upgrading control plane: %+v", err) - return err - } - } - return nil -} - -// Update the passed node machine by recreating it. -func (vc *VsphereClient) updateNode(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { - if err := vc.Delete(cluster, machine); err != nil { - return err - } - - if err := vc.Create(cluster, machine); err != nil { - return err - } - return nil -} - -// Assumes that update is needed. -// For now support only K8s control plane upgrades. -func (vc *VsphereClient) updateMasterInPlace(machine *clusterv1.Machine) error { - // Execute a control plane upgrade. - if err := vc.updateControlPlane(machine); err != nil { - return err - } - - // Update annotation for version. - machine.ObjectMeta.Annotations[ControlPlaneVersionAnnotationKey] = machine.Spec.Versions.ControlPlane - if _, err := vc.machineClient.Update(machine); err != nil { - return err - } - - return nil -} - -func (vc *VsphereClient) remoteSshCommand(m *clusterv1.Machine, cmd, privateKeyPath, sshUser string) (string, error) { - glog.Infof("Remote SSH execution '%s' on %s", cmd, m.ObjectMeta.Name) - - publicIP, err := vc.DeploymentClient.GetIP(m) - if err != nil { - return "", err - } - - command := fmt.Sprintf("echo STARTFILE; %s", cmd) - c := exec.Command("ssh", "-i", privateKeyPath, sshUser+"@"+publicIP, - "-o", "StrictHostKeyChecking=no", - "-o", "UserKnownHostsFile=/dev/null", - command) - out, err := c.CombinedOutput() - if err != nil { - return "", fmt.Errorf("error: %v, output: %s", err, string(out)) - } - result := strings.TrimSpace(string(out)) - parts := strings.Split(result, "STARTFILE") - glog.Infof("\t Result of command %s ========= %+v", cmd, parts) - if len(parts) != 2 { - return "", nil - } - // TODO: Check error. - return strings.TrimSpace(parts[1]), nil -} - -func (vc *VsphereClient) Exists(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error) { - i, err := vc.instanceIfExists(machine) - if err != nil { - return false, err - } - return i != nil, err -} - -func (vc *VsphereClient) GetTfState(machine *clusterv1.Machine) (string, error) { - if machine.ObjectMeta.Annotations != nil { - if tfStateB64, ok := machine.ObjectMeta.Annotations[StatusMachineTerraformState]; ok { - glog.Infof("Returning tfstate for machine %s from annotation", machine.ObjectMeta.Name) - tfState, err := base64.StdEncoding.DecodeString(tfStateB64) - if err != nil { - glog.Errorf("error decoding tfstate in annotation. %+v", err) - return "", err - } - return string(tfState), nil - } - } - - tfStateBytes, _ := ioutil.ReadFile(path.Join(fmt.Sprintf(MachinePathStageFormat, machine.ObjectMeta.Name), TfStateFilename)) - if tfStateBytes != nil { - glog.Infof("Returning tfstate for machine %s from staging file", machine.ObjectMeta.Name) - return string(tfStateBytes), nil - } - - return "", errors.New("could not get tfstate") -} - -// We are storing these as annotations and not in Machine Status because that's intended for -// "Provider-specific status" that will usually be used to detect updates. Additionally, -// Status requires yet another version API resource which is too heavy to store IP and TF state. -func (vc *VsphereClient) updateAnnotations(machine *clusterv1.Machine, vmIp, tfState string) error { - glog.Infof("Updating annotations for machine %s", machine.ObjectMeta.Name) - if machine.ObjectMeta.Annotations == nil { - machine.ObjectMeta.Annotations = make(map[string]string) - } - - tfStateB64 := base64.StdEncoding.EncodeToString([]byte(tfState)) - - machine.ObjectMeta.Annotations[VmIpAnnotationKey] = vmIp - machine.ObjectMeta.Annotations[ControlPlaneVersionAnnotationKey] = machine.Spec.Versions.ControlPlane - machine.ObjectMeta.Annotations[KubeletVersionAnnotationKey] = machine.Spec.Versions.Kubelet - machine.ObjectMeta.Annotations[StatusMachineTerraformState] = tfStateB64 - - _, err := vc.machineClient.Update(machine) - if err != nil { - return err - } - return nil -} - -// Returns the machine object if the passed machine exists in terraform state. -func (vc *VsphereClient) instanceIfExists(machine *clusterv1.Machine) (*clusterv1.Machine, error) { - machinePath := fmt.Sprintf(MachinePathStageFormat, machine.ObjectMeta.Name) - tfStateFilePath, err := vc.stageTfState(machine) - if err != nil { - return nil, err - } - glog.Infof("Instance existance checked in directory %+v", tfStateFilePath) - if tfStateFilePath == "" { - return nil, nil - } - - out, tfCmdErr := runTerraformCmd(false, machinePath, "show") - if tfCmdErr != nil { - glog.Infof("Ignore terraform error in instanceIfExists: %+v", err) - return nil, nil - } - re := regexp.MustCompile(fmt.Sprintf("\n[[:space:]]*(name = %s)\n", machine.ObjectMeta.Name)) - if re.MatchString(out.String()) { - return machine, nil - } - return nil, nil -} - -func (vc *VsphereClient) machineproviderconfig(providerConfig clusterv1.ProviderConfig) (*vsphereconfig.VsphereMachineProviderConfig, error) { - obj, gvk, err := vc.codecFactory.UniversalDecoder().Decode(providerConfig.Value.Raw, nil, nil) - if err != nil { - return nil, fmt.Errorf("machine providerconfig decoding failure: %v", err) - } - - config, ok := obj.(*vsphereconfig.VsphereMachineProviderConfig) - if !ok { - return nil, fmt.Errorf("machine providerconfig failure to cast to vsphere; type: %v", gvk) - } - - return config, nil -} - -func (vc *VsphereClient) clusterproviderconfig(providerConfig clusterv1.ProviderConfig) (*vsphereconfig.VsphereClusterProviderConfig, error) { - obj, gvk, err := vc.codecFactory.UniversalDecoder().Decode(providerConfig.Value.Raw, nil, nil) - if err != nil { - return nil, fmt.Errorf("cluster providerconfig decoding failure: %v", err) - } - - config, ok := obj.(*vsphereconfig.VsphereClusterProviderConfig) - if !ok { - return nil, fmt.Errorf("cluster providerconfig failure to cast to vsphere; type: %v", gvk) - } - - return config, nil -} - -func (vc *VsphereClient) validateMachine(machine *clusterv1.Machine, config *vsphereconfig.VsphereMachineProviderConfig) *apierrors.MachineError { - if machine.Spec.Versions.Kubelet == "" { - return apierrors.InvalidMachineConfiguration("spec.versions.kubelet can't be empty") - } - return nil -} - -func (vc *VsphereClient) validateCluster(cluster *clusterv1.Cluster) error { - if cluster.Spec.ClusterNetwork.ServiceDomain == "" { - return errors.New("invalid cluster configuration: missing Cluster.Spec.ClusterNetwork.ServiceDomain") - } - if getSubnet(cluster.Spec.ClusterNetwork.Pods) == "" { - return errors.New("invalid cluster configuration: missing Cluster.Spec.ClusterNetwork.Pods") - } - if getSubnet(cluster.Spec.ClusterNetwork.Services) == "" { - return errors.New("invalid cluster configuration: missing Cluster.Spec.ClusterNetwork.Services") - } - - clusterConfig, err := vc.clusterproviderconfig(cluster.Spec.ProviderConfig) - if err != nil { - return err - } - if clusterConfig.VsphereUser == "" || clusterConfig.VspherePassword == "" || clusterConfig.VsphereServer == "" { - return errors.New("vsphere_user, vsphere_password, vsphere_server are required fields in Cluster spec.") - } - return nil -} - -// If the VsphereClient has a client for updating Machine objects, this will set -// the appropriate reason/message on the Machine.Status. If not, such as during -// cluster installation, it will operate as a no-op. It also returns the -// original error for convenience, so callers can do "return handleMachineError(...)". -func (vc *VsphereClient) handleMachineError(machine *clusterv1.Machine, err *apierrors.MachineError) error { - if vc.machineClient != nil { - reason := err.Reason - message := err.Message - machine.Status.ErrorReason = &reason - machine.Status.ErrorMessage = &message - vc.machineClient.UpdateStatus(machine) - } - - glog.Errorf("Machine error: %v", err.Message) - return err -} - -// Just a temporary hack to grab a single range from the config. -func getSubnet(netRange clusterv1.NetworkRanges) string { - if len(netRange.CIDRBlocks) == 0 { - return "" - } - return netRange.CIDRBlocks[0] -} - -// TODO: We need to change this when we create dedicated service account for apiserver/controller -// pod. -func CreateExtApiServerRoleBinding() error { - return run("kubectl", "create", "rolebinding", - "-n", "kube-system", "machine-controller", "--role=extension-apiserver-authentication-reader", - "--serviceaccount=default:default") -} - -func run(cmd string, args ...string) error { - c := exec.Command(cmd, args...) - if out, err := c.CombinedOutput(); err != nil { - return fmt.Errorf("error: %v, output: %s", err, string(out)) - } - return nil -} - -func pathExists(path string) (bool, error) { - _, err := os.Stat(path) - if err == nil { - return true, nil - } - if os.IsNotExist(err) { - return false, nil - } - return true, err -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines/BUILD.bazel deleted file mode 100644 index 7e46087e95f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines/BUILD.bazel +++ /dev/null @@ -1,10 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["namedmachines.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines", - importpath = "sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/ghodss/yaml:go_default_library"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines/namedmachines.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines/namedmachines.go deleted file mode 100644 index 5d74ebb174d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines/namedmachines.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package namedmachines - -import ( - "fmt" - "io" - "io/ioutil" - "os" - - "github.com/ghodss/yaml" -) - -// Config Watch holds the path to the named machines yaml file. -type ConfigWatch struct { - path string -} - -// A single named machine. -type NamedMachine struct { - MachineName string - MachineHcl string -} - -// A list of named machines. -type NamedMachinesItems struct { - Items []NamedMachine `json:"items"` -} - -// All named machines defined in yaml. -type NamedMachines struct { - namedMachinesItems *NamedMachinesItems -} - -func NewConfigWatch(path string) (*ConfigWatch, error) { - if _, err := os.Stat(path); err != nil { - return nil, err - } - return &ConfigWatch{path: path}, nil -} - -// Returns all named machines for ConfigWatch. -func (cw *ConfigWatch) NamedMachines() (*NamedMachines, error) { - file, err := os.Open(cw.path) - if err != nil { - return nil, err - } - return parseNamedMachinesYaml(file) -} - -func parseNamedMachinesYaml(reader io.Reader) (*NamedMachines, error) { - bytes, err := ioutil.ReadAll(reader) - if err != nil { - return nil, err - } - - items := &NamedMachinesItems{} - err = yaml.Unmarshal(bytes, items) - if err != nil { - return nil, err - } - - return &NamedMachines{items}, nil -} - -func (nm *NamedMachines) GetYaml() (string, error) { - bytes, err := yaml.Marshal(nm.namedMachinesItems) - if err != nil { - return "", err - } - return string(bytes), nil -} - -// Returns a NamedMachine that matches the passed name. -func (nm *NamedMachines) MatchMachine(machineName string) (*NamedMachine, error) { - for _, namedMachine := range nm.namedMachinesItems.Items { - if namedMachine.MachineName == machineName { - return &namedMachine, nil - } - } - return nil, fmt.Errorf("could not find a machine with name %s", machineName) -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/pods.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/pods.go deleted file mode 100644 index 869f7d64c95..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/pods.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package vsphere - -import ( - "bytes" - "encoding/base64" - "fmt" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "text/template" - "time" - - "github.com/golang/glog" - corev1 "k8s.io/api/core/v1" - "sigs.k8s.io/cluster-api/cloud/vsphere/config" -) - -var apiServerImage = "gcr.io/k8s-cluster-api/cluster-apiserver:0.0.5" -var controllerManagerImage = "gcr.io/k8s-cluster-api/controller-manager:0.0.7" -var machineControllerImage = "gcr.io/k8s-cluster-api/vsphere-machine-controller:0.0.6" - -func init() { - if img, ok := os.LookupEnv("MACHINE_CONTROLLER_IMAGE"); ok { - machineControllerImage = img - } - - if img, ok := os.LookupEnv("CLUSTER_API_SERVER_IMAGE"); ok { - apiServerImage = img - } - - if img, ok := os.LookupEnv("CONTROLLER_MANAGER_IMAGE"); ok { - controllerManagerImage = img - } -} - -type caCertParams struct { - caBundle string - tlsCrt string - tlsKey string -} - -func getBase64(file string) string { - buff := bytes.Buffer{} - enc := base64.NewEncoder(base64.StdEncoding, &buff) - data, err := ioutil.ReadFile(file) - if err != nil { - glog.Fatalf("Could not read file %s: %v", file, err) - } - - _, err = enc.Write(data) - if err != nil { - glog.Fatalf("Could not write bytes: %v", err) - } - enc.Close() - return buff.String() -} - -func getApiServerCerts() (*caCertParams, error) { - const name = "clusterapi" - const namespace = corev1.NamespaceDefault - configDir, err := ioutil.TempDir("", "cert") - if err != nil { - return nil, err - } - defer os.RemoveAll(configDir) // clean up - - if err := run("openssl", "req", "-x509", - "-newkey", "rsa:2048", - "-keyout", filepath.Join(configDir, "apiserver_ca.key"), - "-out", filepath.Join(configDir, "apiserver_ca.crt"), - "-days", "365", - "-nodes", - "-subj", fmt.Sprintf("/C=un/ST=st/L=l/O=o/OU=ou/CN=%s-certificate-authority", name)); err != nil { - return nil, err - } - - // Use ..svc as the domain Name for the certificate - if err = run("openssl", "req", - "-out", filepath.Join(configDir, "apiserver.csr"), - "-new", - "-newkey", "rsa:2048", - "-nodes", - "-keyout", filepath.Join(configDir, "apiserver.key"), - "-subj", fmt.Sprintf("/C=un/ST=st/L=l/O=o/OU=ou/CN=%s.%s.svc", name, namespace)); err != nil { - return nil, err - } - - if err = run("openssl", "x509", "-req", - "-days", "365", - "-in", filepath.Join(configDir, "apiserver.csr"), - "-CA", filepath.Join(configDir, "apiserver_ca.crt"), - "-CAkey", filepath.Join(configDir, "apiserver_ca.key"), - "-CAcreateserial", - "-out", filepath.Join(configDir, "apiserver.crt")); err != nil { - return nil, err - } - - certParms := &caCertParams{ - caBundle: getBase64(filepath.Join(configDir, "apiserver_ca.crt")), - tlsCrt: getBase64(filepath.Join(configDir, "apiserver.crt")), - tlsKey: getBase64(filepath.Join(configDir, "apiserver.key")), - } - - return certParms, nil -} - -func CreateApiServerAndController(token string) error { - tmpl, err := template.New("config").Parse(config.ClusterAPIDeployConfigTemplate) - if err != nil { - return err - } - - certParms, err := getApiServerCerts() - if err != nil { - glog.Errorf("Error: %v", err) - return err - } - - type params struct { - Token string - APIServerImage string - ControllerManagerImage string - MachineControllerImage string - CABundle string - TLSCrt string - TLSKey string - } - - var tmplBuf bytes.Buffer - err = tmpl.Execute(&tmplBuf, params{ - Token: token, - APIServerImage: apiServerImage, - ControllerManagerImage: controllerManagerImage, - MachineControllerImage: machineControllerImage, - CABundle: certParms.caBundle, - TLSCrt: certParms.tlsCrt, - TLSKey: certParms.tlsKey, - }) - if err != nil { - return err - } - - maxTries := 30 - for tries := 0; tries < maxTries; tries++ { - glog.Infof("Attempting to deploy cluster api config.") - err = deployConfig(tmplBuf.Bytes()) - if err == nil { - return nil - } else { - if tries < maxTries-1 { - glog.Info("Error scheduling machine controller. Will retry...\n") - time.Sleep(3 * time.Second) - } else { - glog.Info("Error scheduling machine controller. No more retries.") - } - } - } - - if err != nil { - return fmt.Errorf("couldn't start machine controller: %v\n", err) - } else { - return nil - } -} - -func deployConfig(manifest []byte) error { - cmd := exec.Command("kubectl", "create", "-f", "-") - stdin, err := cmd.StdinPipe() - if err != nil { - return err - } - - go func() { - defer stdin.Close() - stdin.Write(manifest) - }() - - out, err := cmd.CombinedOutput() - if err == nil { - return nil - } else { - return fmt.Errorf("couldn't create pod: %v, output: %s", err, string(out)) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/templates.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/templates.go deleted file mode 100644 index 456a00c0d6c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/templates.go +++ /dev/null @@ -1,809 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package vsphere - -import ( - "bytes" - "fmt" - "text/template" - - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -type templateParams struct { - Token string - Cluster *clusterv1.Cluster - Machine *clusterv1.Machine - DockerImages []string - Preloaded bool -} - -// Returns the startup script for the nodes. -func getNodeStartupScript(params templateParams) (string, error) { - var buf bytes.Buffer - tName := "fullScript" - if isPreloaded(params) { - tName = "preloadedScript" - } - - if err := nodeStartupScriptTemplate.ExecuteTemplate(&buf, tName, params); err != nil { - return "", err - } - return buf.String(), nil -} - -func getMasterStartupScript(params templateParams) (string, error) { - var buf bytes.Buffer - tName := "fullScript" - if isPreloaded(params) { - tName = "preloadedScript" - } - - if err := masterStartupScriptTemplate.ExecuteTemplate(&buf, tName, params); err != nil { - return "", err - } - return buf.String(), nil -} - -func isPreloaded(params templateParams) bool { - return params.Preloaded -} - -// PreloadMasterScript returns a script that can be used to preload a master. -func PreloadMasterScript(version string, dockerImages []string) (string, error) { - return preloadScript(masterStartupScriptTemplate, version, dockerImages) -} - -// PreloadNodeScript returns a script that can be used to preload a master. -func PreloadNodeScript(version string, dockerImages []string) (string, error) { - return preloadScript(nodeStartupScriptTemplate, version, dockerImages) -} - -func preloadScript(t *template.Template, version string, dockerImages []string) (string, error) { - var buf bytes.Buffer - params := templateParams{ - Machine: &clusterv1.Machine{}, - DockerImages: dockerImages, - } - params.Machine.Spec.Versions.Kubelet = version - err := t.ExecuteTemplate(&buf, "generatePreloadedImage", params) - return buf.String(), err -} - -var ( - nodeStartupScriptTemplate *template.Template - masterStartupScriptTemplate *template.Template -) - -func init() { - endpoint := func(apiEndpoint *clusterv1.APIEndpoint) string { - return fmt.Sprintf("%s:%d", apiEndpoint.Host, apiEndpoint.Port) - } - // Force a compliation error if getSubnet changes. This is the - // signature the templates expect, so changes need to be - // reflected in templates below. - var _ func(clusterv1.NetworkRanges) string = getSubnet - funcMap := map[string]interface{}{ - "endpoint": endpoint, - "getSubnet": getSubnet, - } - nodeStartupScriptTemplate = template.Must(template.New("nodeStartupScript").Funcs(funcMap).Parse(nodeStartupScript)) - nodeStartupScriptTemplate = template.Must(nodeStartupScriptTemplate.Parse(genericTemplates)) - masterStartupScriptTemplate = template.Must(template.New("masterStartupScript").Funcs(funcMap).Parse(masterStartupScript)) - masterStartupScriptTemplate = template.Must(masterStartupScriptTemplate.Parse(genericTemplates)) -} - -const genericTemplates = ` -{{ define "fullScript" -}} - {{ template "startScript" . }} - {{ template "install" . }} - {{ template "configure" . }} - {{ template "endScript" . }} -{{- end }} - -{{ define "preloadedScript" -}} - {{ template "startScript" . }} - {{ template "configure" . }} - {{ template "endScript" . }} -{{- end }} - -{{ define "generatePreloadedImage" -}} - {{ template "startScript" . }} - {{ template "install" . }} - -systemctl enable docker || true -systemctl start docker || true - - {{ range .DockerImages }} -docker pull {{ . }} - {{ end }} - - {{ template "endScript" . }} -{{- end }} - -{{ define "startScript" -}} -#!/bin/bash - -set -e -set -x - -( -{{- end }} - -{{define "endScript" -}} - -echo done. -) 2>&1 | tee /var/log/startup.log - -{{- end }} -` - -const nodeStartupScript = ` -{{ define "install" -}} -# Disable swap otherwise kubelet won't run -swapoff -a -sed -i '/ swap / s/^/#/' /etc/fstab - -apt-get update -apt-get install -y apt-transport-https prips -apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys F76221572C52609D - -cat < /etc/apt/sources.list.d/k8s.list -deb [arch=amd64] https://apt.dockerproject.org/repo ubuntu-xenial main -EOF - -apt-get update -apt-get install -y docker.io - -curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - - -cat < /etc/apt/sources.list.d/kubernetes.list -deb http://apt.kubernetes.io/ kubernetes-xenial main -EOF -apt-get update - -{{- end }} {{/* end install */}} - -{{ define "configure" -}} -KUBELET_VERSION={{ .Machine.Spec.Versions.Kubelet }} -TOKEN={{ .Token }} -MASTER={{ index .Cluster.Status.APIEndpoints 0 | endpoint }} -MACHINE={{ .Machine.ObjectMeta.Name }} -CLUSTER_DNS_DOMAIN={{ .Cluster.Spec.ClusterNetwork.ServiceDomain }} -SERVICE_CIDR={{ getSubnet .Cluster.Spec.ClusterNetwork.Services }} - -# Our Debian packages have versions like "1.8.0-00" or "1.8.0-01". Do a prefix -# search based on our SemVer to find the right (newest) package version. -function getversion() { - name=$1 - prefix=$2 - version=$(apt-cache madison $name | awk '{ print $3 }' | grep ^$prefix | head -n1) - if [[ -z "$version" ]]; then - echo Can\'t find package $name with prefix $prefix - exit 1 - fi - echo $version -} - -KUBELET=$(getversion kubelet ${KUBELET_VERSION}-) -KUBEADM=$(getversion kubeadm ${KUBELET_VERSION}-) -KUBECTL=$(getversion kubectl ${KUBELET_VERSION}-) -# Explicit cni version is a temporary workaround till the right version can be automatically detected correctly -apt-get install -y kubelet=${KUBELET} kubeadm=${KUBEADM} kubectl=${KUBECTL} - -systemctl enable docker || true -systemctl start docker || true - -sysctl net.bridge.bridge-nf-call-iptables=1 - -# kubeadm uses 10th IP as DNS server -CLUSTER_DNS_SERVER=$(prips ${SERVICE_CIDR} | head -n 11 | tail -n 1) - -cat > /etc/systemd/system/kubelet.service.d/20-cloud.conf << EOF -[Service] -Environment="KUBELET_DNS_ARGS=--cluster-dns=${CLUSTER_DNS_SERVER} --cluster-domain=${CLUSTER_DNS_DOMAIN}" -Environment="KUBELET_EXTRA_ARGS=--cloud-provider=vsphere" -EOF -systemctl daemon-reload -systemctl restart kubelet.service - -kubeadm join --token "${TOKEN}" "${MASTER}" --skip-preflight-checks --discovery-token-unsafe-skip-ca-verification - -for tries in $(seq 1 60); do - kubectl --kubeconfig /etc/kubernetes/kubelet.conf annotate --overwrite node $(hostname) machine=${MACHINE} && break - sleep 1 -done -{{- end }} {{/* end configure */}} -` - -const masterStartupScript = ` -{{ define "install" -}} - -# Disable swap otherwise kubelet won't run -swapoff -a -sed -i '/ swap / s/^/#/' /etc/fstab - -KUBELET_VERSION={{ .Machine.Spec.Versions.Kubelet }} - -curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - -touch /etc/apt/sources.list.d/kubernetes.list -sh -c 'echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list' - -apt-get update -y - -apt-get install -y \ - socat \ - ebtables \ - docker.io \ - apt-transport-https \ - cloud-utils \ - prips - -export VERSION=v${KUBELET_VERSION} -export ARCH=amd64 -curl -sSL https://dl.k8s.io/release/${VERSION}/bin/linux/${ARCH}/kubeadm > /usr/bin/kubeadm.dl -chmod a+rx /usr/bin/kubeadm.dl -{{- end }} {{/* end install */}} - - -{{ define "configure" -}} -KUBELET_VERSION={{ .Machine.Spec.Versions.Kubelet }} -TOKEN={{ .Token }} -PORT=443 -MACHINE={{ .Machine.ObjectMeta.Name }} -CONTROL_PLANE_VERSION={{ .Machine.Spec.Versions.ControlPlane }} -CLUSTER_DNS_DOMAIN={{ .Cluster.Spec.ClusterNetwork.ServiceDomain }} -POD_CIDR={{ getSubnet .Cluster.Spec.ClusterNetwork.Pods }} -SERVICE_CIDR={{ getSubnet .Cluster.Spec.ClusterNetwork.Services }} - -# kubeadm uses 10th IP as DNS server -CLUSTER_DNS_SERVER=$(prips ${SERVICE_CIDR} | head -n 11 | tail -n 1) - -# Our Debian packages have versions like "1.8.0-00" or "1.8.0-01". Do a prefix -# search based on our SemVer to find the right (newest) package version. -function getversion() { - name=$1 - prefix=$2 - version=$(apt-cache madison $name | awk '{ print $3 }' | grep ^$prefix | head -n1) - if [[ -z "$version" ]]; then - echo Can\'t find package $name with prefix $prefix - exit 1 - fi - echo $version -} - -KUBELET=$(getversion kubelet ${KUBELET_VERSION}-) -KUBEADM=$(getversion kubeadm ${KUBELET_VERSION}-) - -# Explicit cni version is a temporary workaround till the right version can be automatically detected correctly -apt-get install -y \ - kubelet=${KUBELET} \ - kubeadm=${KUBEADM} - -mv /usr/bin/kubeadm.dl /usr/bin/kubeadm -chmod a+rx /usr/bin/kubeadm - -systemctl enable docker -systemctl start docker -cat > /etc/systemd/system/kubelet.service.d/20-cloud.conf << EOF -[Service] -Environment="KUBELET_DNS_ARGS=--cluster-dns=${CLUSTER_DNS_SERVER} --cluster-domain=${CLUSTER_DNS_DOMAIN}" -Environment="KUBELET_EXTRA_ARGS=--cloud-provider=vsphere --cloud-config=/etc/kubernetes/cloud-config/cloud-config.yaml" -EOF -systemctl daemon-reload -systemctl restart kubelet.service -` + - "PRIVATEIP=`ip route get 8.8.8.8 | awk '{printf \"%s\", $NF; exit}'`" + ` -echo $PRIVATEIP > /tmp/.ip -` + - "PUBLICIP=`ip route get 8.8.8.8 | awk '{printf \"%s\", $NF; exit}'`" + ` - -# Set up kubeadm config file to pass parameters to kubeadm init. -cat > /etc/kubernetes/kubeadm_config.yaml < /tmp/calico.yaml << EOF -# This manifest is forked from https://docs.projectcalico.org/v3.0/getting-started/kubernetes/installation/hosted/kubeadm/1.7/calico.yaml -# The ipam is changed from "calico-ipam" to "host-local". - -# Calico Version v3.0.7 -# https://docs.projectcalico.org/v3.0/releases#v3.0.7 -# This manifest includes the following component versions: -# calico/node:v3.0.7 -# calico/cni:v2.0.5 -# calico/kube-controllers:v2.0.4 - -# This ConfigMap is used to configure a self-hosted Calico installation. -kind: ConfigMap -apiVersion: v1 -metadata: - name: calico-config - namespace: kube-system -data: - # The location of your etcd cluster. This uses the Service clusterIP - # defined below. - etcd_endpoints: "http://10.96.232.136:6666" - - # Configure the Calico backend to use. - calico_backend: "bird" - - # The CNI network configuration to install on each node. - cni_network_config: |- - { - "name": "k8s-pod-network", - "cniVersion": "0.3.0", - "plugins": [ - { - "type": "calico", - "etcd_endpoints": "__ETCD_ENDPOINTS__", - "log_level": "info", - "mtu": 1500, - "ipam": { - "type": "host-local", - "subnet": "usePodCidr" - }, - "policy": { - "type": "k8s", - "k8s_api_root": "https://__KUBERNETES_SERVICE_HOST__:__KUBERNETES_SERVICE_PORT__", - "k8s_auth_token": "__SERVICEACCOUNT_TOKEN__" - }, - "kubernetes": { - "kubeconfig": "/etc/cni/net.d/__KUBECONFIG_FILENAME__" - } - }, - { - "type": "portmap", - "snat": true, - "capabilities": {"portMappings": true} - } - ] - } - - ---- - -# This manifest installs the Calico etcd on the kubeadm master. This uses a DaemonSet -# to force it to run on the master even when the master isn't schedulable, and uses -# nodeSelector to ensure it only runs on the master. -apiVersion: extensions/v1beta1 -kind: DaemonSet -metadata: - name: calico-etcd - namespace: kube-system - labels: - k8s-app: calico-etcd -spec: - template: - metadata: - labels: - k8s-app: calico-etcd - annotations: - # Mark this pod as a critical add-on; when enabled, the critical add-on scheduler - # reserves resources for critical add-on pods so that they can be rescheduled after - # a failure. This annotation works in tandem with the toleration below. - scheduler.alpha.kubernetes.io/critical-pod: '' - spec: - tolerations: - # This taint is set by all kubelets running '--cloud-provider=external' - # so we should tolerate it to schedule the calico pods - - key: node.cloudprovider.kubernetes.io/uninitialized - value: "true" - effect: NoSchedule - # Allow this pod to run on the master. - - key: node-role.kubernetes.io/master - effect: NoSchedule - # Allow this pod to be rescheduled while the node is in "critical add-ons only" mode. - # This, along with the annotation above marks this pod as a critical add-on. - - key: CriticalAddonsOnly - operator: Exists - # Only run this pod on the master. - nodeSelector: - node-role.kubernetes.io/master: "" - hostNetwork: true - containers: - - name: calico-etcd - image: quay.io/coreos/etcd:v3.1.10 - env: - - name: CALICO_ETCD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - command: - - /usr/local/bin/etcd - args: - - --name=calico - - --data-dir=/var/etcd/calico-data - - --advertise-client-urls=http://$CALICO_ETCD_IP:6666 - - --listen-client-urls=http://0.0.0.0:6666 - - --listen-peer-urls=http://0.0.0.0:6667 - - --auto-compaction-retention=1 - volumeMounts: - - name: var-etcd - mountPath: /var/etcd - volumes: - - name: var-etcd - hostPath: - path: /var/etcd - ---- - -# This manifest installs the Service which gets traffic to the Calico -# etcd. -apiVersion: v1 -kind: Service -metadata: - labels: - k8s-app: calico-etcd - name: calico-etcd - namespace: kube-system -spec: - # Select the calico-etcd pod running on the master. - selector: - k8s-app: calico-etcd - # This ClusterIP needs to be known in advance, since we cannot rely - # on DNS to get access to etcd. - clusterIP: 10.96.232.136 - ports: - - port: 6666 - ---- - -# This manifest installs the calico/node container, as well -# as the Calico CNI plugins and network config on -# each master and worker node in a Kubernetes cluster. -kind: DaemonSet -apiVersion: extensions/v1beta1 -metadata: - name: calico-node - namespace: kube-system - labels: - k8s-app: calico-node -spec: - selector: - matchLabels: - k8s-app: calico-node - updateStrategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 - template: - metadata: - labels: - k8s-app: calico-node - annotations: - # Mark this pod as a critical add-on; when enabled, the critical add-on scheduler - # reserves resources for critical add-on pods so that they can be rescheduled after - # a failure. This annotation works in tandem with the toleration below. - scheduler.alpha.kubernetes.io/critical-pod: '' - spec: - hostNetwork: true - tolerations: - # This taint is set by all kubelets running '--cloud-provider=external' - # so we should tolerate it to schedule the calico pods - - key: node.cloudprovider.kubernetes.io/uninitialized - value: "true" - effect: NoSchedule - - key: node-role.kubernetes.io/master - effect: NoSchedule - # Allow this pod to be rescheduled while the node is in "critical add-ons only" mode. - # This, along with the annotation above marks this pod as a critical add-on. - - key: CriticalAddonsOnly - operator: Exists - serviceAccountName: calico-cni-plugin - # Minimize downtime during a rolling upgrade or deletion; tell Kubernetes to do a "force - # deletion": https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods. - terminationGracePeriodSeconds: 0 - containers: - # Runs calico/node container on each Kubernetes node. This - # container programs network policy and routes on each - # host. - - name: calico-node - image: quay.io/calico/node:v3.0.7 - env: - # The location of the Calico etcd cluster. - - name: ETCD_ENDPOINTS - valueFrom: - configMapKeyRef: - name: calico-config - key: etcd_endpoints - # Enable BGP. Disable to enforce policy only. - - name: CALICO_NETWORKING_BACKEND - valueFrom: - configMapKeyRef: - name: calico-config - key: calico_backend - # Cluster type to identify the deployment type - - name: CLUSTER_TYPE - value: "kubeadm,bgp" - # Disable file logging so 'kubectl logs' works. - - name: CALICO_DISABLE_FILE_LOGGING - value: "true" - # Set noderef for node controller. - - name: CALICO_K8S_NODE_REF - valueFrom: - fieldRef: - fieldPath: spec.nodeName - # Set Felix endpoint to host default action to ACCEPT. - - name: FELIX_DEFAULTENDPOINTTOHOSTACTION - value: "ACCEPT" - # The default IPv4 pool to create on startup if none exists. Pod IPs will be - # chosen from this range. Changing this value after installation will have - # no effect. This should fall within '--cluster-cidr'. - - name: CALICO_IPV4POOL_CIDR - value: "192.168.0.0/16" - - name: CALICO_IPV4POOL_IPIP - value: "Always" - # Disable IPv6 on Kubernetes. - - name: FELIX_IPV6SUPPORT - value: "false" - # Set MTU for tunnel device used if ipip is enabled - - name: FELIX_IPINIPMTU - value: "1440" - # Set Felix logging to "info" - - name: FELIX_LOGSEVERITYSCREEN - value: "info" - # Auto-detect the BGP IP address. - - name: IP - value: "autodetect" - - name: FELIX_HEALTHENABLED - value: "true" - securityContext: - privileged: true - resources: - requests: - cpu: 250m - livenessProbe: - httpGet: - path: /liveness - port: 9099 - periodSeconds: 10 - initialDelaySeconds: 10 - failureThreshold: 6 - readinessProbe: - httpGet: - path: /readiness - port: 9099 - periodSeconds: 10 - volumeMounts: - - mountPath: /lib/modules - name: lib-modules - readOnly: true - - mountPath: /var/run/calico - name: var-run-calico - readOnly: false - # This container installs the Calico CNI binaries - # and CNI network config file on each node. - - name: install-cni - image: quay.io/calico/cni:v2.0.5 - command: ["/install-cni.sh"] - env: - # Name of the CNI config file to create. - - name: CNI_CONF_NAME - value: "10-calico.conflist" - # The location of the Calico etcd cluster. - - name: ETCD_ENDPOINTS - valueFrom: - configMapKeyRef: - name: calico-config - key: etcd_endpoints - # The CNI network config to install on each node. - - name: CNI_NETWORK_CONFIG - valueFrom: - configMapKeyRef: - name: calico-config - key: cni_network_config - volumeMounts: - - mountPath: /host/opt/cni/bin - name: cni-bin-dir - - mountPath: /host/etc/cni/net.d - name: cni-net-dir - volumes: - # Used by calico/node. - - name: lib-modules - hostPath: - path: /lib/modules - - name: var-run-calico - hostPath: - path: /var/run/calico - # Used to install CNI. - - name: cni-bin-dir - hostPath: - path: /opt/cni/bin - - name: cni-net-dir - hostPath: - path: /etc/cni/net.d - ---- - -# This manifest deploys the Calico Kubernetes controllers. -# See https://github.com/projectcalico/kube-controllers -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: calico-kube-controllers - namespace: kube-system - labels: - k8s-app: calico-kube-controllers -spec: - # The controllers can only have a single active instance. - replicas: 1 - strategy: - type: Recreate - template: - metadata: - name: calico-kube-controllers - namespace: kube-system - labels: - k8s-app: calico-kube-controllers - annotations: - # Mark this pod as a critical add-on; when enabled, the critical add-on scheduler - # reserves resources for critical add-on pods so that they can be rescheduled after - # a failure. This annotation works in tandem with the toleration below. - scheduler.alpha.kubernetes.io/critical-pod: '' - spec: - # The controllers must run in the host network namespace so that - # it isn't governed by policy that would prevent it from working. - hostNetwork: true - tolerations: - # This taint is set by all kubelets running '--cloud-provider=external' - # so we should tolerate it to schedule the calico pods - - key: node.cloudprovider.kubernetes.io/uninitialized - value: "true" - effect: NoSchedule - - key: node-role.kubernetes.io/master - effect: NoSchedule - # Allow this pod to be rescheduled while the node is in "critical add-ons only" mode. - # This, along with the annotation above marks this pod as a critical add-on. - - key: CriticalAddonsOnly - operator: Exists - serviceAccountName: calico-kube-controllers - containers: - - name: calico-kube-controllers - image: quay.io/calico/kube-controllers:v2.0.4 - env: - # The location of the Calico etcd cluster. - - name: ETCD_ENDPOINTS - valueFrom: - configMapKeyRef: - name: calico-config - key: etcd_endpoints - # Choose which controllers to run. - - name: ENABLED_CONTROLLERS - value: policy,profile,workloadendpoint,node - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: calico-cni-plugin -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: calico-cni-plugin -subjects: -- kind: ServiceAccount - name: calico-cni-plugin - namespace: kube-system - ---- - -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1beta1 -metadata: - name: calico-cni-plugin -rules: - - apiGroups: [""] - resources: - - pods - - nodes - verbs: - - get - ---- - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: calico-cni-plugin - namespace: kube-system - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: calico-kube-controllers -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: calico-kube-controllers -subjects: -- kind: ServiceAccount - name: calico-kube-controllers - namespace: kube-system - ---- - -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1beta1 -metadata: - name: calico-kube-controllers -rules: - - apiGroups: - - "" - - extensions - resources: - - pods - - namespaces - - networkpolicies - - nodes - verbs: - - watch - - list - ---- - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: calico-kube-controllers - namespace: kube-system -EOF - -kubectl apply --kubeconfig /etc/kubernetes/admin.conf -f /tmp/calico.yaml - -for tries in $(seq 1 60); do - kubectl --kubeconfig /etc/kubernetes/kubelet.conf annotate --overwrite node $(hostname) machine=${MACHINE} && break - sleep 1 -done - -{{- end }} {{/* end configure */}} -` diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/BUILD.bazel deleted file mode 100644 index 6e0fddcfb5e..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig", - importpath = "sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/doc.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/doc.go deleted file mode 100644 index 9d234a8fae8..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/machinecontroller/cloud/vsphere/vsphereproviderconfig -// +k8s:openapi-gen=true -// +k8s:defaulter-gen=TypeMeta - -package vsphereproviderconfig diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/register.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/register.go deleted file mode 100644 index e519c6a5937..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/register.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package vsphereproviderconfig - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "vsphereproviderconfig" - -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -var ( - SchemeBuilder runtime.SchemeBuilder - AddToScheme = SchemeBuilder.AddToScheme - localSchemeBuilder = &SchemeBuilder -) - -func init() { - localSchemeBuilder.Register(addKnownTypes) -} - -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &VsphereClusterProviderConfig{}, - &VsphereMachineProviderConfig{}, - ) - return nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/types.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/types.go deleted file mode 100644 index b63f6f4fac9..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/types.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package vsphereproviderconfig - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VsphereMachineProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - // Name of the machine that's registered in the NamedMachines ConfigMap. - VsphereMachine string `json:"vsphereMachine"` - // List of variables for the chosen machine. - MachineVariables map[string]string `json:"machineVariables"` -} - -// +k8s:deepcopy-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VsphereClusterProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - VsphereUser string `json:"vsphereUser"` - VspherePassword string `json:"vspherePassword"` - VsphereServer string `json:"vsphereServer"` -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/BUILD.bazel deleted file mode 100644 index 5f40db3beb1..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1", - importpath = "sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/doc.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/doc.go deleted file mode 100644 index 1bd594706e1..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/machinecontroller/cloud/vsphere/vsphereproviderconfig -// +k8s:openapi-gen=true -// +k8s:defaulter-gen=TypeMeta - -package v1alpha1 diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/register.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/register.go deleted file mode 100644 index 0a98b4baa7e..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/runtime/serializer" - "sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig" -) - -const GroupName = "vsphereproviderconfig" - -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - localSchemeBuilder.Register(addKnownTypes) -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &VsphereClusterProviderConfig{}, - &VsphereMachineProviderConfig{}, - ) - return nil -} - -func NewSchemeAndCodecs() (*runtime.Scheme, *serializer.CodecFactory, error) { - scheme := runtime.NewScheme() - if err := AddToScheme(scheme); err != nil { - return nil, nil, err - } - if err := vsphereproviderconfig.AddToScheme(scheme); err != nil { - return nil, nil, err - } - codecs := serializer.NewCodecFactory(scheme) - return scheme, &codecs, nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/types.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/types.go deleted file mode 100644 index 6e7e39bf7dd..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/types.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VsphereMachineProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - // Name of the machine that's registered in the NamedMachines ConfigMap. - VsphereMachine string `json:"vsphereMachine"` - // List of variables for the chosen machine. - MachineVariables map[string]string `json:"machineVariables"` -} - -// +k8s:deepcopy-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VsphereClusterProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - VsphereUser string `json:"vsphereUser"` - VspherePassword string `json:"vspherePassword"` - VsphereServer string `json:"vsphereServer"` -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 9e1fd268704..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,84 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by deepcopy-gen. Do not edit it manually! - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VsphereClusterProviderConfig) DeepCopyInto(out *VsphereClusterProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VsphereClusterProviderConfig. -func (in *VsphereClusterProviderConfig) DeepCopy() *VsphereClusterProviderConfig { - if in == nil { - return nil - } - out := new(VsphereClusterProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VsphereClusterProviderConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VsphereMachineProviderConfig) DeepCopyInto(out *VsphereMachineProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.MachineVariables != nil { - in, out := &in.MachineVariables, &out.MachineVariables - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VsphereMachineProviderConfig. -func (in *VsphereMachineProviderConfig) DeepCopy() *VsphereMachineProviderConfig { - if in == nil { - return nil - } - out := new(VsphereMachineProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VsphereMachineProviderConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/zz_generated.deepcopy.go deleted file mode 100644 index f474001e67a..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/zz_generated.deepcopy.go +++ /dev/null @@ -1,84 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by deepcopy-gen. Do not edit it manually! - -package vsphereproviderconfig - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VsphereClusterProviderConfig) DeepCopyInto(out *VsphereClusterProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VsphereClusterProviderConfig. -func (in *VsphereClusterProviderConfig) DeepCopy() *VsphereClusterProviderConfig { - if in == nil { - return nil - } - out := new(VsphereClusterProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VsphereClusterProviderConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VsphereMachineProviderConfig) DeepCopyInto(out *VsphereMachineProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.MachineVariables != nil { - in, out := &in.MachineVariables, &out.MachineVariables - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VsphereMachineProviderConfig. -func (in *VsphereMachineProviderConfig) DeepCopy() *VsphereMachineProviderConfig { - if in == nil { - return nil - } - out := new(VsphereMachineProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VsphereMachineProviderConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/.gitignore b/vendor/sigs.k8s.io/cluster-api/clusterctl/.gitignore deleted file mode 100644 index b925ac9b015..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -clusterctl -*kubeconfig \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/clusterctl/BUILD.bazel deleted file mode 100644 index d52187106bc..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/clusterctl", - importpath = "sigs.k8s.io/cluster-api/clusterctl", - visibility = ["//visibility:private"], - deps = ["//vendor/sigs.k8s.io/cluster-api/clusterctl/cmd:go_default_library"], -) - -go_binary( - name = "clusterctl", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/CONTRIBUTING.md b/vendor/sigs.k8s.io/cluster-api/clusterctl/CONTRIBUTING.md deleted file mode 100644 index 65c1edcad21..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing Guidelines - -1. Follow the [Getting Started]((https://github.com/kubernetes-sigs/cluster-api/blob/master/cluster-api/clusterctl/README.md)) steps to create a cluster. - -# Development - -Before submitting an PR you should run the unit and integration tests. Instructions for doing so are given in the [Testing](#Testing) section. - -## Testing - -### Unit Tests -When changing this application, you will often end up modifying other packages above this folder in the project tree. You -should run all the unit tests in the repository. To run the unit tests, run the following command from the root, -`cluster-api`, folder of the repo. - -``` -go test ./... -``` - -### Integration Tests - -To run the integration tests, run the following command from this folder. The integration tests are for sanity checking -that clusterctl's basic functionality is working. -``` -go test -tags=integration -v -``` \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/README.md b/vendor/sigs.k8s.io/cluster-api/clusterctl/README.md deleted file mode 100644 index db7f2709380..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# clusterctl - -`clusterctl` is the SIG-cluster-lifecycle sponsored tool that implements the Cluster API. - -Read the [experience doc here](https://docs.google.com/document/d/1-sYb3EdkRga49nULH1kSwuQFf1o6GvAw_POrsNo5d8c/edit#). - -## Getting Started - -### Prerequisites - -1. Install [minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) -2. Install a driver. For Linux, we recommend kvm. For MacOS, we recommend VirtualBox. -2. Build the `clusterctl` tool - -```bash -$ git clone https://github.com/kubernetes-sigs/cluster-api.git $GOPATH/src/sigs.k8s.io/cluster-api -$ cd $GOPATH/src/sigs.k8s.io/cluster-api/clusterctl/ -$ go build -``` - -### Limitations -TBD - -### Creating a cluster -1. Create a `cluster.yaml`, `machines.yaml` and `provider-components.yaml` files configured for your cluster. See the provider specific templates and generation tools at `$GOPATH/src/sigs.k8s.io/cluster-api/clusterctl/examples/`. -2. Create a cluster - -```shell -clusterctl create cluster --provider [google/vsphere] -c cluster.yaml -m machines.yaml -p provider-components.yaml -``` -Additional advanced flags can be found via help - -```shell -clusterctl create cluster --help -``` - -### Interacting with your cluster - -Once you have created a cluster, you can interact with the cluster and machine -resources using kubectl: - -``` -$ kubectl --kubeconfig kubeconfig get clusters -$ kubectl --kubeconfig kubeconfig get machines -$ kubectl --kubeconfig kubeconfig get machines -o yaml -``` - -#### Scaling your cluster - -**NOT YET SUPPORTED!** - -#### Upgrading your cluster - -**NOT YET SUPPORTED!** - -#### Node repair - -**NOT YET SUPPORTED!** - -### Deleting a cluster - -**NOT YET SUPPORTED!** - -clusterctl does not yet support deletion, please see provider specific deletion guides: - -- [google](../cloud/google/README.md#Cluster-Deletion) - -## Contributing - -If you are interested in adding to this project, see the [contributing guide](CONTRIBUTING.md) for information on how you can get involved. diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/BUILD.bazel deleted file mode 100644 index 3af6a165301..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/BUILD.bazel +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "clusterapiserver.go", - "clusterapiservertemplate.go", - "clusterclient.go", - "clusterclientfactory.go", - "clusterdeployer.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer", - importpath = "sigs.k8s.io/cluster-api/clusterctl/clusterdeployer", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - "//vendor/k8s.io/client-go/util/cert/triple:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "clusterclient_test.go", - "clusterdeployer_test.go", - ], - embed = [":go_default_library"], - deps = [ - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterapiserver.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterapiserver.go deleted file mode 100644 index 25997097eea..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterapiserver.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clusterdeployer - -import ( - "bytes" - "encoding/base64" - "fmt" - "os" - "text/template" - - "github.com/golang/glog" - corev1 "k8s.io/api/core/v1" - "k8s.io/client-go/util/cert" - "k8s.io/client-go/util/cert/triple" -) - -var apiServerImage = "gcr.io/k8s-cluster-api/cluster-apiserver:0.0.5" - -func init() { - if img, ok := os.LookupEnv("CLUSTER_API_SERVER_IMAGE"); ok { - apiServerImage = img - } -} - -type caCertParams struct { - caBundle string - tlsCrt string - tlsKey string -} - -func getApiServerCerts() (*caCertParams, error) { - const name = "clusterapi" - const namespace = corev1.NamespaceDefault - - caKeyPair, err := triple.NewCA(fmt.Sprintf("%s-certificate-authority", name)) - if err != nil { - return nil, fmt.Errorf("failed to create root-ca: %v", err) - } - - apiServerKeyPair, err := triple.NewServerKeyPair( - caKeyPair, - fmt.Sprintf("%s.%s.svc", name, namespace), - name, - namespace, - "cluster.local", - []string{}, - []string{}) - if err != nil { - return nil, fmt.Errorf("failed to create apiserver key pair: %v", err) - } - - certParams := &caCertParams{ - caBundle: base64.StdEncoding.EncodeToString(cert.EncodeCertPEM(caKeyPair.Cert)), - tlsKey: base64.StdEncoding.EncodeToString(cert.EncodePrivateKeyPEM(apiServerKeyPair.Key)), - tlsCrt: base64.StdEncoding.EncodeToString(cert.EncodeCertPEM(apiServerKeyPair.Cert)), - } - - return certParams, nil -} - -func getApiServerYaml() (string, error) { - tmpl, err := template.New("config").Parse(ClusterAPIAPIServerConfigTemplate) - if err != nil { - return "", err - } - - certParms, err := getApiServerCerts() - if err != nil { - glog.Errorf("Error: %v", err) - return "", err - } - - type params struct { - Token string - APIServerImage string - ControllerManagerImage string - MachineControllerImage string - CABundle string - TLSCrt string - TLSKey string - } - - var tmplBuf bytes.Buffer - err = tmpl.Execute(&tmplBuf, params{ - APIServerImage: apiServerImage, - CABundle: certParms.caBundle, - TLSCrt: certParms.tlsCrt, - TLSKey: certParms.tlsKey, - }) - if err != nil { - return "", err - } - - return string(tmplBuf.Bytes()), nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterapiservertemplate.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterapiservertemplate.go deleted file mode 100644 index 3574b1f84a6..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterapiservertemplate.go +++ /dev/null @@ -1,241 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clusterdeployer - -const ClusterAPIAPIServerConfigTemplate = ` -apiVersion: apiregistration.k8s.io/v1beta1 -kind: APIService -metadata: - name: v1alpha1.cluster.k8s.io - labels: - api: clusterapi - apiserver: "true" -spec: - version: v1alpha1 - group: cluster.k8s.io - groupPriorityMinimum: 2000 - priority: 200 - service: - name: clusterapi - namespace: default - versionPriority: 10 - caBundle: {{ .CABundle }} ---- -apiVersion: v1 -kind: Service -metadata: - name: clusterapi - namespace: default - labels: - api: clusterapi - apiserver: "true" -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 443 - selector: - api: clusterapi - apiserver: "true" ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: clusterapi-apiserver - namespace: default - labels: - api: clusterapi - apiserver: "true" -spec: - replicas: 1 - template: - metadata: - labels: - api: clusterapi - apiserver: "true" - spec: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - key: CriticalAddonsOnly - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/notReady - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/unreachable - operator: Exists - containers: - - name: apiserver - image: {{ .APIServerImage }} - volumeMounts: - - name: cluster-apiserver-certs - mountPath: /apiserver.local.config/certificates - readOnly: true - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - command: - - "./apiserver" - args: - - "--etcd-servers=http://etcd-clusterapi-svc:2379" - - "--tls-cert-file=/apiserver.local.config/certificates/tls.crt" - - "--tls-private-key-file=/apiserver.local.config/certificates/tls.key" - - "--audit-log-path=-" - - "--audit-log-maxage=0" - - "--audit-log-maxbackup=0" - - "--authorization-kubeconfig=/etc/kubernetes/admin.conf" - - "--kubeconfig=/etc/kubernetes/admin.conf" - resources: - requests: - cpu: 100m - memory: 50Mi - limits: - cpu: 300m - memory: 200Mi - volumes: - - name: cluster-apiserver-certs - secret: - secretName: cluster-apiserver-certs - - name: config - hostPath: - path: /etc/kubernetes - - name: certs - hostPath: - path: /etc/ssl/certs ---- -apiVersion: rbac.authorization.k8s.io/ -kind: RoleBinding -metadata: - name: clusterapi - namespace: kube-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: extension-apiserver-authentication-reader -subjects: -- kind: ServiceAccount - name: default - namespace: default ---- -apiVersion: apps/v1beta1 -kind: StatefulSet -metadata: - name: etcd-clusterapi - namespace: default -spec: - serviceName: "etcd" - replicas: 1 - template: - metadata: - labels: - app: etcd - spec: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - key: CriticalAddonsOnly - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/notReady - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/unreachable - operator: Exists - volumes: - - hostPath: - path: /var/lib/etcd2 - type: DirectoryOrCreate - name: etcd-data-dir - terminationGracePeriodSeconds: 10 - containers: - - name: etcd - image: quay.io/coreos/etcd:latest - imagePullPolicy: Always - resources: - requests: - cpu: 100m - memory: 50Mi - limits: - cpu: 200m - memory: 300Mi - env: - - name: ETCD_DATA_DIR - value: /etcd-data-dir - command: - - /usr/local/bin/etcd - - --listen-client-urls - - http://0.0.0.0:2379 - - --advertise-client-urls - - http://localhost:2379 - ports: - - containerPort: 2379 - volumeMounts: - - name: etcd-data-dir - mountPath: /etcd-data-dir - readinessProbe: - httpGet: - port: 2379 - path: /health - failureThreshold: 1 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 - livenessProbe: - httpGet: - port: 2379 - path: /health - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 ---- -apiVersion: v1 -kind: Service -metadata: - name: etcd-clusterapi-svc - namespace: default - labels: - app: etcd -spec: - ports: - - port: 2379 - name: etcd - targetPort: 2379 - selector: - app: etcd ---- -apiVersion: v1 -kind: Secret -type: kubernetes.io/tls -metadata: - name: cluster-apiserver-certs - namespace: default - labels: - api: clusterapi - apiserver: "true" -data: - tls.crt: {{ .TLSCrt }} - tls.key: {{ .TLSKey }} -` diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclient.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclient.go deleted file mode 100644 index 1f3b329906d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclient.go +++ /dev/null @@ -1,245 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package clusterdeployer - -import ( - "io/ioutil" - "os" - "os/exec" - - "fmt" - "github.com/golang/glog" - apiv1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/util" - "strings" - "time" -) - -const ( - ApiServerPort = 443 - RetryIntervalKubectlApply = 5 * time.Second - RetryIntervalResourceReady = 5 * time.Second - TimeoutKubectlApply = 5 * time.Minute - TimeoutResourceReady = 5 * time.Minute - TimeoutMachineReady = 10 * time.Minute -) - -type clusterClient struct { - clientSet clientset.Interface - kubeconfigFile string - closeFn func() error -} - -func NewClusterClient(kubeconfig string) (*clusterClient, error) { - f, err := createTempFile(kubeconfig) - if err != nil { - return nil, err - } - c, err := NewClusterClientFromFile(f) - if err != nil { - return nil, err - } - c.closeFn = c.removeKubeconfigFile - return c, nil -} - -func (c *clusterClient) removeKubeconfigFile() error { - return os.Remove(c.kubeconfigFile) -} - -func NewClusterClientFromFile(kubeconfigFile string) (*clusterClient, error) { - c, err := util.NewClientSet(kubeconfigFile) - if err != nil { - return nil, err - } - - return &clusterClient{ - kubeconfigFile: kubeconfigFile, - clientSet: c, - }, nil -} - -// Frees resources associated with the cluster client -func (c *clusterClient) Close() error { - if c.closeFn != nil { - return c.closeFn() - } - return nil -} - -func (c *clusterClient) Apply(manifest string) error { - return c.waitForKubectlApply(manifest) -} - -func (c *clusterClient) GetClusterObjects() ([]*clusterv1.Cluster, error) { - clusters := []*clusterv1.Cluster{} - // TODO: Iterate over all namespaces where we could have Cluster API Objects https://github.com/kubernetes-sigs/cluster-api/issues/252 - clusterlist, err := c.clientSet.ClusterV1alpha1().Clusters(apiv1.NamespaceDefault).List(metav1.ListOptions{}) - if err != nil { - return nil, err - } - - for i := 0; i < len(clusterlist.Items); i++ { - clusters = append(clusters, &clusterlist.Items[i]) - } - return clusters, nil -} - -func (c *clusterClient) GetMachineObjects() ([]*clusterv1.Machine, error) { - // TODO: Iterate over all namespaces where we could have Cluster API Objects https://github.com/kubernetes-sigs/cluster-api/issues/252 - machines := []*clusterv1.Machine{} - machineslist, err := c.clientSet.ClusterV1alpha1().Machines(apiv1.NamespaceDefault).List(metav1.ListOptions{}) - if err != nil { - return nil, err - } - - for i := 0; i < len(machineslist.Items); i++ { - machines = append(machines, &machineslist.Items[i]) - } - return machines, nil -} - -func (c *clusterClient) CreateClusterObject(cluster *clusterv1.Cluster) error { - // TODO: Support specific namespaces https://github.com/kubernetes-sigs/cluster-api/issues/252 - _, err := c.clientSet.ClusterV1alpha1().Clusters(apiv1.NamespaceDefault).Create(cluster) - return err -} - -func (c *clusterClient) CreateMachineObjects(machines []*clusterv1.Machine) error { - // TODO: Support specific namespaces https://github.com/kubernetes-sigs/cluster-api/issues/252 - for _, machine := range machines { - // TODO: Run in parallel https://github.com/kubernetes-sigs/cluster-api/issues/258 - createdMachine, err := c.clientSet.ClusterV1alpha1().Machines(apiv1.NamespaceDefault).Create(machine) - if err != nil { - return err - } - err = waitForMachineReady(c.clientSet, createdMachine) - if err != nil { - return err - } - } - return nil -} - -func (c *clusterClient) UpdateClusterObjectEndpoint(masterIP string) error { - clusters, err := c.GetClusterObjects() - if err != nil { - return err - } - if len(clusters) != 1 { - // TODO: Do not assume default namespace nor single cluster https://github.com/kubernetes-sigs/cluster-api/issues/252 - return fmt.Errorf("More than the one expected cluster found %v", clusters) - } - cluster := clusters[0] - cluster.Status.APIEndpoints = append(cluster.Status.APIEndpoints, - clusterv1.APIEndpoint{ - Host: masterIP, - Port: ApiServerPort, - }) - _, err = c.clientSet.ClusterV1alpha1().Clusters(apiv1.NamespaceDefault).UpdateStatus(cluster) - return err -} - -func (c *clusterClient) WaitForClusterV1alpha1Ready() error { - return waitForClusterResourceReady(c.clientSet) -} - -func (c *clusterClient) kubectlApply(manifest string) error { - r := strings.NewReader(manifest) - cmd := exec.Command("kubectl", "apply", "--kubeconfig", c.kubeconfigFile, "-f", "-") - cmd.Stdin = r - - out, err := cmd.CombinedOutput() - if err == nil { - return nil - } else { - return fmt.Errorf("couldn't kubectl apply: %v, output: %s", err, string(out)) - } -} - -func (c *clusterClient) waitForKubectlApply(manifest string) error { - err := util.Poll(RetryIntervalKubectlApply, TimeoutKubectlApply, func() (bool, error) { - glog.V(2).Infof("Waiting for kubectl apply...") - err := c.kubectlApply(manifest) - if err != nil { - if strings.Contains(err.Error(), "refused") { - // Connection was refused, probably because the API server is not ready yet. - glog.V(4).Infof("Waiting for kubectl apply... server not yet available: %v", err) - return false, nil - } - if strings.Contains(err.Error(), "unable to recognize") { - glog.V(4).Infof("Waiting for kubectl apply... api not yet available: %v", err) - return false, nil - } - if strings.Contains(err.Error(), "namespaces \"default\" not found") { - glog.V(4).Infof("Waiting for kubectl apply... default namespace not yet available: %v", err) - return false, nil - } - return false, err - } - - return true, nil - }) - - return err -} - -func waitForClusterResourceReady(cs clientset.Interface) error { - err := util.Poll(RetryIntervalResourceReady, TimeoutResourceReady, func() (bool, error) { - glog.V(2).Info("Waiting for Cluster v1alpha resources to become available...") - _, err := cs.Discovery().ServerResourcesForGroupVersion("cluster.k8s.io/v1alpha1") - if err == nil { - return true, nil - } - return false, nil - }) - - return err -} - -func waitForMachineReady(cs clientset.Interface, machine *clusterv1.Machine) error { - err := util.Poll(RetryIntervalResourceReady, TimeoutMachineReady, func() (bool, error) { - glog.V(2).Infof("Waiting for Machine %v to become ready...", machine.Name) - m, err := cs.ClusterV1alpha1().Machines(apiv1.NamespaceDefault).Get(machine.Name, metav1.GetOptions{}) - if err != nil { - return false, nil - } - - // TODO: update once machine controllers have a way to indicate a machine has been provisoned. https://github.com/kubernetes-sigs/cluster-api/issues/253 - // Seeing a node cannot be purely relied upon because the provisioned master will not be registering with - // the stack that provisions it. - ready := m.Status.NodeRef != nil || len(m.Annotations) > 0 - return ready, nil - }) - - return err -} - -func createTempFile(contents string) (string, error) { - f, err := ioutil.TempFile("", "") - if err != nil { - return "", err - } - defer f.Close() - _, err = f.WriteString(contents) - if err != nil { - return "", err - } - return f.Name(), nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclient_test.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclient_test.go deleted file mode 100644 index 49fc2627da1..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclient_test.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package clusterdeployer - -// TODO: Test clusterclient. To do this properly, etcd and kubectl need to be on the box running the test. -// Placeholder till the presubmit images have the needed binaries. -// https://github.com/kubernetes-sigs/cluster-api/issues/254 diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclientfactory.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclientfactory.go deleted file mode 100644 index 2ea9b55d35b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterclientfactory.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package clusterdeployer - -type clusterClientFactory struct { -} - -func NewClusterClientFactory() ClusterClientFactory { - return &clusterClientFactory{} -} - -func (f *clusterClientFactory) ClusterClient(kubeconfig string) (ClusterClient, error) { - return NewClusterClient(kubeconfig) -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterdeployer.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterdeployer.go deleted file mode 100644 index 5b67631a07d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterdeployer.go +++ /dev/null @@ -1,405 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package clusterdeployer - -import ( - "fmt" - - "github.com/golang/glog" - "io/ioutil" - "os" - clustercommon "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" - "time" -) - -// Provider specific logic. Logic here should eventually be optional & additive. -type ProviderDeployer interface { - // TODO: This requirement can be removed once after: https://github.com/kubernetes-sigs/cluster-api/issues/158 - GetIP(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error) - // TODO: This requirement can be removed after: https://github.com/kubernetes-sigs/cluster-api/issues/160 - GetKubeConfig(cluster *clusterv1.Cluster, master *clusterv1.Machine) (string, error) -} - -// Can provision a kubernetes cluster -type ClusterProvisioner interface { - Create() error - Delete() error - GetKubeconfig() (string, error) -} - -// Provides interaction with a cluster -type ClusterClient interface { - Apply(string) error - WaitForClusterV1alpha1Ready() error - GetClusterObjects() ([]*clusterv1.Cluster, error) - GetMachineObjects() ([]*clusterv1.Machine, error) - CreateClusterObject(*clusterv1.Cluster) error - CreateMachineObjects([]*clusterv1.Machine) error - UpdateClusterObjectEndpoint(string) error - Close() error -} - -// Can create cluster clients -type ClusterClientFactory interface { - ClusterClient(string) (ClusterClient, error) -} - -type ClusterDeployer struct { - externalProvisioner ClusterProvisioner - clientFactory ClusterClientFactory - provider ProviderDeployer - providerComponents string - kubeconfigOutput string - cleanupExternalCluster bool -} - -func New( - externalProvisioner ClusterProvisioner, - clientFactory ClusterClientFactory, - provider ProviderDeployer, - providerComponents string, - kubeconfigOutput string, - cleanupExternalCluster bool) *ClusterDeployer { - return &ClusterDeployer{ - externalProvisioner: externalProvisioner, - clientFactory: clientFactory, - provider: provider, - providerComponents: providerComponents, - kubeconfigOutput: kubeconfigOutput, - cleanupExternalCluster: cleanupExternalCluster, - } -} - -// Creates the a cluster from the provided cluster definition and machine list. -func (d *ClusterDeployer) Create(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error { - master, nodes, err := splitMachineRoles(machines) - if err != nil { - return fmt.Errorf("unable to seperate master machines from node machines: %v", err) - } - - glog.Info("Creating external cluster") - externalClient, err := d.createExternalCluster() - if err != nil { - return fmt.Errorf("could not create external client: %v", err) - } - if d.cleanupExternalCluster { - glog.Info("Cleaning up external cluster.") - defer d.externalProvisioner.Delete() - } - defer func() { - err := externalClient.Close() - if err != nil { - glog.Errorf("Could not close external client: %v", err) - } - }() - - glog.Info("Applying Cluster API stack to external cluster") - err = d.applyClusterAPIStack(externalClient) - if err != nil { - return fmt.Errorf("unable to apply cluster api stack to external cluster: %v", err) - } - - glog.Info("Provisioning internal cluster via external cluster") - - glog.Infof("Creating cluster object %v on external cluster", cluster.Name) - err = externalClient.CreateClusterObject(cluster) - if err != nil { - return fmt.Errorf("unable to create cluster object: %v", err) - } - - glog.Infof("Creating master %v", master.Name) - err = externalClient.CreateMachineObjects([]*clusterv1.Machine{master}) - if err != nil { - return fmt.Errorf("unable to create master machine: %v", err) - } - - glog.Infof("Updating external cluster object with master (%s) endpoint", master.Name) - err = d.updateClusterEndpoint(externalClient) - if err != nil { - return fmt.Errorf("unable to update external cluster endpoint: %v", err) - } - - glog.Info("Creating internal cluster") - internalClient, err := d.createInternalCluster(externalClient) - if err != nil { - return fmt.Errorf("unable to create internal cluster client: %v", err) - } - defer func() { - err := internalClient.Close() - if err != nil { - glog.Errorf("Could not close internal client: %v", err) - } - }() - - glog.Info("Applying Cluster API stack to internal cluster") - err = d.applyClusterAPIStackWithPivoting(internalClient, externalClient) - if err != nil { - return fmt.Errorf("unable to apply cluster api stack to internal cluster: %v", err) - } - - // For some reason, endpoint doesn't get updated in external cluster sometimes. So we - // update the internal cluster endpoint as well to be sure. - glog.Infof("Updating internal cluster object with master (%s) endpoint", master.Name) - err = d.updateClusterEndpoint(internalClient) - if err != nil { - return fmt.Errorf("unable to update internal cluster endpoint: %v", err) - } - - glog.Info("Creating node machines in internal cluster.") - err = internalClient.CreateMachineObjects(nodes) - if err != nil { - return fmt.Errorf("unable to create node machines: %v", err) - } - - glog.Infof("Done provisioning cluster. You can now access your cluster with kubectl --kubeconfig %v", d.kubeconfigOutput) - - return nil -} - -func (d *ClusterDeployer) createExternalCluster() (ClusterClient, error) { - var err error - if err = d.externalProvisioner.Create(); err != nil { - return nil, fmt.Errorf("could not create external control plane: %v", err) - } - if d.cleanupExternalCluster { - defer func() { - if err != nil { - glog.Info("Cleaning up external cluster.") - d.externalProvisioner.Delete() - } - }() - } - externalKubeconfig, err := d.externalProvisioner.GetKubeconfig() - if err != nil { - return nil, fmt.Errorf("unable to get external cluster kubeconfig: %v", err) - } - externalClient, err := d.clientFactory.ClusterClient(externalKubeconfig) - if err != nil { - return nil, fmt.Errorf("unable to create external client: %v", err) - } - return externalClient, nil -} - -func (d *ClusterDeployer) createInternalCluster(externalClient ClusterClient) (ClusterClient, error) { - cluster, master, _, err := getClusterAPIObjects(externalClient) - if err != nil { - return nil, err - } - - glog.V(1).Info("Getting internal cluster kubeconfig.") - internalKubeconfig, err := waitForKubeconfigReady(d.provider, cluster, master) - if err != nil { - return nil, fmt.Errorf("unable to get internal cluster kubeconfig: %v", err) - } - - err = d.writeKubeconfig(internalKubeconfig) - if err != nil { - return nil, err - } - - internalClient, err := d.clientFactory.ClusterClient(internalKubeconfig) - if err != nil { - return nil, fmt.Errorf("unable to create internal cluster client: %v", err) - } - return internalClient, nil -} - -func (d *ClusterDeployer) updateClusterEndpoint(client ClusterClient) error { - // Update cluster endpoint. Needed till this logic moves into cluster controller. - // TODO: https://github.com/kubernetes-sigs/cluster-api/issues/158 - // Fetch fresh objects. - cluster, master, _, err := getClusterAPIObjects(client) - if err != nil { - return err - } - masterIP, err := d.provider.GetIP(cluster, master) - if err != nil { - return fmt.Errorf("unable to get master IP: %v", err) - } - err = client.UpdateClusterObjectEndpoint(masterIP) - if err != nil { - return fmt.Errorf("unable to update cluster endpoint: %v", err) - } - return nil -} - -func (d *ClusterDeployer) applyClusterAPIStack(client ClusterClient) error { - glog.Info("Applying Cluster API APIServer") - err := d.applyClusterAPIApiserver(client) - if err != nil { - return fmt.Errorf("unable to apply cluster apiserver: %v", err) - } - - glog.Info("Applying Cluster API Provider Components") - err = d.applyClusterAPIControllers(client) - if err != nil { - return fmt.Errorf("unable to apply cluster api controllers: %v", err) - } - return nil -} - -func (d *ClusterDeployer) applyClusterAPIStackWithPivoting(client ClusterClient, source ClusterClient) error { - glog.Info("Applying Cluster API APIServer") - err := d.applyClusterAPIApiserver(client) - if err != nil { - return fmt.Errorf("unable to apply cluster api apiserver: %v", err) - } - - glog.Info("Pivoting Cluster API objects from external to internal cluster.") - err = pivot(source, client) - if err != nil { - return fmt.Errorf("unable to pivot cluster API objects: %v", err) - } - - glog.Info("Applying Cluster API Provider Components.") - err = d.applyClusterAPIControllers(client) - if err != nil { - return fmt.Errorf("unable to apply cluster api controllers: %v", err) - } - - return nil -} - -func (d *ClusterDeployer) applyClusterAPIApiserver(client ClusterClient) error { - yaml, err := getApiServerYaml() - if err != nil { - return fmt.Errorf("unable to generate apiserver yaml: %v", err) - } - - err = client.Apply(yaml) - if err != nil { - return fmt.Errorf("unable to apply apiserver yaml: %v", err) - } - return client.WaitForClusterV1alpha1Ready() -} - -func (d *ClusterDeployer) applyClusterAPIControllers(client ClusterClient) error { - return client.Apply(d.providerComponents) -} - -func (d *ClusterDeployer) writeKubeconfig(kubeconfig string) error { - const fileMode = 0666 - os.Remove(d.kubeconfigOutput) - return ioutil.WriteFile(d.kubeconfigOutput, []byte(kubeconfig), fileMode) -} - -func waitForKubeconfigReady(provider ProviderDeployer, cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error) { - kubeconfig := "" - err := util.Poll(5*time.Second, 10*time.Minute, func() (bool, error) { - glog.V(2).Infof("Waiting for kubeconfig on %v to become ready...", machine.Name) - k, err := provider.GetKubeConfig(cluster, machine) - if err != nil { - glog.V(4).Infof("error getting kubeconfig: %v", err) - return false, nil - } - if k == "" { - return false, nil - } - kubeconfig = k - return true, nil - }) - - return kubeconfig, err -} - -func pivot(from, to ClusterClient) error { - if err := from.WaitForClusterV1alpha1Ready(); err != nil { - return fmt.Errorf("Cluster v1aplpha1 resource not ready on source cluster.") - } - - if err := to.WaitForClusterV1alpha1Ready(); err != nil { - return fmt.Errorf("Cluster v1aplpha1 resource not ready on target cluster.") - } - - clusters, err := from.GetClusterObjects() - if err != nil { - return err - } - - for _, cluster := range clusters { - // New objects cannot have a specified resource version. Clear it out. - cluster.SetResourceVersion("") - err = to.CreateClusterObject(cluster) - if err != nil { - return err - } - glog.Infof("Moved Cluster '%s'", cluster.GetName()) - } - - machines, err := from.GetMachineObjects() - if err != nil { - return err - } - - for _, machine := range machines { - // New objects cannot have a specified resource version. Clear it out. - machine.SetResourceVersion("") - err = to.CreateMachineObjects([]*clusterv1.Machine{machine}) - if err != nil { - return err - } - glog.Infof("Moved Machine '%s'", machine.GetName()) - } - return nil -} - -func getClusterAPIObjects(client ClusterClient) (*clusterv1.Cluster, *clusterv1.Machine, []*clusterv1.Machine, error) { - machines, err := client.GetMachineObjects() - if err != nil { - return nil, nil, nil, fmt.Errorf("unable to fetch machines: %v", err) - } - clusters, err := client.GetClusterObjects() - if err != nil { - return nil, nil, nil, fmt.Errorf("unable to fetch clusters: %v", err) - } - if len(clusters) != 1 { - return nil, nil, nil, fmt.Errorf("fetched not exactly one cluster object. Count %v", len(clusters)) - } - cluster := clusters[0] - master, nodes, err := splitMachineRoles(machines) - if err != nil { - return nil, nil, nil, fmt.Errorf("unable to fetch master machine: %v", err) - } - return cluster, master, nodes, nil -} - -// Split the incoming machine set into the master and the non-masters -func splitMachineRoles(machines []*clusterv1.Machine) (*clusterv1.Machine, []*clusterv1.Machine, error) { - nodes := []*clusterv1.Machine{} - masters := []*clusterv1.Machine{} - for _, machine := range machines { - if containsMasterRole(machine.Spec.Roles) { - masters = append(masters, machine) - } else { - nodes = append(nodes, machine) - } - } - if len(masters) != 1 { - return nil, nil, fmt.Errorf("expected one master, got: %v", len(masters)) - } - return masters[0], nodes, nil -} - -func containsMasterRole(roles []clustercommon.MachineRole) bool { - for _, role := range roles { - if role == clustercommon.MasterRole { - return true - } - } - return false -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterdeployer_test.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterdeployer_test.go deleted file mode 100644 index cbdae4a12f5..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/clusterdeployer_test.go +++ /dev/null @@ -1,360 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package clusterdeployer_test - -import ( - "fmt" - "sigs.k8s.io/cluster-api/clusterctl/clusterdeployer" - "testing" - - "io/ioutil" - "os" - clustercommon "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -type testClusterProvisioner struct { - err error - clusterCreated bool - clusterExists bool - kubeconfig string -} - -func (p *testClusterProvisioner) Create() error { - if p.err != nil { - return p.err - } - p.clusterCreated = true - p.clusterExists = true - return nil -} - -func (p *testClusterProvisioner) Delete() error { - if p.err != nil { - return p.err - } - p.clusterExists = false - return nil -} - -func (p *testClusterProvisioner) GetKubeconfig() (string, error) { - return p.kubeconfig, p.err -} - -type testClusterClient struct { - ApplyErr error - WaitForClusterV1alpha1ReadyErr error - GetClusterObjectsErr error - GetMachineObjectsErr error - CreateClusterObjectErr error - CreateMachineObjectsErr error - UpdateClusterObjectEndpointErr error - CloseErr error - - clusters []*clusterv1.Cluster - machines []*clusterv1.Machine -} - -func (c *testClusterClient) Apply(string) error { - return c.ApplyErr -} - -func (c *testClusterClient) WaitForClusterV1alpha1Ready() error { - return c.WaitForClusterV1alpha1ReadyErr -} - -func (c *testClusterClient) GetClusterObjects() ([]*clusterv1.Cluster, error) { - return c.clusters, c.GetClusterObjectsErr -} - -func (c *testClusterClient) GetMachineObjects() ([]*clusterv1.Machine, error) { - return c.machines, c.GetMachineObjectsErr -} - -func (c *testClusterClient) CreateClusterObject(cluster *clusterv1.Cluster) error { - if c.CreateClusterObjectErr != nil { - return c.CreateClusterObjectErr - } - c.clusters = append(c.clusters, cluster) - return nil -} -func (c *testClusterClient) CreateMachineObjects(machines []*clusterv1.Machine) error { - if c.CreateMachineObjectsErr != nil { - return c.CreateMachineObjectsErr - } - c.machines = append(c.machines, machines...) - return nil -} -func (c *testClusterClient) UpdateClusterObjectEndpoint(string) error { - return c.UpdateClusterObjectEndpointErr -} -func (c *testClusterClient) Close() error { - return c.CloseErr -} - -type testClusterClientFactory struct { - ClusterClientErr error - clients map[string]*testClusterClient -} - -func newTestClusterClientFactory() *testClusterClientFactory { - return &testClusterClientFactory{ - clients: map[string]*testClusterClient{}, - } -} - -func (f *testClusterClientFactory) ClusterClient(kubeconfig string) (clusterdeployer.ClusterClient, error) { - if f.ClusterClientErr != nil { - return nil, f.ClusterClientErr - } - return f.clients[kubeconfig], nil -} - -type testProviderDeployer struct { - GetIPErr error - GetKubeConfigErr error - ip string - kubeconfig string -} - -func (d *testProviderDeployer) GetIP(_ *clusterv1.Cluster, _ *clusterv1.Machine) (string, error) { - return d.ip, d.GetIPErr -} -func (d *testProviderDeployer) GetKubeConfig(_ *clusterv1.Cluster, _ *clusterv1.Machine) (string, error) { - return d.kubeconfig, d.GetKubeConfigErr -} - -func TestCreate(t *testing.T) { - const externalKubeconfig = "external" - const internalKubeconfig = "internal" - - var testcases = []struct { - name string - provisionExternalErr error - factoryClusterClientErr error - externalClient *testClusterClient - internalClient *testClusterClient - cleanupExternal bool - expectErr bool - expectExternalExists bool - expectExternalCreated bool - expectedInternalClusters int - expectedInternalMachines int - }{ - { - name: "success", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{}, - cleanupExternal: true, - expectExternalExists: false, - expectExternalCreated: true, - expectedInternalClusters: 1, - expectedInternalMachines: 2, - }, - { - name: "success no cleaning external", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{}, - cleanupExternal: false, - expectExternalExists: true, - expectExternalCreated: true, - expectedInternalClusters: 1, - expectedInternalMachines: 2, - }, - { - name: "fail provision external cluster", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{}, - provisionExternalErr: fmt.Errorf("Test failure"), - expectErr: true, - }, - { - name: "fail create clients", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{}, - cleanupExternal: true, - expectExternalCreated: true, - factoryClusterClientErr: fmt.Errorf("Test failure"), - expectErr: true, - }, - { - name: "fail apply yaml to external cluster", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{ApplyErr: fmt.Errorf("Test failure")}, - cleanupExternal: true, - expectExternalCreated: true, - expectErr: true, - }, - { - name: "fail waiting for api ready on external cluster", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{WaitForClusterV1alpha1ReadyErr: fmt.Errorf("Test failure")}, - cleanupExternal: true, - expectExternalCreated: true, - expectErr: true, - }, - { - name: "fail getting external cluster objects", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{GetClusterObjectsErr: fmt.Errorf("Test failure")}, - cleanupExternal: true, - expectExternalCreated: true, - expectErr: true, - }, - { - name: "fail getting external machine objects", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{GetMachineObjectsErr: fmt.Errorf("Test failure")}, - cleanupExternal: true, - expectExternalCreated: true, - expectErr: true, - }, - { - name: "fail create cluster", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{CreateClusterObjectErr: fmt.Errorf("Test failure")}, - cleanupExternal: true, - expectExternalCreated: true, - expectErr: true, - }, - { - name: "fail create master", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{CreateMachineObjectsErr: fmt.Errorf("Test failure")}, - cleanupExternal: true, - expectExternalCreated: true, - expectErr: true, - }, - { - name: "fail update external cluster endpoint", - internalClient: &testClusterClient{}, - externalClient: &testClusterClient{UpdateClusterObjectEndpointErr: fmt.Errorf("Test failure")}, - cleanupExternal: true, - expectExternalCreated: true, - expectErr: true, - }, - { - name: "fail apply yaml to internal cluster", - internalClient: &testClusterClient{ApplyErr: fmt.Errorf("Test failure")}, - externalClient: &testClusterClient{}, - cleanupExternal: true, - expectExternalCreated: true, - expectErr: true, - }, - { - name: "fail wait for api ready on internal cluster", - internalClient: &testClusterClient{WaitForClusterV1alpha1ReadyErr: fmt.Errorf("Test failure")}, - externalClient: &testClusterClient{}, - cleanupExternal: true, - expectExternalCreated: true, - expectErr: true, - }, - { - name: "fail create internal cluster", - internalClient: &testClusterClient{CreateClusterObjectErr: fmt.Errorf("Test failure")}, - externalClient: &testClusterClient{}, - cleanupExternal: true, - expectExternalCreated: true, - expectErr: true, - }, - { - name: "fail create nodes", - internalClient: &testClusterClient{CreateMachineObjectsErr: fmt.Errorf("Test failure")}, - externalClient: &testClusterClient{}, - cleanupExternal: true, - expectExternalCreated: true, - expectedInternalClusters: 1, - expectErr: true, - }, - { - name: "fail update cluster endpoint internal", - internalClient: &testClusterClient{UpdateClusterObjectEndpointErr: fmt.Errorf("Test failure")}, - externalClient: &testClusterClient{}, - cleanupExternal: true, - expectExternalCreated: true, - expectedInternalClusters: 1, - expectedInternalMachines: 1, - expectErr: true, - }, - } - for _, testcase := range testcases { - t.Run(testcase.name, func(t *testing.T) { - kubeconfigOutFile, err := ioutil.TempFile("", "") - if err != nil { - t.Fatalf("could not provision temp file:%v", err) - } - kubeconfigOutFile.Close() - kubeconfigOut := kubeconfigOutFile.Name() - defer os.Remove(kubeconfigOut) - - // Create provisioners & clients and hook them up - p := &testClusterProvisioner{ - err: testcase.provisionExternalErr, - kubeconfig: externalKubeconfig, - } - pd := &testProviderDeployer{} - pd.kubeconfig = internalKubeconfig - f := newTestClusterClientFactory() - f.clients[externalKubeconfig] = testcase.externalClient - f.clients[internalKubeconfig] = testcase.internalClient - f.ClusterClientErr = testcase.factoryClusterClientErr - - // Create - inputCluster := &clusterv1.Cluster{} - inputCluster.Name = "test-cluster" - inputMachines := generateMachines() - d := clusterdeployer.New(p, f, pd, "", kubeconfigOut, testcase.cleanupExternal) - err = d.Create(inputCluster, inputMachines) - - // Validate - if (testcase.expectErr && err == nil) || (!testcase.expectErr && err != nil) { - t.Fatalf("Unexpected returned error. Got: %v, Want Err: %v", err, testcase.expectErr) - } - if testcase.expectExternalExists != p.clusterExists { - t.Errorf("Unexpected external cluster existance. Got: %v, Want: %v", p.clusterExists, testcase.expectExternalExists) - } - if testcase.expectExternalCreated != p.clusterCreated { - t.Errorf("Unexpected external cluster provisioning. Got: %v, Want: %v", p.clusterCreated, testcase.expectExternalCreated) - } - if testcase.expectedInternalClusters != len(testcase.internalClient.clusters) { - t.Fatalf("Unexpected cluster count. Got: %v, Want: %v", len(testcase.internalClient.clusters), testcase.expectedInternalClusters) - } - if testcase.expectedInternalClusters > 1 && inputCluster.Name != testcase.internalClient.clusters[0].Name { - t.Errorf("Provisioned cluster has unexpeted name. Got: %v, Want: %v", testcase.internalClient.clusters[0].Name, inputCluster.Name) - } - - if testcase.expectedInternalMachines != len(testcase.internalClient.machines) { - t.Fatalf("Unexpected machine count. Got: %v, Want: %v", len(testcase.internalClient.machines), testcase.expectedInternalMachines) - } - if testcase.expectedInternalMachines == len(inputMachines) { - for i := range inputMachines { - if inputMachines[i].Name != testcase.internalClient.machines[i].Name { - t.Fatalf("Unexpected machine name at %v. Got: %v, Want: %v", i, inputMachines[i].Name, testcase.internalClient.machines[i].Name) - } - } - } - }) - } -} - -func generateMachines() []*clusterv1.Machine { - master := &clusterv1.Machine{} - master.Name = "test-master" - master.Spec.Roles = []clustercommon.MachineRole{clustercommon.MasterRole} - node := &clusterv1.Machine{} - node.Name = "test.Node" - return []*clusterv1.Machine{master, node} -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/BUILD.bazel deleted file mode 100644 index 8be784fad31..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["minikube.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube", - importpath = "sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/golang/glog:go_default_library"], -) - -go_test( - name = "go_default_test", - srcs = ["minikube_test.go"], - embed = [":go_default_library"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/minikube.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/minikube.go deleted file mode 100644 index 9eda23e9eb8..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/minikube.go +++ /dev/null @@ -1,72 +0,0 @@ -package minikube - -import ( - "fmt" - "github.com/golang/glog" - "io/ioutil" - "os" - "os/exec" - "strings" -) - -type Minikube struct { - kubeconfigpath string - vmDriver string - // minikubeExec implemented as function variable for testing hooks - minikubeExec func(env []string, args ...string) (string, error) -} - -func New(vmDriver string) *Minikube { - return &Minikube{ - minikubeExec: minikubeExec, - vmDriver: vmDriver, - // Arbitrary file name. Can potentially be randomly generated. - kubeconfigpath: "minikube.kubeconfig", - } -} - -var minikubeExec = func(env []string, args ...string) (string, error) { - const executable = "minikube" - glog.V(3).Infof("Running: %v %v", executable, args) - cmd := exec.Command(executable, args...) - cmd.Env = env - cmdOut, err := cmd.CombinedOutput() - glog.V(2).Infof("Ran: %v %v Output: %v", executable, args, string(cmdOut)) - if err != nil { - err = fmt.Errorf("error running command '%v %v': %v", executable, strings.Join(args, " "), err) - } - return string(cmdOut), err -} - -func (m *Minikube) Create() error { - args := []string{"start", "--bootstrapper=kubeadm"} - if m.vmDriver != "" { - args = append(args, fmt.Sprintf("--vm-driver=%v", m.vmDriver)) - } - _, err := m.exec(args...) - return err -} - -func (m *Minikube) Delete() error { - _, err := m.exec("delete") - os.Remove(m.kubeconfigpath) - return err -} - -func (m *Minikube) GetKubeconfig() (string, error) { - b, err := ioutil.ReadFile(m.kubeconfigpath) - if err != nil { - return "", err - } - return string(b), nil -} - -func (m *Minikube) exec(args ...string) (string, error) { - // Override kubeconfig environment variable in call - // so that minikube will generate and reference - // the kubeconfig in the desired location. - // Note that the last value set for a key is the final value. - const kubeconfigEnvVar = "KUBECONFIG" - env := append(os.Environ(), fmt.Sprintf("%v=%v", kubeconfigEnvVar, m.kubeconfigpath)) - return m.minikubeExec(env, args...) -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/minikube_test.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/minikube_test.go deleted file mode 100644 index 0a284357f18..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube/minikube_test.go +++ /dev/null @@ -1,106 +0,0 @@ -package minikube - -import ( - "fmt" - "io/ioutil" - "os" - "testing" -) - -func TestCreate(t *testing.T) { - var testcases = []struct { - name string - execError error - expectErr bool - }{ - { - name: "success", - }, - { - name: "exec fail", - execError: fmt.Errorf("test error"), - expectErr: true, - }, - } - for _, testcase := range testcases { - t.Run(testcase.name, func(t *testing.T) { - m := New("") - m.minikubeExec = func(env []string, args ...string) (string, error) { - return "", testcase.execError - } - err := m.Create() - if (testcase.expectErr && err == nil) || (!testcase.expectErr && err != nil) { - t.Fatalf("Unexpected returned error. Got: %v, Want Err: %v", err, testcase.expectErr) - } - }) - } -} - -func TestDelete(t *testing.T) { - var testcases = []struct { - name string - execError error - expectErr bool - }{ - { - name: "success", - }, - { - name: "exec fail", - execError: fmt.Errorf("test error"), - expectErr: true, - }, - } - for _, testcase := range testcases { - t.Run(testcase.name, func(t *testing.T) { - m := New("") - m.minikubeExec = func(env []string, args ...string) (string, error) { - return "", testcase.execError - } - err := m.Delete() - if (testcase.expectErr && err == nil) || (!testcase.expectErr && err != nil) { - t.Fatalf("Unexpected returned error. Got: %v, Want Err: %v", err, testcase.expectErr) - } - }) - } -} - -func TestGetKubeconfig(t *testing.T) { - const contents = "dfserfafaew" - m := New("") - f, err := createTempFile(contents) - if err != nil { - t.Fatal("Unable to create test file.") - } - defer os.Remove(f) - t.Run("file does not exist", func(t *testing.T) { - c, err := m.GetKubeconfig() - if err == nil { - t.Fatal("Able to read a file that does not exist") - } - if c != "" { - t.Fatal("Able to return contents for file that does not exist.") - } - }) - t.Run("file exists", func(t *testing.T) { - m.kubeconfigpath = f - c, err := m.GetKubeconfig() - if err != nil { - t.Fatalf("Unexpected err. Got: %v", err) - return - } - if c != contents { - t.Fatalf("Unexpected contents. Got: %v, Want: %v", c, contents) - } - }) -} - -func createTempFile(contents string) (string, error) { - f, err := ioutil.TempFile("", "") - if err != nil { - return "", err - } - defer f.Close() - f.WriteString(contents) - return f.Name(), nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/BUILD.bazel deleted file mode 100644 index 0e363f1d4d2..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/BUILD.bazel +++ /dev/null @@ -1,41 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "create.go", - "create_cluster.go", - "delete.go", - "delete_cluster.go", - "root.go", - "validate.go", - "validate_cluster.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd", - importpath = "sigs.k8s.io/cluster-api/clusterctl/cmd", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/vsphere:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/errors:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "create_cluster_test.go", - "validate_cluster_test.go", - ], - embed = [":go_default_library"], - deps = ["//vendor/sigs.k8s.io/cluster-api/errors:go_default_library"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create.go deleted file mode 100644 index 2eaa1e7e281..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create.go +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "github.com/spf13/cobra" -) - -var createCmd = &cobra.Command{ - Use: "create", - Short: "Create a cluster API resource", - Long: `Create a cluster API resource with one command`, -} - -func init() { - RootCmd.AddCommand(createCmd) -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create_cluster.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create_cluster.go deleted file mode 100644 index b97080c7f01..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create_cluster.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "fmt" - "github.com/ghodss/yaml" - "github.com/golang/glog" - "github.com/spf13/cobra" - "io/ioutil" - "sigs.k8s.io/cluster-api/cloud/google" - "sigs.k8s.io/cluster-api/cloud/vsphere" - "sigs.k8s.io/cluster-api/clusterctl/clusterdeployer" - "sigs.k8s.io/cluster-api/clusterctl/clusterdeployer/minikube" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" -) - -type CreateOptions struct { - Cluster string - Machine string - ProviderComponents string - CleanupExternalCluster bool - VmDriver string - Provider string - KubeconfigOutput string -} - -var co = &CreateOptions{} - -var createClusterCmd = &cobra.Command{ - Use: "cluster", - Short: "Create kubernetes cluster", - Long: `Create a kubernetes cluster with one command`, - Run: func(cmd *cobra.Command, args []string) { - if co.Cluster == "" { - exitWithHelp(cmd, "Please provide yaml file for cluster definition.") - } - if co.Machine == "" { - exitWithHelp(cmd, "Please provide yaml file for machine definition.") - } - if err := RunCreate(co); err != nil { - glog.Exit(err) - } - }, -} - -func RunCreate(co *CreateOptions) error { - c, err := parseClusterYaml(co.Cluster) - if err != nil { - return err - } - m, err := parseMachinesYaml(co.Machine) - if err != nil { - return err - } - - mini := minikube.New(co.VmDriver) - pd, err := getProvider(co.Provider) - if err != nil { - return err - } - pc, err := ioutil.ReadFile(co.ProviderComponents) - if err != nil { - return err - } - d := clusterdeployer.New( - mini, - clusterdeployer.NewClusterClientFactory(), - pd, - string(pc), - co.KubeconfigOutput, - co.CleanupExternalCluster) - err = d.Create(c, m) - return err -} - -func init() { - // Required flags - createClusterCmd.Flags().StringVarP(&co.Cluster, "cluster", "c", "", "A yaml file containing cluster object definition") - createClusterCmd.Flags().StringVarP(&co.Machine, "machines", "m", "", "A yaml file containing machine object definition(s)") - createClusterCmd.Flags().StringVarP(&co.ProviderComponents, "provider-components", "p", "", "A yaml file containing cluster api provider controllers and supporting objects") - // TODO: Remove as soon as code allows https://github.com/kubernetes-sigs/cluster-api/issues/157 - createClusterCmd.Flags().StringVarP(&co.Provider, "provider", "", "", "Which provider deployment logic to use (google/vsphere)") - - // Optional flags - createClusterCmd.Flags().BoolVarP(&co.CleanupExternalCluster, "cleanup-external-cluster", "", true, "Whether to cleanup the external cluster after bootstrap") - createClusterCmd.Flags().StringVarP(&co.VmDriver, "vm-driver", "", "", "Which vm driver to use for minikube") - createClusterCmd.Flags().StringVarP(&co.KubeconfigOutput, "kubeconfig-out", "", "kubeconfig", "where to output the kubeconfig for the provisioned cluster.") - - createCmd.AddCommand(createClusterCmd) -} - -func parseClusterYaml(file string) (*clusterv1.Cluster, error) { - bytes, err := ioutil.ReadFile(file) - if err != nil { - return nil, err - } - - cluster := &clusterv1.Cluster{} - err = yaml.Unmarshal(bytes, cluster) - if err != nil { - return nil, err - } - - return cluster, nil -} - -func parseMachinesYaml(file string) ([]*clusterv1.Machine, error) { - bytes, err := ioutil.ReadFile(file) - if err != nil { - return nil, err - } - - list := &clusterv1.MachineList{} - err = yaml.Unmarshal(bytes, &list) - if err != nil { - return nil, err - } - - if list == nil { - return []*clusterv1.Machine{}, nil - } - - return util.MachineP(list.Items), nil -} - -func getProvider(provider string) (clusterdeployer.ProviderDeployer, error) { - switch provider { - case "google": - return google.NewMachineActuator(google.MachineActuatorParams{}) - case "vsphere": - return &vsphereAdapter{vsphere.NewDeploymentClient()}, nil - default: - return nil, fmt.Errorf("Unrecognized provider %v", provider) - } -} - -// Adapt the vsphere methods calls since gcp/vsphere are not on the same page. -// Long term, these providers should converge or the need for a provider will go away. -// Whichever comes first. -type vsphereAdapter struct { - *vsphere.DeploymentClient -} - -func (a *vsphereAdapter) GetIP(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error) { - return a.DeploymentClient.GetIP(machine) -} - -func (a *vsphereAdapter) GetKubeConfig(cluster *clusterv1.Cluster, master *clusterv1.Machine) (string, error) { - return a.DeploymentClient.GetKubeConfig(master) -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create_cluster_test.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create_cluster_test.go deleted file mode 100644 index 19bdfc6764f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/create_cluster_test.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package cmd - -import ( - "io/ioutil" - "os" - "testing" -) - -const validCluster = ` -apiVersion: "cluster.k8s.io/v1alpha1" -kind: Cluster -metadata: - name: cluster1 -spec:` - -const validMachines = ` -items: -- apiVersion: "cluster.k8s.io/v1alpha1" - kind: Machine - metadata: - name: machine1 - spec:` - -func TestParseClusterYaml(t *testing.T) { - t.Run("File does not exist", func(t *testing.T) { - _, err := parseClusterYaml("fileDoesNotExist") - if err == nil { - t.Fatal("Was able to parse a file that does not exist") - } - }) - var testcases = []struct { - name string - contents string - expectedName string - expectErr bool - }{ - { - name: "valid file", - contents: validCluster, - expectedName: "cluster1", - }, - { - name: "gibberish in file", - contents: `blah ` + validCluster + ` blah`, - expectErr: true, - }, - } - for _, testcase := range testcases { - t.Run(testcase.name, func(t *testing.T) { - file, err := createTempFile(testcase.contents) - if err != nil { - t.Fatal(err) - } - defer os.Remove(file) - - c, err := parseClusterYaml(file) - if (testcase.expectErr && err == nil) || (!testcase.expectErr && err != nil) { - t.Fatalf("Unexpected returned error. Got: %v, Want Err: %v", err, testcase.expectErr) - } - if err != nil { - return - } - if c == nil { - t.Fatalf("No cluster returned in success case.") - } - if c.Name != testcase.expectedName { - t.Fatalf("Unexpected name. Got: %v, Want:%v", c.Name, testcase.expectedName) - } - }) - } -} - -func TestParseMachineYaml(t *testing.T) { - t.Run("File does not exist", func(t *testing.T) { - _, err := parseMachinesYaml("fileDoesNotExist") - if err == nil { - t.Fatal("Was able to parse a file that does not exist") - } - }) - var testcases = []struct { - name string - contents string - expectErr bool - expectedMachineCount int - }{ - { - name: "valid file", - contents: validMachines, - expectedMachineCount: 1, - }, - { - name: "gibberish in file", - contents: `blah ` + validMachines + ` blah`, - expectErr: true, - }, - } - for _, testcase := range testcases { - t.Run(testcase.name, func(t *testing.T) { - file, err := createTempFile(testcase.contents) - if err != nil { - t.Fatal(err) - } - defer os.Remove(file) - - m, err := parseMachinesYaml(file) - if (testcase.expectErr && err == nil) || (!testcase.expectErr && err != nil) { - t.Fatalf("Unexpected returned error. Got: %v, Want Err: %v", err, testcase.expectErr) - } - if err != nil { - return - } - if m == nil { - t.Fatalf("No machines returned in success case.") - } - if len(m) != testcase.expectedMachineCount { - t.Fatalf("Unexpected machine count. Got: %v, Want: %v", len(m), testcase.expectedMachineCount) - } - }) - } -} - -func TestGetProvider(t *testing.T) { - var testcases = []struct { - provider string - expectErr bool - }{ - { - provider: "google", - }, - { - provider: "blah blah", - expectErr: true, - }, - } - for _, testcase := range testcases { - t.Run(testcase.provider, func(t *testing.T) { - _, err := getProvider(testcase.provider) - if (testcase.expectErr && err == nil) || (!testcase.expectErr && err != nil) { - t.Fatalf("Unexpected returned error. Got: %v, Want Err: %v", err, testcase.expectErr) - } - }) - } -} - -func createTempFile(contents string) (string, error) { - f, err := ioutil.TempFile("", "") - if err != nil { - return "", err - } - defer f.Close() - f.WriteString(contents) - return f.Name(), nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/delete.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/delete.go deleted file mode 100644 index ca49d8e1a70..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/delete.go +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "github.com/spf13/cobra" -) - -var deleteCmd = &cobra.Command{ - Use: "delete", - Short: "Delete a cluster API resource", - Long: `Delete a cluster API resource with one command`, -} - -func init() { - RootCmd.AddCommand(deleteCmd) -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/delete_cluster.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/delete_cluster.go deleted file mode 100644 index a8e33071c75..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/delete_cluster.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "github.com/golang/glog" - "github.com/spf13/cobra" - "sigs.k8s.io/cluster-api/errors" -) - -type DeleteOptions struct { - ClusterName string -} - -var do = &DeleteOptions{} - -var deleteClusterCmd = &cobra.Command{ - Use: "cluster", - Short: "Delete kubernetes cluster", - Long: `Delete a kubernetes cluster with one command`, - Run: func(cmd *cobra.Command, args []string) { - if do.ClusterName == "" { - exitWithHelp(cmd, "Please provide cluster name.") - } - if err := RunDelete(); err != nil { - glog.Exit(err) - } - }, -} - -func init() { - deleteCmd.AddCommand(deleteClusterCmd) -} - -func RunDelete() error { - return errors.NotImplementedError -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/root.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/root.go deleted file mode 100644 index 687c3e6539e..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/root.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "flag" - "fmt" - "github.com/spf13/cobra" - "github.com/spf13/pflag" - "k8s.io/apiserver/pkg/util/logs" - "os" -) - -var RootCmd = &cobra.Command{ - Use: "clusterctl", - Short: "cluster management", - Long: `Simple kubernetes cluster management`, - Run: func(cmd *cobra.Command, args []string) { - // Do Stuff Here - cmd.Help() - }, -} - -func Execute() { - if err := RootCmd.Execute(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} - -func exitWithHelp(cmd *cobra.Command, err string) { - fmt.Fprintln(os.Stderr, err) - cmd.Help() - os.Exit(1) -} - -func init() { - flag.CommandLine.Parse([]string{}) - - // Honor glog flags for verbosity control - pflag.CommandLine.AddGoFlagSet(flag.CommandLine) - - logs.InitLogs() -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate.go deleted file mode 100644 index 279c4c74f87..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate.go +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "github.com/spf13/cobra" -) - -var validateCmd = &cobra.Command{ - Use: "validate", - Short: "Validate an API resource created by cluster API.", - Long: `Validate an API resource created by cluster API. See subcommands for supported API resources.`, -} - -func init() { - RootCmd.AddCommand(validateCmd) -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate_cluster.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate_cluster.go deleted file mode 100644 index 0289ef2ce8f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate_cluster.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "github.com/golang/glog" - "github.com/spf13/cobra" - "sigs.k8s.io/cluster-api/errors" -) - -var validateClusterCmd = &cobra.Command{ - Use: "cluster", - Short: "Validate a cluster created by cluster API.", - Long: `Validate a cluster created by cluster API.`, - Run: func(cmd *cobra.Command, args []string) { - if err := RunValidateCluster(); err != nil { - glog.Exit(err) - } - }, -} - -func init() { - validateCmd.AddCommand(validateClusterCmd) -} - -func RunValidateCluster() error { - return errors.NotImplementedError -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate_cluster_test.go b/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate_cluster_test.go deleted file mode 100644 index 9f3b342e144..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/cmd/validate_cluster_test.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "testing" - - "sigs.k8s.io/cluster-api/errors" -) - -func TestRunValidateCluster(t *testing.T) { - err := RunValidateCluster() - if err != errors.NotImplementedError { - t.Fatalf("Unexpected returned error. Got: %v, Want Err: %v", err, errors.NotImplementedError) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/.gitignore b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/.gitignore deleted file mode 100644 index 89f9ac04aac..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/.gitignore +++ /dev/null @@ -1 +0,0 @@ -out/ diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/README.md b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/README.md deleted file mode 100644 index a90a7b51a25..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Google Example Files -## Contents -*.yaml files - concrete example files that can be used as is. -*.yaml.template files - template example files that need values filled in before use. - -## Generation -For convenience, a generation script which populates templates based on gcloud -configuration is provided. - -1. Run the generation script. -``` -./generate-yaml.sh -``` - -If gcloud isn't configured, you will see an error like the one below: - -``` -$ ./generate-yaml.sh -ERROR: (gcloud.config.get-value) Section [core] has no property [project]. -``` - -## Manual Modification -You may always manually curate files based on the examples provided. - diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/addons.yaml.template b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/addons.yaml.template deleted file mode 100644 index dcf7bebab2f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/addons.yaml.template +++ /dev/null @@ -1,205 +0,0 @@ -# Note: kubectl apply the generated file after the cluster is provisioned ---- -kind: StorageClass -apiVersion: storage.k8s.io/v1 -metadata: - name: standard - annotations: - storageclass.kubernetes.io/is-default-class: "true" -provisioner: kubernetes.io/gce-pd -parameters: - type: pd-standard ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: glbc - namespace: kube-system ---- -apiVersion: rbac.authorization.k8s.io/ -kind: ClusterRole -metadata: - name: system:controller:glbc -rules: -- apiGroups: [""] - resources: ["secrets", "endpoints", "services", "pods", "nodes", "namespaces"] - verbs: ["describe", "get", "list", "watch"] -- apiGroups: [""] - resources: ["events", "configmaps"] - verbs: ["describe", "get", "list", "watch", "update", "create", "patch"] -- apiGroups: ["extensions"] - resources: ["ingresses"] - verbs: ["get", "list", "watch", "update"] -- apiGroups: ["extensions"] - resources: ["ingresses/status"] - verbs: ["update"] ---- -apiVersion: rbac.authorization.k8s.io/ -kind: ClusterRoleBinding -metadata: - name: system:controller:glbc -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:controller:glbc -subjects: -- kind: ServiceAccount - name: glbc - namespace: kube-system ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: l7-default-backend - namespace: kube-system - labels: - k8s-app: glbc - kubernetes.io/name: "GLBC" - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -spec: - replicas: 1 - selector: - matchLabels: - k8s-app: glbc - template: - metadata: - labels: - k8s-app: glbc - name: glbc - spec: - containers: - - name: default-http-backend - # Any image is permissible as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: gcr.io/google_containers/defaultbackend:1.4 - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 10m - memory: 20Mi - requests: - cpu: 10m - memory: 20Mi ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: ingress-controller-config - namespace: kube-system -data: - gce.conf: | - [global] - token-url = nil - network = default - project-id = $GCLOUD_PROJECT - node-tags = $CLUSTER_NAME-worker ---- -apiVersion: v1 -kind: Service -metadata: - # This must match the --default-backend-service argument of the l7 lb - # controller and is required because GCE mandates a default backend. - name: default-http-backend - namespace: kube-system - labels: - k8s-app: glbc - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "GLBCDefaultBackend" -spec: - # The default backend must be of type NodePort. - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - name: http - selector: - k8s-app: glbc ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - namespace: kube-system - name: l7-lb-controller - annotations: - scheduler.alpha.kubernetes.io/critical-pod: '' - labels: - k8s-app: glbc - version: v1.1.1 - kubernetes.io/name: "GLBC" -spec: - # There should never be more than 1 controller alive simultaneously. - replicas: 1 - selector: - matchLabels: - k8s-app: glbc - version: v1.1.1 - template: - metadata: - labels: - k8s-app: glbc - version: v1.1.1 - name: glbc - spec: - serviceAccountName: glbc - terminationGracePeriodSeconds: 600 - containers: - - image: k8s.gcr.io/ingress-gce-glbc-amd64:v1.1.1 - livenessProbe: - httpGet: - path: /healthz - port: 8086 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - env: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: /etc/credentials/service-account.json - name: l7-lb-controller - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 50Mi - command: - - sh - - -c - - 'exec /glbc --gce-ratelimit=ga.Operations.Get,qps,10,100 --gce-ratelimit=alpha.Operations.Get,qps,10,100 --gce-ratelimit=ga.BackendServices.Get,qps,1.8,1 --gce-ratelimit=ga.HealthChecks.Get,qps,1.8,1 --gce-ratelimit=alpha.HealthChecks.Get,qps,1.8,1 --verbose --default-backend-service=kube-system/default-http-backend --sync-period=600s --running-in-cluster=true --use-real-cloud=true --config-file-path=/etc/ingress-config/gce.conf --healthz-port=8086 2>&1' - volumeMounts: - - mountPath: /etc/ingress-config - name: cloudconfig - readOnly: true - - mountPath: /etc/credentials - name: credentials - readOnly: true - volumes: - - name: cloudconfig - configMap: - name: ingress-controller-config - - name: credentials - secret: - secretName: glbc-gcp-key ---- -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: glbc-gcp-key - namespace: kube-system -data: - service-account.json: $LOADBALANCER_SA_KEY \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/cluster.yaml.template b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/cluster.yaml.template deleted file mode 100644 index d6482e60499..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/cluster.yaml.template +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: "cluster.k8s.io/v1alpha1" -kind: Cluster -metadata: - name: $CLUSTER_NAME - annotations: - # The default service account used by master machines/vms created for this cluster - gce.clusterapi.k8s.io/service-account-k8s-master: "master-$CLUSTER_NAME@$GCLOUD_PROJECT.iam.gserviceaccount.com" - # The default service account used by worker machines/cms created for this cluster - gce.clusterapi.k8s.io/service-account-k8s-worker: "worker-$CLUSTER_NAME@$GCLOUD_PROJECT.iam.gserviceaccount.com" -spec: - clusterNetwork: - services: - cidrBlocks: ["10.96.0.0/12"] - pods: - cidrBlocks: ["192.168.0.0/16"] - serviceDomain: "cluster.local" - providerConfig: - value: - apiVersion: "gceproviderconfig/v1alpha1" - kind: "GCEClusterProviderConfig" - project: "$GCLOUD_PROJECT" \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/generate-yaml.sh b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/generate-yaml.sh deleted file mode 100755 index 01b6bcc90c9..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/generate-yaml.sh +++ /dev/null @@ -1,155 +0,0 @@ -#!/bin/sh -set -e - -GCLOUD_PROJECT=$(gcloud config get-value project) -ZONE=$(gcloud config get-value compute/zone) -ZONE="${ZONE:-us-central1-f}" -CLUSTER_NAME=test1 - -OUTPUT_DIR=out - -MACHINE_TEMPLATE_FILE=machines.yaml.template -MACHINE_GENERATED_FILE=${OUTPUT_DIR}/machines.yaml -CLUSTER_TEMPLATE_FILE=cluster.yaml.template -CLUSTER_GENERATED_FILE=${OUTPUT_DIR}/cluster.yaml -PROVIDERCOMPONENT_TEMPLATE_FILE=provider-components.yaml.template -PROVIDERCOMPONENT_GENERATED_FILE=${OUTPUT_DIR}/provider-components.yaml -ADDON_TEMPLATE_FILE=addons.yaml.template -ADDON_GENERATED_FILE=${OUTPUT_DIR}/addons.yaml - -MACHINE_CONTROLLER_SA_FILE=${OUTPUT_DIR}/machine-controller-serviceaccount.json -MACHINE_CONTROLLER_SA_NAME="machine-controller-$CLUSTER_NAME" -MACHINE_CONTROLLER_SA_EMAIL="$MACHINE_CONTROLLER_SA_NAME@$GCLOUD_PROJECT.iam.gserviceaccount.com" -MACHINE_CONTROLLER_SA_KEY= -LOADBALANCER_SA_FILE=${OUTPUT_DIR}/loadbalancer-serviceaccount.json -LOADBALANCER_SA_NAME="loadbalancer-$CLUSTER_NAME" -LOADBALANCER_SA_EMAIL="$LOADBALANCER_SA_NAME@$GCLOUD_PROJECT.iam.gserviceaccount.com" -LOADBALANCER_SA_KEY= - -# TODO: The following service accounts will eventually be provisioned by the cluster controller. In the meanwhile, they are provisioned here. -MASTER_SA_NAME="master-$CLUSTER_NAME" -MASTER_SA_EMAIL="$MASTER_SA_NAME@$GCLOUD_PROJECT.iam.gserviceaccount.com" -WORKER_SA_NAME="worker-$CLUSTER_NAME" -WORKER_SA_EMAIL="$WORKER_SA_NAME@$GCLOUD_PROJECT.iam.gserviceaccount.com" - -MACHINE_CONTROLLER_SSH_PUBLIC_FILE=${OUTPUT_DIR}/machine-controller-key.pub -MACHINE_CONTROLLER_SSH_PUBLIC= -MACHINE_CONTROLLER_SSH_PRIVATE_FILE=${OUTPUT_DIR}/machine-controller-key -MACHINE_CONTROLLER_SSH_PRIVATE= -MACHINE_CONTROLLER_SSH_USER_PLAIN=clusterapi -MACHINE_CONTROLLER_SSH_USER=$(echo -n "$MACHINE_CONTROLLER_SSH_USER_PLAIN" | base64 -w0) - - -OVERWRITE=0 - -SCRIPT=$(basename $0) -while test $# -gt 0; do - case "$1" in - -h|--help) - echo "$SCRIPT - generates input yaml files for Cluster API on Google Cloud Platform" - echo " " - echo "$SCRIPT [options]" - echo " " - echo "options:" - echo "-h, --help show brief help" - echo "-f, --force-overwrite if file to be generated already exists, force script to overwrite it" - exit 0 - ;; - -f) - OVERWRITE=1 - shift - ;; - --force-overwrite) - OVERWRITE=1 - shift - ;; - *) - break - ;; - esac -done - -if [ $OVERWRITE -ne 1 ] && [ -f $MACHINE_GENERATED_FILE ]; then - echo File $PROVIDERCOMPONENT_GENERATED_FILE already exists. Delete it manually before running this script. - exit 1 -fi - -if [ $OVERWRITE -ne 1 ] && [ -f $CLUSTER_GENERATED_FILE ]; then - echo File $PROVIDERCOMPONENT_GENERATED_FILE already exists. Delete it manually before running this script. - exit 1 -fi - -if [ $OVERWRITE -ne 1 ] && [ -f $PROVIDERCOMPONENT_GENERATED_FILE ]; then - echo File $PROVIDERCOMPONENT_GENERATED_FILE already exists. Delete it manually before running this script. - exit 1 -fi - -if [ $OVERWRITE -ne 1 ] && [ -f $ADDON_GENERATED_FILE ]; then - echo File $ADDON_GENERATED_FILE already exists. Delete it manually before running this script. - exit 1 -fi - -mkdir -p ${OUTPUT_DIR} - -if [ ! -f $MACHINE_CONTROLLER_SA_FILE ]; then - echo Generating $MACHINE_CONTROLLER_SA_EMAIL service account for machine controller - gcloud iam service-accounts create --display-name="machine controller service account" $MACHINE_CONTROLLER_SA_NAME - gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$MACHINE_CONTROLLER_SA_EMAIL --role=roles/compute.instanceAdmin.v1 - gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$MACHINE_CONTROLLER_SA_EMAIL --role=roles/iam.serviceAccountActor - gcloud iam service-accounts keys create $MACHINE_CONTROLLER_SA_FILE --iam-account $MACHINE_CONTROLLER_SA_EMAIL -fi -MACHINE_CONTROLLER_SA_KEY=$(cat $MACHINE_CONTROLLER_SA_FILE|base64 -w0) - -if [ ! -f $LOADBALANCER_SA_FILE ]; then - echo Generating $LOADBALANCER_SA_EMAIL service account for loadbalancers - gcloud iam service-accounts create --display-name="loadbalancer service account" $LOADBALANCER_SA_NAME - gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$LOADBALANCER_SA_EMAIL --role=roles/compute.instanceAdmin.v1 - gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$LOADBALANCER_SA_EMAIL --role=roles/compute.networkAdmin - gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$LOADBALANCER_SA_EMAIL --role=roles/compute.securityAdmin - gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$LOADBALANCER_SA_EMAIL --role=roles/iam.serviceAccountActor - gcloud iam service-accounts keys create $LOADBALANCER_SA_FILE --iam-account $LOADBALANCER_SA_EMAIL -fi -LOADBALANCER_SA_KEY=$(cat $LOADBALANCER_SA_FILE|base64 -w0) - -echo Generating $MASTER_SA_EMAIL service account for masters -gcloud iam service-accounts create --display-name="master service account" $MASTER_SA_NAME -gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$MASTER_SA_EMAIL --role=roles/compute.instanceAdmin -gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$MASTER_SA_EMAIL --role=roles/compute.networkAdmin -gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$MASTER_SA_EMAIL --role=roles/compute.securityAdmin -gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$MASTER_SA_EMAIL --role=roles/compute.viewer -gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$MASTER_SA_EMAIL --role=roles/storage.admin -gcloud projects add-iam-policy-binding $GCLOUD_PROJECT --member=serviceAccount:$MASTER_SA_EMAIL --role=roles/storage.objectViewer - -echo Generating $WORKER_SA_EMAIL service account for workers -gcloud iam service-accounts create --display-name="worker service account" $WORKER_SA_NAME - -if [ ! -f $MACHINE_CONTROLLER_SSH_PRIVATE_FILE ]; then - echo Generate SSH key files fo machine controller - ssh-keygen -t rsa -f $MACHINE_CONTROLLER_SSH_PRIVATE_FILE -C $MACHINE_CONTROLLER_SSH_USER_PLAIN -N "" -fi - -MACHINE_CONTROLLER_SSH_PUBLIC=$(cat $MACHINE_CONTROLLER_SSH_PUBLIC_FILE|base64 -w0) -MACHINE_CONTROLLER_SSH_PRIVATE=$(cat $MACHINE_CONTROLLER_SSH_PRIVATE_FILE|base64 -w0) - -cat $MACHINE_TEMPLATE_FILE \ - | sed -e "s/\$ZONE/$ZONE/" \ - > $MACHINE_GENERATED_FILE - -cat $CLUSTER_TEMPLATE_FILE \ - | sed -e "s/\$GCLOUD_PROJECT/$GCLOUD_PROJECT/" \ - | sed -e "s/\$CLUSTER_NAME/$CLUSTER_NAME/" \ - > $CLUSTER_GENERATED_FILE - -cat $PROVIDERCOMPONENT_TEMPLATE_FILE \ - | sed -e "s/\$MACHINE_CONTROLLER_SA_KEY/$MACHINE_CONTROLLER_SA_KEY/" \ - | sed -e "s/\$CLUSTER_NAME/$CLUSTER_NAME/" \ - | sed -e "s/\$MACHINE_CONTROLLER_SSH_USER/$MACHINE_CONTROLLER_SSH_USER/" \ - | sed -e "s/\$MACHINE_CONTROLLER_SSH_PUBLIC/$MACHINE_CONTROLLER_SSH_PUBLIC/" \ - | sed -e "s/\$MACHINE_CONTROLLER_SSH_PRIVATE/$MACHINE_CONTROLLER_SSH_PRIVATE/" \ - > $PROVIDERCOMPONENT_GENERATED_FILE - -cat $ADDON_TEMPLATE_FILE \ - | sed -e "s/\$GCLOUD_PROJECT/$GCLOUD_PROJECT/" \ - | sed -e "s/\$CLUSTER_NAME/$CLUSTER_NAME/" \ - | sed "s/\$LOADBALANCER_SA_KEY/$LOADBALANCER_SA_KEY/" \ - > $ADDON_GENERATED_FILE \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/machines.yaml.template b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/machines.yaml.template deleted file mode 100644 index 4852425178f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/machines.yaml.template +++ /dev/null @@ -1,46 +0,0 @@ -items: -- apiVersion: "cluster.k8s.io/v1alpha1" - kind: Machine - metadata: - generateName: gce-master- - labels: - set: master - spec: - providerConfig: - value: - apiVersion: "gceproviderconfig/v1alpha1" - kind: "GCEMachineProviderConfig" - zone: "$ZONE" - machineType: "n1-standard-2" - os: "ubuntu-1604-lts" - disks: - - initializeParams: - diskSizeGb: 30 - diskType: "pd-standard" - versions: - kubelet: 1.9.4 - controlPlane: 1.9.4 - roles: - - Master -- apiVersion: "cluster.k8s.io/v1alpha1" - kind: Machine - metadata: - generateName: gce-node- - labels: - set: node - spec: - providerConfig: - value: - apiVersion: "gceproviderconfig/v1alpha1" - kind: "GCEMachineProviderConfig" - zone: "$ZONE" - machineType: "n1-standard-1" - os: "ubuntu-1604-lts" - disks: - - initializeParams: - diskSizeGb: 30 - diskType: "pd-standard" - versions: - kubelet: 1.9.4 - roles: - - Node diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/provider-components.yaml.template b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/provider-components.yaml.template deleted file mode 100644 index 050e0516eec..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/google/provider-components.yaml.template +++ /dev/null @@ -1,348 +0,0 @@ -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: clusterapi-controllers - labels: - api: clusterapi -spec: - replicas: 1 - template: - metadata: - labels: - api: clusterapi - spec: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - key: CriticalAddonsOnly - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/notReady - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/unreachable - operator: Exists - containers: - - name: controller-manager - image: gcr.io/k8s-cluster-api/controller-manager:0.0.7 - volumeMounts: - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - command: - - "./controller-manager" - args: - - --kubeconfig=/etc/kubernetes/admin.conf - resources: - requests: - cpu: 100m - memory: 20Mi - limits: - cpu: 100m - memory: 30Mi - - name: gce-machine-controller - image: gcr.io/k8s-cluster-api/gce-machine-controller:0.0.13 - volumeMounts: - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - - name: credentials - mountPath: /etc/credentials - - name: sshkeys - mountPath: /etc/sshkeys - - name: machine-setup - mountPath: /etc/machinesetup - - name: kubeadm - mountPath: /usr/bin/kubeadm - env: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: /etc/credentials/service-account.json - command: - - "./gce-machine-controller" - args: - - --kubeconfig=/etc/kubernetes/admin.conf - - --machinesetup=/etc/machinesetup/machine_setup_configs.yaml - resources: - requests: - cpu: 100m - memory: 20Mi - limits: - cpu: 100m - memory: 30Mi - volumes: - - name: config - hostPath: - path: /etc/kubernetes - - name: certs - hostPath: - path: /etc/ssl/certs - - name: sshkeys - secret: - secretName: machine-controller-sshkeys - defaultMode: 256 - - name: credentials - secret: - secretName: machine-controller-credential - - name: machine-setup - configMap: - name: machine-setup - - name: kubeadm - hostPath: - path: /usr/bin/kubeadm ---- -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: machine-controller-sshkeys - namespace: default -data: - user: $MACHINE_CONTROLLER_SSH_USER - private: $MACHINE_CONTROLLER_SSH_PRIVATE - # In-place master upgrade will not work till after https://github.com/kubernetes-sigs/cluster-api/issues/160 - public: $MACHINE_CONTROLLER_SSH_PUBLIC ---- -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: machine-controller-credential - namespace: default -data: - service-account.json: $MACHINE_CONTROLLER_SA_KEY ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: machine-setup -data: - machine_setup_configs.yaml: |- - items: - - machineParams: - - os: ubuntu-1604-lts - roles: - - Master - versions: - kubelet: 1.9.4 - controlPlane: 1.9.4 - image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts - metadata: - startupScript: | - set -e - set -x - ( - ARCH=amd64 - - function curl_metadata() { - curl --retry 5 --silent --fail --header "Metadata-Flavor: Google" "http://metadata/computeMetadata/v1/instance/$@" - } - - curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - - touch /etc/apt/sources.list.d/kubernetes.list - sh -c 'echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list' - apt-get update -y - apt-get install -y \ - socat \ - ebtables \ - apt-transport-https \ - cloud-utils \ - prips - - function install_configure_docker () { - # prevent docker from auto-starting - echo "exit 101" > /usr/sbin/policy-rc.d - chmod +x /usr/sbin/policy-rc.d - trap "rm /usr/sbin/policy-rc.d" RETURN - apt-get install -y docker.io - echo 'DOCKER_OPTS="--iptables=false --ip-masq=false"' > /etc/default/docker - systemctl daemon-reload - systemctl enable docker - systemctl start docker - } - install_configure_docker - - curl -sSL https://dl.k8s.io/release/${VERSION}/bin/linux/${ARCH}/kubeadm > /usr/bin/kubeadm.dl - chmod a+rx /usr/bin/kubeadm.dl - # kubeadm uses 10th IP as DNS server - CLUSTER_DNS_SERVER=$(prips ${SERVICE_CIDR} | head -n 11 | tail -n 1) - # Our Debian packages have versions like "1.8.0-00" or "1.8.0-01". Do a prefix - # search based on our SemVer to find the right (newest) package version. - function getversion() { - name=$1 - prefix=$2 - version=$(apt-cache madison $name | awk '{ print $3 }' | grep ^$prefix | head -n1) - if [[ -z "$version" ]]; then - echo Can\'t find package $name with prefix $prefix - exit 1 - fi - echo $version - } - KUBELET=$(getversion kubelet ${KUBELET_VERSION}-) - KUBEADM=$(getversion kubeadm ${KUBELET_VERSION}-) - apt-get install -y \ - kubelet=${KUBELET} \ - kubeadm=${KUBEADM} - mv /usr/bin/kubeadm.dl /usr/bin/kubeadm - chmod a+rx /usr/bin/kubeadm - - # Override network args to use kubenet instead of cni, override Kubelet DNS args and - # add cloud provider args. - cat > /etc/systemd/system/kubelet.service.d/20-kubenet.conf < /tmp/.ip - PUBLICIP=`curl_metadata "network-interfaces/0/access-configs/0/external-ip"` - - # Set up the GCE cloud config, which gets picked up by kubeadm init since cloudProvider is set to GCE. - cat > /etc/kubernetes/cloud-config < /etc/kubernetes/kubeadm_config.yaml < ${CA_CERT_PATH} - chmod 0644 ${CA_CERT_PATH} - CA_KEY_PATH=${PKI_PATH}/ca.key - curl_metadata "attributes/ca-key" | base64 -d > ${CA_KEY_PATH} - chmod 0600 ${CA_KEY_PATH} - } - - # Create and set bridge-nf-call-iptables to 1 to pass the kubeadm preflight check. - # Workaround was found here: - # http://zeeshanali.com/sysadmin/fixed-sysctl-cannot-stat-procsysnetbridgebridge-nf-call-iptables/ - modprobe br_netfilter - - install_certificates - - kubeadm init --config /etc/kubernetes/kubeadm_config.yaml - - for tries in $(seq 1 60); do - kubectl --kubeconfig /etc/kubernetes/kubelet.conf annotate --overwrite node $(hostname) machine=${MACHINE} && break - sleep 1 - done - echo done. - ) 2>&1 | tee /var/log/startup.log - - machineParams: - - os: ubuntu-1604-lts - roles: - - Node - versions: - kubelet: 1.9.4 - image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts - metadata: - startupScript: | - set -e - set -x - ( - apt-get update - apt-get install -y apt-transport-https prips - apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys F76221572C52609D - cat < /etc/apt/sources.list.d/k8s.list - deb [arch=amd64] https://apt.dockerproject.org/repo ubuntu-xenial main - EOF - apt-get update - - function install_configure_docker () { - # prevent docker from auto-starting - echo "exit 101" > /usr/sbin/policy-rc.d - chmod +x /usr/sbin/policy-rc.d - trap "rm /usr/sbin/policy-rc.d" RETURN - apt-get install -y docker-engine=1.12.0-0~xenial - echo 'DOCKER_OPTS="--iptables=false --ip-masq=false"' > /etc/default/docker - systemctl daemon-reload - systemctl enable docker - systemctl start docker - } - - install_configure_docker - - curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - - cat < /etc/apt/sources.list.d/kubernetes.list - deb http://apt.kubernetes.io/ kubernetes-xenial main - EOF - apt-get update - - mkdir -p /etc/kubernetes/ - cat > /etc/kubernetes/cloud-config < /etc/systemd/system/kubelet.service.d/20-kubenet.conf <&1 | tee /var/log/startup.log diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/.gitignore b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/.gitignore deleted file mode 100644 index e082cb099bd..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -machines.yaml -cluster.yaml -provider-components.yaml -machineset.yaml -vsphere_tmp -vsphere_tmp.pub \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/README.md b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/README.md deleted file mode 100644 index 5604946e362..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Vsphere Example Files -## Contents -* *.yaml files - concrete example files that can be used as is. -* *.yaml.template files - template example files that need values filled in before use. - -## Generation -For convenience, a generation script which populates templates where possible. - -1. Run the generation script. This wil produce ```provider-components.yaml``` -``` -./generate-yaml.sh -``` -2. To define the master machine, copy `machines.yaml.template` to `machines.yaml` and -manually edit `machineVariables`. - -3. To define nodes, copy `machineset.yaml.template` to `machineset.yaml` and -manually edit `machineVariables`. If needed, adjust `replicas` as well. - -4. Copy `cluster.yaml.template` to `cluster.yaml` and -manually edit `providerConfig`. - -## Manual Modification -You may always manually curate files based on the examples provided. - diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/cluster.yaml.template b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/cluster.yaml.template deleted file mode 100644 index ec613c2badd..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/cluster.yaml.template +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: "cluster.k8s.io/v1alpha1" -kind: Cluster -metadata: - name: test1 -spec: - clusterNetwork: - services: - cidrBlocks: ["10.96.0.0/12"] - pods: - cidrBlocks: ["192.168.0.0/16"] - serviceDomain: "cluster.local" - providerConfig: - value: - apiVersion: "vsphereproviderconfig/v1alpha1" - kind: "VsphereClusterProviderConfig" - vsphereUser: "" - vspherePassword: "" - vsphereServer: "" \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/generate-yaml.sh b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/generate-yaml.sh deleted file mode 100755 index 92e3c2b5381..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/generate-yaml.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -set -e - -PROVIDERCOMPONENT_TEMPLATE_FILE=provider-components.yaml.template -PROVIDERCOMPONENT_GENERATED_FILE=provider-components.yaml - -MACHINE_CONTROLLER_SSH_PUBLIC_FILE=vsphere_tmp.pub -MACHINE_CONTROLLER_SSH_PUBLIC= -MACHINE_CONTROLLER_SSH_PRIVATE_FILE=vsphere_tmp -MACHINE_CONTROLLER_SSH_PRIVATE= -MACHINE_CONTROLLER_SSH_HOME=~/.ssh/ - -OVERWRITE=0 - -SCRIPT=$(basename $0) -while test $# -gt 0; do - case "$1" in - -h|--help) - echo "$SCRIPT - generates input yaml files for Cluster API on vSphere" - echo " " - echo "$SCRIPT [options]" - echo " " - echo "options:" - echo "-h, --help show brief help" - echo "-f, --force-overwrite if file to be generated already exists, force script to overwrite it" - exit 0 - ;; - -f) - OVERWRITE=1 - shift - ;; - --force-overwrite) - OVERWRITE=1 - shift - ;; - *) - break - ;; - esac -done - -if [ $OVERWRITE -ne 1 ] && [ -f $PROVIDERCOMPONENT_GENERATED_FILE ]; then - echo "File $PROVIDERCOMPONENT_GENERATED_FILE already exists. Delete it manually before running this script." - exit 1 -fi - -# Check if the ssh key already exists. If not, generate and copy to the .ssh dir. -if [ ! -f $MACHINE_CONTROLLER_SSH_HOME$MACHINE_CONTROLLER_SSH_PRIVATE_FILE ]; then - echo "Generating SSH key files for machine controller." - # This is needed because GetKubeConfig assumes the key in the home .ssh dir. - ssh-keygen -t rsa -f $MACHINE_CONTROLLER_SSH_HOME$MACHINE_CONTROLLER_SSH_PRIVATE_FILE -N "" -fi - -OS=$(uname) -if [[ "$OS" =~ "Linux" ]]; then - MACHINE_CONTROLLER_SSH_PUBLIC=$(cat $MACHINE_CONTROLLER_SSH_HOME$MACHINE_CONTROLLER_SSH_PUBLIC_FILE|base64 -w0) - MACHINE_CONTROLLER_SSH_PRIVATE=$(cat $MACHINE_CONTROLLER_SSH_HOME$MACHINE_CONTROLLER_SSH_PRIVATE_FILE|base64 -w0) -elif [[ "$OS" =~ "Darwin" ]]; then - MACHINE_CONTROLLER_SSH_PUBLIC=$(cat $MACHINE_CONTROLLER_SSH_HOME$MACHINE_CONTROLLER_SSH_PUBLIC_FILE|base64) - MACHINE_CONTROLLER_SSH_PRIVATE=$(cat $MACHINE_CONTROLLER_SSH_HOME$MACHINE_CONTROLLER_SSH_PRIVATE_FILE|base64) -else - echo "Unrecognized OS : $OS" - exit 1 -fi - -cat $PROVIDERCOMPONENT_TEMPLATE_FILE \ - | sed -e "s/\$MACHINE_CONTROLLER_SSH_PUBLIC/$MACHINE_CONTROLLER_SSH_PUBLIC/" \ - | sed -e "s/\$MACHINE_CONTROLLER_SSH_PRIVATE/$MACHINE_CONTROLLER_SSH_PRIVATE/" \ - > $PROVIDERCOMPONENT_GENERATED_FILE - -echo "Done generating $PROVIDERCOMPONENT_GENERATED_FILE" -echo "You will still need to generate the cluster.yaml and machines.yaml" \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/machines.yaml.template b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/machines.yaml.template deleted file mode 100644 index 3c553ea7003..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/machines.yaml.template +++ /dev/null @@ -1,29 +0,0 @@ -items: -- apiVersion: "cluster.k8s.io/v1alpha1" - kind: Machine - metadata: - generateName: vs-master- - labels: - set: master - spec: - providerConfig: - value: - apiVersion: "vsphereproviderconfig/v1alpha1" - kind: "VsphereMachineProviderConfig" - vsphereMachine: "standard-master" - machineVariables: - datacenter: "" - datastore: "" - resource_pool: "" - network: "" - num_cpus: "2" - memory: "2048" - vm_template: "" - disk_label: "" - disk_size: "" - virtual_machine_domain: "" - versions: - kubelet: 1.10.1 - controlPlane: 1.10.1 - roles: - - Master diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/machineset.yaml.template b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/machineset.yaml.template deleted file mode 100644 index e7fdaa4a07d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/machineset.yaml.template +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: "cluster.k8s.io/v1alpha1" -kind: MachineSet -metadata: - name: test-machineset-1 -spec: - replicas: 2 - selector: - matchLabels: - node-type: worker-node - template: - metadata: - labels: - node-type: worker-node - spec: - providerConfig: - value: - apiVersion: "vsphereproviderconfig/v1alpha1" - kind: "VsphereMachineProviderConfig" - vsphereMachine: "standard-node" - machineVariables: - datacenter: "" - datastore: "" - resource_pool: "" - network: "" - num_cpus: "2" - memory: "2048" - vm_template: "" - disk_label: "" - disk_size: "" - virtual_machine_domain: "" - versions: - kubelet: 1.10.1 - roles: - - Node \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/provider-components.yaml.template b/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/provider-components.yaml.template deleted file mode 100644 index 223422c6958..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/clusterctl/examples/vsphere/provider-components.yaml.template +++ /dev/null @@ -1,393 +0,0 @@ -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: clusterapi-controllers - namespace: default - labels: - api: clusterapi -spec: - replicas: 1 - template: - metadata: - labels: - api: clusterapi - spec: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - key: CriticalAddonsOnly - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/notReady - operator: Exists - - effect: NoExecute - key: node.alpha.kubernetes.io/unreachable - operator: Exists - containers: - - name: controller-manager - image: gcr.io/k8s-cluster-api/controller-manager:0.0.7 - volumeMounts: - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - command: - - "./controller-manager" - args: - - --kubeconfig=/etc/kubernetes/admin.conf - resources: - requests: - cpu: 100m - memory: 20Mi - limits: - cpu: 100m - memory: 30Mi - - name: vsphere-machine-controller - image: gcr.io/k8s-cluster-api/vsphere-machine-controller:0.0.9 - volumeMounts: - - name: config - mountPath: /etc/kubernetes - - name: certs - mountPath: /etc/ssl/certs - - name: machines-stage - mountPath: /tmp/cluster-api/machines - - name: sshkeys - mountPath: /root/.ssh/vsphere_tmp - subPath: vsphere_tmp - - name: sshkeys - mountPath: /root/.ssh/vsphere_tmp.pub - subPath: vsphere_tmp.pub - - name: named-machines - mountPath: /etc/named-machines - command: - - "./vsphere-machine-controller" - args: - - --kubeconfig=/etc/kubernetes/admin.conf - # Hardedcoded token can be removed as part of https://github.com/kubernetes-sigs/cluster-api/issues/159 - - --token=e6uqfr.5zkanzwfdclsbn7p - - --namedmachines=/etc/named-machines/vsphere_named_machines.yaml - resources: - requests: - cpu: 200m - memory: 200Mi - limits: - cpu: 400m - memory: 500Mi - volumes: - - name: config - hostPath: - path: /etc/kubernetes - - name: certs - hostPath: - path: /etc/ssl/certs - - name: machines-stage - emptyDir: {} - - name: sshkeys - secret: - defaultMode: 0600 - secretName: sshkeys - - name: named-machines - configMap: - name: named-machines ---- -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: sshkeys - namespace: default -data: - vsphere_tmp: $MACHINE_CONTROLLER_SSH_PRIVATE - vsphere_tmp.pub: $MACHINE_CONTROLLER_SSH_PUBLIC ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: named-machines -data: - vsphere_named_machines.yaml: |- - items: - - machineName: standard-master - machineHcl: | - variable "vsphere_user" {} - variable "vsphere_password" {} - variable "vsphere_server" {} - - variable "datacenter" {} - variable "datastore" {} - variable "resource_pool" {} - variable "num_cpus" {} - variable "memory" {} - variable "vm_template" {} - variable "network" { default = "VM Network"} - variable "disk_label" { default = "disk0" } - variable "disk_size" { default = 10} - - variable "vm_name" { - type = "string" - } - - provider "vsphere" { - version = "~> 1.5.0" - user = "${var.vsphere_user}" - password = "${var.vsphere_password}" - vsphere_server = "${var.vsphere_server}" - - # if you have a self-signed cert - allow_unverified_ssl = true - } - - provider "template" { - version = "~> 1.0.0" - } - - data "vsphere_datacenter" "dc" { - name = "${var.datacenter}" - } - - data "vsphere_datastore" "datastore" { - name = "${var.datastore}" - datacenter_id = "${data.vsphere_datacenter.dc.id}" - } - - data "vsphere_resource_pool" "pool" { - name = "${var.resource_pool}" - datacenter_id = "${data.vsphere_datacenter.dc.id}" - } - - data "vsphere_network" "network" { - name = "${var.network}" - datacenter_id = "${data.vsphere_datacenter.dc.id}" - } - - data "vsphere_virtual_machine" "template" { - name = "${var.vm_template}" - datacenter_id = "${data.vsphere_datacenter.dc.id}" - } - - data "template_file" "cloud_provider_config" { - template = < -f -COPY . . - -RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' sigs.k8s.io/cluster-api/cmd/apiserver - -# Final container -FROM debian:stretch-slim -RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* - -COPY --from=builder /go/bin/apiserver . diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/apiserver/Makefile b/vendor/sigs.k8s.io/cluster-api/cmd/apiserver/Makefile deleted file mode 100644 index 88bfcb920f6..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/apiserver/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -.PHONY: image push dev_image dev_push fix_gcs_permissions - -GCR_BUCKET = k8s-cluster-api -PREFIX = gcr.io/$(GCR_BUCKET) -DEV_PREFIX ?= gcr.io/$(shell gcloud config get-value project) -NAME = cluster-apiserver -TAG = 0.0.5 - -image: - docker build -t "$(PREFIX)/$(NAME):$(TAG)" -f ./Dockerfile ../.. - -push: image - docker push "$(PREFIX)/$(NAME):$(TAG)" - $(MAKE) fix_gcs_permissions - -fix_gcs_permissions: - gsutil acl ch -u AllUsers:READ gs://artifacts.$(GCR_BUCKET).appspot.com - gsutil -m acl ch -r -u AllUsers:READ gs://artifacts.$(GCR_BUCKET).appspot.com - -dev_image: - docker build -t "$(DEV_PREFIX)/$(NAME):$(TAG)-dev" -f ./Dockerfile ../.. - -dev_push: dev_image - docker push "$(DEV_PREFIX)/$(NAME):$(TAG)-dev" diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/apiserver/main.go b/vendor/sigs.k8s.io/cluster-api/cmd/apiserver/main.go deleted file mode 100644 index 0399e8c20ea..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/apiserver/main.go +++ /dev/null @@ -1,36 +0,0 @@ - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - -package main - -import ( - // Make sure glide gets these dependencies - _ "k8s.io/apimachinery/pkg/apis/meta/v1" - _ "github.com/go-openapi/loads" - - "github.com/kubernetes-incubator/apiserver-builder/pkg/cmd/server" - _ "k8s.io/client-go/plugin/pkg/client/auth" // Enable cloud provider auth - - "sigs.k8s.io/cluster-api/pkg/apis" - "sigs.k8s.io/cluster-api/pkg/openapi" -) - -func main() { - version := "v0" - server.StartApiServer("/registry/k8s.io", apis.GetAllApiBuilders(), openapi.GetOpenAPIDefinitions, "Api", version) -} diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/.gitignore b/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/.gitignore deleted file mode 100644 index b1ce25bb589..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/.gitignore +++ /dev/null @@ -1 +0,0 @@ -controller-manager diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/BUILD b/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/BUILD deleted file mode 100644 index b3247b63245..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager", - importpath = "sigs.k8s.io/cluster-api/cmd/controller-manager", - visibility = ["//visibility:private"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/config:go_default_library", - ], -) - -go_binary( - name = "controller-manager", - embed = [":go_default_library"], - importpath = "sigs.k8s.io/cluster-api/cmd/controller-manager", - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/Dockerfile b/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/Dockerfile deleted file mode 100644 index 546a903ed90..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Reproducible builder image -FROM golang:1.10.0 as builder -WORKDIR /go/src/sigs.k8s.io/cluster-api -# This expects that the context passed to the docker build command is -# the cluster-api directory. -# e.g. docker build -t -f -COPY . . - -RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' sigs.k8s.io/cluster-api/cmd/controller-manager - -# Final container -FROM debian:stretch-slim -RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* - -COPY --from=builder /go/bin/controller-manager . diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/Makefile b/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/Makefile deleted file mode 100644 index f9c46d05655..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -.PHONY: image push dev_image dev_push fix_gcs_permissions - -GCR_BUCKET = k8s-cluster-api -PREFIX = gcr.io/$(GCR_BUCKET) -DEV_PREFIX ?= gcr.io/$(shell gcloud config get-value project) -NAME = controller-manager -TAG = 0.0.7 - -image: - docker build -t "$(PREFIX)/$(NAME):$(TAG)" -f ./Dockerfile ../.. - -push: image - docker push "$(PREFIX)/$(NAME):$(TAG)" - $(MAKE) fix_gcs_permissions - -fix_gcs_permissions: - gsutil acl ch -u AllUsers:READ gs://artifacts.$(GCR_BUCKET).appspot.com - gsutil -m acl ch -r -u AllUsers:READ gs://artifacts.$(GCR_BUCKET).appspot.com - -dev_image: - docker build -t "$(DEV_PREFIX)/$(NAME):$(TAG)-dev" -f ./Dockerfile ../.. - -dev_push: dev_image - docker push "$(DEV_PREFIX)/$(NAME):$(TAG)-dev" diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/main.go b/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/main.go deleted file mode 100644 index e55258feeaf..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/controller-manager/main.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - controllerlib "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - "github.com/spf13/pflag" - - "github.com/golang/glog" - "k8s.io/apiserver/pkg/util/logs" - "sigs.k8s.io/cluster-api/pkg/controller" - "sigs.k8s.io/cluster-api/pkg/controller/config" -) - -func init() { - config.ControllerConfig.AddFlags(pflag.CommandLine) -} - -func main() { - - pflag.Parse() - - logs.InitLogs() - defer logs.FlushLogs() - - config, err := controllerlib.GetConfig(config.ControllerConfig.Kubeconfig) - if err != nil { - glog.Fatalf("Could not create Config for talking to the apiserver: %v", err) - } - - controllers, _ := controller.GetAllControllers(config) - controllerlib.StartControllerManager(controllers...) - - // Blockforever - select {} -} diff --git a/vendor/sigs.k8s.io/cluster-api/code-of-conduct.md b/vendor/sigs.k8s.io/cluster-api/code-of-conduct.md deleted file mode 100644 index 0d15c00cf32..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/sigs.k8s.io/cluster-api/docs/examples/cluster/cluster.yaml b/vendor/sigs.k8s.io/cluster-api/docs/examples/cluster/cluster.yaml deleted file mode 100644 index 9640cbfbe07..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/docs/examples/cluster/cluster.yaml +++ /dev/null @@ -1,7 +0,0 @@ -note: Cluster Example -sample: | - apiVersion: cluster.k8s.io/v1alpha1 - kind: Cluster - metadata: - name: cluster-example - spec: diff --git a/vendor/sigs.k8s.io/cluster-api/docs/examples/machine/machine.yaml b/vendor/sigs.k8s.io/cluster-api/docs/examples/machine/machine.yaml deleted file mode 100644 index 323c2c93831..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/docs/examples/machine/machine.yaml +++ /dev/null @@ -1,7 +0,0 @@ -note: Machine Example -sample: | - apiVersion: cluster.k8s.io/v1alpha1 - kind: Machine - metadata: - name: machine-example - spec: diff --git a/vendor/sigs.k8s.io/cluster-api/docs/examples/machinedeployment/machinedeployment.yaml b/vendor/sigs.k8s.io/cluster-api/docs/examples/machinedeployment/machinedeployment.yaml deleted file mode 100644 index c092b6acbe0..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/docs/examples/machinedeployment/machinedeployment.yaml +++ /dev/null @@ -1,7 +0,0 @@ -note: MachineDeployment Example -sample: | - apiVersion: cluster.k8s.io/v1alpha1 - kind: MachineDeployment - metadata: - name: machinedeployment-example - spec: diff --git a/vendor/sigs.k8s.io/cluster-api/docs/examples/machineset/machineset.yaml b/vendor/sigs.k8s.io/cluster-api/docs/examples/machineset/machineset.yaml deleted file mode 100644 index 47353ebb144..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/docs/examples/machineset/machineset.yaml +++ /dev/null @@ -1,7 +0,0 @@ -note: MachineSet Example -sample: | - apiVersion: cluster.k8s.io/v1alpha1 - kind: MachineSet - metadata: - name: machineset-example - spec: diff --git a/vendor/sigs.k8s.io/cluster-api/docs/proposals/machine-api-proposal.md b/vendor/sigs.k8s.io/cluster-api/docs/proposals/machine-api-proposal.md deleted file mode 100644 index 78e59d62b6d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/docs/proposals/machine-api-proposal.md +++ /dev/null @@ -1,164 +0,0 @@ -Minimalistic Machines API -========================= - -This proposal is for a minimalistic start to a new Machines API, as part of the -overall Cluster API project. It is intended to live outside of core Kubernetes -and add optional machine management features to Kubernetes clusters. - -## Capabilities - -This API strives to be able to add these capabilities: - -1. A new Node can be created in a declarative way, including Kubernetes version - and container runtime version. It should also be able to specify - provider-specific information such as OS image, instance type, disk - configuration, etc., though this will not be portable. - -2. A specific Node can be deleted, freeing external resources associated with - it. - -3. A specific Node can have its kubelet version upgraded or downgraded in a - declarative way\*. - -4. A specific Node can have its container runtime changed, or its version - upgraded or downgraded, in a declarative way\*. - -5. A specific Node can have its OS image upgraded or downgraded in a declarative - way\*. - -\* It is an implementation detail of the provider if these operations are -performed in-place or via Node replacement. - -## Proposal - -This proposal introduces a new API type: Machine. See the full definition in -[types.go](types.go). - -A "Machine" is the declarative spec for a Node, as represented in Kuberenetes -core. If a new Machine object is created, a provider-specific controller will -handle provisioning and installing a new host to register as a new Node matching -the Machine spec. If the Machine's spec is updated, a provider-specific -controller is responsible for updating the Node in-place or replacing the host -with a new one matching the updated spec. If a Machine object is deleted, the -corresponding Node should have its external resources released by the -provider-specific controller, and should be deleted as well. - -Fields like the kubelet version, the container runtime to use, and its version, -are modeled as fields on the Machine's spec. Any other information that is -provider-specific, though, is part of an opaque ProviderConfig string that is -not portable between different providers. - -The ProviderConfig is recommended to be a serialized API object in a format -owned by that provider, akin to the [Component Config](https://goo.gl/opSc2o) -pattern. This will allow the configuration to be strongly typed, versioned, and -have as much nested depth as appropriate. These provider-specific API -definitions are meant to live outside of the Machines API, which will allow them -to evolve independently of it. Attributes like instance type, which network to -use, and the OS image all belong in the ProviderConfig. - -## In-place vs. Replace - -One simplification that might be controversial in this proposal is the lack of -API control over "in-place" versus "replace" reconciliation strategies. For -instance, if a Machine's spec is updated with a different version of kubelet -than is actually running, it is up to the provider-specific controller whether -the request would best be fulfilled by performing an in-place upgrade on the -Node, or by deleting the Node and creating a new one in its place (or reporting -an error if this particular update is not supported). One can force a Node -replacement by deleting and recreating the Machine object rather than updating -it, but no similar mechanism exists to force an in-place change. - -Another approach considered was that modifying an existing Machine should only -ever attempt an in-place modification to the Node, and Node replacement should -only occur by deleting and creating a new Machine. In that case, a provider -would set an error field in the status if it wasn't able to fulfill the -requested in-place change (such as changing the OS image or instance type in a -cloud provider). - -The reason this approach wasn't used was because most cluster upgrade tools -built on top of the Machines API would follow the same pattern: - - for machine in machines: - attempt to upgrade machine in-place - if error: - create new machine - delete old machine - -Since updating a Node in-place is likely going to be faster than completely -replacing it, most tools would opt to use this pattern to attempt an in-place -modification first, before falling back to a full replacement. - -It seems like a much more powerful concept to allow every tool to instead say: - - for machine in machines: - update machine - -and allow the provider to decide if it is capable of performing an in-place -update, or if a full Node replacement is necessary. - -## Omitted Capabilities - -* A scalable representation of a group of nodes - -Given the existing targeted capabilities, this functionality could easily be -built client-side via label selectors to find groups of Nodes and using (1) and -(2) to add or delete instances to simulate this scaling. - -It is natural to extend this API in the future to introduce the concepts of -MachineSets and MachineDeployments that mirror ReplicaSets and Deployments, but -an initial goal is to first solidify the definition and behavior of a single -Machine, similar to how Kubernetes first solidifed Pods. - -A nice property of this proposal is that if provider controllers are written -solely against Machines, the concept of MachineSets can be implemented in a -provider-agnostic way with a generic controller that uses the MachineSet -template to create and delete Machine instances. All Machine-based provider -controllers will continue to work, and will get full MachineSet functionality -for free without modification. Similarly, a MachineDeployment controller could -then be introduced to generically operate on MachineSets without having to know -about Machines or providers. Provider-specific controllers that are actually -responsible for creating and deleting hosts would only ever have to worry about -individual Machine objects, unless they explicitly opt into watching -higher-level APIs like MachineSets in order to take advantage of -provider-specific features like AutoScalingGroups or Managed Instance Groups. - -However, this leaves the barrier to entry very low for adding new providers: -simply implement creation and deletion of individual Nodes, and get Sets and -Deployments for free. - -* A provider-agnostic mechanism to request new nodes - -In this proposal, only certain attributes of Machines are provider-agnostic and -can be operated on in a generic way. In other iterations of similar proposals, -much care had been taken to allow the creation of truly provider-agnostic -Machines that could be mapped to provider-specific attributes in order to better -support usecases around automated Machine scaling. This introduced a lot of -upfront complexity in the API proposals. - -This proposal starts much more minimalistic, but doesn't preclude the option of -extending the API to support these advanced concepts in the future. - -* Dynamic API endpoint - -This proposal lacks the ability to declaratively update the kube-apiserver -endpoint for the kubelet to register with. This feature could be added later, -but doesn't seem to have demand now. Rather than modeling the kube-apiserver -endpoint in the Machine object, it is expected that the cluster installation -tool resolves the correct endpoint to use, starts a provider-specific Machines -controller configured with this endpoint, and that the controller injects the -endpoint into any hosts it provisions. - -## Conditions - -Brian Grant and Eric Tune have indicated that the API pattern of having -"Conditions" lists in object statuses is soon to be deprecated. These have -generally been used as a timeline of state transitions for the object's -reconcilation, and difficult to consume for clients that just want a meaningful -representation of the object's current state. There are no existing examples of -the new pattern to follow instead, just the guidance that we should use -top-level fields in the status to reprensent meaningful information. We can -revisit the specifics when new patterns start to emerge in core. - -## Types - -Please see the full types [here](types.go). diff --git a/vendor/sigs.k8s.io/cluster-api/errors/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/errors/BUILD.bazel deleted file mode 100644 index a11f64dd659..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/errors/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "deployer.go", - "machines.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/errors", - importpath = "sigs.k8s.io/cluster-api/errors", - visibility = ["//visibility:public"], - deps = ["//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/errors/deployer.go b/vendor/sigs.k8s.io/cluster-api/errors/deployer.go deleted file mode 100644 index 8c7041dbfcf..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/errors/deployer.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package errors - -import ( - "fmt" -) - -var NotImplementedError = fmt.Errorf("not implemented") diff --git a/vendor/sigs.k8s.io/cluster-api/errors/machines.go b/vendor/sigs.k8s.io/cluster-api/errors/machines.go deleted file mode 100644 index fcd50f9f87b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/errors/machines.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package errors - -import ( - "fmt" - - commonerrors "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" -) - -// A more descriptive kind of error that represents an error condition that -// should be set in the Machine.Status. The "Reason" field is meant for short, -// enum-style constants meant to be interpreted by machines. The "Message" -// field is meant to be read by humans. -type MachineError struct { - Reason commonerrors.MachineStatusError - Message string -} - -func (e *MachineError) Error() string { - return e.Message -} - -// Some error builders for ease of use. They set the appropriate "Reason" -// value, and all arguments are Printf-style varargs fed into Sprintf to -// construct the Message. - -func InvalidMachineConfiguration(msg string, args ...interface{}) *MachineError { - return &MachineError{ - Reason: commonerrors.InvalidConfigurationMachineError, - Message: fmt.Sprintf(msg, args...), - } -} - -func CreateMachine(msg string, args ...interface{}) *MachineError { - return &MachineError{ - Reason: commonerrors.CreateMachineError, - Message: fmt.Sprintf(msg, args...), - } -} - -func DeleteMachine(msg string, args ...interface{}) *MachineError { - return &MachineError{ - Reason: commonerrors.DeleteMachineError, - Message: fmt.Sprintf(msg, args...), - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/.gitignore b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/.gitignore deleted file mode 100644 index 69546c0cd92..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -gcp-deployer -machines.yaml -cluster.yaml diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/BUILD.bazel deleted file mode 100644 index 8810cb6caee..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/gcp-deployer", - importpath = "sigs.k8s.io/cluster-api/gcp-deployer", - visibility = ["//visibility:private"], - deps = ["//vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd:go_default_library"], -) - -go_binary( - name = "gcp-deployer", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/CONTRIBUTING.md b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/CONTRIBUTING.md deleted file mode 100644 index 0c9be1aa549..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/CONTRIBUTING.md +++ /dev/null @@ -1,155 +0,0 @@ -# Contributing Guidelines - -## Prerequisites - -### Google Cloud Project - -If you don't have a Google Cloud Project, please [create one](https://cloud.google.com/resource-manager/docs/creating-managing-projects). - -### Install Google Cloud SDK (gcloud) - -Google Cloud SDK (gcloud) will be helpful for two reasons: -- Inspect GCP resources during development; -- Set configuration values that will be used during development (like project name). - -Steps to follow: -1. Install as per [Cloud SDK instructions](https://cloud.google.com/sdk/); -2. Configure Cloud SDK to point to the GCP project you will be using. - - ```bash - $ gcloud config set project - ``` - -### Set GCP Credentials - -In order to use the GCP machine controller, you need to configure the credentials so that the code has access to the GCP project where resources will be created. - -You can set it in two ways, as explained below. - -#### Environment Variable GOOGLE_APPLICATION_CREDENTIALS - -Steps to follow: -1. Verify that the environment variable `GOOGLE_APPLICATION_CREDENTIALS` is set pointing to valid service account credentials -2. If not set, follow the [instructions on Google Cloud Platform site](https://cloud.google.com/docs/authentication/getting-started) to have it set up. - -#### Login Using Cloud SDK - -The alternative is to set the client credentials via gcloud by executing the command line below. - -```bash -$ gcloud auth application-default login -``` - -### Create Firewall - -Create a firewall rule to allow communication from kubectl (and nodes) to the control plane. - - ```bash - gcloud compute firewall-rules create cluster-api-open --allow=TCP:443 --source-ranges=0.0.0.0/0 --target-tags='https-server' - ``` - -### Install Docker - -1. Install [Docker](https://docs.docker.com/install/) on your machine; -2. Make sure your user can execute docker commmands (without sudo). This is a way to test it: -```bash -$ docker run hello-world - -Hello from Docker! -This message shows that your installation appears to be working correctly. -... -``` - -### Install APIServer-Builder (Optional) - -If you need to rebuild container image for the extension APIServer and Controller Manager, you will need to install [APIServer-builder](https://github.com/kubernetes-incubator/apiserver-builder/blob/master/docs/installing.md) - -## Fetch Source Code - -1. Fork [cluster-api repo](https://github.com/kubernetes-sigs/cluster-api/). If it's your first time forking, please take a look at [GitHub Repo instructions](https://help.github.com/articles/fork-a-repo/). The general [Kubernetes GitHub workflow](https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md) is helpful here too if you're getting started. - -2. Clone Repo Locally -```bash -$ cd $GOPATH/src/sigs.k8s.io/ -$ git clone https://github.com//cluster-api.git -``` - -## Build - -```bash -$ cd $GOPATH/src/sigs.k8s.io/cluster-api/gcp-deployer/ -$ go build -``` - -This will create a binary `gcp-deployer` in the same directory. You can use that binary to manage a GCP cluster. - -## Developing - -When making changes to the machine controller, it's generally a good idea to delete any existing cluster created with an older version of the cluster-api. - -```bash -$ ./gcp-deployer delete -``` - -After making changes to the controllers or the actuator, you need to follow these two steps: - -1. Rebuild the machine-controller image. Also change `machineControllerImage` in `cloud/google/pods.go` to the new image path (make sure the version in the Makefile and `pods.go` match if you want to use the new image). Then, rebuild and push the image. - - ```bash - $ cd $GOPATH/src/sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller - $ make dev_push - ``` - -NOTE: that the image will be pushed to `gcr.io/$(GCLOUD_PROJECT)/apiserver-controller`. Image storage is a billable resource. - -2. Rebuild gcp-deployer - - ```bash - $ cd $GOPATH/src/sigs.k8s.io/cluster-api/gcp-deployer/ - $ go build - ``` - -The new `gcp-deployer` will have your changes. - -## Testing - -We do not have unit tests or integration tests currently. For any changes, it is recommended that you test a create-edit-delete sequence using the new machine controller image and the new `gcp-deployer` binary. - -1. Generate machines configuration file. - -This step is necessary to include the project name (as configured in Google Cloud SDK) in the yaml file. - -```bash -$ ./generate-yaml.sh -``` - -If Cloud SDK isn't configured, you will see an error like the one below: - -```bash -$ ./generate-yaml.sh -ERROR: (gcloud.config.get-value) Section [core] has no property [project]. -``` - -1. Create a cluster - - ```bash - $ ./gcp-deployer create -c cluster.yaml -m machines.yaml -s machine_setup_configs.yaml - ``` - - [Optional]To verify API server has been deployed successfully, you can the following command to double check. - - ```bash - $ kubectl get apiservices v1alpha1.cluster.k8s.io -o yaml - ``` - -2. Edit the machine to trigger an update - - ```bash - $ kubectl edit machine $MACHINE_NAME - ``` - -3. Make sure the new behavior is working as intended. Then delete the cluster. - - ```bash - $ ./gcp-deployer delete - ``` diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/README.md b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/README.md deleted file mode 100644 index 48a2f1320ea..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/README.md +++ /dev/null @@ -1,110 +0,0 @@ -## gcp-deployer is deprecated in favor of clusterctl. It will be deleted soon*. - -*\*after we change the integration test to use clusterctl, and cluster delete is implemented in clusterctl.* - -# Cluster API GCP Prototype - -The Cluster API GCP prototype implements the [Cluster API](../README.md) for GCP. - -## Getting Started - -### Prerequisites - -Follow the steps listed at [CONTRIBUTING.md](CONTRIBUTING.md) to: -1. Build the `gcp-deployer` tool -2. Generate base `machines.yaml` file configured for your GCP project -3. Login with gcloud `gcloud auth application-default login` - -### Limitation - -gcp-deployer tool only supports Kubernetes version 1.9 or newer. - -### Creating a cluster - -1. *Optional* update `machines.yaml` to give your preferred GCP zone in -each machine's `providerConfig` field. -1. *Optional*: Update `cluster.yaml` to set a custom cluster name. -1. Create a cluster: `./gcp-deployer create -c cluster.yaml -m machines.yaml -s machine_setup_configs.yaml -a /path/to/certificate/authority`. - 1. **Note**: The `--machinesetup` or `-s` flag is set to `machine_setup_configs.yaml` by default. - 1. Note: The `--certificate-authority-path` or `a` flag is optional. If not - supplied, then a certificate authority will be generated. - -During cluster creation, you can watch the machine resources get created in Kubernetes, -see the corresponding virtual machines created in GCP, and then finally see nodes -join the cluster: - -```bash -$ watch -n 5 "kubectl get machines" -$ watch -n 5 "gcloud compute instances list" -$ watch -n 5 "kubectl get nodes" -``` - - -### Interacting with your cluster - -Once you have created a cluster, you can interact with the cluster and machine -resources using kubectl: - -``` -$ kubectl get clusters -$ kubectl get machines -$ kubectl get machines -o yaml -``` - -#### Scaling your cluster - -You can add machines to your cluster using `kubectl apply` or `kubectl create`. - -#### Upgrading your cluster - -By default, your cluster will initially be running Kubernetes version 1.9.4. You -can upgrade the control plane or nodes using `kubectl edit` or you can run the -[upgrader tool](../tools/upgrader) -to upgrade your entire cluster with a single command. - -#### Node repair - -To test node repair, first pick a node, ssh into it, and "break" it by killing the `kubelet` process: - -``` -$ node=$(kubectl get nodes --no-headers | grep -v master | head -n 1 | awk '{print $1}') -$ gcloud compute ssh $node --zone us-central1-f -# sudo systemctl stop kubelet.service -# sudo systemctl daemon-reload -``` - -Then run the [node repair -tool]( ../tools/repair) -to find the broken node (using the dry run flag) and fix it. - - -### Deleting a cluster - -***NOTE***: Before deleting your cluster, it is recommended that you delete any Kubernetes -objects which have created resources external to the cluster, like services with type LoadBalancer, -some types of persistent volume claims, and ingress resources. - -To delete your cluster run `./gcp-deployer delete` - - -### How does the prototype work? - -Right now, the Cluster and Machine objects are stored as resources in an extension apiserver, which -connected with main apiserver through api aggregation. We deploy the extension API server and -controller manager as a pod inside the cluster. Like other resources in Kubernetes, machine -controller as part of controller manager is responsible to reconcile the actual vs. desired machine -state. Bootstrapping and in-place upgrading is handled by -[kubeadm](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/). - -### Machine Setup Configs - -The `machine_setup_configs.yaml` file defines what machine setups are supported -(i.e. what machine definitions are allowed in `machines.yaml`). -Here is an [example yaml](machine_setup_configs.yaml) with a master config and a node config. -You are free to edit this file to support other machine setups (i.e. different versions, images, or startup scripts). -The yaml is unmarshalled into a [machinesetup.configList](../cloud/google/machinesetup/config_types.go). - -#### Startup Scripts -Right now, the startup scripts must be bash scripts. -There is a set of environment variables that is concatenated to the beginning of the startup script. -You can find them [here](../cloud/google/metadata.go) and use them in your startup script as needed. diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cluster.yaml.template b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cluster.yaml.template deleted file mode 100644 index 128884a53f0..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cluster.yaml.template +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: "cluster.k8s.io/v1alpha1" -kind: Cluster -metadata: - name: test1 -spec: - clusterNetwork: - services: - cidrBlocks: ["10.96.0.0/12"] - pods: - cidrBlocks: ["192.168.0.0/16"] - serviceDomain: "cluster.local" - providerConfig: - value: - apiVersion: "gceproviderconfig/v1alpha1" - kind: "GCEClusterProviderConfig" - project: "$GCLOUD_PROJECT" diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/BUILD.bazel deleted file mode 100644 index 8141f18e845..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "add.go", - "create.go", - "delete.go", - "root.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd", - importpath = "sigs.k8s.io/cluster-api/gcp-deployer/cmd", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/cert:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/add.go b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/add.go deleted file mode 100644 index e575bf660bc..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/add.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "os" - - "github.com/golang/glog" - "github.com/spf13/cobra" - "sigs.k8s.io/cluster-api/gcp-deployer/deploy" -) - -type AddOptions struct { - Machine string -} - -var ao = &AddOptions{} - -var addCmd = &cobra.Command{ - Use: "add", - Short: "Add nodes to cluster", - Long: `Add nodes to cluster`, - Run: func(cmd *cobra.Command, args []string) { - if ao.Machine == "" { - glog.Error("Please provide yaml file for machine definition.") - cmd.Help() - os.Exit(1) - } - if err := RunAdd(ao); err != nil { - glog.Exit(err) - } - }, -} - -func RunAdd(ao *AddOptions) error { - machines, err := parseMachinesYaml(ao.Machine) - if err != nil { - return err - } - - d := deploy.NewDeployer(provider, kubeConfig, "", nil) - - return d.AddNodes(machines) -} -func init() { - addCmd.Flags().StringVarP(&ao.Machine, "machines", "m", "", "machine yaml file") - - RootCmd.AddCommand(addCmd) -} diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/create.go b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/create.go deleted file mode 100644 index 84b2ee0d645..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/create.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "os" - - "github.com/golang/glog" - "github.com/spf13/cobra" - "sigs.k8s.io/cluster-api/gcp-deployer/deploy" - "sigs.k8s.io/cluster-api/pkg/cert" -) - -type CreateOptions struct { - Cluster string - Machine string - MachineSetup string - CertificateAuthorityPath string -} - -var co = &CreateOptions{} - -var createCmd = &cobra.Command{ - Use: "create", - Short: "Create kubernetes cluster", - Long: `Create a kubernetes cluster with one command`, - Run: func(cmd *cobra.Command, args []string) { - if co.Cluster == "" { - glog.Error("Please provide yaml file for cluster definition.") - cmd.Help() - os.Exit(1) - } - if co.Machine == "" { - glog.Error("Please provide yaml file for machine definition.") - cmd.Help() - os.Exit(1) - } - if co.MachineSetup == "" { - glog.Error("Please provide yaml file for machine setup configs.") - cmd.Help() - os.Exit(1) - } - if err := RunCreate(co); err != nil { - glog.Exit(err) - } - }, -} - -func RunCreate(co *CreateOptions) error { - cluster, err := parseClusterYaml(co.Cluster) - if err != nil { - return err - } - - machines, err := parseMachinesYaml(co.Machine) - if err != nil { - return err - } - - ca, err := loadCA() - if err != nil { - return err - } - - d := deploy.NewDeployer(provider, kubeConfig, co.MachineSetup, ca) - - return d.CreateCluster(cluster, machines) -} - -func init() { - createCmd.Flags().StringVarP(&co.Cluster, "cluster", "c", "", "cluster yaml file") - createCmd.Flags().StringVarP(&co.Machine, "machines", "m", "", "machine yaml file") - createCmd.Flags().StringVarP(&co.MachineSetup, "machinesetup", "s", "machine_setup_configs.yaml", "machine setup configs yaml file") - caHelpMessage := `optional path to a custom certificate authority to be used on a new cluster, path can be one of the following: - 1. directory: a path to a directory, the directory must contain two files named ca.crt and ca.key containing the certificate and private key respectively. - 2. certificate: a path to a certificate file, ${filename}.crt, the file must end with extension '.crt' and there must be a file named ${filename}.key in the same directory. - 3. key: a path to a key file, ${filename}.key, the file must end with extension '.key' and there must be a file named ${filename}.crt in the same directory.` - createCmd.Flags().StringVarP(&co.CertificateAuthorityPath, "certificate-authority-path", "a", "", caHelpMessage) - - RootCmd.AddCommand(createCmd) -} - -func loadCA() (*cert.CertificateAuthority, error) { - if co.CertificateAuthorityPath == "" { - return nil, nil - } - return cert.Load(co.CertificateAuthorityPath) -} diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/delete.go b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/delete.go deleted file mode 100644 index 64195df6635..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/delete.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "github.com/golang/glog" - "github.com/spf13/cobra" - "sigs.k8s.io/cluster-api/gcp-deployer/deploy" -) - -var deleteCmd = &cobra.Command{ - Use: "delete", - Short: "Delete kubernetes cluster", - Long: `Delete a kubernetes cluster with one command`, - Run: func(cmd *cobra.Command, args []string) { - if err := RunDelete(); err != nil { - glog.Exit(err) - } - }, -} - -func RunDelete() error { - d := deploy.NewDeployer(provider, kubeConfig, "", nil) - return d.DeleteCluster() -} - -func init() { - RootCmd.AddCommand(deleteCmd) -} diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/root.go b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/root.go deleted file mode 100644 index b9161679955..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/cmd/root.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "flag" - "io/ioutil" - - "github.com/ghodss/yaml" - "github.com/golang/glog" - "github.com/spf13/cobra" - "k8s.io/apiserver/pkg/util/logs" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" -) - -var RootCmd = &cobra.Command{ - Use: "gcp-deployer", - Short: "cluster management", - Long: `Simple kubernetes cluster management`, - Run: func(cmd *cobra.Command, args []string) { - // Do Stuff Here - cmd.Help() - }, -} - -var ( - kubeConfig string - provider string -) - -func Execute() { - if err := RootCmd.Execute(); err != nil { - glog.Exit(err) - } -} - -func parseClusterYaml(file string) (*clusterv1.Cluster, error) { - bytes, err := ioutil.ReadFile(file) - if err != nil { - return nil, err - } - - cluster := &clusterv1.Cluster{} - err = yaml.Unmarshal(bytes, cluster) - if err != nil { - return nil, err - } - - return cluster, nil -} - -func parseMachinesYaml(file string) ([]*clusterv1.Machine, error) { - bytes, err := ioutil.ReadFile(file) - if err != nil { - return nil, err - } - - machines := &clusterv1.MachineList{} - err = yaml.Unmarshal(bytes, &machines) - if err != nil { - return nil, err - } - - return util.MachineP(machines.Items), nil -} - -func init() { - RootCmd.PersistentFlags().StringVarP(&provider, "provider", "p", "google", "cloud provider google/azure/aws") - RootCmd.PersistentFlags().StringVarP(&kubeConfig, "kubeconfig", "k", "", "location for the kubernetes config file. If not provided, $HOME/.kube/config is used") - flag.CommandLine.Parse([]string{}) - logs.InitLogs() -} diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/BUILD.bazel deleted file mode 100644 index 2c93f692611..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/BUILD.bazel +++ /dev/null @@ -1,28 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "deploy.go", - "deploy_helper.go", - "machinedeployer.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy", - importpath = "sigs.k8s.io/cluster-api/gcp-deployer/deploy", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/plugin/pkg/client/auth/gcp:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/cloud/google/machinesetup:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/cert:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/machine:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/deploy.go b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/deploy.go deleted file mode 100644 index 8ae43d0c6b7..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/deploy.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package deploy - -import ( - "fmt" - "os" - - "github.com/golang/glog" - - "k8s.io/client-go/kubernetes" - "sigs.k8s.io/cluster-api/cloud/google" - "sigs.k8s.io/cluster-api/cloud/google/machinesetup" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/cert" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" - apiutil "sigs.k8s.io/cluster-api/util" -) - -type deployer struct { - token string - configPath string - machineDeployer machineDeployer - client v1alpha1.ClusterV1alpha1Interface - clientSet clientset.Interface - kubernetesClientSet kubernetes.Clientset -} - -// NewDeployer returns a cloud provider specific deployer and -// sets kubeconfig path for the cluster to be deployed -func NewDeployer(provider string, kubeConfigPath string, machineSetupConfigPath string, ca *cert.CertificateAuthority) *deployer { - token := util.RandomToken() - if kubeConfigPath == "" { - kubeConfigPath = os.Getenv("KUBECONFIG") - if kubeConfigPath == "" { - kubeConfigPath = apiutil.GetDefaultKubeConfigPath() - } - } else { - // This is needed for kubectl commands run later to create secret in function - // CreateMachineControllerServiceAccount - if err := os.Setenv("KUBECONFIG", kubeConfigPath); err != nil { - glog.Exit(fmt.Sprintf("Failed to set Kubeconfig path err %v\n", err)) - } - } - configWatch, err := newConfigWatchOrNil(machineSetupConfigPath) - if err != nil { - glog.Exit(fmt.Sprintf("Could not create config watch: %v\n", err)) - } - params := google.MachineActuatorParams{ - CertificateAuthority: ca, - MachineSetupConfigGetter: configWatch, - } - ma, err := google.NewMachineActuator(params) - if err != nil { - glog.Exit(err) - } - return &deployer{ - token: token, - machineDeployer: ma, - configPath: kubeConfigPath, - } -} - -func (d *deployer) CreateCluster(c *clusterv1.Cluster, machines []*clusterv1.Machine) error { - vmCreated := false - if err := d.createCluster(c, machines, &vmCreated); err != nil { - if vmCreated { - d.deleteMasterVM(c, machines) - } - d.machineDeployer.PostDelete(c, machines) - return err - } - - glog.Infof("The [%s] cluster has been created successfully!", c.Name) - glog.Info("You can now `kubectl get nodes`") - return nil -} - -func (d *deployer) AddNodes(machines []*clusterv1.Machine) error { - if err := d.createMachines(machines); err != nil { - return err - } - return nil -} - -func (d *deployer) DeleteCluster() error { - if err := d.initApiClient(); err != nil { - return err - } - - machines, err := d.listMachines() - if err != nil { - return err - } - - cluster, err := d.getCluster() - if err != nil { - return err - } - - glog.Info("Deleting machine objects") - if err := d.deleteAllMachines(); err != nil { - return err - } - - glog.Info("Deleting master VM") - if err := d.deleteMasterVM(cluster, machines); err != nil { - glog.Errorf("Error deleting master vm", err) - } - - glog.Info("Running post delete operations") - if err := d.machineDeployer.PostDelete(cluster, machines); err != nil { - return err - } - glog.Infof("Deletion complete") - return nil -} - -func (d *deployer) deleteMasterVM(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error { - master := util.GetMaster(machines) - if master == nil { - return fmt.Errorf("error deleting master vm, no master found") - } - - glog.Infof("Deleting master vm %s", master.Name) - if err := d.machineDeployer.Delete(cluster, master); err != nil { - return err - } - return nil -} - -func newConfigWatchOrNil(machineSetupConfigPath string) (*machinesetup.ConfigWatch, error) { - if machineSetupConfigPath == "" { - return nil, nil - } - return machinesetup.NewConfigWatch(machineSetupConfigPath) -} diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/deploy_helper.go b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/deploy_helper.go deleted file mode 100644 index c92dbb50cae..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/deploy_helper.go +++ /dev/null @@ -1,326 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package deploy - -import ( - "crypto/tls" - "fmt" - "net/http" - "os" - "time" - - "github.com/golang/glog" - apiv1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" -) - -const ( - MasterIPAttempts = 40 - SleepSecondsPerAttempt = 5 - ServiceAccountNs = "kube-system" - ServiceAccountName = "default" -) - -func (d *deployer) createCluster(c *clusterv1.Cluster, machines []*clusterv1.Machine, vmCreated *bool) error { - if c.GetName() == "" { - return fmt.Errorf("cluster name must be specified for cluster creation") - } - master := util.GetMaster(machines) - if master == nil { - return fmt.Errorf("master spec must be provided for cluster creation") - } - - if master.GetName() == "" && master.GetGenerateName() == "" { - return fmt.Errorf("master name must be specified for cluster creation") - } - - if master.GetName() == "" { - master.Name = master.GetGenerateName() + c.GetName() - } - - glog.Infof("Starting cluster dependency creation %s", c.GetName()) - - if err := d.machineDeployer.ProvisionClusterDependencies(c, machines); err != nil { - return err - } - - glog.Infof("Starting cluster creation %s", c.GetName()) - - glog.Infof("Starting master creation %s", master.GetName()) - - if err := d.machineDeployer.Create(c, master); err != nil { - return err - } - - *vmCreated = true - glog.Infof("Created master %s", master.GetName()) - - masterIP, err := d.getMasterIP(c, master) - if err != nil { - return fmt.Errorf("unable to get master IP: %v", err) - } - - if err := d.copyKubeConfig(c, master); err != nil { - return fmt.Errorf("unable to write kubeconfig: %v", err) - } - - if err := d.waitForApiserver(masterIP); err != nil { - return fmt.Errorf("apiserver never came up: %v", err) - } - - if err := d.initApiClient(); err != nil { - return err - } - - if err := d.waitForServiceAccount(); err != nil { - return fmt.Errorf("service account %s/%s not found: %v", ServiceAccountNs, ServiceAccountName, err) - } - - glog.Info("Deploying the addon apiserver and controller manager...") - if err := d.machineDeployer.CreateMachineController(c, machines, d.kubernetesClientSet); err != nil { - return fmt.Errorf("can't create machine controller: %v", err) - } - - glog.Info("Creating additional cluster resources...") - if err := d.machineDeployer.PostCreate(c, machines); err != nil { - return fmt.Errorf("can't create additional cluster resources: %v", err) - } - - if err := d.waitForClusterResourceReady(); err != nil { - return fmt.Errorf("cluster resource isn't ready: %v", err) - } - - c, err = d.client.Clusters(apiv1.NamespaceDefault).Create(c) - if err != nil { - return fmt.Errorf("can't create cluster: %v", err) - } - - c.Status.APIEndpoints = append(c.Status.APIEndpoints, - clusterv1.APIEndpoint{ - Host: masterIP, - Port: 443, - }) - if _, err := d.client.Clusters(apiv1.NamespaceDefault).UpdateStatus(c); err != nil { - return fmt.Errorf("can't update status: %v", err) - } - - if err := d.createMachines(machines); err != nil { - return fmt.Errorf("can't create machines: %v", err) - } - return nil -} - -func (d *deployer) waitForClusterResourceReady() error { - err := util.Poll(500*time.Millisecond, 120*time.Second, func() (bool, error) { - _, err := d.clientSet.Discovery().ServerResourcesForGroupVersion("cluster.k8s.io/v1alpha1") - if err == nil { - return true, nil - } - return false, nil - }) - - return err -} - -func (d *deployer) createMachines(machines []*clusterv1.Machine) error { - for _, machine := range machines { - m, err := d.client.Machines(apiv1.NamespaceDefault).Create(machine) - if err != nil { - return err - } - glog.Infof("Added machine [%s]", m.Name) - } - return nil -} - -func (d *deployer) createMachine(m *clusterv1.Machine) error { - return d.createMachines([]*clusterv1.Machine{m}) -} - -func (d *deployer) deleteAllMachines() error { - machines, err := d.client.Machines(apiv1.NamespaceDefault).List(metav1.ListOptions{}) - if err != nil { - return err - } - glog.Infof("Deleting non-master machines...") - var deletedMachineNames []string - for _, m := range machines.Items { - if !util.IsMaster(&m) { - err = d.client.Machines(apiv1.NamespaceDefault).Delete(m.Name, &metav1.DeleteOptions{}) - if err != nil { - return err - } - deletedMachineNames = append(deletedMachineNames, m.Name) - glog.Infof("Deleted machine object %s", m.Name) - } - } - for _, name := range deletedMachineNames { - err = d.ensureDeletionCompleted(name) - if err != nil { - return err - } - } - return nil -} - -func (d *deployer) delete(name string) error { - err := d.client.Machines(apiv1.NamespaceDefault).Delete(name, &metav1.DeleteOptions{}) - if err != nil { - return err - } - err = d.ensureDeletionCompleted(name) - return err -} - -func (d *deployer) ensureDeletionCompleted(machineName string) error { - err := util.Poll(500*time.Millisecond, 240*time.Second, func() (bool, error) { - if _, err := d.client.Machines(apiv1.NamespaceDefault).Get(machineName, metav1.GetOptions{}); err == nil { - return false, nil - } - return true, nil - }) - if err != nil { - return fmt.Errorf("unable to ensure machine %v has been deleted: %v", machineName, err) - } - return err -} - -func (d *deployer) listMachines() ([]*clusterv1.Machine, error) { - machines, err := d.client.Machines(apiv1.NamespaceDefault).List(metav1.ListOptions{}) - if err != nil { - return nil, err - } - return util.MachineP(machines.Items), nil -} - -func (d *deployer) getCluster() (*clusterv1.Cluster, error) { - clusters, err := d.client.Clusters(apiv1.NamespaceDefault).List(metav1.ListOptions{}) - if err != nil { - return nil, err - } - if len(clusters.Items) != 1 { - return nil, fmt.Errorf("cluster object count != 1") - } - return &clusters.Items[0], nil -} - -func (d *deployer) getMasterIP(cluster *clusterv1.Cluster, master *clusterv1.Machine) (string, error) { - for i := 0; i < MasterIPAttempts; i++ { - ip, err := d.machineDeployer.GetIP(cluster, master) - if err != nil || ip == "" { - glog.Info("Hanging for master IP...") - time.Sleep(time.Duration(SleepSecondsPerAttempt) * time.Second) - continue - } - return ip, nil - } - return "", fmt.Errorf("unable to find Master IP after defined wait") -} - -func (d *deployer) copyKubeConfig(cluster *clusterv1.Cluster, master *clusterv1.Machine) error { - writeErr := util.Retry(func() (bool, error) { - glog.Infof("Waiting for Kubernetes to come up...") - config, err := d.machineDeployer.GetKubeConfig(cluster, master) - if err != nil { - glog.Errorf("Error while retriving kubeconfig %s", err) - return false, err - } - if config == "" { - return false, nil - } - glog.Infof("Kubernetes is up.. Writing kubeconfig to disk.") - err = d.writeConfigToDisk(config) - return (err == nil), nil - }, 5) - - if writeErr != nil { - return fmt.Errorf("timedout writing kubeconfig: %s", writeErr) - } - return nil -} - -func (d *deployer) initApiClient() error { - c, err := util.NewClientSet(d.configPath) - if err != nil { - return err - } - kubernetesClientSet, err := util.NewKubernetesClient(d.configPath) - if err != nil { - return err - } - d.clientSet = c - d.client = c.ClusterV1alpha1() - d.kubernetesClientSet = *kubernetesClientSet - return nil - -} -func (d *deployer) writeConfigToDisk(config string) error { - file, err := os.Create(d.configPath) - if err != nil { - return err - } - if _, err := file.WriteString(config); err != nil { - return err - } - defer file.Close() - - file.Sync() // flush - glog.Infof("wrote kubeconfig to [%s]", d.configPath) - return nil -} - -// Make sure you successfully call setMasterIp first. -func (d *deployer) waitForApiserver(master string) error { - endpoint := fmt.Sprintf("https://%s/healthz", master) - - // Skip certificate validation since we're only looking for signs of - // health, and we're not going to have the CA in our default chain. - tr := &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, - } - client := &http.Client{Transport: tr} - - waitErr := util.Retry(func() (bool, error) { - glog.Info("Waiting for apiserver to become healthy...") - resp, err := client.Get(endpoint) - return (err == nil && resp.StatusCode == 200), nil - }, 3) - - if waitErr != nil { - glog.Errorf("Error waiting for apiserver: %s", waitErr) - return waitErr - } - return nil -} - -// Make sure the default service account in kube-system namespace exists. -func (d *deployer) waitForServiceAccount() error { - waitErr := util.Retry(func() (bool, error) { - glog.Info("Waiting for the service account to exist...") - _, err := d.kubernetesClientSet.CoreV1().ServiceAccounts(ServiceAccountNs).Get(ServiceAccountName, metav1.GetOptions{}) - return (err == nil), nil - }, 5) - - if waitErr != nil { - glog.Errorf("Error waiting for service account: %s", waitErr) - return waitErr - } - return nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/machinedeployer.go b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/machinedeployer.go deleted file mode 100644 index c7d71477503..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/deploy/machinedeployer.go +++ /dev/null @@ -1,27 +0,0 @@ -package deploy - -import ( - "k8s.io/client-go/kubernetes" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/controller/machine" -) - -// Provider-specific machine logic the deployer needs. -type machineDeployer interface { - machine.Actuator - GetIP(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error) - GetKubeConfig(cluster *clusterv1.Cluster, master *clusterv1.Machine) (string, error) - - // Provision infrastructure that the cluster needs before it - // can be created - ProvisionClusterDependencies(*clusterv1.Cluster, []*clusterv1.Machine) error - // Create and start the machine controller. The list of initial - // machines don't have to be reconciled as part of this function, but - // are provided in case the function wants to refer to them (and their - // ProviderConfigs) to know how to configure the machine controller. - // Not idempotent. - CreateMachineController(cluster *clusterv1.Cluster, initialMachines []*clusterv1.Machine, clientSet kubernetes.Clientset) error - // Create GCE and kubernetes resources after the cluster is created - PostCreate(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error - PostDelete(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error -} diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/generate-yaml.sh b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/generate-yaml.sh deleted file mode 100755 index 920a785247e..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/generate-yaml.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -set -e - -GCLOUD_PROJECT=$(gcloud config get-value project) -ZONE=$(gcloud config get-value compute/zone) -ZONE="${ZONE:-us-central1-f}" - -MACHINE_TEMPLATE_FILE=machines.yaml.template -MACHINE_GENERATED_FILE=machines.yaml -CLUSTER_TEMPLATE_FILE=cluster.yaml.template -CLUSTER_GENERATED_FILE=cluster.yaml -OVERWRITE=0 - -SCRIPT=$(basename $0) -while test $# -gt 0; do - case "$1" in - -h|--help) - echo "$SCRIPT - generates input yaml files for Cluster API on Google Cloud Platform" - echo " " - echo "$SCRIPT [options]" - echo " " - echo "options:" - echo "-h, --help show brief help" - echo "-f, --force-overwrite if file to be generated already exists, force script to overwrite it" - exit 0 - ;; - -f) - OVERWRITE=1 - shift - ;; - --force-overwrite) - OVERWRITE=1 - shift - ;; - *) - break - ;; - esac -done - -if [ $OVERWRITE -ne 1 ] && [ -f $MACHINE_GENERATED_FILE ]; then - echo File $MACHINE_GENERATED_FILE already exists. Delete it manually before running this script. - exit 1 -fi - -if [ $OVERWRITE -ne 1 ] && [ -f $CLUSTER_GENERATED_FILE ]; then - echo File $CLUSTER_GENERATED_FILE already exists. Delete it manually before running this script. - exit 1 -fi - -sed -e "s/\$ZONE/$ZONE/" $MACHINE_TEMPLATE_FILE > $MACHINE_GENERATED_FILE - -sed -e "s/\$GCLOUD_PROJECT/$GCLOUD_PROJECT/" $CLUSTER_TEMPLATE_FILE > $CLUSTER_GENERATED_FILE diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/machine_setup_configs.yaml b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/machine_setup_configs.yaml deleted file mode 100644 index 27a707d815d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/machine_setup_configs.yaml +++ /dev/null @@ -1,228 +0,0 @@ -items: -- machineParams: - - os: ubuntu-1604-lts - roles: - - Master - versions: - kubelet: 1.9.4 - controlPlane: 1.9.4 - image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts - metadata: - startupScript: | - set -e - set -x - ( - ARCH=amd64 - - function curl_metadata() { - curl --retry 5 --silent --fail --header "Metadata-Flavor: Google" "http://metadata/computeMetadata/v1/instance/$@" - } - - curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - - touch /etc/apt/sources.list.d/kubernetes.list - sh -c 'echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list' - apt-get update -y - apt-get install -y \ - socat \ - ebtables \ - apt-transport-https \ - cloud-utils \ - prips - - function install_configure_docker () { - # prevent docker from auto-starting - echo "exit 101" > /usr/sbin/policy-rc.d - chmod +x /usr/sbin/policy-rc.d - trap "rm /usr/sbin/policy-rc.d" RETURN - apt-get install -y docker.io - echo 'DOCKER_OPTS="--iptables=false --ip-masq=false"' > /etc/default/docker - systemctl daemon-reload - systemctl enable docker - systemctl start docker - } - install_configure_docker - - curl -sSL https://dl.k8s.io/release/${VERSION}/bin/linux/${ARCH}/kubeadm > /usr/bin/kubeadm.dl - chmod a+rx /usr/bin/kubeadm.dl - # kubeadm uses 10th IP as DNS server - CLUSTER_DNS_SERVER=$(prips ${SERVICE_CIDR} | head -n 11 | tail -n 1) - # Our Debian packages have versions like "1.8.0-00" or "1.8.0-01". Do a prefix - # search based on our SemVer to find the right (newest) package version. - function getversion() { - name=$1 - prefix=$2 - version=$(apt-cache madison $name | awk '{ print $3 }' | grep ^$prefix | head -n1) - if [[ -z "$version" ]]; then - echo Can\'t find package $name with prefix $prefix - exit 1 - fi - echo $version - } - KUBELET=$(getversion kubelet ${KUBELET_VERSION}-) - KUBEADM=$(getversion kubeadm ${KUBELET_VERSION}-) - apt-get install -y \ - kubelet=${KUBELET} \ - kubeadm=${KUBEADM} - mv /usr/bin/kubeadm.dl /usr/bin/kubeadm - chmod a+rx /usr/bin/kubeadm - - # Override network args to use kubenet instead of cni, override Kubelet DNS args and - # add cloud provider args. - cat > /etc/systemd/system/kubelet.service.d/20-kubenet.conf < /tmp/.ip - PUBLICIP=`curl_metadata "network-interfaces/0/access-configs/0/external-ip"` - - # Set up the GCE cloud config, which gets picked up by kubeadm init since cloudProvider is set to GCE. - cat > /etc/kubernetes/cloud-config < /etc/kubernetes/kubeadm_config.yaml < ${CA_CERT_PATH} - chmod 0644 ${CA_CERT_PATH} - CA_KEY_PATH=${PKI_PATH}/ca.key - curl_metadata "attributes/ca-key" | base64 -d > ${CA_KEY_PATH} - chmod 0600 ${CA_KEY_PATH} - } - - # Create and set bridge-nf-call-iptables to 1 to pass the kubeadm preflight check. - # Workaround was found here: - # http://zeeshanali.com/sysadmin/fixed-sysctl-cannot-stat-procsysnetbridgebridge-nf-call-iptables/ - modprobe br_netfilter - - install_certificates - - kubeadm init --config /etc/kubernetes/kubeadm_config.yaml - - for tries in $(seq 1 60); do - kubectl --kubeconfig /etc/kubernetes/kubelet.conf annotate --overwrite node $(hostname) machine=${MACHINE} && break - sleep 1 - done - echo done. - ) 2>&1 | tee /var/log/startup.log -- machineParams: - - os: ubuntu-1604-lts - roles: - - Node - versions: - kubelet: 1.9.4 - image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts - metadata: - startupScript: | - set -e - set -x - ( - apt-get update - apt-get install -y apt-transport-https prips - apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys F76221572C52609D - cat < /etc/apt/sources.list.d/k8s.list - deb [arch=amd64] https://apt.dockerproject.org/repo ubuntu-xenial main - EOF - apt-get update - - function install_configure_docker () { - # prevent docker from auto-starting - echo "exit 101" > /usr/sbin/policy-rc.d - chmod +x /usr/sbin/policy-rc.d - trap "rm /usr/sbin/policy-rc.d" RETURN - apt-get install -y docker-engine=1.12.0-0~xenial - echo 'DOCKER_OPTS="--iptables=false --ip-masq=false"' > /etc/default/docker - systemctl daemon-reload - systemctl enable docker - systemctl start docker - } - - install_configure_docker - - curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - - cat < /etc/apt/sources.list.d/kubernetes.list - deb http://apt.kubernetes.io/ kubernetes-xenial main - EOF - apt-get update - - mkdir -p /etc/kubernetes/ - cat > /etc/kubernetes/cloud-config < /etc/systemd/system/kubelet.service.d/20-kubenet.conf <&1 | tee /var/log/startup.log diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/machines.yaml.template b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/machines.yaml.template deleted file mode 100644 index 4852425178f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/machines.yaml.template +++ /dev/null @@ -1,46 +0,0 @@ -items: -- apiVersion: "cluster.k8s.io/v1alpha1" - kind: Machine - metadata: - generateName: gce-master- - labels: - set: master - spec: - providerConfig: - value: - apiVersion: "gceproviderconfig/v1alpha1" - kind: "GCEMachineProviderConfig" - zone: "$ZONE" - machineType: "n1-standard-2" - os: "ubuntu-1604-lts" - disks: - - initializeParams: - diskSizeGb: 30 - diskType: "pd-standard" - versions: - kubelet: 1.9.4 - controlPlane: 1.9.4 - roles: - - Master -- apiVersion: "cluster.k8s.io/v1alpha1" - kind: Machine - metadata: - generateName: gce-node- - labels: - set: node - spec: - providerConfig: - value: - apiVersion: "gceproviderconfig/v1alpha1" - kind: "GCEMachineProviderConfig" - zone: "$ZONE" - machineType: "n1-standard-1" - os: "ubuntu-1604-lts" - disks: - - initializeParams: - diskSizeGb: 30 - diskType: "pd-standard" - versions: - kubelet: 1.9.4 - roles: - - Node diff --git a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/main.go b/vendor/sigs.k8s.io/cluster-api/gcp-deployer/main.go deleted file mode 100644 index eaa7cf3cd4c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/gcp-deployer/main.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import "sigs.k8s.io/cluster-api/gcp-deployer/cmd" - -func main() { - cmd.Execute() -} diff --git a/vendor/sigs.k8s.io/cluster-api/kubeadm/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/kubeadm/BUILD.bazel deleted file mode 100644 index 0cb3c7b275d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/kubeadm/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["kubeadm.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/kubeadm", - importpath = "sigs.k8s.io/cluster-api/kubeadm", - visibility = ["//visibility:public"], - deps = ["//vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner:go_default_library"], -) - -go_test( - name = "go_default_test", - srcs = ["kubeadm_test.go"], - embed = [":go_default_library"], - deps = ["//vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner:go_default_library"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/kubeadm/kubeadm.go b/vendor/sigs.k8s.io/cluster-api/kubeadm/kubeadm.go deleted file mode 100644 index 31d8487620b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/kubeadm/kubeadm.go +++ /dev/null @@ -1,74 +0,0 @@ -package kubeadm - -import ( - "sigs.k8s.io/cluster-api/pkg/cmd-runner" - "strings" - "time" -) - -type Kubeadm struct { - runner cmd_runner.CmdRunner -} - -// see https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-token/ for an explanation of the parameters -type TokenCreateParams struct { - Config string - Description string - Groups []string - Help bool - PrintJoinCommand bool - Ttl time.Duration - Usages []string -} - -func NewWithCmdRunner(runner cmd_runner.CmdRunner) *Kubeadm { - return &Kubeadm{ - runner: runner, - } -} - -func New() *Kubeadm { - return NewWithCmdRunner(cmd_runner.New()) -} - -func (k *Kubeadm) TokenCreate(params TokenCreateParams) (string, error) { - args := []string{"token", "create"} - args = appendStringParamIfPresent(args, "--config", params.Config) - args = appendStringParamIfPresent(args, "--description", params.Description) - args = appendStringSliceIfValid(args, "--groups", params.Groups) - args = appendFlagIfTrue(args, "--help", params.Help) - args = appendFlagIfTrue(args, "--print-join-command", params.PrintJoinCommand) - if params.Ttl != time.Duration(0) { - args = append(args, "--ttl") - args = append(args, params.Ttl.String()) - } - args = appendStringSliceIfValid(args, "--usages", params.Usages) - return k.runner.CombinedOutput("kubeadm", args...) -} - -func appendFlagIfTrue(args []string, paramName string, value bool) []string { - if value { - return append(args, paramName) - } - return args -} - -func appendStringParamIfPresent(args []string, paramName string, value string) []string { - if value == "" { - return args - } - args = append(args, paramName) - return append(args, value) -} - -func appendStringSliceIfValid(args []string, paramName string, values []string) []string { - if len(values) == 0 { - return args - } - args = append(args, paramName) - return append(args, toStringSlice(values)) -} - -func toStringSlice(args []string) string { - return strings.Join(args, ":") -} diff --git a/vendor/sigs.k8s.io/cluster-api/kubeadm/kubeadm_test.go b/vendor/sigs.k8s.io/cluster-api/kubeadm/kubeadm_test.go deleted file mode 100644 index ff7e5fa7468..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/kubeadm/kubeadm_test.go +++ /dev/null @@ -1,103 +0,0 @@ -package kubeadm_test - -import ( - "fmt" - "os" - "sigs.k8s.io/cluster-api/kubeadm" - "strings" - "testing" - "time" - "sigs.k8s.io/cluster-api/pkg/test-cmd-runner" -) - -var ( - joinCommand = "kubeadm join --token a53d73.21029eb48b9002d0 35.199.169.93:443 --discovery-token-ca-cert-hash sha256:3bb9ee3aa3cee9898b85523e8dd6921752e07e3053453084c8d26d40d929a132" - errorExitCode = -1 - errorMessage = "error message" -) - -func init() { - test_cmd_runner.RegisterCallback(echoCallback) - test_cmd_runner.RegisterCallback(errorCallback) - test_cmd_runner.RegisterCallback(tokenCallback) -} - -func TestTokenCreateParameters(t *testing.T) { - var tests = []struct { - name string - err error - output string - params kubeadm.TokenCreateParams - }{ - {"empty params", nil, "kubeadm token create", kubeadm.TokenCreateParams{}}, - {"config", nil, "kubeadm token create --config /my/path/to/kubeadm-config", kubeadm.TokenCreateParams{Config: "/my/path/to/kubeadm-config"}}, - {"description", nil, "kubeadm token create --description my custom description", kubeadm.TokenCreateParams{Description: "my custom description"}}, - {"groups", nil, "kubeadm token create --groups system:bootstrappers:kubeadm:default-node-token", kubeadm.TokenCreateParams{Groups: []string{"system", "bootstrappers", "kubeadm", "default-node-token"}}}, - {"help", nil, "kubeadm token create --help", kubeadm.TokenCreateParams{Help: true}}, - {"print join command", nil, "kubeadm token create --print-join-command", kubeadm.TokenCreateParams{PrintJoinCommand: true}}, - {"ttl 24 hours", nil, "kubeadm token create --ttl 24h0m0s", kubeadm.TokenCreateParams{Ttl: toDuration(24, 0, 0)}}, - {"ttl 55 minutes", nil, "kubeadm token create --ttl 55m0s", kubeadm.TokenCreateParams{Ttl: toDuration(0, 55, 0)}}, - {"ttl 9 seconds", nil, "kubeadm token create --ttl 9s", kubeadm.TokenCreateParams{Ttl: toDuration(0, 0, 9)}}, - {"ttl 1 second", nil, "kubeadm token create --ttl 1s", kubeadm.TokenCreateParams{Ttl: toDuration(0, 0, 1)}}, - {"ttl 16 hours, 38 minutes, 2 seconds", nil, "kubeadm token create --ttl 16h38m2s", kubeadm.TokenCreateParams{Ttl: toDuration(16, 38, 2)}}, - {"usages", nil, "kubeadm token create --usages signing:authentication", kubeadm.TokenCreateParams{Usages: []string{"signing", "authentication"}}}, - {"all", nil, "kubeadm token create --config /my/config --description my description --groups bootstrappers --help --print-join-command --ttl 1h1m1s --usages authentication", - kubeadm.TokenCreateParams{Config: "/my/config", Description: "my description", Groups: []string{"bootstrappers"}, Help: true, PrintJoinCommand: true, Ttl: toDuration(1, 1, 1), Usages: []string{"authentication"}}}, - } - kadm := kubeadm.NewWithCmdRunner(test_cmd_runner.NewTestRunnerFailOnErr(t, echoCallback)) - for _, tst := range tests { - output, err := kadm.TokenCreate(tst.params) - if err != tst.err { - t.Errorf("test case '%v', unexpected error: got '%v', want '%v'", tst.name, err, tst.err) - } - if output != tst.output { - t.Errorf("test case '%v', unexpected output: got '%v', want '%v'", tst.name, output, tst.output) - } - } -} - -func TestTokenCreateReturnsUnmodifiedOutput(t *testing.T) { - kadm := kubeadm.NewWithCmdRunner(test_cmd_runner.NewTestRunnerFailOnErr(t, tokenCallback)) - output, err := kadm.TokenCreate(kubeadm.TokenCreateParams{}) - if err != nil { - t.Errorf("unexpected error: wanted nil") - } - if output != joinCommand { - t.Errorf("unexpected output: got '%v', want '%v'", output, joinCommand) - } -} - -func TestNonZeroExitCodeResultsInError(t *testing.T) { - kadm := kubeadm.NewWithCmdRunner(test_cmd_runner.NewTestRunnerFailOnErr(t, errorCallback)) - output, err := kadm.TokenCreate(kubeadm.TokenCreateParams{}) - if err == nil { - t.Errorf("expected error: got nil") - } - if output != errorMessage { - t.Errorf("unexpected output: got '%v', want '%v'", output, errorMessage) - } -} - -func echoCallback(cmd string, args ...string) int { - fullCmd := append([]string{cmd}, args...) - fmt.Print(strings.Join(fullCmd, " ")) - return 0 -} - -func tokenCallback(cmd string, args ...string) int { - fmt.Print(joinCommand) - return 0 -} - -func errorCallback(cmd string, args ...string) int { - fmt.Fprintf(os.Stderr, errorMessage) - return errorExitCode -} - -func TestMain(m *testing.M) { - test_cmd_runner.TestMain(m) -} - -func toDuration(hour int, minute int, second int) time.Duration { - return time.Duration(hour)*time.Hour + time.Duration(minute)*time.Minute + time.Duration(second)*time.Second -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/BUILD deleted file mode 100644 index cc3236f17b6..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/BUILD +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["doc.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg", - importpath = "sigs.k8s.io/cluster-api/pkg", - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/apis/BUILD deleted file mode 100644 index 0270856af79..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/BUILD +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "zz_generated.api.register.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/apis", - importpath = "sigs.k8s.io/cluster-api/pkg/apis", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/builders:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/BUILD.bazel similarity index 100% rename from vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/BUILD rename to vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/BUILD.bazel diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/BUILD deleted file mode 100644 index a06751f1481..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "zz_generated.api.register.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install", - importpath = "sigs.k8s.io/cluster-api/pkg/apis/cluster/install", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/doc.go b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/doc.go deleted file mode 100644 index efef6840525..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/doc.go +++ /dev/null @@ -1,20 +0,0 @@ - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - -package install - diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/zz_generated.api.register.go b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/zz_generated.api.register.go deleted file mode 100644 index 5f919a5871c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/install/zz_generated.api.register.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by apiregister-gen. Do not edit it manually! - -package install - -import ( - "k8s.io/apimachinery/pkg/apimachinery/announced" - "k8s.io/apimachinery/pkg/apimachinery/registered" - "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api/pkg/apis" -) - -func Install( - groupFactoryRegistry announced.APIGroupFactoryRegistry, - registry *registered.APIRegistrationManager, - scheme *runtime.Scheme) { - - apis.GetClusterAPIBuilder().Install(groupFactoryRegistry, registry, scheme) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/BUILD.bazel similarity index 57% rename from vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/BUILD rename to vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/BUILD.bazel index 84e712f7f6c..91ae9bcfc83 100644 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/BUILD +++ b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") +load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", @@ -34,28 +34,3 @@ go_library( "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", ], ) - -go_test( - name = "go_default_test", - srcs = [ - "cluster_types_test.go", - "machine_types_test.go", - "machinedeployment_types_test.go", - "machineset_types_test.go", - "v1alpha1_suite_test.go", - ], - embed = [":go_default_library"], - importpath = "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1_test", - deps = [ - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/test:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/openapi:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/cluster_types_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/cluster_types_test.go deleted file mode 100644 index b59a1278b2c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/cluster_types_test.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1_test - -import ( - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" -) - -func crudAccessToClusterClient(t *testing.T, cs *clientset.Clientset) { - instance := testutil.GetVanillaCluster() - instance.Name = "instance-1" - - expected := instance - - // When sending a storage request for a valid config, - // it should provide CRUD access to the object. - client := cs.ClusterV1alpha1().Clusters("cluster-test-valid") - - // Test that the create request returns success. - actual, err := client.Create(&instance) - if err != nil { - t.Fatal(err) - } - defer client.Delete(instance.Name, &metav1.DeleteOptions{}) - if !reflect.DeepEqual(actual.Spec, expected.Spec) { - t.Fatalf( - "Default fields were not set correctly.\nActual:\t%+v\nExpected:\t%+v", - actual.Spec, expected.Spec) - } - - // Test getting the created item for list requests. - result, err := client.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if itemLength := len(result.Items); itemLength != 1 { - t.Fatalf("Number of items in Items list should be 1, but is %d.", itemLength) - } - if resultSpec := result.Items[0].Spec; !reflect.DeepEqual(resultSpec, expected.Spec) { - t.Fatalf( - "Item returned from list is not equal to the expected item.\nActual:\t%+v\nExpected:\t%+v", - resultSpec, expected.Spec) - } - - // Test getting the created item for get requests. - actual, err = client.Get(instance.Name, metav1.GetOptions{}) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual.Spec, expected.Spec) { - t.Fatalf( - "Item returned from get is not equal to the expected item.\nActual:\t%+v\nExpected:\t%+v", - actual.Spec, expected.Spec) - } - - // Test deleting the item for delete requests. - actual.Finalizers = nil - if _, updateErr := client.Update(actual); updateErr != nil { - t.Fatal(updateErr) - } - if deleteErr := client.Delete(instance.Name, &metav1.DeleteOptions{}); deleteErr != nil { - t.Fatal(deleteErr) - } - result, err = client.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if itemLength := len(result.Items); itemLength != 0 { - t.Fatalf("Number of items in Items list should be 0, but is %d.", itemLength) - } -} - -func clusterValidationTest(t *testing.T, cs *clientset.Clientset) { - tests := []struct { - name string - cluster v1alpha1.Cluster - errExpected bool - }{ - { - name: "missing services", - cluster: v1alpha1.Cluster{ - Spec: v1alpha1.ClusterSpec{ - ClusterNetwork: v1alpha1.ClusterNetworkingConfig{ - Pods: v1alpha1.NetworkRanges{ - CIDRBlocks: []string{"192.168.0.0/16"}, - }, - ServiceDomain: "cluster.local", - }, - }, - }, - errExpected: true, - }, - { - name: "missing pods", - cluster: v1alpha1.Cluster{ - Spec: v1alpha1.ClusterSpec{ - ClusterNetwork: v1alpha1.ClusterNetworkingConfig{ - Services: v1alpha1.NetworkRanges{ - CIDRBlocks: []string{"10.96.0.0/12"}, - }, - ServiceDomain: "cluster.local", - }, - }, - }, - errExpected: true, - }, - { - name: "missing ServiceDomain", - cluster: v1alpha1.Cluster{ - Spec: v1alpha1.ClusterSpec{ - ClusterNetwork: v1alpha1.ClusterNetworkingConfig{ - Services: v1alpha1.NetworkRanges{ - CIDRBlocks: []string{"10.96.0.0/12"}, - }, - Pods: v1alpha1.NetworkRanges{ - CIDRBlocks: []string{"192.168.0.0/16"}, - }, - }, - }, - }, - errExpected: true, - }, - { - name: "positive test case", - cluster: v1alpha1.Cluster{ - Spec: v1alpha1.ClusterSpec{ - ClusterNetwork: v1alpha1.ClusterNetworkingConfig{ - Services: v1alpha1.NetworkRanges{ - CIDRBlocks: []string{"10.96.0.0/12"}, - }, - Pods: v1alpha1.NetworkRanges{ - CIDRBlocks: []string{"192.168.0.0/16"}, - }, - ServiceDomain: "cluster.local", - }, - }, - }, - errExpected: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - tt.cluster.Name = "cluster1" - client := cs.ClusterV1alpha1().Clusters("cluster-test-valid") - - if _, err := client.Create(&tt.cluster); (err != nil) != tt.errExpected { - t.Fatal(err) - } - client.Delete(tt.cluster.Name, &metav1.DeleteOptions{}) - }) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machine_types_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machine_types_test.go deleted file mode 100644 index ce58743a760..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machine_types_test.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1_test - -import ( - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" -) - -func crudAccessToMachineClient(t *testing.T, cs *clientset.Clientset) { - instance := v1alpha1.Machine{} - instance.Name = "instance-1" - - expected := instance - - // When sending a storage request for a valid config, - // it should provide CRUD access to the object. - client := cs.ClusterV1alpha1().Machines("machine-test-valid") - - // Test that the create request returns success. - actual, err := client.Create(&instance) - if err != nil { - t.Fatal(err) - } - defer client.Delete(instance.Name, &metav1.DeleteOptions{}) - if !reflect.DeepEqual(actual.Spec, expected.Spec) { - t.Fatalf( - "Default fields were not set correctly.\nActual:\t%+v\nExpected:\t%+v", - actual.Spec, expected.Spec) - } - - // Test getting the created item for list requests. - result, err := client.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if itemLength := len(result.Items); itemLength != 1 { - t.Fatalf("Number of items in Items list should be 1, but is %d.", itemLength) - } - if resultSpec := result.Items[0].Spec; !reflect.DeepEqual(resultSpec, expected.Spec) { - t.Fatalf( - "Item returned from list is not equal to the expected item.\nActual:\t%+v\nExpected:\t%+v", - resultSpec, expected.Spec) - } - - // Test getting the created item for get requests. - actual, err = client.Get(instance.Name, metav1.GetOptions{}) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual.Spec, expected.Spec) { - t.Fatalf( - "Item returned from get is not equal to the expected item.\nActual:\t%+v\nExpected:\t%+v", - actual.Spec, expected.Spec) - } - - // Test deleting the item for delete requests. - actual.Finalizers = nil - if _, updateErr := client.Update(actual); updateErr != nil { - t.Fatal(updateErr) - } - if deleteErr := client.Delete(instance.Name, &metav1.DeleteOptions{}); deleteErr != nil { - t.Fatal(deleteErr) - } - result, err = client.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if itemLength := len(result.Items); itemLength != 0 { - t.Fatalf("Number of items in Items list should be 0, but is %d.", itemLength) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machinedeployment_types_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machinedeployment_types_test.go deleted file mode 100644 index de4938c3448..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machinedeployment_types_test.go +++ /dev/null @@ -1,429 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1_test - -import ( - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/apimachinery/pkg/util/intstr" - "sigs.k8s.io/cluster-api/pkg/apis/cluster" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" -) - -func TestMachineDeploymentValidationStrategy(t *testing.T) { - var badReplicaCount int32 = -1 - var goodReplicaCount int32 - var badStrategyType common.MachineDeploymentStrategyType = "BAD-STRATEGY" - var goodStrategyType common.MachineDeploymentStrategyType = "RollingUpdate" - badCount := intstr.FromInt(-3) - badPercent := intstr.FromString("-50%") - goodCount := intstr.FromInt(2) - goodPercent := intstr.FromString("15%") - zeroCount := intstr.FromInt(0) - zeroPercent := intstr.FromString("0%") - over100Percent := intstr.FromString("101%") - - tests := []struct { - name string - machineDeploymentToTest *cluster.MachineDeployment - expectError bool - }{ - { - name: "scenario 1: a machine deployment with empty selector is not valid", - machineDeploymentToTest: &cluster.MachineDeployment{ - Spec: cluster.MachineDeploymentSpec{ - Replicas: &goodReplicaCount, - }, - }, - expectError: true, - }, - { - name: "scenario 2: a machine deployment with valid selector but with empty template.Labels is not valid", - machineDeploymentToTest: &cluster.MachineDeployment{ - Spec: cluster.MachineDeploymentSpec{ - Replicas: &goodReplicaCount, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - }, - }, - }, - expectError: true, - }, - { - name: "scenario 3: a machine deployment with valid selector and with corresponding template.Labels is valid", - machineDeploymentToTest: &cluster.MachineDeployment{ - Spec: cluster.MachineDeploymentSpec{ - Replicas: &goodReplicaCount, - Strategy: cluster.MachineDeploymentStrategy{ - Type: "RollingUpdate", - }, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - }, - Template: cluster.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"foo": "bar"}, - }, - }, - }, - }, - expectError: false, - }, - { - name: "scenario 4: a machine deployment with valid selector but w/o corresponding template.Labels is not valid", - machineDeploymentToTest: &cluster.MachineDeployment{ - Spec: cluster.MachineDeploymentSpec{ - Replicas: &goodReplicaCount, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - }, - Template: cluster.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"bar": "foo"}, - }, - }, - }, - }, - expectError: true, - }, - { - name: "scenario 5: a machine deployment with bad replicas", - machineDeploymentToTest: &cluster.MachineDeployment{ - Spec: cluster.MachineDeploymentSpec{ - Replicas: &badReplicaCount, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - }, - Template: cluster.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"foo": "bar"}, - }, - }, - }, - }, - expectError: true, - }, - { - name: "scenario 6: a machine deployment with good replicas", - machineDeploymentToTest: &cluster.MachineDeployment{ - Spec: cluster.MachineDeploymentSpec{ - Replicas: &goodReplicaCount, - Strategy: cluster.MachineDeploymentStrategy{ - Type: "RollingUpdate", - }, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - }, - Template: cluster.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"foo": "bar"}, - }, - }, - }, - }, - expectError: false, - }, - { - name: "scenario 7: a machine deployment with bad strategy", - machineDeploymentToTest: &cluster.MachineDeployment{ - Spec: cluster.MachineDeploymentSpec{ - Replicas: &goodReplicaCount, - Strategy: cluster.MachineDeploymentStrategy{ - Type: badStrategyType, - }, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - }, - Template: cluster.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"foo": "bar"}, - }, - }, - }, - }, - expectError: true, - }, - { - name: "scenario 8: a machine deployment with good strategy", - machineDeploymentToTest: &cluster.MachineDeployment{ - Spec: cluster.MachineDeploymentSpec{ - Replicas: &goodReplicaCount, - Strategy: cluster.MachineDeploymentStrategy{ - Type: goodStrategyType, - }, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - }, - Template: cluster.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"foo": "bar"}, - }, - }, - }, - }, - expectError: false, - }, - { - name: "scenario 9: a machine deployment with bad MaxUnavailable count", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&badCount, nil), - expectError: true, - }, - { - name: "scenario 10: a machine deployment with bad MaxUnavailable percent", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&badPercent, nil), - expectError: true, - }, - { - name: "scenario 11: a machine deployment with good MaxUnavailable count", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&goodCount, nil), - expectError: false, - }, - { - name: "scenario 12: a machine deployment with good MaxUnavailable percent", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&goodPercent, nil), - expectError: false, - }, - { - name: "scenario 13: a machine deployment with over 100 MaxUnavailable percent", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&over100Percent, nil), - expectError: true, - }, - { - name: "scenario 14: a machine deployment with zero MaxUnavailable count", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&zeroCount, nil), - expectError: false, - }, - { - name: "scenario 15: a machine deployment with zero MaxUnavailable percent", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&zeroPercent, nil), - expectError: false, - }, - { - name: "scenario 16: a machine deployment with bad MaxSurge count", - machineDeploymentToTest: getRollingUpdateMachineDeployment(nil, &badCount), - expectError: true, - }, - { - name: "scenario 17: a machine deployment with bad MaxSurge percent", - machineDeploymentToTest: getRollingUpdateMachineDeployment(nil, &badPercent), - expectError: true, - }, - { - name: "scenario 18: a machine deployment with good MaxSurge count", - machineDeploymentToTest: getRollingUpdateMachineDeployment(nil, &goodCount), - expectError: false, - }, - { - name: "scenario 19: a machine deployment with good MaxSurge percent", - machineDeploymentToTest: getRollingUpdateMachineDeployment(nil, &goodPercent), - expectError: false, - }, - { - name: "scenario 20: a machine deployment with over 100 MaxSurge percent", - machineDeploymentToTest: getRollingUpdateMachineDeployment(nil, &over100Percent), - expectError: false, - }, - { - name: "scenario 21: a machine deployment with zero MaxSurge count", - machineDeploymentToTest: getRollingUpdateMachineDeployment(nil, &zeroCount), - expectError: false, - }, - { - name: "scenario 22: a machine deployment with zero MaxSurge percent", - machineDeploymentToTest: getRollingUpdateMachineDeployment(nil, &zeroPercent), - expectError: false, - }, - { - name: "scenario 23: a machine deployment with bad MaxUnavailable/MaxSurge both 0", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&zeroCount, &zeroCount), - expectError: true, - }, - { - name: "scenario 24: a machine deployment with bad MaxUnavailable/MaxSurge both 0%", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&zeroPercent, &zeroPercent), - expectError: true, - }, - { - name: "scenario 25: a machine deployment with good MaxUnavailable count, MaxSurge percent", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&goodCount, &goodPercent), - expectError: false, - }, - { - name: "scenario 26: a machine deployment with good MaxUnavailable percent, MaxSurge count", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&goodPercent, &goodCount), - expectError: false, - }, - { - name: "scenario 27: a machine deployment with good MaxUnavailable count, MaxSurge count", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&goodCount, &goodCount), - expectError: false, - }, - { - name: "scenario 28: a machine deployment with good MaxUnavailable percent, MaxSurge percent", - machineDeploymentToTest: getRollingUpdateMachineDeployment(&goodPercent, &goodPercent), - expectError: false, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - // setup the test scenario - ctx := genericapirequest.NewDefaultContext() - target := v1alpha1.MachineDeploymentValidationStrategy{} - - // act - errors := target.Validate(ctx, test.machineDeploymentToTest) - - // validate - if len(errors) > 0 && !test.expectError { - t.Fatalf("an unexpected error was returned = %v", errors) - } - if test.expectError && len(errors) == 0 { - t.Fatal("expected an error but non was returned") - } - - }) - } -} - -func getRollingUpdateMachineDeployment(unavailable, surge *intstr.IntOrString) *cluster.MachineDeployment { - var goodReplicaCount int32 - d := cluster.MachineDeployment{ - Spec: cluster.MachineDeploymentSpec{ - Replicas: &goodReplicaCount, - Strategy: cluster.MachineDeploymentStrategy{ - Type: "RollingUpdate", - RollingUpdate: &cluster.MachineRollingUpdateDeployment{ - }, - }, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - }, - Template: cluster.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"foo": "bar"}, - }, - }, - }, - } - if unavailable != nil { - d.Spec.Strategy.RollingUpdate.MaxUnavailable = unavailable - } - if surge != nil { - d.Spec.Strategy.RollingUpdate.MaxSurge = surge - } - return &d -} - -func crudAccessToMachineDeploymentClient(t *testing.T, cs *clientset.Clientset) { - instance := v1alpha1.MachineDeployment{ - Spec: v1alpha1.MachineDeploymentSpec{ - - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo": "bar"}, - }, - Template: v1alpha1.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"foo": "bar"}, - }, - }, - }, - } - instance.Name = "instance-1" - - expected := instance.DeepCopy() - // Defaulted fields. - var replicas int32 = 1 - expected.Spec.Replicas = &replicas - var minReadySeconds int32 - expected.Spec.MinReadySeconds = &minReadySeconds - var limit int32 = 1 - expected.Spec.RevisionHistoryLimit = &limit - var deadline int32 = 600 - expected.Spec.ProgressDeadlineSeconds = &deadline - expected.Spec.Strategy.Type = common.RollingUpdateMachineDeploymentStrategyType - unavailable := intstr.FromInt(0) - surge := intstr.FromInt(1) - rollingUpdate := v1alpha1.MachineRollingUpdateDeployment{ - MaxUnavailable: &unavailable, - MaxSurge: &surge, - } - expected.Spec.Strategy.RollingUpdate = &rollingUpdate - - // When sending a storage request for a valid config, - // it should provide CRUD access to the object. - client := cs.ClusterV1alpha1().MachineDeployments("default") - - // Test that the create request returns success. - actual, err := client.Create(&instance) - if err != nil { - t.Fatal(err) - } - defer client.Delete(instance.Name, &metav1.DeleteOptions{}) - if !reflect.DeepEqual(actual.Spec, expected.Spec) { - t.Fatalf( - "Default fields were not set correctly.\nActual:\t%+v\nExpected:\t%+v", - actual.Spec, expected.Spec) - } - - // Test getting the created item for list requests. - result, err := client.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if itemLength := len(result.Items); itemLength != 1 { - t.Fatalf("Number of items in Items list should be 1, but is %d.", itemLength) - } - if resultSpec := result.Items[0].Spec; !reflect.DeepEqual(resultSpec, expected.Spec) { - t.Fatalf( - "Item returned from list is not equal to the expected item.\nActual:\t%+v\nExpected:\t%+v", - resultSpec, expected.Spec) - } - - // Test getting the created item for get requests. - actual, err = client.Get(instance.Name, metav1.GetOptions{}) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual.Spec, expected.Spec) { - t.Fatalf( - "Item returned from get is not equal to the expected item.\nActual:\t%+v\nExpected:\t%+v", - actual.Spec, expected.Spec) - } - - actual.Finalizers = nil - // Test updating the item, removing the finalizer. - if _, updateErr := client.Update(actual); updateErr != nil { - t.Fatal(updateErr) - } - // Test deleting the item for delete requests. - if deleteErr := client.Delete(instance.Name, &metav1.DeleteOptions{}); deleteErr != nil { - t.Fatal(deleteErr) - } - result, err = client.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if itemLength := len(result.Items); itemLength != 0 { - t.Fatalf("Number of items in Items list should be 0, but is %d.", itemLength) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineset_types_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineset_types_test.go deleted file mode 100644 index 483105a472a..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineset_types_test.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1_test - -import ( - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/apis/cluster" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" -) - -func TestValidateMachineSetStrategy(t *testing.T) { - tests := []struct { - name string - machineSetToTest *cluster.MachineSet - expectError bool - }{ - { - name: "scenario 1: a machine with empty selector is not valid", - machineSetToTest: &cluster.MachineSet{}, - expectError: true, - }, - { - name: "scenario 2: a machine with valid selector but with empty template.Labels is not valid", - machineSetToTest: &cluster.MachineSet{ - Spec: cluster.MachineSetSpec{ - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo":"bar"}, - }, - }, - }, - expectError: true, - }, - { - name: "scenario 3: a machine with valid selector and with corresponding template.Labels is valid", - machineSetToTest: &cluster.MachineSet{ - Spec: cluster.MachineSetSpec{ - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo":"bar"}, - }, - Template: cluster.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"foo":"bar"}, - }, - }, - }, - }, - expectError: false, - }, - { - name: "scenario 4: a machine with valid selector but w/o corresponding template.Labels is not valid", - machineSetToTest: &cluster.MachineSet{ - Spec: cluster.MachineSetSpec{ - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo":"bar"}, - }, - Template: cluster.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"bar":"foo"}, - }, - }, - }, - }, - expectError: true, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - // setup the test scenario - ctx := genericapirequest.NewDefaultContext() - target := v1alpha1.MachineSetStrategy{} - - // act - errors := target.Validate(ctx, test.machineSetToTest) - - // validate - if len(errors) > 0 && !test.expectError { - t.Fatalf("an unexpected error was returned = %v", errors) - } - if test.expectError && len(errors) ==0 { - t.Fatal("expected an error but non was returned") - } - - }) - } - -} - -func crudAccessToMachineSetClient(t *testing.T, cs *clientset.Clientset) { - instance := v1alpha1.MachineSet{ - Spec: v1alpha1.MachineSetSpec{ - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{"foo":"bar"}, - }, - Template: v1alpha1.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"foo":"bar"}, - }, - }, - }, - } - instance.Name = "instance-1" - - expected := instance.DeepCopy() - // Defaulted fields. - var replicas int32 = 1 - expected.Spec.Replicas = &replicas - - // When sending a storage request for a valid config, - // it should provide CRUD access to the object. - client := cs.ClusterV1alpha1().MachineSets("default") - - // Test that the create request returns success. - actual, err := client.Create(&instance) - if err != nil { - t.Fatal(err) - } - defer client.Delete(instance.Name, &metav1.DeleteOptions{}) - if !reflect.DeepEqual(actual.Spec, expected.Spec) { - t.Fatalf( - "Default fields were not set correctly.\nActual:\t%+v\nExpected:\t%+v", - actual.Spec, expected.Spec) - } - - // Test getting the created item for list requests. - result, err := client.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if itemLength := len(result.Items); itemLength != 1 { - t.Fatalf("Number of items in Items list should be 1, but is %d.", itemLength) - } - if resultSpec := result.Items[0].Spec; !reflect.DeepEqual(resultSpec, expected.Spec) { - t.Fatalf( - "Item returned from list is not equal to the expected item.\nActual:\t%+v\nExpected:\t%+v", - resultSpec, expected.Spec) - } - - // Test getting the created item for get requests. - actual, err = client.Get(instance.Name, metav1.GetOptions{}) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(actual.Spec, expected.Spec) { - t.Fatalf( - "Item returned from get is not equal to the expected item.\nActual:\t%+v\nExpected:\t%+v", - actual.Spec, expected.Spec) - } - - // Test deleting the item for delete requests. - actual.Finalizers = nil - if _, updateErr := client.Update(actual); updateErr != nil { - t.Fatal(updateErr) - } - if deleteErr := client.Delete(instance.Name, &metav1.DeleteOptions{}); deleteErr != nil { - t.Fatal(deleteErr) - } - result, err = client.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if itemLength := len(result.Items); itemLength != 0 { - t.Fatalf("Number of items in Items list should be 0, but is %d.", itemLength) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil/BUILD.bazel deleted file mode 100644 index d532ab2b983..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil/BUILD.bazel +++ /dev/null @@ -1,10 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["testutil.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil", - importpath = "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil", - visibility = ["//visibility:public"], - deps = ["//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil/testutil.go b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil/testutil.go deleted file mode 100644 index 2af50c96d8c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil/testutil.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testutil - -import "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - -// GetVanillaCluster return a bare minimum functional cluster resource object -func GetVanillaCluster() v1alpha1.Cluster { - return v1alpha1.Cluster{ - Spec: v1alpha1.ClusterSpec{ - ClusterNetwork: v1alpha1.ClusterNetworkingConfig{ - Services: v1alpha1.NetworkRanges{ - CIDRBlocks: []string{"10.96.0.0/12"}, - }, - Pods: v1alpha1.NetworkRanges{ - CIDRBlocks: []string{"192.168.0.0/16"}, - }, - ServiceDomain: "cluster.local", - }, - }, - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/v1alpha1_suite_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/v1alpha1_suite_test.go deleted file mode 100644 index 9c7b23dd551..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/v1alpha1_suite_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1_test - -import ( - "testing" - - "github.com/kubernetes-incubator/apiserver-builder/pkg/test" - - "sigs.k8s.io/cluster-api/pkg/apis" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/pkg/openapi" -) - -func TestV1alpha1(t *testing.T) { - testenv := test.NewTestEnvironment() - config := testenv.Start(apis.GetAllApiBuilders(), openapi.GetOpenAPIDefinitions) - cs := clientset.NewForConfigOrDie(config) - - t.Run("crudAccessToClusterClient", func(t *testing.T) { - crudAccessToClusterClient(t, cs) - }) - t.Run("clusterValidationTest", func(t *testing.T) { - clusterValidationTest(t, cs) - }) - t.Run("crudAccessToMachineClient", func(t *testing.T) { - crudAccessToMachineClient(t, cs) - }) - t.Run("crudAccessToMachineSetClient", func(t *testing.T) { - crudAccessToMachineSetClient(t, cs) - }) - t.Run("crudAccessToMachineDeploymentClient", func(t *testing.T) { - crudAccessToMachineDeploymentClient(t, cs) - }) - - testenv.Stop() -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/doc.go b/vendor/sigs.k8s.io/cluster-api/pkg/apis/doc.go deleted file mode 100644 index f370d725169..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/doc.go +++ /dev/null @@ -1,24 +0,0 @@ - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - -// -// +domain=k8s.io - -package apis - diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/apis/zz_generated.api.register.go b/vendor/sigs.k8s.io/cluster-api/pkg/apis/zz_generated.api.register.go deleted file mode 100644 index 7a701062d94..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/apis/zz_generated.api.register.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by apiregister-gen. Do not edit it manually! - -package apis - -import ( - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders" - "sigs.k8s.io/cluster-api/pkg/apis/cluster" - clusterv1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// GetAllApiBuilders returns all known APIGroupBuilders -// so they can be registered with the apiserver -func GetAllApiBuilders() []*builders.APIGroupBuilder { - return []*builders.APIGroupBuilder{ - GetClusterAPIBuilder(), - } -} - -var clusterApiGroup = builders.NewApiGroupBuilder( - "cluster.k8s.io", - "sigs.k8s.io/cluster-api/pkg/apis/cluster"). - WithUnVersionedApi(cluster.ApiVersion). - WithVersionedApis( - clusterv1alpha1.ApiVersion, - ). - WithRootScopedKinds() - -func GetClusterAPIBuilder() *builders.APIGroupBuilder { - return clusterApiGroup -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/cert/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/pkg/cert/BUILD.bazel deleted file mode 100644 index cef14c647f5..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/cert/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["cert_authority.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/cert", - importpath = "sigs.k8s.io/cluster-api/pkg/cert", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/golang/glog:go_default_library"], -) - -go_test( - name = "go_default_test", - srcs = ["cert_authority_test.go"], - embed = [":go_default_library"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/cert/cert_authority.go b/vendor/sigs.k8s.io/cluster-api/pkg/cert/cert_authority.go deleted file mode 100644 index aabb12448b3..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/cert/cert_authority.go +++ /dev/null @@ -1,73 +0,0 @@ -package cert - -import ( - "fmt" - "github.com/golang/glog" - "io/ioutil" - "os" - "path/filepath" -) - -type CertificateAuthority struct { - Certificate []byte - PrivateKey []byte -} - -// Load takes a given path to what is presumed to be a valid certificate authority and attempts to load both the -// certificate and private key. If the path is a directory then it is assumed that there are two files "ca.crt" and -// "ca.key" which represent the certificate and private key respectively. -// -// If the argument is not a directory, it must be a file ending in either of the .crt or .key extensions. Load will -// read the given file and attempt to load the other associated file. For example, if the path given is /path/to/my-ca.crt, -// then load will attempt to load the private key file at /path/to/my-ca.key. -func Load(caPath string) (*CertificateAuthority, error) { - glog.Infof("Loading certificate authority from %v", caPath) - certPath, keyPath, err := certPathToCertAndKeyPaths(caPath) - if err != nil { - return nil, err - } - certMaterial, err := ioutil.ReadFile(certPath) - if err != nil { - return nil, fmt.Errorf("unable to read cert %v: %v", certPath, err) - } - keyMaterial, err := ioutil.ReadFile(keyPath) - if err != nil { - return nil, fmt.Errorf("unable to read key %v: %v", keyPath, err) - } - ca := CertificateAuthority{ - Certificate: certMaterial, - PrivateKey: keyMaterial, - } - return &ca, nil -} - -func certPathToCertAndKeyPaths(caPath string) (string, string, error) { - fi, err := os.Stat(caPath) - if err != nil { - return "", "", err - } - var certPath, keyPath string - if fi.IsDir() { - certPath = filepath.Join(caPath, "ca.crt") - keyPath = filepath.Join(caPath, "ca.key") - } else { - ext := filepath.Ext(caPath) - switch ext { - case ".crt": - certPath = caPath - keyPath = caPath[0:len(caPath)-len(ext)] + ".key" - case ".key": - certPath = caPath[0:len(caPath)-len(ext)] + ".crt" - keyPath = caPath - default: - return "", "", fmt.Errorf("unable to use certificate authority, not directory, .crt, or .key file: %v", caPath) - } - } - if _, err := os.Stat(certPath); err != nil { - return "", "", fmt.Errorf("unable to use certificate file: %v (%v)", certPath, err) - } - if _, err := os.Stat(keyPath); err != nil { - return "", "", fmt.Errorf("unable to use key file: %v (%v)", keyPath, err) - } - return certPath, keyPath, err -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/cert/cert_authority_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/cert/cert_authority_test.go deleted file mode 100644 index 057ecbb9666..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/cert/cert_authority_test.go +++ /dev/null @@ -1,131 +0,0 @@ -package cert_test - -import ( - "io/ioutil" - "os" - "path" - "sigs.k8s.io/cluster-api/pkg/cert" - "testing" -) - -var ( - defaultCertMaterial = "this is the cert contents" - defaultKeyMaterial = "this is the key contents" -) - -func TestEmptyPath(t *testing.T) { - _, err := cert.Load("") - if err == nil { - t.Errorf("expected error, got nil") - } -} - -func TestInvalidPath(t *testing.T) { - _, err := cert.Load("/my/invalid/path") - if err == nil { - t.Errorf("expected error, got nil") - } -} - -func TestDirWithMissingKey(t *testing.T) { - dir := newTempDir(t) - defer os.RemoveAll(dir) - newCaDirectory(t, dir, &defaultCertMaterial, nil) - _, err := cert.Load(dir) - if err == nil { - t.Errorf("expected error, got nil") - } -} - -func TestDirWithMissingCert(t *testing.T) { - dir := newTempDir(t) - defer os.RemoveAll(dir) - newCaDirectory(t, dir, nil, &defaultKeyMaterial) - _, err := cert.Load(dir) - if err == nil { - t.Errorf("expected error, got nil") - } -} - -func TestDirHappyPath(t *testing.T) { - dir := newTempDir(t) - defer os.RemoveAll(dir) - newCaDirectory(t, dir, &defaultCertMaterial, &defaultKeyMaterial) - ca, err := cert.Load(dir) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - actualCertMaterial := string(ca.Certificate) - if actualCertMaterial != defaultCertMaterial { - t.Errorf("expected '%v' got '%v'", defaultCertMaterial, actualCertMaterial) - } - actualKeyMaterial := string(ca.PrivateKey) - if actualKeyMaterial != defaultKeyMaterial { - t.Errorf("expected '%v' got '%v'", defaultKeyMaterial, actualKeyMaterial) - } -} - -func TestCertPath(t *testing.T) { - dir := newTempDir(t) - defer os.RemoveAll(dir) - certPath, _ := newCaDirectory(t, dir, &defaultCertMaterial, &defaultKeyMaterial) - ca, err := cert.Load(certPath) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - actualCertMaterial := string(ca.Certificate) - if actualCertMaterial != defaultCertMaterial { - t.Errorf("expected '%v' got '%v'", defaultCertMaterial, actualCertMaterial) - } - actualKeyMaterial := string(ca.PrivateKey) - if actualKeyMaterial != defaultKeyMaterial { - t.Errorf("expected '%v' got '%v'", defaultKeyMaterial, actualKeyMaterial) - } -} - -func TestKeyPath(t *testing.T) { - dir := newTempDir(t) - defer os.RemoveAll(dir) - _, keyPath := newCaDirectory(t, dir, &defaultCertMaterial, &defaultKeyMaterial) - ca, err := cert.Load(keyPath) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - actualCertMaterial := string(ca.Certificate) - if actualCertMaterial != defaultCertMaterial { - t.Errorf("expected '%v' got '%v'", defaultCertMaterial, actualCertMaterial) - } - actualKeyMaterial := string(ca.PrivateKey) - if actualKeyMaterial != defaultKeyMaterial { - t.Errorf("expected '%v' got '%v'", defaultKeyMaterial, actualKeyMaterial) - } -} - -func newCaDirectory(t *testing.T, dir string, certMaterial *string, keyMaterial *string) (certPath string, keyPath string) { - certPath, keyPath = getCertAndKeyPaths(dir) - if certMaterial != nil { - err := ioutil.WriteFile(certPath, []byte(*certMaterial), 0644) - if err != nil { - t.Errorf("unable to write cert material to %v, got %v", certPath, err) - } - } - if keyMaterial != nil { - err := ioutil.WriteFile(keyPath, []byte(*keyMaterial), 0644) - if err != nil { - t.Errorf("unable to write key material to %v, got %v", keyPath, err) - } - } - return -} - -func getCertAndKeyPaths(dir string) (certPath string, keyPath string) { - return path.Join(dir, "ca.crt"), path.Join(dir, "ca.key") -} - -func newTempDir(t *testing.T) string { - dir, err := ioutil.TempDir("", "") - if err != nil { - t.Errorf("unable to create temp dir: %v", err) - } - return dir -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/BUILD.bazel similarity index 100% rename from vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/BUILD rename to vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/BUILD.bazel diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/BUILD deleted file mode 100644 index 549d60b88d3..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "clientset_generated.go", - "doc.go", - "register.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake", - importpath = "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/discovery/fake:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/clientset_generated.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/clientset_generated.go deleted file mode 100644 index a5ccd86fa30..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/clientset_generated.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package fake - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" - clientset "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - clusterv1alpha1 "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" - fakeclusterv1alpha1 "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil)) - - return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -var _ clientset.Interface = &Clientset{} - -// ClusterV1alpha1 retrieves the ClusterV1alpha1Client -func (c *Clientset) ClusterV1alpha1() clusterv1alpha1.ClusterV1alpha1Interface { - return &fakeclusterv1alpha1.FakeClusterV1alpha1{Fake: &c.Fake} -} - -// Cluster retrieves the ClusterV1alpha1Client -func (c *Clientset) Cluster() clusterv1alpha1.ClusterV1alpha1Interface { - return &fakeclusterv1alpha1.FakeClusterV1alpha1{Fake: &c.Fake} -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/doc.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/doc.go deleted file mode 100644 index fa49a02ac88..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// This package has the automatically generated fake clientset. -package fake diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/register.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/register.go deleted file mode 100644 index 27b85bc253f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake/register.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - clusterv1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kuberentes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -func AddToScheme(scheme *runtime.Scheme) { - clusterv1alpha1.AddToScheme(scheme) - -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/scheme/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel similarity index 100% rename from vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/scheme/BUILD rename to vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/BUILD.bazel similarity index 100% rename from vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/BUILD rename to vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/BUILD.bazel diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/BUILD deleted file mode 100644 index b676718ee8c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_cluster.go", - "fake_cluster_client.go", - "fake_machine.go", - "fake_machinedeployment.go", - "fake_machineset.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake", - importpath = "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/doc.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/doc.go deleted file mode 100644 index a66e8b1134c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Package fake has the automatically generated clients. -package fake diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster.go deleted file mode 100644 index 1ca9851d20a..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// FakeClusters implements ClusterInterface -type FakeClusters struct { - Fake *FakeClusterV1alpha1 - ns string -} - -var clustersResource = schema.GroupVersionResource{Group: "cluster.k8s.io", Version: "v1alpha1", Resource: "clusters"} - -var clustersKind = schema.GroupVersionKind{Group: "cluster.k8s.io", Version: "v1alpha1", Kind: "Cluster"} - -// Get takes name of the cluster, and returns the corresponding cluster object, and an error if there is any. -func (c *FakeClusters) Get(name string, options v1.GetOptions) (result *v1alpha1.Cluster, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(clustersResource, c.ns, name), &v1alpha1.Cluster{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Cluster), err -} - -// List takes label and field selectors, and returns the list of Clusters that match those selectors. -func (c *FakeClusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(clustersResource, clustersKind, c.ns, opts), &v1alpha1.ClusterList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.ClusterList{} - for _, item := range obj.(*v1alpha1.ClusterList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusters. -func (c *FakeClusters) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(clustersResource, c.ns, opts)) - -} - -// Create takes the representation of a cluster and creates it. Returns the server's representation of the cluster, and an error, if there is any. -func (c *FakeClusters) Create(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(clustersResource, c.ns, cluster), &v1alpha1.Cluster{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Cluster), err -} - -// Update takes the representation of a cluster and updates it. Returns the server's representation of the cluster, and an error, if there is any. -func (c *FakeClusters) Update(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(clustersResource, c.ns, cluster), &v1alpha1.Cluster{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Cluster), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusters) UpdateStatus(cluster *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(clustersResource, "status", c.ns, cluster), &v1alpha1.Cluster{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Cluster), err -} - -// Delete takes name of the cluster and deletes it. Returns an error if one occurs. -func (c *FakeClusters) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(clustersResource, c.ns, name), &v1alpha1.Cluster{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(clustersResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.ClusterList{}) - return err -} - -// Patch applies the patch and returns the patched cluster. -func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Cluster, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &v1alpha1.Cluster{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Cluster), err -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster_client.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster_client.go deleted file mode 100644 index 7416f190414..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster_client.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" -) - -type FakeClusterV1alpha1 struct { - *testing.Fake -} - -func (c *FakeClusterV1alpha1) Clusters(namespace string) v1alpha1.ClusterInterface { - return &FakeClusters{c, namespace} -} - -func (c *FakeClusterV1alpha1) Machines(namespace string) v1alpha1.MachineInterface { - return &FakeMachines{c, namespace} -} - -func (c *FakeClusterV1alpha1) MachineDeployments(namespace string) v1alpha1.MachineDeploymentInterface { - return &FakeMachineDeployments{c, namespace} -} - -func (c *FakeClusterV1alpha1) MachineSets(namespace string) v1alpha1.MachineSetInterface { - return &FakeMachineSets{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeClusterV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machine.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machine.go deleted file mode 100644 index 6feae3e9528..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machine.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// FakeMachines implements MachineInterface -type FakeMachines struct { - Fake *FakeClusterV1alpha1 - ns string -} - -var machinesResource = schema.GroupVersionResource{Group: "cluster.k8s.io", Version: "v1alpha1", Resource: "machines"} - -var machinesKind = schema.GroupVersionKind{Group: "cluster.k8s.io", Version: "v1alpha1", Kind: "Machine"} - -// Get takes name of the machine, and returns the corresponding machine object, and an error if there is any. -func (c *FakeMachines) Get(name string, options v1.GetOptions) (result *v1alpha1.Machine, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(machinesResource, c.ns, name), &v1alpha1.Machine{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Machine), err -} - -// List takes label and field selectors, and returns the list of Machines that match those selectors. -func (c *FakeMachines) List(opts v1.ListOptions) (result *v1alpha1.MachineList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(machinesResource, machinesKind, c.ns, opts), &v1alpha1.MachineList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.MachineList{} - for _, item := range obj.(*v1alpha1.MachineList).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 machines. -func (c *FakeMachines) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(machinesResource, c.ns, opts)) - -} - -// Create takes the representation of a machine and creates it. Returns the server's representation of the machine, and an error, if there is any. -func (c *FakeMachines) Create(machine *v1alpha1.Machine) (result *v1alpha1.Machine, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(machinesResource, c.ns, machine), &v1alpha1.Machine{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Machine), err -} - -// Update takes the representation of a machine and updates it. Returns the server's representation of the machine, and an error, if there is any. -func (c *FakeMachines) Update(machine *v1alpha1.Machine) (result *v1alpha1.Machine, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(machinesResource, c.ns, machine), &v1alpha1.Machine{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Machine), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachines) UpdateStatus(machine *v1alpha1.Machine) (*v1alpha1.Machine, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(machinesResource, "status", c.ns, machine), &v1alpha1.Machine{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Machine), err -} - -// Delete takes name of the machine and deletes it. Returns an error if one occurs. -func (c *FakeMachines) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(machinesResource, c.ns, name), &v1alpha1.Machine{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachines) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(machinesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.MachineList{}) - return err -} - -// Patch applies the patch and returns the patched machine. -func (c *FakeMachines) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Machine, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(machinesResource, c.ns, name, data, subresources...), &v1alpha1.Machine{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.Machine), err -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machinedeployment.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machinedeployment.go deleted file mode 100644 index 21126c100ed..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machinedeployment.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// FakeMachineDeployments implements MachineDeploymentInterface -type FakeMachineDeployments struct { - Fake *FakeClusterV1alpha1 - ns string -} - -var machinedeploymentsResource = schema.GroupVersionResource{Group: "cluster.k8s.io", Version: "v1alpha1", Resource: "machinedeployments"} - -var machinedeploymentsKind = schema.GroupVersionKind{Group: "cluster.k8s.io", Version: "v1alpha1", Kind: "MachineDeployment"} - -// Get takes name of the machineDeployment, and returns the corresponding machineDeployment object, and an error if there is any. -func (c *FakeMachineDeployments) Get(name string, options v1.GetOptions) (result *v1alpha1.MachineDeployment, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(machinedeploymentsResource, c.ns, name), &v1alpha1.MachineDeployment{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MachineDeployment), err -} - -// List takes label and field selectors, and returns the list of MachineDeployments that match those selectors. -func (c *FakeMachineDeployments) List(opts v1.ListOptions) (result *v1alpha1.MachineDeploymentList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(machinedeploymentsResource, machinedeploymentsKind, c.ns, opts), &v1alpha1.MachineDeploymentList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.MachineDeploymentList{} - for _, item := range obj.(*v1alpha1.MachineDeploymentList).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 machineDeployments. -func (c *FakeMachineDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(machinedeploymentsResource, c.ns, opts)) - -} - -// Create takes the representation of a machineDeployment and creates it. Returns the server's representation of the machineDeployment, and an error, if there is any. -func (c *FakeMachineDeployments) Create(machineDeployment *v1alpha1.MachineDeployment) (result *v1alpha1.MachineDeployment, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(machinedeploymentsResource, c.ns, machineDeployment), &v1alpha1.MachineDeployment{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MachineDeployment), err -} - -// Update takes the representation of a machineDeployment and updates it. Returns the server's representation of the machineDeployment, and an error, if there is any. -func (c *FakeMachineDeployments) Update(machineDeployment *v1alpha1.MachineDeployment) (result *v1alpha1.MachineDeployment, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(machinedeploymentsResource, c.ns, machineDeployment), &v1alpha1.MachineDeployment{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MachineDeployment), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachineDeployments) UpdateStatus(machineDeployment *v1alpha1.MachineDeployment) (*v1alpha1.MachineDeployment, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(machinedeploymentsResource, "status", c.ns, machineDeployment), &v1alpha1.MachineDeployment{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MachineDeployment), err -} - -// Delete takes name of the machineDeployment and deletes it. Returns an error if one occurs. -func (c *FakeMachineDeployments) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(machinedeploymentsResource, c.ns, name), &v1alpha1.MachineDeployment{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachineDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(machinedeploymentsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.MachineDeploymentList{}) - return err -} - -// Patch applies the patch and returns the patched machineDeployment. -func (c *FakeMachineDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.MachineDeployment, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(machinedeploymentsResource, c.ns, name, data, subresources...), &v1alpha1.MachineDeployment{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MachineDeployment), err -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineset.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineset.go deleted file mode 100644 index 12c1571b3fb..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineset.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// FakeMachineSets implements MachineSetInterface -type FakeMachineSets struct { - Fake *FakeClusterV1alpha1 - ns string -} - -var machinesetsResource = schema.GroupVersionResource{Group: "cluster.k8s.io", Version: "v1alpha1", Resource: "machinesets"} - -var machinesetsKind = schema.GroupVersionKind{Group: "cluster.k8s.io", Version: "v1alpha1", Kind: "MachineSet"} - -// Get takes name of the machineSet, and returns the corresponding machineSet object, and an error if there is any. -func (c *FakeMachineSets) Get(name string, options v1.GetOptions) (result *v1alpha1.MachineSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(machinesetsResource, c.ns, name), &v1alpha1.MachineSet{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MachineSet), err -} - -// List takes label and field selectors, and returns the list of MachineSets that match those selectors. -func (c *FakeMachineSets) List(opts v1.ListOptions) (result *v1alpha1.MachineSetList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(machinesetsResource, machinesetsKind, c.ns, opts), &v1alpha1.MachineSetList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.MachineSetList{} - for _, item := range obj.(*v1alpha1.MachineSetList).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 machineSets. -func (c *FakeMachineSets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(machinesetsResource, c.ns, opts)) - -} - -// Create takes the representation of a machineSet and creates it. Returns the server's representation of the machineSet, and an error, if there is any. -func (c *FakeMachineSets) Create(machineSet *v1alpha1.MachineSet) (result *v1alpha1.MachineSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(machinesetsResource, c.ns, machineSet), &v1alpha1.MachineSet{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MachineSet), err -} - -// Update takes the representation of a machineSet and updates it. Returns the server's representation of the machineSet, and an error, if there is any. -func (c *FakeMachineSets) Update(machineSet *v1alpha1.MachineSet) (result *v1alpha1.MachineSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(machinesetsResource, c.ns, machineSet), &v1alpha1.MachineSet{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MachineSet), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachineSets) UpdateStatus(machineSet *v1alpha1.MachineSet) (*v1alpha1.MachineSet, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(machinesetsResource, "status", c.ns, machineSet), &v1alpha1.MachineSet{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MachineSet), err -} - -// Delete takes name of the machineSet and deletes it. Returns an error if one occurs. -func (c *FakeMachineSets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(machinesetsResource, c.ns, name), &v1alpha1.MachineSet{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachineSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(machinesetsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.MachineSetList{}) - return err -} - -// Patch applies the patch and returns the patched machineSet. -func (c *FakeMachineSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.MachineSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(machinesetsResource, c.ns, name, data, subresources...), &v1alpha1.MachineSet{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MachineSet), err -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/BUILD deleted file mode 100644 index c8b1854b694..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/BUILD +++ /dev/null @@ -1,22 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "factory.go", - "generic.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions", - importpath = "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/BUILD deleted file mode 100644 index ae8fb2e7639..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster", - importpath = "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster", - visibility = ["//visibility:public"], - deps = [ - "//vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/interface.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/interface.go deleted file mode 100644 index f73276b80fd..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/interface.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package cluster - -import ( - v1alpha1 "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1" - internalinterfaces "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/BUILD deleted file mode 100644 index ea62ab4dd63..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "cluster.go", - "interface.go", - "machine.go", - "machinedeployment.go", - "machineset.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1", - importpath = "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/cluster.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/cluster.go deleted file mode 100644 index 5fcd7c4acbe..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/cluster.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - cluster_v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - clientset "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - internalinterfaces "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - time "time" -) - -// ClusterInformer provides access to a shared informer and lister for -// Clusters. -type ClusterInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.ClusterLister -} - -type clusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewClusterInformer constructs a new informer for Cluster type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewClusterInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredClusterInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredClusterInformer constructs a new informer for Cluster type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredClusterInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ClusterV1alpha1().Clusters(namespace).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ClusterV1alpha1().Clusters(namespace).Watch(options) - }, - }, - &cluster_v1alpha1.Cluster{}, - resyncPeriod, - indexers, - ) -} - -func (f *clusterInformer) defaultInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredClusterInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *clusterInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&cluster_v1alpha1.Cluster{}, f.defaultInformer) -} - -func (f *clusterInformer) Lister() v1alpha1.ClusterLister { - return v1alpha1.NewClusterLister(f.Informer().GetIndexer()) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/interface.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/interface.go deleted file mode 100644 index 5667ff4a747..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/interface.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1alpha1 - -import ( - internalinterfaces "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // Clusters returns a ClusterInformer. - Clusters() ClusterInformer - // Machines returns a MachineInformer. - Machines() MachineInformer - // MachineDeployments returns a MachineDeploymentInformer. - MachineDeployments() MachineDeploymentInformer - // MachineSets returns a MachineSetInformer. - MachineSets() MachineSetInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// Clusters returns a ClusterInformer. -func (v *version) Clusters() ClusterInformer { - return &clusterInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// Machines returns a MachineInformer. -func (v *version) Machines() MachineInformer { - return &machineInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// MachineDeployments returns a MachineDeploymentInformer. -func (v *version) MachineDeployments() MachineDeploymentInformer { - return &machineDeploymentInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// MachineSets returns a MachineSetInformer. -func (v *version) MachineSets() MachineSetInformer { - return &machineSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machine.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machine.go deleted file mode 100644 index 8df50415539..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machine.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - cluster_v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - clientset "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - internalinterfaces "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - time "time" -) - -// MachineInformer provides access to a shared informer and lister for -// Machines. -type MachineInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.MachineLister -} - -type machineInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewMachineInformer constructs a new informer for Machine type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewMachineInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredMachineInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredMachineInformer constructs a new informer for Machine type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredMachineInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ClusterV1alpha1().Machines(namespace).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ClusterV1alpha1().Machines(namespace).Watch(options) - }, - }, - &cluster_v1alpha1.Machine{}, - resyncPeriod, - indexers, - ) -} - -func (f *machineInformer) defaultInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredMachineInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *machineInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&cluster_v1alpha1.Machine{}, f.defaultInformer) -} - -func (f *machineInformer) Lister() v1alpha1.MachineLister { - return v1alpha1.NewMachineLister(f.Informer().GetIndexer()) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machinedeployment.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machinedeployment.go deleted file mode 100644 index 2264bc59f15..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machinedeployment.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - cluster_v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - clientset "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - internalinterfaces "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - time "time" -) - -// MachineDeploymentInformer provides access to a shared informer and lister for -// MachineDeployments. -type MachineDeploymentInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.MachineDeploymentLister -} - -type machineDeploymentInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewMachineDeploymentInformer constructs a new informer for MachineDeployment type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewMachineDeploymentInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredMachineDeploymentInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredMachineDeploymentInformer constructs a new informer for MachineDeployment type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredMachineDeploymentInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ClusterV1alpha1().MachineDeployments(namespace).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ClusterV1alpha1().MachineDeployments(namespace).Watch(options) - }, - }, - &cluster_v1alpha1.MachineDeployment{}, - resyncPeriod, - indexers, - ) -} - -func (f *machineDeploymentInformer) defaultInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredMachineDeploymentInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *machineDeploymentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&cluster_v1alpha1.MachineDeployment{}, f.defaultInformer) -} - -func (f *machineDeploymentInformer) Lister() v1alpha1.MachineDeploymentLister { - return v1alpha1.NewMachineDeploymentLister(f.Informer().GetIndexer()) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineset.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineset.go deleted file mode 100644 index 9397d1a3950..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineset.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - cluster_v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - clientset "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - internalinterfaces "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - time "time" -) - -// MachineSetInformer provides access to a shared informer and lister for -// MachineSets. -type MachineSetInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.MachineSetLister -} - -type machineSetInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewMachineSetInformer constructs a new informer for MachineSet type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewMachineSetInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredMachineSetInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredMachineSetInformer constructs a new informer for MachineSet type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredMachineSetInformer(client clientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ClusterV1alpha1().MachineSets(namespace).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ClusterV1alpha1().MachineSets(namespace).Watch(options) - }, - }, - &cluster_v1alpha1.MachineSet{}, - resyncPeriod, - indexers, - ) -} - -func (f *machineSetInformer) defaultInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredMachineSetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *machineSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&cluster_v1alpha1.MachineSet{}, f.defaultInformer) -} - -func (f *machineSetInformer) Lister() v1alpha1.MachineSetLister { - return v1alpha1.NewMachineSetLister(f.Informer().GetIndexer()) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/factory.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/factory.go deleted file mode 100644 index 479bdd7be6f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/factory.go +++ /dev/null @@ -1,130 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package externalversions - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" - reflect "reflect" - clientset "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - cluster "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/cluster" - internalinterfaces "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces" - sync "sync" - time "time" -) - -type sharedInformerFactory struct { - client clientset.Interface - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc - lock sync.Mutex - defaultResync time.Duration - - informers map[reflect.Type]cache.SharedIndexInformer - // startedInformers is used for tracking which informers have been started. - // This allows Start() to be called multiple times safely. - startedInformers map[reflect.Type]bool -} - -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory -func NewSharedInformerFactory(client clientset.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil) -} - -// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. -// Listers obtained via this SharedInformerFactory will be subject to the same filters -// as specified here. -func NewFilteredSharedInformerFactory(client clientset.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return &sharedInformerFactory{ - client: client, - namespace: namespace, - tweakListOptions: tweakListOptions, - defaultResync: defaultResync, - informers: make(map[reflect.Type]cache.SharedIndexInformer), - startedInformers: make(map[reflect.Type]bool), - } -} - -// Start initializes all requested informers. -func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { - f.lock.Lock() - defer f.lock.Unlock() - - for informerType, informer := range f.informers { - if !f.startedInformers[informerType] { - go informer.Run(stopCh) - f.startedInformers[informerType] = true - } - } -} - -// WaitForCacheSync waits for all started informers' cache were synced. -func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { - informers := func() map[reflect.Type]cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informers := map[reflect.Type]cache.SharedIndexInformer{} - for informerType, informer := range f.informers { - if f.startedInformers[informerType] { - informers[informerType] = informer - } - } - return informers - }() - - res := map[reflect.Type]bool{} - for informType, informer := range informers { - res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) - } - return res -} - -// InternalInformerFor returns the SharedIndexInformer for obj using an internal -// client. -func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informerType := reflect.TypeOf(obj) - informer, exists := f.informers[informerType] - if exists { - return informer - } - informer = newFunc(f.client, f.defaultResync) - f.informers[informerType] = informer - - return informer -} - -// SharedInformerFactory provides shared informers for resources in all known -// API group versions. -type SharedInformerFactory interface { - internalinterfaces.SharedInformerFactory - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) - WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - - Cluster() cluster.Interface -} - -func (f *sharedInformerFactory) Cluster() cluster.Interface { - return cluster.New(f, f.namespace, f.tweakListOptions) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/generic.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/generic.go deleted file mode 100644 index 2edc65a5b61..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/generic.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package externalversions - -import ( - "fmt" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// GenericInformer is type of SharedIndexInformer which will locate and delegate to other -// sharedInformers based on type -type GenericInformer interface { - Informer() cache.SharedIndexInformer - Lister() cache.GenericLister -} - -type genericInformer struct { - informer cache.SharedIndexInformer - resource schema.GroupResource -} - -// Informer returns the SharedIndexInformer. -func (f *genericInformer) Informer() cache.SharedIndexInformer { - return f.informer -} - -// Lister returns the GenericLister. -func (f *genericInformer) Lister() cache.GenericLister { - return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) -} - -// ForResource gives generic access to a shared informer of the matching type -// TODO extend this to unknown resources with a client pool -func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { - switch resource { - // Group=cluster.k8s.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("clusters"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Cluster().V1alpha1().Clusters().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("machines"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Cluster().V1alpha1().Machines().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("machinedeployments"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Cluster().V1alpha1().MachineDeployments().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("machinesets"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Cluster().V1alpha1().MachineSets().Informer()}, nil - - } - - return nil, fmt.Errorf("no informer found for %v", resource) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces/BUILD deleted file mode 100644 index 8faf22f9b05..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces/BUILD +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["factory_interfaces.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces", - importpath = "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go deleted file mode 100644 index bd8ddd811c8..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package internalinterfaces - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - cache "k8s.io/client-go/tools/cache" - clientset "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - time "time" -) - -type NewInformerFunc func(clientset.Interface, time.Duration) cache.SharedIndexInformer - -// SharedInformerFactory a small interface to allow for adding an informer without an import cycle -type SharedInformerFactory interface { - Start(stopCh <-chan struct{}) - InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer -} - -type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/BUILD deleted file mode 100644 index 1c00ab28e5d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/BUILD +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "cluster.go", - "expansion_generated.go", - "machine.go", - "machinedeployment.go", - "machineset.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1", - importpath = "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/cluster.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/cluster.go deleted file mode 100644 index 07be29b0d3b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/cluster.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// ClusterLister helps list Clusters. -type ClusterLister interface { - // List lists all Clusters in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.Cluster, err error) - // Clusters returns an object that can list and get Clusters. - Clusters(namespace string) ClusterNamespaceLister - ClusterListerExpansion -} - -// clusterLister implements the ClusterLister interface. -type clusterLister struct { - indexer cache.Indexer -} - -// NewClusterLister returns a new ClusterLister. -func NewClusterLister(indexer cache.Indexer) ClusterLister { - return &clusterLister{indexer: indexer} -} - -// List lists all Clusters in the indexer. -func (s *clusterLister) List(selector labels.Selector) (ret []*v1alpha1.Cluster, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.Cluster)) - }) - return ret, err -} - -// Clusters returns an object that can list and get Clusters. -func (s *clusterLister) Clusters(namespace string) ClusterNamespaceLister { - return clusterNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ClusterNamespaceLister helps list and get Clusters. -type ClusterNamespaceLister interface { - // List lists all Clusters in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha1.Cluster, err error) - // Get retrieves the Cluster from the indexer for a given namespace and name. - Get(name string) (*v1alpha1.Cluster, error) - ClusterNamespaceListerExpansion -} - -// clusterNamespaceLister implements the ClusterNamespaceLister -// interface. -type clusterNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Clusters in the indexer for a given namespace. -func (s clusterNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Cluster, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.Cluster)) - }) - return ret, err -} - -// Get retrieves the Cluster from the indexer for a given namespace and name. -func (s clusterNamespaceLister) Get(name string) (*v1alpha1.Cluster, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("cluster"), name) - } - return obj.(*v1alpha1.Cluster), nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/expansion_generated.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/expansion_generated.go deleted file mode 100644 index ea84125bd4c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1alpha1 - -// ClusterListerExpansion allows custom methods to be added to -// ClusterLister. -type ClusterListerExpansion interface{} - -// ClusterNamespaceListerExpansion allows custom methods to be added to -// ClusterNamespaceLister. -type ClusterNamespaceListerExpansion interface{} - -// MachineListerExpansion allows custom methods to be added to -// MachineLister. -type MachineListerExpansion interface{} - -// MachineNamespaceListerExpansion allows custom methods to be added to -// MachineNamespaceLister. -type MachineNamespaceListerExpansion interface{} - -// MachineDeploymentListerExpansion allows custom methods to be added to -// MachineDeploymentLister. -type MachineDeploymentListerExpansion interface{} - -// MachineDeploymentNamespaceListerExpansion allows custom methods to be added to -// MachineDeploymentNamespaceLister. -type MachineDeploymentNamespaceListerExpansion interface{} - -// MachineSetListerExpansion allows custom methods to be added to -// MachineSetLister. -type MachineSetListerExpansion interface{} - -// MachineSetNamespaceListerExpansion allows custom methods to be added to -// MachineSetNamespaceLister. -type MachineSetNamespaceListerExpansion interface{} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machine.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machine.go deleted file mode 100644 index db3d379207b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machine.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// MachineLister helps list Machines. -type MachineLister interface { - // List lists all Machines in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.Machine, err error) - // Machines returns an object that can list and get Machines. - Machines(namespace string) MachineNamespaceLister - MachineListerExpansion -} - -// machineLister implements the MachineLister interface. -type machineLister struct { - indexer cache.Indexer -} - -// NewMachineLister returns a new MachineLister. -func NewMachineLister(indexer cache.Indexer) MachineLister { - return &machineLister{indexer: indexer} -} - -// List lists all Machines in the indexer. -func (s *machineLister) List(selector labels.Selector) (ret []*v1alpha1.Machine, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.Machine)) - }) - return ret, err -} - -// Machines returns an object that can list and get Machines. -func (s *machineLister) Machines(namespace string) MachineNamespaceLister { - return machineNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// MachineNamespaceLister helps list and get Machines. -type MachineNamespaceLister interface { - // List lists all Machines in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha1.Machine, err error) - // Get retrieves the Machine from the indexer for a given namespace and name. - Get(name string) (*v1alpha1.Machine, error) - MachineNamespaceListerExpansion -} - -// machineNamespaceLister implements the MachineNamespaceLister -// interface. -type machineNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Machines in the indexer for a given namespace. -func (s machineNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Machine, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.Machine)) - }) - return ret, err -} - -// Get retrieves the Machine from the indexer for a given namespace and name. -func (s machineNamespaceLister) Get(name string) (*v1alpha1.Machine, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("machine"), name) - } - return obj.(*v1alpha1.Machine), nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machinedeployment.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machinedeployment.go deleted file mode 100644 index a426fb6791e..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machinedeployment.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// MachineDeploymentLister helps list MachineDeployments. -type MachineDeploymentLister interface { - // List lists all MachineDeployments in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.MachineDeployment, err error) - // MachineDeployments returns an object that can list and get MachineDeployments. - MachineDeployments(namespace string) MachineDeploymentNamespaceLister - MachineDeploymentListerExpansion -} - -// machineDeploymentLister implements the MachineDeploymentLister interface. -type machineDeploymentLister struct { - indexer cache.Indexer -} - -// NewMachineDeploymentLister returns a new MachineDeploymentLister. -func NewMachineDeploymentLister(indexer cache.Indexer) MachineDeploymentLister { - return &machineDeploymentLister{indexer: indexer} -} - -// List lists all MachineDeployments in the indexer. -func (s *machineDeploymentLister) List(selector labels.Selector) (ret []*v1alpha1.MachineDeployment, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.MachineDeployment)) - }) - return ret, err -} - -// MachineDeployments returns an object that can list and get MachineDeployments. -func (s *machineDeploymentLister) MachineDeployments(namespace string) MachineDeploymentNamespaceLister { - return machineDeploymentNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// MachineDeploymentNamespaceLister helps list and get MachineDeployments. -type MachineDeploymentNamespaceLister interface { - // List lists all MachineDeployments in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha1.MachineDeployment, err error) - // Get retrieves the MachineDeployment from the indexer for a given namespace and name. - Get(name string) (*v1alpha1.MachineDeployment, error) - MachineDeploymentNamespaceListerExpansion -} - -// machineDeploymentNamespaceLister implements the MachineDeploymentNamespaceLister -// interface. -type machineDeploymentNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all MachineDeployments in the indexer for a given namespace. -func (s machineDeploymentNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.MachineDeployment, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.MachineDeployment)) - }) - return ret, err -} - -// Get retrieves the MachineDeployment from the indexer for a given namespace and name. -func (s machineDeploymentNamespaceLister) Get(name string) (*v1alpha1.MachineDeployment, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("machinedeployment"), name) - } - return obj.(*v1alpha1.MachineDeployment), nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machineset.go b/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machineset.go deleted file mode 100644 index b8e9eebe065..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1/machineset.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// MachineSetLister helps list MachineSets. -type MachineSetLister interface { - // List lists all MachineSets in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.MachineSet, err error) - // MachineSets returns an object that can list and get MachineSets. - MachineSets(namespace string) MachineSetNamespaceLister - MachineSetListerExpansion -} - -// machineSetLister implements the MachineSetLister interface. -type machineSetLister struct { - indexer cache.Indexer -} - -// NewMachineSetLister returns a new MachineSetLister. -func NewMachineSetLister(indexer cache.Indexer) MachineSetLister { - return &machineSetLister{indexer: indexer} -} - -// List lists all MachineSets in the indexer. -func (s *machineSetLister) List(selector labels.Selector) (ret []*v1alpha1.MachineSet, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.MachineSet)) - }) - return ret, err -} - -// MachineSets returns an object that can list and get MachineSets. -func (s *machineSetLister) MachineSets(namespace string) MachineSetNamespaceLister { - return machineSetNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// MachineSetNamespaceLister helps list and get MachineSets. -type MachineSetNamespaceLister interface { - // List lists all MachineSets in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha1.MachineSet, err error) - // Get retrieves the MachineSet from the indexer for a given namespace and name. - Get(name string) (*v1alpha1.MachineSet, error) - MachineSetNamespaceListerExpansion -} - -// machineSetNamespaceLister implements the MachineSetNamespaceLister -// interface. -type machineSetNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all MachineSets in the indexer for a given namespace. -func (s machineSetNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.MachineSet, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.MachineSet)) - }) - return ret, err -} - -// Get retrieves the MachineSet from the indexer for a given namespace and name. -func (s machineSetNamespaceLister) Get(name string) (*v1alpha1.MachineSet, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("machineset"), name) - } - return obj.(*v1alpha1.MachineSet), nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/BUILD.bazel deleted file mode 100644 index 630408ca69f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["cmd_runner.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner", - importpath = "sigs.k8s.io/cluster-api/pkg/cmd-runner", - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = ["cmd_runner_test.go"], - embed = [":go_default_library"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/cmd_runner.go b/vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/cmd_runner.go deleted file mode 100644 index 4b47f55ee19..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/cmd_runner.go +++ /dev/null @@ -1,21 +0,0 @@ -package cmd_runner - -import ( - "os/exec" -) - -type CmdRunner interface { - CombinedOutput(cmd string, args ...string) (output string, err error) -} - -type realCmdRunner struct { -} - -func New() *realCmdRunner { - return &realCmdRunner{} -} - -func (runner *realCmdRunner) CombinedOutput(cmd string, args ...string) (string, error) { - output, err := exec.Command(cmd, args...).CombinedOutput() - return string(output), err -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/cmd_runner_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/cmd_runner_test.go deleted file mode 100644 index e5efbc3db5e..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/cmd-runner/cmd_runner_test.go +++ /dev/null @@ -1,68 +0,0 @@ -package cmd_runner_test - -import ( - "io/ioutil" - "os" - "sigs.k8s.io/cluster-api/pkg/cmd-runner" - "testing" -) - -func TestInvalidCommand(t *testing.T) { - runner := cmd_runner.New() - output, err := runner.CombinedOutput("asdf") - if err == nil { - t.Errorf("invalid error: expected 'nil', got '%v'", err) - } - if output != "" { - t.Errorf("unexpected output: expected empty string '', got '%v'", output) - } -} - -func TestValidCommandErrors(t *testing.T) { - skipIfCommandNotPresent(t, "ls") - runner := cmd_runner.New() - _, err := runner.CombinedOutput("ls /invalid/path") - if err == nil { - t.Errorf("invalid error: expected 'nil', got '%v'", err) - } -} - -func TestValidCommandSucceeds(t *testing.T) { - skipIfCommandNotPresent(t, "ls") - dir, err := ioutil.TempDir("", "") - if err != nil { - t.Errorf("unable to create temp dir: %v", err) - t.FailNow() - } - defer os.RemoveAll(dir) - runner := cmd_runner.New() - output, err := runner.CombinedOutput("ls", "-al", dir) - if err != nil { - t.Errorf("invalid error: expected 'nil', got '%v'", err) - } - if output == "" { - t.Errorf("expected valid output got empty string") - } -} - -func TestCombinedOutputShouldIncludeStdOutAndErr(t *testing.T) { - skipIfCommandNotPresent(t, "echo") - skipIfCommandNotPresent(t, "sh") - runner := cmd_runner.New() - output, err := runner.CombinedOutput("sh", "-c", "echo \"stdout\" && (>&2 echo \"stderr\")") - if err != nil { - t.Errorf("invalid error: expected 'nil', got '%v'", err) - } - expectedOutput := "stdout\nstderr\n" - if output != expectedOutput { - t.Errorf("invalid output: expected '%v', got '%v'", expectedOutput, output) - } -} - -func skipIfCommandNotPresent(t *testing.T, cmd string) { - runner := cmd_runner.New() - _, err := runner.CombinedOutput("ls") - if err != nil { - t.Skipf("unable to run test, 'ls' reults in error: %v", err) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/controller/BUILD deleted file mode 100644 index 0ebda8ff0f3..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "zz_generated.api.register.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/controller", - importpath = "sigs.k8s.io/cluster-api/pkg/controller", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/BUILD deleted file mode 100644 index c6259a8d2d9..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/BUILD +++ /dev/null @@ -1,58 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "actuator.go", - "controller.go", - "queue.go", - "testactuator.go", - "zz_generated.api.register.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster", - importpath = "sigs.k8s.io/cluster-api/pkg/controller/cluster", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/builders:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/config:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "cluster_suite_test.go", - "controller_test.go", - "reconcile_test.go", - ], - embed = [":go_default_library"], - importpath = "sigs.k8s.io/cluster-api/pkg/controller/cluster_test", - deps = [ - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/test:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/openapi:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/actuator.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/actuator.go deleted file mode 100644 index db3e91a96e1..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/actuator.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// Actuator controls clusters on a specific infrastructure. All -// methods should be idempotent unless otherwise specified. -type Actuator interface { - // Create or update the cluster - Reconcile(*clusterv1.Cluster) error - // Delete the cluster. - Delete(*clusterv1.Cluster) error -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/cluster_suite_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/cluster_suite_test.go deleted file mode 100644 index 7bd344efd7c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/cluster_suite_test.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "testing" - - "github.com/kubernetes-incubator/apiserver-builder/pkg/test" - - "k8s.io/client-go/rest" - "sigs.k8s.io/cluster-api/pkg/apis" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" - "sigs.k8s.io/cluster-api/pkg/openapi" -) - -func TestCluster(t *testing.T) { - testenv := test.NewTestEnvironment() - config := testenv.Start(apis.GetAllApiBuilders(), openapi.GetOpenAPIDefinitions) - cs := clientset.NewForConfigOrDie(config) - - t.Run("clusterControllerReconcile", func(t *testing.T) { - controller, shutdown := getController(config) - defer close(shutdown) - clusterControllerReconcile(t, cs, controller) - }) - - testenv.Stop() -} - -func getController(config *rest.Config) (*ClusterController, chan struct{}) { - shutdown := make(chan struct{}) - si := sharedinformers.NewSharedInformers(config, shutdown) - actuator := NewTestActuator() - controller := NewClusterController(config, si, actuator) - controller.RunAsync(shutdown) - - return controller, shutdown -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/controller.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/controller.go deleted file mode 100644 index bf6800aac1c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/controller.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders" - - "github.com/golang/glog" - "k8s.io/client-go/kubernetes" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - listers "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" - "sigs.k8s.io/cluster-api/util" -) - -// +controller:group=cluster,version=v1alpha1,kind=Cluster,resource=clusters -type ClusterControllerImpl struct { - builders.DefaultControllerFns - - actuator Actuator - - // clusterLister holds a lister that knows how to list Cluster from a cache - clusterLister listers.ClusterLister - - kubernetesClientSet *kubernetes.Clientset - clientSet clientset.Interface -} - -// Init initializes the controller and is called by the generated code -// Register watches for additional resource types here. -func (c *ClusterControllerImpl) Init(arguments sharedinformers.ControllerInitArguments, actuator Actuator) { - cInformer := arguments.GetSharedInformers().Factory.Cluster().V1alpha1().Clusters() - c.clusterLister = cInformer.Lister() - c.actuator = actuator - cs, err := clientset.NewForConfig(arguments.GetRestConfig()) - if err != nil { - glog.Fatalf("error creating cluster client: %v", err) - } - c.clientSet = cs - c.kubernetesClientSet = arguments.GetSharedInformers().KubernetesClientSet - - c.actuator = actuator -} - -// Reconcile handles enqueued messages. The delete will be handled by finalizer. -func (c *ClusterControllerImpl) Reconcile(cluster *clusterv1.Cluster) error { - name := cluster.Name - glog.Infof("Running reconcile Cluster for %s\n", name) - - if !cluster.ObjectMeta.DeletionTimestamp.IsZero() { - // no-op if finalizer has been removed. - if !util.Contains(cluster.ObjectMeta.Finalizers, clusterv1.ClusterFinalizer) { - glog.Infof("reconciling cluster object %v causes a no-op as there is no finalizer.", name) - return nil - } - - glog.Infof("reconciling cluster object %v triggers delete.", name) - if err := c.actuator.Delete(cluster); err != nil { - glog.Errorf("Error deleting cluster object %v; %v", name, err) - return err - } - // Remove finalizer on successful deletion. - glog.Infof("cluster object %v deletion successful, removing finalizer.", name) - cluster.ObjectMeta.Finalizers = util.Filter(cluster.ObjectMeta.Finalizers, clusterv1.ClusterFinalizer) - if _, err := c.clientSet.ClusterV1alpha1().Clusters(cluster.Namespace).Update(cluster); err != nil { - glog.Errorf("Error removing finalizer from cluster object %v; %v", name, err) - return err - } - return nil - } - - glog.Infof("reconciling cluster object %v triggers idempotent reconcile.", name) - err := c.actuator.Reconcile(cluster) - if err != nil { - glog.Errorf("Error reconciling cluster object %v; %v", name, err) - return err - } - return nil -} - -func (c *ClusterControllerImpl) Get(namespace, name string) (*clusterv1.Cluster, error) { - return c.clusterLister.Clusters(namespace).Get(name) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/controller_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/controller_test.go deleted file mode 100644 index b00c3a31ba8..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/controller_test.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "testing" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sync" -) - -func clusterControllerReconcile(t *testing.T, cs *clientset.Clientset, controller *ClusterController) { - instance := testutil.GetVanillaCluster() - instance.Name = "instance-1" - expectedKey := "cluster-controller-test-handler/instance-1" - - // When creating a new object, it should invoke the reconcile method. - client := cs.ClusterV1alpha1().Clusters("cluster-controller-test-handler") - before := make(chan struct{}) - after := make(chan struct{}) - - actualKey := "" - var actualErr error = nil - - var aftOnce, befOnce sync.Once - - // Setup test callbacks to be called when the message is reconciled - controller.BeforeReconcile = func(key string) { - actualKey = key - befOnce.Do(func() { close(before) }) - } - controller.AfterReconcile = func(key string, err error) { - actualKey = key - actualErr = err - aftOnce.Do(func() { close(after) }) - } - - // Create an instance - if _, err := client.Create(&instance); err != nil { - t.Fatal(err) - } - defer client.Delete(instance.Name, &metav1.DeleteOptions{}) - // Verify reconcile function is called against the correct key - select { - case <-before: - if actualKey != expectedKey { - t.Fatalf( - "Reconcile function was not called with the correct key.\nActual:\t%+v\nExpected:\t%+v", - actualKey, expectedKey) - } - if actualErr != nil { - t.Fatal(actualErr) - } - case <-time.After(time.Second * 2): - t.Fatalf("reconcile never called") - } - - select { - case <-after: - if actualKey != expectedKey { - t.Fatalf( - "Reconcile function was not called with the correct key.\nActual:\t%+v\nExpected:\t%+v", - actualKey, expectedKey) - } - if actualErr != nil { - t.Fatal(actualErr) - } - case <-time.After(time.Second * 2): - t.Fatalf("reconcile never finished") - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/queue.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/queue.go deleted file mode 100644 index 449acc56d87..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/queue.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "time" - - "github.com/golang/glog" - "k8s.io/apimachinery/pkg/util/wait" - - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - "sigs.k8s.io/cluster-api/pkg/controller/config" -) - -func (c *ClusterController) RunAsync(stopCh <-chan struct{}) { - for _, q := range c.Informers.WorkerQueues { - go c.StartWorkerQueue(q, stopCh) - } -} - -// StartWorkerQueue schedules a routine to continuously process Queue messages -// until shutdown is closed -func (c *ClusterController) StartWorkerQueue(q *controller.QueueWorker, shutdown <-chan struct{}) { - glog.Infof("Start %s Queue", q.Name) - defer q.Queue.ShutDown() - - for i := 0; i < config.ControllerConfig.WorkerCount; i++ { - // Every second, process all messages in the Queue until it is time to shutdown - go wait.Until(q.ProcessAllMessages, time.Second, shutdown) - } - - <-shutdown - - // Stop accepting messages into the Queue - glog.V(1).Infof("Shutting down %s Queue\n", q.Name) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/reconcile_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/reconcile_test.go deleted file mode 100644 index fa395c17376..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/reconcile_test.go +++ /dev/null @@ -1,147 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "testing" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - core "k8s.io/client-go/testing" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake" - "sigs.k8s.io/cluster-api/util" -) - -func TestClusterSetControllerReconcileHandler(t *testing.T) { - tests := []struct { - name string - objExists bool - isDeleting bool - withFinalizer bool - isMaster bool - ignoreDeleteCallCount bool - expectFinalizerRemoved bool - numExpectedReconcileCalls int64 - numExpectedDeleteCalls int64 - }{ - { - name: "Create cluster", - objExists: false, - numExpectedReconcileCalls: 1, - }, - { - name: "Update cluster", - objExists: true, - numExpectedReconcileCalls: 1, - }, - { - name: "Delete cluster, instance exists, with finalizer", - objExists: true, - isDeleting: true, - withFinalizer: true, - expectFinalizerRemoved: true, - numExpectedDeleteCalls: 1, - }, - { - // This should not be possible. Here for completeness. - name: "Delete cluster, instance exists without finalizer", - objExists: true, - isDeleting: true, - withFinalizer: false, - }, - { - name: "Delete cluster, instance does not exist, with finalizer", - objExists: true, - isDeleting: true, - withFinalizer: true, - ignoreDeleteCallCount: true, - expectFinalizerRemoved: true, - }, - { - name: "Delete cluster, instance does not exist, without finalizer", - objExists: true, - isDeleting: true, - withFinalizer: false, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - clusterToTest := getCluster("bar", test.isDeleting, test.withFinalizer) - knownObjects := []runtime.Object{} - if test.objExists { - knownObjects = append(knownObjects, clusterToTest) - } - - clusterUpdated := false - fakeClient := fake.NewSimpleClientset(knownObjects...) - fakeClient.PrependReactor("update", "clusters", func(action core.Action) (bool, runtime.Object, error) { - clusterUpdated = true - return false, nil, nil - }) - - actuator := NewTestActuator() - - target := &ClusterControllerImpl{} - target.actuator = actuator - target.clientSet = fakeClient - - var err error - err = target.Reconcile(clusterToTest) - if err != nil { - t.Fatal(err) - } - - finalizerRemoved := clusterUpdated && !util.Contains(clusterToTest.ObjectMeta.Finalizers, v1alpha1.ClusterFinalizer) - - if finalizerRemoved != test.expectFinalizerRemoved { - t.Errorf("Got finalizer removed %v, expected finalizer removed %v", finalizerRemoved, test.expectFinalizerRemoved) - } - if actuator.ReconcileCallCount != test.numExpectedReconcileCalls { - t.Errorf("Got %v create calls, expected %v", actuator.ReconcileCallCount, test.numExpectedReconcileCalls) - } - if actuator.DeleteCallCount != test.numExpectedDeleteCalls && !test.ignoreDeleteCallCount { - t.Errorf("Got %v delete calls, expected %v", actuator.DeleteCallCount, test.numExpectedDeleteCalls) - } - - }) - } -} - -func getCluster(name string, isDeleting bool, hasFinalizer bool) *v1alpha1.Cluster { - m := &v1alpha1.Cluster{ - TypeMeta: metav1.TypeMeta{ - Kind: "Cluster", - APIVersion: v1alpha1.SchemeGroupVersion.String(), - }, - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: metav1.NamespaceDefault, - }, - } - if isDeleting { - now := metav1.NewTime(time.Now()) - m.ObjectMeta.SetDeletionTimestamp(&now) - } - if hasFinalizer { - m.ObjectMeta.SetFinalizers([]string{v1alpha1.ClusterFinalizer}) - } - - return m -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/testactuator.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/testactuator.go deleted file mode 100644 index de908029a83..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/testactuator.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "sync" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -type TestActuator struct { - unblock chan string - BlockOnReconcile bool - BlockOnDelete bool - ReconcileCallCount int64 - DeleteCallCount int64 - Lock sync.Mutex -} - -func (a *TestActuator) Reconcile(*v1alpha1.Cluster) error { - defer func() { - if a.BlockOnReconcile { - <-a.unblock - } - }() - - a.Lock.Lock() - defer a.Lock.Unlock() - a.ReconcileCallCount++ - return nil -} - -func (a *TestActuator) Delete(*v1alpha1.Cluster) error { - defer func() { - if a.BlockOnDelete { - <-a.unblock - } - }() - - a.Lock.Lock() - defer a.Lock.Unlock() - a.DeleteCallCount++ - return nil -} - -func NewTestActuator() *TestActuator { - ta := new(TestActuator) - ta.unblock = make(chan string) - return ta -} - -func (a *TestActuator) Unblock() { - close(a.unblock) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/zz_generated.api.register.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/zz_generated.api.register.go deleted file mode 100644 index b5a75ece920..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/cluster/zz_generated.api.register.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by apiregister-gen. Do not edit it manually! - -package cluster - -import ( - "github.com/golang/glog" - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" -) - -// ClusterController implements the controller.ClusterController interface -type ClusterController struct { - queue *controller.QueueWorker - - // Handles messages - controller *ClusterControllerImpl - - Name string - - BeforeReconcile func(key string) - AfterReconcile func(key string, err error) - - Informers *sharedinformers.SharedInformers -} - -// NewController returns a new ClusterController for responding to Cluster events -func NewClusterController(config *rest.Config, si *sharedinformers.SharedInformers, actuator Actuator) *ClusterController { - q := workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "Cluster") - - queue := &controller.QueueWorker{q, 10, "Cluster", nil} - c := &ClusterController{queue, nil, "Cluster", nil, nil, si} - - // For non-generated code to add events - c.controller = &ClusterControllerImpl{} - c.controller.Init(&sharedinformers.ControllerInitArgumentsImpl{si, config, c.LookupAndReconcile}, actuator) - - queue.Reconcile = c.reconcile - if c.Informers.WorkerQueues == nil { - c.Informers.WorkerQueues = map[string]*controller.QueueWorker{} - } - c.Informers.WorkerQueues["Cluster"] = queue - si.Factory.Cluster().V1alpha1().Clusters().Informer(). - AddEventHandler(&controller.QueueingEventHandler{q, nil, false}) - return c -} - -func (c *ClusterController) GetName() string { - return c.Name -} - -func (c *ClusterController) LookupAndReconcile(key string) (err error) { - return c.reconcile(key) -} - -func (c *ClusterController) reconcile(key string) (err error) { - var namespace, name string - - if c.BeforeReconcile != nil { - c.BeforeReconcile(key) - } - if c.AfterReconcile != nil { - // Wrap in a function so err is evaluated after it is set - defer func() { c.AfterReconcile(key, err) }() - } - - namespace, name, err = cache.SplitMetaNamespaceKey(key) - if err != nil { - return - } - - u, err := c.controller.Get(namespace, name) - if errors.IsNotFound(err) { - glog.Infof("Not doing work for Cluster %v because it has been deleted", key) - // Set error so it is picked up by AfterReconcile and the return function - err = nil - return - } - if err != nil { - glog.Errorf("Unable to retrieve Cluster %v from store: %v", key, err) - return - } - - // Set error so it is picked up by AfterReconcile and the return function - err = c.controller.Reconcile(u) - - return -} - -func (c *ClusterController) Run(stopCh <-chan struct{}) { - for _, q := range c.Informers.WorkerQueues { - q.Run(stopCh) - } - controller.GetDefaults(c.controller).Run(stopCh) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/config/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/pkg/controller/config/BUILD.bazel deleted file mode 100644 index 27e4fc8fa7f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/config/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["configuration.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/controller/config", - importpath = "sigs.k8s.io/cluster-api/pkg/controller/config", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/config/configuration.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/config/configuration.go deleted file mode 100644 index 6e236e46953..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/config/configuration.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package config - -import ( - "time" - - "github.com/spf13/pflag" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/tools/leaderelection/resourcelock" -) - -// This is a COPY from kubernetes source tree to avoid importing the entire kubernetes tree. - -// 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 - // 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 metav1.Duration - // 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 metav1.Duration - // 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 metav1.Duration - // ResourceLock indicates the resource object type that will be used to lock - // during leader election cycles. - ResourceLock string -} - -type Configuration struct { - Kubeconfig string - InCluster bool - WorkerCount int - leaderElectionConfig *LeaderElectionConfiguration -} - -const ( - // DefaultLeaseDuration is the default lease duration for leader election - DefaultLeaseDuration = 15 * time.Second - // DefaultRenewDeadline is the default renew duration for leader election - DefaultRenewDeadline = 10 * time.Second - // DefaultRetryPeriod is the default retry period for leader election - DefaultRetryPeriod = 2 * time.Second -) - -var ControllerConfig = Configuration{ - InCluster: true, - WorkerCount: 5, // Default 5 worker. - leaderElectionConfig: &LeaderElectionConfiguration{ - LeaderElect: false, - LeaseDuration: metav1.Duration{Duration: DefaultLeaseDuration}, - RenewDeadline: metav1.Duration{Duration: DefaultRenewDeadline}, - RetryPeriod: metav1.Duration{Duration: DefaultRetryPeriod}, - ResourceLock: resourcelock.EndpointsResourceLock, - }, -} - -func GetLeaderElectionConfig() *LeaderElectionConfiguration { - return ControllerConfig.leaderElectionConfig -} - -func (c *Configuration) AddFlags(fs *pflag.FlagSet) { - fs.StringVar(&c.Kubeconfig, "kubeconfig", c.Kubeconfig, "Path to kubeconfig file with authorization and master location information.") - fs.BoolVar(&c.InCluster, "incluster", c.InCluster, "Controller will be running inside the cluster.") - fs.IntVar(&c.WorkerCount, "workers", c.WorkerCount, "The number of workers for controller.") - - AddLeaderElectionFlags(c.leaderElectionConfig, fs) -} - -func AddLeaderElectionFlags(l *LeaderElectionConfiguration, fs *pflag.FlagSet) { - fs.BoolVar(&l.LeaderElect, "leader-elect", l.LeaderElect, ""+ - "Start a leader election client and gain leadership before "+ - "executing the main loop. Enable this when running replicated "+ - "components for high availability.") - fs.DurationVar(&l.LeaseDuration.Duration, "leader-elect-lease-duration", l.LeaseDuration.Duration, ""+ - "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.") - fs.DurationVar(&l.RenewDeadline.Duration, "leader-elect-renew-deadline", l.RenewDeadline.Duration, ""+ - "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.") - fs.DurationVar(&l.RetryPeriod.Duration, "leader-elect-retry-period", l.RetryPeriod.Duration, ""+ - "The duration the clients should wait between attempting acquisition and renewal "+ - "of a leadership. This is only applicable if leader election is enabled.") - fs.StringVar(&l.ResourceLock, "leader-elect-resource-lock", l.ResourceLock, ""+ - "The type of resource object that is used for locking during "+ - "leader election. Supported options are `endpoints` (default) and `configmap`.") -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/doc.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/doc.go deleted file mode 100644 index e2c9e31ecdd..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/doc.go +++ /dev/null @@ -1,21 +0,0 @@ - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - -package controller - diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/BUILD deleted file mode 100644 index d6e147105ca..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/BUILD +++ /dev/null @@ -1,70 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "actuator.go", - "controller.go", - "node.go", - "queue.go", - "testactuator.go", - "zz_generated.api.register.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine", - importpath = "sigs.k8s.io/cluster-api/pkg/controller/machine", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/builders:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/config:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "controller_test.go", - "machine_suite_test.go", - "node_test.go", - "reconcile_test.go", - ], - embed = [":go_default_library"], - importpath = "sigs.k8s.io/cluster-api/pkg/controller/machine_test", - deps = [ - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/test:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/openapi:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/actuator.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/actuator.go deleted file mode 100644 index 8451ce4c2bb..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/actuator.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machine - -import ( - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -// Actuator controls machines on a specific infrastructure. All -// methods should be idempotent unless otherwise specified. -type Actuator interface { - // Create the machine. - Create(*clusterv1.Cluster, *clusterv1.Machine) error - // Delete the machine. - Delete(*clusterv1.Cluster, *clusterv1.Machine) error - // Update the machine to the provided definition. - Update(*clusterv1.Cluster, *clusterv1.Machine) error - // Checks if the machine currently exists. - Exists(*clusterv1.Cluster, *clusterv1.Machine) (bool, error) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/controller.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/controller.go deleted file mode 100644 index 5e7859723e7..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/controller.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machine - -import ( - "errors" - - "github.com/golang/glog" - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes" - - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - listers "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - cfg "sigs.k8s.io/cluster-api/pkg/controller/config" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" - "sigs.k8s.io/cluster-api/util" -) - -// +controller:group=cluster,version=v1alpha1,kind=Machine,resource=machines -type MachineControllerImpl struct { - builders.DefaultControllerFns - - // lister indexes properties about Machine - lister listers.MachineLister - - actuator Actuator - - kubernetesClientSet kubernetes.Interface - clientSet clientset.Interface - linkedNodes map[string]bool - cachedReadiness map[string]bool -} - -// Init initializes the controller and is called by the generated code -// Register watches for additional resource types here. -func (c *MachineControllerImpl) Init(arguments sharedinformers.ControllerInitArguments, actuator Actuator) { - // Use the lister for indexing machines labels - c.lister = arguments.GetSharedInformers().Factory.Cluster().V1alpha1().Machines().Lister() - - clientset, err := clientset.NewForConfig(arguments.GetRestConfig()) - if err != nil { - glog.Fatalf("error creating machine client: %v", err) - } - c.clientSet = clientset - c.kubernetesClientSet = arguments.GetSharedInformers().KubernetesClientSet - - c.linkedNodes = make(map[string]bool) - c.cachedReadiness = make(map[string]bool) - - c.actuator = actuator - - // Start watching for Node resource. It will effectively create a new worker queue, and - // reconcileNode() will be invoked in a loop to handle the reconciling. - ni := arguments.GetSharedInformers().KubernetesFactory.Core().V1().Nodes() - arguments.GetSharedInformers().Watch("NodeWatcher", ni.Informer(), nil, c.reconcileNode) -} - -// Reconcile handles enqueued messages. The delete will be handled by finalizer. -func (c *MachineControllerImpl) Reconcile(machine *clusterv1.Machine) error { - // Implement controller logic here - name := machine.Name - glog.Infof("Running reconcile Machine for %s\n", name) - - if !machine.ObjectMeta.DeletionTimestamp.IsZero() { - // no-op if finalizer has been removed. - if !util.Contains(machine.ObjectMeta.Finalizers, clusterv1.MachineFinalizer) { - glog.Infof("reconciling machine object %v causes a no-op as there is no finalizer.", name) - return nil - } - // Master should not be deleted as part of reconcilation. - if cfg.ControllerConfig.InCluster && util.IsMaster(machine) { - glog.Infof("skipping reconciling master machine object %v", name) - return nil - } - glog.Infof("reconciling machine object %v triggers delete.", name) - if err := c.delete(machine); err != nil { - glog.Errorf("Error deleting machine object %v; %v", name, err) - return err - } - - // Remove finalizer on successful deletion. - glog.Infof("machine object %v deletion successful, removing finalizer.", name) - machine.ObjectMeta.Finalizers = util.Filter(machine.ObjectMeta.Finalizers, clusterv1.MachineFinalizer) - if _, err := c.clientSet.ClusterV1alpha1().Machines(machine.Namespace).Update(machine); err != nil { - glog.Errorf("Error removing finalizer from machine object %v; %v", name, err) - return err - } - return nil - } - - cluster, err := c.getCluster(machine) - if err != nil { - return err - } - - exist, err := c.actuator.Exists(cluster, machine) - if err != nil { - glog.Errorf("Error checking existance of machine instance for machine object %v; %v", name, err) - return err - } - if exist { - glog.Infof("reconciling machine object %v triggers idempotent update.", name) - return c.update(machine) - } - // Machine resource created. Machine does not yet exist. - glog.Infof("reconciling machine object %v triggers idempotent create.", machine.ObjectMeta.Name) - return c.create(machine) -} - -func (c *MachineControllerImpl) Get(namespace, name string) (*clusterv1.Machine, error) { - return c.lister.Machines(namespace).Get(name) -} - -func (c *MachineControllerImpl) create(machine *clusterv1.Machine) error { - cluster, err := c.getCluster(machine) - if err != nil { - return err - } - - return c.actuator.Create(cluster, machine) -} - -func (c *MachineControllerImpl) update(new_machine *clusterv1.Machine) error { - cluster, err := c.getCluster(new_machine) - if err != nil { - return err - } - - // TODO: Assume single master for now. - // TODO: Assume we never change the role for the machines. (Master->Node, Node->Master, etc) - return c.actuator.Update(cluster, new_machine) -} - -func (c *MachineControllerImpl) delete(machine *clusterv1.Machine) error { - cluster, err := c.getCluster(machine) - if err != nil { - return err - } - - return c.actuator.Delete(cluster, machine) -} - -func (c *MachineControllerImpl) getCluster(machine *clusterv1.Machine) (*clusterv1.Cluster, error) { - clusterList, err := c.clientSet.ClusterV1alpha1().Clusters(machine.Namespace).List(metav1.ListOptions{}) - if err != nil { - return nil, err - } - - switch len(clusterList.Items) { - case 0: - return nil, errors.New("no clusters defined") - case 1: - return &clusterList.Items[0], nil - default: - return nil, errors.New("multiple clusters defined") - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/controller_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/controller_test.go deleted file mode 100644 index 027a4946757..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/controller_test.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machine - -import ( - "strconv" - "sync" - "testing" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/wait" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" - - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" -) - -func machineControllerReconcile(t *testing.T, cs *clientset.Clientset, controller *MachineController, namespace string) { - instance := clusterv1.Machine{} - instance.Name = "instance-1" - expectedKey := namespace + "/instance-1" - - // When creating a new object, it should invoke the reconcile method. - cluster := testutil.GetVanillaCluster() - cluster.Name = "cluster-1" - clusterClient := cs.ClusterV1alpha1().Clusters(namespace) - if _, err := clusterClient.Create(&cluster); err != nil { - t.Fatal(err) - } - defer cleanUpCluster(clusterClient, cluster) - - client := cs.ClusterV1alpha1().Machines(namespace) - before := make(chan struct{}) - after := make(chan struct{}) - var aftOnce, befOnce sync.Once - - actualKey := "" - var actualErr error = nil - - // Setup test callbacks to be called when the message is reconciled. - // Sometimes reconcile is called multiple times, so use Once to prevent closing the channels again. - controller.BeforeReconcile = func(key string) { - actualKey = key - befOnce.Do(func() { close(before) }) - } - controller.AfterReconcile = func(key string, err error) { - actualKey = key - actualErr = err - aftOnce.Do(func() { close(after) }) - } - - // Create an instance - if _, err := client.Create(&instance); err != nil { - t.Fatal(err) - } - defer client.Delete(instance.Name, &metav1.DeleteOptions{}) - - // Verify reconcile function is called against the correct key - select { - case <-before: - if actualKey != expectedKey { - t.Fatalf( - "Reconcile function was not called with the correct key.\nActual:\t%+v\nExpected:\t%+v", - actualKey, expectedKey) - } - if actualErr != nil { - t.Fatal(actualErr) - } - case <-time.After(time.Second * 2): - t.Fatalf("reconcile never called") - } - - select { - case <-after: - if actualKey != expectedKey { - t.Fatalf( - "Reconcile function was not called with the correct key.\nActual:\t%+v\nExpected:\t%+v", - actualKey, expectedKey) - } - if actualErr != nil { - t.Fatal(actualErr) - } - case <-time.After(time.Second * 2): - t.Fatalf("reconcile never finished") - } -} - -func machineControllerConcurrentReconcile(t *testing.T, cs *clientset.Clientset, - controller *MachineController) { - // Create a cluster object. - cluster := testutil.GetVanillaCluster() - cluster.Name = "cluster-1" - clusterClient := cs.ClusterV1alpha1().Clusters("default") - if _, err := clusterClient.Create(&cluster); err != nil { - t.Fatal(err) - } - defer cleanUpCluster(clusterClient, cluster) - - client := cs.ClusterV1alpha1().Machines("default") - - // Direct test actuator to block on Create() call. - ta := controller.controller.actuator.(*TestActuator) - ta.BlockOnCreate = true - ta.CreateCallCount = 0 - defer ta.Unblock() - - // Create a few instances - const numMachines = 5 - for i := 0; i < numMachines; i++ { - instance := clusterv1.Machine{} - instance.Name = "instance" + strconv.Itoa(i) - if _, err := client.Create(&instance); err != nil { - t.Fatal(err) - } - } - - err := wait.Poll(time.Second, 10*time.Second, func() (bool, error) { - return (ta.CreateCallCount == numMachines), nil - }) - - if err != nil { - t.Fatalf("The reconcilation didn't run in parallel.") - } -} - -func cleanUpCluster(clusterClient v1alpha1.ClusterInterface, cluster clusterv1.Cluster) { - // We have to delete the finalizer since the cluster - // controller is not running - cluster.ObjectMeta.Finalizers = []string{} - clusterClient.Update(&cluster) - clusterClient.Delete(cluster.Name, &metav1.DeleteOptions{}) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/machine_suite_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/machine_suite_test.go deleted file mode 100644 index 476ebc85e71..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/machine_suite_test.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machine - -import ( - "testing" - - "github.com/kubernetes-incubator/apiserver-builder/pkg/test" - "k8s.io/client-go/rest" - - "sigs.k8s.io/cluster-api/pkg/apis" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" - "sigs.k8s.io/cluster-api/pkg/openapi" -) - -func TestMachine(t *testing.T) { - testenv := test.NewTestEnvironment() - config := testenv.Start(apis.GetAllApiBuilders(), openapi.GetOpenAPIDefinitions) - cs := clientset.NewForConfigOrDie(config) - - // TODO: When cluster-api support per namepsace object, we need to make each subtest to run - // in different namespace. Everything lives inside default namespace so that the test needs to run - // sequentially, which is the default behavior for "go test". - t.Run("machineControllerReconcile", func(t *testing.T) { - controller, shutdown := getController(config) - defer close(shutdown) - machineControllerReconcile(t, cs, controller, "default") - }) - t.Run("machineControllerReconcileNonDefaultNameSpace", func(t *testing.T) { - controller, shutdown := getController(config) - defer close(shutdown) - machineControllerReconcile(t, cs, controller, "nondefault") - }) - t.Run("machineControllerConcurrentReconcile", func(t *testing.T) { - controller, shutdown := getController(config) - defer close(shutdown) - machineControllerConcurrentReconcile(t, cs, controller) - }) - testenv.Stop() -} - -func getController(config *rest.Config) (*MachineController, chan struct{}) { - shutdown := make(chan struct{}) - si := sharedinformers.NewSharedInformers(config, shutdown) - actuator := NewTestActuator() - controller := NewMachineController(config, si, actuator) - controller.RunAsync(shutdown) - - return controller, shutdown -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/node.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/node.go deleted file mode 100644 index f17d9666b66..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/node.go +++ /dev/null @@ -1,158 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machine - -import ( - "github.com/golang/glog" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/tools/cache" - - "sigs.k8s.io/cluster-api/pkg/controller/noderefutil" - "sigs.k8s.io/cluster-api/util" -) - -const ( - machineAnnotationKey = "machine" -) - -// We are using "machine" annotation to link node and machine resource. The "machine" -// annotation is an implementation detail of how the two objects can get linked together, but it is -// not required behavior. However, in the event that a Machine.Spec update requires replacing the -// Node, this can allow for faster turn-around time by allowing a new Node to be created with a new -// name while the old node is being deleted. -// -// Currently, these annotations are added by the node itself as part of its -// bootup script after "kubeadm join" succeeds. -func (c *MachineControllerImpl) link(node *corev1.Node) error { - nodeReady := noderefutil.IsNodeReady(node) - - // skip update if cached and no change in readiness. - if c.linkedNodes[node.ObjectMeta.Name] { - if cachedReady, ok := c.cachedReadiness[node.ObjectMeta.Name]; ok && cachedReady == nodeReady { - return nil - } - } - - val, ok := node.ObjectMeta.Annotations[machineAnnotationKey] - if !ok { - return nil - } - - namespace, mach, err := cache.SplitMetaNamespaceKey(val) - if err != nil { - glog.Errorf("Machine annotation format is incorrect %v: %v\n", val, err) - return err - } - machineClient := c.clientSet.ClusterV1alpha1().Machines(util.GetNamespaceOrDefault(namespace)) - machine, err := machineClient.Get(mach, metav1.GetOptions{}) - if err != nil { - glog.Errorf("Error getting machine %v: %v\n", mach, err) - return err - } - - machine.Status.LastUpdated = metav1.Now() - machine.Status.NodeRef = objectRef(node) - if _, err = machineClient.UpdateStatus(machine); err != nil { - glog.Errorf("Error updating machine to link to node: %v\n", err) - } else { - glog.Infof("Successfully linked machine %s to node %s\n", - machine.ObjectMeta.Name, node.ObjectMeta.Name) - c.linkedNodes[node.ObjectMeta.Name] = true - c.cachedReadiness[node.ObjectMeta.Name] = nodeReady - } - return err -} - -func (c *MachineControllerImpl) unlink(node *corev1.Node) error { - val, ok := node.ObjectMeta.Annotations[machineAnnotationKey] - if !ok { - return nil - } - - namespace, mach, err := cache.SplitMetaNamespaceKey(val) - if err != nil { - glog.Errorf("Machine annotation format is incorrect %v: %v\n", val, err) - return err - } - - machineClient := c.clientSet.ClusterV1alpha1().Machines(util.GetNamespaceOrDefault(namespace)) - machine, err := machineClient.Get(mach, metav1.GetOptions{}) - if err != nil { - glog.Errorf("Error getting machine %v: %v\n", mach, err) - return err - } - - // This machine has no link to remove - if machine.Status.NodeRef == nil { - return nil - } - - // This machine was linked to a different node, don't unlink them - if machine.Status.NodeRef.Name != node.ObjectMeta.Name { - glog.Warningf("Node (%v) is tring to unlink machine (%v) which is linked with node (%v).", - node.ObjectMeta.Name, machine.ObjectMeta.Name, machine.Status.NodeRef.Name) - return nil - } - - machine.Status.LastUpdated = metav1.Now() - machine.Status.NodeRef = nil - if _, err = machineClient.UpdateStatus(machine); err != nil { - glog.Errorf("Error updating machine %s to unlink node %s: %v\n", - machine.ObjectMeta.Name, node.ObjectMeta.Name, err) - } else { - glog.Infof("Successfully unlinked node %s from machine %s\n", - node.ObjectMeta.Name, machine.ObjectMeta.Name) - delete(c.cachedReadiness, node.ObjectMeta.Name) - delete(c.linkedNodes, node.ObjectMeta.Name) - } - return err -} - -// reconcileNode is serialized by an internal queue. It has built-in rated limited retry logic. -// So as long as the reconcile loop return an error, the processing queue will retry the -// reconciliation. -func (c *MachineControllerImpl) reconcileNode(key string) error { - _, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - return err - } - - n, err := c.kubernetesClientSet.CoreV1().Nodes().Get(name, metav1.GetOptions{}) - if errors.IsNotFound(err) { - return nil - } - if err != nil { - glog.Errorf("Unable to retrieve Node %v from store: %v", key, err) - return err - } - - if n.DeletionTimestamp.IsZero() { - return c.link(n) - } else { - return c.unlink(n) - } -} - -func objectRef(node *corev1.Node) *corev1.ObjectReference { - return &corev1.ObjectReference{ - Kind: "Node", - Name: node.ObjectMeta.Name, - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/node_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/node_test.go deleted file mode 100644 index d663fd6c6ac..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/node_test.go +++ /dev/null @@ -1,251 +0,0 @@ -package machine - -import ( - "testing" - "time" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - k8sfake "k8s.io/client-go/kubernetes/fake" - clienttesting "k8s.io/client-go/testing" - "k8s.io/client-go/tools/cache" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake" - v1alpha1listers "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" -) - -func TestReconcileNode(t *testing.T) { - tests := []struct { - name string - nodeHasMachineAnnotation bool - nodeIsDeleting bool - nodeLinked bool - nodeCached bool - nodeCachedReady bool - nodeReady bool - nodeNotPresent bool - machineNotPresent bool - nodeRefName string - expectedErr bool - expectLinked bool - expectedActions []string - }{ - { - name: "node doesn't exist, noop", - nodeHasMachineAnnotation: true, - nodeNotPresent: true, - }, - { - name: "node with machine annotations, link", - nodeHasMachineAnnotation: true, - expectLinked: true, - expectedActions: []string{"get", "update"}, - }, - { - name: "node with no machine annotations, noop", - }, - { - name: "node with machine annotations, missing machine, err", - nodeHasMachineAnnotation: true, - machineNotPresent: true, - expectedErr: true, - expectedActions: []string{"get"}, - }, - { - name: "node being deleted, unlink", - nodeHasMachineAnnotation: true, - nodeIsDeleting: true, - nodeRefName: "bar", - nodeCached: true, - expectedActions: []string{"get", "update"}, - }, - { - name: "node being deleted, no machine annotations, noop", - nodeIsDeleting: true, - }, - { - name: "node being deleted, missing machine, err", - nodeHasMachineAnnotation: true, - nodeIsDeleting: true, - machineNotPresent: true, - expectedActions: []string{"get"}, - expectedErr: true, - }, - { - name: "node being deleted, no node ref, noop", - nodeHasMachineAnnotation: true, - nodeIsDeleting: true, - expectedActions: []string{"get"}, - }, - { - name: "node being deleted, node ref mismatch, noop", - nodeHasMachineAnnotation: true, - nodeIsDeleting: true, - nodeRefName: "random", - expectedActions: []string{"get"}, - }, - { - name: "node cached and no change to ready state, noop", - nodeCached: true, - nodeReady: true, - }, - { - name: "node cached ready and change to not ready state, update", - nodeCached: true, - nodeCachedReady: true, - nodeReady: false, - nodeHasMachineAnnotation: true, - expectLinked: true, - expectedActions: []string{"get", "update"}, - }, - { - name: "node cached not ready and change to ready state, update", - nodeCached: true, - nodeCachedReady: false, - nodeReady: true, - nodeHasMachineAnnotation: true, - expectLinked: true, - expectedActions: []string{"get", "update"}, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - m := getMachine("foo", false, false, false) - if test.nodeRefName != "" { - m.Status.NodeRef = &corev1.ObjectReference{ - Kind: "Node", - Name: test.nodeRefName, - } - } - mrObjects := []runtime.Object{} - if !test.machineNotPresent { - mrObjects = append(mrObjects, m) - } - - machinesIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) - err := machinesIndexer.Add(m) - if err != nil { - t.Fatal(err) - } - machineLister := v1alpha1listers.NewMachineLister(machinesIndexer) - - fakeClient := fake.NewSimpleClientset(mrObjects...) - - node := &corev1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Name: "bar", - Annotations: make(map[string]string), - }, - } - if test.nodeReady { - node.Status = corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionTrue, - LastTransitionTime: metav1.Now(), - }, - }, - } - } - if test.nodeHasMachineAnnotation { - node.ObjectMeta.Annotations[machineAnnotationKey] = "default/foo" - } - if test.nodeIsDeleting { - node.DeletionTimestamp = &metav1.Time{Time: time.Now()} - } - - krObjects := []runtime.Object{} - if !test.nodeNotPresent { - krObjects = append(krObjects, node) - } - fakeK8sClient := k8sfake.NewSimpleClientset(krObjects...) - - target := &MachineControllerImpl{} - target.clientSet = fakeClient - target.kubernetesClientSet = fakeK8sClient - target.lister = machineLister - target.linkedNodes = make(map[string]bool) - target.cachedReadiness = make(map[string]bool) - if test.nodeCached { - target.linkedNodes["bar"] = true - target.cachedReadiness["bar"] = test.nodeCachedReady - } - - nodeKey, err := cache.MetaNamespaceKeyFunc(node) - if err != nil { - t.Fatalf("unable to get key for test node, %v", err) - } - err = target.reconcileNode(nodeKey) - - if (err != nil) != test.expectedErr { - t.Fatalf("got %v error, expected %v error", err, test.expectedErr) - } - - cached := target.linkedNodes["bar"] - if cached != test.expectLinked && !test.nodeCached { - t.Errorf("got %v node cache result, expected %v node cache result", cached, test.expectLinked) - } - // Successful unlink should clear cache. - if test.nodeIsDeleting && len(test.expectedActions) == 2 { - if cached { - t.Errorf("got %v node cache result, expected no node cache result", cached) - } - } - if cached { - isReady := target.cachedReadiness["bar"] - // If successful, isRead - if len(test.expectedActions) == 2 { - if isReady != test.nodeReady { - t.Errorf("got %v cached node ready, expected %v cached node ready", isReady, test.nodeReady) - } - } else { - if isReady != test.nodeCachedReady { - t.Errorf("got %v cached node ready, expected %v cached node ready", isReady, test.nodeCachedReady) - } - } - } - - var actualMachine *v1alpha1.Machine - actions := fakeClient.Actions() - if len(actions) != len(test.expectedActions) { - t.Fatalf("got %v actions, expected %v actions; got actions %v, expected actions %v", len(actions), len(test.expectedActions), actions, test.expectedActions) - } - - for i, action := range test.expectedActions { - if actions[i].GetVerb() != action { - t.Errorf("got %v action verb, expected %v action verb", actions[i].GetVerb(), action) - } - if actions[i].GetVerb() == "update" { - updateAction, ok := actions[i].(clienttesting.UpdateAction) - if !ok { - t.Fatalf("unexpected action %#v", action) - } - actualMachine, ok = updateAction.GetObject().(*v1alpha1.Machine) - if !ok { - t.Fatalf("unexpected object %#v", actualMachine) - } - } - } - if actualMachine != nil && actualMachine.Status.LastUpdated.IsZero() { - t.Errorf("got %v last updated time, expected non-zero last updated time.", actualMachine.Status.LastUpdated) - } - if test.expectLinked { - if actualMachine.Status.NodeRef == nil { - t.Fatalf("got nil node ref, expected non-nil node ref") - } - if actualMachine.Status.NodeRef.Name != "bar" { - t.Errorf("got %v node ref name, expected bar node ref name.", actualMachine.Status.NodeRef.Name) - } - } - if !test.expectLinked { - if actualMachine != nil && actualMachine.Status.NodeRef != nil { - t.Fatalf("got non-nil node ref, expected nil node ref") - } - } - }) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/queue.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/queue.go deleted file mode 100644 index 2bf6debf42e..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/queue.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machine - -import ( - "time" - - "github.com/golang/glog" - "k8s.io/apimachinery/pkg/util/wait" - - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - "sigs.k8s.io/cluster-api/pkg/controller/config" -) - -func (c *MachineController) RunAsync(stopCh <-chan struct{}) { - for _, q := range c.Informers.WorkerQueues { - go c.StartWorkerQueue(q, stopCh) - } -} - -// StartWorkerQueue schedules a routine to continuously process Queue messages -// until shutdown is closed -func (c *MachineController) StartWorkerQueue(q *controller.QueueWorker, shutdown <-chan struct{}) { - glog.Infof("Start %s Queue", q.Name) - defer q.Queue.ShutDown() - - for i := 0; i < config.ControllerConfig.WorkerCount; i++ { - // Every second, process all messages in the Queue until it is time to shutdown - go wait.Until(q.ProcessAllMessages, time.Second, shutdown) - } - - <-shutdown - - // Stop accepting messages into the Queue - glog.V(1).Infof("Shutting down %s Queue\n", q.Name) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/reconcile_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/reconcile_test.go deleted file mode 100644 index 1473586e399..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/reconcile_test.go +++ /dev/null @@ -1,185 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machine - -import ( - "testing" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - core "k8s.io/client-go/testing" - clustercommon "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake" - "sigs.k8s.io/cluster-api/util" -) - -func TestMachineSetControllerReconcileHandler(t *testing.T) { - tests := []struct { - name string - objExists bool - instanceExists bool - isDeleting bool - withFinalizer bool - isMaster bool - ignoreDeleteCallCount bool - expectFinalizerRemoved bool - numExpectedCreateCalls int64 - numExpectedDeleteCalls int64 - numExpectedUpdateCalls int64 - numExpectedExistsCalls int64 - }{ - { - name: "Create machine", - objExists: false, - instanceExists: false, - numExpectedCreateCalls: 1, - numExpectedExistsCalls: 1, - }, - { - name: "Update machine", - objExists: true, - instanceExists: true, - numExpectedUpdateCalls: 1, - numExpectedExistsCalls: 1, - }, - { - name: "Delete machine, instance exists, with finalizer", - objExists: true, - instanceExists: true, - isDeleting: true, - withFinalizer: true, - expectFinalizerRemoved: true, - numExpectedDeleteCalls: 1, - }, - { - // This should not be possible. Here for completeness. - name: "Delete machine, instance exists without finalizer", - objExists: true, - instanceExists: true, - isDeleting: true, - withFinalizer: false, - }, - { - name: "Delete machine, instance does not exist, with finalizer", - objExists: true, - instanceExists: false, - isDeleting: true, - withFinalizer: true, - ignoreDeleteCallCount: true, - expectFinalizerRemoved: true, - }, - { - name: "Delete machine, instance does not exist, without finalizer", - objExists: true, - instanceExists: false, - isDeleting: true, - withFinalizer: false, - }, - { - name: "Delete machine, skip master", - objExists: true, - instanceExists: true, - isDeleting: true, - withFinalizer: true, - isMaster: true, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - machineToTest := getMachine("bar", test.isDeleting, test.withFinalizer, test.isMaster) - knownObjects := []runtime.Object{} - if test.objExists { - knownObjects = append(knownObjects, machineToTest) - } - - machineUpdated := false - fakeClient := fake.NewSimpleClientset(knownObjects...) - fakeClient.PrependReactor("update", "machines", func(action core.Action) (bool, runtime.Object, error) { - machineUpdated = true - return false, nil, nil - }) - - // When creating a new object, it should invoke the reconcile method. - cluster := testutil.GetVanillaCluster() - cluster.Name = "cluster-1" - if _, err := fakeClient.ClusterV1alpha1().Clusters(metav1.NamespaceDefault).Create(&cluster); err != nil { - t.Fatal(err) - } - - actuator := NewTestActuator() - actuator.ExistsValue = test.instanceExists - - target := &MachineControllerImpl{} - target.actuator = actuator - target.clientSet = fakeClient - - var err error - err = target.Reconcile(machineToTest) - if err != nil { - t.Fatal(err) - } - - finalizerRemoved := machineUpdated && !util.Contains(machineToTest.ObjectMeta.Finalizers, v1alpha1.MachineFinalizer) - - if finalizerRemoved != test.expectFinalizerRemoved { - t.Errorf("Got finalizer removed %v, expected finalizer removed %v", finalizerRemoved, test.expectFinalizerRemoved) - } - if actuator.CreateCallCount != test.numExpectedCreateCalls { - t.Errorf("Got %v create calls, expected %v", actuator.CreateCallCount, test.numExpectedCreateCalls) - } - if actuator.DeleteCallCount != test.numExpectedDeleteCalls && !test.ignoreDeleteCallCount { - t.Errorf("Got %v delete calls, expected %v", actuator.DeleteCallCount, test.numExpectedDeleteCalls) - } - if actuator.UpdateCallCount != test.numExpectedUpdateCalls { - t.Errorf("Got %v update calls, expected %v", actuator.UpdateCallCount, test.numExpectedUpdateCalls) - } - if actuator.ExistsCallCount != test.numExpectedExistsCalls { - t.Errorf("Got %v exists calls, expected %v", actuator.ExistsCallCount, test.numExpectedExistsCalls) - } - - }) - } -} - -func getMachine(name string, isDeleting, hasFinalizer, isMaster bool) *v1alpha1.Machine { - m := &v1alpha1.Machine{ - TypeMeta: metav1.TypeMeta{ - Kind: "Machine", - APIVersion: v1alpha1.SchemeGroupVersion.String(), - }, - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: metav1.NamespaceDefault, - }, - } - if isDeleting { - now := metav1.NewTime(time.Now()) - m.ObjectMeta.SetDeletionTimestamp(&now) - } - if hasFinalizer { - m.ObjectMeta.SetFinalizers([]string{v1alpha1.MachineFinalizer}) - } - if isMaster { - m.Spec.Roles = []clustercommon.MachineRole{clustercommon.MasterRole} - } - - return m -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/testactuator.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/testactuator.go deleted file mode 100644 index 523e3fb5617..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/testactuator.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machine - -import ( - "sync" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -type TestActuator struct { - unblock chan string - BlockOnCreate bool - BlockOnDelete bool - BlockOnUpdate bool - BlockOnExists bool - CreateCallCount int64 - DeleteCallCount int64 - UpdateCallCount int64 - ExistsCallCount int64 - ExistsValue bool - Lock sync.Mutex -} - -func (a *TestActuator) Create(*v1alpha1.Cluster, *v1alpha1.Machine) error { - defer func() { - if a.BlockOnCreate { - <-a.unblock - } - }() - - a.Lock.Lock() - defer a.Lock.Unlock() - a.CreateCallCount++ - return nil -} - -func (a *TestActuator) Delete(*v1alpha1.Cluster, *v1alpha1.Machine) error { - defer func() { - if a.BlockOnDelete { - <-a.unblock - } - }() - - a.Lock.Lock() - defer a.Lock.Unlock() - a.DeleteCallCount++ - return nil -} - -func (a *TestActuator) Update(c *v1alpha1.Cluster, machine *v1alpha1.Machine) error { - defer func() { - if a.BlockOnUpdate { - <-a.unblock - } - }() - - a.Lock.Lock() - defer a.Lock.Unlock() - a.UpdateCallCount++ - return nil -} - -func (a *TestActuator) Exists(*v1alpha1.Cluster, *v1alpha1.Machine) (bool, error) { - defer func() { - if a.BlockOnExists { - <-a.unblock - } - }() - - a.Lock.Lock() - defer a.Lock.Unlock() - a.ExistsCallCount++ - return a.ExistsValue, nil -} - -func NewTestActuator() *TestActuator { - ta := new(TestActuator) - ta.unblock = make(chan string) - return ta -} - -func (a *TestActuator) Unblock() { - close(a.unblock) -} \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/zz_generated.api.register.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/zz_generated.api.register.go deleted file mode 100644 index 0dcf3267960..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machine/zz_generated.api.register.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by apiregister-gen. Do not edit it manually! - -package machine - -import ( - "github.com/golang/glog" - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" -) - -// MachineController implements the controller.MachineController interface -type MachineController struct { - queue *controller.QueueWorker - - // Handles messages - controller *MachineControllerImpl - - Name string - - BeforeReconcile func(key string) - AfterReconcile func(key string, err error) - - Informers *sharedinformers.SharedInformers -} - -// NewController returns a new MachineController for responding to Machine events -func NewMachineController(config *rest.Config, si *sharedinformers.SharedInformers, actuator Actuator) *MachineController { - q := workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "Machine") - - queue := &controller.QueueWorker{q, 10, "Machine", nil} - c := &MachineController{queue, nil, "Machine", nil, nil, si} - - // For non-generated code to add events - c.controller = &MachineControllerImpl{} - c.controller.Init(&sharedinformers.ControllerInitArgumentsImpl{si, config, c.LookupAndReconcile}, actuator) - - queue.Reconcile = c.reconcile - if c.Informers.WorkerQueues == nil { - c.Informers.WorkerQueues = map[string]*controller.QueueWorker{} - } - c.Informers.WorkerQueues["Machine"] = queue - si.Factory.Cluster().V1alpha1().Machines().Informer(). - AddEventHandler(&controller.QueueingEventHandler{q, nil, false}) - return c -} - -func (c *MachineController) GetName() string { - return c.Name -} - -func (c *MachineController) LookupAndReconcile(key string) (err error) { - return c.reconcile(key) -} - -func (c *MachineController) reconcile(key string) (err error) { - var namespace, name string - - if c.BeforeReconcile != nil { - c.BeforeReconcile(key) - } - if c.AfterReconcile != nil { - // Wrap in a function so err is evaluated after it is set - defer func() { c.AfterReconcile(key, err) }() - } - - namespace, name, err = cache.SplitMetaNamespaceKey(key) - if err != nil { - return - } - - u, err := c.controller.Get(namespace, name) - if errors.IsNotFound(err) { - glog.Infof("Not doing work for Machine %v because it has been deleted", key) - // Set error so it is picked up by AfterReconcile and the return function - err = nil - return - } - if err != nil { - glog.Errorf("Unable to retrieve Machine %v from store: %v", key, err) - return - } - - // Set error so it is picked up by AfterReconcile and the return function - err = c.controller.Reconcile(u) - - return -} - -func (c *MachineController) Run(stopCh <-chan struct{}) { - for _, q := range c.Informers.WorkerQueues { - q.Run(stopCh) - } - controller.GetDefaults(c.controller).Run(stopCh) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/BUILD.bazel deleted file mode 100644 index 5f52d6f35d6..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/BUILD.bazel +++ /dev/null @@ -1,68 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "controller.go", - "rolling.go", - "sync.go", - "zz_generated.api.register.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment", - importpath = "sigs.k8s.io/cluster-api/pkg/controller/machinedeployment", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/builders:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/integer:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "controller_test.go", - "machinedeployment_suite_test.go", - "rolling_test.go", - "sync_test.go", - ], - embed = [":go_default_library"], - deps = [ - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/test:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/openapi:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/controller.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/controller.go deleted file mode 100644 index 29dc93425d6..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/controller.go +++ /dev/null @@ -1,373 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machinedeployment - -import ( - "fmt" - "reflect" - - "github.com/golang/glog" - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/types" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/client-go/tools/cache" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - listers "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" -) - -// controllerKind contains the schema.GroupVersionKind for this controller type. -var controllerKind = v1alpha1.SchemeGroupVersion.WithKind("MachineDeployment") - -// +controller:group=cluster,version=v1alpha1,kind=MachineDeployment,resource=machinedeployments -type MachineDeploymentControllerImpl struct { - builders.DefaultControllerFns - - // machineClient a client that knows how to consume Machine resources - machineClient clientset.Interface - - // lister indexes properties about MachineDeployment - mLister listers.MachineLister - mdLister listers.MachineDeploymentLister - msLister listers.MachineSetLister - - informers *sharedinformers.SharedInformers -} - -// Init initializes the controller and is called by the generated code -// Register watches for additional resource types here. -func (c *MachineDeploymentControllerImpl) Init(arguments sharedinformers.ControllerInitArguments) { - // Use the lister for indexing machinedeployments labels - c.mLister = arguments.GetSharedInformers().Factory.Cluster().V1alpha1().Machines().Lister() - c.msLister = arguments.GetSharedInformers().Factory.Cluster().V1alpha1().MachineSets().Lister() - c.mdLister = arguments.GetSharedInformers().Factory.Cluster().V1alpha1().MachineDeployments().Lister() - - arguments.GetSharedInformers().Factory.Cluster().V1alpha1().MachineSets().Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: c.addMachineSet, - UpdateFunc: c.updateMachineSet, - DeleteFunc: c.deleteMachineSet, - }) - - mc, err := clientset.NewForConfig(arguments.GetRestConfig()) - if err != nil { - glog.Fatalf("error building clientset for machineClient: %v", err) - } - c.machineClient = mc - - c.informers = arguments.GetSharedInformers() - - c.waitForCacheSync() -} - -func (c *MachineDeploymentControllerImpl) waitForCacheSync() { - glog.Infof("Waiting for caches to sync for machine deployment controller") - stopCh := make(chan struct{}) - mListerSynced := c.informers.Factory.Cluster().V1alpha1().Machines().Informer().HasSynced - msListerSynced := c.informers.Factory.Cluster().V1alpha1().MachineSets().Informer().HasSynced - mdListerSynced := c.informers.Factory.Cluster().V1alpha1().MachineDeployments().Informer().HasSynced - if !cache.WaitForCacheSync(stopCh, mListerSynced, msListerSynced, mdListerSynced) { - glog.Warningf("Unable to sync caches for machine deployment controller") - return - } - glog.Infof("Caches are synced for machine deployment controller") -} - -func (c *MachineDeploymentControllerImpl) getMachineSetsForDeployment(d *v1alpha1.MachineDeployment) ([]*v1alpha1.MachineSet, error) { - // List all MachineSets to find those we own but that no longer match our - // selector. - msList, err := c.msLister.MachineSets(d.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - // TODO: flush out machine set adoption. - - var filteredMS []*v1alpha1.MachineSet - for _, ms := range msList { - if metav1.GetControllerOf(ms) == nil || (metav1.GetControllerOf(ms) != nil && !metav1.IsControlledBy(ms, d)) { - glog.V(4).Infof("%s not controlled by %v", ms.Name, d.Name) - continue - } - selector, err := metav1.LabelSelectorAsSelector(&d.Spec.Selector) - if err != nil { - glog.Errorf("Skipping machineset %v, failed to get label selector from spec selector.", ms.Name) - continue - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() { - glog.Warningf("Skipping machineset %v as the selector is empty.", ms.Name) - continue - } - if !selector.Matches(labels.Set(ms.Labels)) { - glog.V(4).Infof("Skipping machineset %v, label mismatch.", ms.Name) - continue - } - filteredMS = append(filteredMS, ms) - } - return filteredMS, nil -} - -// Reconcile handles reconciling of machine deployment -func (c *MachineDeploymentControllerImpl) Reconcile(u *v1alpha1.MachineDeployment) error { - // Deep-copy otherwise we are mutating our cache. - d := u.DeepCopy() - - everything := metav1.LabelSelector{} - if reflect.DeepEqual(d.Spec.Selector, &everything) { - if d.Status.ObservedGeneration < d.Generation { - d.Status.ObservedGeneration = d.Generation - if _, err := c.machineClient.ClusterV1alpha1().MachineDeployments(d.Namespace).UpdateStatus(d); err != nil { - glog.Warningf("Failed to update status for deployment %v. %v", d.Name, err) - return err - } - } - return nil - } - - msList, err := c.getMachineSetsForDeployment(d) - if err != nil { - return err - } - - machineMap, err := c.getMachineMapForDeployment(d, msList) - if err != nil { - return err - } - - if d.DeletionTimestamp != nil { - return c.sync(d, msList, machineMap) - } - - if d.Spec.Paused { - return c.sync(d, msList, machineMap) - } - - switch d.Spec.Strategy.Type { - case common.RollingUpdateMachineDeploymentStrategyType: - return c.rolloutRolling(d, msList, machineMap) - } - return fmt.Errorf("unexpected deployment strategy type: %s", d.Spec.Strategy.Type) -} - -func (c *MachineDeploymentControllerImpl) Get(namespace, name string) (*v1alpha1.MachineDeployment, error) { - return c.mdLister.MachineDeployments(namespace).Get(name) -} - -// addMachineSet enqueues the deployment that manages a MachineSet when the MachineSet is created. -func (c *MachineDeploymentControllerImpl) addMachineSet(obj interface{}) { - ms := obj.(*v1alpha1.MachineSet) - - if ms.DeletionTimestamp != nil { - // On a restart of the controller manager, it's possible for an object to - // show up in a state that is already pending deletion. - c.deleteMachineSet(ms) - return - } - - // If it has a ControllerRef, that's all that matters. - if controllerRef := metav1.GetControllerOf(ms); controllerRef != nil { - d := c.resolveControllerRef(ms.Namespace, controllerRef) - if d == nil { - return - } - glog.V(4).Infof("MachineSet %s added for deployment %v.", ms.Name, d.Name) - c.enqueue(d) - return - } - - // Otherwise, it's an orphan. Get a list of all matching Deployments and sync - // them to see if anyone wants to adopt it. - mds := c.getMachineDeploymentsForMachineSet(ms) - if len(mds) == 0 { - return - } - glog.V(4).Infof("Orphan MachineSet %s added.", ms.Name) - for _, d := range mds { - c.enqueue(d) - } -} - -// getMachineDeploymentsForMachineSet returns a list of Deployments that potentially -// match a MachineSet. -func (c *MachineDeploymentControllerImpl) getMachineDeploymentsForMachineSet(ms *v1alpha1.MachineSet) []*v1alpha1.MachineDeployment { - if len(ms.Labels) == 0 { - glog.Warningf("no machine deployments found for MachineSet %v because it has no labels", ms.Name) - return nil - } - - dList, err := c.mdLister.MachineDeployments(ms.Namespace).List(labels.Everything()) - if err != nil { - glog.Warningf("failed to list machine deployments, %v", err) - return nil - } - - var deployments []*v1alpha1.MachineDeployment - for _, d := range dList { - selector, err := metav1.LabelSelectorAsSelector(&d.Spec.Selector) - if err != nil { - continue - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(ms.Labels)) { - continue - } - deployments = append(deployments, d) - } - - return deployments -} - -// updateMachineSet figures out what deployment(s) manage a MachineSet when the MachineSet -// is updated and wake them up. If anything on the MachineSet has changed we need to -// reconcile it's current MachineDeployment. If the MachineSet's controller reference has -// changed, we must also reconcile it's old MachineDeployment. -func (c *MachineDeploymentControllerImpl) updateMachineSet(old, cur interface{}) { - curMS := cur.(*v1alpha1.MachineSet) - oldMS := old.(*v1alpha1.MachineSet) - if curMS.ResourceVersion == oldMS.ResourceVersion { - // Periodic resync will send update events for all known machine sets. - // Two different versions of the same machine set will always have different RVs. - return - } - - curControllerRef := metav1.GetControllerOf(curMS) - oldControllerRef := metav1.GetControllerOf(oldMS) - controllerRefChanged := !reflect.DeepEqual(curControllerRef, oldControllerRef) - if controllerRefChanged && oldControllerRef != nil { - // The ControllerRef was changed. Sync the old controller, if any. - if d := c.resolveControllerRef(oldMS.Namespace, oldControllerRef); d != nil { - c.enqueue(d) - } - } - - // If it has a ControllerRef, that's all that matters. - if curControllerRef != nil { - d := c.resolveControllerRef(curMS.Namespace, curControllerRef) - if d == nil { - return - } - glog.V(4).Infof("MachineSet %s updated.", curMS.Name) - c.enqueue(d) - return - } - - // Otherwise, it's an orphan. If anything changed, sync matching controllers - // to see if anyone wants to adopt it now. - labelChanged := !reflect.DeepEqual(curMS.Labels, oldMS.Labels) - if labelChanged || controllerRefChanged { - mds := c.getMachineDeploymentsForMachineSet(curMS) - if len(mds) == 0 { - return - } - glog.V(4).Infof("Orphan MachineSet %s updated.", curMS.Name) - for _, d := range mds { - c.enqueue(d) - } - } -} - -// deleteMachineSet enqueues the deployment that manages a MachineSet when -// the MachineSet is deleted. -func (c *MachineDeploymentControllerImpl) deleteMachineSet(obj interface{}) { - ms := obj.(*v1alpha1.MachineSet) - - controllerRef := metav1.GetControllerOf(ms) - if controllerRef == nil { - // No controller should care about orphans being deleted. - return - } - d := c.resolveControllerRef(ms.Namespace, controllerRef) - if d == nil { - return - } - glog.V(4).Infof("MachineSet %s deleted.", ms.Name) - c.enqueue(d) -} - -// resolveControllerRef returns the controller referenced by a ControllerRef, -// or nil if the ControllerRef could not be resolved to a matching controller -// of the correct Kind. -func (c *MachineDeploymentControllerImpl) resolveControllerRef(namespace string, controllerRef *metav1.OwnerReference) *v1alpha1.MachineDeployment { - // We can't look up by UID, so look up by Name and then verify UID. - // Don't even try to look up by Name if it's the wrong Kind. - if controllerRef.Kind != controllerKind.Kind { - glog.Warningf("Failed to get machine deployment, controller ref had unexpected kind %v, expected %v", controllerRef.Kind, controllerKind.Kind) - return nil - } - d, err := c.mdLister.MachineDeployments(namespace).Get(controllerRef.Name) - if err != nil { - glog.Warningf("Failed to get machine deployment with name %v", controllerRef.Name) - return nil - } - if d.UID != controllerRef.UID { - // The controller we found with this Name is not the same one that the - // ControllerRef points to. - glog.Warningf("Failed to get machine deployment, UID mismatch. controller ref UID: %v, found machine deployment UID: %v", controllerRef.UID, d.UID) - return nil - } - return d -} - -// getMachineMapForDeployment returns the Machines managed by a Deployment. -// -// It returns a map from MachineSet UID to a list of Machines controlled by that MS, -// according to the Machine's ControllerRef. -func (c *MachineDeploymentControllerImpl) getMachineMapForDeployment(d *v1alpha1.MachineDeployment, msList []*v1alpha1.MachineSet) (map[types.UID]*v1alpha1.MachineList, error) { - // Get all Machines that potentially belong to this Deployment. - selector, err := metav1.LabelSelectorAsSelector(&d.Spec.Selector) - if err != nil { - return nil, err - } - machines, err := c.mLister.Machines(d.Namespace).List(selector) - if err != nil { - return nil, err - } - // Group Machines by their controller (if it's in msList). - machineMap := make(map[types.UID]*v1alpha1.MachineList, len(msList)) - for _, ms := range msList { - machineMap[ms.UID] = &v1alpha1.MachineList{} - } - for _, machine := range machines { - // Do not ignore inactive Machines because Recreate Deployments need to verify that no - // Machines from older versions are running before spinning up new Machines. - controllerRef := metav1.GetControllerOf(machine) - if controllerRef == nil { - continue - } - // Only append if we care about this UID. - if machineList, ok := machineMap[controllerRef.UID]; ok { - machineList.Items = append(machineList.Items, *machine) - } - } - return machineMap, nil -} - -func (c *MachineDeploymentControllerImpl) enqueue(d *v1alpha1.MachineDeployment) { - key, err := cache.MetaNamespaceKeyFunc(d) - if err != nil { - utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %#v: %v", d, err)) - return - } - - c.informers.WorkerQueues["MachineDeployment"].Queue.Add(key) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/controller_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/controller_test.go deleted file mode 100644 index 06bb5fcf990..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/controller_test.go +++ /dev/null @@ -1,908 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machinedeployment - -import ( - "fmt" - "reflect" - "sort" - "strconv" - "sync" - "testing" - "time" - - controllerlib "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - core "k8s.io/client-go/testing" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/uuid" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake" - v1alpha1listers "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" -) - -var ( - noTimestamp = metav1.Time{} -) - -func ms(name string, replicas int, selector map[string]string, timestamp metav1.Time) *v1alpha1.MachineSet { - return &v1alpha1.MachineSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - CreationTimestamp: timestamp, - Namespace: metav1.NamespaceDefault, - }, - Spec: v1alpha1.MachineSetSpec{ - Replicas: func() *int32 { i := int32(replicas); return &i }(), - Selector: metav1.LabelSelector{MatchLabels: selector}, - Template: v1alpha1.MachineTemplateSpec{}, - }, - } -} - -func newMSWithStatus(name string, specReplicas, statusReplicas int, selector map[string]string) *v1alpha1.MachineSet { - ms := ms(name, specReplicas, selector, noTimestamp) - ms.Status = v1alpha1.MachineSetStatus{ - Replicas: int32(statusReplicas), - } - return ms -} - -func newMachineDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSurge, maxUnavailable *intstr.IntOrString, selector map[string]string) *v1alpha1.MachineDeployment { - localReplicas := int32(replicas) - localMinReadySeconds := int32(300) - defaultMaxSurge := intstr.FromInt(0) - defaultMaxUnavailable := intstr.FromInt(0) - - d := v1alpha1.MachineDeployment{ - TypeMeta: metav1.TypeMeta{APIVersion: "v1alpha1/v1beta1"}, - ObjectMeta: metav1.ObjectMeta{ - UID: uuid.NewUUID(), - Name: name, - Namespace: metav1.NamespaceDefault, - Annotations: make(map[string]string), - }, - Spec: v1alpha1.MachineDeploymentSpec{ - Strategy: v1alpha1.MachineDeploymentStrategy{ - Type: common.RollingUpdateMachineDeploymentStrategyType, - RollingUpdate: &v1alpha1.MachineRollingUpdateDeployment{ - MaxUnavailable: &defaultMaxUnavailable, - MaxSurge: &defaultMaxSurge, - }, - }, - Replicas: &localReplicas, - Selector: metav1.LabelSelector{MatchLabels: selector}, - Template: v1alpha1.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: selector, - }, - Spec: v1alpha1.MachineSpec{}, - }, - MinReadySeconds: &localMinReadySeconds, - RevisionHistoryLimit: revisionHistoryLimit, - }, - } - if maxSurge != nil { - d.Spec.Strategy.RollingUpdate.MaxSurge = maxSurge - } - if maxUnavailable != nil { - d.Spec.Strategy.RollingUpdate.MaxUnavailable = maxUnavailable - } - return &d -} - -func newMachineSet(d *v1alpha1.MachineDeployment, name string, replicas int) *v1alpha1.MachineSet { - return &v1alpha1.MachineSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - UID: uuid.NewUUID(), - Namespace: metav1.NamespaceDefault, - Labels: d.Spec.Selector.MatchLabels, - OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(d, controllerKind)}, - }, - Spec: v1alpha1.MachineSetSpec{ - Selector: d.Spec.Selector, - Replicas: func() *int32 { i := int32(replicas); return &i }(), - Template: d.Spec.Template, - }, - } -} - -func newMinimalMachineSet(name string, replicas int) *v1alpha1.MachineSet { - return &v1alpha1.MachineSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - UID: uuid.NewUUID(), - Namespace: metav1.NamespaceDefault, - }, - Spec: v1alpha1.MachineSetSpec{ - Replicas: func() *int32 { i := int32(replicas); return &i }(), - }, - } -} - -func addDeploymentProperties(d *v1alpha1.MachineDeployment, ms *v1alpha1.MachineSet) *v1alpha1.MachineSet { - ms.ObjectMeta.Labels = d.Spec.Selector.MatchLabels - ms.ObjectMeta.OwnerReferences = []metav1.OwnerReference{*metav1.NewControllerRef(d, controllerKind)} - ms.Spec.Selector = d.Spec.Selector - ms.Spec.Template = d.Spec.Template - return ms -} - -func machineDeploymentControllerReconcile(t *testing.T, cs *clientset.Clientset, controller *MachineDeploymentController) { - instance := v1alpha1.MachineDeployment{} - instance.Name = "instance-1" - replicas := int32(0) - minReadySeconds := int32(0) - instance.Spec.Replicas = &replicas - instance.Spec.MinReadySeconds = &minReadySeconds - instance.Spec.Selector = metav1.LabelSelector{MatchLabels: map[string]string{"foo": "barr"}} - instance.Spec.Template.Labels = map[string]string{"foo": "barr"} - - expectedKey := "default/instance-1" - - // When creating a new object, it should invoke the reconcile method. - cluster := testutil.GetVanillaCluster() - cluster.Name = "cluster-1" - if _, err := cs.ClusterV1alpha1().Clusters(metav1.NamespaceDefault).Create(&cluster); err != nil { - t.Fatal(err) - } - client := cs.ClusterV1alpha1().MachineDeployments(metav1.NamespaceDefault) - before := make(chan struct{}) - after := make(chan struct{}) - var aftOnce, befOnce sync.Once - - actualKey := "" - var actualErr error - - // Setup test callbacks to be called when the message is reconciled. - // Sometimes reconcile is called multiple times, so use Once to prevent closing the channels again. - controller.BeforeReconcile = func(key string) { - actualKey = key - befOnce.Do(func() { close(before) }) - } - controller.AfterReconcile = func(key string, err error) { - actualKey = key - actualErr = err - aftOnce.Do(func() { close(after) }) - } - - // Create an instance - if _, err := client.Create(&instance); err != nil { - t.Fatal(err) - } - defer client.Delete(instance.Name, &metav1.DeleteOptions{}) - - // Verify reconcile function is called against the correct key - select { - case <-before: - if actualKey != expectedKey { - t.Fatalf( - "Reconcile function was not called with the correct key.\nActual:\t%+v\nExpected:\t%+v", - actualKey, expectedKey) - } - if actualErr != nil { - t.Fatal(actualErr) - } - case <-time.After(time.Second * 2): - t.Fatalf("reconcile never called") - } - - select { - case <-after: - if actualKey != expectedKey { - t.Fatalf( - "Reconcile function was not called with the correct key.\nActual:\t%+v\nExpected:\t%+v", - actualKey, expectedKey) - } - if actualErr != nil { - t.Fatal(actualErr) - } - case <-time.After(time.Second * 2): - t.Fatalf("reconcile never finished") - } -} - -type fixture struct { - t *testing.T - - client *fake.Clientset - // Objects to put in the store. - dLister []*v1alpha1.MachineDeployment - msLister []*v1alpha1.MachineSet - machineLister []*v1alpha1.Machine - - // Actions expected to happen on the client. Objects from here are also - // preloaded into NewSimpleFake. - actions []core.Action - objects []runtime.Object -} - -func (f *fixture) expectGetDeploymentAction(d *v1alpha1.MachineDeployment) { - action := core.NewGetAction(schema.GroupVersionResource{Group: "cluster.k8s.io", Version: "v1alpha1", Resource: "machinedeployments"}, d.Namespace, d.Name) - f.actions = append(f.actions, action) -} - -func (f *fixture) expectUpdateDeploymentStatusAction(d *v1alpha1.MachineDeployment) { - action := core.NewUpdateAction(schema.GroupVersionResource{Group: "cluster.k8s.io", Version: "v1alpha1", Resource: "machinedeployments"}, d.Namespace, d) - action.Subresource = "status" - f.actions = append(f.actions, action) -} - -func (f *fixture) expectUpdateDeploymentAction(d *v1alpha1.MachineDeployment) { - action := core.NewUpdateAction(schema.GroupVersionResource{Group: "cluster.k8s.io", Version: "v1alpha1", Resource: "machinedeployments"}, d.Namespace, d) - f.actions = append(f.actions, action) -} - -func (f *fixture) expectCreateMSAction(ms *v1alpha1.MachineSet) { - f.actions = append(f.actions, core.NewCreateAction(schema.GroupVersionResource{Group: "cluster.k8s.io", Version: "v1alpha1", Resource: "machinesets"}, ms.Namespace, ms)) -} - -func newFixture(t *testing.T) *fixture { - f := &fixture{} - f.t = t - f.objects = []runtime.Object{} - return f -} - -func (f *fixture) newController() *MachineDeploymentControllerImpl { - machineIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) - machineLister := v1alpha1listers.NewMachineLister(machineIndexer) - machineSetIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) - machineSetLister := v1alpha1listers.NewMachineSetLister(machineSetIndexer) - machineDeploymentIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) - machineDeploymentLister := v1alpha1listers.NewMachineDeploymentLister(machineDeploymentIndexer) - - fakeClient := fake.NewSimpleClientset(f.objects...) - f.client = fakeClient - controller := &MachineDeploymentControllerImpl{} - controller.machineClient = fakeClient - controller.mdLister = machineDeploymentLister - controller.msLister = machineSetLister - controller.mLister = machineLister - controller.informers = &sharedinformers.SharedInformers{} - controller.informers.WorkerQueues = map[string]*controllerlib.QueueWorker{} - queue := workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "MachineDeployment") - controller.informers.WorkerQueues["MachineDeployment"] = &controllerlib.QueueWorker{queue, 10, "MachineDeployment", nil} - - for _, d := range f.dLister { - err := machineDeploymentIndexer.Add(d) - if err != nil { - f.t.Fatal(err) - } - } - for _, ms := range f.msLister { - err := machineSetIndexer.Add(ms) - if err != nil { - f.t.Fatal(err) - } - } - for _, machine := range f.machineLister { - err := machineIndexer.Add(machine) - if err != nil { - f.t.Fatal(err) - } - } - return controller -} - -func (f *fixture) runExpectError(deploymentName *v1alpha1.MachineDeployment, startInformers bool) { - f.runParams(deploymentName, startInformers, true) -} - -func (f *fixture) run(deploymentName *v1alpha1.MachineDeployment) { - f.runParams(deploymentName, true, false) -} - -func (f *fixture) runParams(deploymentName *v1alpha1.MachineDeployment, startInformers bool, expectError bool) { - c := f.newController() - - err := c.Reconcile(deploymentName) - if !expectError && err != nil { - f.t.Errorf("error syncing deployment: %v", err) - } else if expectError && err == nil { - f.t.Error("expected error syncing deployment, got nil") - } - - actions := filterInformerActions(f.client.Actions()) - - if len(actions) != len(f.actions) { - f.t.Errorf("Got %d actions, expected %d actions", len(actions), len(f.actions)) - } - - for i, action := range actions { - if len(f.actions) < i+1 { - f.t.Errorf("%d unexpected actions: %+v", len(actions)-len(f.actions), actions[i:]) - break - } - - expectedAction := f.actions[i] - if !(expectedAction.Matches(action.GetVerb(), action.GetResource().Resource) && action.GetSubresource() == expectedAction.GetSubresource()) { - f.t.Errorf("Expected\n\t%#v\ngot\n\t%#v", expectedAction, action) - continue - } - } - - if len(f.actions) > len(actions) { - f.t.Errorf("%d additional expected actions:%+v", len(f.actions)-len(actions), f.actions[len(actions):]) - } -} - -func filterInformerActions(actions []core.Action) []core.Action { - ret := []core.Action{} - for _, action := range actions { - if len(action.GetNamespace()) == 0 && - (action.Matches("list", "machines") || - action.Matches("list", "machinedeployments") || - action.Matches("list", "machinesets") || - action.Matches("watch", "machines") || - action.Matches("watch", "machinedeployments") || - action.Matches("watch", "machinesets")) { - continue - } - ret = append(ret, action) - } - - return ret -} - -func TestSyncDeploymentCreatesMachineSet(t *testing.T) { - f := newFixture(t) - - d := newMachineDeployment("foo", 1, nil, nil, nil, map[string]string{"foo": "bar"}) - f.dLister = append(f.dLister, d) - f.objects = append(f.objects, d) - - ms := newMachineSet(d, "randomName", 1) - - f.expectCreateMSAction(ms) - f.expectUpdateDeploymentStatusAction(d) - - f.run(d) -} - -func TestSyncDeploymentDontDoAnythingDuringDeletion(t *testing.T) { - f := newFixture(t) - - d := newMachineDeployment("foo", 1, nil, nil, nil, map[string]string{"foo": "bar"}) - now := metav1.Now() - d.DeletionTimestamp = &now - f.dLister = append(f.dLister, d) - f.objects = append(f.objects, d) - - f.run(d) -} - -func TestGetMachineSetsForDeployment(t *testing.T) { - tests := []struct { - name string - noDeploymentSelector bool - diffCtrlRef bool - diffLabels bool - noCtrlRef bool - expectedMachineSets int - }{ - { - name: "scenario 1. machine set returned.", - expectedMachineSets: 1, - }, - { - name: "scenario 2. machine set with diff controller ref, machine set not returned.", - diffCtrlRef: true, - expectedMachineSets: 0, - }, - { - name: "scenario 3. deployment with no selector, machine set not returned.", - noDeploymentSelector: true, - expectedMachineSets: 0, - }, - { - name: "scenario 4. machine set with non-matching labels not returned.", - diffLabels: true, - expectedMachineSets: 0, - }, - { - name: "scenario 5. machine set with no controller ref, machine set not returned.", - noCtrlRef: true, - expectedMachineSets: 0, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - t.Log(test.name) - d1 := newMachineDeployment("d1", 1, nil, nil, nil, map[string]string{"foo": "bar"}) - d2 := newMachineDeployment("d2", 1, nil, nil, nil, map[string]string{"foo": "bar2"}) - ms := newMachineSet(d1, "ms", 1) - - if test.diffCtrlRef { - ms.ObjectMeta.OwnerReferences = []metav1.OwnerReference{*metav1.NewControllerRef(d2, controllerKind)} - } - if test.noDeploymentSelector { - d1.Spec.Selector = metav1.LabelSelector{} - } - if test.diffLabels { - ms.ObjectMeta.Labels = map[string]string{"foo": "bar2"} - } - if test.noCtrlRef { - ms.ObjectMeta.OwnerReferences = nil - } - - f := newFixture(t) - - f.dLister = append(f.dLister, d1, d2) - f.msLister = append(f.msLister, ms) - f.objects = append(f.objects, d1, d2, ms) - - c := f.newController() - - msList, err := c.getMachineSetsForDeployment(d1) - if err != nil { - t.Fatalf("unexpected err calling getMachineSetsForDeployment, %v", err) - } - if test.expectedMachineSets != len(msList) { - t.Fatalf("got %v machine sets, expected %v machine sets, %v", len(msList), test.expectedMachineSets, msList) - } - }) - } -} - -func hasExpectedMachineNames(t *testing.T, mList *v1alpha1.MachineList, msName string, numMSMachines int) { - var names, expectedNames []string - for _, m := range mList.Items { - names = append(names, m.Name) - } - sort.Strings(names) - - for i := 0; i < numMSMachines; i++ { - expectedNames = append(expectedNames, fmt.Sprintf("%v-machine-%v", msName, i)) - } - if !reflect.DeepEqual(names, expectedNames) { - t.Fatalf("got %v machine names, expected %v machine names for %v", names, expectedNames, msName) - } -} - -func TestGetMachineMapForMachineSets(t *testing.T) { - tests := []struct { - name string - numMS1Machines int - numMS2Machines int - addMachineWithNoCtrlRef bool - expectedUIDs int - }{ - { - name: "scenario 1. multiple machine sets, one populated, one empty", - numMS1Machines: 3, - numMS2Machines: 0, - expectedUIDs: 2, - }, - { - name: "scenario 2. multiple machine sets, two populated", - numMS1Machines: 3, - numMS2Machines: 2, - expectedUIDs: 2, - }, - { - name: "scenario 3. multiple machine sets, both empty", - numMS1Machines: 0, - numMS2Machines: 0, - expectedUIDs: 2, - }, - { - name: "scenario 4. skip machine with no controller ref.", - numMS1Machines: 3, - numMS2Machines: 2, - addMachineWithNoCtrlRef: true, - expectedUIDs: 2, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - t.Log(test.name) - d1 := newMachineDeployment("foo", 1, nil, nil, nil, map[string]string{"foo": "bar"}) - ms1 := newMachineSet(d1, "ms1", 1) - ms2 := newMachineSet(d1, "ms2", 1) - - f := newFixture(t) - - for i := 0; i < test.numMS1Machines; i++ { - m := generateMachineFromMS(ms1, i) - f.machineLister = append(f.machineLister, m) - f.objects = append(f.objects, m) - } - - for i := 0; i < test.numMS2Machines; i++ { - m := generateMachineFromMS(ms2, i) - f.machineLister = append(f.machineLister, m) - f.objects = append(f.objects, m) - } - - f.dLister = append(f.dLister, d1) - f.msLister = append(f.msLister, ms1, ms2) - f.objects = append(f.objects, d1, ms1, ms2) - - if test.addMachineWithNoCtrlRef { - m := generateMachineFromMS(ms1, 99) - m.ObjectMeta.OwnerReferences = nil - f.machineLister = append(f.machineLister, m) - f.objects = append(f.objects, m) - } - - c := f.newController() - - machineMap, err := c.getMachineMapForDeployment(d1, f.msLister) - if err != nil { - t.Fatalf("getMachineMapForDeployment() error: %v", err) - } - - if test.expectedUIDs != len(machineMap) { - t.Fatalf("got %v machine set UIDs, expected %v machine set UIDs", test.expectedUIDs, len(machineMap)) - } - - if test.numMS1Machines != len(machineMap[ms1.UID].Items) { - t.Fatalf("got %v machines, expected %v machines for ms1", test.numMS1Machines, len(machineMap[ms1.UID].Items)) - } - if test.numMS2Machines != len(machineMap[ms2.UID].Items) { - t.Fatalf("got %v machines, expected %v machines for ms2", test.numMS2Machines, len(machineMap[ms2.UID].Items)) - } - - hasExpectedMachineNames(t, machineMap[ms1.UID], ms1.Name, test.numMS1Machines) - hasExpectedMachineNames(t, machineMap[ms2.UID], ms2.Name, test.numMS2Machines) - }) - } -} - -func getMachineSetActions(actions []core.Action) []core.Action { - var filteredActions []core.Action - for _, action := range actions { - if action.GetResource().Resource == "machinesets" { - filteredActions = append(filteredActions, action) - } - } - return filteredActions -} - -func TestAddMachineSet(t *testing.T) { - tests := []struct { - name string - stripOwnerRef bool - ownerDoesntExist bool - isDeleting bool - diffLabel bool - expectCreation bool - }{ - { - name: "scenario 1. machine set with controller ref.", - expectCreation: true, - }, - { - name: "scenario 2. machine set with no controller ref.", - stripOwnerRef: true, - expectCreation: true, - }, - { - name: "scenario 3. machine set that is being deleted.", - stripOwnerRef: true, - isDeleting: true, - expectCreation: false, - }, - { - name: "scenario 4. machine set with controller ref that controller doesn't exist.", - ownerDoesntExist: true, - expectCreation: false, - }, - { - name: "scenario 5. machine set with no controller ref, no matching deployment.", - stripOwnerRef: true, - diffLabel: true, - expectCreation: false, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - t.Log(test.name) - d := newMachineDeployment("d", 1, nil, nil, nil, map[string]string{"foo": "bar"}) - ms := newMachineSet(d, "ms", 1) - - if test.stripOwnerRef { - ms.ObjectMeta.OwnerReferences = nil - } - if test.isDeleting { - now := metav1.Now() - ms.DeletionTimestamp = &now - } - if test.diffLabel { - ms.ObjectMeta.Labels = map[string]string{"foo": "bar2"} - } - - f := newFixture(t) - - if !test.ownerDoesntExist { - f.dLister = append(f.dLister, d) - } - f.objects = append(f.objects, d, ms) - - c := f.newController() - - c.addMachineSet(ms) - - queue := c.informers.WorkerQueues["MachineDeployment"].Queue - - if !test.expectCreation { - if queue.Len() != 0 { - t.Fatalf("got %d queued items, expected %d queued items", queue.Len(), 0) - } - } - if test.expectCreation { - if queue.Len() != 1 { - t.Fatalf("got %d queued items, expected %d queued items", queue.Len(), 1) - } - verifyQueuedKey(t, queue, d) - } - if test.isDeleting { - if queue.Len() != 0 { - t.Fatalf("got %d queued items, expected %d queued items", queue.Len(), 0) - } - - } - - }) - } -} - -func TestUpdateMachineSet(t *testing.T) { - tests := []struct { - name string - sameResourceVersion bool - noOldCtrlRef bool - noNewCtrlRef bool - diffNewCtrlRef bool - diffNewCtrlExists bool - diffNewLabels bool - expectOldReconcile bool - expectNewReconcile bool - }{ - { - name: "scenario 1. same resource version, no-op", - sameResourceVersion: true, - }, - { - name: "scenario 2. no change to controller ref, queue old controller ref", - expectOldReconcile: true, - }, - { - name: "scenario 3. old controller ref to new different controller ref that exists, queue old controller ref and new controller ref", - diffNewCtrlRef: true, - diffNewCtrlExists: true, - expectOldReconcile: true, - expectNewReconcile: true, - }, - { - name: "scenario 4. old controller ref to new different controller ref that doesn't exist, queue old controller ref", - diffNewCtrlRef: true, - diffNewCtrlExists: false, - expectOldReconcile: true, - }, - { - name: "scenario 5. no old controller ref, to new controller ref exists, queue new controller ref", - noOldCtrlRef: true, - diffNewCtrlRef: true, - diffNewCtrlExists: true, - expectNewReconcile: true, - }, - { - name: "scenario 6. no old controller ref, to new controller ref doesn't exist, no controller ref to queue", - noOldCtrlRef: true, - diffNewCtrlRef: true, - diffNewCtrlExists: false, - }, - { - name: "scenario 7. old controller ref, to no new controller ref, orphaned, queue old controller ref", - noNewCtrlRef: true, - expectOldReconcile: true, - }, - { - name: "scenario 8. no controller ref, to no new controller ref, no controller ref to queue", - noOldCtrlRef: true, - noNewCtrlRef: true, - }, - { - name: "scenario 9. no controller ref, to no new controller ref, label change, found deployment by label, queue found deployment", - noOldCtrlRef: true, - noNewCtrlRef: true, - diffNewCtrlExists: true, - diffNewLabels: true, - expectNewReconcile: true, - }, - { - name: "scenario 10. no controller ref, to no new controller ref, label change, deployment not found, no deployment to queue", - noOldCtrlRef: true, - noNewCtrlRef: true, - diffNewCtrlExists: false, - diffNewLabels: true, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - t.Log(test.name) - - d1 := newMachineDeployment("d1", 1, nil, nil, nil, map[string]string{"foo": "bar"}) - d2 := newMachineDeployment("d2", 1, nil, nil, nil, map[string]string{"foo": "bar2"}) - oriMS := newMachineSet(d1, "ms", 1) - - oldMS := *oriMS - newMS := *oriMS - - if !test.sameResourceVersion { - bumpResourceVersion(&newMS) - } - if test.noOldCtrlRef { - oldMS.ObjectMeta.OwnerReferences = nil - } - if test.noNewCtrlRef { - newMS.ObjectMeta.OwnerReferences = nil - } - if test.diffNewCtrlRef { - newMS.ObjectMeta.OwnerReferences = []metav1.OwnerReference{*metav1.NewControllerRef(d2, controllerKind)} - } - if test.diffNewLabels { - newMS.ObjectMeta.Labels = map[string]string{"foo": "bar2"} - } - - f := newFixture(t) - - f.dLister = append(f.dLister, d1) - if test.diffNewCtrlExists { - f.dLister = append(f.dLister, d2) - } - f.msLister = append(f.msLister, &oldMS) - f.objects = append(f.objects, d1, &oldMS) - - c := f.newController() - - c.updateMachineSet(&oldMS, &newMS) - - expectedReconcileCount := 0 - if test.expectOldReconcile { - expectedReconcileCount++ - } - if test.expectNewReconcile { - expectedReconcileCount++ - } - - queue := c.informers.WorkerQueues["MachineDeployment"].Queue - - if queue.Len() != expectedReconcileCount { - t.Fatalf("got %d queued items, expected %d queued items", queue.Len(), expectedReconcileCount) - } - if test.expectOldReconcile { - verifyQueuedKey(t, queue, d1) - } - if test.expectNewReconcile { - verifyQueuedKey(t, queue, d2) - } - }) - } -} - -func TestDeleteMachineSet(t *testing.T) { - tests := []struct { - name string - stripOwnerRef bool - ownerDoesntExist bool - expectDelete bool - }{ - { - name: "scenario 1. has controller ref that exists", - expectDelete: true, - }, - { - name: "scenario 2. has controller ref that does not exist", - ownerDoesntExist: true, - expectDelete: false, - }, - { - name: "scenario 3. no controller ref", - stripOwnerRef: true, - expectDelete: false, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - t.Log(test.name) - d := newMachineDeployment("foo", 1, nil, nil, nil, map[string]string{"foo": "bar"}) - ms := newMachineSet(d, "ms", 1) - - if test.stripOwnerRef { - ms.ObjectMeta.OwnerReferences = nil - } - - f := newFixture(t) - - if !test.ownerDoesntExist { - f.dLister = append(f.dLister, d) - } - f.objects = append(f.objects, d, ms) - - c := f.newController() - - c.deleteMachineSet(ms) - - queue := c.informers.WorkerQueues["MachineDeployment"].Queue - - if !test.expectDelete { - if queue.Len() != 0 { - t.Fatalf("got %d queued items, expected %d queued items", queue.Len(), 0) - } - } - if test.expectDelete { - if queue.Len() != 1 { - t.Fatalf("got %d queued items, expected %d queued items", queue.Len(), 1) - } - verifyQueuedKey(t, queue, d) - } - }) - } -} - -func bumpResourceVersion(obj metav1.Object) { - ver, _ := strconv.ParseInt(obj.GetResourceVersion(), 10, 32) - obj.SetResourceVersion(strconv.FormatInt(ver+1, 10)) -} - -// generateMachineFromMS creates a machine, with the input MachineSet's selector and its template -func generateMachineFromMS(ms *v1alpha1.MachineSet, count int) *v1alpha1.Machine { - trueVar := true - return &v1alpha1.Machine{ - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%v-machine-%v", ms.Name, count), - Namespace: ms.Namespace, - Labels: ms.Spec.Selector.MatchLabels, - OwnerReferences: []metav1.OwnerReference{ - {UID: ms.UID, APIVersion: "v1alpha1", Kind: "MachineSet", Name: ms.Name, Controller: &trueVar}, - }, - }, - Spec: ms.Spec.Template.Spec, - } -} - -func verifyQueuedKey(t *testing.T, queue workqueue.RateLimitingInterface, d *v1alpha1.MachineDeployment) { - key, done := queue.Get() - if key == nil || done { - t.Fatalf("failed to enqueue controller.") - } - expectedKey, err := cache.MetaNamespaceKeyFunc(d) - if err != nil { - t.Fatalf("failed to get key for deployment.") - } - if expectedKey != key { - t.Fatalf("got %v key, expected %v key", key, expectedKey) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/machinedeployment_suite_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/machinedeployment_suite_test.go deleted file mode 100644 index 9699d6f3cac..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/machinedeployment_suite_test.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machinedeployment - -import ( - "testing" - - "github.com/kubernetes-incubator/apiserver-builder/pkg/test" - - "sigs.k8s.io/cluster-api/pkg/apis" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" - "sigs.k8s.io/cluster-api/pkg/openapi" -) - -func TestMachineDeploymentSet(t *testing.T) { - testenv := test.NewTestEnvironment() - config := testenv.Start(apis.GetAllApiBuilders(), openapi.GetOpenAPIDefinitions) - cs := clientset.NewForConfigOrDie(config) - - shutdown := make(chan struct{}) - si := sharedinformers.NewSharedInformers(config, shutdown) - controller := NewMachineDeploymentController(config, si) - controller.Run(shutdown) - - t.Run("machineDeploymentControllerReconcile", func(t *testing.T) { - machineDeploymentControllerReconcile(t, cs, controller) - }) - - close(shutdown) - testenv.Stop() -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/rolling.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/rolling.go deleted file mode 100644 index 42915061322..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/rolling.go +++ /dev/null @@ -1,266 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machinedeployment - -import ( - "fmt" - "sort" - - "github.com/golang/glog" - - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/util/integer" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - dutil "sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util" -) - -// rolloutRolling implements the logic for rolling a new machine set. -func (dc *MachineDeploymentControllerImpl) rolloutRolling(d *v1alpha1.MachineDeployment, msList []*v1alpha1.MachineSet, machineMap map[types.UID]*v1alpha1.MachineList) error { - newMS, oldMSs, err := dc.getAllMachineSetsAndSyncRevision(d, msList, machineMap, true) - if err != nil { - return err - } - allMSs := append(oldMSs, newMS) - - // Scale up, if we can. - scaledUp, err := dc.reconcileNewMachineSet(allMSs, newMS, d) - if err != nil { - return err - } - if scaledUp { - // TODO: update deployment status for deployment progress - return nil - } - - // Scale down, if we can. - scaledDown, err := dc.reconcileOldMachineSets(allMSs, dutil.FilterActiveMachineSets(oldMSs), newMS, d) - if err != nil { - return err - } - if scaledDown { - // TODO: update deployment status for deployment progress - return nil - } - - if dutil.DeploymentComplete(d, &d.Status) { - if err := dc.cleanupDeployment(oldMSs, d); err != nil { - return err - } - } - - // TODO: update deployment status for deployment progress - return nil -} - -func (dc *MachineDeploymentControllerImpl) reconcileNewMachineSet(allMSs []*v1alpha1.MachineSet, newMS *v1alpha1.MachineSet, deployment *v1alpha1.MachineDeployment) (bool, error) { - if deployment.Spec.Replicas == nil { - return false, fmt.Errorf("spec replicas for deployment set %v is nil, this is unexpected", deployment.Name) - } - if newMS.Spec.Replicas == nil { - return false, fmt.Errorf("spec replicas for machine set %v is nil, this is unexpected", newMS.Name) - } - - if *(newMS.Spec.Replicas) == *(deployment.Spec.Replicas) { - // Scaling not required. - return false, nil - } - if *(newMS.Spec.Replicas) > *(deployment.Spec.Replicas) { - // Scale down. - scaled, _, err := dc.scaleMachineSet(newMS, *(deployment.Spec.Replicas), deployment) - return scaled, err - } - newReplicasCount, err := dutil.NewMSNewReplicas(deployment, allMSs, newMS) - if err != nil { - return false, err - } - scaled, _, err := dc.scaleMachineSet(newMS, newReplicasCount, deployment) - return scaled, err -} - -func (dc *MachineDeploymentControllerImpl) reconcileOldMachineSets(allMSs []*v1alpha1.MachineSet, oldMSs []*v1alpha1.MachineSet, newMS *v1alpha1.MachineSet, deployment *v1alpha1.MachineDeployment) (bool, error) { - if deployment.Spec.Replicas == nil { - return false, fmt.Errorf("spec replicas for deployment set %v is nil, this is unexpected", deployment.Name) - } - if newMS.Spec.Replicas == nil { - return false, fmt.Errorf("spec replicas for machine set %v is nil, this is unexpected", newMS.Name) - } - - oldMachinesCount := dutil.GetReplicaCountForMachineSets(oldMSs) - if oldMachinesCount == 0 { - // Can't scale down further - return false, nil - } - - allMachinesCount := dutil.GetReplicaCountForMachineSets(allMSs) - glog.V(4).Infof("New machine set %s/%s has %d available machines.", newMS.Namespace, newMS.Name, newMS.Status.AvailableReplicas) - maxUnavailable := dutil.MaxUnavailable(*deployment) - - // Check if we can scale down. We can scale down in the following 2 cases: - // * Some old machine sets have unhealthy replicas, we could safely scale down those unhealthy replicas since that won't further - // increase unavailability. - // * New machine set has scaled up and it's replicas becomes ready, then we can scale down old machine sets in a further step. - // - // maxScaledDown := allMachinesCount - minAvailable - newMachineSetMachinesUnavailable - // take into account not only maxUnavailable and any surge machines that have been created, but also unavailable machines from - // the newMS, so that the unavailable machines from the newMS would not make us scale down old machine sets in a further - // step(that will increase unavailability). - // - // Concrete example: - // - // * 10 replicas - // * 2 maxUnavailable (absolute number, not percent) - // * 3 maxSurge (absolute number, not percent) - // - // case 1: - // * Deployment is updated, newMS is created with 3 replicas, oldMS is scaled down to 8, and newMS is scaled up to 5. - // * The new machine set machines crashloop and never become available. - // * allMachinesCount is 13. minAvailable is 8. newMSMachinesUnavailable is 5. - // * A node fails and causes one of the oldMS machines to become unavailable. However, 13 - 8 - 5 = 0, so the oldMS won't be scaled down. - // * The user notices the crashloop and does kubectl rollout undo to rollback. - // * newMSMachinesUnavailable is 1, since we rolled back to the good machine set, so maxScaledDown = 13 - 8 - 1 = 4. 4 of the crashlooping machines will be scaled down. - // * The total number of machines will then be 9 and the newMS can be scaled up to 10. - // - // case 2: - // Same example, but pushing a new machine template instead of rolling back (aka "roll over"): - // * The new machine set created must start with 0 replicas because allMachinesCount is already at 13. - // * However, newMSMachinesUnavailable would also be 0, so the 2 old machine sets could be scaled down by 5 (13 - 8 - 0), which would then - // allow the new machine set to be scaled up by 5. - minAvailable := *(deployment.Spec.Replicas) - maxUnavailable - newMSUnavailableMachineCount := *(newMS.Spec.Replicas) - newMS.Status.AvailableReplicas - maxScaledDown := allMachinesCount - minAvailable - newMSUnavailableMachineCount - if maxScaledDown <= 0 { - return false, nil - } - - // Clean up unhealthy replicas first, otherwise unhealthy replicas will block deployment - // and cause timeout. See https://github.com/kubernetes/kubernetes/issues/16737 - oldMSs, cleanupCount, err := dc.cleanupUnhealthyReplicas(oldMSs, deployment, maxScaledDown) - if err != nil { - return false, nil - } - glog.V(4).Infof("Cleaned up unhealthy replicas from old MSes by %d", cleanupCount) - - // Scale down old machine sets, need check maxUnavailable to ensure we can scale down - allMSs = append(oldMSs, newMS) - scaledDownCount, err := dc.scaleDownOldMachineSetsForRollingUpdate(allMSs, oldMSs, deployment) - if err != nil { - return false, nil - } - glog.V(4).Infof("Scaled down old MSes of deployment %s by %d", deployment.Name, scaledDownCount) - - totalScaledDown := cleanupCount + scaledDownCount - return totalScaledDown > 0, nil -} - -// cleanupUnhealthyReplicas will scale down old machine sets with unhealthy replicas, so that all unhealthy replicas will be deleted. -func (dc *MachineDeploymentControllerImpl) cleanupUnhealthyReplicas(oldMSs []*v1alpha1.MachineSet, deployment *v1alpha1.MachineDeployment, maxCleanupCount int32) ([]*v1alpha1.MachineSet, int32, error) { - sort.Sort(dutil.MachineSetsByCreationTimestamp(oldMSs)) - // Safely scale down all old machine sets with unhealthy replicas. Replica set will sort the machines in the order - // such that not-ready < ready, unscheduled < scheduled, and pending < running. This ensures that unhealthy replicas will - // been deleted first and won't increase unavailability. - totalScaledDown := int32(0) - for i, targetMS := range oldMSs { - if targetMS.Spec.Replicas == nil { - return nil, 0, fmt.Errorf("spec replicas for machine set %v is nil, this is unexpected", targetMS.Name) - } - - if totalScaledDown >= maxCleanupCount { - break - } - oldMSReplicas := *(targetMS.Spec.Replicas) - if oldMSReplicas == 0 { - // cannot scale down this machine set. - continue - } - oldMSAvailableReplicas := targetMS.Status.AvailableReplicas - glog.V(4).Infof("Found %d available machines in old MS %s/%s", oldMSAvailableReplicas, targetMS.Namespace, targetMS.Name) - if oldMSReplicas == oldMSAvailableReplicas { - // no unhealthy replicas found, no scaling required. - continue - } - - remainingCleanupCount := maxCleanupCount - totalScaledDown - unhealthyCount := oldMSReplicas - oldMSAvailableReplicas - scaledDownCount := integer.Int32Min(remainingCleanupCount, unhealthyCount) - newReplicasCount := oldMSReplicas - scaledDownCount - - if newReplicasCount > oldMSReplicas { - return nil, 0, fmt.Errorf("when cleaning up unhealthy replicas, got invalid request to scale down %s/%s %d -> %d", targetMS.Namespace, targetMS.Name, oldMSReplicas, newReplicasCount) - } - _, updatedOldMS, err := dc.scaleMachineSet(targetMS, newReplicasCount, deployment) - if err != nil { - return nil, totalScaledDown, err - } - totalScaledDown += scaledDownCount - oldMSs[i] = updatedOldMS - } - return oldMSs, totalScaledDown, nil -} - -// scaleDownOldMachineSetsForRollingUpdate scales down old machine sets when deployment strategy is "RollingUpdate". -// Need check maxUnavailable to ensure availability -func (dc *MachineDeploymentControllerImpl) scaleDownOldMachineSetsForRollingUpdate(allMSs []*v1alpha1.MachineSet, oldMSs []*v1alpha1.MachineSet, deployment *v1alpha1.MachineDeployment) (int32, error) { - if deployment.Spec.Replicas == nil { - return 0, fmt.Errorf("spec replicas for deployment %v is nil, this is unexpected", deployment.Name) - } - - maxUnavailable := dutil.MaxUnavailable(*deployment) - - // Check if we can scale down. - minAvailable := *(deployment.Spec.Replicas) - maxUnavailable - // Find the number of available machines. - availableMachineCount := dutil.GetAvailableReplicaCountForMachineSets(allMSs) - if availableMachineCount <= minAvailable { - // Cannot scale down. - return 0, nil - } - glog.V(4).Infof("Found %d available machines in deployment %s, scaling down old MSes", availableMachineCount, deployment.Name) - - sort.Sort(dutil.MachineSetsByCreationTimestamp(oldMSs)) - - totalScaledDown := int32(0) - totalScaleDownCount := availableMachineCount - minAvailable - for _, targetMS := range oldMSs { - if targetMS.Spec.Replicas == nil { - return 0, fmt.Errorf("spec replicas for machine set %v is nil, this is unexpected", targetMS.Name) - } - - if totalScaledDown >= totalScaleDownCount { - // No further scaling required. - break - } - if *(targetMS.Spec.Replicas) == 0 { - // cannot scale down this MachineSet. - continue - } - // Scale down. - scaleDownCount := int32(integer.Int32Min(*(targetMS.Spec.Replicas), totalScaleDownCount-totalScaledDown)) - newReplicasCount := *(targetMS.Spec.Replicas) - scaleDownCount - if newReplicasCount > *(targetMS.Spec.Replicas) { - return 0, fmt.Errorf("when scaling down old MS, got invalid request to scale down %s/%s %d -> %d", targetMS.Namespace, targetMS.Name, *(targetMS.Spec.Replicas), newReplicasCount) - } - _, _, err := dc.scaleMachineSet(targetMS, newReplicasCount, deployment) - if err != nil { - return totalScaledDown, err - } - - totalScaledDown += scaleDownCount - } - - return totalScaledDown, nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/rolling_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/rolling_test.go deleted file mode 100644 index ef4578ab097..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/rolling_test.go +++ /dev/null @@ -1,433 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machinedeployment - -import ( - "testing" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/intstr" - core "k8s.io/client-go/testing" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake" -) - -func TestMachineDeploymentController_reconcileNewMachineSet(t *testing.T) { - // expectedNewReplicas = deploymentReplicas + maxSurge - oldReplicas - newReplicas - tests := []struct { - name string - deploymentReplicas int - maxSurge intstr.IntOrString - oldReplicas int - newReplicas int - scaleExpected bool - expectedNewReplicas int - }{ - { - name: "scenario 1. new replicas for surge only, scale up.", - deploymentReplicas: 10, - maxSurge: intstr.FromInt(2), - oldReplicas: 10, - newReplicas: 0, - scaleExpected: true, - expectedNewReplicas: 2, - }, - { - name: "scenario 2. scale up old replicas to meet desired and surge, scale up.", - deploymentReplicas: 10, - maxSurge: intstr.FromInt(2), - oldReplicas: 5, - newReplicas: 0, - scaleExpected: true, - expectedNewReplicas: 7, - }, - { - name: "scenario 3. old replica meet desired and new replica meet surge, no change", - deploymentReplicas: 10, - maxSurge: intstr.FromInt(2), - oldReplicas: 10, - newReplicas: 2, - scaleExpected: false, - }, - { - name: "scenario 4. old replica lower than desired, new replica exceed desired and surge, scale down", - deploymentReplicas: 10, - maxSurge: intstr.FromInt(2), - oldReplicas: 2, - newReplicas: 11, - scaleExpected: true, - expectedNewReplicas: 10, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - newMS := ms("foo-v2", test.newReplicas, nil, noTimestamp) - oldMS := ms("foo-v2", test.oldReplicas, nil, noTimestamp) - allMSs := []*v1alpha1.MachineSet{newMS, oldMS} - maxUnavailable := intstr.FromInt(0) - deployment := newMachineDeployment("foo", test.deploymentReplicas, nil, &test.maxSurge, &maxUnavailable, map[string]string{"foo": "bar"}) - - rObjects := []runtime.Object{} - rObjects = append(rObjects, oldMS) - - fakeClient := fake.NewSimpleClientset(rObjects...) - controller := &MachineDeploymentControllerImpl{} - controller.machineClient = fakeClient - - scaled, err := controller.reconcileNewMachineSet(allMSs, newMS, deployment) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - if !test.scaleExpected { - if scaled || len(fakeClient.Actions()) > 0 { - t.Fatalf("unexpected scaling: %v", fakeClient.Actions()) - } - } - if test.scaleExpected { - if !scaled { - t.Fatalf("expected scaling to occur") - } - if len(fakeClient.Actions()) != 1 { - t.Fatalf("expected 1 action during scale, got: %v", fakeClient.Actions()) - } - updated := fakeClient.Actions()[0].(core.UpdateAction).GetObject().(*v1alpha1.MachineSet) - if e, a := test.expectedNewReplicas, int(*(updated.Spec.Replicas)); e != a { - t.Fatalf("expected update to %d replicas, got %d", e, a) - } - } - }) - } -} - -func TestMachineDeploymentController_reconcileOldMachineSets(t *testing.T) { - tests := []struct { - name string - deploymentReplicas int - maxUnavailable intstr.IntOrString - oldReplicas int - newReplicas int - readyMachinesFromOldMS int - readyMachinesFromNewMS int - scaleExpected bool - expectedOldReplicas int - expectedActions int - }{ - { - name: "scenario 1: 10 desired, oldMS at 10, 10 ready, 1 max surge, 0 max unavailable => oldMS at 10, no scaling.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(0), - oldReplicas: 10, - newReplicas: 0, - readyMachinesFromOldMS: 10, - readyMachinesFromNewMS: 0, - scaleExpected: false, - }, - { - name: "scenario 2: 10 desired, oldMS at 10, 10 ready, 1 max surge, 2 max unavailable => oldMS at 8, scale down by 2.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - oldReplicas: 10, - newReplicas: 0, - readyMachinesFromOldMS: 10, - readyMachinesFromNewMS: 0, - scaleExpected: true, - expectedOldReplicas: 8, - expectedActions: 1, - }, - { // expect unhealthy replicas from old machine sets been cleaned up - name: "scenario 3: 10 desired, oldMS at 10, 8 ready, 1 max surge, 2 max unavailable => oldMS at 8, scale down by 0.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - oldReplicas: 10, - newReplicas: 0, - readyMachinesFromOldMS: 8, - readyMachinesFromNewMS: 0, - scaleExpected: true, - expectedOldReplicas: 8, - expectedActions: 1, - }, - { // expect 1 unhealthy replica from old machine sets been cleaned up, and 1 ready machine been scaled down - name: "scenario 4: 10 desired, oldMS at 10, 9 ready, 1 max surge, 2 max unavailable => oldMS at 8, scale down by 1.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - oldReplicas: 10, - newReplicas: 0, - readyMachinesFromOldMS: 9, - readyMachinesFromNewMS: 0, - scaleExpected: true, - expectedOldReplicas: 8, - expectedActions: 2, - }, - { // the unavailable machines from the newMS would not make us scale down old MSs in a further step - name: "scenario 5: 10 desired, oldMS at 8, newMS at 2, 1 max surge, 8 oldMS ready, 0 newMS ready, 2 max unavailable => no scale.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - oldReplicas: 8, - newReplicas: 2, - readyMachinesFromOldMS: 8, - readyMachinesFromNewMS: 0, - scaleExpected: false, - }, - { - name: "scenario 6: 10 desired, oldMS at 10, newMS at 1, 1 max surge, 0 max unavailable => oldMS at 9, scale down by 1.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(0), - oldReplicas: 10, - newReplicas: 1, - readyMachinesFromOldMS: 10, - readyMachinesFromNewMS: 1, - scaleExpected: true, - expectedOldReplicas: 9, - expectedActions: 1, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - t.Logf(test.name) - - newSelector := map[string]string{"foo": "new"} - oldSelector := map[string]string{"foo": "old"} - newMS := ms("foo-new", test.newReplicas, newSelector, noTimestamp) - newMS.Status.AvailableReplicas = int32(test.readyMachinesFromNewMS) - oldMS := ms("foo-old", test.oldReplicas, oldSelector, noTimestamp) - oldMS.Status.AvailableReplicas = int32(test.readyMachinesFromOldMS) - oldMSs := []*v1alpha1.MachineSet{oldMS} - allMSs := []*v1alpha1.MachineSet{oldMS, newMS} - maxSurge := intstr.FromInt(1) - deployment := newMachineDeployment("foo", test.deploymentReplicas, nil, &maxSurge, &test.maxUnavailable, newSelector) - - rObjects := []runtime.Object{} - rObjects = append(rObjects, oldMS, newMS) - - fakeClient := fake.NewSimpleClientset(rObjects...) - controller := &MachineDeploymentControllerImpl{} - controller.machineClient = fakeClient - - scaled, err := controller.reconcileOldMachineSets(allMSs, oldMSs, newMS, deployment) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !test.scaleExpected { - if scaled || len(fakeClient.Actions()) > 0 { - t.Fatalf("unexpected scaling: %v", fakeClient.Actions()) - } - } - if test.scaleExpected { - if !scaled { - t.Errorf("expected scaling to occur") - } - if test.expectedActions != len(fakeClient.Actions()) { - t.Fatalf("got %d actions, expected %d; %v", len(fakeClient.Actions()), test.expectedActions, fakeClient.Actions()) - } - updated := fakeClient.Actions()[len(fakeClient.Actions())-1].(core.UpdateAction).GetObject().(*v1alpha1.MachineSet) - if e, a := test.expectedOldReplicas, int(*(updated.Spec.Replicas)); e != a { - t.Fatalf("expected update to %d replicas, got %d", e, a) - } - } - }) - } -} - -func TestMachineDeploymentController_cleanupUnhealthyReplicas(t *testing.T) { - tests := []struct { - name string - oldReplicas int - readyMachines int - unHealthyMachines int - maxCleanupCount int - cleanupCountExpected int - }{ - { - name: "scenario 1. 2 unhealthy, max 1 cleanup => 1 cleanup.", - oldReplicas: 10, - readyMachines: 8, - unHealthyMachines: 2, - maxCleanupCount: 1, - cleanupCountExpected: 1, - }, - { - name: "scenario 2. 2 unhealthy, max 3 cleanup => 2 cleanup.", - oldReplicas: 10, - readyMachines: 8, - unHealthyMachines: 2, - maxCleanupCount: 3, - cleanupCountExpected: 2, - }, - { - name: "scenario 3. 2 unhealthy, max 0 cleanup => 0 cleanup.", - oldReplicas: 10, - readyMachines: 8, - unHealthyMachines: 2, - maxCleanupCount: 0, - cleanupCountExpected: 0, - }, - { - name: "scenario 4. 0 unhealthy, max 3 cleanup => 0 cleanup.", - oldReplicas: 10, - readyMachines: 10, - unHealthyMachines: 0, - maxCleanupCount: 3, - cleanupCountExpected: 0, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - t.Log(test.name) - oldMS := ms("foo-v2", test.oldReplicas, nil, noTimestamp) - oldMS.Status.AvailableReplicas = int32(test.readyMachines) - oldMSs := []*v1alpha1.MachineSet{oldMS} - maxSurge := intstr.FromInt(2) - maxUnavailable := intstr.FromInt(2) - deployment := newMachineDeployment("foo", 10, nil, &maxSurge, &maxUnavailable, nil) - - rObjects := []runtime.Object{} - rObjects = append(rObjects, oldMS) - - fakeClient := fake.NewSimpleClientset(rObjects...) - controller := &MachineDeploymentControllerImpl{} - controller.machineClient = fakeClient - - _, cleanupCount, err := controller.cleanupUnhealthyReplicas(oldMSs, deployment, int32(test.maxCleanupCount)) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if int(cleanupCount) != test.cleanupCountExpected { - t.Fatalf("got %d clean up count, expected %d clean up count", cleanupCount, test.cleanupCountExpected) - } - }) - } -} - -func TestMachineDeploymentController_scaleDownOldMachineSetsForRollingUpdate(t *testing.T) { - tests := []struct { - name string - deploymentReplicas int - maxUnavailable intstr.IntOrString - readyMachines int - oldReplicas int - scaleExpected bool - expectedOldReplicas int - }{ - { - name: "scenario 1. 10 desired, oldMS at 10, 10 ready, max unavailable 0 => oldMS at 10, no scaling.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(0), - readyMachines: 10, - oldReplicas: 10, - scaleExpected: false, - }, - { - name: "scenario 2. 10 desired, oldMS at 10, 10 ready, max unavailable 2 => oldMS at 8, scale down by 2.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - readyMachines: 10, - oldReplicas: 10, - scaleExpected: true, - expectedOldReplicas: 8, - }, - { - name: "scenario 3. 10 desired, oldMS at 8, 8 ready, max unavailable 2 => oldMS at 8, no scaling.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - readyMachines: 8, - oldReplicas: 10, - scaleExpected: false, - }, - { - name: "scenario 4. 10 desired, oldMS at 0, 10 ready, max unavailable 2 => oldMS at 0, no scaling.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - readyMachines: 10, - oldReplicas: 0, - scaleExpected: false, - }, - { - name: "scenario 5. 10 desired, oldMS at 10, 1 ready, max unavailable 2 => oldMS at 10, no scaling.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - readyMachines: 1, - oldReplicas: 10, - scaleExpected: false, - }, - { - name: "scenario 6. 10 desired, oldMS at 11, 11 ready, max unavailable 0 => oldMS at 10, scale down by 1.", - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(0), - readyMachines: 11, - oldReplicas: 11, - scaleExpected: true, - expectedOldReplicas: 10, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - t.Logf(test.name) - oldMS := ms("foo-v2", test.oldReplicas, nil, noTimestamp) - oldMS.Status.AvailableReplicas = int32(test.readyMachines) - allMSs := []*v1alpha1.MachineSet{oldMS} - oldMSs := []*v1alpha1.MachineSet{oldMS} - maxSurge := intstr.FromInt(1) - deployment := newMachineDeployment("foo", test.deploymentReplicas, nil, &maxSurge, &test.maxUnavailable, map[string]string{"foo": "bar"}) - - rObjects := []runtime.Object{} - rObjects = append(rObjects, oldMS) - - fakeClient := fake.NewSimpleClientset(rObjects...) - controller := &MachineDeploymentControllerImpl{} - controller.machineClient = fakeClient - - scaled, err := controller.scaleDownOldMachineSetsForRollingUpdate(allMSs, oldMSs, deployment) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !test.scaleExpected { - if scaled != 0 { - t.Fatalf("unexpected scaling: %v", fakeClient.Actions()) - } - } - if test.scaleExpected { - if scaled == 0 { - t.Fatalf("expected scaling to occur; actions: %v", fakeClient.Actions()) - } - // There are both list and update actions logged, so extract the update - // action for verification. - var updateAction core.UpdateAction - for _, action := range fakeClient.Actions() { - switch a := action.(type) { - case core.UpdateAction: - if updateAction != nil { - t.Errorf("expected only 1 update action; had %v and found %v", updateAction, a) - } else { - updateAction = a - } - } - } - if updateAction == nil { - t.Fatalf("expected an update action") - } - updated := updateAction.GetObject().(*v1alpha1.MachineSet) - if e, a := test.expectedOldReplicas, int(*(updated.Spec.Replicas)); e != a { - t.Fatalf("got %d replicas, expected %d replicas updated", a, e) - } - } - }) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/sync.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/sync.go deleted file mode 100644 index 108f40a737f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/sync.go +++ /dev/null @@ -1,458 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machinedeployment - -import ( - "fmt" - "reflect" - "sort" - "strconv" - - "github.com/golang/glog" - - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - apirand "k8s.io/apimachinery/pkg/util/rand" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - dutil "sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util" -) - -// sync is responsible for reconciling deployments on scaling events or when they -// are paused. -func (dc *MachineDeploymentControllerImpl) sync(d *v1alpha1.MachineDeployment, msList []*v1alpha1.MachineSet, machineMap map[types.UID]*v1alpha1.MachineList) error { - newMS, oldMSs, err := dc.getAllMachineSetsAndSyncRevision(d, msList, machineMap, false) - if err != nil { - return err - } - if err := dc.scale(d, newMS, oldMSs); err != nil { - // If we get an error while trying to scale, the deployment will be requeued - // so we can abort this resync - return err - } - - // TODO: Clean up the deployment when it's paused and no rollback is in flight. - - allMSs := append(oldMSs, newMS) - return dc.syncDeploymentStatus(allMSs, newMS, d) -} - -// getAllMachineSetsAndSyncRevision returns all the machine sets for the provided deployment (new and all old), with new MS's and deployment's revision updated. -// -// msList should come from getMachineSetsForDeployment(d). -// machineMap should come from getMachineMapForDeployment(d, msList). -// -// 1. Get all old MSes this deployment targets, and calculate the max revision number among them (maxOldV). -// 2. Get new MS this deployment targets (whose machine template matches deployment's), and update new MS's revision number to (maxOldV + 1), -// only if its revision number is smaller than (maxOldV + 1). If this step failed, we'll update it in the next deployment sync loop. -// 3. Copy new MS's revision number to deployment (update deployment's revision). If this step failed, we'll update it in the next deployment sync loop. -// -// Note that currently the deployment controller is using caches to avoid querying the server for reads. -// This may lead to stale reads of machine sets, thus incorrect deployment status. -func (dc *MachineDeploymentControllerImpl) getAllMachineSetsAndSyncRevision(d *v1alpha1.MachineDeployment, msList []*v1alpha1.MachineSet, machineMap map[types.UID]*v1alpha1.MachineList, createIfNotExisted bool) (*v1alpha1.MachineSet, []*v1alpha1.MachineSet, error) { - _, allOldMSs := dutil.FindOldMachineSets(d, msList) - - // Get new machine set with the updated revision number - newMS, err := dc.getNewMachineSet(d, msList, allOldMSs, createIfNotExisted) - if err != nil { - return nil, nil, err - } - - return newMS, allOldMSs, nil -} - -// Returns a machine set that matches the intent of the given deployment. Returns nil if the new machine set doesn't exist yet. -// 1. Get existing new MS (the MS that the given deployment targets, whose machine template is the same as deployment's). -// 2. If there's existing new MS, update its revision number if it's smaller than (maxOldRevision + 1), where maxOldRevision is the max revision number among all old MSes. -// 3. If there's no existing new MS and createIfNotExisted is true, create one with appropriate revision number (maxOldRevision + 1) and replicas. -// Note that the machine-template-hash will be added to adopted MSes and machines. -func (dc *MachineDeploymentControllerImpl) getNewMachineSet(d *v1alpha1.MachineDeployment, msList, oldMSs []*v1alpha1.MachineSet, createIfNotExisted bool) (*v1alpha1.MachineSet, error) { - existingNewMS := dutil.FindNewMachineSet(d, msList) - - // Calculate the max revision number among all old MSes - maxOldRevision := dutil.MaxRevision(oldMSs) - // Calculate revision number for this new machine set - newRevision := strconv.FormatInt(maxOldRevision+1, 10) - - // Latest machine set exists. We need to sync its annotations (includes copying all but - // annotationsToSkip from the parent deployment, and update revision, desiredReplicas, - // and maxReplicas) and also update the revision annotation in the deployment with the - // latest revision. - if existingNewMS != nil { - msCopy := existingNewMS.DeepCopy() - - // Set existing new machine set's annotation - annotationsUpdated := dutil.SetNewMachineSetAnnotations(d, msCopy, newRevision, true) - - minReadySecondsNeedsUpdate := msCopy.Spec.MinReadySeconds != *d.Spec.MinReadySeconds - if annotationsUpdated || minReadySecondsNeedsUpdate { - msCopy.Spec.MinReadySeconds = *d.Spec.MinReadySeconds - return dc.machineClient.ClusterV1alpha1().MachineSets(msCopy.ObjectMeta.Namespace).Update(msCopy) - } - - // Apply revision annotation from existingNewMS if it is missing from the deployment. - // needsUpdate is false if there is not annotation or is already present. - needsUpdate := dutil.SetDeploymentRevision(d, msCopy.Annotations[dutil.RevisionAnnotation]) - - if needsUpdate { - var err error - if d, err = dc.machineClient.ClusterV1alpha1().MachineDeployments(d.Namespace).UpdateStatus(d); err != nil { - return nil, err - } - } - return msCopy, nil - } - - if !createIfNotExisted { - return nil, nil - } - - // new MachineSet does not exist, create one. - newMSTemplate := *d.Spec.Template.DeepCopy() - machineTemplateSpecHash := fmt.Sprintf("%d", dutil.ComputeHash(&newMSTemplate)) - newMSTemplate.Labels = dutil.CloneAndAddLabel(d.Spec.Template.Labels, dutil.DefaultMachineDeploymentUniqueLabelKey, machineTemplateSpecHash) - // Add machineTemplateHash label to selector. - newMSSelector := dutil.CloneSelectorAndAddLabel(&d.Spec.Selector, dutil.DefaultMachineDeploymentUniqueLabelKey, machineTemplateSpecHash) - - // Create new MachineSet - newMS := v1alpha1.MachineSet{ - ObjectMeta: metav1.ObjectMeta{ - // Make the name deterministic, to ensure idempotence - Name: d.Name + "-" + apirand.SafeEncodeString(machineTemplateSpecHash), - Namespace: d.Namespace, - Labels: newMSTemplate.Labels, - OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(d, controllerKind)}, - }, - Spec: v1alpha1.MachineSetSpec{ - Replicas: new(int32), - MinReadySeconds: *d.Spec.MinReadySeconds, - Selector: *newMSSelector, - Template: newMSTemplate, - }, - } - allMSs := append(oldMSs, &newMS) - newReplicasCount, err := dutil.NewMSNewReplicas(d, allMSs, &newMS) - if err != nil { - return nil, err - } - - *(newMS.Spec.Replicas) = newReplicasCount - // Set new machine set's annotation - dutil.SetNewMachineSetAnnotations(d, &newMS, newRevision, false) - // Create the new MachineSet. If it already exists, then we need to check for possible - // hash collisions. If there is any other error, we need to report it in the status of - // the Deployment. - alreadyExists := false - createdMS, err := dc.machineClient.ClusterV1alpha1().MachineSets(d.Namespace).Create(&newMS) - switch { - // We may end up hitting this due to a slow cache or a fast resync of the Deployment. - case errors.IsAlreadyExists(err): - alreadyExists = true - - // Fetch a copy of the MachineSet. - ms, msErr := dc.msLister.MachineSets(newMS.Namespace).Get(newMS.Name) - if msErr != nil { - return nil, msErr - } - - // If the Deployment owns the MachineSet and the MachineSet's MachineTemplateSpec is semantically - // deep equal to the MachineTemplateSpec of the Deployment, it's the Deployment's new MachineSet. - // Otherwise, this is a hash collision and we need to increment the collisionCount field in - // the status of the Deployment and requeue to try the creation in the next sync. - controllerRef := metav1.GetControllerOf(ms) - if controllerRef != nil && controllerRef.UID == d.UID && dutil.EqualIgnoreHash(&d.Spec.Template, &ms.Spec.Template) { - createdMS = ms - err = nil - break - } - - return nil, err - case err != nil: - glog.V(4).Infof("Failed to create new machine set %q: %v", newMS.Name, err) - return nil, err - } - - needsUpdate := dutil.SetDeploymentRevision(d, newRevision) - if !alreadyExists { - glog.V(4).Infof("Created new machine set %q", createdMS.Name) - } - if needsUpdate { - _, err = dc.machineClient.ClusterV1alpha1().MachineDeployments(d.Namespace).UpdateStatus(d) - } - return createdMS, err -} - -// scale scales proportionally in order to mitigate risk. Otherwise, scaling up can increase the size -// of the new machine set and scaling down can decrease the sizes of the old ones, both of which would -// have the effect of hastening the rollout progress, which could produce a higher proportion of unavailable -// replicas in the event of a problem with the rolled out template. Should run only on scaling events or -// when a deployment is paused and not during the normal rollout process. -func (dc *MachineDeploymentControllerImpl) scale(deployment *v1alpha1.MachineDeployment, newMS *v1alpha1.MachineSet, oldMSs []*v1alpha1.MachineSet) error { - if deployment.Spec.Replicas == nil { - return fmt.Errorf("spec replicas for deployment %v is nil, this is unexpected", deployment.Name) - } - // If there is only one active machine set then we should scale that up to the full count of the - // deployment. If there is no active machine set, then we should scale up the newest machine set. - if activeOrLatest := dutil.FindOneActiveOrLatest(newMS, oldMSs); activeOrLatest != nil { - if activeOrLatest.Spec.Replicas == nil { - return fmt.Errorf("spec replicas for machine set %v is nil, this is unexpected", activeOrLatest.Name) - } - if *(activeOrLatest.Spec.Replicas) == *(deployment.Spec.Replicas) { - return nil - } - _, _, err := dc.scaleMachineSet(activeOrLatest, *(deployment.Spec.Replicas), deployment) - return err - } - - // If the new machine set is saturated, old machine sets should be fully scaled down. - // This case handles machine set adoption during a saturated new machine set. - if dutil.IsSaturated(deployment, newMS) { - for _, old := range dutil.FilterActiveMachineSets(oldMSs) { - if _, _, err := dc.scaleMachineSet(old, 0, deployment); err != nil { - return err - } - } - return nil - } - - // There are old machine sets with machines and the new machine set is not saturated. - // We need to proportionally scale all machine sets (new and old) in case of a - // rolling deployment. - if dutil.IsRollingUpdate(deployment) { - allMSs := dutil.FilterActiveMachineSets(append(oldMSs, newMS)) - totalMSReplicas := dutil.GetReplicaCountForMachineSets(allMSs) - - allowedSize := int32(0) - if *(deployment.Spec.Replicas) > 0 { - allowedSize = *(deployment.Spec.Replicas) + dutil.MaxSurge(*deployment) - } - - // Number of additional replicas that can be either added or removed from the total - // replicas count. These replicas should be distributed proportionally to the active - // machine sets. - deploymentReplicasToAdd := allowedSize - totalMSReplicas - - // The additional replicas should be distributed proportionally amongst the active - // machine sets from the larger to the smaller in size machine set. Scaling direction - // drives what happens in case we are trying to scale machine sets of the same size. - // In such a case when scaling up, we should scale up newer machine sets first, and - // when scaling down, we should scale down older machine sets first. - var scalingOperation string - switch { - case deploymentReplicasToAdd > 0: - sort.Sort(dutil.MachineSetsBySizeNewer(allMSs)) - scalingOperation = "up" - - case deploymentReplicasToAdd < 0: - sort.Sort(dutil.MachineSetsBySizeOlder(allMSs)) - scalingOperation = "down" - } - - // Iterate over all active machine sets and estimate proportions for each of them. - // The absolute value of deploymentReplicasAdded should never exceed the absolute - // value of deploymentReplicasToAdd. - deploymentReplicasAdded := int32(0) - nameToSize := make(map[string]int32) - for i := range allMSs { - ms := allMSs[i] - if ms.Spec.Replicas == nil { - glog.Errorf("spec replicas for machine set %v is nil, this is unexpected.", ms.Name) - continue - } - - // Estimate proportions if we have replicas to add, otherwise simply populate - // nameToSize with the current sizes for each machine set. - if deploymentReplicasToAdd != 0 { - proportion := dutil.GetProportion(ms, *deployment, deploymentReplicasToAdd, deploymentReplicasAdded) - - nameToSize[ms.Name] = *(ms.Spec.Replicas) + proportion - deploymentReplicasAdded += proportion - } else { - nameToSize[ms.Name] = *(ms.Spec.Replicas) - } - } - - // Update all machine sets - for i := range allMSs { - ms := allMSs[i] - - // Add/remove any leftovers to the largest machine set. - if i == 0 && deploymentReplicasToAdd != 0 { - leftover := deploymentReplicasToAdd - deploymentReplicasAdded - nameToSize[ms.Name] = nameToSize[ms.Name] + leftover - if nameToSize[ms.Name] < 0 { - nameToSize[ms.Name] = 0 - } - } - - // TODO: Use transactions when we have them. - if _, _, err := dc.scaleMachineSetOperation(ms, nameToSize[ms.Name], deployment, scalingOperation); err != nil { - // Return as soon as we fail, the deployment is requeued - return err - } - } - } - return nil -} - -func (dc *MachineDeploymentControllerImpl) scaleMachineSet(ms *v1alpha1.MachineSet, newScale int32, deployment *v1alpha1.MachineDeployment) (bool, *v1alpha1.MachineSet, error) { - if ms.Spec.Replicas == nil { - return false, nil, fmt.Errorf("spec replicas for machine set %v is nil, this is unexpected", ms.Name) - } - // No need to scale - if *(ms.Spec.Replicas) == newScale { - return false, ms, nil - } - var scalingOperation string - if *(ms.Spec.Replicas) < newScale { - scalingOperation = "up" - } else { - scalingOperation = "down" - } - - scaled, newMS, err := dc.scaleMachineSetOperation(ms, newScale, deployment, scalingOperation) - return scaled, newMS, err -} - -func (dc *MachineDeploymentControllerImpl) scaleMachineSetOperation(ms *v1alpha1.MachineSet, newScale int32, deployment *v1alpha1.MachineDeployment, scaleOperation string) (bool, *v1alpha1.MachineSet, error) { - if ms.Spec.Replicas == nil { - return false, nil, fmt.Errorf("spec replicas for machine set %v is nil, this is unexpected", ms.Name) - } - sizeNeedsUpdate := *(ms.Spec.Replicas) != newScale - - annotationsNeedUpdate := dutil.ReplicasAnnotationsNeedUpdate(ms, *(deployment.Spec.Replicas), *(deployment.Spec.Replicas)+dutil.MaxSurge(*deployment)) - - scaled := false - var err error - if sizeNeedsUpdate || annotationsNeedUpdate { - msCopy := ms.DeepCopy() - *(msCopy.Spec.Replicas) = newScale - dutil.SetReplicasAnnotations(msCopy, *(deployment.Spec.Replicas), *(deployment.Spec.Replicas)+dutil.MaxSurge(*deployment)) - ms, err = dc.machineClient.ClusterV1alpha1().MachineSets(msCopy.Namespace).Update(msCopy) - if err == nil && sizeNeedsUpdate { - scaled = true - } - } - return scaled, ms, err -} - -// cleanupDeployment is responsible for cleaning up a deployment ie. retains all but the latest N old machine sets -// where N=d.Spec.RevisionHistoryLimit. Old machine sets are older versions of the machinetemplate of a deployment kept -// around by default 1) for historical reasons and 2) for the ability to rollback a deployment. -func (dc *MachineDeploymentControllerImpl) cleanupDeployment(oldMSs []*v1alpha1.MachineSet, deployment *v1alpha1.MachineDeployment) error { - if deployment.Spec.RevisionHistoryLimit == nil { - return nil - } - - // Avoid deleting machine set with deletion timestamp set - aliveFilter := func(ms *v1alpha1.MachineSet) bool { - return ms != nil && ms.ObjectMeta.DeletionTimestamp == nil - } - cleanableMSes := dutil.FilterMachineSets(oldMSs, aliveFilter) - - diff := int32(len(cleanableMSes)) - *deployment.Spec.RevisionHistoryLimit - if diff <= 0 { - return nil - } - - sort.Sort(dutil.MachineSetsByCreationTimestamp(cleanableMSes)) - glog.V(4).Infof("Looking to cleanup old machine sets for deployment %q", deployment.Name) - - for i := int32(0); i < diff; i++ { - ms := cleanableMSes[i] - if ms.Spec.Replicas == nil { - return fmt.Errorf("spec replicas for machine set %v is nil, this is unexpected", ms.Name) - } - // Avoid delete machine set with non-zero replica counts - if ms.Status.Replicas != 0 || *(ms.Spec.Replicas) != 0 || ms.Generation > ms.Status.ObservedGeneration || ms.DeletionTimestamp != nil { - continue - } - glog.V(4).Infof("Trying to cleanup machine set %q for deployment %q", ms.Name, deployment.Name) - if err := dc.machineClient.ClusterV1alpha1().MachineSets(ms.Namespace).Delete(ms.Name, nil); err != nil && !errors.IsNotFound(err) { - // Return error instead of aggregating and continuing DELETEs on the theory - // that we may be overloading the api server. - return err - } - } - - return nil -} - -// syncDeploymentStatus checks if the status is up-to-date and sync it if necessary -func (dc *MachineDeploymentControllerImpl) syncDeploymentStatus(allMSs []*v1alpha1.MachineSet, newMS *v1alpha1.MachineSet, d *v1alpha1.MachineDeployment) error { - newStatus := calculateStatus(allMSs, newMS, d) - - if reflect.DeepEqual(d.Status, newStatus) { - return nil - } - - newDeployment := d - newDeployment.Status = newStatus - _, err := dc.machineClient.ClusterV1alpha1().MachineDeployments(newDeployment.Namespace).UpdateStatus(newDeployment) - return err -} - -// calculateStatus calculates the latest status for the provided deployment by looking into the provided machine sets. -func calculateStatus(allMSs []*v1alpha1.MachineSet, newMS *v1alpha1.MachineSet, deployment *v1alpha1.MachineDeployment) v1alpha1.MachineDeploymentStatus { - availableReplicas := dutil.GetAvailableReplicaCountForMachineSets(allMSs) - totalReplicas := dutil.GetReplicaCountForMachineSets(allMSs) - unavailableReplicas := totalReplicas - availableReplicas - // If unavailableReplicas is negative, then that means the Deployment has more available replicas running than - // desired, e.g. whenever it scales down. In such a case we should simply default unavailableReplicas to zero. - if unavailableReplicas < 0 { - unavailableReplicas = 0 - } - - status := v1alpha1.MachineDeploymentStatus{ - // TODO: Ensure that if we start retrying status updates, we won't pick up a new Generation value. - ObservedGeneration: deployment.Generation, - Replicas: dutil.GetActualReplicaCountForMachineSets(allMSs), - UpdatedReplicas: dutil.GetActualReplicaCountForMachineSets([]*v1alpha1.MachineSet{newMS}), - ReadyReplicas: dutil.GetReadyReplicaCountForMachineSets(allMSs), - AvailableReplicas: availableReplicas, - UnavailableReplicas: unavailableReplicas, - } - - return status -} - -// isScalingEvent checks whether the provided deployment has been updated with a scaling event -// by looking at the desired-replicas annotation in the active machine sets of the deployment. -// -// msList should come from getMachineSetsForDeployment(d). -// machineMap should come from getMachineMapForDeployment(d, msList). -func (dc *MachineDeploymentControllerImpl) isScalingEvent(d *v1alpha1.MachineDeployment, msList []*v1alpha1.MachineSet, machineMap map[types.UID]*v1alpha1.MachineList) (bool, error) { - if d.Spec.Replicas == nil { - return false, fmt.Errorf("spec replicas for deployment %v is nil, this is unexpected", d.Name) - } - newMS, oldMSs, err := dc.getAllMachineSetsAndSyncRevision(d, msList, machineMap, false) - if err != nil { - return false, err - } - allMSs := append(oldMSs, newMS) - for _, ms := range dutil.FilterActiveMachineSets(allMSs) { - desired, ok := dutil.GetDesiredReplicasAnnotation(ms) - if !ok { - continue - } - if desired != *(d.Spec.Replicas) { - return true, nil - } - } - return false, nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/sync_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/sync_test.go deleted file mode 100644 index 50d5d72af0d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/sync_test.go +++ /dev/null @@ -1,435 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machinedeployment - -import ( - "testing" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/intstr" - testclient "k8s.io/client-go/testing" - "k8s.io/client-go/tools/cache" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake" - v1alpha1listers "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - dutil "sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util" -) - -func intOrStrP(val int) *intstr.IntOrString { - intOrStr := intstr.FromInt(val) - return &intOrStr -} - -func TestScale(t *testing.T) { - newTimestamp := metav1.Date(2016, 5, 20, 2, 0, 0, 0, time.UTC) - oldTimestamp := metav1.Date(2016, 5, 20, 1, 0, 0, 0, time.UTC) - olderTimestamp := metav1.Date(2016, 5, 20, 0, 0, 0, 0, time.UTC) - - var updatedTemplate = func(replicas int) *v1alpha1.MachineDeployment { - d := newMachineDeployment("foo", replicas, nil, nil, nil, map[string]string{"foo": "bar"}) - d.Spec.Template.Labels["another"] = "label" - return d - } - - tests := []struct { - name string - deployment *v1alpha1.MachineDeployment - oldDeployment *v1alpha1.MachineDeployment - - newMS *v1alpha1.MachineSet - oldMSs []*v1alpha1.MachineSet - - expectedNew *v1alpha1.MachineSet - expectedOld []*v1alpha1.MachineSet - wasntUpdated map[string]bool - - desiredReplicasAnnotations map[string]int32 - }{ - { - name: "normal scaling event: 10 -> 12", - deployment: newMachineDeployment("foo", 12, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 10, nil, nil, nil, nil), - - newMS: ms("foo-v1", 10, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{}, - - expectedNew: ms("foo-v1", 12, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{}, - }, - { - name: "normal scaling event: 10 -> 5", - deployment: newMachineDeployment("foo", 5, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 10, nil, nil, nil, nil), - - newMS: ms("foo-v1", 10, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{}, - - expectedNew: ms("foo-v1", 5, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{}, - }, - { - name: "proportional scaling: 5 -> 10", - deployment: newMachineDeployment("foo", 10, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 5, nil, nil, nil, nil), - - newMS: ms("foo-v2", 2, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v1", 3, nil, oldTimestamp)}, - - expectedNew: ms("foo-v2", 4, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v1", 6, nil, oldTimestamp)}, - }, - { - name: "proportional scaling: 5 -> 3", - deployment: newMachineDeployment("foo", 3, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 5, nil, nil, nil, nil), - - newMS: ms("foo-v2", 2, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v1", 3, nil, oldTimestamp)}, - - expectedNew: ms("foo-v2", 1, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v1", 2, nil, oldTimestamp)}, - }, - { - name: "proportional scaling: 9 -> 4", - deployment: newMachineDeployment("foo", 4, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 9, nil, nil, nil, nil), - - newMS: ms("foo-v2", 8, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v1", 1, nil, oldTimestamp)}, - - expectedNew: ms("foo-v2", 4, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v1", 0, nil, oldTimestamp)}, - }, - { - name: "proportional scaling: 7 -> 10", - deployment: newMachineDeployment("foo", 10, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 7, nil, nil, nil, nil), - - newMS: ms("foo-v3", 2, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v2", 3, nil, oldTimestamp), ms("foo-v1", 2, nil, olderTimestamp)}, - - expectedNew: ms("foo-v3", 3, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v2", 4, nil, oldTimestamp), ms("foo-v1", 3, nil, olderTimestamp)}, - }, - { - name: "proportional scaling: 13 -> 8", - deployment: newMachineDeployment("foo", 8, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 13, nil, nil, nil, nil), - - newMS: ms("foo-v3", 2, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v2", 8, nil, oldTimestamp), ms("foo-v1", 3, nil, olderTimestamp)}, - - expectedNew: ms("foo-v3", 1, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v2", 5, nil, oldTimestamp), ms("foo-v1", 2, nil, olderTimestamp)}, - }, - // Scales up the new machine set. - { - name: "leftover distribution: 3 -> 4", - deployment: newMachineDeployment("foo", 4, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 3, nil, nil, nil, nil), - - newMS: ms("foo-v3", 1, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v2", 1, nil, oldTimestamp), ms("foo-v1", 1, nil, olderTimestamp)}, - - expectedNew: ms("foo-v3", 2, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v2", 1, nil, oldTimestamp), ms("foo-v1", 1, nil, olderTimestamp)}, - }, - // Scales down the older machine set. - { - name: "leftover distribution: 3 -> 2", - deployment: newMachineDeployment("foo", 2, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 3, nil, nil, nil, nil), - - newMS: ms("foo-v3", 1, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v2", 1, nil, oldTimestamp), ms("foo-v1", 1, nil, olderTimestamp)}, - - expectedNew: ms("foo-v3", 1, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v2", 1, nil, oldTimestamp), ms("foo-v1", 0, nil, olderTimestamp)}, - }, - // Scales up the latest machine set first. - { - name: "proportional scaling (no new rs): 4 -> 5", - deployment: newMachineDeployment("foo", 5, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 4, nil, nil, nil, nil), - - newMS: nil, - oldMSs: []*v1alpha1.MachineSet{ms("foo-v2", 2, nil, oldTimestamp), ms("foo-v1", 2, nil, olderTimestamp)}, - - expectedNew: nil, - expectedOld: []*v1alpha1.MachineSet{ms("foo-v2", 3, nil, oldTimestamp), ms("foo-v1", 2, nil, olderTimestamp)}, - }, - // Scales down to zero - { - name: "proportional scaling: 6 -> 0", - deployment: newMachineDeployment("foo", 0, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 6, nil, nil, nil, nil), - - newMS: ms("foo-v3", 3, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v2", 2, nil, oldTimestamp), ms("foo-v1", 1, nil, olderTimestamp)}, - - expectedNew: ms("foo-v3", 0, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v2", 0, nil, oldTimestamp), ms("foo-v1", 0, nil, olderTimestamp)}, - }, - // Scales up from zero - { - name: "proportional scaling: 0 -> 6", - deployment: newMachineDeployment("foo", 6, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 6, nil, nil, nil, nil), - - newMS: ms("foo-v3", 0, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v2", 0, nil, oldTimestamp), ms("foo-v1", 0, nil, olderTimestamp)}, - - expectedNew: ms("foo-v3", 6, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v2", 0, nil, oldTimestamp), ms("foo-v1", 0, nil, olderTimestamp)}, - wasntUpdated: map[string]bool{"foo-v2": true, "foo-v1": true}, - }, - // Scenario: deployment.spec.replicas == 3 ( foo-v1.spec.replicas == foo-v2.spec.replicas == foo-v3.spec.replicas == 1 ) - // Deployment is scaled to 5. foo-v3.spec.replicas and foo-v2.spec.replicas should increment by 1 but foo-v2 fails to - // update. - { - name: "failed ms update", - deployment: newMachineDeployment("foo", 5, nil, nil, nil, nil), - oldDeployment: newMachineDeployment("foo", 5, nil, nil, nil, nil), - - newMS: ms("foo-v3", 2, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v2", 1, nil, oldTimestamp), ms("foo-v1", 1, nil, olderTimestamp)}, - - expectedNew: ms("foo-v3", 2, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v2", 2, nil, oldTimestamp), ms("foo-v1", 1, nil, olderTimestamp)}, - wasntUpdated: map[string]bool{"foo-v3": true, "foo-v1": true}, - - desiredReplicasAnnotations: map[string]int32{"foo-v2": int32(3)}, - }, - { - name: "deployment with surge machines", - deployment: newMachineDeployment("foo", 20, nil, intOrStrP(2), nil, nil), - oldDeployment: newMachineDeployment("foo", 10, nil, intOrStrP(2), nil, nil), - - newMS: ms("foo-v2", 6, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v1", 6, nil, oldTimestamp)}, - - expectedNew: ms("foo-v2", 11, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v1", 11, nil, oldTimestamp)}, - }, - { - name: "change both surge and size", - deployment: newMachineDeployment("foo", 50, nil, intOrStrP(6), nil, nil), - oldDeployment: newMachineDeployment("foo", 10, nil, intOrStrP(3), nil, nil), - - newMS: ms("foo-v2", 5, nil, newTimestamp), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v1", 8, nil, oldTimestamp)}, - - expectedNew: ms("foo-v2", 22, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v1", 34, nil, oldTimestamp)}, - }, - { - name: "change both size and template", - deployment: updatedTemplate(14), - oldDeployment: newMachineDeployment("foo", 10, nil, nil, nil, map[string]string{"foo": "bar"}), - - newMS: nil, - oldMSs: []*v1alpha1.MachineSet{ms("foo-v2", 7, nil, newTimestamp), ms("foo-v1", 3, nil, oldTimestamp)}, - - expectedNew: nil, - expectedOld: []*v1alpha1.MachineSet{ms("foo-v2", 10, nil, newTimestamp), ms("foo-v1", 4, nil, oldTimestamp)}, - }, - { - name: "saturated but broken new machine set does not affect old machines", - deployment: newMachineDeployment("foo", 2, nil, intOrStrP(1), intOrStrP(1), nil), - oldDeployment: newMachineDeployment("foo", 2, nil, intOrStrP(1), intOrStrP(1), nil), - - newMS: func() *v1alpha1.MachineSet { - ms := ms("foo-v2", 2, nil, newTimestamp) - ms.Status.AvailableReplicas = 0 - return ms - }(), - oldMSs: []*v1alpha1.MachineSet{ms("foo-v1", 1, nil, oldTimestamp)}, - - expectedNew: ms("foo-v2", 2, nil, newTimestamp), - expectedOld: []*v1alpha1.MachineSet{ms("foo-v1", 1, nil, oldTimestamp)}, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - _ = olderTimestamp - t.Log(test.name) - fakeClient := fake.Clientset{} - controller := &MachineDeploymentControllerImpl{} - controller.machineClient = &fakeClient - - if test.newMS != nil { - desiredReplicas := *(test.oldDeployment.Spec.Replicas) - if desired, ok := test.desiredReplicasAnnotations[test.newMS.Name]; ok { - desiredReplicas = desired - } - dutil.SetReplicasAnnotations(test.newMS, desiredReplicas, desiredReplicas+dutil.MaxSurge(*test.oldDeployment)) - } - for i := range test.oldMSs { - ms := test.oldMSs[i] - if ms == nil { - continue - } - desiredReplicas := *(test.oldDeployment.Spec.Replicas) - if desired, ok := test.desiredReplicasAnnotations[ms.Name]; ok { - desiredReplicas = desired - } - dutil.SetReplicasAnnotations(ms, desiredReplicas, desiredReplicas+dutil.MaxSurge(*test.oldDeployment)) - } - - if err := controller.scale(test.deployment, test.newMS, test.oldMSs); err != nil { - t.Errorf("%s: unexpected error: %v", test.name, err) - return - } - - // Construct the nameToSize map that will hold all the sizes we got our of tests - // Skip updating the map if the machine set wasn't updated since there will be - // no update action for it. - nameToSize := make(map[string]int32) - if test.newMS != nil { - nameToSize[test.newMS.Name] = *(test.newMS.Spec.Replicas) - } - for i := range test.oldMSs { - ms := test.oldMSs[i] - nameToSize[ms.Name] = *(ms.Spec.Replicas) - } - // Get all the UPDATE actions and update nameToSize with all the updated sizes. - for _, action := range fakeClient.Actions() { - ms := action.(testclient.UpdateAction).GetObject().(*v1alpha1.MachineSet) - if !test.wasntUpdated[ms.Name] { - nameToSize[ms.Name] = *(ms.Spec.Replicas) - } - } - - if test.expectedNew != nil && test.newMS != nil && *(test.expectedNew.Spec.Replicas) != nameToSize[test.newMS.Name] { - t.Errorf("%s: expected new replicas: %d, got: %d", test.name, *(test.expectedNew.Spec.Replicas), nameToSize[test.newMS.Name]) - return - } - if len(test.expectedOld) != len(test.oldMSs) { - t.Errorf("%s: expected %d old machine sets, got %d", test.name, len(test.expectedOld), len(test.oldMSs)) - return - } - for n := range test.oldMSs { - ms := test.oldMSs[n] - expected := test.expectedOld[n] - if *(expected.Spec.Replicas) != nameToSize[ms.Name] { - t.Errorf("%s: expected old (%s) replicas: %d, got: %d", test.name, ms.Name, *(expected.Spec.Replicas), nameToSize[ms.Name]) - } - } - }) - } -} - -func TestDeploymentController_cleanupDeployment(t *testing.T) { - selector := map[string]string{"foo": "bar"} - alreadyDeleted := newMSWithStatus("foo-1", 0, 0, selector) - now := metav1.Now() - alreadyDeleted.DeletionTimestamp = &now - - tests := []struct { - name string - oldMSs []*v1alpha1.MachineSet - revisionHistoryLimit int32 - expectedDeletions int - }{ - { - name: "3 machine set qualifies for deletion, limit to keep 1, delete 2.", - oldMSs: []*v1alpha1.MachineSet{ - newMSWithStatus("foo-1", 0, 0, selector), - newMSWithStatus("foo-2", 0, 0, selector), - newMSWithStatus("foo-3", 0, 0, selector), - }, - revisionHistoryLimit: 1, - expectedDeletions: 2, - }, - { - // Only delete the machine set with Spec.Replicas = Status.Replicas = 0. - name: "1 machine set qualifies for deletion, limit 0, delete 1.", - oldMSs: []*v1alpha1.MachineSet{ - newMSWithStatus("foo-1", 0, 0, selector), - newMSWithStatus("foo-2", 0, 1, selector), - newMSWithStatus("foo-3", 1, 0, selector), - newMSWithStatus("foo-4", 1, 1, selector), - }, - revisionHistoryLimit: 0, - expectedDeletions: 1, - }, - { - name: "2 machine set qualfiies for deletion, limit 0, delete 2.", - oldMSs: []*v1alpha1.MachineSet{ - newMSWithStatus("foo-1", 0, 0, selector), - newMSWithStatus("foo-2", 0, 0, selector), - }, - revisionHistoryLimit: 0, - expectedDeletions: 2, - }, - { - name: "0 machine set qualifies for deletion, limit 0, delete 0.", - oldMSs: []*v1alpha1.MachineSet{ - newMSWithStatus("foo-1", 1, 1, selector), - newMSWithStatus("foo-2", 1, 1, selector), - }, - revisionHistoryLimit: 0, - expectedDeletions: 0, - }, - { - name: "1 machine set qualifies for deletion, already deleting, limit 0, delete 0.", - oldMSs: []*v1alpha1.MachineSet{ - alreadyDeleted, - }, - revisionHistoryLimit: 0, - expectedDeletions: 0, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - t.Log(test.name) - - rObjects := []runtime.Object{} - machineSetIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) - for _, ms := range test.oldMSs { - err := machineSetIndexer.Add(ms) - if err != nil { - t.Fatal(err) - } - rObjects = append(rObjects, ms) - } - machineSetLister := v1alpha1listers.NewMachineSetLister(machineSetIndexer) - - fakeClient := fake.NewSimpleClientset(rObjects...) - controller := &MachineDeploymentControllerImpl{} - controller.machineClient = fakeClient - controller.msLister = machineSetLister - - d := newMachineDeployment("foo", 1, &test.revisionHistoryLimit, nil, nil, map[string]string{"foo": "bar"}) - controller.cleanupDeployment(test.oldMSs, d) - - gotDeletions := 0 - for _, action := range fakeClient.Actions() { - if "delete" == action.GetVerb() { - gotDeletions++ - } - } - if gotDeletions != test.expectedDeletions { - t.Errorf("expect %v old machine sets been deleted, but got %v", test.expectedDeletions, gotDeletions) - } - }) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/BUILD.bazel deleted file mode 100644 index 354f95864f5..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/BUILD.bazel +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["util.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util", - importpath = "sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//vendor/k8s.io/client-go/util/integer:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["util_test.go"], - embed = [":go_default_library"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/names:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/util.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/util.go deleted file mode 100644 index ed080d294ec..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/util.go +++ /dev/null @@ -1,696 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "fmt" - "hash" - "hash/fnv" - "sort" - "strconv" - "strings" - - "github.com/davecgh/go-spew/spew" - "github.com/golang/glog" - - "k8s.io/api/core/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - intstrutil "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/client-go/util/integer" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -const ( - DefaultMachineDeploymentUniqueLabelKey = "machine-template-hash" - - // RevisionAnnotation is the revision annotation of a machine deployment's machine sets which records its rollout sequence - RevisionAnnotation = "machinedeployment.clusters.k8s.io/revision" - // RevisionHistoryAnnotation maintains the history of all old revisions that a machine set has served for a machine deployment. - RevisionHistoryAnnotation = "machinedeployment.clusters.k8s.io/revision-history" - // DesiredReplicasAnnotation is the desired replicas for a machine deployment recorded as an annotation - // in its machine sets. Helps in separating scaling events from the rollout process and for - // determining if the new machine set for a deployment is really saturated. - DesiredReplicasAnnotation = "machinedeployment.clusters.k8s.io/desired-replicas" - // MaxReplicasAnnotation is the maximum replicas a deployment can have at a given point, which - // is machinedeployment.spec.replicas + maxSurge. Used by the underlying machine sets to estimate their - // proportions in case the deployment has surge replicas. - MaxReplicasAnnotation = "machinedeployment.clusters.k8s.io/max-replicas" - - // FailedMSCreateReason is added in a machine deployment when it cannot create a new machine set. - FailedMSCreateReason = "MachineSetCreateError" - // FoundNewMSReason is added in a machine deployment when it adopts an existing machine set. - FoundNewMSReason = "FoundNewMachineSet" - // PausedDeployReason is added in a deployment when it is paused. Lack of progress shouldn't be - // estimated once a deployment is paused. - PausedDeployReason = "DeploymentPaused" - - // - // Available: - // - // MinimumReplicasAvailable is added in a deployment when it has its minimum replicas required available. - MinimumReplicasAvailable = "MinimumReplicasAvailable" - // MinimumReplicasUnavailable is added in a deployment when it doesn't have the minimum required replicas - // available. - MinimumReplicasUnavailable = "MinimumReplicasUnavailable" -) - -// MachineSetsByCreationTimestamp sorts a list of MachineSet by creation timestamp, using their names as a tie breaker. -type MachineSetsByCreationTimestamp []*v1alpha1.MachineSet - -func (o MachineSetsByCreationTimestamp) Len() int { return len(o) } -func (o MachineSetsByCreationTimestamp) Swap(i, j int) { o[i], o[j] = o[j], o[i] } -func (o MachineSetsByCreationTimestamp) Less(i, j int) bool { - if o[i].CreationTimestamp.Equal(&o[j].CreationTimestamp) { - return o[i].Name < o[j].Name - } - return o[i].CreationTimestamp.Before(&o[j].CreationTimestamp) -} - -// MachineSetsBySizeOlder sorts a list of MachineSet by size in descending order, using their creation timestamp or name as a tie breaker. -// By using the creation timestamp, this sorts from old to new machine sets. -type MachineSetsBySizeOlder []*v1alpha1.MachineSet - -func (o MachineSetsBySizeOlder) Len() int { return len(o) } -func (o MachineSetsBySizeOlder) Swap(i, j int) { o[i], o[j] = o[j], o[i] } -func (o MachineSetsBySizeOlder) Less(i, j int) bool { - if *(o[i].Spec.Replicas) == *(o[j].Spec.Replicas) { - return o[i].CreationTimestamp.Before(&o[j].CreationTimestamp) - } - return *(o[i].Spec.Replicas) > *(o[j].Spec.Replicas) -} - -// MachineSetsBySizeNewer sorts a list of MachineSet by size in descending order, using their creation timestamp or name as a tie breaker. -// By using the creation timestamp, this sorts from new to old machine sets. -type MachineSetsBySizeNewer []*v1alpha1.MachineSet - -func (o MachineSetsBySizeNewer) Len() int { return len(o) } -func (o MachineSetsBySizeNewer) Swap(i, j int) { o[i], o[j] = o[j], o[i] } -func (o MachineSetsBySizeNewer) Less(i, j int) bool { - if *(o[i].Spec.Replicas) == *(o[j].Spec.Replicas) { - return o[j].CreationTimestamp.Before(&o[i].CreationTimestamp) - } - return *(o[i].Spec.Replicas) > *(o[j].Spec.Replicas) -} - -// SetDeploymentRevision updates the revision for a deployment. -func SetDeploymentRevision(deployment *v1alpha1.MachineDeployment, revision string) bool { - updated := false - - if deployment.Annotations == nil { - deployment.Annotations = make(map[string]string) - } - if deployment.Annotations[RevisionAnnotation] != revision { - deployment.Annotations[RevisionAnnotation] = revision - updated = true - } - - return updated -} - -// MaxRevision finds the highest revision in the machine sets -func MaxRevision(allMSs []*v1alpha1.MachineSet) int64 { - max := int64(0) - for _, ms := range allMSs { - if v, err := Revision(ms); err != nil { - // Skip the machine sets when it failed to parse their revision information - glog.V(4).Infof("Error: %v. Couldn't parse revision for machine set %#v, deployment controller will skip it when reconciling revisions.", err, ms) - } else if v > max { - max = v - } - } - return max -} - -// Revision returns the revision number of the input object. -func Revision(obj runtime.Object) (int64, error) { - acc, err := meta.Accessor(obj) - if err != nil { - return 0, err - } - v, ok := acc.GetAnnotations()[RevisionAnnotation] - if !ok { - return 0, nil - } - return strconv.ParseInt(v, 10, 64) -} - -var annotationsToSkip = map[string]bool{ - v1.LastAppliedConfigAnnotation: true, - RevisionAnnotation: true, - RevisionHistoryAnnotation: true, - DesiredReplicasAnnotation: true, - MaxReplicasAnnotation: true, -} - -// skipCopyAnnotation returns true if we should skip copying the annotation with the given annotation key -// TODO: How to decide which annotations should / should not be copied? -// See https://github.com/kubernetes/kubernetes/pull/20035#issuecomment-179558615 -func skipCopyAnnotation(key string) bool { - return annotationsToSkip[key] -} - -// copyDeploymentAnnotationsToMachineSet copies deployment's annotations to machine set's annotations, -// and returns true if machine set's annotation is changed. -// Note that apply and revision annotations are not copied. -func copyDeploymentAnnotationsToMachineSet(deployment *v1alpha1.MachineDeployment, ms *v1alpha1.MachineSet) bool { - msAnnotationsChanged := false - if ms.Annotations == nil { - ms.Annotations = make(map[string]string) - } - for k, v := range deployment.Annotations { - // newMS revision is updated automatically in getNewMachineSet, and the deployment's revision number is then updated - // by copying its newMS revision number. We should not copy deployment's revision to its newMS, since the update of - // deployment revision number may fail (revision becomes stale) and the revision number in newMS is more reliable. - if skipCopyAnnotation(k) || ms.Annotations[k] == v { - continue - } - ms.Annotations[k] = v - msAnnotationsChanged = true - } - return msAnnotationsChanged -} - -// GetDesiredReplicasAnnotation returns the number of desired replicas -func GetDesiredReplicasAnnotation(ms *v1alpha1.MachineSet) (int32, bool) { - return getIntFromAnnotation(ms, DesiredReplicasAnnotation) -} - -func getMaxReplicasAnnotation(ms *v1alpha1.MachineSet) (int32, bool) { - return getIntFromAnnotation(ms, MaxReplicasAnnotation) -} - -func getIntFromAnnotation(ms *v1alpha1.MachineSet, annotationKey string) (int32, bool) { - annotationValue, ok := ms.Annotations[annotationKey] - if !ok { - return int32(0), false - } - intValue, err := strconv.Atoi(annotationValue) - if err != nil { - glog.V(2).Infof("Cannot convert the value %q with annotation key %q for the machine set %q", annotationValue, annotationKey, ms.Name) - return int32(0), false - } - return int32(intValue), true -} - -// SetNewMachineSetAnnotations sets new machine set's annotations appropriately by updating its revision and -// copying required deployment annotations to it; it returns true if machine set's annotation is changed. -func SetNewMachineSetAnnotations(deployment *v1alpha1.MachineDeployment, newMS *v1alpha1.MachineSet, newRevision string, exists bool) bool { - // First, copy deployment's annotations (except for apply and revision annotations) - annotationChanged := copyDeploymentAnnotationsToMachineSet(deployment, newMS) - // Then, update machine set's revision annotation - if newMS.Annotations == nil { - newMS.Annotations = make(map[string]string) - } - oldRevision, ok := newMS.Annotations[RevisionAnnotation] - // The newMS's revision should be the greatest among all MSes. Usually, its revision number is newRevision (the max revision number - // of all old MSes + 1). However, it's possible that some of the old MSes are deleted after the newMS revision being updated, and - // newRevision becomes smaller than newMS's revision. We should only update newMS revision when it's smaller than newRevision. - - oldRevisionInt, err := strconv.ParseInt(oldRevision, 10, 64) - if err != nil { - if oldRevision != "" { - glog.Warningf("Updating machine set revision OldRevision not int %s", err) - return false - } - //If the MS annotation is empty then initialise it to 0 - oldRevisionInt = 0 - } - newRevisionInt, err := strconv.ParseInt(newRevision, 10, 64) - if err != nil { - glog.Warningf("Updating machine set revision NewRevision not int %s", err) - return false - } - if oldRevisionInt < newRevisionInt { - newMS.Annotations[RevisionAnnotation] = newRevision - annotationChanged = true - glog.V(4).Infof("Updating machine set %q revision to %s", newMS.Name, newRevision) - } - // If a revision annotation already existed and this machine set was updated with a new revision - // then that means we are rolling back to this machine set. We need to preserve the old revisions - // for historical information. - if ok && annotationChanged { - revisionHistoryAnnotation := newMS.Annotations[RevisionHistoryAnnotation] - oldRevisions := strings.Split(revisionHistoryAnnotation, ",") - if len(oldRevisions[0]) == 0 { - newMS.Annotations[RevisionHistoryAnnotation] = oldRevision - } else { - oldRevisions = append(oldRevisions, oldRevision) - newMS.Annotations[RevisionHistoryAnnotation] = strings.Join(oldRevisions, ",") - } - } - // If the new machine set is about to be created, we need to add replica annotations to it. - if !exists && SetReplicasAnnotations(newMS, *(deployment.Spec.Replicas), *(deployment.Spec.Replicas)+MaxSurge(*deployment)) { - annotationChanged = true - } - return annotationChanged -} - -// FindOneActiveOrLatest returns the only active or the latest machine set in case there is at most one active -// machine set. If there are more than one active machine sets, return nil so machine sets can be scaled down -// to the point where there is only one active machine set. -func FindOneActiveOrLatest(newMS *v1alpha1.MachineSet, oldMSs []*v1alpha1.MachineSet) *v1alpha1.MachineSet { - if newMS == nil && len(oldMSs) == 0 { - return nil - } - - sort.Sort(sort.Reverse(MachineSetsByCreationTimestamp(oldMSs))) - allMSs := FilterActiveMachineSets(append(oldMSs, newMS)) - - switch len(allMSs) { - case 0: - // If there is no active machine set then we should return the newest. - if newMS != nil { - return newMS - } - return oldMSs[0] - case 1: - return allMSs[0] - default: - return nil - } -} - -// SetReplicasAnnotations sets the desiredReplicas and maxReplicas into the annotations -func SetReplicasAnnotations(ms *v1alpha1.MachineSet, desiredReplicas, maxReplicas int32) bool { - updated := false - if ms.Annotations == nil { - ms.Annotations = make(map[string]string) - } - desiredString := fmt.Sprintf("%d", desiredReplicas) - if hasString := ms.Annotations[DesiredReplicasAnnotation]; hasString != desiredString { - ms.Annotations[DesiredReplicasAnnotation] = desiredString - updated = true - } - maxString := fmt.Sprintf("%d", maxReplicas) - if hasString := ms.Annotations[MaxReplicasAnnotation]; hasString != maxString { - ms.Annotations[MaxReplicasAnnotation] = maxString - updated = true - } - return updated -} - -// AnnotationsNeedUpdate return true if ReplicasAnnotations need to be updated -func ReplicasAnnotationsNeedUpdate(ms *v1alpha1.MachineSet, desiredReplicas, maxReplicas int32) bool { - if ms.Annotations == nil { - return true - } - desiredString := fmt.Sprintf("%d", desiredReplicas) - if hasString := ms.Annotations[DesiredReplicasAnnotation]; hasString != desiredString { - return true - } - maxString := fmt.Sprintf("%d", maxReplicas) - if hasString := ms.Annotations[MaxReplicasAnnotation]; hasString != maxString { - return true - } - return false -} - -// MaxUnavailable returns the maximum unavailable machines a rolling deployment can take. -func MaxUnavailable(deployment v1alpha1.MachineDeployment) int32 { - if !IsRollingUpdate(&deployment) || *(deployment.Spec.Replicas) == 0 { - return int32(0) - } - // Error caught by validation - _, maxUnavailable, _ := ResolveFenceposts(deployment.Spec.Strategy.RollingUpdate.MaxSurge, deployment.Spec.Strategy.RollingUpdate.MaxUnavailable, *(deployment.Spec.Replicas)) - if maxUnavailable > *deployment.Spec.Replicas { - return *deployment.Spec.Replicas - } - return maxUnavailable -} - -// MaxSurge returns the maximum surge machines a rolling deployment can take. -func MaxSurge(deployment v1alpha1.MachineDeployment) int32 { - if !IsRollingUpdate(&deployment) { - return int32(0) - } - // Error caught by validation - maxSurge, _, _ := ResolveFenceposts(deployment.Spec.Strategy.RollingUpdate.MaxSurge, deployment.Spec.Strategy.RollingUpdate.MaxUnavailable, *(deployment.Spec.Replicas)) - return maxSurge -} - -// GetProportion will estimate the proportion for the provided machine set using 1. the current size -// of the parent deployment, 2. the replica count that needs be added on the machine sets of the -// deployment, and 3. the total replicas added in the machine sets of the deployment so far. -func GetProportion(ms *v1alpha1.MachineSet, d v1alpha1.MachineDeployment, deploymentReplicasToAdd, deploymentReplicasAdded int32) int32 { - if ms == nil || *(ms.Spec.Replicas) == 0 || deploymentReplicasToAdd == 0 || deploymentReplicasToAdd == deploymentReplicasAdded { - return int32(0) - } - - msFraction := getMachineSetFraction(*ms, d) - allowed := deploymentReplicasToAdd - deploymentReplicasAdded - - if deploymentReplicasToAdd > 0 { - // Use the minimum between the machine set fraction and the maximum allowed replicas - // when scaling up. This way we ensure we will not scale up more than the allowed - // replicas we can add. - return integer.Int32Min(msFraction, allowed) - } - // Use the maximum between the machine set fraction and the maximum allowed replicas - // when scaling down. This way we ensure we will not scale down more than the allowed - // replicas we can remove. - return integer.Int32Max(msFraction, allowed) -} - -// getMachineSetFraction estimates the fraction of replicas a machine set can have in -// 1. a scaling event during a rollout or 2. when scaling a paused deployment. -func getMachineSetFraction(ms v1alpha1.MachineSet, d v1alpha1.MachineDeployment) int32 { - // If we are scaling down to zero then the fraction of this machine set is its whole size (negative) - if *(d.Spec.Replicas) == int32(0) { - return -*(ms.Spec.Replicas) - } - - deploymentReplicas := *(d.Spec.Replicas) + MaxSurge(d) - annotatedReplicas, ok := getMaxReplicasAnnotation(&ms) - if !ok { - // If we cannot find the annotation then fallback to the current deployment size. Note that this - // will not be an accurate proportion estimation in case other machine sets have different values - // which means that the deployment was scaled at some point but we at least will stay in limits - // due to the min-max comparisons in getProportion. - annotatedReplicas = d.Status.Replicas - } - - // We should never proportionally scale up from zero which means ms.spec.replicas and annotatedReplicas - // will never be zero here. - newMSsize := (float64(*(ms.Spec.Replicas) * deploymentReplicas)) / float64(annotatedReplicas) - return integer.RoundToInt32(newMSsize) - *(ms.Spec.Replicas) -} - -// EqualIgnoreHash returns true if two given machineTemplateSpec are equal, ignoring the diff in value of Labels[machine-template-hash] -// We ignore machine-template-hash because: -// 1. The hash result would be different upon machineTemplateSpec API changes -// (e.g. the addition of a new field will cause the hash code to change) -// 2. The deployment template won't have hash labels -func EqualIgnoreHash(template1, template2 *v1alpha1.MachineTemplateSpec) bool { - t1Copy := template1.DeepCopy() - t2Copy := template2.DeepCopy() - // Remove hash labels from template.Labels before comparing - delete(t1Copy.Labels, DefaultMachineDeploymentUniqueLabelKey) - delete(t2Copy.Labels, DefaultMachineDeploymentUniqueLabelKey) - return apiequality.Semantic.DeepEqual(t1Copy, t2Copy) -} - -// FindNewMachineSet returns the new MS this given deployment targets (the one with the same machine template). -func FindNewMachineSet(deployment *v1alpha1.MachineDeployment, msList []*v1alpha1.MachineSet) *v1alpha1.MachineSet { - sort.Sort(MachineSetsByCreationTimestamp(msList)) - for i := range msList { - if EqualIgnoreHash(&msList[i].Spec.Template, &deployment.Spec.Template) { - // In rare cases, such as after cluster upgrades, Deployment may end up with - // having more than one new MachineSets that have the same template, - // see https://github.com/kubernetes/kubernetes/issues/40415 - // We deterministically choose the oldest new MachineSet with matching template hash. - return msList[i] - } - } - // new MachineSet does not exist. - return nil -} - -// FindOldMachineSets returns the old machine sets targeted by the given Deployment, with the given slice of MSes. -// Returns two list of machine sets -// - the first contains all old machine sets with all non-zero replicas -// - the second contains all old machine sets -func FindOldMachineSets(deployment *v1alpha1.MachineDeployment, msList []*v1alpha1.MachineSet) ([]*v1alpha1.MachineSet, []*v1alpha1.MachineSet) { - var requiredMSs []*v1alpha1.MachineSet - var allMSs []*v1alpha1.MachineSet - newMS := FindNewMachineSet(deployment, msList) - for _, ms := range msList { - // Filter out new machine set - if newMS != nil && ms.UID == newMS.UID { - continue - } - allMSs = append(allMSs, ms) - if *(ms.Spec.Replicas) != 0 { - requiredMSs = append(requiredMSs, ms) - } - } - return requiredMSs, allMSs -} - -// GetReplicaCountForMachineSets returns the sum of Replicas of the given machine sets. -func GetReplicaCountForMachineSets(machineSets []*v1alpha1.MachineSet) int32 { - totalReplicas := int32(0) - for _, ms := range machineSets { - if ms != nil { - totalReplicas += *(ms.Spec.Replicas) - } - } - return totalReplicas -} - -// GetActualReplicaCountForMachineSets returns the sum of actual replicas of the given machine sets. -func GetActualReplicaCountForMachineSets(machineSets []*v1alpha1.MachineSet) int32 { - totalActualReplicas := int32(0) - for _, ms := range machineSets { - if ms != nil { - totalActualReplicas += ms.Status.Replicas - } - } - return totalActualReplicas -} - -// GetReadyReplicaCountForMachineSets returns the number of ready machines corresponding to the given machine sets. -func GetReadyReplicaCountForMachineSets(machineSets []*v1alpha1.MachineSet) int32 { - totalReadyReplicas := int32(0) - for _, ms := range machineSets { - if ms != nil { - totalReadyReplicas += ms.Status.ReadyReplicas - } - } - return totalReadyReplicas -} - -// GetAvailableReplicaCountForMachineSets returns the number of available machines corresponding to the given machine sets. -func GetAvailableReplicaCountForMachineSets(machineSets []*v1alpha1.MachineSet) int32 { - totalAvailableReplicas := int32(0) - for _, ms := range machineSets { - if ms != nil { - totalAvailableReplicas += ms.Status.AvailableReplicas - } - } - return totalAvailableReplicas -} - -// IsRollingUpdate returns true if the strategy type is a rolling update. -func IsRollingUpdate(deployment *v1alpha1.MachineDeployment) bool { - return deployment.Spec.Strategy.Type == common.RollingUpdateMachineDeploymentStrategyType -} - -// DeploymentComplete considers a deployment to be complete once all of its desired replicas -// are updated and available, and no old machines are running. -func DeploymentComplete(deployment *v1alpha1.MachineDeployment, newStatus *v1alpha1.MachineDeploymentStatus) bool { - return newStatus.UpdatedReplicas == *(deployment.Spec.Replicas) && - newStatus.Replicas == *(deployment.Spec.Replicas) && - newStatus.AvailableReplicas == *(deployment.Spec.Replicas) && - newStatus.ObservedGeneration >= deployment.Generation -} - -// NewMSNewReplicas calculates the number of replicas a deployment's new MS should have. -// When one of the followings is true, we're rolling out the deployment; otherwise, we're scaling it. -// 1) The new MS is saturated: newMS's replicas == deployment's replicas -// 2) Max number of machines allowed is reached: deployment's replicas + maxSurge == all MSs' replicas -func NewMSNewReplicas(deployment *v1alpha1.MachineDeployment, allMSs []*v1alpha1.MachineSet, newMS *v1alpha1.MachineSet) (int32, error) { - switch deployment.Spec.Strategy.Type { - case common.RollingUpdateMachineDeploymentStrategyType: - // Check if we can scale up. - maxSurge, err := intstrutil.GetValueFromIntOrPercent(deployment.Spec.Strategy.RollingUpdate.MaxSurge, int(*(deployment.Spec.Replicas)), true) - if err != nil { - return 0, err - } - // Find the total number of machines - currentMachineCount := GetReplicaCountForMachineSets(allMSs) - maxTotalMachines := *(deployment.Spec.Replicas) + int32(maxSurge) - if currentMachineCount >= maxTotalMachines { - // Cannot scale up. - return *(newMS.Spec.Replicas), nil - } - // Scale up. - scaleUpCount := maxTotalMachines - currentMachineCount - // Do not exceed the number of desired replicas. - scaleUpCount = int32(integer.Int32Min(scaleUpCount, *(deployment.Spec.Replicas)-*(newMS.Spec.Replicas))) - return *(newMS.Spec.Replicas) + scaleUpCount, nil - default: - // Check if we can scale up. - maxSurge, err := intstrutil.GetValueFromIntOrPercent(deployment.Spec.Strategy.RollingUpdate.MaxSurge, int(*(deployment.Spec.Replicas)), true) - if err != nil { - return 0, err - } - // Find the total number of machines - currentMachineCount := GetReplicaCountForMachineSets(allMSs) - maxTotalMachines := *(deployment.Spec.Replicas) + int32(maxSurge) - if currentMachineCount >= maxTotalMachines { - // Cannot scale up. - return *(newMS.Spec.Replicas), nil - } - // Scale up. - scaleUpCount := maxTotalMachines - currentMachineCount - // Do not exceed the number of desired replicas. - scaleUpCount = int32(integer.Int32Min(scaleUpCount, *(deployment.Spec.Replicas)-*(newMS.Spec.Replicas))) - return *(newMS.Spec.Replicas) + scaleUpCount, nil - // -- return 0, fmt.Errorf("deployment type %v isn't supported", deployment.Spec.Strategy.Type) - } -} - -// IsSaturated checks if the new machine set is saturated by comparing its size with its deployment size. -// Both the deployment and the machine set have to believe this machine set can own all of the desired -// replicas in the deployment and the annotation helps in achieving that. All machines of the MachineSet -// need to be available. -func IsSaturated(deployment *v1alpha1.MachineDeployment, ms *v1alpha1.MachineSet) bool { - if ms == nil { - return false - } - desiredString := ms.Annotations[DesiredReplicasAnnotation] - desired, err := strconv.Atoi(desiredString) - if err != nil { - return false - } - return *(ms.Spec.Replicas) == *(deployment.Spec.Replicas) && - int32(desired) == *(deployment.Spec.Replicas) && - ms.Status.AvailableReplicas == *(deployment.Spec.Replicas) -} - -// ResolveFenceposts resolves both maxSurge and maxUnavailable. This needs to happen in one -// step. For example: -// -// 2 desired, max unavailable 1%, surge 0% - should scale old(-1), then new(+1), then old(-1), then new(+1) -// 1 desired, max unavailable 1%, surge 0% - should scale old(-1), then new(+1) -// 2 desired, max unavailable 25%, surge 1% - should scale new(+1), then old(-1), then new(+1), then old(-1) -// 1 desired, max unavailable 25%, surge 1% - should scale new(+1), then old(-1) -// 2 desired, max unavailable 0%, surge 1% - should scale new(+1), then old(-1), then new(+1), then old(-1) -// 1 desired, max unavailable 0%, surge 1% - should scale new(+1), then old(-1) -func ResolveFenceposts(maxSurge, maxUnavailable *intstrutil.IntOrString, desired int32) (int32, int32, error) { - surge, err := intstrutil.GetValueFromIntOrPercent(maxSurge, int(desired), true) - if err != nil { - return 0, 0, err - } - unavailable, err := intstrutil.GetValueFromIntOrPercent(maxUnavailable, int(desired), false) - if err != nil { - return 0, 0, err - } - - if surge == 0 && unavailable == 0 { - // Validation should never allow the user to explicitly use zero values for both maxSurge - // maxUnavailable. Due to rounding down maxUnavailable though, it may resolve to zero. - // If both fenceposts resolve to zero, then we should set maxUnavailable to 1 on the - // theory that surge might not work due to quota. - unavailable = 1 - } - - return int32(surge), int32(unavailable), nil -} - -// FilterActiveMachineSets returns machine sets that have (or at least ought to have) machines. -func FilterActiveMachineSets(machineSets []*v1alpha1.MachineSet) []*v1alpha1.MachineSet { - activeFilter := func(ms *v1alpha1.MachineSet) bool { - return ms != nil && ms.Spec.Replicas != nil && *(ms.Spec.Replicas) > 0 - } - return FilterMachineSets(machineSets, activeFilter) -} - -type filterMS func(ms *v1alpha1.MachineSet) bool - -// FilterMachineSets returns machine sets that are filtered by filterFn (all returned ones should match filterFn). -func FilterMachineSets(MSes []*v1alpha1.MachineSet, filterFn filterMS) []*v1alpha1.MachineSet { - var filtered []*v1alpha1.MachineSet - for i := range MSes { - if filterFn(MSes[i]) { - filtered = append(filtered, MSes[i]) - } - } - return filtered -} - -// Clones the given map and returns a new map with the given key and value added. -// Returns the given map, if labelKey is empty. -func CloneAndAddLabel(labels map[string]string, labelKey, labelValue string) map[string]string { - if labelKey == "" { - // Don't need to add a label. - return labels - } - // Clone. - newLabels := map[string]string{} - for key, value := range labels { - newLabels[key] = value - } - newLabels[labelKey] = labelValue - return newLabels -} - -// Clones the given selector and returns a new selector with the given key and value added. -// Returns the given selector, if labelKey is empty. -func CloneSelectorAndAddLabel(selector *metav1.LabelSelector, labelKey, labelValue string) *metav1.LabelSelector { - if labelKey == "" { - // Don't need to add a label. - return selector - } - - // Clone. - newSelector := new(metav1.LabelSelector) - - // TODO(madhusudancs): Check if you can use deepCopy_extensions_LabelSelector here. - newSelector.MatchLabels = make(map[string]string) - if selector.MatchLabels != nil { - for key, val := range selector.MatchLabels { - newSelector.MatchLabels[key] = val - } - } - newSelector.MatchLabels[labelKey] = labelValue - - if selector.MatchExpressions != nil { - newMExps := make([]metav1.LabelSelectorRequirement, len(selector.MatchExpressions)) - for i, me := range selector.MatchExpressions { - newMExps[i].Key = me.Key - newMExps[i].Operator = me.Operator - if me.Values != nil { - newMExps[i].Values = make([]string, len(me.Values)) - copy(newMExps[i].Values, me.Values) - } else { - newMExps[i].Values = nil - } - } - newSelector.MatchExpressions = newMExps - } else { - newSelector.MatchExpressions = nil - } - - return newSelector -} - -// DeepHashObject writes specified object to hash using the spew library -// which follows pointers and prints actual values of the nested objects -// ensuring the hash does not change when a pointer changes. -func DeepHashObject(hasher hash.Hash, objectToWrite interface{}) { - hasher.Reset() - printer := spew.ConfigState{ - Indent: " ", - SortKeys: true, - DisableMethods: true, - SpewKeys: true, - } - printer.Fprintf(hasher, "%#v", objectToWrite) -} - -func ComputeHash(template *v1alpha1.MachineTemplateSpec) uint32 { - machineTemplateSpecHasher := fnv.New32a() - DeepHashObject(machineTemplateSpecHasher, *template) - - return machineTemplateSpecHasher.Sum32() -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/util_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/util_test.go deleted file mode 100644 index d68d76478a9..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/util/util_test.go +++ /dev/null @@ -1,841 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "fmt" - "math/rand" - "reflect" - "sort" - "strconv" - "testing" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apiserver/pkg/storage/names" - core "k8s.io/client-go/testing" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake" -) - -func addListMSReactor(fakeClient *fake.Clientset, obj runtime.Object) *fake.Clientset { - fakeClient.AddReactor("list", "machinesets", func(action core.Action) (handled bool, ret runtime.Object, err error) { - return true, obj, nil - }) - return fakeClient -} - -func addListMachinesReactor(fakeClient *fake.Clientset, obj runtime.Object) *fake.Clientset { - fakeClient.AddReactor("list", "machines", func(action core.Action) (handled bool, ret runtime.Object, err error) { - return true, obj, nil - }) - return fakeClient -} - -func addGetMSReactor(fakeClient *fake.Clientset, obj runtime.Object) *fake.Clientset { - msList, ok := obj.(*v1alpha1.MachineSetList) - fakeClient.AddReactor("get", "machinesets", func(action core.Action) (handled bool, ret runtime.Object, err error) { - name := action.(core.GetAction).GetName() - if ok { - for _, ms := range msList.Items { - if ms.Name == name { - return true, &ms, nil - } - } - } - return false, nil, fmt.Errorf("could not find the requested machine set: %s", name) - - }) - return fakeClient -} - -func addUpdateMSReactor(fakeClient *fake.Clientset) *fake.Clientset { - fakeClient.AddReactor("update", "machinesets", func(action core.Action) (handled bool, ret runtime.Object, err error) { - obj := action.(core.UpdateAction).GetObject().(*v1alpha1.MachineSet) - return true, obj, nil - }) - return fakeClient -} - -func addUpdateMachinesReactor(fakeClient *fake.Clientset) *fake.Clientset { - fakeClient.AddReactor("update", "machines", func(action core.Action) (handled bool, ret runtime.Object, err error) { - obj := action.(core.UpdateAction).GetObject().(*v1alpha1.Machine) - return true, obj, nil - }) - return fakeClient -} - -func generateMSWithLabel(labels map[string]string, image string) v1alpha1.MachineSet { - return v1alpha1.MachineSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: names.SimpleNameGenerator.GenerateName("machineset"), - Labels: labels, - }, - Spec: v1alpha1.MachineSetSpec{ - Replicas: func(i int32) *int32 { return &i }(1), - Selector: metav1.LabelSelector{MatchLabels: labels}, - Template: v1alpha1.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - }, - Spec: v1alpha1.MachineSpec{}, - }, - }, - } -} - -func newDControllerRef(d *v1alpha1.MachineDeployment) *metav1.OwnerReference { - isController := true - return &metav1.OwnerReference{ - APIVersion: "clusters/v1alpha", - Kind: "MachineDeployment", - Name: d.GetName(), - UID: d.GetUID(), - Controller: &isController, - } -} - -// generateMS creates a machine set, with the input deployment's template as its template -func generateMS(deployment v1alpha1.MachineDeployment) v1alpha1.MachineSet { - template := deployment.Spec.Template.DeepCopy() - return v1alpha1.MachineSet{ - ObjectMeta: metav1.ObjectMeta{ - UID: randomUID(), - Name: names.SimpleNameGenerator.GenerateName("machineset"), - Labels: template.Labels, - OwnerReferences: []metav1.OwnerReference{*newDControllerRef(&deployment)}, - }, - Spec: v1alpha1.MachineSetSpec{ - Replicas: new(int32), - Template: *template, - Selector: metav1.LabelSelector{MatchLabels: template.Labels}, - }, - } -} - -func randomUID() types.UID { - return types.UID(strconv.FormatInt(rand.Int63(), 10)) -} - -// generateDeployment creates a deployment, with the input image as its template -func generateDeployment(image string) v1alpha1.MachineDeployment { - machineLabels := map[string]string{"name": image} - return v1alpha1.MachineDeployment{ - ObjectMeta: metav1.ObjectMeta{ - Name: image, - Annotations: make(map[string]string), - }, - Spec: v1alpha1.MachineDeploymentSpec{ - Replicas: func(i int32) *int32 { return &i }(1), - Selector: metav1.LabelSelector{MatchLabels: machineLabels}, - Template: v1alpha1.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: machineLabels, - }, - Spec: v1alpha1.MachineSpec{}, - }, - }, - } -} - -func generateMachineTemplateSpec(name, nodeName string, annotations, labels map[string]string) v1alpha1.MachineTemplateSpec { - return v1alpha1.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Annotations: annotations, - Labels: labels, - }, - Spec: v1alpha1.MachineSpec{}, - } -} - -func TestEqualIgnoreHash(t *testing.T) { - tests := []struct { - Name string - former, latter v1alpha1.MachineTemplateSpec - expected bool - }{ - { - "Same spec, same labels", - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-1", "something": "else"}), - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-1", "something": "else"}), - true, - }, - { - "Same spec, only machine-template-hash label value is different", - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-1", "something": "else"}), - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-2", "something": "else"}), - true, - }, - { - "Same spec, the former doesn't have machine-template-hash label", - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{"something": "else"}), - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-2", "something": "else"}), - true, - }, - { - "Same spec, the label is different, the former doesn't have machine-template-hash label, same number of labels", - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{"something": "else"}), - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-2"}), - false, - }, - { - "Same spec, the label is different, the latter doesn't have machine-template-hash label, same number of labels", - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-1"}), - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{"something": "else"}), - false, - }, - { - "Same spec, the label is different, and the machine-template-hash label value is the same", - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-1"}), - generateMachineTemplateSpec("foo", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-1", "something": "else"}), - false, - }, - { - "Different spec, same labels", - generateMachineTemplateSpec("foo", "foo-node", map[string]string{"former": "value"}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-1", "something": "else"}), - generateMachineTemplateSpec("foo", "foo-node", map[string]string{"latter": "value"}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-1", "something": "else"}), - false, - }, - { - "Different spec, different machine-template-hash label value", - generateMachineTemplateSpec("foo-1", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-1", "something": "else"}), - generateMachineTemplateSpec("foo-2", "foo-node", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-2", "something": "else"}), - false, - }, - { - "Different spec, the former doesn't have machine-template-hash label", - generateMachineTemplateSpec("foo-1", "foo-node-1", map[string]string{}, map[string]string{"something": "else"}), - generateMachineTemplateSpec("foo-2", "foo-node-2", map[string]string{}, map[string]string{DefaultMachineDeploymentUniqueLabelKey: "value-2", "something": "else"}), - false, - }, - { - "Different spec, different labels", - generateMachineTemplateSpec("foo", "foo-node-1", map[string]string{}, map[string]string{"something": "else"}), - generateMachineTemplateSpec("foo", "foo-node-2", map[string]string{}, map[string]string{"nothing": "else"}), - false, - }, - } - - for _, test := range tests { - t.Run(test.Name, func(t *testing.T) { - runTest := func(t1, t2 *v1alpha1.MachineTemplateSpec, reversed bool) { - reverseString := "" - if reversed { - reverseString = " (reverse order)" - } - // Run - equal := EqualIgnoreHash(t1, t2) - if equal != test.expected { - t.Errorf("%q%s: expected %v", test.Name, reverseString, test.expected) - return - } - if t1.Labels == nil || t2.Labels == nil { - t.Errorf("%q%s: unexpected labels becomes nil", test.Name, reverseString) - } - } - - runTest(&test.former, &test.latter, false) - // Test the same case in reverse order - runTest(&test.latter, &test.former, true) - }) - } -} - -func TestFindNewMachineSet(t *testing.T) { - now := metav1.Now() - later := metav1.Time{Time: now.Add(time.Minute)} - - deployment := generateDeployment("nginx") - newMS := generateMS(deployment) - newMS.Labels[DefaultMachineDeploymentUniqueLabelKey] = "hash" - newMS.CreationTimestamp = later - - newMSDup := generateMS(deployment) - newMSDup.Labels[DefaultMachineDeploymentUniqueLabelKey] = "different-hash" - newMSDup.CreationTimestamp = now - - oldDeployment := generateDeployment("nginx") - oldDeployment.Spec.Template.Spec.Name = "nginx-old-1" - oldMS := generateMS(oldDeployment) - oldMS.Status.FullyLabeledReplicas = *(oldMS.Spec.Replicas) - - tests := []struct { - Name string - deployment v1alpha1.MachineDeployment - msList []*v1alpha1.MachineSet - expected *v1alpha1.MachineSet - }{ - { - Name: "Get new MachineSet with the same template as Deployment spec but different machine-template-hash value", - deployment: deployment, - msList: []*v1alpha1.MachineSet{&newMS, &oldMS}, - expected: &newMS, - }, - { - Name: "Get the oldest new MachineSet when there are more than one MachineSet with the same template", - deployment: deployment, - msList: []*v1alpha1.MachineSet{&newMS, &oldMS, &newMSDup}, - expected: &newMSDup, - }, - { - Name: "Get nil new MachineSet", - deployment: deployment, - msList: []*v1alpha1.MachineSet{&oldMS}, - expected: nil, - }, - } - - for _, test := range tests { - t.Run(test.Name, func(t *testing.T) { - if ms := FindNewMachineSet(&test.deployment, test.msList); !reflect.DeepEqual(ms, test.expected) { - t.Errorf("In test case %q, expected %#v, got %#v", test.Name, test.expected, ms) - } - }) - } -} - -func TestFindOldMachineSets(t *testing.T) { - now := metav1.Now() - later := metav1.Time{Time: now.Add(time.Minute)} - before := metav1.Time{Time: now.Add(-time.Minute)} - - deployment := generateDeployment("nginx") - newMS := generateMS(deployment) - *(newMS.Spec.Replicas) = 1 - newMS.Labels[DefaultMachineDeploymentUniqueLabelKey] = "hash" - newMS.CreationTimestamp = later - - newMSDup := generateMS(deployment) - newMSDup.Labels[DefaultMachineDeploymentUniqueLabelKey] = "different-hash" - newMSDup.CreationTimestamp = now - - oldDeployment := generateDeployment("nginx") - oldDeployment.Spec.Template.Spec.Name = "nginx-old-1" - oldMS := generateMS(oldDeployment) - oldMS.Status.FullyLabeledReplicas = *(oldMS.Spec.Replicas) - oldMS.CreationTimestamp = before - - tests := []struct { - Name string - deployment v1alpha1.MachineDeployment - msList []*v1alpha1.MachineSet - machineList *v1alpha1.MachineList - expected []*v1alpha1.MachineSet - expectedRequire []*v1alpha1.MachineSet - }{ - { - Name: "Get old MachineSets", - deployment: deployment, - msList: []*v1alpha1.MachineSet{&newMS, &oldMS}, - expected: []*v1alpha1.MachineSet{&oldMS}, - expectedRequire: nil, - }, - { - Name: "Get old MachineSets with no new MachineSet", - deployment: deployment, - msList: []*v1alpha1.MachineSet{&oldMS}, - expected: []*v1alpha1.MachineSet{&oldMS}, - expectedRequire: nil, - }, - { - Name: "Get old MachineSets with two new MachineSets, only the oldest new MachineSet is seen as new MachineSet", - deployment: deployment, - msList: []*v1alpha1.MachineSet{&oldMS, &newMS, &newMSDup}, - expected: []*v1alpha1.MachineSet{&oldMS, &newMS}, - expectedRequire: []*v1alpha1.MachineSet{&newMS}, - }, - { - Name: "Get empty old MachineSets", - deployment: deployment, - msList: []*v1alpha1.MachineSet{&newMS}, - expected: nil, - expectedRequire: nil, - }, - } - - for _, test := range tests { - t.Run(test.Name, func(t *testing.T) { - requireMS, allMS := FindOldMachineSets(&test.deployment, test.msList) - sort.Sort(MachineSetsByCreationTimestamp(allMS)) - sort.Sort(MachineSetsByCreationTimestamp(test.expected)) - if !reflect.DeepEqual(allMS, test.expected) { - t.Errorf("In test case %q, expected %#v, got %#v", test.Name, test.expected, allMS) - } - // MSs are getting filtered correctly by ms.spec.replicas - if !reflect.DeepEqual(requireMS, test.expectedRequire) { - t.Errorf("In test case %q, expected %#v, got %#v", test.Name, test.expectedRequire, requireMS) - } - }) - } -} - -// equal compares the equality of two MachineSet slices regardless of their ordering -func equal(mss1, mss2 []*v1alpha1.MachineSet) bool { - if reflect.DeepEqual(mss1, mss2) { - return true - } - if mss1 == nil || mss2 == nil || len(mss1) != len(mss2) { - return false - } - count := 0 - for _, ms1 := range mss1 { - for _, ms2 := range mss2 { - if reflect.DeepEqual(ms1, ms2) { - count++ - break - } - } - } - return count == len(mss1) -} - -func TestGetReplicaCountForMachineSets(t *testing.T) { - ms1 := generateMS(generateDeployment("foo")) - *(ms1.Spec.Replicas) = 1 - ms1.Status.Replicas = 2 - ms2 := generateMS(generateDeployment("bar")) - *(ms2.Spec.Replicas) = 2 - ms2.Status.Replicas = 3 - - tests := []struct { - Name string - sets []*v1alpha1.MachineSet - expectedCount int32 - expectedActual int32 - }{ - { - "1:2 Replicas", - []*v1alpha1.MachineSet{&ms1}, - 1, - 2, - }, - { - "3:5 Replicas", - []*v1alpha1.MachineSet{&ms1, &ms2}, - 3, - 5, - }, - } - - for _, test := range tests { - t.Run(test.Name, func(t *testing.T) { - ms := GetReplicaCountForMachineSets(test.sets) - if ms != test.expectedCount { - t.Errorf("In test case %s, expectedCount %+v, got %+v", test.Name, test.expectedCount, ms) - } - ms = GetActualReplicaCountForMachineSets(test.sets) - if ms != test.expectedActual { - t.Errorf("In test case %s, expectedActual %+v, got %+v", test.Name, test.expectedActual, ms) - } - }) - } -} - -func TestResolveFenceposts(t *testing.T) { - tests := []struct { - maxSurge string - maxUnavailable string - desired int32 - expectSurge int32 - expectUnavailable int32 - expectError bool - }{ - { - maxSurge: "0%", - maxUnavailable: "0%", - desired: 0, - expectSurge: 0, - expectUnavailable: 1, - expectError: false, - }, - { - maxSurge: "39%", - maxUnavailable: "39%", - desired: 10, - expectSurge: 4, - expectUnavailable: 3, - expectError: false, - }, - { - maxSurge: "oops", - maxUnavailable: "39%", - desired: 10, - expectSurge: 0, - expectUnavailable: 0, - expectError: true, - }, - { - maxSurge: "55%", - maxUnavailable: "urg", - desired: 10, - expectSurge: 0, - expectUnavailable: 0, - expectError: true, - }, - } - - for num, test := range tests { - t.Run("maxSurge="+test.maxSurge, func(t *testing.T) { - maxSurge := intstr.FromString(test.maxSurge) - maxUnavail := intstr.FromString(test.maxUnavailable) - surge, unavail, err := ResolveFenceposts(&maxSurge, &maxUnavail, test.desired) - if err != nil && !test.expectError { - t.Errorf("unexpected error %v", err) - } - if err == nil && test.expectError { - t.Error("expected error") - } - if surge != test.expectSurge || unavail != test.expectUnavailable { - t.Errorf("#%v got %v:%v, want %v:%v", num, surge, unavail, test.expectSurge, test.expectUnavailable) - } - }) - } -} - -func TestNewMSNewReplicas(t *testing.T) { - tests := []struct { - Name string - strategyType common.MachineDeploymentStrategyType - depReplicas int32 - newMSReplicas int32 - maxSurge int - expected int32 - }{ - { - "can not scale up - to newMSReplicas", - common.RollingUpdateMachineDeploymentStrategyType, - 1, 5, 1, 5, - }, - { - "scale up - to depReplicas", - common.RollingUpdateMachineDeploymentStrategyType, - 6, 2, 10, 6, - }, - } - newDeployment := generateDeployment("nginx") - newRC := generateMS(newDeployment) - rs5 := generateMS(newDeployment) - *(rs5.Spec.Replicas) = 5 - - for _, test := range tests { - t.Run(test.Name, func(t *testing.T) { - *(newDeployment.Spec.Replicas) = test.depReplicas - newDeployment.Spec.Strategy = v1alpha1.MachineDeploymentStrategy{Type: test.strategyType} - newDeployment.Spec.Strategy.RollingUpdate = &v1alpha1.MachineRollingUpdateDeployment{ - MaxUnavailable: func(i int) *intstr.IntOrString { - x := intstr.FromInt(i) - return &x - }(1), - MaxSurge: func(i int) *intstr.IntOrString { - x := intstr.FromInt(i) - return &x - }(test.maxSurge), - } - *(newRC.Spec.Replicas) = test.newMSReplicas - ms, err := NewMSNewReplicas(&newDeployment, []*v1alpha1.MachineSet{&rs5}, &newRC) - if err != nil { - t.Errorf("In test case %s, got unexpected error %v", test.Name, err) - } - if ms != test.expected { - t.Errorf("In test case %s, expected %+v, got %+v", test.Name, test.expected, ms) - } - }) - } -} - -func TestDeploymentComplete(t *testing.T) { - deployment := func(desired, current, updated, available, maxUnavailable, maxSurge int32) *v1alpha1.MachineDeployment { - return &v1alpha1.MachineDeployment{ - Spec: v1alpha1.MachineDeploymentSpec{ - Replicas: &desired, - Strategy: v1alpha1.MachineDeploymentStrategy{ - RollingUpdate: &v1alpha1.MachineRollingUpdateDeployment{ - MaxUnavailable: func(i int) *intstr.IntOrString { x := intstr.FromInt(i); return &x }(int(maxUnavailable)), - MaxSurge: func(i int) *intstr.IntOrString { x := intstr.FromInt(i); return &x }(int(maxSurge)), - }, - Type: common.RollingUpdateMachineDeploymentStrategyType, - }, - }, - Status: v1alpha1.MachineDeploymentStatus{ - Replicas: current, - UpdatedReplicas: updated, - AvailableReplicas: available, - }, - } - } - - tests := []struct { - name string - - d *v1alpha1.MachineDeployment - - expected bool - }{ - { - name: "not complete: min but not all machines become available", - - d: deployment(5, 5, 5, 4, 1, 0), - expected: false, - }, - { - name: "not complete: min availability is not honored", - - d: deployment(5, 5, 5, 3, 1, 0), - expected: false, - }, - { - name: "complete", - - d: deployment(5, 5, 5, 5, 0, 0), - expected: true, - }, - { - name: "not complete: all machines are available but not updated", - - d: deployment(5, 5, 4, 5, 0, 0), - expected: false, - }, - { - name: "not complete: still running old machines", - - // old machine set: spec.replicas=1, status.replicas=1, status.availableReplicas=1 - // new machine set: spec.replicas=1, status.replicas=1, status.availableReplicas=0 - d: deployment(1, 2, 1, 1, 0, 1), - expected: false, - }, - { - name: "not complete: one replica deployment never comes up", - - d: deployment(1, 1, 1, 0, 1, 1), - expected: false, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - if got, exp := DeploymentComplete(test.d, &test.d.Status), test.expected; got != exp { - t.Errorf("expected complete: %t, got: %t", exp, got) - } - }) - } -} - -func TestMaxUnavailable(t *testing.T) { - deployment := func(replicas int32, maxUnavailable intstr.IntOrString) v1alpha1.MachineDeployment { - return v1alpha1.MachineDeployment{ - Spec: v1alpha1.MachineDeploymentSpec{ - Replicas: func(i int32) *int32 { return &i }(replicas), - Strategy: v1alpha1.MachineDeploymentStrategy{ - RollingUpdate: &v1alpha1.MachineRollingUpdateDeployment{ - MaxSurge: func(i int) *intstr.IntOrString { x := intstr.FromInt(i); return &x }(int(1)), - MaxUnavailable: &maxUnavailable, - }, - Type: common.RollingUpdateMachineDeploymentStrategyType, - }, - }, - } - } - tests := []struct { - name string - deployment v1alpha1.MachineDeployment - expected int32 - }{ - { - name: "maxUnavailable less than replicas", - deployment: deployment(10, intstr.FromInt(5)), - expected: int32(5), - }, - { - name: "maxUnavailable equal replicas", - deployment: deployment(10, intstr.FromInt(10)), - expected: int32(10), - }, - { - name: "maxUnavailable greater than replicas", - deployment: deployment(5, intstr.FromInt(10)), - expected: int32(5), - }, - { - name: "maxUnavailable with replicas is 0", - deployment: deployment(0, intstr.FromInt(10)), - expected: int32(0), - }, - { - name: "maxUnavailable less than replicas with percents", - deployment: deployment(10, intstr.FromString("50%")), - expected: int32(5), - }, - { - name: "maxUnavailable equal replicas with percents", - deployment: deployment(10, intstr.FromString("100%")), - expected: int32(10), - }, - { - name: "maxUnavailable greater than replicas with percents", - deployment: deployment(5, intstr.FromString("100%")), - expected: int32(5), - }, - } - - for _, test := range tests { - t.Log(test.name) - t.Run(test.name, func(t *testing.T) { - maxUnavailable := MaxUnavailable(test.deployment) - if test.expected != maxUnavailable { - t.Fatalf("expected:%v, got:%v", test.expected, maxUnavailable) - } - }) - } -} - -//Set of simple tests for annotation related util functions -func TestAnnotationUtils(t *testing.T) { - - //Setup - tDeployment := generateDeployment("nginx") - tMS := generateMS(tDeployment) - tDeployment.Annotations[RevisionAnnotation] = "1" - - //Test Case 1: Check if anotations are copied properly from deployment to MS - t.Run("SetNewMachineSetAnnotations", func(t *testing.T) { - //Try to set the increment revision from 1 through 20 - for i := 0; i < 20; i++ { - - nextRevision := fmt.Sprintf("%d", i+1) - SetNewMachineSetAnnotations(&tDeployment, &tMS, nextRevision, true) - //Now the MachineSets Revision Annotation should be i+1 - - if tMS.Annotations[RevisionAnnotation] != nextRevision { - t.Errorf("Revision Expected=%s Obtained=%s", nextRevision, tMS.Annotations[RevisionAnnotation]) - } - } - }) - - //Test Case 2: Check if annotations are set properly - t.Run("SetReplicasAnnotations", func(t *testing.T) { - updated := SetReplicasAnnotations(&tMS, 10, 11) - if !updated { - t.Errorf("SetReplicasAnnotations() failed") - } - value, ok := tMS.Annotations[DesiredReplicasAnnotation] - if !ok { - t.Errorf("SetReplicasAnnotations did not set DesiredReplicasAnnotation") - } - if value != "10" { - t.Errorf("SetReplicasAnnotations did not set DesiredReplicasAnnotation correctly value=%s", value) - } - if value, ok = tMS.Annotations[MaxReplicasAnnotation]; !ok { - t.Errorf("SetReplicasAnnotations did not set DesiredReplicasAnnotation") - } - if value != "11" { - t.Errorf("SetReplicasAnnotations did not set MaxReplicasAnnotation correctly value=%s", value) - } - }) - - //Test Case 3: Check if annotations reflect deployments state - tMS.Annotations[DesiredReplicasAnnotation] = "1" - tMS.Status.AvailableReplicas = 1 - tMS.Spec.Replicas = new(int32) - *tMS.Spec.Replicas = 1 - - t.Run("IsSaturated", func(t *testing.T) { - saturated := IsSaturated(&tDeployment, &tMS) - if !saturated { - t.Errorf("SetReplicasAnnotations Expected=true Obtained=false") - } - }) - //Tear Down -} - -func TestReplicasAnnotationsNeedUpdate(t *testing.T) { - - desiredReplicas := fmt.Sprintf("%d", int32(10)) - maxReplicas := fmt.Sprintf("%d", int32(20)) - - tests := []struct { - name string - machineSet *v1alpha1.MachineSet - expected bool - }{ - { - name: "test Annotations nil", - machineSet: &v1alpha1.MachineSet{ - ObjectMeta: metav1.ObjectMeta{Name: "hello", Namespace: "test"}, - Spec: v1alpha1.MachineSetSpec{ - Selector: metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, - }, - }, - expected: true, - }, - { - name: "test desiredReplicas update", - machineSet: &v1alpha1.MachineSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: "hello", - Namespace: "test", - Annotations: map[string]string{DesiredReplicasAnnotation: "8", MaxReplicasAnnotation: maxReplicas}, - }, - Spec: v1alpha1.MachineSetSpec{ - Selector: metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, - }, - }, - expected: true, - }, - { - name: "test maxReplicas update", - machineSet: &v1alpha1.MachineSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: "hello", - Namespace: "test", - Annotations: map[string]string{DesiredReplicasAnnotation: desiredReplicas, MaxReplicasAnnotation: "16"}, - }, - Spec: v1alpha1.MachineSetSpec{ - Selector: metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, - }, - }, - expected: true, - }, - { - name: "test needn't update", - machineSet: &v1alpha1.MachineSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: "hello", - Namespace: "test", - Annotations: map[string]string{DesiredReplicasAnnotation: desiredReplicas, MaxReplicasAnnotation: maxReplicas}, - }, - Spec: v1alpha1.MachineSetSpec{ - Selector: metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, - }, - }, - expected: false, - }, - } - - for i, test := range tests { - t.Run(test.name, func(t *testing.T) { - result := ReplicasAnnotationsNeedUpdate(test.machineSet, 10, 20) - if result != test.expected { - t.Errorf("case[%d]:%s Expected %v, Got: %v", i, test.name, test.expected, result) - } - }) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/zz_generated.api.register.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/zz_generated.api.register.go deleted file mode 100644 index 44a7aa97b57..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machinedeployment/zz_generated.api.register.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by apiregister-gen. Do not edit it manually! - -package machinedeployment - -import ( - "github.com/golang/glog" - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" -) - -// MachineDeploymentController implements the controller.MachineDeploymentController interface -type MachineDeploymentController struct { - queue *controller.QueueWorker - - // Handles messages - controller *MachineDeploymentControllerImpl - - Name string - - BeforeReconcile func(key string) - AfterReconcile func(key string, err error) - - Informers *sharedinformers.SharedInformers -} - -// NewController returns a new MachineDeploymentController for responding to MachineDeployment events -func NewMachineDeploymentController(config *rest.Config, si *sharedinformers.SharedInformers) *MachineDeploymentController { - q := workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "MachineDeployment") - - queue := &controller.QueueWorker{q, 10, "MachineDeployment", nil} - c := &MachineDeploymentController{queue, nil, "MachineDeployment", nil, nil, si} - - // For non-generated code to add events - uc := &MachineDeploymentControllerImpl{} - var ci sharedinformers.Controller = uc - - // Call the Init method that is implemented. - // Support multiple Init methods for backwards compatibility - if i, ok := ci.(sharedinformers.LegacyControllerInit); ok { - i.Init(config, si, c.LookupAndReconcile) - } else if i, ok := ci.(sharedinformers.ControllerInit); ok { - i.Init(&sharedinformers.ControllerInitArgumentsImpl{si, config, c.LookupAndReconcile}) - } - - c.controller = uc - - queue.Reconcile = c.reconcile - if c.Informers.WorkerQueues == nil { - c.Informers.WorkerQueues = map[string]*controller.QueueWorker{} - } - c.Informers.WorkerQueues["MachineDeployment"] = queue - si.Factory.Cluster().V1alpha1().MachineDeployments().Informer(). - AddEventHandler(&controller.QueueingEventHandler{q, nil, false}) - return c -} - -func (c *MachineDeploymentController) GetName() string { - return c.Name -} - -func (c *MachineDeploymentController) LookupAndReconcile(key string) (err error) { - return c.reconcile(key) -} - -func (c *MachineDeploymentController) reconcile(key string) (err error) { - var namespace, name string - - if c.BeforeReconcile != nil { - c.BeforeReconcile(key) - } - if c.AfterReconcile != nil { - // Wrap in a function so err is evaluated after it is set - defer func() { c.AfterReconcile(key, err) }() - } - - namespace, name, err = cache.SplitMetaNamespaceKey(key) - if err != nil { - return - } - - u, err := c.controller.Get(namespace, name) - if errors.IsNotFound(err) { - glog.Infof("Not doing work for MachineDeployment %v because it has been deleted", key) - // Set error so it is picked up by AfterReconcile and the return function - err = nil - return - } - if err != nil { - glog.Errorf("Unable to retrieve MachineDeployment %v from store: %v", key, err) - return - } - - // Set error so it is picked up by AfterReconcile and the return function - err = c.controller.Reconcile(u) - - return -} - -func (c *MachineDeploymentController) Run(stopCh <-chan struct{}) { - for _, q := range c.Informers.WorkerQueues { - q.Run(stopCh) - } - controller.GetDefaults(c.controller).Run(stopCh) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/BUILD.bazel deleted file mode 100644 index 559102ec040..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/BUILD.bazel +++ /dev/null @@ -1,69 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "controller.go", - "machine.go", - "status.go", - "zz_generated.api.register.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset", - importpath = "sigs.k8s.io/cluster-api/pkg/controller/machineset", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/builders:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "controller_test.go", - "machine_test.go", - "machineset_suite_test.go", - "reconcile_test.go", - "status_test.go", - ], - embed = [":go_default_library"], - deps = [ - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/test:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/openapi:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/controller.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/controller.go deleted file mode 100644 index 03910d5c907..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/controller.go +++ /dev/null @@ -1,372 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machineset - -import ( - "fmt" - "strings" - "sync" - "time" - - "github.com/golang/glog" - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders" - - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/cache" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - clusterapiclientset "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - listers "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" - "sigs.k8s.io/cluster-api/util" -) - -// controllerKind contains the schema.GroupVersionKind for this controller type. -var controllerKind = v1alpha1.SchemeGroupVersion.WithKind("MachineSet") - -// stateConfirmationTimeout is the amount of time allowed to wait for desired state. -var stateConfirmationTimeout = 10 * time.Second - -// stateConfirmationInterval is the amount of time between polling for the desired state. -// The polling is against a local memory cache. -var stateConfirmationInterval = 100 * time.Millisecond - -// +controller:group=cluster,version=v1alpha1,kind=MachineSet,resource=machinesets -type MachineSetControllerImpl struct { - builders.DefaultControllerFns - - // kubernetesClient a client that knows how to consume Node resources - kubernetesClient kubernetes.Interface - - // clusterAPIClient a client that knows how to consume Cluster API resources - clusterAPIClient clusterapiclientset.Interface - - // machineSetsLister indexes properties about MachineSet - machineSetLister listers.MachineSetLister - // machineLister holds a lister that knows how to list Machines from a cache - machineLister listers.MachineLister - - informers *sharedinformers.SharedInformers -} - -// Init initializes the controller and is called by the generated code -// Register watches for additional resource types here. -func (c *MachineSetControllerImpl) Init(arguments sharedinformers.ControllerInitArguments) { - c.kubernetesClient = arguments.GetSharedInformers().KubernetesClientSet - - c.machineSetLister = arguments.GetSharedInformers().Factory.Cluster().V1alpha1().MachineSets().Lister() - c.machineLister = arguments.GetSharedInformers().Factory.Cluster().V1alpha1().Machines().Lister() - - var err error - c.clusterAPIClient, err = clusterapiclientset.NewForConfig(arguments.GetRestConfig()) - if err != nil { - glog.Fatalf("error building clientset for clusterAPIClient: %v", err) - } - - // Start watching for Machine resource. It will effectively create a new worker queue, and - // reconcileMachine() will be invoked in a loop to handle the reconciling. - mi := arguments.GetSharedInformers().Factory.Cluster().V1alpha1().Machines().Informer() - arguments.GetSharedInformers().Watch("MachineWatcher", mi, nil, c.reconcileMachine) - - c.informers = arguments.GetSharedInformers() - - c.waitForCacheSync() -} - -func (c *MachineSetControllerImpl) waitForCacheSync() { - glog.Infof("Waiting for caches to sync for machine set controller") - - stopCh := make(chan struct{}) - - msListerSynced := c.informers.Factory.Cluster().V1alpha1().MachineSets().Informer().HasSynced - mListerSynced := c.informers.Factory.Cluster().V1alpha1().Machines().Informer().HasSynced - - if !cache.WaitForCacheSync(stopCh, mListerSynced, msListerSynced) { - glog.Warningf("Unable to sync caches for machineset controller") - return - } - glog.Infof("Caches are synced for machineset controller") -} - -// Reconcile holds the controller's business logic. -// it makes sure that the current state is equal to the desired state. -// note that the current state of the cluster is calculated based on the number of machines -// that are owned by the given machineSet (key). -func (c *MachineSetControllerImpl) Reconcile(machineSet *v1alpha1.MachineSet) error { - glog.V(4).Infof("Reconcile machineset %v", machineSet.Name) - allMachines, err := c.machineLister.Machines(machineSet.Namespace).List(labels.Everything()) - if err != nil { - return fmt.Errorf("failed to list machines, %v", err) - } - - // Filter out irrelevant machines (deleting/mismatch labels) and claim orphaned machines. - var filteredMachines []*v1alpha1.Machine - for _, machine := range allMachines { - if shouldExcludeMachine(machineSet, machine) { - continue - } - // Attempt to adopt machine if it meets previous conditions and it has no controller ref. - if metav1.GetControllerOf(machine) == nil { - if err := c.adoptOrphan(machineSet, machine); err != nil { - glog.Warningf("failed to adopt machine %v into machineset %v. %v", machine.Name, machineSet.Name, err) - continue - } - } - filteredMachines = append(filteredMachines, machine) - } - - syncErr := c.syncReplicas(machineSet, filteredMachines) - - ms := machineSet.DeepCopy() - newStatus := c.calculateStatus(ms, filteredMachines) - - // Always updates status as machines come up or die. - updatedMS, err := updateMachineSetStatus(c.clusterAPIClient.ClusterV1alpha1().MachineSets(machineSet.Namespace), machineSet, newStatus) - if err != nil { - if syncErr != nil { - return fmt.Errorf("failed to sync machines. %v. failed to update machine set status. %v", syncErr, err) - } - return fmt.Errorf("failed to update machine set status. %v", err) - } - if updatedMS.Spec.Replicas == nil { - return fmt.Errorf("the Replicas field in Spec for machineset %v is nil, this should not be allowed.", ms.Name) - } - - // Resync the MachineSet after MinReadySeconds as a last line of defense to guard against clock-skew. - // Clock-skew is an issue as it may impact whether an available replica is counted as a ready replica. - // A replica is available if the amount of time since last transition exceeds MinReadySeconds. - // If there was a clock skew, checking whether the amount of time since last transition to ready state - // exceeds MinReadySeconds could be incorrect. - // To avoid an available replica stuck in the ready state, we force a reconcile after MinReadySeconds, - // at which point it should confirm any available replica to be available. - if syncErr == nil && updatedMS.Spec.MinReadySeconds > 0 && - updatedMS.Status.ReadyReplicas == *(updatedMS.Spec.Replicas) && - updatedMS.Status.AvailableReplicas != *(updatedMS.Spec.Replicas) { - - if err := c.enqueueAfter(updatedMS, time.Duration(updatedMS.Spec.MinReadySeconds)*time.Second); err != nil { - return fmt.Errorf("failed to enqueue %v machineset for later. %v", updatedMS.Name, err) - } - } - return syncErr -} - -func (c *MachineSetControllerImpl) Get(namespace, name string) (*v1alpha1.MachineSet, error) { - return c.machineSetLister.MachineSets(namespace).Get(name) -} - -// syncReplicas essentially scales machine resources up and down. -func (c *MachineSetControllerImpl) syncReplicas(ms *v1alpha1.MachineSet, machines []*v1alpha1.Machine) error { - if ms.Spec.Replicas == nil { - return fmt.Errorf("the Replicas field in Spec for machineset %v is nil, this should not be allowed.", ms.Name) - } - diff := len(machines) - int(*(ms.Spec.Replicas)) - - if diff < 0 { - diff *= -1 - glog.Infof("Too few replicas for %v %s/%s, need %d, creating %d", controllerKind, ms.Namespace, ms.Name, *(ms.Spec.Replicas), diff) - - var machineList []*v1alpha1.Machine - var errstrings []string - for i := 0; i < diff; i++ { - glog.Infof("creating machine %d of %d, ( spec.replicas(%d) > currentMachineCount(%d) )", i+1, diff, *(ms.Spec.Replicas), len(machines)) - machine := c.createMachine(ms) - newMachine, err := c.clusterAPIClient.ClusterV1alpha1().Machines(ms.Namespace).Create(machine) - if err != nil { - glog.Errorf("unable to create a machine = %s, due to %v", machine.Name, err) - errstrings = append(errstrings, err.Error()) - continue - } - machineList = append(machineList, newMachine) - } - - if len(errstrings) > 0 { - return fmt.Errorf(strings.Join(errstrings, "; ")) - } - return c.waitForMachineCreation(machineList) - } else if diff > 0 { - glog.Infof("Too many replicas for %v %s/%s, need %d, deleting %d", controllerKind, ms.Namespace, ms.Name, *(ms.Spec.Replicas), diff) - - // Choose which Machines to delete. - machinesToDelete := getMachinesToDelete(machines, diff) - - // TODO: Add cap to limit concurrent delete calls. - errCh := make(chan error, diff) - var wg sync.WaitGroup - wg.Add(diff) - for _, machine := range machinesToDelete { - go func(targetMachine *v1alpha1.Machine) { - defer wg.Done() - err := c.clusterAPIClient.ClusterV1alpha1().Machines(ms.Namespace).Delete(targetMachine.Name, &metav1.DeleteOptions{}) - if err != nil { - glog.Errorf("unable to delete a machine = %s, due to %v", machine.Name, err) - errCh <- err - } - }(machine) - } - wg.Wait() - - select { - case err := <-errCh: - // all errors have been reported before and they're likely to be the same, so we'll only return the first one we hit. - if err != nil { - return err - } - default: - } - return c.waitForMachineDeletion(machinesToDelete) - } - - return nil -} - -// createMachine creates a machine resource. -// the name of the newly created resource is going to be created by the API server, we set the generateName field -func (c *MachineSetControllerImpl) createMachine(machineSet *v1alpha1.MachineSet) *v1alpha1.Machine { - gv := v1alpha1.SchemeGroupVersion - machine := &v1alpha1.Machine{ - TypeMeta: metav1.TypeMeta{ - Kind: gv.WithKind("Machine").Kind, - APIVersion: gv.String(), - }, - ObjectMeta: machineSet.Spec.Template.ObjectMeta, - Spec: machineSet.Spec.Template.Spec, - } - machine.ObjectMeta.GenerateName = fmt.Sprintf("%s-", machineSet.Name) - machine.ObjectMeta.OwnerReferences = []metav1.OwnerReference{*metav1.NewControllerRef(machineSet, controllerKind)} - - return machine -} - -// shoudExcludeMachine returns true if the machine should be filtered out, false otherwise. -func shouldExcludeMachine(machineSet *v1alpha1.MachineSet, machine *v1alpha1.Machine) bool { - // Ignore inactive machines. - if machine.DeletionTimestamp != nil || !machine.DeletionTimestamp.IsZero() { - glog.V(4).Infof("Skipping machine (%v), as it is being deleted.", machine.Name) - return true - } - - if metav1.GetControllerOf(machine) != nil && !metav1.IsControlledBy(machine, machineSet) { - glog.V(4).Infof("%s not controlled by %v", machine.Name, machineSet.Name) - return true - } - if !hasMatchingLabels(machineSet, machine) { - return true - } - return false -} - -func hasMatchingLabels(machineSet *v1alpha1.MachineSet, machine *v1alpha1.Machine) bool { - selector, err := metav1.LabelSelectorAsSelector(&machineSet.Spec.Selector) - if err != nil { - glog.Warningf("unable to convert selector: %v", err) - return false - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() { - glog.V(2).Infof("%v machineset has empty selector", machineSet.Name) - return false - } - if !selector.Matches(labels.Set(machine.Labels)) { - glog.V(4).Infof("%v machine has mismatch labels", machine.Name) - return false - } - return true -} - -func (c *MachineSetControllerImpl) adoptOrphan(machineSet *v1alpha1.MachineSet, machine *v1alpha1.Machine) error { - // Add controller reference. - ownerRefs := machine.ObjectMeta.GetOwnerReferences() - if ownerRefs == nil { - ownerRefs = []metav1.OwnerReference{} - } - - newRef := *metav1.NewControllerRef(machineSet, controllerKind) - ownerRefs = append(ownerRefs, newRef) - machine.ObjectMeta.SetOwnerReferences(ownerRefs) - if _, err := c.clusterAPIClient.ClusterV1alpha1().Machines(machineSet.Namespace).Update(machine); err != nil { - glog.Warningf("Failed to update machine owner reference. %v", err) - return err - } - return nil -} - -func (c *MachineSetControllerImpl) enqueue(machineSet *v1alpha1.MachineSet) error { - key, err := cache.MetaNamespaceKeyFunc(machineSet) - if err != nil { - glog.Errorf("Couldn't get key for object %+v.", machineSet) - return err - } - c.informers.WorkerQueues["MachineSet"].Queue.Add(key) - return nil -} - -func (c *MachineSetControllerImpl) enqueueAfter(machineSet *v1alpha1.MachineSet, after time.Duration) error { - key, err := cache.MetaNamespaceKeyFunc(machineSet) - if err != nil { - glog.Errorf("Couldn't get key for object %+v: %v", machineSet, after) - return err - } - c.informers.WorkerQueues["MachineSet"].Queue.AddAfter(key, after) - return nil -} - -func getMachinesToDelete(filteredMachines []*v1alpha1.Machine, diff int) []*v1alpha1.Machine { - // TODO: Define machines deletion policies. - // see: https://github.com/kubernetes/kube-deploy/issues/625 - return filteredMachines[:diff] -} - -func (c *MachineSetControllerImpl) waitForMachineCreation(machineList []*v1alpha1.Machine) error { - for _, machine := range machineList { - pollErr := util.Poll(stateConfirmationInterval, stateConfirmationTimeout, func() (bool, error) { - _, err := c.machineLister.Machines(machine.Namespace).Get(machine.Name) - glog.Error(err) - if err == nil { - return true, nil - } - if errors.IsNotFound(err) { - return false, nil - } - return false, err - }) - if pollErr != nil { - glog.Error(pollErr) - return fmt.Errorf("failed waiting for machine object to be created. %v", pollErr) - } - } - return nil -} - -func (c *MachineSetControllerImpl) waitForMachineDeletion(machineList []*v1alpha1.Machine) error { - for _, machine := range machineList { - pollErr := util.Poll(stateConfirmationInterval, stateConfirmationTimeout, func() (bool, error) { - m, err := c.machineLister.Machines(machine.Namespace).Get(machine.Name) - if errors.IsNotFound(err) || !m.DeletionTimestamp.IsZero() { - return true, nil - } - return false, err - }) - if pollErr != nil { - glog.Error(pollErr) - return fmt.Errorf("failed waiting for machine object to be deleted. %v", pollErr) - } - } - return nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/controller_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/controller_test.go deleted file mode 100644 index 4f65ad315d8..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/controller_test.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machineset_test - -import ( - "sync" - "testing" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/pkg/controller/machineset" -) - -func machineSetControllerReconcile(t *testing.T, cs *clientset.Clientset, controller *machineset.MachineSetController) { - instance := v1alpha1.MachineSet{} - instance.Name = "instance-1" - replicas := int32(0) - instance.Spec.Replicas = &replicas - instance.Spec.Selector = metav1.LabelSelector{MatchLabels: map[string]string{"foo": "barr"}} - instance.Spec.Template.Labels = map[string]string{"foo": "barr"} - - expectedKey := "default/instance-1" - - // When creating a new object, it should invoke the reconcile method. - cluster := testutil.GetVanillaCluster() - cluster.Name = "cluster-1" - if _, err := cs.ClusterV1alpha1().Clusters("default").Create(&cluster); err != nil { - t.Fatal(err) - } - client := cs.ClusterV1alpha1().MachineSets("default") - before := make(chan struct{}) - after := make(chan struct{}) - var aftOnce, befOnce sync.Once - - actualKey := "" - var actualErr error = nil - - // Setup test callbacks to be called when the message is reconciled. - // Sometimes reconcile is called multiple times, so use Once to prevent closing the channels again. - controller.BeforeReconcile = func(key string) { - actualKey = key - befOnce.Do(func() { close(before) }) - } - controller.AfterReconcile = func(key string, err error) { - actualKey = key - actualErr = err - aftOnce.Do(func() { close(after) }) - } - - // Create an instance - if _, err := client.Create(&instance); err != nil { - t.Fatal(err) - } - defer client.Delete(instance.Name, &metav1.DeleteOptions{}) - - // Verify reconcile function is called against the correct key - select { - case <-before: - if actualKey != expectedKey { - t.Fatalf( - "Reconcile function was not called with the correct key.\nActual:\t%+v\nExpected:\t%+v", - actualKey, expectedKey) - } - if actualErr != nil { - t.Fatal(actualErr) - } - case <-time.After(time.Second * 2): - t.Fatalf("reconcile never called") - } - - select { - case <-after: - if actualKey != expectedKey { - t.Fatalf( - "Reconcile function was not called with the correct key.\nActual:\t%+v\nExpected:\t%+v", - actualKey, expectedKey) - } - if actualErr != nil { - t.Fatal(actualErr) - } - case <-time.After(time.Second * 2): - t.Fatalf("reconcile never finished") - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machine.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machine.go deleted file mode 100644 index a2a722614ac..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machine.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machineset - -import ( - "fmt" - "strings" - - "github.com/golang/glog" - - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" -) - -func (c *MachineSetControllerImpl) reconcileMachine(key string) error { - glog.V(4).Infof("Reconcile machine from machineset: %v", key) - namespace, name, err := cache.SplitMetaNamespaceKey(key) - if err != nil { - glog.Errorf("Failed to split key: %v. %v", key, err) - return err - } - - m, err := c.clusterAPIClient.ClusterV1alpha1().Machines(namespace).Get(name, metav1.GetOptions{}) - if errors.IsNotFound(err) { - return nil - } - if err != nil { - glog.Errorf("Unable to retrieve Machine %v from store: %v", key, err) - return err - } - - // If it has a ControllerRef, enqueue the controller ref machine set - if controllerRef := metav1.GetControllerOf(m); controllerRef != nil { - ms := c.resolveControllerRef(namespace, controllerRef) - if ms == nil { - glog.V(4).Infof("Found no machineset from controller ref for machine %v", m.Name) - return nil - } - if err := c.enqueue(ms); err != nil { - return fmt.Errorf("failed to enqueue machine set %v due to change to machine %v. %v", ms.Name, m.Name, err) - } - return nil - } - - mss := c.getMachineSetsForMachine(m) - if len(mss) == 0 { - glog.V(4).Infof("Found no machine set for machine: %v", m.Name) - return nil - } - var errstrings []string - for _, ms := range mss { - if err := c.enqueue(ms); err != nil { - errstrings = append(errstrings, err.Error()) - } - } - if len(errstrings) > 0 { - return fmt.Errorf("failed to enqueue machine sets due to change to machine %v. %v", m.Name, strings.Join(errstrings, "; ")) - } - return nil -} - -func (c *MachineSetControllerImpl) resolveControllerRef(namespace string, controllerRef *metav1.OwnerReference) *v1alpha1.MachineSet { - if controllerRef.Kind != controllerKind.Kind { - glog.Warningf("Found unexpected controller ref kind, got %v, expected %v", controllerRef.Kind, controllerKind.Kind) - return nil - } - ms, err := c.machineSetLister.MachineSets(namespace).Get(controllerRef.Name) - if err != nil { - glog.Warningf("Failed to get machine set with name %v.", controllerRef.Name) - return nil - } - if ms.UID != controllerRef.UID { - // The controller we found with this Name is not the same one that the ControllerRef points to. - glog.Warningf("Found unexpected UID, got %v, expected %v.", ms.UID, controllerRef.UID) - return nil - } - return ms -} - -func (c *MachineSetControllerImpl) getMachineSetsForMachine(m *v1alpha1.Machine) []*v1alpha1.MachineSet { - if len(m.Labels) == 0 { - glog.Warningf("No machine sets found for Machine %v because it has no labels", m.Name) - return nil - } - - msList, err := c.machineSetLister.MachineSets(m.Namespace).List(labels.Everything()) - if err != nil { - glog.Errorf("Failed to list machine sets, %v", err) - return nil - } - - var mss []*v1alpha1.MachineSet - for _, ms := range msList { - if hasMatchingLabels(ms, m) { - mss = append(mss, ms) - } - } - - return mss -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machine_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machine_test.go deleted file mode 100644 index 55b143d634d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machine_test.go +++ /dev/null @@ -1,176 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machineset - -import ( - "reflect" - "sort" - "testing" - - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake" - v1alpha1listers "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" -) - -func TestMachineSetController_reconcileMachine(t *testing.T) { - tests := []struct { - name string - machineNotPresent bool - machineSetNotPresent bool - machineSetDiffUID bool - machineNoCtrlRef bool - machineNoLabels bool - sameMSLabels bool - expectQueued int - }{ - { - name: "machine doesn't exist, noop", - machineNotPresent: true, - }, - { - name: "machine with controller ref, found machine set, 1 queued.", - expectQueued: 1, - }, - { - name: "machine with controller ref, machine set not found, noop", - machineSetNotPresent: true, - }, - { - name: "machine with controller ref, machine set UID mismatch, noop", - machineSetDiffUID: true, - }, - { - name: "machine without controller ref, found 1 machine set with matching labels, 1 queued", - machineNoCtrlRef: true, - expectQueued: 1, - }, - { - name: "machine without controller ref, no labels, noop", - machineNoCtrlRef: true, - machineNoLabels: true, - }, - { - name: "machine without controller ref, found 2 machine set with matching labels, 2 queued", - machineNoCtrlRef: true, - sameMSLabels: true, - expectQueued: 2, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - ms := createMachineSet(1, "foo", "bar1", "acme") - msSameLabel := createMachineSet(1, "ms2", "bar1", "acme") - msDiffLabel := createMachineSet(1, "ms3", "ms-bar", "acme") - msDiffLabel.Spec.Selector.MatchLabels = map[string]string{labelKey: "DIFFLABELS"} - msDiffLabel.Spec.Template.Labels = map[string]string{labelKey: "DIFFLABELS"} - msDiffUID := ms.DeepCopy() - msDiffUID.UID = "NotMe" - - m := machineFromMachineSet(ms, "bar1") - - rObjects := []runtime.Object{} - if !test.machineNotPresent { - rObjects = append(rObjects, m) - } - if test.machineNoCtrlRef { - m.ObjectMeta.OwnerReferences = []metav1.OwnerReference{} - } - if test.machineNoLabels { - m.ObjectMeta.Labels = map[string]string{} - } - - fakeClient := fake.NewSimpleClientset(rObjects...) - - machineSetIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) - machineSetLister := v1alpha1listers.NewMachineSetLister(machineSetIndexer) - - if !test.machineSetNotPresent { - if test.machineSetDiffUID { - machineSetIndexer.Add(msDiffUID) - } else { - machineSetIndexer.Add(ms) - } - } - machineSetIndexer.Add(msDiffLabel) - if test.sameMSLabels { - machineSetIndexer.Add(msSameLabel) - } - - target := &MachineSetControllerImpl{} - target.clusterAPIClient = fakeClient - target.machineSetLister = machineSetLister - target.informers = &sharedinformers.SharedInformers{} - target.informers.WorkerQueues = map[string]*controller.QueueWorker{} - target_queue := workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "MachineSet") - target.informers.WorkerQueues["MachineSet"] = &controller.QueueWorker{target_queue, 10, "MachineSet", nil} - - mKey, err := cache.MetaNamespaceKeyFunc(m) - if err != nil { - t.Fatalf("unable to get key for test machine, %v", err) - } - err = target.reconcileMachine(mKey) - - if err != nil { - t.Fatalf("got %v error, expected %v error; %v", err != nil, false, err) - } - - if target_queue.Len() != test.expectQueued { - t.Fatalf("got %v queued items, expected %v queued items", target_queue.Len(), test.expectQueued) - } - - if test.expectQueued == 1 { - verifyQueuedKey(t, target_queue, []*v1alpha1.MachineSet{ms}) - } - if test.expectQueued == 2 { - verifyQueuedKey(t, target_queue, []*v1alpha1.MachineSet{ms, msSameLabel}) - } - }) - } -} - -func verifyQueuedKey(t *testing.T, queue workqueue.RateLimitingInterface, mss []*v1alpha1.MachineSet) { - queuedLength := queue.Len() - var queuedKeys, expectedKeys []string - for i := 0; i < queuedLength; i++ { - key, done := queue.Get() - if key == nil || done { - t.Fatalf("failed to enqueue controller.") - } - queuedKeys = append(queuedKeys, key.(string)) - queue.Done(key) - } - for _, ms := range mss { - key, err := cache.MetaNamespaceKeyFunc(ms) - if err != nil { - t.Fatalf("failed to get key for deployment.") - } - expectedKeys = append(expectedKeys, key) - } - sort.Strings(queuedKeys) - sort.Strings(expectedKeys) - if !reflect.DeepEqual(queuedKeys, expectedKeys) { - t.Fatalf("got %v keys, expected %v keys", queuedKeys, expectedKeys) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machineset_suite_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machineset_suite_test.go deleted file mode 100644 index 5139fa4bfe5..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/machineset_suite_test.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machineset_test - -import ( - "testing" - - "github.com/kubernetes-incubator/apiserver-builder/pkg/test" - - "sigs.k8s.io/cluster-api/pkg/apis" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/pkg/controller/machineset" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" - "sigs.k8s.io/cluster-api/pkg/openapi" -) - -func TestMachineSet(t *testing.T) { - testenv := test.NewTestEnvironment() - config := testenv.Start(apis.GetAllApiBuilders(), openapi.GetOpenAPIDefinitions) - cs := clientset.NewForConfigOrDie(config) - - shutdown := make(chan struct{}) - si := sharedinformers.NewSharedInformers(config, shutdown) - controller := machineset.NewMachineSetController(config, si) - controller.Run(shutdown) - - t.Run("machineSetControllerReconcile", func(t *testing.T) { - machineSetControllerReconcile(t, cs, controller) - }) - - close(shutdown) - testenv.Stop() -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/reconcile_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/reconcile_test.go deleted file mode 100644 index fb5e46fbf5b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/reconcile_test.go +++ /dev/null @@ -1,428 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machineset - -import ( - "fmt" - "testing" - "time" - - "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/diff" - clienttesting "k8s.io/client-go/testing" - core "k8s.io/client-go/testing" - "k8s.io/client-go/tools/cache" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake" - v1alpha1listers "sigs.k8s.io/cluster-api/pkg/client/listers_generated/cluster/v1alpha1" -) - -const ( - labelKey = "type" -) - -type fakeMachineLister struct { - indexer cache.Indexer -} - -// List lists all Machines in the indexer. -func (s *fakeMachineLister) List(selector labels.Selector) (ret []*v1alpha1.Machine, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.Machine)) - }) - return ret, err -} - -// Machines returns an object that can list and get Machines. -func (s *fakeMachineLister) Machines(namespace string) v1alpha1listers.MachineNamespaceLister { - return fakeMachineNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -type fakeMachineNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -func (s fakeMachineNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Machine, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.Machine)) - }) - return ret, err -} - -func (s fakeMachineNamespaceLister) Get(name string) (*v1alpha1.Machine, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("machine"), name) - } - return obj.(*v1alpha1.Machine), nil -} - -func TestMachineSetControllerReconcileHandler(t *testing.T) { - now := time.Now() - - tests := []struct { - name string - startingMachineSets []*v1alpha1.MachineSet - startingMachines []*v1alpha1.Machine - machineSetToSync string - namespaceToSync string - confirmationTimeout *time.Duration - deletionTimestamp *time.Time - expectedMachine *v1alpha1.Machine - expectedActions []string - expectedError bool - }{ - { - name: "scenario 1: the current state of the cluster is empty, thus a machine is created.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(1, "foo", "bar1", "acme")}, - startingMachines: nil, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedActions: []string{"create"}, - expectedMachine: machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), - }, - { - name: "scenario 2: the current state of the cluster is too small, thus a machine is created.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(3, "foo", "bar3", "acme")}, - startingMachines: []*v1alpha1.Machine{machineFromMachineSet(createMachineSet(3, "foo", "bar1", "acme"), "bar1"), machineFromMachineSet(createMachineSet(3, "foo", "bar2", "acme"), "bar2")}, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedActions: []string{"create"}, - expectedMachine: machineFromMachineSet(createMachineSet(3, "foo", "bar3", "acme"), "bar3"), - }, - { - name: "scenario 3: the current state of the cluster is equal to the desired one, no machine resource is created.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(2, "foo", "bar3", "acme")}, - startingMachines: []*v1alpha1.Machine{machineFromMachineSet(createMachineSet(2, "foo", "bar1", "acme"), "bar1"), machineFromMachineSet(createMachineSet(2, "foo", "bar2", "acme"), "bar2")}, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedActions: []string{}, - }, - { - name: "scenario 4: the current state of the cluster is bigger than the desired one, thus a machine is deleted.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(0, "foo", "bar2", "acme")}, - startingMachines: []*v1alpha1.Machine{machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1")}, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedActions: []string{"delete"}, - }, - { - name: "scenario 5: the current state of the cluster is bigger than the desired one, thus machines are deleted.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(0, "foo", "bar2", "acme")}, - startingMachines: []*v1alpha1.Machine{machineFromMachineSet(createMachineSet(2, "foo", "bar1", "acme"), "bar1"), machineFromMachineSet(createMachineSet(2, "foo", "bar2", "acme"), "bar2")}, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedActions: []string{"delete", "delete"}, - }, - { - name: "scenario 6: the current machine has different labels than the given machineSet, thus a machine is created.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(1, "foo", "bar2", "acme")}, - startingMachines: []*v1alpha1.Machine{setDifferentLabels(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"))}, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedActions: []string{"create"}, - expectedMachine: machineFromMachineSet(createMachineSet(1, "foo", "bar2", "acme"), "bar2"), - }, - { - name: "scenario 7: the current machine is missing owner refs, machine should be adopted.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(1, "foo", "bar2", "acme")}, - startingMachines: []*v1alpha1.Machine{machineWithoutOwnerRefs(createMachineSet(1, "foo", "bar1", "acme"), "bar1")}, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedActions: []string{"update"}, - expectedMachine: machineFromMachineSet(createMachineSet(1, "foo", "bar2", "acme"), "bar1"), - }, - { - name: "scenario 8: the current machine has different controller ref, thus a machine is created.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(1, "foo", "bar2", "acme")}, - startingMachines: []*v1alpha1.Machine{setDifferentOwnerUID(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"))}, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedActions: []string{"create"}, - expectedMachine: machineFromMachineSet(createMachineSet(1, "foo", "bar2", "acme"), "bar2"), - }, - { - name: "scenario 9: the current machine is being deleted, thus a machine is created.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(1, "foo", "bar2", "acme")}, - startingMachines: []*v1alpha1.Machine{setMachineDeleting(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"))}, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedActions: []string{"create"}, - expectedMachine: machineFromMachineSet(createMachineSet(1, "foo", "bar2", "acme"), "bar2"), - }, - { - name: "scenario 10: the current machine has no controller refs, owner refs preserved, machine should be adopted.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(1, "foo", "bar2", "acme")}, - startingMachines: []*v1alpha1.Machine{setNonControllerRef(setDifferentOwnerUID(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1")))}, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedActions: []string{"update"}, - expectedMachine: machineWithMultipleOwnerRefs(createMachineSet(1, "foo", "bar2", "acme"), "bar1"), - }, - { - name: "scenario 11: create confirmation timed out, err.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(1, "foo", "bar1", "acme")}, - startingMachines: nil, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedError: true, - }, - { - name: "scenario 12: delete confirmation timed out, err.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(0, "foo", "bar2", "acme")}, - startingMachines: []*v1alpha1.Machine{machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1")}, - machineSetToSync: "foo", - namespaceToSync: "acme", - expectedError: true, - }, - { - name: "scenario 13: delete confirmation accepts delete non-zero timestamp.", - startingMachineSets: []*v1alpha1.MachineSet{createMachineSet(0, "foo", "bar2", "acme")}, - startingMachines: []*v1alpha1.Machine{machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1")}, - machineSetToSync: "foo", - namespaceToSync: "acme", - deletionTimestamp: &now, - expectedActions: []string{"delete"}, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - stateConfirmationTimeout = 1 * time.Millisecond - - // setup the test scenario - rObjects := []runtime.Object{} - machinesIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) - for _, amachine := range test.startingMachines { - err := machinesIndexer.Add(amachine) - if err != nil { - t.Fatal(err) - } - rObjects = append(rObjects, amachine) - } - machineSetIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) - for _, amachineset := range test.startingMachineSets { - err := machineSetIndexer.Add(amachineset) - if err != nil { - t.Fatal(err) - } - rObjects = append(rObjects, amachineset) - } - fakeClient := fake.NewSimpleClientset(rObjects...) - - machineLister := fakeMachineLister{indexer: machinesIndexer} - machineSetLister := v1alpha1listers.NewMachineSetLister(machineSetIndexer) - target := &MachineSetControllerImpl{} - target.clusterAPIClient = fakeClient - target.machineSetLister = machineSetLister - target.machineLister = &machineLister - - fakeClient.PrependReactor("create", "machines", func(action core.Action) (bool, runtime.Object, error) { - if test.expectedError { - return true, nil, errors.NewNotFound(v1alpha1.Resource("machine"), "somemachine") - } - if test.expectedMachine != nil { - machineLister.indexer.Add(test.expectedMachine) - } - return true, test.expectedMachine, nil - }) - - fakeClient.PrependReactor("delete", "machines", func(action core.Action) (bool, runtime.Object, error) { - if test.deletionTimestamp != nil { - machineLister.indexer.Delete(test.startingMachines[0]) - m := test.startingMachines[0].DeepCopy() - timestamp := metav1.NewTime(*test.deletionTimestamp) - m.ObjectMeta.DeletionTimestamp = ×tamp - machineLister.indexer.Add(m) - return true, nil, nil - } - if test.expectedError { - return false, nil, nil - } - for i, action := range test.expectedActions { - if action == "delete" { - machineLister.indexer.Delete(test.startingMachines[i]) - } - } - return true, nil, nil - }) - - // act - machineSetToTest, err := target.Get(test.namespaceToSync, test.machineSetToSync) - if err != nil { - t.Fatal(err) - } - err = target.Reconcile(machineSetToTest) - - if test.expectedError != (err != nil) { - t.Fatalf("Unexpected reconcile err: got %v, expected %v. %v", (err != nil), test.expectedError, err) - return - } - if test.expectedError { - return - } - - // validate - actions := fakeClient.Actions() - actions = getFilteredActions(actions, "machines") - if len(actions) != len(test.expectedActions) { - t.Fatalf("got %d actions, expected %d actions; got %v actions, expected %v actions", len(actions), len(test.expectedActions), actions, test.expectedActions) - } - for i, verb := range test.expectedActions { - if actions[i].GetVerb() != verb { - t.Fatalf("unexpected action: %v, expected %s", actions[i], verb) - } - } - - if test.expectedMachine != nil { - // we take only the first item in line - var actualMachine *v1alpha1.Machine - for _, action := range actions { - if action.GetVerb() == "create" { - createAction, ok := action.(clienttesting.CreateAction) - if !ok { - t.Fatalf("unexpected action %#v", action) - } - actualMachine = createAction.GetObject().(*v1alpha1.Machine) - break - } - if action.GetVerb() == "update" { - updateAction, ok := action.(clienttesting.UpdateAction) - if !ok { - t.Fatalf("unexpected action %#v", action) - } - actualMachine = updateAction.GetObject().(*v1alpha1.Machine) - break - } - } - - if !equality.Semantic.DeepEqual(actualMachine, test.expectedMachine) { - t.Fatalf("actual machine is different from the expected one: %v", diff.ObjectDiff(test.expectedMachine, actualMachine)) - } - } - }) - } -} - -func createMachineSet(replicas int, machineSetName string, machineName string, namespace string) *v1alpha1.MachineSet { - replicasInt32 := int32(replicas) - return &v1alpha1.MachineSet{ - TypeMeta: metav1.TypeMeta{ - Kind: "MachineSet", - APIVersion: v1alpha1.SchemeGroupVersion.String(), - }, - ObjectMeta: metav1.ObjectMeta{ - Name: machineSetName, - Namespace: namespace, - }, - Spec: v1alpha1.MachineSetSpec{ - Replicas: &replicasInt32, - MinReadySeconds: 600, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{labelKey: "strongMachine"}, - }, - Template: v1alpha1.MachineTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Name: machineName, - Namespace: namespace, - Labels: map[string]string{labelKey: "strongMachine"}, - }, - Spec: v1alpha1.MachineSpec{ - ProviderConfig: v1alpha1.ProviderConfig{ - Value: &runtime.RawExtension{Raw: []byte("some provider specific configuration data")}, - }, - }, - }, - }, - } -} - -func machineWithoutOwnerRefs(machineSet *v1alpha1.MachineSet, name string) *v1alpha1.Machine { - m := &v1alpha1.Machine{ - TypeMeta: metav1.TypeMeta{ - Kind: "Machine", - APIVersion: v1alpha1.SchemeGroupVersion.String(), - }, - ObjectMeta: machineSet.Spec.Template.ObjectMeta, - Spec: machineSet.Spec.Template.Spec, - } - - m.Name = name - m.GenerateName = fmt.Sprintf("%s-", machineSet.Name) - - return m -} - -func machineFromMachineSet(machineSet *v1alpha1.MachineSet, name string) *v1alpha1.Machine { - m := machineWithoutOwnerRefs(machineSet, name) - m.ObjectMeta.OwnerReferences = []metav1.OwnerReference{*metav1.NewControllerRef(machineSet, controllerKind)} - return m -} - -func machineWithMultipleOwnerRefs(machineSet *v1alpha1.MachineSet, name string) *v1alpha1.Machine { - controller := false - existingRef := metav1.NewControllerRef(machineSet, controllerKind) - existingRef.UID = "NotMe" - existingRef.Controller = &controller - - m := machineWithoutOwnerRefs(machineSet, name) - m.ObjectMeta.OwnerReferences = []metav1.OwnerReference{*existingRef, *metav1.NewControllerRef(machineSet, controllerKind)} - return m -} - -func setDifferentOwnerUID(m *v1alpha1.Machine) *v1alpha1.Machine { - m.ObjectMeta.OwnerReferences[0].UID = "NotMe" - return m -} - -func setMachineDeleting(m *v1alpha1.Machine) *v1alpha1.Machine { - now := metav1.NewTime(time.Now()) - m.ObjectMeta.DeletionTimestamp = &now - return m -} - -func setDifferentLabels(m *v1alpha1.Machine) *v1alpha1.Machine { - labels := m.GetLabels() - labels[labelKey] = "NOTME" - m.ObjectMeta.SetLabels(labels) - return m -} - -func setNonControllerRef(m *v1alpha1.Machine) *v1alpha1.Machine { - controller := false - m.ObjectMeta.OwnerReferences[0].Controller = &controller - return m -} - -func getFilteredActions(actions []clienttesting.Action, resource string) []clienttesting.Action { - var filteredActions []clienttesting.Action - for _, action := range actions { - if action.GetResource().Resource == resource { - filteredActions = append(filteredActions, action) - } - } - return filteredActions -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/status.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/status.go deleted file mode 100644 index 4ba33bf788f..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/status.go +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machineset - -import ( - "fmt" - - "github.com/golang/glog" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - machinesetclientset "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/controller/noderefutil" -) - -const ( - // The number of times we retry updating a MachineSet's status. - statusUpdateRetries = 1 -) - -func (c *MachineSetControllerImpl) calculateStatus(ms *v1alpha1.MachineSet, filteredMachines []*v1alpha1.Machine) v1alpha1.MachineSetStatus { - newStatus := ms.Status - // Count the number of machines that have labels matching the labels of the machine - // template of the replica set, the matching machines may have more - // labels than are in the template. Because the label of machineTemplateSpec is - // a superset of the selector of the replica set, so the possible - // matching machines must be part of the filteredMachines. - fullyLabeledReplicasCount := 0 - readyReplicasCount := 0 - availableReplicasCount := 0 - templateLabel := labels.Set(ms.Spec.Template.Labels).AsSelectorPreValidated() - for _, machine := range filteredMachines { - if templateLabel.Matches(labels.Set(machine.Labels)) { - fullyLabeledReplicasCount++ - } - node, err := c.getMachineNode(machine) - if err != nil { - glog.V(4).Infof("Unable to get node for machine %v, %v", machine.Name, err) - continue - } - if noderefutil.IsNodeReady(node) { - readyReplicasCount++ - if noderefutil.IsNodeAvailable(node, ms.Spec.MinReadySeconds, metav1.Now()) { - availableReplicasCount++ - } - } - } - - newStatus.Replicas = int32(len(filteredMachines)) - newStatus.FullyLabeledReplicas = int32(fullyLabeledReplicasCount) - newStatus.ReadyReplicas = int32(readyReplicasCount) - newStatus.AvailableReplicas = int32(availableReplicasCount) - return newStatus -} - -// updateMachineSetStatus attempts to update the Status.Replicas of the given MachineSet, with a single GET/PUT retry. -func updateMachineSetStatus(c machinesetclientset.MachineSetInterface, ms *v1alpha1.MachineSet, newStatus v1alpha1.MachineSetStatus) (*v1alpha1.MachineSet, error) { - // This is the steady state. It happens when the MachineSet doesn't have any expectations, since - // we do a periodic relist every 30s. If the generations differ but the replicas are - // the same, a caller might've resized to the same replica count. - if ms.Status.Replicas == newStatus.Replicas && - ms.Status.FullyLabeledReplicas == newStatus.FullyLabeledReplicas && - ms.Status.ReadyReplicas == newStatus.ReadyReplicas && - ms.Status.AvailableReplicas == newStatus.AvailableReplicas && - ms.Generation == ms.Status.ObservedGeneration { - return ms, nil - } - - // Save the generation number we acted on, otherwise we might wrongfully indicate - // that we've seen a spec update when we retry. - // TODO: This can clobber an update if we allow multiple agents to write to the - // same status. - newStatus.ObservedGeneration = ms.Generation - - var getErr, updateErr error - var updatedMS *v1alpha1.MachineSet - for i := 0; ; i++ { - glog.V(4).Infof(fmt.Sprintf("Updating status for %v: %s/%s, ", ms.Kind, ms.Namespace, ms.Name) + - fmt.Sprintf("replicas %d->%d (need %d), ", ms.Status.Replicas, newStatus.Replicas, *(ms.Spec.Replicas)) + - fmt.Sprintf("fullyLabeledReplicas %d->%d, ", ms.Status.FullyLabeledReplicas, newStatus.FullyLabeledReplicas) + - fmt.Sprintf("readyReplicas %d->%d, ", ms.Status.ReadyReplicas, newStatus.ReadyReplicas) + - fmt.Sprintf("availableReplicas %d->%d, ", ms.Status.AvailableReplicas, newStatus.AvailableReplicas) + - fmt.Sprintf("sequence No: %v->%v", ms.Status.ObservedGeneration, newStatus.ObservedGeneration)) - - ms.Status = newStatus - updatedMS, updateErr = c.UpdateStatus(ms) - if updateErr == nil { - return updatedMS, nil - } - // Stop retrying if we exceed statusUpdateRetries - the machineSet will be requeued with a rate limit. - if i >= statusUpdateRetries { - break - } - // Update the MachineSet with the latest resource version for the next poll - if ms, getErr = c.Get(ms.Name, metav1.GetOptions{}); getErr != nil { - // If the GET fails we can't trust status.Replicas anymore. This error - // is bound to be more interesting than the update failure. - return nil, getErr - } - } - - return nil, updateErr -} - -func (c *MachineSetControllerImpl) getMachineNode(machine *v1alpha1.Machine) (*corev1.Node, error) { - nodeRef := machine.Status.NodeRef - if nodeRef == nil { - return nil, fmt.Errorf("machine has no node ref") - } - - return c.kubernetesClient.CoreV1().Nodes().Get(nodeRef.Name, metav1.GetOptions{}) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/status_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/status_test.go deleted file mode 100644 index d3c81fc22ca..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/status_test.go +++ /dev/null @@ -1,283 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package machineset - -import ( - "fmt" - "reflect" - "testing" - "time" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - kubefake "k8s.io/client-go/kubernetes/fake" - core "k8s.io/client-go/testing" - - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake" -) - -func TestMachineSetController_calculateStatus(t *testing.T) { - readyNode := &corev1.Node{ - ObjectMeta: metav1.ObjectMeta{Name: "rNode"}, - Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionTrue, - LastTransitionTime: metav1.Time{Time: time.Now()}, - }, - }, - }, - } - notReadyNode := readyNode.DeepCopy() - notReadyNode.Name = "nrNode" - notReadyNode.Status.Conditions[0].Status = corev1.ConditionFalse - unknownStatusNode := readyNode.DeepCopy() - unknownStatusNode.Name = "usNode" - unknownStatusNode.Status.Conditions[0].Status = corev1.ConditionUnknown - noConditionNode := readyNode.DeepCopy() - noConditionNode.Name = "ncNode" - noConditionNode.Status.Conditions = []corev1.NodeCondition{} - availableNode := readyNode.DeepCopy() - availableNode.Name = "aNode" - availableNode.Status.Conditions[0].LastTransitionTime.Time = time.Now().Add(time.Duration(-6) * time.Minute) - - tests := []struct { - name string - machines []*v1alpha1.Machine - setMinReadySeconds bool - minReadySeconds int32 - expectedReplicas int32 - expectedLabeledReplicas int32 - expectedReadyReplicas int32 - expectedAvailableReplicas int32 - }{ - { - name: "scenario 1: empty machinset.", - }, - { - name: "scenario 2: 1 replica, 1 labeled machine", - machines: []*v1alpha1.Machine{ - machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), - }, - expectedReplicas: 1, - expectedLabeledReplicas: 1, - }, - { - name: "scenario 3: 1 replica, 0 labeled machine", - machines: []*v1alpha1.Machine{ - setDifferentLabels(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1")), - }, - expectedReplicas: 1, - }, - { - name: "scenario 4: 1 replica, 1 ready machine", - machines: []*v1alpha1.Machine{ - setNode(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), readyNode), - }, - expectedReplicas: 1, - expectedLabeledReplicas: 1, - expectedReadyReplicas: 1, - }, - { - name: "scenario 5: 1 replica, 0 ready machine, not ready node", - machines: []*v1alpha1.Machine{ - setNode(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), notReadyNode), - }, - expectedReplicas: 1, - expectedLabeledReplicas: 1, - }, - { - name: "scenario 6: 1 replica, 0 ready machine, unknown node", - machines: []*v1alpha1.Machine{ - setNode(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), unknownStatusNode), - }, - expectedReplicas: 1, - expectedLabeledReplicas: 1, - }, - { - name: "scenario 7: 1 replica, 0 ready machine, missing condition node", - machines: []*v1alpha1.Machine{ - setNode(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), noConditionNode), - }, - expectedReplicas: 1, - expectedLabeledReplicas: 1, - }, - { - name: "scenario 8: 1 replica, 1 available machine, minReadySeconds = 0", - machines: []*v1alpha1.Machine{ - setNode(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), readyNode), - }, - setMinReadySeconds: true, - minReadySeconds: 0, - expectedReplicas: 1, - expectedLabeledReplicas: 1, - expectedReadyReplicas: 1, - expectedAvailableReplicas: 1, - }, - { - name: "scenario 9: 1 replica, 1 available machine, 360s elapsed, need 300s", - machines: []*v1alpha1.Machine{ - setNode(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), availableNode), - }, - setMinReadySeconds: true, - minReadySeconds: 300, - expectedReplicas: 1, - expectedLabeledReplicas: 1, - expectedReadyReplicas: 1, - expectedAvailableReplicas: 1, - }, - { - name: "scenario 10: 4 replicas, 3 labeled, 2 ready, 1 available machine", - machines: []*v1alpha1.Machine{ - setDifferentLabels(setNode(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), noConditionNode)), - setNode(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), notReadyNode), - setNode(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), readyNode), - setNode(machineFromMachineSet(createMachineSet(1, "foo", "bar1", "acme"), "bar1"), availableNode), - }, - setMinReadySeconds: true, - minReadySeconds: 300, - expectedReplicas: 4, - expectedLabeledReplicas: 3, - expectedReadyReplicas: 2, - expectedAvailableReplicas: 1, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - rObjects := []runtime.Object{readyNode, notReadyNode, unknownStatusNode, noConditionNode, availableNode} - k8sClient := kubefake.NewSimpleClientset(rObjects...) - - c := &MachineSetControllerImpl{} - c.kubernetesClient = k8sClient - - ms := createMachineSet(len(test.machines), "foo", "bar1", "acme") - if test.setMinReadySeconds { - ms.Spec.MinReadySeconds = test.minReadySeconds - } - - status := c.calculateStatus(ms, test.machines) - - if status.Replicas != test.expectedReplicas { - t.Errorf("got %v replicas, expected %v replicas", status.Replicas, test.expectedReplicas) - } - - if status.FullyLabeledReplicas != test.expectedLabeledReplicas { - t.Errorf("got %v fully labeled replicas, expected %v fully labeled replicas", status.FullyLabeledReplicas, test.expectedLabeledReplicas) - } - - if status.ReadyReplicas != test.expectedReadyReplicas { - t.Errorf("got %v ready replicas, expected %v ready replicas", status.ReadyReplicas, test.expectedReadyReplicas) - } - - if status.AvailableReplicas != test.expectedAvailableReplicas { - t.Errorf("got %v available replicas, expected %v available replicas", status.AvailableReplicas, test.expectedAvailableReplicas) - } - - }) - } -} - -func setNode(machine *v1alpha1.Machine, node *corev1.Node) *v1alpha1.Machine { - machine.Status.NodeRef = getNodeRef(node) - return machine -} - -func getNodeRef(node *corev1.Node) *corev1.ObjectReference { - return &corev1.ObjectReference{ - Kind: "Node", - Name: node.ObjectMeta.Name, - } -} - -func TestMachineSetController_updateMachineSetStatus(t *testing.T) { - tests := []struct { - name string - attemptOutcomes []bool - newStatus v1alpha1.MachineSetStatus - expectErr bool - }{ - { - name: "no change in status, noop", - newStatus: getMachineSetStatus(1, 1, 1, 1), - }, - { - name: "machine set status update success first try", - attemptOutcomes: []bool{true}, - newStatus: getMachineSetStatus(2, 1, 1, 1), - }, - { - name: "machine set status update fail first try, success second try", - attemptOutcomes: []bool{false, true}, - newStatus: getMachineSetStatus(1, 2, 1, 1), - }, - { - name: "machine set status update fail second try", - attemptOutcomes: []bool{false, false}, - newStatus: getMachineSetStatus(1, 1, 2, 1), - expectErr: true, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - ms := createMachineSet(1, "foo", "bar1", "acme") - ms.Status = getMachineSetStatus(1, 1, 1, 1) - - rObjects := []runtime.Object{ms} - fakeClient := fake.NewSimpleClientset(rObjects...) - - numCalls := 0 - fakeClient.PrependReactor("update", "machinesets", func(action core.Action) (bool, runtime.Object, error) { - success := test.attemptOutcomes[numCalls] - numCalls++ - if !success { - return true, nil, fmt.Errorf("error") - } - newMS := ms.DeepCopy() - newMS.Status = test.newStatus - return true, newMS, nil - }) - - updatedMS, err := updateMachineSetStatus(fakeClient.ClusterV1alpha1().MachineSets(ms.Namespace), ms, test.newStatus) - - if numCalls != len(test.attemptOutcomes) { - t.Fatalf("got %v update calls, expected %v update calls", numCalls, len(test.attemptOutcomes)) - } - - if (err != nil) != test.expectErr { - t.Fatalf("got %v err, expected %v err, %v", err != nil, test.expectErr, err) - } - if !test.expectErr && len(test.attemptOutcomes) > 0 { - if !reflect.DeepEqual(updatedMS.Status, test.newStatus) { - t.Fatalf("got %v status, expected %v status", updatedMS.Status, test.newStatus) - } - } - }) - } -} - -func getMachineSetStatus(replicas, labeled, ready, available int32) v1alpha1.MachineSetStatus { - return v1alpha1.MachineSetStatus{ - Replicas: replicas, - FullyLabeledReplicas: labeled, - ReadyReplicas: ready, - AvailableReplicas: available, - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/zz_generated.api.register.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/zz_generated.api.register.go deleted file mode 100644 index 5fb020bf032..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/machineset/zz_generated.api.register.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by apiregister-gen. Do not edit it manually! - -package machineset - -import ( - "github.com/golang/glog" - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" -) - -// MachineSetController implements the controller.MachineSetController interface -type MachineSetController struct { - queue *controller.QueueWorker - - // Handles messages - controller *MachineSetControllerImpl - - Name string - - BeforeReconcile func(key string) - AfterReconcile func(key string, err error) - - Informers *sharedinformers.SharedInformers -} - -// NewController returns a new MachineSetController for responding to MachineSet events -func NewMachineSetController(config *rest.Config, si *sharedinformers.SharedInformers) *MachineSetController { - q := workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "MachineSet") - - queue := &controller.QueueWorker{q, 10, "MachineSet", nil} - c := &MachineSetController{queue, nil, "MachineSet", nil, nil, si} - - // For non-generated code to add events - uc := &MachineSetControllerImpl{} - var ci sharedinformers.Controller = uc - - // Call the Init method that is implemented. - // Support multiple Init methods for backwards compatibility - if i, ok := ci.(sharedinformers.LegacyControllerInit); ok { - i.Init(config, si, c.LookupAndReconcile) - } else if i, ok := ci.(sharedinformers.ControllerInit); ok { - i.Init(&sharedinformers.ControllerInitArgumentsImpl{si, config, c.LookupAndReconcile}) - } - - c.controller = uc - - queue.Reconcile = c.reconcile - if c.Informers.WorkerQueues == nil { - c.Informers.WorkerQueues = map[string]*controller.QueueWorker{} - } - c.Informers.WorkerQueues["MachineSet"] = queue - si.Factory.Cluster().V1alpha1().MachineSets().Informer(). - AddEventHandler(&controller.QueueingEventHandler{q, nil, false}) - return c -} - -func (c *MachineSetController) GetName() string { - return c.Name -} - -func (c *MachineSetController) LookupAndReconcile(key string) (err error) { - return c.reconcile(key) -} - -func (c *MachineSetController) reconcile(key string) (err error) { - var namespace, name string - - if c.BeforeReconcile != nil { - c.BeforeReconcile(key) - } - if c.AfterReconcile != nil { - // Wrap in a function so err is evaluated after it is set - defer func() { c.AfterReconcile(key, err) }() - } - - namespace, name, err = cache.SplitMetaNamespaceKey(key) - if err != nil { - return - } - - u, err := c.controller.Get(namespace, name) - if errors.IsNotFound(err) { - glog.Infof("Not doing work for MachineSet %v because it has been deleted", key) - // Set error so it is picked up by AfterReconcile and the return function - err = nil - return - } - if err != nil { - glog.Errorf("Unable to retrieve MachineSet %v from store: %v", key, err) - return - } - - // Set error so it is picked up by AfterReconcile and the return function - err = c.controller.Reconcile(u) - - return -} - -func (c *MachineSetController) Run(stopCh <-chan struct{}) { - for _, q := range c.Informers.WorkerQueues { - q.Run(stopCh) - } - controller.GetDefaults(c.controller).Run(stopCh) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/BUILD.bazel deleted file mode 100644 index b06000c3b1d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/BUILD.bazel +++ /dev/null @@ -1,23 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["util.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil", - importpath = "sigs.k8s.io/cluster-api/pkg/controller/noderefutil", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["util_test.go"], - embed = [":go_default_library"], - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/util.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/util.go deleted file mode 100644 index a5bf0b84228..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/util.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package noderefutil - -import ( - "time" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// IsNodeAvailable returns true if the node is ready and minReadySeconds have elapsed or is 0. False otherwise. -func IsNodeAvailable(node *corev1.Node, minReadySeconds int32, now metav1.Time) bool { - if !IsNodeReady(node) { - return false - } - - if minReadySeconds == 0 { - return true - } - - minReadySecondsDuration := time.Duration(minReadySeconds) * time.Second - readyCondition := GetReadyCondition(&node.Status) - - if !readyCondition.LastTransitionTime.IsZero() && - readyCondition.LastTransitionTime.Add(minReadySecondsDuration).Before(now.Time) { - return true - } - - return false -} - -// GetReadyCondition extracts the ready condition from the given status and returns that. -// Returns nil and -1 if the condition is not present, and the index of the located condition. -func GetReadyCondition(status *corev1.NodeStatus) *corev1.NodeCondition { - if status == nil { - return nil - } - for i := range status.Conditions { - if status.Conditions[i].Type == corev1.NodeReady { - return &status.Conditions[i] - } - } - return nil -} - -// IsNodeReady returns true if a node is ready; false otherwise. -func IsNodeReady(node *corev1.Node) bool { - if node == nil || &node.Status == nil { - return false - } - for _, c := range node.Status.Conditions { - if c.Type == corev1.NodeReady { - return c.Status == corev1.ConditionTrue - } - } - return false -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/util_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/util_test.go deleted file mode 100644 index 644b5ebb423..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/noderefutil/util_test.go +++ /dev/null @@ -1,294 +0,0 @@ -package noderefutil - -import ( - "reflect" - "testing" - "time" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestIsNodeAvaialble(t *testing.T) { - tests := []struct { - name string - node *corev1.Node - minReadySeconds int32 - expectedAvailable bool - }{ - { - name: "no node", - expectedAvailable: false, - }, - { - name: "no status", - node: &corev1.Node{}, - expectedAvailable: false, - }, - { - name: "no condition", - node: &corev1.Node{Status: corev1.NodeStatus{}}, - expectedAvailable: false, - }, - { - name: "no ready condition", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeOutOfDisk, - Status: corev1.ConditionTrue, - }, - }}, - }, - expectedAvailable: false, - }, - { - name: "ready condition true, minReadySeconds = 0, lastTransitionTime now", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionTrue, - LastTransitionTime: metav1.Now(), - }, - }}, - }, - expectedAvailable: true, - }, - { - name: "ready condition true, minReadySeconds = 0, lastTransitionTime past", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionTrue, - LastTransitionTime: metav1.Time{Time: time.Now().Add(time.Duration(-700) * time.Second)}, - }, - }}, - }, - expectedAvailable: true, - }, - { - name: "ready condition true, minReadySeconds = 300, lastTransitionTime now", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionTrue, - LastTransitionTime: metav1.Now(), - }, - }}, - }, - minReadySeconds: 300, - expectedAvailable: false, - }, - { - name: "ready condition true, minReadySeconds = 300, lastTransitionTime past", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionTrue, - LastTransitionTime: metav1.Time{Time: time.Now().Add(time.Duration(-700) * time.Second)}, - }, - }}, - }, - minReadySeconds: 300, - expectedAvailable: true, - }, - { - name: "ready condition false", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionFalse, - }, - }}, - }, - expectedAvailable: false, - }, - { - name: "ready condition unknown", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionUnknown, - }, - }}, - }, - expectedAvailable: false, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - isAvailable := IsNodeAvailable(test.node, test.minReadySeconds, metav1.Now()) - if isAvailable != test.expectedAvailable { - t.Fatalf("got %v available, expected %v available", isAvailable, test.expectedAvailable) - } - }) - } -} - -func TestGetReadyCondition(t *testing.T) { - tests := []struct { - name string - nodeStatus *corev1.NodeStatus - expectedCondition *corev1.NodeCondition - }{ - { - name: "no status", - }, - { - name: "no condition", - nodeStatus: &corev1.NodeStatus{}, - }, - { - name: "no ready condition", - nodeStatus: &corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeOutOfDisk, - Status: corev1.ConditionTrue, - }, - }, - }, - }, - { - name: "ready condition true", - nodeStatus: &corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionTrue, - }, - }, - }, - expectedCondition: &corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionTrue, - }, - }, - { - name: "ready condition false", - nodeStatus: &corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionFalse, - }, - }, - }, - expectedCondition: &corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionFalse, - }, - }, - { - name: "ready condition unknown", - nodeStatus: &corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionUnknown, - }, - }, - }, - expectedCondition: &corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionUnknown, - }, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - c := GetReadyCondition(test.nodeStatus) - if !reflect.DeepEqual(c, test.expectedCondition) { - t.Fatalf("got %v condition, expected %v condition", c, test.expectedCondition) - } - }) - } -} - -func TestIsNodeReady(t *testing.T) { - tests := []struct { - name string - node *corev1.Node - expectedReady bool - }{ - { - name: "no node", - expectedReady: false, - }, - { - name: "no status", - node: &corev1.Node{}, - expectedReady: false, - }, - { - name: "no condition", - node: &corev1.Node{Status: corev1.NodeStatus{}}, - expectedReady: false, - }, - { - name: "no ready condition", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeOutOfDisk, - Status: corev1.ConditionTrue, - }, - }}, - }, - expectedReady: false, - }, - { - name: "ready condition true", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionTrue, - }, - }}, - }, - expectedReady: true, - }, - { - name: "ready condition false", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionFalse, - }, - }}, - }, - expectedReady: false, - }, - { - name: "ready condition unknown", - node: &corev1.Node{Status: corev1.NodeStatus{ - Conditions: []corev1.NodeCondition{ - corev1.NodeCondition{ - Type: corev1.NodeReady, - Status: corev1.ConditionUnknown, - }, - }}, - }, - expectedReady: false, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - isReady := IsNodeReady(test.node) - if isReady != test.expectedReady { - t.Fatalf("got %v ready, expected %v ready", isReady, test.expectedReady) - } - }) - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/BUILD deleted file mode 100644 index 6cf80522907..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/BUILD +++ /dev/null @@ -1,20 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "informers.go", - "zz_generated.api.register.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers", - importpath = "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/kubernetes-incubator/apiserver-builder/pkg/controller:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/doc.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/doc.go deleted file mode 100644 index f1a849946c7..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/doc.go +++ /dev/null @@ -1,21 +0,0 @@ - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - -package sharedinformers - diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/informers.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/informers.go deleted file mode 100644 index 5a8ce07cb02..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/informers.go +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package sharedinformers - -// SetupKubernetesTypes registers the config for watching Kubernetes types -func (si *SharedInformers) SetupKubernetesTypes() bool { - // Set this to true to initial the ClientSet and InformerFactory for - // Kubernetes APIs (e.g. Node) - return true -} - -// StartAdditionalInformers starts watching Nodes -func (si *SharedInformers) StartAdditionalInformers(shutdown <-chan struct{}) { - // Start specific Kubernetes API informers here. Note, it is only necessary - // to start 1 informer for each Kind. - go si.KubernetesFactory.Core().V1().Nodes().Informer().Run(shutdown) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/zz_generated.api.register.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/zz_generated.api.register.go deleted file mode 100644 index 644b2834a16..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/zz_generated.api.register.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by apiregister-gen. Do not edit it manually! - -package sharedinformers - -import ( - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/cache" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - "sigs.k8s.io/cluster-api/pkg/client/informers_generated/externalversions" - "time" -) - -// SharedInformers wraps all informers used by controllers so that -// they are shared across controller implementations -type SharedInformers struct { - controller.SharedInformersDefaults - Factory externalversions.SharedInformerFactory -} - -// newSharedInformers returns a set of started informers -func NewSharedInformers(config *rest.Config, shutdown <-chan struct{}) *SharedInformers { - si := &SharedInformers{ - controller.SharedInformersDefaults{}, - externalversions.NewSharedInformerFactory(clientset.NewForConfigOrDie(config), 10*time.Minute), - } - if si.SetupKubernetesTypes() { - si.InitKubernetesInformers(config) - } - si.Init() - si.startInformers(shutdown) - si.StartAdditionalInformers(shutdown) - return si -} - -// startInformers starts all of the informers -func (si *SharedInformers) startInformers(shutdown <-chan struct{}) { - go si.Factory.Cluster().V1alpha1().Clusters().Informer().Run(shutdown) - go si.Factory.Cluster().V1alpha1().Machines().Informer().Run(shutdown) - go si.Factory.Cluster().V1alpha1().MachineDeployments().Informer().Run(shutdown) - go si.Factory.Cluster().V1alpha1().MachineSets().Informer().Run(shutdown) -} - -// ControllerInitArguments are arguments provided to the Init function for a new controller. -type ControllerInitArguments interface { - // GetSharedInformers returns the SharedInformers that can be used to access - // informers and listers for watching and indexing Kubernetes Resources - GetSharedInformers() *SharedInformers - - // GetRestConfig returns the Config to create new client-go clients - GetRestConfig() *rest.Config - - // Watch uses resourceInformer to watch a resource. When create, update, or deletes - // to the resource type are encountered, watch uses watchResourceToReconcileResourceKey - // to lookup the key for the resource reconciled by the controller (maybe a different type - // than the watched resource), and enqueue it to be reconciled. - // watchName: name of the informer. may appear in logs - // resourceInformer: gotten from the SharedInformer. controls which resource type is watched - // getReconcileKey: takes an instance of the watched resource and returns - // a key for the reconciled resource type to enqueue. - Watch(watchName string, resourceInformer cache.SharedIndexInformer, - getReconcileKey func(interface{}) (string, error)) -} - -type ControllerInitArgumentsImpl struct { - Si *SharedInformers - Rc *rest.Config - Rk func(key string) error -} - -func (c ControllerInitArgumentsImpl) GetSharedInformers() *SharedInformers { - return c.Si -} - -func (c ControllerInitArgumentsImpl) GetRestConfig() *rest.Config { - return c.Rc -} - -// Watch uses resourceInformer to watch a resource. When create, update, or deletes -// to the resource type are encountered, watch uses watchResourceToReconcileResourceKey -// to lookup the key for the resource reconciled by the controller (maybe a different type -// than the watched resource), and enqueue it to be reconciled. -// watchName: name of the informer. may appear in logs -// resourceInformer: gotten from the SharedInformer. controls which resource type is watched -// getReconcileKey: takes an instance of the watched resource and returns -// a key for the reconciled resource type to enqueue. -func (c ControllerInitArgumentsImpl) Watch( - watchName string, resourceInformer cache.SharedIndexInformer, - getReconcileKey func(interface{}) (string, error)) { - c.Si.Watch(watchName, resourceInformer, getReconcileKey, c.Rk) -} - -type Controller interface{} - -// LegacyControllerInit old controllers may implement this, and we keep -// it for backwards compatibility. -type LegacyControllerInit interface { - Init(config *rest.Config, si *SharedInformers, r func(key string) error) -} - -// ControllerInit new controllers should implement this. It is more flexible in -// allowing additional options to be passed in -type ControllerInit interface { - Init(args ControllerInitArguments) -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/controller/zz_generated.api.register.go b/vendor/sigs.k8s.io/cluster-api/pkg/controller/zz_generated.api.register.go deleted file mode 100644 index 772686a7941..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/controller/zz_generated.api.register.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by apiregister-gen. Do not edit it manually! - -package controller - -import ( - "github.com/kubernetes-incubator/apiserver-builder/pkg/controller" - "k8s.io/client-go/rest" - "sigs.k8s.io/cluster-api/pkg/controller/machinedeployment" - "sigs.k8s.io/cluster-api/pkg/controller/machineset" - "sigs.k8s.io/cluster-api/pkg/controller/sharedinformers" -) - -func GetAllControllers(config *rest.Config) ([]controller.Controller, chan struct{}) { - shutdown := make(chan struct{}) - si := sharedinformers.NewSharedInformers(config, shutdown) - return []controller.Controller{ - machinedeployment.NewMachineDeploymentController(config, si), - machineset.NewMachineSetController(config, si), - }, shutdown -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/doc.go b/vendor/sigs.k8s.io/cluster-api/pkg/doc.go deleted file mode 100644 index d62e1b811b4..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/doc.go +++ /dev/null @@ -1,21 +0,0 @@ - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - -package pkg - diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/openapi/BUILD b/vendor/sigs.k8s.io/cluster-api/pkg/openapi/BUILD deleted file mode 100644 index 5eda8af8820..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/openapi/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "openapi_generated.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/openapi", - importpath = "sigs.k8s.io/cluster-api/pkg/openapi", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/openapi/doc.go b/vendor/sigs.k8s.io/cluster-api/pkg/openapi/doc.go deleted file mode 100644 index 1aa5cfd5a67..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/openapi/doc.go +++ /dev/null @@ -1,21 +0,0 @@ - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - -package openapi - diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/openapi/openapi_generated.go b/vendor/sigs.k8s.io/cluster-api/pkg/openapi/openapi_generated.go deleted file mode 100644 index 3978ea70bfa..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/openapi/openapi_generated.go +++ /dev/null @@ -1,24536 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by openapi-gen. Do not edit it manually! - -package openapi - -import ( - spec "github.com/go-openapi/spec" - resource "k8s.io/apimachinery/pkg/api/resource" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - intstr "k8s.io/apimachinery/pkg/util/intstr" - common "k8s.io/kube-openapi/pkg/common" -) - -func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { - return map[string]common.OpenAPIDefinition{ - "k8s.io/api/admissionregistration/v1alpha1.Initializer": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Initializer describes the name and the failure policy of an initializer, and what resources it applies to.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required", - Type: []string{"string"}, - Format: "", - }, - }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.Rule"), - }, - }, - }, - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.Rule"}, - }, - "k8s.io/api/admissionregistration/v1alpha1.InitializerConfiguration": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "InitializerConfiguration describes the configuration of initializers.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "initializers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.Initializer"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.Initializer", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/admissionregistration/v1alpha1.InitializerConfigurationList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "InitializerConfigurationList is a list of InitializerConfiguration.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of InitializerConfiguration.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1alpha1.InitializerConfiguration"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/admissionregistration/v1alpha1.InitializerConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/admissionregistration/v1alpha1.Rule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.", - Properties: map[string]spec.Schema{ - "apiGroups": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "apiVersions": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "webhooks": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Webhooks is a list of webhooks and the affected resources and operations.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.Webhook"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.Webhook", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfigurationList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of MutatingWebhookConfiguration.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.MutatingWebhookConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/admissionregistration/v1beta1.Rule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.", - Properties: map[string]spec.Schema{ - "apiGroups": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "apiVersions": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/admissionregistration/v1beta1.RuleWithOperations": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", - Properties: map[string]spec.Schema{ - "operations": { - SchemaProps: spec.SchemaProps{ - Description: "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "apiGroups": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "apiVersions": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/admissionregistration/v1beta1.ServiceReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceReference holds a reference to Service.legacy.k8s.io", - Properties: map[string]spec.Schema{ - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "`namespace` is the namespace of the service. Required", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "`name` is the name of the service. Required", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "`path` is an optional URL path which will be sent in any request to this service.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"namespace", "name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "webhooks": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Webhooks is a list of webhooks and the affected resources and operations.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.Webhook"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.Webhook", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfigurationList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of ValidatingWebhookConfiguration.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ValidatingWebhookConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/admissionregistration/v1beta1.Webhook": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Webhook describes an admission webhook and the resources and operations it applies to.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", - Type: []string{"string"}, - Format: "", - }, - }, - "clientConfig": { - SchemaProps: spec.SchemaProps{ - Description: "ClientConfig defines how to communicate with the hook. Required", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig"), - }, - }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1beta1.RuleWithOperations"), - }, - }, - }, - }, - }, - "failurePolicy": { - SchemaProps: spec.SchemaProps{ - Description: "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", - Type: []string{"string"}, - Format: "", - }, - }, - "namespaceSelector": { - SchemaProps: spec.SchemaProps{ - Description: "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - }, - Required: []string{"name", "clientConfig"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.RuleWithOperations", "k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/admissionregistration/v1beta1.WebhookClientConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "WebhookClientConfig contains the information to make a TLS connection with the webhook", - Properties: map[string]spec.Schema{ - "url": { - SchemaProps: spec.SchemaProps{ - Description: "`url` gives the location of the webhook, in standard URL form (`[scheme://]host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", - Type: []string{"string"}, - Format: "", - }, - }, - "service": { - SchemaProps: spec.SchemaProps{ - Description: "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.\n\nIf there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error.", - Ref: ref("k8s.io/api/admissionregistration/v1beta1.ServiceReference"), - }, - }, - "caBundle": { - SchemaProps: spec.SchemaProps{ - Description: "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. Required.", - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - Required: []string{"caBundle"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/admissionregistration/v1beta1.ServiceReference"}, - }, - "k8s.io/api/apps/v1.ControllerRevision": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data is the serialized representation of the state.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - "revision": { - SchemaProps: spec.SchemaProps{ - Description: "Revision indicates the revision of the state represented by Data.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - Required: []string{"revision"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - }, - "k8s.io/api/apps/v1.ControllerRevisionList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of ControllerRevisions", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.ControllerRevision"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.ControllerRevision", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1.DaemonSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSet represents the configuration of a daemon set.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/apps/v1.DaemonSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/apps/v1.DaemonSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.DaemonSetSpec", "k8s.io/api/apps/v1.DaemonSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1.DaemonSetCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetCondition describes the state of a DaemonSet at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of DaemonSet condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/apps/v1.DaemonSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetList is a collection of daemon sets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "A list of daemon sets.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.DaemonSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.DaemonSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1.DaemonSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetSpec is the specification of a daemon set.", - Properties: map[string]spec.Schema{ - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "updateStrategy": { - SchemaProps: spec.SchemaProps{ - Description: "An update strategy to replace existing DaemonSet pods with new pods.", - Ref: ref("k8s.io/api/apps/v1.DaemonSetUpdateStrategy"), - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"selector", "template"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.DaemonSetUpdateStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/apps/v1.DaemonSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetStatus represents the current status of a daemon set.", - Properties: map[string]spec.Schema{ - "currentNumberScheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberMisscheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "desiredNumberScheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberReady": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "The most recent generation observed by the daemon set controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "updatedNumberScheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The total number of nodes that are running updated daemon pod", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberAvailable": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "collisionCount": { - SchemaProps: spec.SchemaProps{ - Description: "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a DaemonSet's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.DaemonSetCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"currentNumberScheduled", "numberMisscheduled", "desiredNumberScheduled", "numberReady"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.DaemonSetCondition"}, - }, - "k8s.io/api/apps/v1.DaemonSetUpdateStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "Rolling update config params. Present only if type = \"RollingUpdate\".", - Ref: ref("k8s.io/api/apps/v1.RollingUpdateDaemonSet"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.RollingUpdateDaemonSet"}, - }, - "k8s.io/api/apps/v1.Deployment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Deployment enables declarative updates for Pods and ReplicaSets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the Deployment.", - Ref: ref("k8s.io/api/apps/v1.DeploymentSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the Deployment.", - Ref: ref("k8s.io/api/apps/v1.DeploymentStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.DeploymentSpec", "k8s.io/api/apps/v1.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1.DeploymentCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentCondition describes the state of a deployment at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of deployment condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time this condition was updated.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/apps/v1.DeploymentList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentList is a list of Deployments.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of Deployments.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.Deployment"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1.DeploymentSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentSpec is the specification of the desired behavior of the Deployment.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template describes the pods that will be created.", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "strategy": { - SchemaProps: spec.SchemaProps{ - Description: "The deployment strategy to use to replace existing pods with new ones.", - Ref: ref("k8s.io/api/apps/v1.DeploymentStrategy"), - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "paused": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the deployment is paused.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "progressDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"selector", "template"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.DeploymentStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/apps/v1.DeploymentStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentStatus is the most recently observed status of the Deployment.", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "The generation observed by the deployment controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "updatedReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of ready pods targeted by this deployment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "unavailableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a deployment's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.DeploymentCondition"), - }, - }, - }, - }, - }, - "collisionCount": { - SchemaProps: spec.SchemaProps{ - Description: "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.DeploymentCondition"}, - }, - "k8s.io/api/apps/v1.DeploymentStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentStrategy describes how to replace existing pods with new ones.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - Ref: ref("k8s.io/api/apps/v1.RollingUpdateDeployment"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.RollingUpdateDeployment"}, - }, - "k8s.io/api/apps/v1.ReplicaSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSet ensures that a specified number of pod replicas are running at any given time.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/apps/v1.ReplicaSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/apps/v1.ReplicaSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.ReplicaSetSpec", "k8s.io/api/apps/v1.ReplicaSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1.ReplicaSetCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetCondition describes the state of a replica set at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of replica set condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/apps/v1.ReplicaSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetList is a collection of ReplicaSets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.ReplicaSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.ReplicaSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1.ReplicaSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetSpec is the specification of a ReplicaSet.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - }, - Required: []string{"selector"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/apps/v1.ReplicaSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetStatus represents the current status of a ReplicaSet.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "fullyLabeledReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of pods that have labels matching the labels of the pod template of the replicaset.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of ready replicas for this replica set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of available replicas (ready for at least minReadySeconds) for this replica set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a replica set's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.ReplicaSetCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.ReplicaSetCondition"}, - }, - "k8s.io/api/apps/v1.RollingUpdateDaemonSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Spec to control the desired behavior of daemon set rolling update.", - Properties: map[string]spec.Schema{ - "maxUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/apps/v1.RollingUpdateDeployment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Spec to control the desired behavior of rolling update.", - Properties: map[string]spec.Schema{ - "maxUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "maxSurge": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", - Properties: map[string]spec.Schema{ - "partition": { - SchemaProps: spec.SchemaProps{ - Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/apps/v1.StatefulSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired identities of pods in this set.", - Ref: ref("k8s.io/api/apps/v1.StatefulSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", - Ref: ref("k8s.io/api/apps/v1.StatefulSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.StatefulSetSpec", "k8s.io/api/apps/v1.StatefulSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1.StatefulSetCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetCondition describes the state of a statefulset at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of statefulset condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/apps/v1.StatefulSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetList is a collection of StatefulSets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.StatefulSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.StatefulSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1.StatefulSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A StatefulSetSpec is the specification of a StatefulSet.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "volumeClaimTemplates": { - SchemaProps: spec.SchemaProps{ - Description: "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), - }, - }, - }, - }, - }, - "serviceName": { - SchemaProps: spec.SchemaProps{ - Description: "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", - Type: []string{"string"}, - Format: "", - }, - }, - "podManagementPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", - Type: []string{"string"}, - Format: "", - }, - }, - "updateStrategy": { - SchemaProps: spec.SchemaProps{ - Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", - Ref: ref("k8s.io/api/apps/v1.StatefulSetUpdateStrategy"), - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"selector", "template", "serviceName"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/apps/v1.StatefulSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetStatus represents the current state of a StatefulSet.", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "replicas is the number of Pods created by the StatefulSet controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "updatedReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentRevision": { - SchemaProps: spec.SchemaProps{ - Description: "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", - Type: []string{"string"}, - Format: "", - }, - }, - "updateRevision": { - SchemaProps: spec.SchemaProps{ - Description: "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", - Type: []string{"string"}, - Format: "", - }, - }, - "collisionCount": { - SchemaProps: spec.SchemaProps{ - Description: "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a statefulset's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1.StatefulSetCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.StatefulSetCondition"}, - }, - "k8s.io/api/apps/v1.StatefulSetUpdateStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", - Ref: ref("k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1.RollingUpdateStatefulSetStrategy"}, - }, - "k8s.io/api/apps/v1beta1.ControllerRevision": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data is the serialized representation of the state.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - "revision": { - SchemaProps: spec.SchemaProps{ - Description: "Revision indicates the revision of the state represented by Data.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - Required: []string{"revision"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - }, - "k8s.io/api/apps/v1beta1.ControllerRevisionList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of ControllerRevisions", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta1.ControllerRevision"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.ControllerRevision", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1beta1.Deployment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the Deployment.", - Ref: ref("k8s.io/api/apps/v1beta1.DeploymentSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the Deployment.", - Ref: ref("k8s.io/api/apps/v1beta1.DeploymentStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.DeploymentSpec", "k8s.io/api/apps/v1beta1.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1beta1.DeploymentCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentCondition describes the state of a deployment at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of deployment condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time this condition was updated.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/apps/v1beta1.DeploymentList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentList is a list of Deployments.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of Deployments.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta1.Deployment"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1beta1.DeploymentRollback": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Required: This must match the Name of a deployment.", - Type: []string{"string"}, - Format: "", - }, - }, - "updatedAnnotations": { - SchemaProps: spec.SchemaProps{ - Description: "The annotations to be updated to a deployment", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "rollbackTo": { - SchemaProps: spec.SchemaProps{ - Description: "The config of this deployment rollback.", - Ref: ref("k8s.io/api/apps/v1beta1.RollbackConfig"), - }, - }, - }, - Required: []string{"name", "rollbackTo"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.RollbackConfig"}, - }, - "k8s.io/api/apps/v1beta1.DeploymentSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentSpec is the specification of the desired behavior of the Deployment.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template describes the pods that will be created.", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "strategy": { - SchemaProps: spec.SchemaProps{ - Description: "The deployment strategy to use to replace existing pods with new ones.", - Ref: ref("k8s.io/api/apps/v1beta1.DeploymentStrategy"), - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "paused": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the deployment is paused.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "rollbackTo": { - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.", - Ref: ref("k8s.io/api/apps/v1beta1.RollbackConfig"), - }, - }, - "progressDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"template"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.DeploymentStrategy", "k8s.io/api/apps/v1beta1.RollbackConfig", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/apps/v1beta1.DeploymentStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentStatus is the most recently observed status of the Deployment.", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "The generation observed by the deployment controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "updatedReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of ready pods targeted by this deployment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "unavailableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a deployment's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta1.DeploymentCondition"), - }, - }, - }, - }, - }, - "collisionCount": { - SchemaProps: spec.SchemaProps{ - Description: "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.DeploymentCondition"}, - }, - "k8s.io/api/apps/v1beta1.DeploymentStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentStrategy describes how to replace existing pods with new ones.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - Ref: ref("k8s.io/api/apps/v1beta1.RollingUpdateDeployment"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.RollingUpdateDeployment"}, - }, - "k8s.io/api/apps/v1beta1.RollbackConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED.", - Properties: map[string]spec.Schema{ - "revision": { - SchemaProps: spec.SchemaProps{ - Description: "The revision to rollback to. If set to 0, rollback to the last revision.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/apps/v1beta1.RollingUpdateDeployment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Spec to control the desired behavior of rolling update.", - Properties: map[string]spec.Schema{ - "maxUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "maxSurge": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", - Properties: map[string]spec.Schema{ - "partition": { - SchemaProps: spec.SchemaProps{ - Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/apps/v1beta1.Scale": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Scale represents a scaling request for a resource.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - Ref: ref("k8s.io/api/apps/v1beta1.ScaleSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", - Ref: ref("k8s.io/api/apps/v1beta1.ScaleStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.ScaleSpec", "k8s.io/api/apps/v1beta1.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1beta1.ScaleSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleSpec describes the attributes of a scale subresource", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "desired number of instances for the scaled object.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/apps/v1beta1.ScaleStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleStatus represents the current status of a scale subresource.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "actual number of observed instances of the scaled object.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "targetSelector": { - SchemaProps: spec.SchemaProps{ - Description: "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/apps/v1beta1.StatefulSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired identities of pods in this set.", - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.StatefulSetSpec", "k8s.io/api/apps/v1beta1.StatefulSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1beta1.StatefulSetCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetCondition describes the state of a statefulset at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of statefulset condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/apps/v1beta1.StatefulSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetList is a collection of StatefulSets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.StatefulSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1beta1.StatefulSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A StatefulSetSpec is the specification of a StatefulSet.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "volumeClaimTemplates": { - SchemaProps: spec.SchemaProps{ - Description: "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), - }, - }, - }, - }, - }, - "serviceName": { - SchemaProps: spec.SchemaProps{ - Description: "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", - Type: []string{"string"}, - Format: "", - }, - }, - "podManagementPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", - Type: []string{"string"}, - Format: "", - }, - }, - "updateStrategy": { - SchemaProps: spec.SchemaProps{ - Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy"), - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"template", "serviceName"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/apps/v1beta1.StatefulSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetStatus represents the current state of a StatefulSet.", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "replicas is the number of Pods created by the StatefulSet controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "updatedReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentRevision": { - SchemaProps: spec.SchemaProps{ - Description: "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", - Type: []string{"string"}, - Format: "", - }, - }, - "updateRevision": { - SchemaProps: spec.SchemaProps{ - Description: "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", - Type: []string{"string"}, - Format: "", - }, - }, - "collisionCount": { - SchemaProps: spec.SchemaProps{ - Description: "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a statefulset's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta1.StatefulSetCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.StatefulSetCondition"}, - }, - "k8s.io/api/apps/v1beta1.StatefulSetUpdateStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type indicates the type of the StatefulSetUpdateStrategy.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", - Ref: ref("k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta1.RollingUpdateStatefulSetStrategy"}, - }, - "k8s.io/api/apps/v1beta2.ControllerRevision": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data is the serialized representation of the state.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - "revision": { - SchemaProps: spec.SchemaProps{ - Description: "Revision indicates the revision of the state represented by Data.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - Required: []string{"revision"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - }, - "k8s.io/api/apps/v1beta2.ControllerRevisionList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of ControllerRevisions", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.ControllerRevision"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.ControllerRevision", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1beta2.DaemonSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DaemonSetSpec", "k8s.io/api/apps/v1beta2.DaemonSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1beta2.DaemonSetCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetCondition describes the state of a DaemonSet at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of DaemonSet condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/apps/v1beta2.DaemonSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetList is a collection of daemon sets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "A list of daemon sets.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DaemonSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1beta2.DaemonSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetSpec is the specification of a daemon set.", - Properties: map[string]spec.Schema{ - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "updateStrategy": { - SchemaProps: spec.SchemaProps{ - Description: "An update strategy to replace existing DaemonSet pods with new pods.", - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy"), - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"selector", "template"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/apps/v1beta2.DaemonSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetStatus represents the current status of a daemon set.", - Properties: map[string]spec.Schema{ - "currentNumberScheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberMisscheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "desiredNumberScheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberReady": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "The most recent generation observed by the daemon set controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "updatedNumberScheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The total number of nodes that are running updated daemon pod", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberAvailable": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "collisionCount": { - SchemaProps: spec.SchemaProps{ - Description: "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a DaemonSet's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.DaemonSetCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"currentNumberScheduled", "numberMisscheduled", "desiredNumberScheduled", "numberReady"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DaemonSetCondition"}, - }, - "k8s.io/api/apps/v1beta2.DaemonSetUpdateStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "Rolling update config params. Present only if type = \"RollingUpdate\".", - Ref: ref("k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet"}, - }, - "k8s.io/api/apps/v1beta2.Deployment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the Deployment.", - Ref: ref("k8s.io/api/apps/v1beta2.DeploymentSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the Deployment.", - Ref: ref("k8s.io/api/apps/v1beta2.DeploymentStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DeploymentSpec", "k8s.io/api/apps/v1beta2.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1beta2.DeploymentCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentCondition describes the state of a deployment at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of deployment condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time this condition was updated.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/apps/v1beta2.DeploymentList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentList is a list of Deployments.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of Deployments.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.Deployment"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1beta2.DeploymentSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentSpec is the specification of the desired behavior of the Deployment.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template describes the pods that will be created.", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "strategy": { - SchemaProps: spec.SchemaProps{ - Description: "The deployment strategy to use to replace existing pods with new ones.", - Ref: ref("k8s.io/api/apps/v1beta2.DeploymentStrategy"), - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "paused": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the deployment is paused.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "progressDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"selector", "template"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DeploymentStrategy", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/apps/v1beta2.DeploymentStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentStatus is the most recently observed status of the Deployment.", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "The generation observed by the deployment controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "updatedReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of ready pods targeted by this deployment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "unavailableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a deployment's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.DeploymentCondition"), - }, - }, - }, - }, - }, - "collisionCount": { - SchemaProps: spec.SchemaProps{ - Description: "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.DeploymentCondition"}, - }, - "k8s.io/api/apps/v1beta2.DeploymentStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentStrategy describes how to replace existing pods with new ones.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - Ref: ref("k8s.io/api/apps/v1beta2.RollingUpdateDeployment"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.RollingUpdateDeployment"}, - }, - "k8s.io/api/apps/v1beta2.ReplicaSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.ReplicaSetSpec", "k8s.io/api/apps/v1beta2.ReplicaSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1beta2.ReplicaSetCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetCondition describes the state of a replica set at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of replica set condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/apps/v1beta2.ReplicaSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetList is a collection of ReplicaSets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.ReplicaSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1beta2.ReplicaSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetSpec is the specification of a ReplicaSet.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - }, - Required: []string{"selector"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/apps/v1beta2.ReplicaSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetStatus represents the current status of a ReplicaSet.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "fullyLabeledReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of pods that have labels matching the labels of the pod template of the replicaset.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of ready replicas for this replica set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of available replicas (ready for at least minReadySeconds) for this replica set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a replica set's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.ReplicaSetCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.ReplicaSetCondition"}, - }, - "k8s.io/api/apps/v1beta2.RollingUpdateDaemonSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Spec to control the desired behavior of daemon set rolling update.", - Properties: map[string]spec.Schema{ - "maxUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/apps/v1beta2.RollingUpdateDeployment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Spec to control the desired behavior of rolling update.", - Properties: map[string]spec.Schema{ - "maxUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "maxSurge": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", - Properties: map[string]spec.Schema{ - "partition": { - SchemaProps: spec.SchemaProps{ - Description: "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/apps/v1beta2.Scale": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Scale represents a scaling request for a resource.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - Ref: ref("k8s.io/api/apps/v1beta2.ScaleSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", - Ref: ref("k8s.io/api/apps/v1beta2.ScaleStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.ScaleSpec", "k8s.io/api/apps/v1beta2.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1beta2.ScaleSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleSpec describes the attributes of a scale subresource", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "desired number of instances for the scaled object.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/apps/v1beta2.ScaleStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleStatus represents the current status of a scale subresource.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "actual number of observed instances of the scaled object.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "targetSelector": { - SchemaProps: spec.SchemaProps{ - Description: "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/apps/v1beta2.StatefulSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired identities of pods in this set.", - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.StatefulSetSpec", "k8s.io/api/apps/v1beta2.StatefulSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/apps/v1beta2.StatefulSetCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetCondition describes the state of a statefulset at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of statefulset condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/apps/v1beta2.StatefulSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetList is a collection of StatefulSets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.StatefulSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/apps/v1beta2.StatefulSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A StatefulSetSpec is the specification of a StatefulSet.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "volumeClaimTemplates": { - SchemaProps: spec.SchemaProps{ - Description: "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), - }, - }, - }, - }, - }, - "serviceName": { - SchemaProps: spec.SchemaProps{ - Description: "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", - Type: []string{"string"}, - Format: "", - }, - }, - "podManagementPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", - Type: []string{"string"}, - Format: "", - }, - }, - "updateStrategy": { - SchemaProps: spec.SchemaProps{ - Description: "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy"), - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"selector", "template", "serviceName"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy", "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/apps/v1beta2.StatefulSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetStatus represents the current state of a StatefulSet.", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "replicas is the number of Pods created by the StatefulSet controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "updatedReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentRevision": { - SchemaProps: spec.SchemaProps{ - Description: "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", - Type: []string{"string"}, - Format: "", - }, - }, - "updateRevision": { - SchemaProps: spec.SchemaProps{ - Description: "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", - Type: []string{"string"}, - Format: "", - }, - }, - "collisionCount": { - SchemaProps: spec.SchemaProps{ - Description: "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a statefulset's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/apps/v1beta2.StatefulSetCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.StatefulSetCondition"}, - }, - "k8s.io/api/apps/v1beta2.StatefulSetUpdateStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", - Ref: ref("k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/apps/v1beta2.RollingUpdateStatefulSetStrategy"}, - }, - "k8s.io/api/authentication/v1.TokenReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the request being evaluated", - Ref: ref("k8s.io/api/authentication/v1.TokenReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates whether the request can be authenticated.", - Ref: ref("k8s.io/api/authentication/v1.TokenReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authentication/v1.TokenReviewSpec", "k8s.io/api/authentication/v1.TokenReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/authentication/v1.TokenReviewSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TokenReviewSpec is a description of the token authentication request.", - Properties: map[string]spec.Schema{ - "token": { - SchemaProps: spec.SchemaProps{ - Description: "Token is the opaque bearer token.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authentication/v1.TokenReviewStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TokenReviewStatus is the result of the token authentication request.", - Properties: map[string]spec.Schema{ - "authenticated": { - SchemaProps: spec.SchemaProps{ - Description: "Authenticated indicates that the token was associated with a known user.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "User is the UserInfo associated with the provided token.", - Ref: ref("k8s.io/api/authentication/v1.UserInfo"), - }, - }, - "error": { - SchemaProps: spec.SchemaProps{ - Description: "Error indicates that the token couldn't be checked", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/authentication/v1.UserInfo"}, - }, - "k8s.io/api/authentication/v1.UserInfo": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "UserInfo holds the information about the user needed to implement the user.Info interface.", - Properties: map[string]spec.Schema{ - "username": { - SchemaProps: spec.SchemaProps{ - Description: "The name that uniquely identifies this user among all active users.", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", - Type: []string{"string"}, - Format: "", - }, - }, - "groups": { - SchemaProps: spec.SchemaProps{ - Description: "The names of groups this user is a part of.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "extra": { - SchemaProps: spec.SchemaProps{ - Description: "Any additional information provided by the authenticator.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authentication/v1beta1.TokenReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the request being evaluated", - Ref: ref("k8s.io/api/authentication/v1beta1.TokenReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates whether the request can be authenticated.", - Ref: ref("k8s.io/api/authentication/v1beta1.TokenReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authentication/v1beta1.TokenReviewSpec", "k8s.io/api/authentication/v1beta1.TokenReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/authentication/v1beta1.TokenReviewSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TokenReviewSpec is a description of the token authentication request.", - Properties: map[string]spec.Schema{ - "token": { - SchemaProps: spec.SchemaProps{ - Description: "Token is the opaque bearer token.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authentication/v1beta1.TokenReviewStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TokenReviewStatus is the result of the token authentication request.", - Properties: map[string]spec.Schema{ - "authenticated": { - SchemaProps: spec.SchemaProps{ - Description: "Authenticated indicates that the token was associated with a known user.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "User is the UserInfo associated with the provided token.", - Ref: ref("k8s.io/api/authentication/v1beta1.UserInfo"), - }, - }, - "error": { - SchemaProps: spec.SchemaProps{ - Description: "Error indicates that the token couldn't be checked", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/authentication/v1beta1.UserInfo"}, - }, - "k8s.io/api/authentication/v1beta1.UserInfo": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "UserInfo holds the information about the user needed to implement the user.Info interface.", - Properties: map[string]spec.Schema{ - "username": { - SchemaProps: spec.SchemaProps{ - Description: "The name that uniquely identifies this user among all active users.", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", - Type: []string{"string"}, - Format: "", - }, - }, - "groups": { - SchemaProps: spec.SchemaProps{ - Description: "The names of groups this user is a part of.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "extra": { - SchemaProps: spec.SchemaProps{ - Description: "Any additional information provided by the authenticator.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1.LocalSubjectAccessReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", - Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates whether the request is allowed or not", - Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/authorization/v1.NonResourceAttributes": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the URL path of the request", - Type: []string{"string"}, - Format: "", - }, - }, - "verb": { - SchemaProps: spec.SchemaProps{ - Description: "Verb is the standard HTTP verb", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1.NonResourceRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NonResourceRule holds information that describes a rule for the non-resource", - Properties: map[string]spec.Schema{ - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "nonResourceURLs": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. \"*\" means all.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"verbs"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1.ResourceAttributes": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", - Properties: map[string]spec.Schema{ - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", - Type: []string{"string"}, - Format: "", - }, - }, - "verb": { - SchemaProps: spec.SchemaProps{ - Description: "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "Group is the API Group of the Resource. \"*\" means all.", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Description: "Version is the API Version of the Resource. \"*\" means all.", - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Description: "Resource is one of the existing resource types. \"*\" means all.", - Type: []string{"string"}, - Format: "", - }, - }, - "subresource": { - SchemaProps: spec.SchemaProps{ - Description: "Subresource is one of the existing resource types. \"\" means none.", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1.ResourceRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - Properties: map[string]spec.Schema{ - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "apiGroups": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"*\" means all.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.\n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resourceNames": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"verbs"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1.SelfSubjectAccessReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the request being evaluated. user and groups must be empty", - Ref: ref("k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates whether the request is allowed or not", - Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec", "k8s.io/api/authorization/v1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/authorization/v1.SelfSubjectAccessReviewSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", - Properties: map[string]spec.Schema{ - "resourceAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceAuthorizationAttributes describes information for a resource access request", - Ref: ref("k8s.io/api/authorization/v1.ResourceAttributes"), - }, - }, - "nonResourceAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceAttributes describes information for a non-resource access request", - Ref: ref("k8s.io/api/authorization/v1.NonResourceAttributes"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1.NonResourceAttributes", "k8s.io/api/authorization/v1.ResourceAttributes"}, - }, - "k8s.io/api/authorization/v1.SelfSubjectRulesReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the request being evaluated.", - Ref: ref("k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates the set of actions a user can perform.", - Ref: ref("k8s.io/api/authorization/v1.SubjectRulesReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec", "k8s.io/api/authorization/v1.SubjectRulesReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/authorization/v1.SelfSubjectRulesReviewSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace to evaluate rules for. Required.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1.SubjectAccessReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SubjectAccessReview checks whether or not a user or group can perform an action.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the request being evaluated", - Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates whether the request is allowed or not", - Ref: ref("k8s.io/api/authorization/v1.SubjectAccessReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/authorization/v1.SubjectAccessReviewSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", - Properties: map[string]spec.Schema{ - "resourceAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceAuthorizationAttributes describes information for a resource access request", - Ref: ref("k8s.io/api/authorization/v1.ResourceAttributes"), - }, - }, - "nonResourceAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceAttributes describes information for a non-resource access request", - Ref: ref("k8s.io/api/authorization/v1.NonResourceAttributes"), - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "User is the user you're testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups", - Type: []string{"string"}, - Format: "", - }, - }, - "groups": { - SchemaProps: spec.SchemaProps{ - Description: "Groups is the groups you're testing for.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "extra": { - SchemaProps: spec.SchemaProps{ - Description: "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID information about the requesting user.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1.NonResourceAttributes", "k8s.io/api/authorization/v1.ResourceAttributes"}, - }, - "k8s.io/api/authorization/v1.SubjectAccessReviewStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SubjectAccessReviewStatus", - Properties: map[string]spec.Schema{ - "allowed": { - SchemaProps: spec.SchemaProps{ - Description: "Allowed is required. True if the action would be allowed, false otherwise.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "denied": { - SchemaProps: spec.SchemaProps{ - Description: "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Reason is optional. It indicates why a request was allowed or denied.", - Type: []string{"string"}, - Format: "", - }, - }, - "evaluationError": { - SchemaProps: spec.SchemaProps{ - Description: "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"allowed"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1.SubjectRulesReviewStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.", - Properties: map[string]spec.Schema{ - "resourceRules": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/authorization/v1.ResourceRule"), - }, - }, - }, - }, - }, - "nonResourceRules": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/authorization/v1.NonResourceRule"), - }, - }, - }, - }, - }, - "incomplete": { - SchemaProps: spec.SchemaProps{ - Description: "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "evaluationError": { - SchemaProps: spec.SchemaProps{ - Description: "EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"resourceRules", "nonResourceRules", "incomplete"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1.NonResourceRule", "k8s.io/api/authorization/v1.ResourceRule"}, - }, - "k8s.io/api/authorization/v1beta1.LocalSubjectAccessReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates whether the request is allowed or not", - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/authorization/v1beta1.NonResourceAttributes": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the URL path of the request", - Type: []string{"string"}, - Format: "", - }, - }, - "verb": { - SchemaProps: spec.SchemaProps{ - Description: "Verb is the standard HTTP verb", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1beta1.NonResourceRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NonResourceRule holds information that describes a rule for the non-resource", - Properties: map[string]spec.Schema{ - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "nonResourceURLs": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. \"*\" means all.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"verbs"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1beta1.ResourceAttributes": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", - Properties: map[string]spec.Schema{ - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", - Type: []string{"string"}, - Format: "", - }, - }, - "verb": { - SchemaProps: spec.SchemaProps{ - Description: "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "Group is the API Group of the Resource. \"*\" means all.", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Description: "Version is the API Version of the Resource. \"*\" means all.", - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Description: "Resource is one of the existing resource types. \"*\" means all.", - Type: []string{"string"}, - Format: "", - }, - }, - "subresource": { - SchemaProps: spec.SchemaProps{ - Description: "Subresource is one of the existing resource types. \"\" means none.", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1beta1.ResourceRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - Properties: map[string]spec.Schema{ - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "apiGroups": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"*\" means all.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.\n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resourceNames": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"verbs"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the request being evaluated. user and groups must be empty", - Ref: ref("k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates whether the request is allowed or not", - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/authorization/v1beta1.SelfSubjectAccessReviewSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", - Properties: map[string]spec.Schema{ - "resourceAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceAuthorizationAttributes describes information for a resource access request", - Ref: ref("k8s.io/api/authorization/v1beta1.ResourceAttributes"), - }, - }, - "nonResourceAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceAttributes describes information for a non-resource access request", - Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceAttributes"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.NonResourceAttributes", "k8s.io/api/authorization/v1beta1.ResourceAttributes"}, - }, - "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the request being evaluated.", - Ref: ref("k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates the set of actions a user can perform.", - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/authorization/v1beta1.SelfSubjectRulesReviewSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace to evaluate rules for. Required.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1beta1.SubjectAccessReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SubjectAccessReview checks whether or not a user or group can perform an action.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the request being evaluated", - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the server and indicates whether the request is allowed or not", - Ref: ref("k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec", "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/authorization/v1beta1.SubjectAccessReviewSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", - Properties: map[string]spec.Schema{ - "resourceAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceAuthorizationAttributes describes information for a resource access request", - Ref: ref("k8s.io/api/authorization/v1beta1.ResourceAttributes"), - }, - }, - "nonResourceAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceAttributes describes information for a non-resource access request", - Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceAttributes"), - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "Groups is the groups you're testing for.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "extra": { - SchemaProps: spec.SchemaProps{ - Description: "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID information about the requesting user.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.NonResourceAttributes", "k8s.io/api/authorization/v1beta1.ResourceAttributes"}, - }, - "k8s.io/api/authorization/v1beta1.SubjectAccessReviewStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SubjectAccessReviewStatus", - Properties: map[string]spec.Schema{ - "allowed": { - SchemaProps: spec.SchemaProps{ - Description: "Allowed is required. True if the action would be allowed, false otherwise.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "denied": { - SchemaProps: spec.SchemaProps{ - Description: "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Reason is optional. It indicates why a request was allowed or denied.", - Type: []string{"string"}, - Format: "", - }, - }, - "evaluationError": { - SchemaProps: spec.SchemaProps{ - Description: "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"allowed"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/authorization/v1beta1.SubjectRulesReviewStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.", - Properties: map[string]spec.Schema{ - "resourceRules": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/authorization/v1beta1.ResourceRule"), - }, - }, - }, - }, - }, - "nonResourceRules": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/authorization/v1beta1.NonResourceRule"), - }, - }, - }, - }, - }, - "incomplete": { - SchemaProps: spec.SchemaProps{ - Description: "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "evaluationError": { - SchemaProps: spec.SchemaProps{ - Description: "EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"resourceRules", "nonResourceRules", "incomplete"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/authorization/v1beta1.NonResourceRule", "k8s.io/api/authorization/v1beta1.ResourceRule"}, - }, - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CrossVersionObjectReference contains enough information to let you identify the referred resource.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "API version of the referent", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"kind", "name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "configuration of a horizontal pod autoscaler.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "current information about the autoscaler.", - Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type describes the current condition", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "status is the status of the condition (True, False, Unknown)", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "lastTransitionTime is the last time the condition transitioned from one status to another", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "reason is the reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "message is a human-readable explanation containing details about the transition", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "list of horizontal pod autoscaler objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "list of horizontal pod autoscaler objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "specification of a horizontal pod autoscaler.", - Properties: map[string]spec.Schema{ - "scaleTargetRef": { - SchemaProps: spec.SchemaProps{ - Description: "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", - Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), - }, - }, - "minReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "lower limit for the number of pods that can be set by the autoscaler, default 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "maxReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "targetCPUUtilizationPercentage": { - SchemaProps: spec.SchemaProps{ - Description: "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"scaleTargetRef", "maxReplicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference"}, - }, - "k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "current status of a horizontal pod autoscaler", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "most recent generation observed by this autoscaler.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "lastScaleTime": { - SchemaProps: spec.SchemaProps{ - Description: "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "currentReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "current number of replicas of pods managed by this autoscaler.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "desiredReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "desired number of replicas of pods managed by this autoscaler.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentCPUUtilizationPercentage": { - SchemaProps: spec.SchemaProps{ - Description: "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"currentReplicas", "desiredReplicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/autoscaling/v1.MetricSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It should match one of the fields below.", - Type: []string{"string"}, - Format: "", - }, - }, - "object": { - SchemaProps: spec.SchemaProps{ - Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v1.ObjectMetricSource"), - }, - }, - "pods": { - SchemaProps: spec.SchemaProps{ - Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v1.PodsMetricSource"), - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v1.ResourceMetricSource"), - }, - }, - }, - Required: []string{"type"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ObjectMetricSource", "k8s.io/api/autoscaling/v1.PodsMetricSource", "k8s.io/api/autoscaling/v1.ResourceMetricSource"}, - }, - "k8s.io/api/autoscaling/v1.MetricStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MetricStatus describes the last-read state of a single metric.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It will match one of the fields below.", - Type: []string{"string"}, - Format: "", - }, - }, - "object": { - SchemaProps: spec.SchemaProps{ - Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v1.ObjectMetricStatus"), - }, - }, - "pods": { - SchemaProps: spec.SchemaProps{ - Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v1.PodsMetricStatus"), - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v1.ResourceMetricStatus"), - }, - }, - }, - Required: []string{"type"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ObjectMetricStatus", "k8s.io/api/autoscaling/v1.PodsMetricStatus", "k8s.io/api/autoscaling/v1.ResourceMetricStatus"}, - }, - "k8s.io/api/autoscaling/v1.ObjectMetricSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", - Properties: map[string]spec.Schema{ - "target": { - SchemaProps: spec.SchemaProps{ - Description: "target is the described Kubernetes object.", - Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), - }, - }, - "metricName": { - SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question.", - Type: []string{"string"}, - Format: "", - }, - }, - "targetValue": { - SchemaProps: spec.SchemaProps{ - Description: "targetValue is the target value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"target", "metricName", "targetValue"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v1.ObjectMetricStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", - Properties: map[string]spec.Schema{ - "target": { - SchemaProps: spec.SchemaProps{ - Description: "target is the described Kubernetes object.", - Ref: ref("k8s.io/api/autoscaling/v1.CrossVersionObjectReference"), - }, - }, - "metricName": { - SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question.", - Type: []string{"string"}, - Format: "", - }, - }, - "currentValue": { - SchemaProps: spec.SchemaProps{ - Description: "currentValue is the current value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"target", "metricName", "currentValue"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v1.PodsMetricSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Properties: map[string]spec.Schema{ - "metricName": { - SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question", - Type: []string{"string"}, - Format: "", - }, - }, - "targetAverageValue": { - SchemaProps: spec.SchemaProps{ - Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"metricName", "targetAverageValue"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v1.PodsMetricStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", - Properties: map[string]spec.Schema{ - "metricName": { - SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question", - Type: []string{"string"}, - Format: "", - }, - }, - "currentAverageValue": { - SchemaProps: spec.SchemaProps{ - Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"metricName", "currentAverageValue"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v1.ResourceMetricSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the name of the resource in question.", - Type: []string{"string"}, - Format: "", - }, - }, - "targetAverageUtilization": { - SchemaProps: spec.SchemaProps{ - Description: "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "targetAverageValue": { - SchemaProps: spec.SchemaProps{ - Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v1.ResourceMetricStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the name of the resource in question.", - Type: []string{"string"}, - Format: "", - }, - }, - "currentAverageUtilization": { - SchemaProps: spec.SchemaProps{ - Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentAverageValue": { - SchemaProps: spec.SchemaProps{ - Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"name", "currentAverageValue"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v1.Scale": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Scale represents a scaling request for a resource.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - Ref: ref("k8s.io/api/autoscaling/v1.ScaleSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", - Ref: ref("k8s.io/api/autoscaling/v1.ScaleStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v1.ScaleSpec", "k8s.io/api/autoscaling/v1.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/autoscaling/v1.ScaleSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleSpec describes the attributes of a scale subresource.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "desired number of instances for the scaled object.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/autoscaling/v1.ScaleStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleStatus represents the current status of a scale subresource.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "actual number of observed instances of the scaled object.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CrossVersionObjectReference contains enough information to let you identify the referred resource.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "API version of the referent", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"kind", "name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "status is the current information about the autoscaler.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec", "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type describes the current condition", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "status is the status of the condition (True, False, Unknown)", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "lastTransitionTime is the last time the condition transitioned from one status to another", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "reason is the reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "message is a human-readable explanation containing details about the transition", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "metadata is the standard list metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items is the list of horizontal pod autoscaler objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscaler", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", - Properties: map[string]spec.Schema{ - "scaleTargetRef": { - SchemaProps: spec.SchemaProps{ - Description: "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), - }, - }, - "minReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "maxReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "metrics": { - SchemaProps: spec.SchemaProps{ - Description: "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricSpec"), - }, - }, - }, - }, - }, - }, - Required: []string{"scaleTargetRef", "maxReplicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/api/autoscaling/v2beta1.MetricSpec"}, - }, - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "observedGeneration is the most recent generation observed by this autoscaler.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "lastScaleTime": { - SchemaProps: spec.SchemaProps{ - Description: "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "currentReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "desiredReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentMetrics": { - SchemaProps: spec.SchemaProps{ - Description: "currentMetrics is the last read state of the metrics used by this autoscaler.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta1.MetricStatus"), - }, - }, - }, - }, - }, - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"currentReplicas", "desiredReplicas", "currentMetrics", "conditions"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.HorizontalPodAutoscalerCondition", "k8s.io/api/autoscaling/v2beta1.MetricStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/autoscaling/v2beta1.MetricSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It should match one of the fields below.", - Type: []string{"string"}, - Format: "", - }, - }, - "object": { - SchemaProps: spec.SchemaProps{ - Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ObjectMetricSource"), - }, - }, - "pods": { - SchemaProps: spec.SchemaProps{ - Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.PodsMetricSource"), - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"), - }, - }, - }, - Required: []string{"type"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource", "k8s.io/api/autoscaling/v2beta1.PodsMetricSource", "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource"}, - }, - "k8s.io/api/autoscaling/v2beta1.MetricStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MetricStatus describes the last-read state of a single metric.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type is the type of metric source. It will match one of the fields below.", - Type: []string{"string"}, - Format: "", - }, - }, - "object": { - SchemaProps: spec.SchemaProps{ - Description: "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus"), - }, - }, - "pods": { - SchemaProps: spec.SchemaProps{ - Description: "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.PodsMetricStatus"), - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Description: "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"), - }, - }, - }, - Required: []string{"type"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus", "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus", "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus"}, - }, - "k8s.io/api/autoscaling/v2beta1.ObjectMetricSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", - Properties: map[string]spec.Schema{ - "target": { - SchemaProps: spec.SchemaProps{ - Description: "target is the described Kubernetes object.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), - }, - }, - "metricName": { - SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question.", - Type: []string{"string"}, - Format: "", - }, - }, - "targetValue": { - SchemaProps: spec.SchemaProps{ - Description: "targetValue is the target value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"target", "metricName", "targetValue"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v2beta1.ObjectMetricStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", - Properties: map[string]spec.Schema{ - "target": { - SchemaProps: spec.SchemaProps{ - Description: "target is the described Kubernetes object.", - Ref: ref("k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference"), - }, - }, - "metricName": { - SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question.", - Type: []string{"string"}, - Format: "", - }, - }, - "currentValue": { - SchemaProps: spec.SchemaProps{ - Description: "currentValue is the current value of the metric (as a quantity).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"target", "metricName", "currentValue"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/autoscaling/v2beta1.CrossVersionObjectReference", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v2beta1.PodsMetricSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", - Properties: map[string]spec.Schema{ - "metricName": { - SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question", - Type: []string{"string"}, - Format: "", - }, - }, - "targetAverageValue": { - SchemaProps: spec.SchemaProps{ - Description: "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"metricName", "targetAverageValue"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v2beta1.PodsMetricStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", - Properties: map[string]spec.Schema{ - "metricName": { - SchemaProps: spec.SchemaProps{ - Description: "metricName is the name of the metric in question", - Type: []string{"string"}, - Format: "", - }, - }, - "currentAverageValue": { - SchemaProps: spec.SchemaProps{ - Description: "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"metricName", "currentAverageValue"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v2beta1.ResourceMetricSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the name of the resource in question.", - Type: []string{"string"}, - Format: "", - }, - }, - "targetAverageUtilization": { - SchemaProps: spec.SchemaProps{ - Description: "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "targetAverageValue": { - SchemaProps: spec.SchemaProps{ - Description: "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/autoscaling/v2beta1.ResourceMetricStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the name of the resource in question.", - Type: []string{"string"}, - Format: "", - }, - }, - "currentAverageUtilization": { - SchemaProps: spec.SchemaProps{ - Description: "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentAverageValue": { - SchemaProps: spec.SchemaProps{ - Description: "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"name", "currentAverageValue"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/batch/v1.Job": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Job represents the configuration of a single job.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v1.JobSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v1.JobStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v1.JobSpec", "k8s.io/api/batch/v1.JobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/batch/v1.JobCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JobCondition describes current state of a job.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of job condition, Complete or Failed.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastProbeTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition was checked.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transit from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/batch/v1.JobList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JobList is a collection of jobs.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items is the list of Jobs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/batch/v1.Job"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v1.Job", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/batch/v1.JobSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JobSpec describes how the job execution will look like.", - Properties: map[string]spec.Schema{ - "parallelism": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "completions": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "activeDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "backoffLimit": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the number of retries before marking this job failed. Defaults to 6", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "manualSelector": { - SchemaProps: spec.SchemaProps{ - Description: "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector", - Type: []string{"boolean"}, - Format: "", - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - }, - Required: []string{"template"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/batch/v1.JobStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JobStatus represents the current state of a Job.", - Properties: map[string]spec.Schema{ - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/batch/v1.JobCondition"), - }, - }, - }, - }, - }, - "startTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "completionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "active": { - SchemaProps: spec.SchemaProps{ - Description: "The number of actively running pods.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "succeeded": { - SchemaProps: spec.SchemaProps{ - Description: "The number of pods which reached phase Succeeded.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "failed": { - SchemaProps: spec.SchemaProps{ - Description: "The number of pods which reached phase Failed.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v1.JobCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/batch/v1beta1.CronJob": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CronJob represents the configuration of a single cron job.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v1beta1.CronJobSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v1beta1.CronJobStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v1beta1.CronJobSpec", "k8s.io/api/batch/v1beta1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/batch/v1beta1.CronJobList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CronJobList is a collection of cron jobs.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items is the list of CronJobs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/batch/v1beta1.CronJob"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v1beta1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/batch/v1beta1.CronJobSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CronJobSpec describes how the job execution will look like and when it will actually run.", - Properties: map[string]spec.Schema{ - "schedule": { - SchemaProps: spec.SchemaProps{ - Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", - Type: []string{"string"}, - Format: "", - }, - }, - "startingDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "concurrencyPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", - Type: []string{"string"}, - Format: "", - }, - }, - "suspend": { - SchemaProps: spec.SchemaProps{ - Description: "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "jobTemplate": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the job that will be created when executing a CronJob.", - Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), - }, - }, - "successfulJobsHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "failedJobsHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"schedule", "jobTemplate"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v1beta1.JobTemplateSpec"}, - }, - "k8s.io/api/batch/v1beta1.CronJobStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CronJobStatus represents the current state of a cron job.", - Properties: map[string]spec.Schema{ - "active": { - SchemaProps: spec.SchemaProps{ - Description: "A list of pointers to currently running jobs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - "lastScheduleTime": { - SchemaProps: spec.SchemaProps{ - Description: "Information when was the last time the job was successfully scheduled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/batch/v1beta1.JobTemplate": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JobTemplate describes a template for creating copies of a predefined pod.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v1beta1.JobTemplateSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v1beta1.JobTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/batch/v1beta1.JobTemplateSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JobTemplateSpec describes the data a Job should have when created from a template", - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v1.JobSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/batch/v2alpha1.CronJob": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CronJob represents the configuration of a single cron job.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v2alpha1.CronJobSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v2alpha1.CronJobStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v2alpha1.CronJobSpec", "k8s.io/api/batch/v2alpha1.CronJobStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/batch/v2alpha1.CronJobList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CronJobList is a collection of cron jobs.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items is the list of CronJobs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/batch/v2alpha1.CronJob"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v2alpha1.CronJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/batch/v2alpha1.CronJobSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CronJobSpec describes how the job execution will look like and when it will actually run.", - Properties: map[string]spec.Schema{ - "schedule": { - SchemaProps: spec.SchemaProps{ - Description: "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", - Type: []string{"string"}, - Format: "", - }, - }, - "startingDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "concurrencyPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", - Type: []string{"string"}, - Format: "", - }, - }, - "suspend": { - SchemaProps: spec.SchemaProps{ - Description: "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "jobTemplate": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the job that will be created when executing a CronJob.", - Ref: ref("k8s.io/api/batch/v2alpha1.JobTemplateSpec"), - }, - }, - "successfulJobsHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "failedJobsHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"schedule", "jobTemplate"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v2alpha1.JobTemplateSpec"}, - }, - "k8s.io/api/batch/v2alpha1.CronJobStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CronJobStatus represents the current state of a cron job.", - Properties: map[string]spec.Schema{ - "active": { - SchemaProps: spec.SchemaProps{ - Description: "A list of pointers to currently running jobs.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - "lastScheduleTime": { - SchemaProps: spec.SchemaProps{ - Description: "Information when was the last time the job was successfully scheduled.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/batch/v2alpha1.JobTemplate": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JobTemplate describes a template for creating copies of a predefined pod.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v2alpha1.JobTemplateSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v2alpha1.JobTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/batch/v2alpha1.JobTemplateSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "JobTemplateSpec describes the data a Job should have when created from a template", - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/batch/v1.JobSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/batch/v1.JobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/certificates/v1beta1.CertificateSigningRequest": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describes a certificate signing request", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "The certificate request itself and any additional information.", - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Derived information about the request.", - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec", "k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "request approval state, currently Approved or Denied.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "brief reason for the request state", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "human readable message with details about the request state", - Type: []string{"string"}, - Format: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "timestamp for the last update to this condition", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - Required: []string{"type"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequest"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.CertificateSigningRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", - Properties: map[string]spec.Schema{ - "request": { - SchemaProps: spec.SchemaProps{ - Description: "Base64-encoded PKCS#10 CSR data", - Type: []string{"string"}, - Format: "byte", - }, - }, - "usages": { - SchemaProps: spec.SchemaProps{ - Description: "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "username": { - SchemaProps: spec.SchemaProps{ - Description: "Information about the requesting user. See user.Info interface for details.", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID information about the requesting user. See user.Info interface for details.", - Type: []string{"string"}, - Format: "", - }, - }, - "groups": { - SchemaProps: spec.SchemaProps{ - Description: "Group information about the requesting user. See user.Info interface for details.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "extra": { - SchemaProps: spec.SchemaProps{ - Description: "Extra information about the requesting user. See user.Info interface for details.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - }, - Required: []string{"request"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "Conditions applied to the request, such as approval or denial.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"), - }, - }, - }, - }, - }, - "certificate": { - SchemaProps: spec.SchemaProps{ - Description: "If request was approved, the controller will place the issued certificate here.", - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/certificates/v1beta1.CertificateSigningRequestCondition"}, - }, - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Type: []string{"string"}, - Format: "", - }, - }, - "partition": { - SchemaProps: spec.SchemaProps{ - Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Affinity": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Affinity is a group of affinity scheduling rules.", - Properties: map[string]spec.Schema{ - "nodeAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "Describes node affinity scheduling rules for the pod.", - Ref: ref("k8s.io/api/core/v1.NodeAffinity"), - }, - }, - "podAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAffinity"), - }, - }, - "podAntiAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAntiAffinity"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeAffinity", "k8s.io/api/core/v1.PodAffinity", "k8s.io/api/core/v1.PodAntiAffinity"}, - }, - "k8s.io/api/core/v1.AttachedVolume": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AttachedVolume describes a volume attached to a node", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the attached volume", - Type: []string{"string"}, - Format: "", - }, - }, - "devicePath": { - SchemaProps: spec.SchemaProps{ - Description: "DevicePath represents the device path where the volume should be available", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "devicePath"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.AvoidPods": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.", - Properties: map[string]spec.Schema{ - "preferAvoidPods": { - SchemaProps: spec.SchemaProps{ - Description: "Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PreferAvoidPodsEntry"}, - }, - "k8s.io/api/core/v1.AzureDiskVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Properties: map[string]spec.Schema{ - "diskName": { - SchemaProps: spec.SchemaProps{ - Description: "The Name of the data disk in the blob storage", - Type: []string{"string"}, - Format: "", - }, - }, - "diskURI": { - SchemaProps: spec.SchemaProps{ - Description: "The URI the data disk in the blob storage", - Type: []string{"string"}, - Format: "", - }, - }, - "cachingMode": { - SchemaProps: spec.SchemaProps{ - Description: "Host Caching mode: None, Read Only, Read Write.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"diskName", "diskURI"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Properties: map[string]spec.Schema{ - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "the name of secret that contains Azure Storage Account Name and Key", - Type: []string{"string"}, - Format: "", - }, - }, - "shareName": { - SchemaProps: spec.SchemaProps{ - Description: "Share Name", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretNamespace": { - SchemaProps: spec.SchemaProps{ - Description: "the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"secretName", "shareName"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.AzureFileVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Properties: map[string]spec.Schema{ - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "the name of secret that contains Azure Storage Account Name and Key", - Type: []string{"string"}, - Format: "", - }, - }, - "shareName": { - SchemaProps: spec.SchemaProps{ - Description: "Share Name", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"secretName", "shareName"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Binding": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "target": { - SchemaProps: spec.SchemaProps{ - Description: "The target object that you want to bind to the standard object.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - Required: []string{"target"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.CSIPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents storage that is managed by an external CSI volume driver", - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "Driver is the name of the driver to use for this volume. Required.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeHandle": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"driver", "volumeHandle"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Capabilities": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adds and removes POSIX capabilities from running containers.", - Properties: map[string]spec.Schema{ - "add": { - SchemaProps: spec.SchemaProps{ - Description: "Added capabilities", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "drop": { - SchemaProps: spec.SchemaProps{ - Description: "Removed capabilities", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.CephFSPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretFile": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.CephFSVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretFile": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.CinderVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ClientIPConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClientIPConfig represents the configurations of Client IP based session affinity.", - Properties: map[string]spec.Schema{ - "timeoutSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ComponentCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Information about the condition of a component.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of condition for a component. Valid value: \"Healthy\"", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Message about the condition for a component. For example, information about a health check.", - Type: []string{"string"}, - Format: "", - }, - }, - "error": { - SchemaProps: spec.SchemaProps{ - Description: "Condition error code for a component. For example, a health check error code.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ComponentStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of component conditions observed", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ComponentCondition"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ComponentCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ComponentStatusList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Status of all the conditions for the component as a list of ComponentStatus objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of ComponentStatus objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ComponentStatus"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ConfigMap": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap holds configuration data for pods to consume.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ConfigMapEnvSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ConfigMapKeySelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Selects a key from a ConfigMap.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The key to select.", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap or it's key must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"key"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ConfigMapList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMapList is a resource containing a list of ConfigMap objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of ConfigMaps.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ConfigMap"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMap", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ConfigMapProjection": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap or it's keys must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - }, - "k8s.io/api/core/v1.ConfigMapVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap or it's keys must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - }, - "k8s.io/api/core/v1.Container": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A single application container that you want to run within a pod.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", - Type: []string{"string"}, - Format: "", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.", - Type: []string{"string"}, - Format: "", - }, - }, - "command": { - SchemaProps: spec.SchemaProps{ - Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "args": { - SchemaProps: spec.SchemaProps{ - Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "workingDir": { - SchemaProps: spec.SchemaProps{ - Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", - Type: []string{"string"}, - Format: "", - }, - }, - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "containerPort", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerPort"), - }, - }, - }, - }, - }, - "envFrom": { - SchemaProps: spec.SchemaProps{ - Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), - }, - }, - }, - }, - }, - "env": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of environment variables to set in the container. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvVar"), - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), - }, - }, - "volumeMounts": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "mountPath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Pod volumes to mount into the container's filesystem. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeMount"), - }, - }, - }, - }, - }, - "volumeDevices": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "devicePath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), - }, - }, - }, - }, - }, - "livenessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "readinessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "lifecycle": { - SchemaProps: spec.SchemaProps{ - Description: "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), - }, - }, - "terminationMessagePath": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", - Type: []string{"string"}, - Format: "", - }, - }, - "terminationMessagePolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", - Type: []string{"string"}, - Format: "", - }, - }, - "imagePullPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", - Type: []string{"string"}, - Format: "", - }, - }, - "securityContext": { - SchemaProps: spec.SchemaProps{ - Description: "Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stdinOnce": { - SchemaProps: spec.SchemaProps{ - Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, - }, - "k8s.io/api/core/v1.ContainerImage": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describe a container image", - Properties: map[string]spec.Schema{ - "names": { - SchemaProps: spec.SchemaProps{ - Description: "Names by which this image is known. e.g. [\"gcr.io/google_containers/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "sizeBytes": { - SchemaProps: spec.SchemaProps{ - Description: "The size of the image in bytes.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - Required: []string{"names"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ContainerPort": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerPort represents a network port in a single container.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", - Type: []string{"string"}, - Format: "", - }, - }, - "hostPort": { - SchemaProps: spec.SchemaProps{ - Description: "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "containerPort": { - SchemaProps: spec.SchemaProps{ - Description: "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".", - Type: []string{"string"}, - Format: "", - }, - }, - "hostIP": { - SchemaProps: spec.SchemaProps{ - Description: "What host IP to bind the external port to.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"containerPort"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ContainerState": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", - Properties: map[string]spec.Schema{ - "waiting": { - SchemaProps: spec.SchemaProps{ - Description: "Details about a waiting container", - Ref: ref("k8s.io/api/core/v1.ContainerStateWaiting"), - }, - }, - "running": { - SchemaProps: spec.SchemaProps{ - Description: "Details about a running container", - Ref: ref("k8s.io/api/core/v1.ContainerStateRunning"), - }, - }, - "terminated": { - SchemaProps: spec.SchemaProps{ - Description: "Details about a terminated container", - Ref: ref("k8s.io/api/core/v1.ContainerStateTerminated"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStateRunning", "k8s.io/api/core/v1.ContainerStateTerminated", "k8s.io/api/core/v1.ContainerStateWaiting"}, - }, - "k8s.io/api/core/v1.ContainerStateRunning": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStateRunning is a running state of a container.", - Properties: map[string]spec.Schema{ - "startedAt": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which the container was last (re-)started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.ContainerStateTerminated": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStateTerminated is a terminated state of a container.", - Properties: map[string]spec.Schema{ - "exitCode": { - SchemaProps: spec.SchemaProps{ - Description: "Exit status from the last termination of the container", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "signal": { - SchemaProps: spec.SchemaProps{ - Description: "Signal from the last termination of the container", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason from the last termination of the container", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Message regarding the last termination of the container", - Type: []string{"string"}, - Format: "", - }, - }, - "startedAt": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which previous execution of the container started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "finishedAt": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which the container last terminated", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "containerID": { - SchemaProps: spec.SchemaProps{ - Description: "Container's ID in the format 'docker://'", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"exitCode"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.ContainerStateWaiting": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStateWaiting is a waiting state of a container.", - Properties: map[string]spec.Schema{ - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason the container is not yet running.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Message regarding why the container is not yet running.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ContainerStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStatus contains details for the current status of this container.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", - Type: []string{"string"}, - Format: "", - }, - }, - "state": { - SchemaProps: spec.SchemaProps{ - Description: "Details about the container's current condition.", - Ref: ref("k8s.io/api/core/v1.ContainerState"), - }, - }, - "lastState": { - SchemaProps: spec.SchemaProps{ - Description: "Details about the container's last termination condition.", - Ref: ref("k8s.io/api/core/v1.ContainerState"), - }, - }, - "ready": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies whether the container has passed its readiness probe.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "restartCount": { - SchemaProps: spec.SchemaProps{ - Description: "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images", - Type: []string{"string"}, - Format: "", - }, - }, - "imageID": { - SchemaProps: spec.SchemaProps{ - Description: "ImageID of the container's image.", - Type: []string{"string"}, - Format: "", - }, - }, - "containerID": { - SchemaProps: spec.SchemaProps{ - Description: "Container's ID in the format 'docker://'.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "ready", "restartCount", "image", "imageID"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerState"}, - }, - "k8s.io/api/core/v1.DaemonEndpoint": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonEndpoint contains information about a single Daemon endpoint.", - Properties: map[string]spec.Schema{ - "Port": { - SchemaProps: spec.SchemaProps{ - Description: "Port number of the given endpoint.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"Port"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.DownwardAPIProjection": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", - Properties: map[string]spec.Schema{ - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of DownwardAPIVolume file", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, - }, - "k8s.io/api/core/v1.DownwardAPIVolumeFile": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPIVolumeFile represents information to create the file containing the pod field", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), - }, - }, - "resourceFieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), - }, - }, - "mode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"path"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector"}, - }, - "k8s.io/api/core/v1.DownwardAPIVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of downward API volume file", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, - }, - "k8s.io/api/core/v1.EmptyDirVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "medium": { - SchemaProps: spec.SchemaProps{ - Description: "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Type: []string{"string"}, - Format: "", - }, - }, - "sizeLimit": { - SchemaProps: spec.SchemaProps{ - Description: "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.EndpointAddress": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointAddress is a tuple that describes single IP address.", - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", - Type: []string{"string"}, - Format: "", - }, - }, - "hostname": { - SchemaProps: spec.SchemaProps{ - Description: "The Hostname of this endpoint", - Type: []string{"string"}, - Format: "", - }, - }, - "nodeName": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", - Type: []string{"string"}, - Format: "", - }, - }, - "targetRef": { - SchemaProps: spec.SchemaProps{ - Description: "Reference to object providing the endpoint.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - Required: []string{"ip"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, - }, - "k8s.io/api/core/v1.EndpointPort": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointPort is a tuple that describes a single port.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "The port number of the endpoint.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "The IP protocol for this port. Must be UDP or TCP. Default is TCP.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.EndpointSubset": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", - Properties: map[string]spec.Schema{ - "addresses": { - SchemaProps: spec.SchemaProps{ - Description: "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), - }, - }, - }, - }, - }, - "notReadyAddresses": { - SchemaProps: spec.SchemaProps{ - Description: "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), - }, - }, - }, - }, - }, - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "Port numbers available on the related IP addresses.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointPort"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EndpointAddress", "k8s.io/api/core/v1.EndpointPort"}, - }, - "k8s.io/api/core/v1.Endpoints": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subsets": { - SchemaProps: spec.SchemaProps{ - Description: "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EndpointSubset"), - }, - }, - }, - }, - }, - }, - Required: []string{"subsets"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EndpointSubset", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.EndpointsList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointsList is a list of endpoints.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of endpoints.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Endpoints"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Endpoints", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.EnvFromSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EnvFromSource represents the source of a set of ConfigMaps", - Properties: map[string]spec.Schema{ - "prefix": { - SchemaProps: spec.SchemaProps{ - Description: "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", - Type: []string{"string"}, - Format: "", - }, - }, - "configMapRef": { - SchemaProps: spec.SchemaProps{ - Description: "The ConfigMap to select from", - Ref: ref("k8s.io/api/core/v1.ConfigMapEnvSource"), - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "The Secret to select from", - Ref: ref("k8s.io/api/core/v1.SecretEnvSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapEnvSource", "k8s.io/api/core/v1.SecretEnvSource"}, - }, - "k8s.io/api/core/v1.EnvVar": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EnvVar represents an environment variable present in a Container.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the environment variable. Must be a C_IDENTIFIER.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", - Type: []string{"string"}, - Format: "", - }, - }, - "valueFrom": { - SchemaProps: spec.SchemaProps{ - Description: "Source for the environment variable's value. Cannot be used if value is not empty.", - Ref: ref("k8s.io/api/core/v1.EnvVarSource"), - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EnvVarSource"}, - }, - "k8s.io/api/core/v1.EnvVarSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EnvVarSource represents a source for the value of an EnvVar.", - Properties: map[string]spec.Schema{ - "fieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), - }, - }, - "resourceFieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), - }, - }, - "configMapKeyRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a key of a ConfigMap.", - Ref: ref("k8s.io/api/core/v1.ConfigMapKeySelector"), - }, - }, - "secretKeyRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a key of a secret in the pod's namespace", - Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapKeySelector", "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector", "k8s.io/api/core/v1.SecretKeySelector"}, - }, - "k8s.io/api/core/v1.Event": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Event is a report of an event somewhere in the cluster.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "involvedObject": { - SchemaProps: spec.SchemaProps{ - Description: "The object that this event is about.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the status of this operation.", - Type: []string{"string"}, - Format: "", - }, - }, - "source": { - SchemaProps: spec.SchemaProps{ - Description: "The component reporting this event. Should be a short machine understandable string.", - Ref: ref("k8s.io/api/core/v1.EventSource"), - }, - }, - "firstTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "The time at which the most recent occurrence of this event was recorded.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "count": { - SchemaProps: spec.SchemaProps{ - Description: "The number of times this event has occurred.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of this event (Normal, Warning), new types could be added in the future", - Type: []string{"string"}, - Format: "", - }, - }, - "eventTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time when this Event was first observed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "series": { - SchemaProps: spec.SchemaProps{ - Description: "Data about the Event series this event represents or nil if it's a singleton Event.", - Ref: ref("k8s.io/api/core/v1.EventSeries"), - }, - }, - "action": { - SchemaProps: spec.SchemaProps{ - Description: "What action was taken/failed regarding to the Regarding object.", - Type: []string{"string"}, - Format: "", - }, - }, - "related": { - SchemaProps: spec.SchemaProps{ - Description: "Optional secondary object for more complex actions.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "reportingComponent": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", - Type: []string{"string"}, - Format: "", - }, - }, - "reportingInstance": { - SchemaProps: spec.SchemaProps{ - Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"metadata", "involvedObject"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EventSeries", "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.EventList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventList is a list of events.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of events", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Event"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.EventSeries": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventSeries contain information on series of events, i.e. thing that was/is happening continously for some time.", - Properties: map[string]spec.Schema{ - "count": { - SchemaProps: spec.SchemaProps{ - Description: "Number of occurrences in this series up to the last heartbeat time", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "lastObservedTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time of the last occurence observed", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "state": { - SchemaProps: spec.SchemaProps{ - Description: "State of this Series: Ongoing or Finished", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, - }, - "k8s.io/api/core/v1.EventSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventSource contains information for an event.", - Properties: map[string]spec.Schema{ - "component": { - SchemaProps: spec.SchemaProps{ - Description: "Component from which the event is generated.", - Type: []string{"string"}, - Format: "", - }, - }, - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Node name on which the event is generated.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ExecAction": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExecAction describes a \"run in container\" action.", - Properties: map[string]spec.Schema{ - "command": { - SchemaProps: spec.SchemaProps{ - Description: "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.FCVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "targetWWNs": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: FC target worldwide names (WWNs)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "lun": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: FC target lun number", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "wwids": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.FlexVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "Driver is the name of the driver to use for this volume.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "options": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Extra command options if any.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"driver"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.FlockerVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "datasetName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", - Type: []string{"string"}, - Format: "", - }, - }, - "datasetUUID": { - SchemaProps: spec.SchemaProps{ - Description: "UUID of the dataset. This is unique identifier of a Flocker dataset", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "pdName": { - SchemaProps: spec.SchemaProps{ - Description: "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"string"}, - Format: "", - }, - }, - "partition": { - SchemaProps: spec.SchemaProps{ - Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"pdName"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.GitRepoVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.", - Properties: map[string]spec.Schema{ - "repository": { - SchemaProps: spec.SchemaProps{ - Description: "Repository URL", - Type: []string{"string"}, - Format: "", - }, - }, - "revision": { - SchemaProps: spec.SchemaProps{ - Description: "Commit hash for the specified revision.", - Type: []string{"string"}, - Format: "", - }, - }, - "directory": { - SchemaProps: spec.SchemaProps{ - Description: "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"repository"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.GlusterfsVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "endpoints": { - SchemaProps: spec.SchemaProps{ - Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"endpoints", "path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.HTTPGetAction": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPGetAction describes an action based on HTTP Get requests.", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path to access on the HTTP server.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", - Type: []string{"string"}, - Format: "", - }, - }, - "scheme": { - SchemaProps: spec.SchemaProps{ - Description: "Scheme to use for connecting to the host. Defaults to HTTP.", - Type: []string{"string"}, - Format: "", - }, - }, - "httpHeaders": { - SchemaProps: spec.SchemaProps{ - Description: "Custom headers to set in the request. HTTP allows repeated headers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.HTTPHeader"), - }, - }, - }, - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.HTTPHeader", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/core/v1.HTTPHeader": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPHeader describes a custom header to be used in HTTP probes", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The header field name", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "The header field value", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "value"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Handler": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Handler defines a specific action that should be taken", - Properties: map[string]spec.Schema{ - "exec": { - SchemaProps: spec.SchemaProps{ - Description: "One and only one of the following should be specified. Exec specifies the action to take.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), - }, - }, - "httpGet": { - SchemaProps: spec.SchemaProps{ - Description: "HTTPGet specifies the http request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), - }, - }, - "tcpSocket": { - SchemaProps: spec.SchemaProps{ - Description: "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, - }, - "k8s.io/api/core/v1.HostAlias": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.", - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "IP address of the host file entry.", - Type: []string{"string"}, - Format: "", - }, - }, - "hostnames": { - SchemaProps: spec.SchemaProps{ - Description: "Hostnames for the above IP address.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.HostPathVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "targetPortal": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - Type: []string{"string"}, - Format: "", - }, - }, - "iqn": { - SchemaProps: spec.SchemaProps{ - Description: "Target iSCSI Qualified Name.", - Type: []string{"string"}, - Format: "", - }, - }, - "lun": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Lun number.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "iscsiInterface": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "portals": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "chapAuthDiscovery": { - SchemaProps: spec.SchemaProps{ - Description: "whether support iSCSI Discovery CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "chapAuthSession": { - SchemaProps: spec.SchemaProps{ - Description: "whether support iSCSI Session CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "initiatorName": { - SchemaProps: spec.SchemaProps{ - Description: "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"targetPortal", "iqn", "lun"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.ISCSIVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "targetPortal": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - Type: []string{"string"}, - Format: "", - }, - }, - "iqn": { - SchemaProps: spec.SchemaProps{ - Description: "Target iSCSI Qualified Name.", - Type: []string{"string"}, - Format: "", - }, - }, - "lun": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Lun number.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "iscsiInterface": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "portals": { - SchemaProps: spec.SchemaProps{ - Description: "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "chapAuthDiscovery": { - SchemaProps: spec.SchemaProps{ - Description: "whether support iSCSI Discovery CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "chapAuthSession": { - SchemaProps: spec.SchemaProps{ - Description: "whether support iSCSI Session CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "initiatorName": { - SchemaProps: spec.SchemaProps{ - Description: "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"targetPortal", "iqn", "lun"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.KeyToPath": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Maps a string key to a path within a volume.", - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The key to project.", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", - Type: []string{"string"}, - Format: "", - }, - }, - "mode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"key", "path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Lifecycle": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", - Properties: map[string]spec.Schema{ - "postStart": { - SchemaProps: spec.SchemaProps{ - Description: "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.Handler"), - }, - }, - "preStop": { - SchemaProps: spec.SchemaProps{ - Description: "PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.Handler"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Handler"}, - }, - "k8s.io/api/core/v1.LimitRange": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRange sets resource usage limits for each kind of resource in a Namespace.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.LimitRangeSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.LimitRangeItem": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of resource that this limit applies to.", - Type: []string{"string"}, - Format: "", - }, - }, - "max": { - SchemaProps: spec.SchemaProps{ - Description: "Max usage constraints on this kind by resource name.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "min": { - SchemaProps: spec.SchemaProps{ - Description: "Min usage constraints on this kind by resource name.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "default": { - SchemaProps: spec.SchemaProps{ - Description: "Default resource requirement limit value by resource name if resource limit is omitted.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "defaultRequest": { - SchemaProps: spec.SchemaProps{ - Description: "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "maxLimitRequestRatio": { - SchemaProps: spec.SchemaProps{ - Description: "MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.LimitRangeList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRangeList is a list of LimitRange items.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LimitRange"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LimitRange", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.LimitRangeSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRangeSpec defines a min/max usage limit for resources that match on kind.", - Properties: map[string]spec.Schema{ - "limits": { - SchemaProps: spec.SchemaProps{ - Description: "Limits is the list of LimitRangeItem objects that are enforced.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LimitRangeItem"), - }, - }, - }, - }, - }, - }, - Required: []string{"limits"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeItem"}, - }, - "k8s.io/api/core/v1.List": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "List holds a list of objects, which may not be known by the server.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of objects", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - }, - "k8s.io/api/core/v1.LoadBalancerIngress": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", - Type: []string{"string"}, - Format: "", - }, - }, - "hostname": { - SchemaProps: spec.SchemaProps{ - Description: "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.LoadBalancerStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancerStatus represents the status of a load-balancer.", - Properties: map[string]spec.Schema{ - "ingress": { - SchemaProps: spec.SchemaProps{ - Description: "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LoadBalancerIngress"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerIngress"}, - }, - "k8s.io/api/core/v1.LocalObjectReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.LocalVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Local represents directly-attached storage with node affinity", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.NFSVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "server": { - SchemaProps: spec.SchemaProps{ - Description: "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"server", "path"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Namespace": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Namespace provides a scope for Names. Use of multiple namespaces is optional.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.NamespaceSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.NamespaceStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NamespaceSpec", "k8s.io/api/core/v1.NamespaceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.NamespaceList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamespaceList is a list of Namespaces.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Namespace"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Namespace", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.NamespaceSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamespaceSpec describes the attributes on a Namespace.", - Properties: map[string]spec.Schema{ - "finalizers": { - SchemaProps: spec.SchemaProps{ - Description: "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.NamespaceStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamespaceStatus is information about the current status of a Namespace.", - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Node": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.NodeSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.NodeStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSpec", "k8s.io/api/core/v1.NodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.NodeAddress": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeAddress contains information for the node's address.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Node address type, one of Hostname, ExternalIP or InternalIP.", - Type: []string{"string"}, - Format: "", - }, - }, - "address": { - SchemaProps: spec.SchemaProps{ - Description: "The node address.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "address"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.NodeAffinity": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Node affinity is a group of node affinity scheduling rules.", - Properties: map[string]spec.Schema{ - "requiredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), - }, - }, - "preferredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PreferredSchedulingTerm"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/core/v1.PreferredSchedulingTerm"}, - }, - "k8s.io/api/core/v1.NodeCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeCondition contains condition information for a node.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of node condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastHeartbeatTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time we got an update on a given condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transit from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.NodeConfigSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "configMapRef": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, - }, - "k8s.io/api/core/v1.NodeDaemonEndpoints": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", - Properties: map[string]spec.Schema{ - "kubeletEndpoint": { - SchemaProps: spec.SchemaProps{ - Description: "Endpoint on which Kubelet is listening.", - Ref: ref("k8s.io/api/core/v1.DaemonEndpoint"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DaemonEndpoint"}, - }, - "k8s.io/api/core/v1.NodeList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeList is the whole list of all Nodes which have been registered with master.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of nodes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Node"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Node", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.NodeProxyOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeProxyOptions is the query options to a Node's proxy call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the URL path to use for the current proxy request to node.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.NodeResources": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeResources is an object for conveying resource information about a node. see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.", - Properties: map[string]spec.Schema{ - "Capacity": { - SchemaProps: spec.SchemaProps{ - Description: "Capacity represents the available resources of a node", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - Required: []string{"Capacity"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.NodeSelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", - Properties: map[string]spec.Schema{ - "nodeSelectorTerms": { - SchemaProps: spec.SchemaProps{ - Description: "Required. A list of node selector terms. The terms are ORed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), - }, - }, - }, - }, - }, - }, - Required: []string{"nodeSelectorTerms"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, - }, - "k8s.io/api/core/v1.NodeSelectorRequirement": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The label key that the selector applies to.", - Type: []string{"string"}, - Format: "", - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - Description: "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", - Type: []string{"string"}, - Format: "", - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - Description: "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"key", "operator"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.NodeSelectorTerm": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A null or empty node selector term matches no objects.", - Properties: map[string]spec.Schema{ - "matchExpressions": { - SchemaProps: spec.SchemaProps{ - Description: "Required. A list of node selector requirements. The requirements are ANDed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), - }, - }, - }, - }, - }, - }, - Required: []string{"matchExpressions"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorRequirement"}, - }, - "k8s.io/api/core/v1.NodeSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeSpec describes the attributes that a node is created with.", - Properties: map[string]spec.Schema{ - "podCIDR": { - SchemaProps: spec.SchemaProps{ - Description: "PodCIDR represents the pod IP range assigned to the node.", - Type: []string{"string"}, - Format: "", - }, - }, - "externalID": { - SchemaProps: spec.SchemaProps{ - Description: "External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated.", - Type: []string{"string"}, - Format: "", - }, - }, - "providerID": { - SchemaProps: spec.SchemaProps{ - Description: "ID of the node assigned by the cloud provider in the format: ://", - Type: []string{"string"}, - Format: "", - }, - }, - "unschedulable": { - SchemaProps: spec.SchemaProps{ - Description: "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration", - Type: []string{"boolean"}, - Format: "", - }, - }, - "taints": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the node's taints.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Taint"), - }, - }, - }, - }, - }, - "configSource": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource", "k8s.io/api/core/v1.Taint"}, - }, - "k8s.io/api/core/v1.NodeStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeStatus is information about the current status of a node.", - Properties: map[string]spec.Schema{ - "capacity": { - SchemaProps: spec.SchemaProps{ - Description: "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "allocatable": { - SchemaProps: spec.SchemaProps{ - Description: "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", - Type: []string{"string"}, - Format: "", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeCondition"), - }, - }, - }, - }, - }, - "addresses": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.NodeAddress"), - }, - }, - }, - }, - }, - "daemonEndpoints": { - SchemaProps: spec.SchemaProps{ - Description: "Endpoints of daemons running on the Node.", - Ref: ref("k8s.io/api/core/v1.NodeDaemonEndpoints"), - }, - }, - "nodeInfo": { - SchemaProps: spec.SchemaProps{ - Description: "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", - Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), - }, - }, - "images": { - SchemaProps: spec.SchemaProps{ - Description: "List of container images on this node", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerImage"), - }, - }, - }, - }, - }, - "volumesInUse": { - SchemaProps: spec.SchemaProps{ - Description: "List of attachable volumes in use (mounted) by the node.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "volumesAttached": { - SchemaProps: spec.SchemaProps{ - Description: "List of volumes that are attached to the node.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.AttachedVolume"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AttachedVolume", "k8s.io/api/core/v1.ContainerImage", "k8s.io/api/core/v1.NodeAddress", "k8s.io/api/core/v1.NodeCondition", "k8s.io/api/core/v1.NodeDaemonEndpoints", "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.NodeSystemInfo": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", - Properties: map[string]spec.Schema{ - "machineID": { - SchemaProps: spec.SchemaProps{ - Description: "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", - Type: []string{"string"}, - Format: "", - }, - }, - "systemUUID": { - SchemaProps: spec.SchemaProps{ - Description: "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", - Type: []string{"string"}, - Format: "", - }, - }, - "bootID": { - SchemaProps: spec.SchemaProps{ - Description: "Boot ID reported by the node.", - Type: []string{"string"}, - Format: "", - }, - }, - "kernelVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", - Type: []string{"string"}, - Format: "", - }, - }, - "osImage": { - SchemaProps: spec.SchemaProps{ - Description: "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", - Type: []string{"string"}, - Format: "", - }, - }, - "containerRuntimeVersion": { - SchemaProps: spec.SchemaProps{ - Description: "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", - Type: []string{"string"}, - Format: "", - }, - }, - "kubeletVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Kubelet Version reported by the node.", - Type: []string{"string"}, - Format: "", - }, - }, - "kubeProxyVersion": { - SchemaProps: spec.SchemaProps{ - Description: "KubeProxy Version reported by the node.", - Type: []string{"string"}, - Format: "", - }, - }, - "operatingSystem": { - SchemaProps: spec.SchemaProps{ - Description: "The Operating System reported by the node", - Type: []string{"string"}, - Format: "", - }, - }, - "architecture": { - SchemaProps: spec.SchemaProps{ - Description: "The Architecture reported by the node", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"machineID", "systemUUID", "bootID", "kernelVersion", "osImage", "containerRuntimeVersion", "kubeletVersion", "kubeProxyVersion", "operatingSystem", "architecture"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ObjectFieldSelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectFieldSelector selects an APIVersioned field of an object.", - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldPath": { - SchemaProps: spec.SchemaProps{ - Description: "Path of the field to select in the specified API version.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"fieldPath"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ObjectReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "API version of the referent.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldPath": { - SchemaProps: spec.SchemaProps{ - Description: "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PersistentVolume": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec", "k8s.io/api/core/v1.PersistentVolumeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaim": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaim is a user's request for and claim to a persistent volume", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/api/core/v1.PersistentVolumeClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaimCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimCondition contails details about state of pvc", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "lastProbeTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaimList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaimSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", - Properties: map[string]spec.Schema{ - "accessModes": { - SchemaProps: spec.SchemaProps{ - Description: "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "A label query over volumes to consider for binding.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), - }, - }, - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeName is the binding reference to the PersistentVolume backing this claim.", - Type: []string{"string"}, - Format: "", - }, - }, - "storageClassName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeMode": { - SchemaProps: spec.SchemaProps{ - Description: "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaimStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "Phase represents the current phase of PersistentVolumeClaim.", - Type: []string{"string"}, - Format: "", - }, - }, - "accessModes": { - SchemaProps: spec.SchemaProps{ - Description: "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "capacity": { - SchemaProps: spec.SchemaProps{ - Description: "Represents the actual resources of the underlying volume.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimCondition"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimCondition", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).", - Properties: map[string]spec.Schema{ - "claimName": { - SchemaProps: spec.SchemaProps{ - Description: "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Will force the ReadOnly setting in VolumeMounts. Default false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"claimName"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PersistentVolumeList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeList is a list of PersistentVolume items.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PersistentVolume"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolume", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.PersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeSource is similar to VolumeSource but meant for the administrator who creates PVs. Exactly one of its members must be set.", - Properties: map[string]spec.Schema{ - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "hostPath": { - SchemaProps: spec.SchemaProps{ - Description: "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - Description: "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - Description: "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - Description: "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), - }, - }, - "local": { - SchemaProps: spec.SchemaProps{ - Description: "Local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - Description: "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md", - Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), - }, - }, - "csi": { - SchemaProps: spec.SchemaProps{ - Description: "CSI represents storage that handled by an external CSI driver", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, - }, - "k8s.io/api/core/v1.PersistentVolumeSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeSpec is the specification of a persistent volume.", - Properties: map[string]spec.Schema{ - "capacity": { - SchemaProps: spec.SchemaProps{ - Description: "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "hostPath": { - SchemaProps: spec.SchemaProps{ - Description: "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - Description: "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - Description: "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - Description: "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), - }, - }, - "local": { - SchemaProps: spec.SchemaProps{ - Description: "Local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - Description: "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md", - Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), - }, - }, - "csi": { - SchemaProps: spec.SchemaProps{ - Description: "CSI represents storage that handled by an external CSI driver", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), - }, - }, - "accessModes": { - SchemaProps: spec.SchemaProps{ - Description: "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "claimRef": { - SchemaProps: spec.SchemaProps{ - Description: "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "persistentVolumeReclaimPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", - Type: []string{"string"}, - Format: "", - }, - }, - "storageClassName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", - Type: []string{"string"}, - Format: "", - }, - }, - "mountOptions": { - SchemaProps: spec.SchemaProps{ - Description: "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "volumeMode": { - SchemaProps: spec.SchemaProps{ - Description: "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec. This is an alpha feature and may change in the future.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.PersistentVolumeStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeStatus is the current status of a persistent volume.", - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable message indicating details about why the volume is in this state.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Photon Controller persistent disk resource.", - Properties: map[string]spec.Schema{ - "pdID": { - SchemaProps: spec.SchemaProps{ - Description: "ID that identifies Photon Controller persistent disk", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"pdID"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Pod": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.PodSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.PodStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PodAffinity": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod affinity is a group of inter pod affinity scheduling rules.", - Properties: map[string]spec.Schema{ - "requiredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), - }, - }, - }, - }, - }, - "preferredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, - }, - "k8s.io/api/core/v1.PodAffinityTerm": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running", - Properties: map[string]spec.Schema{ - "labelSelector": { - SchemaProps: spec.SchemaProps{ - Description: "A label query over a set of resources, in this case pods.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "namespaces": { - SchemaProps: spec.SchemaProps{ - Description: "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "topologyKey": { - SchemaProps: spec.SchemaProps{ - Description: "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"topologyKey"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/core/v1.PodAntiAffinity": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", - Properties: map[string]spec.Schema{ - "requiredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), - }, - }, - }, - }, - }, - "preferredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - Description: "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, - }, - "k8s.io/api/core/v1.PodAttachOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodAttachOptions is the query options to a Pod's remote attach call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - Description: "Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stdout": { - SchemaProps: spec.SchemaProps{ - Description: "Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stderr": { - SchemaProps: spec.SchemaProps{ - Description: "Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "container": { - SchemaProps: spec.SchemaProps{ - Description: "The container in which to execute the command. Defaults to only container if there is only one container in the pod.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodCondition contains details for the current condition of this pod.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type is the type of the condition. Currently only Ready. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - Type: []string{"string"}, - Format: "", - }, - }, - "lastProbeTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Unique, one-word, CamelCase reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.PodDNSConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.", - Properties: map[string]spec.Schema{ - "nameservers": { - SchemaProps: spec.SchemaProps{ - Description: "A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "searches": { - SchemaProps: spec.SchemaProps{ - Description: "A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "options": { - SchemaProps: spec.SchemaProps{ - Description: "A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodDNSConfigOption"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodDNSConfigOption"}, - }, - "k8s.io/api/core/v1.PodDNSConfigOption": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodDNSConfigOption defines DNS resolver options of a pod.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Required.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodExecOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodExecOptions is the query options to a Pod's remote exec call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard input stream of the pod for this call. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stdout": { - SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard output stream of the pod for this call. Defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stderr": { - SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard error stream of the pod for this call. Defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "container": { - SchemaProps: spec.SchemaProps{ - Description: "Container in which to execute the command. Defaults to only container if there is only one container in the pod.", - Type: []string{"string"}, - Format: "", - }, - }, - "command": { - SchemaProps: spec.SchemaProps{ - Description: "Command is the remote command to execute. argv array. Not executed within a shell.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"command"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodList is a list of Pods.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Pod"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Pod", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.PodLogOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodLogOptions is the query options for a Pod's logs REST call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "container": { - SchemaProps: spec.SchemaProps{ - Description: "The container for which to stream logs. Defaults to only container if there is one container in the pod.", - Type: []string{"string"}, - Format: "", - }, - }, - "follow": { - SchemaProps: spec.SchemaProps{ - Description: "Follow the log stream of the pod. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "previous": { - SchemaProps: spec.SchemaProps{ - Description: "Return previous terminated container logs. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "sinceSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "sinceTime": { - SchemaProps: spec.SchemaProps{ - Description: "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "timestamps": { - SchemaProps: spec.SchemaProps{ - Description: "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tailLines": { - SchemaProps: spec.SchemaProps{ - Description: "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "limitBytes": { - SchemaProps: spec.SchemaProps{ - Description: "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.PodPortForwardOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "List of ports to forward Required when using WebSockets", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodProxyOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodProxyOptions is the query options to a Pod's proxy call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the URL path to use for the current proxy request to pod.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PodSecurityContext": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", - Properties: map[string]spec.Schema{ - "seLinuxOptions": { - SchemaProps: spec.SchemaProps{ - Description: "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), - }, - }, - "runAsUser": { - SchemaProps: spec.SchemaProps{ - Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "runAsNonRoot": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "supplementalGroups": { - SchemaProps: spec.SchemaProps{ - Description: "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - "fsGroup": { - SchemaProps: spec.SchemaProps{ - Description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SELinuxOptions"}, - }, - "k8s.io/api/core/v1.PodSignature": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describes the class of pods that should avoid this node. Exactly one field should be set.", - Properties: map[string]spec.Schema{ - "podController": { - SchemaProps: spec.SchemaProps{ - Description: "Reference to controller whose pods should avoid this node.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"}, - }, - "k8s.io/api/core/v1.PodSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodSpec is a description of a pod.", - Properties: map[string]spec.Schema{ - "volumes": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge,retainKeys", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Volume"), - }, - }, - }, - }, - }, - "initContainers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Container"), - }, - }, - }, - }, - }, - "containers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Container"), - }, - }, - }, - }, - }, - "restartPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", - Type: []string{"string"}, - Format: "", - }, - }, - "terminationGracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "activeDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "dnsPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Note that 'None' policy is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it.", - Type: []string{"string"}, - Format: "", - }, - }, - "nodeSelector": { - SchemaProps: spec.SchemaProps{ - Description: "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "serviceAccountName": { - SchemaProps: spec.SchemaProps{ - Description: "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", - Type: []string{"string"}, - Format: "", - }, - }, - "serviceAccount": { - SchemaProps: spec.SchemaProps{ - Description: "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", - Type: []string{"string"}, - Format: "", - }, - }, - "automountServiceAccountToken": { - SchemaProps: spec.SchemaProps{ - Description: "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "nodeName": { - SchemaProps: spec.SchemaProps{ - Description: "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", - Type: []string{"string"}, - Format: "", - }, - }, - "hostNetwork": { - SchemaProps: spec.SchemaProps{ - Description: "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "hostPID": { - SchemaProps: spec.SchemaProps{ - Description: "Use the host's pid namespace. Optional: Default to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "hostIPC": { - SchemaProps: spec.SchemaProps{ - Description: "Use the host's ipc namespace. Optional: Default to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "securityContext": { - SchemaProps: spec.SchemaProps{ - Description: "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", - Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), - }, - }, - "imagePullSecrets": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - }, - }, - "hostname": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", - Type: []string{"string"}, - Format: "", - }, - }, - "subdomain": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", - Type: []string{"string"}, - Format: "", - }, - }, - "affinity": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the pod's scheduling constraints", - Ref: ref("k8s.io/api/core/v1.Affinity"), - }, - }, - "schedulerName": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", - Type: []string{"string"}, - Format: "", - }, - }, - "tolerations": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the pod's tolerations.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Toleration"), - }, - }, - }, - }, - }, - "hostAliases": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "ip", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.HostAlias"), - }, - }, - }, - }, - }, - "priorityClassName": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, indicates the pod's priority. \"SYSTEM\" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.", - Type: []string{"string"}, - Format: "", - }, - }, - "priority": { - SchemaProps: spec.SchemaProps{ - Description: "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "dnsConfig": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. This is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it.", - Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), - }, - }, - }, - Required: []string{"containers"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.HostAlias", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.Volume"}, - }, - "k8s.io/api/core/v1.PodStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.", - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "Current condition of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", - Type: []string{"string"}, - Format: "", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodCondition"), - }, - }, - }, - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about why the pod is in this condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'", - Type: []string{"string"}, - Format: "", - }, - }, - "hostIP": { - SchemaProps: spec.SchemaProps{ - Description: "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", - Type: []string{"string"}, - Format: "", - }, - }, - "podIP": { - SchemaProps: spec.SchemaProps{ - Description: "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", - Type: []string{"string"}, - Format: "", - }, - }, - "startTime": { - SchemaProps: spec.SchemaProps{ - Description: "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "initContainerStatuses": { - SchemaProps: spec.SchemaProps{ - Description: "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), - }, - }, - }, - }, - }, - "containerStatuses": { - SchemaProps: spec.SchemaProps{ - Description: "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), - }, - }, - }, - }, - }, - "qosClass": { - SchemaProps: spec.SchemaProps{ - Description: "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStatus", "k8s.io/api/core/v1.PodCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.PodStatusResult": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.PodStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PodTemplate": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodTemplate describes a template for creating copies of a predefined pod.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PodTemplateList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodTemplateList is a list of PodTemplates.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of pod templates", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.PodTemplate"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.PodTemplateSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodTemplateSpec describes the data a pod should have when created from a template", - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.PodSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.PortworxVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolumeSource represents a Portworx volume resource.", - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeID uniquely identifies a Portworx volume", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.PreferAvoidPodsEntry": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describes a class of pods that should avoid this node.", - Properties: map[string]spec.Schema{ - "podSignature": { - SchemaProps: spec.SchemaProps{ - Description: "The class of pods.", - Ref: ref("k8s.io/api/core/v1.PodSignature"), - }, - }, - "evictionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which this entry was added to the list.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason why this entry was added to the list.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating why this entry was added to the list.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"podSignature"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodSignature", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.PreferredSchedulingTerm": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", - Properties: map[string]spec.Schema{ - "weight": { - SchemaProps: spec.SchemaProps{ - Description: "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "preference": { - SchemaProps: spec.SchemaProps{ - Description: "A node selector term, associated with the corresponding weight.", - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), - }, - }, - }, - Required: []string{"weight", "preference"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, - }, - "k8s.io/api/core/v1.Probe": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", - Properties: map[string]spec.Schema{ - "exec": { - SchemaProps: spec.SchemaProps{ - Description: "One and only one of the following should be specified. Exec specifies the action to take.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), - }, - }, - "httpGet": { - SchemaProps: spec.SchemaProps{ - Description: "HTTPGet specifies the http request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), - }, - }, - "tcpSocket": { - SchemaProps: spec.SchemaProps{ - Description: "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), - }, - }, - "initialDelaySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "timeoutSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "periodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "successThreshold": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "failureThreshold": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, - }, - "k8s.io/api/core/v1.ProjectedVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a projected volume source", - Properties: map[string]spec.Schema{ - "sources": { - SchemaProps: spec.SchemaProps{ - Description: "list of volume projections", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeProjection"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"sources"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.VolumeProjection"}, - }, - "k8s.io/api/core/v1.QuobyteVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", - Properties: map[string]spec.Schema{ - "registry": { - SchemaProps: spec.SchemaProps{ - Description: "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", - Type: []string{"string"}, - Format: "", - }, - }, - "volume": { - SchemaProps: spec.SchemaProps{ - Description: "Volume is a string that references an already created Quobyte volume by name.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "User to map volume access to Defaults to serivceaccount user", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "Group to map volume access to Default is no group", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"registry", "volume"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.RBDPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", - Type: []string{"string"}, - Format: "", - }, - }, - "pool": { - SchemaProps: spec.SchemaProps{ - Description: "The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "keyring": { - SchemaProps: spec.SchemaProps{ - Description: "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors", "image"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.RBDVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", - Type: []string{"string"}, - Format: "", - }, - }, - "pool": { - SchemaProps: spec.SchemaProps{ - Description: "The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "keyring": { - SchemaProps: spec.SchemaProps{ - Description: "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors", "image"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.RangeAllocation": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RangeAllocation is not a public type.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "range": { - SchemaProps: spec.SchemaProps{ - Description: "Range is string that identifies the range represented by 'data'.", - Type: []string{"string"}, - Format: "", - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data is a bit array containing all allocated addresses in the previous segment.", - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - Required: []string{"range", "data"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ReplicationController": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationController represents the configuration of a replication controller.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ReplicationControllerSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ReplicationControllerStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerSpec", "k8s.io/api/core/v1.ReplicationControllerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ReplicationControllerCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerCondition describes the state of a replication controller at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of replication controller condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.ReplicationControllerList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerList is a collection of replication controllers.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ReplicationController"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationController", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ReplicationControllerSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerSpec is the specification of a replication controller.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec"}, - }, - "k8s.io/api/core/v1.ReplicationControllerStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerStatus represents the current status of a replication controller.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "fullyLabeledReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of pods that have labels matching the labels of the pod template of the replication controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of ready replicas for this replication controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "ObservedGeneration reflects the generation of the most recently observed replication controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a replication controller's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ReplicationControllerCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerCondition"}, - }, - "k8s.io/api/core/v1.ResourceFieldSelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceFieldSelector represents container resources (cpu, memory) and their output format", - Properties: map[string]spec.Schema{ - "containerName": { - SchemaProps: spec.SchemaProps{ - Description: "Container name: required for volumes, optional for env vars", - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Description: "Required: resource to select", - Type: []string{"string"}, - Format: "", - }, - }, - "divisor": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the output format of the exposed resources, defaults to \"1\"", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"resource"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.ResourceQuota": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuota sets aggregate quota restrictions enforced per namespace", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ResourceQuotaSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ResourceQuotaStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuotaSpec", "k8s.io/api/core/v1.ResourceQuotaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ResourceQuotaList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaList is a list of ResourceQuota items.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ResourceQuota"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuota", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ResourceQuotaSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", - Properties: map[string]spec.Schema{ - "hard": { - SchemaProps: spec.SchemaProps{ - Description: "Hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "scopes": { - SchemaProps: spec.SchemaProps{ - Description: "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.ResourceQuotaStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaStatus defines the enforced hard limits and observed use.", - Properties: map[string]spec.Schema{ - "hard": { - SchemaProps: spec.SchemaProps{ - Description: "Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "used": { - SchemaProps: spec.SchemaProps{ - Description: "Used is the current observed total usage of the resource in the namespace.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.ResourceRequirements": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceRequirements describes the compute resource requirements.", - Properties: map[string]spec.Schema{ - "limits": { - SchemaProps: spec.SchemaProps{ - Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "requests": { - SchemaProps: spec.SchemaProps{ - Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/core/v1.SELinuxOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SELinuxOptions are the labels to be applied to the container", - Properties: map[string]spec.Schema{ - "user": { - SchemaProps: spec.SchemaProps{ - Description: "User is a SELinux user label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - "role": { - SchemaProps: spec.SchemaProps{ - Description: "Role is a SELinux role label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type is a SELinux type label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - "level": { - SchemaProps: spec.SchemaProps{ - Description: "Level is SELinux level label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume", - Properties: map[string]spec.Schema{ - "gateway": { - SchemaProps: spec.SchemaProps{ - Description: "The host address of the ScaleIO API Gateway.", - Type: []string{"string"}, - Format: "", - }, - }, - "system": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the storage system as configured in ScaleIO.", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "sslEnabled": { - SchemaProps: spec.SchemaProps{ - Description: "Flag to enable/disable SSL communication with Gateway, default false", - Type: []string{"boolean"}, - Format: "", - }, - }, - "protectionDomain": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the ScaleIO Protection Domain for the configured storage.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePool": { - SchemaProps: spec.SchemaProps{ - Description: "The ScaleIO Storage Pool associated with the protection domain.", - Type: []string{"string"}, - Format: "", - }, - }, - "storageMode": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "The name of a volume already created in the ScaleIO system that is associated with this volume source.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"gateway", "system", "secretRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - }, - "k8s.io/api/core/v1.ScaleIOVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleIOVolumeSource represents a persistent ScaleIO volume", - Properties: map[string]spec.Schema{ - "gateway": { - SchemaProps: spec.SchemaProps{ - Description: "The host address of the ScaleIO API Gateway.", - Type: []string{"string"}, - Format: "", - }, - }, - "system": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the storage system as configured in ScaleIO.", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "sslEnabled": { - SchemaProps: spec.SchemaProps{ - Description: "Flag to enable/disable SSL communication with Gateway, default false", - Type: []string{"boolean"}, - Format: "", - }, - }, - "protectionDomain": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the ScaleIO Protection Domain for the configured storage.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePool": { - SchemaProps: spec.SchemaProps{ - Description: "The ScaleIO Storage Pool associated with the protection domain.", - Type: []string{"string"}, - Format: "", - }, - }, - "storageMode": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "The name of a volume already created in the ScaleIO system that is associated with this volume source.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"gateway", "system", "secretRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.Secret": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - }, - }, - "stringData": { - SchemaProps: spec.SchemaProps{ - Description: "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Used to facilitate programmatic handling of secret data.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.SecretEnvSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the Secret must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.SecretKeySelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretKeySelector selects a key of a Secret.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The key of the secret to select from. Must be a valid secret key.", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the Secret or it's key must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"key"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.SecretList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretList is a list of Secret.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Secret"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Secret", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.SecretProjection": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the Secret or its key must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - }, - "k8s.io/api/core/v1.SecretReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is unique within a namespace to reference a secret resource.", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace defines the space within which the secret name must be unique.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.SecretVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", - Properties: map[string]spec.Schema{ - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the Secret or it's keys must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - }, - "k8s.io/api/core/v1.SecurityContext": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.", - Properties: map[string]spec.Schema{ - "capabilities": { - SchemaProps: spec.SchemaProps{ - Description: "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.", - Ref: ref("k8s.io/api/core/v1.Capabilities"), - }, - }, - "privileged": { - SchemaProps: spec.SchemaProps{ - Description: "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "seLinuxOptions": { - SchemaProps: spec.SchemaProps{ - Description: "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), - }, - }, - "runAsUser": { - SchemaProps: spec.SchemaProps{ - Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "runAsNonRoot": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "readOnlyRootFilesystem": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container has a read-only root filesystem. Default is false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "allowPrivilegeEscalation": { - SchemaProps: spec.SchemaProps{ - Description: "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Capabilities", "k8s.io/api/core/v1.SELinuxOptions"}, - }, - "k8s.io/api/core/v1.SerializedReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SerializedReference is a reference to serialized object.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "reference": { - SchemaProps: spec.SchemaProps{ - Description: "The reference to an object in the system.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, - }, - "k8s.io/api/core/v1.Service": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ServiceSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/core/v1.ServiceStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServiceSpec", "k8s.io/api/core/v1.ServiceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ServiceAccount": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "secrets": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - "imagePullSecrets": { - SchemaProps: spec.SchemaProps{ - Description: "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - }, - }, - "automountServiceAccountToken": { - SchemaProps: spec.SchemaProps{ - Description: "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/core/v1.ServiceAccountList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceAccountList is a list of ServiceAccount objects", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ServiceAccount"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServiceAccount", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ServiceList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceList holds a list of services.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of services", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Service"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Service", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/core/v1.ServicePort": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServicePort contains information on service's port.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service.", - Type: []string{"string"}, - Format: "", - }, - }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "The IP protocol for this port. Supports \"TCP\" and \"UDP\". Default is TCP.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "The port that will be exposed by this service.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "targetPort": { - SchemaProps: spec.SchemaProps{ - Description: "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "nodePort": { - SchemaProps: spec.SchemaProps{ - Description: "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/core/v1.ServiceProxyOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceProxyOptions is the query options to a Service's proxy call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.ServiceSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceSpec describes the attributes that a user creates on a service.", - Properties: map[string]spec.Schema{ - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "port", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ServicePort"), - }, - }, - }, - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "clusterIP": { - SchemaProps: spec.SchemaProps{ - Description: "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types", - Type: []string{"string"}, - Format: "", - }, - }, - "externalIPs": { - SchemaProps: spec.SchemaProps{ - Description: "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "sessionAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", - Type: []string{"string"}, - Format: "", - }, - }, - "loadBalancerIP": { - SchemaProps: spec.SchemaProps{ - Description: "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.", - Type: []string{"string"}, - Format: "", - }, - }, - "loadBalancerSourceRanges": { - SchemaProps: spec.SchemaProps{ - Description: "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "externalName": { - SchemaProps: spec.SchemaProps{ - Description: "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.", - Type: []string{"string"}, - Format: "", - }, - }, - "externalTrafficPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", - Type: []string{"string"}, - Format: "", - }, - }, - "healthCheckNodePort": { - SchemaProps: spec.SchemaProps{ - Description: "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "publishNotReadyAddresses": { - SchemaProps: spec.SchemaProps{ - Description: "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints when that annotation is deprecated and all clients have been converted to use this field.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "sessionAffinityConfig": { - SchemaProps: spec.SchemaProps{ - Description: "sessionAffinityConfig contains the configurations of session affinity.", - Ref: ref("k8s.io/api/core/v1.SessionAffinityConfig"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServicePort", "k8s.io/api/core/v1.SessionAffinityConfig"}, - }, - "k8s.io/api/core/v1.ServiceStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceStatus represents the current status of a service.", - Properties: map[string]spec.Schema{ - "loadBalancer": { - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancer contains the current status of the load-balancer, if one is present.", - Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus"}, - }, - "k8s.io/api/core/v1.SessionAffinityConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SessionAffinityConfig represents the configurations of session affinity.", - Properties: map[string]spec.Schema{ - "clientIP": { - SchemaProps: spec.SchemaProps{ - Description: "clientIP contains the configurations of Client IP based session affinity.", - Ref: ref("k8s.io/api/core/v1.ClientIPConfig"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ClientIPConfig"}, - }, - "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a StorageOS persistent volume resource.", - Properties: map[string]spec.Schema{ - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeNamespace": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, - }, - "k8s.io/api/core/v1.StorageOSVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a StorageOS persistent volume resource.", - Properties: map[string]spec.Schema{ - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeNamespace": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - }, - "k8s.io/api/core/v1.Sysctl": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Sysctl defines a kernel parameter to be set", - Properties: map[string]spec.Schema{ - "Name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of a property to set", - Type: []string{"string"}, - Format: "", - }, - }, - "Value": { - SchemaProps: spec.SchemaProps{ - Description: "Value of a property to set", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"Name", "Value"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.TCPSocketAction": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TCPSocketAction describes an action based on opening a socket", - Properties: map[string]spec.Schema{ - "port": { - SchemaProps: spec.SchemaProps{ - Description: "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Host name to connect to, defaults to the pod IP.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/core/v1.Taint": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.", - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "Required. The taint key to be applied to a node.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Required. The taint value corresponding to the taint key.", - Type: []string{"string"}, - Format: "", - }, - }, - "effect": { - SchemaProps: spec.SchemaProps{ - Description: "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", - Type: []string{"string"}, - Format: "", - }, - }, - "timeAdded": { - SchemaProps: spec.SchemaProps{ - Description: "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - Required: []string{"key", "effect"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/core/v1.Toleration": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .", - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", - Type: []string{"string"}, - Format: "", - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - Description: "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", - Type: []string{"string"}, - Format: "", - }, - }, - "effect": { - SchemaProps: spec.SchemaProps{ - Description: "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", - Type: []string{"string"}, - Format: "", - }, - }, - "tolerationSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.Volume": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Volume represents a named volume in a pod that may be accessed by any container in the pod.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "hostPath": { - SchemaProps: spec.SchemaProps{ - Description: "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "emptyDir": { - SchemaProps: spec.SchemaProps{ - Description: "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), - }, - }, - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "gitRepo": { - SchemaProps: spec.SchemaProps{ - Description: "GitRepo represents a git repository at a particular revision.", - Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), - }, - }, - "secret": { - SchemaProps: spec.SchemaProps{ - Description: "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - Description: "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md", - Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - Description: "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), - }, - }, - "persistentVolumeClaim": { - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - Description: "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "downwardAPI": { - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "projected": { - SchemaProps: spec.SchemaProps{ - Description: "Items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - Description: "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, - }, - "k8s.io/api/core/v1.VolumeDevice": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "volumeDevice describes a mapping of a raw block device within a container.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name must match the name of a persistentVolumeClaim in the pod", - Type: []string{"string"}, - Format: "", - }, - }, - "devicePath": { - SchemaProps: spec.SchemaProps{ - Description: "devicePath is the path inside of the container that the device will be mapped to.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "devicePath"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.VolumeMount": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeMount describes a mounting of a Volume within a container.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "This must match the Name of a Volume.", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "mountPath": { - SchemaProps: spec.SchemaProps{ - Description: "Path within the container at which the volume should be mounted. Must not contain ':'.", - Type: []string{"string"}, - Format: "", - }, - }, - "subPath": { - SchemaProps: spec.SchemaProps{ - Description: "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", - Type: []string{"string"}, - Format: "", - }, - }, - "mountPropagation": { - SchemaProps: spec.SchemaProps{ - Description: "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "mountPath"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.VolumeProjection": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Projection that may be projected along with other supported volume types", - Properties: map[string]spec.Schema{ - "secret": { - SchemaProps: spec.SchemaProps{ - Description: "information about the secret data to project", - Ref: ref("k8s.io/api/core/v1.SecretProjection"), - }, - }, - "downwardAPI": { - SchemaProps: spec.SchemaProps{ - Description: "information about the downwardAPI data to project", - Ref: ref("k8s.io/api/core/v1.DownwardAPIProjection"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "information about the configMap data to project", - Ref: ref("k8s.io/api/core/v1.ConfigMapProjection"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapProjection", "k8s.io/api/core/v1.DownwardAPIProjection", "k8s.io/api/core/v1.SecretProjection"}, - }, - "k8s.io/api/core/v1.VolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents the source of a volume to mount. Only one of its members may be specified.", - Properties: map[string]spec.Schema{ - "hostPath": { - SchemaProps: spec.SchemaProps{ - Description: "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "emptyDir": { - SchemaProps: spec.SchemaProps{ - Description: "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), - }, - }, - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "gitRepo": { - SchemaProps: spec.SchemaProps{ - Description: "GitRepo represents a git repository at a particular revision.", - Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), - }, - }, - "secret": { - SchemaProps: spec.SchemaProps{ - Description: "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - Description: "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md", - Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - Description: "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), - }, - }, - "persistentVolumeClaim": { - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - Description: "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "downwardAPI": { - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "projected": { - SchemaProps: spec.SchemaProps{ - Description: "Items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - Description: "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, - }, - "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a vSphere volume resource.", - Properties: map[string]spec.Schema{ - "volumePath": { - SchemaProps: spec.SchemaProps{ - Description: "Path that identifies vSphere volume vmdk", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePolicyName": { - SchemaProps: spec.SchemaProps{ - Description: "Storage Policy Based Management (SPBM) profile name.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePolicyID": { - SchemaProps: spec.SchemaProps{ - Description: "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"volumePath"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/core/v1.WeightedPodAffinityTerm": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", - Properties: map[string]spec.Schema{ - "weight": { - SchemaProps: spec.SchemaProps{ - Description: "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "podAffinityTerm": { - SchemaProps: spec.SchemaProps{ - Description: "Required. A pod affinity term, associated with the corresponding weight.", - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), - }, - }, - }, - Required: []string{"weight", "podAffinityTerm"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm"}, - }, - "k8s.io/api/events/v1beta1.Event": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "eventTime": { - SchemaProps: spec.SchemaProps{ - Description: "Required. Time when this Event was first observed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "series": { - SchemaProps: spec.SchemaProps{ - Description: "Data about the Event series this event represents or nil if it's a singleton Event.", - Ref: ref("k8s.io/api/events/v1beta1.EventSeries"), - }, - }, - "reportingController": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", - Type: []string{"string"}, - Format: "", - }, - }, - "reportingInstance": { - SchemaProps: spec.SchemaProps{ - Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", - Type: []string{"string"}, - Format: "", - }, - }, - "action": { - SchemaProps: spec.SchemaProps{ - Description: "What action was taken/failed regarding to the regarding object.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Why the action was taken.", - Type: []string{"string"}, - Format: "", - }, - }, - "regarding": { - SchemaProps: spec.SchemaProps{ - Description: "The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "related": { - SchemaProps: spec.SchemaProps{ - Description: "Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "note": { - SchemaProps: spec.SchemaProps{ - Description: "Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of this event (Normal, Warning), new types could be added in the future.", - Type: []string{"string"}, - Format: "", - }, - }, - "deprecatedSource": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated field assuring backward compatibility with core.v1 Event type", - Ref: ref("k8s.io/api/core/v1.EventSource"), - }, - }, - "deprecatedFirstTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated field assuring backward compatibility with core.v1 Event type", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "deprecatedLastTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated field assuring backward compatibility with core.v1 Event type", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "deprecatedCount": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated field assuring backward compatibility with core.v1 Event type", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"eventTime"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/events/v1beta1.EventSeries", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/events/v1beta1.EventList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventList is a list of Event objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/events/v1beta1.Event"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/events/v1beta1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/events/v1beta1.EventSeries": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventSeries contain information on series of events, i.e. thing that was/is happening continously for some time.", - Properties: map[string]spec.Schema{ - "count": { - SchemaProps: spec.SchemaProps{ - Description: "Number of occurrences in this series up to the last heartbeat time", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "lastObservedTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time when last Event from the series was seen before last heartbeat.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "state": { - SchemaProps: spec.SchemaProps{ - Description: "Information whether this series is ongoing or finished.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"count", "lastObservedTime", "state"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, - }, - "k8s.io/api/extensions/v1beta1.AllowedFlexVolume": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "Driver is the name of the Flexvolume driver.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"driver"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/extensions/v1beta1.AllowedHostPath": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", - Properties: map[string]spec.Schema{ - "pathPrefix": { - SchemaProps: spec.SchemaProps{ - Description: "is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/extensions/v1beta1.CustomMetricCurrentStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Custom Metric name.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Custom Metric value (average).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"name", "value"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/extensions/v1beta1.CustomMetricCurrentStatusList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.CustomMetricCurrentStatus"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.CustomMetricCurrentStatus"}, - }, - "k8s.io/api/extensions/v1beta1.CustomMetricTarget": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Alpha-level support for Custom Metrics in HPA (as annotations).", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Custom Metric name.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Custom Metric value (average).", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"name", "value"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - }, - "k8s.io/api/extensions/v1beta1.CustomMetricTargetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.CustomMetricTarget"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.CustomMetricTarget"}, - }, - "k8s.io/api/extensions/v1beta1.DaemonSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.DaemonSetSpec", "k8s.io/api/extensions/v1beta1.DaemonSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/extensions/v1beta1.DaemonSetCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetCondition describes the state of a DaemonSet at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of DaemonSet condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/extensions/v1beta1.DaemonSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetList is a collection of daemon sets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "A list of daemon sets.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.DaemonSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/extensions/v1beta1.DaemonSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetSpec is the specification of a daemon set.", - Properties: map[string]spec.Schema{ - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "updateStrategy": { - SchemaProps: spec.SchemaProps{ - Description: "An update strategy to replace existing DaemonSet pods with new pods.", - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy"), - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "templateGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"template"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/extensions/v1beta1.DaemonSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonSetStatus represents the current status of a daemon set.", - Properties: map[string]spec.Schema{ - "currentNumberScheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberMisscheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "desiredNumberScheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberReady": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "The most recent generation observed by the daemon set controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "updatedNumberScheduled": { - SchemaProps: spec.SchemaProps{ - Description: "The total number of nodes that are running updated daemon pod", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberAvailable": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "numberUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "collisionCount": { - SchemaProps: spec.SchemaProps{ - Description: "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a DaemonSet's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.DaemonSetCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"currentNumberScheduled", "numberMisscheduled", "desiredNumberScheduled", "numberReady"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.DaemonSetCondition"}, - }, - "k8s.io/api/extensions/v1beta1.DaemonSetUpdateStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "Rolling update config params. Present only if type = \"RollingUpdate\".", - Ref: ref("k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet"}, - }, - "k8s.io/api/extensions/v1beta1.Deployment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the Deployment.", - Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the Deployment.", - Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.DeploymentSpec", "k8s.io/api/extensions/v1beta1.DeploymentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/extensions/v1beta1.DeploymentCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentCondition describes the state of a deployment at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of deployment condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time this condition was updated.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/extensions/v1beta1.DeploymentList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentList is a list of Deployments.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of Deployments.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.Deployment"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.Deployment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/extensions/v1beta1.DeploymentRollback": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Required: This must match the Name of a deployment.", - Type: []string{"string"}, - Format: "", - }, - }, - "updatedAnnotations": { - SchemaProps: spec.SchemaProps{ - Description: "The annotations to be updated to a deployment", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "rollbackTo": { - SchemaProps: spec.SchemaProps{ - Description: "The config of this deployment rollback.", - Ref: ref("k8s.io/api/extensions/v1beta1.RollbackConfig"), - }, - }, - }, - Required: []string{"name", "rollbackTo"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.RollbackConfig"}, - }, - "k8s.io/api/extensions/v1beta1.DeploymentSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentSpec is the specification of the desired behavior of the Deployment.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template describes the pods that will be created.", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - "strategy": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-strategy": "retainKeys", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "The deployment strategy to use to replace existing pods with new ones.", - Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentStrategy"), - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "paused": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the deployment is paused and will not be processed by the deployment controller.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "rollbackTo": { - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.", - Ref: ref("k8s.io/api/extensions/v1beta1.RollbackConfig"), - }, - }, - "progressDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. This is not set by default.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"template"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/api/extensions/v1beta1.DeploymentStrategy", "k8s.io/api/extensions/v1beta1.RollbackConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/extensions/v1beta1.DeploymentStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentStatus is the most recently observed status of the Deployment.", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "The generation observed by the deployment controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "updatedReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of ready pods targeted by this deployment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "unavailableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a deployment's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.DeploymentCondition"), - }, - }, - }, - }, - }, - "collisionCount": { - SchemaProps: spec.SchemaProps{ - Description: "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.DeploymentCondition"}, - }, - "k8s.io/api/extensions/v1beta1.DeploymentStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeploymentStrategy describes how to replace existing pods with new ones.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - Ref: ref("k8s.io/api/extensions/v1beta1.RollingUpdateDeployment"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.RollingUpdateDeployment"}, - }, - "k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", - Properties: map[string]spec.Schema{ - "rule": { - SchemaProps: spec.SchemaProps{ - Description: "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", - Type: []string{"string"}, - Format: "", - }, - }, - "ranges": { - SchemaProps: spec.SchemaProps{ - Description: "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IDRange"}, - }, - "k8s.io/api/extensions/v1beta1.HTTPIngressPath": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.", - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.", - Type: []string{"string"}, - Format: "", - }, - }, - "backend": { - SchemaProps: spec.SchemaProps{ - Description: "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", - Ref: ref("k8s.io/api/extensions/v1beta1.IngressBackend"), - }, - }, - }, - Required: []string{"backend"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IngressBackend"}, - }, - "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", - Properties: map[string]spec.Schema{ - "paths": { - SchemaProps: spec.SchemaProps{ - Description: "A collection of paths that map requests to backends.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressPath"), - }, - }, - }, - }, - }, - }, - Required: []string{"paths"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.HTTPIngressPath"}, - }, - "k8s.io/api/extensions/v1beta1.HostPortRange": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", - Properties: map[string]spec.Schema{ - "min": { - SchemaProps: spec.SchemaProps{ - Description: "min is the start of the range, inclusive.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "max": { - SchemaProps: spec.SchemaProps{ - Description: "max is the end of the range, inclusive.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"min", "max"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/extensions/v1beta1.IDRange": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ID Range provides a min/max of an allowed range of IDs.", - Properties: map[string]spec.Schema{ - "min": { - SchemaProps: spec.SchemaProps{ - Description: "Min is the start of the range, inclusive.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "max": { - SchemaProps: spec.SchemaProps{ - Description: "Max is the end of the range, inclusive.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - Required: []string{"min", "max"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/extensions/v1beta1.IPBlock": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", - Properties: map[string]spec.Schema{ - "cidr": { - SchemaProps: spec.SchemaProps{ - Description: "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"", - Type: []string{"string"}, - Format: "", - }, - }, - "except": { - SchemaProps: spec.SchemaProps{ - Description: "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" Except values will be rejected if they are outside the CIDR range", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"cidr"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/extensions/v1beta1.Ingress": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/extensions/v1beta1.IngressSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/extensions/v1beta1.IngressStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IngressSpec", "k8s.io/api/extensions/v1beta1.IngressStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/extensions/v1beta1.IngressBackend": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressBackend describes all endpoints for a given service and port.", - Properties: map[string]spec.Schema{ - "serviceName": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the name of the referenced service.", - Type: []string{"string"}, - Format: "", - }, - }, - "servicePort": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the port of the referenced service.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - Required: []string{"serviceName", "servicePort"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/extensions/v1beta1.IngressList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressList is a collection of Ingress.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of Ingress.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.Ingress"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.Ingress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/extensions/v1beta1.IngressRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", - Properties: map[string]spec.Schema{ - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.", - Type: []string{"string"}, - Format: "", - }, - }, - "http": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"}, - }, - "k8s.io/api/extensions/v1beta1.IngressRuleValue": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", - Properties: map[string]spec.Schema{ - "http": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.HTTPIngressRuleValue"}, - }, - "k8s.io/api/extensions/v1beta1.IngressSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressSpec describes the Ingress the user wishes to exist.", - Properties: map[string]spec.Schema{ - "backend": { - SchemaProps: spec.SchemaProps{ - Description: "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", - Ref: ref("k8s.io/api/extensions/v1beta1.IngressBackend"), - }, - }, - "tls": { - SchemaProps: spec.SchemaProps{ - Description: "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IngressTLS"), - }, - }, - }, - }, - }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IngressRule"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IngressBackend", "k8s.io/api/extensions/v1beta1.IngressRule", "k8s.io/api/extensions/v1beta1.IngressTLS"}, - }, - "k8s.io/api/extensions/v1beta1.IngressStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressStatus describe the current state of the Ingress.", - Properties: map[string]spec.Schema{ - "loadBalancer": { - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancer contains the current status of the load-balancer.", - Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus"}, - }, - "k8s.io/api/extensions/v1beta1.IngressTLS": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IngressTLS describes the transport layer security associated with an Ingress.", - Properties: map[string]spec.Schema{ - "hosts": { - SchemaProps: spec.SchemaProps{ - Description: "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/extensions/v1beta1.NetworkPolicy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior for this NetworkPolicy.", - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicySpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.NetworkPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", - Properties: map[string]spec.Schema{ - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPort"), - }, - }, - }, - }, - }, - "to": { - SchemaProps: spec.SchemaProps{ - Description: "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPeer"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer", "k8s.io/api/extensions/v1beta1.NetworkPolicyPort"}, - }, - "k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", - Properties: map[string]spec.Schema{ - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPort"), - }, - }, - }, - }, - }, - "from": { - SchemaProps: spec.SchemaProps{ - Description: "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyPeer"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer", "k8s.io/api/extensions/v1beta1.NetworkPolicyPort"}, - }, - "k8s.io/api/extensions/v1beta1.NetworkPolicyList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicy"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.NetworkPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/extensions/v1beta1.NetworkPolicyPeer": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.", - Properties: map[string]spec.Schema{ - "podSelector": { - SchemaProps: spec.SchemaProps{ - Description: "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "namespaceSelector": { - SchemaProps: spec.SchemaProps{ - Description: "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "ipBlock": { - SchemaProps: spec.SchemaProps{ - Description: "IPBlock defines policy on a particular IPBlock", - Ref: ref("k8s.io/api/extensions/v1beta1.IPBlock"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IPBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/extensions/v1beta1.NetworkPolicyPort": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.", - Properties: map[string]spec.Schema{ - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/extensions/v1beta1.NetworkPolicySpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.", - Properties: map[string]spec.Schema{ - "podSelector": { - SchemaProps: spec.SchemaProps{ - Description: "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "ingress": { - SchemaProps: spec.SchemaProps{ - Description: "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default).", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule"), - }, - }, - }, - }, - }, - "egress": { - SchemaProps: spec.SchemaProps{ - Description: "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule"), - }, - }, - }, - }, - }, - "policyTypes": { - SchemaProps: spec.SchemaProps{ - Description: "List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"podSelector"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.NetworkPolicyEgressRule", "k8s.io/api/extensions/v1beta1.NetworkPolicyIngressRule", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/extensions/v1beta1.PodSecurityPolicy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "spec defines the policy enforced.", - Ref: ref("k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/extensions/v1beta1.PodSecurityPolicyList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod Security Policy List is a list of PodSecurityPolicy objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.PodSecurityPolicy"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.PodSecurityPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/extensions/v1beta1.PodSecurityPolicySpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod Security Policy Spec defines the policy enforced.", - Properties: map[string]spec.Schema{ - "privileged": { - SchemaProps: spec.SchemaProps{ - Description: "privileged determines if a pod can request to be run as privileged.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "defaultAddCapabilities": { - SchemaProps: spec.SchemaProps{ - Description: "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both DefaultAddCapabilities and RequiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the AllowedCapabilities list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "requiredDropCapabilities": { - SchemaProps: spec.SchemaProps{ - Description: "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "allowedCapabilities": { - SchemaProps: spec.SchemaProps{ - Description: "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "volumes": { - SchemaProps: spec.SchemaProps{ - Description: "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "hostNetwork": { - SchemaProps: spec.SchemaProps{ - Description: "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "hostPorts": { - SchemaProps: spec.SchemaProps{ - Description: "hostPorts determines which host port ranges are allowed to be exposed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.HostPortRange"), - }, - }, - }, - }, - }, - "hostPID": { - SchemaProps: spec.SchemaProps{ - Description: "hostPID determines if the policy allows the use of HostPID in the pod spec.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "hostIPC": { - SchemaProps: spec.SchemaProps{ - Description: "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "seLinux": { - SchemaProps: spec.SchemaProps{ - Description: "seLinux is the strategy that will dictate the allowable labels that may be set.", - Ref: ref("k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions"), - }, - }, - "runAsUser": { - SchemaProps: spec.SchemaProps{ - Description: "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", - Ref: ref("k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions"), - }, - }, - "supplementalGroups": { - SchemaProps: spec.SchemaProps{ - Description: "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", - Ref: ref("k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions"), - }, - }, - "fsGroup": { - SchemaProps: spec.SchemaProps{ - Description: "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.", - Ref: ref("k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions"), - }, - }, - "readOnlyRootFilesystem": { - SchemaProps: spec.SchemaProps{ - Description: "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "defaultAllowPrivilegeEscalation": { - SchemaProps: spec.SchemaProps{ - Description: "DefaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "allowPrivilegeEscalation": { - SchemaProps: spec.SchemaProps{ - Description: "AllowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "allowedHostPaths": { - SchemaProps: spec.SchemaProps{ - Description: "is a white list of allowed host paths. Empty indicates that all host paths may be used.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.AllowedHostPath"), - }, - }, - }, - }, - }, - "allowedFlexVolumes": { - SchemaProps: spec.SchemaProps{ - Description: "AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"Volumes\" field.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.AllowedFlexVolume"), - }, - }, - }, - }, - }, - }, - Required: []string{"seLinux", "runAsUser", "supplementalGroups", "fsGroup"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.AllowedFlexVolume", "k8s.io/api/extensions/v1beta1.AllowedHostPath", "k8s.io/api/extensions/v1beta1.FSGroupStrategyOptions", "k8s.io/api/extensions/v1beta1.HostPortRange", "k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions", "k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions", "k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions"}, - }, - "k8s.io/api/extensions/v1beta1.ReplicaSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.ReplicaSetSpec", "k8s.io/api/extensions/v1beta1.ReplicaSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/extensions/v1beta1.ReplicaSetCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetCondition describes the state of a replica set at a certain point.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of replica set condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/extensions/v1beta1.ReplicaSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetList is a collection of ReplicaSets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.ReplicaSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/extensions/v1beta1.ReplicaSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetSpec is the specification of a ReplicaSet.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/extensions/v1beta1.ReplicaSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicaSetStatus represents the current status of a ReplicaSet.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "fullyLabeledReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of pods that have labels matching the labels of the pod template of the replicaset.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of ready replicas for this replica set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of available replicas (ready for at least minReadySeconds) for this replica set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a replica set's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.ReplicaSetCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.ReplicaSetCondition"}, - }, - "k8s.io/api/extensions/v1beta1.ReplicationControllerDummy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Dummy definition", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/extensions/v1beta1.RollbackConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DEPRECATED.", - Properties: map[string]spec.Schema{ - "revision": { - SchemaProps: spec.SchemaProps{ - Description: "The revision to rollback to. If set to 0, rollback to the last revision.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/extensions/v1beta1.RollingUpdateDaemonSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Spec to control the desired behavior of daemon set rolling update.", - Properties: map[string]spec.Schema{ - "maxUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/extensions/v1beta1.RollingUpdateDeployment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Spec to control the desired behavior of rolling update.", - Properties: map[string]spec.Schema{ - "maxUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "maxSurge": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/extensions/v1beta1.RunAsUserStrategyOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.", - Properties: map[string]spec.Schema{ - "rule": { - SchemaProps: spec.SchemaProps{ - Description: "Rule is the strategy that will dictate the allowable RunAsUser values that may be set.", - Type: []string{"string"}, - Format: "", - }, - }, - "ranges": { - SchemaProps: spec.SchemaProps{ - Description: "Ranges are the allowed ranges of uids that may be used.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), - }, - }, - }, - }, - }, - }, - Required: []string{"rule"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IDRange"}, - }, - "k8s.io/api/extensions/v1beta1.SELinuxStrategyOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SELinux Strategy Options defines the strategy type and any options used to create the strategy.", - Properties: map[string]spec.Schema{ - "rule": { - SchemaProps: spec.SchemaProps{ - Description: "type is the strategy that will dictate the allowable labels that may be set.", - Type: []string{"string"}, - Format: "", - }, - }, - "seLinuxOptions": { - SchemaProps: spec.SchemaProps{ - Description: "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), - }, - }, - }, - Required: []string{"rule"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SELinuxOptions"}, - }, - "k8s.io/api/extensions/v1beta1.Scale": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "represents a scaling request for a resource.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - Ref: ref("k8s.io/api/extensions/v1beta1.ScaleSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", - Ref: ref("k8s.io/api/extensions/v1beta1.ScaleStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.ScaleSpec", "k8s.io/api/extensions/v1beta1.ScaleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/extensions/v1beta1.ScaleSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "describes the attributes of a scale subresource", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "desired number of instances for the scaled object.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/extensions/v1beta1.ScaleStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "represents the current status of a scale subresource.", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "actual number of observed instances of the scaled object.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "targetSelector": { - SchemaProps: spec.SchemaProps{ - Description: "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/extensions/v1beta1.SupplementalGroupsStrategyOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", - Properties: map[string]spec.Schema{ - "rule": { - SchemaProps: spec.SchemaProps{ - Description: "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", - Type: []string{"string"}, - Format: "", - }, - }, - "ranges": { - SchemaProps: spec.SchemaProps{ - Description: "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/extensions/v1beta1.IDRange"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/extensions/v1beta1.IDRange"}, - }, - "k8s.io/api/imagepolicy/v1alpha1.ImageReview": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ImageReview checks if the set of images in a pod are allowed.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec holds information about the pod being evaluated", - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status is filled in by the backend and indicates whether the pod should be allowed.", - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec", "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ImageReviewContainerSpec is a description of a container within the pod creation request.", - Properties: map[string]spec.Schema{ - "image": { - SchemaProps: spec.SchemaProps{ - Description: "This can be in the form image:tag or image@SHA:012345679abcdef.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ImageReviewSpec is a description of the pod creation request.", - Properties: map[string]spec.Schema{ - "containers": { - SchemaProps: spec.SchemaProps{ - Description: "Containers is a list of a subset of the information in each container of the Pod being created.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"), - }, - }, - }, - }, - }, - "annotations": { - SchemaProps: spec.SchemaProps{ - Description: "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.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace the pod is being created in.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewContainerSpec"}, - }, - "k8s.io/api/imagepolicy/v1alpha1.ImageReviewStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ImageReviewStatus is the result of the token authentication request.", - Properties: map[string]spec.Schema{ - "allowed": { - SchemaProps: spec.SchemaProps{ - Description: "Allowed indicates that all images were allowed to be run.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "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.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"allowed"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/networking/v1.IPBlock": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", - Properties: map[string]spec.Schema{ - "cidr": { - SchemaProps: spec.SchemaProps{ - Description: "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"", - Type: []string{"string"}, - Format: "", - }, - }, - "except": { - SchemaProps: spec.SchemaProps{ - Description: "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" Except values will be rejected if they are outside the CIDR range", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"cidr"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/networking/v1.NetworkPolicy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicy describes what network traffic is allowed for a set of Pods", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior for this NetworkPolicy.", - Ref: ref("k8s.io/api/networking/v1.NetworkPolicySpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/networking/v1.NetworkPolicyEgressRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", - Properties: map[string]spec.Schema{ - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), - }, - }, - }, - }, - }, - "to": { - SchemaProps: spec.SchemaProps{ - Description: "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, - }, - "k8s.io/api/networking/v1.NetworkPolicyIngressRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", - Properties: map[string]spec.Schema{ - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPort"), - }, - }, - }, - }, - }, - "from": { - SchemaProps: spec.SchemaProps{ - Description: "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyPeer"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyPeer", "k8s.io/api/networking/v1.NetworkPolicyPort"}, - }, - "k8s.io/api/networking/v1.NetworkPolicyList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyList is a list of NetworkPolicy objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicy"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicy", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/networking/v1.NetworkPolicyPeer": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields must be specified.", - Properties: map[string]spec.Schema{ - "podSelector": { - SchemaProps: spec.SchemaProps{ - Description: "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "namespaceSelector": { - SchemaProps: spec.SchemaProps{ - Description: "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "ipBlock": { - SchemaProps: spec.SchemaProps{ - Description: "IPBlock defines policy on a particular IPBlock", - Ref: ref("k8s.io/api/networking/v1.IPBlock"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.IPBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/networking/v1.NetworkPolicyPort": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicyPort describes a port to allow traffic on", - Properties: map[string]spec.Schema{ - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/networking/v1.NetworkPolicySpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NetworkPolicySpec provides the specification of a NetworkPolicy", - Properties: map[string]spec.Schema{ - "podSelector": { - SchemaProps: spec.SchemaProps{ - Description: "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "ingress": { - SchemaProps: spec.SchemaProps{ - Description: "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyIngressRule"), - }, - }, - }, - }, - }, - "egress": { - SchemaProps: spec.SchemaProps{ - Description: "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/networking/v1.NetworkPolicyEgressRule"), - }, - }, - }, - }, - }, - "policyTypes": { - SchemaProps: spec.SchemaProps{ - Description: "List of rule types that the NetworkPolicy relates to. Valid options are Ingress, Egress, or Ingress,Egress. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"podSelector"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/networking/v1.NetworkPolicyEgressRule", "k8s.io/api/networking/v1.NetworkPolicyIngressRule", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/policy/v1beta1.Eviction": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta describes the pod that is being evicted.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "deleteOptions": { - SchemaProps: spec.SchemaProps{ - Description: "DeleteOptions may be provided", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/policy/v1beta1.PodDisruptionBudget": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the PodDisruptionBudget.", - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Most recently observed status of the PodDisruptionBudget.", - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec", "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/policy/v1beta1.PodDisruptionBudget"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/policy/v1beta1.PodDisruptionBudget", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", - Properties: map[string]spec.Schema{ - "minAvailable": { - SchemaProps: spec.SchemaProps{ - Description: "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Label query over pods whose evictions are managed by the disruption budget.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "maxUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "k8s.io/api/policy/v1beta1.PodDisruptionBudgetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "disruptedPods": { - SchemaProps: spec.SchemaProps{ - Description: "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - }, - }, - "disruptionsAllowed": { - SchemaProps: spec.SchemaProps{ - Description: "Number of pod disruptions that are currently allowed.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "currentHealthy": { - SchemaProps: spec.SchemaProps{ - Description: "current number of healthy pods", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "desiredHealthy": { - SchemaProps: spec.SchemaProps{ - Description: "minimum desired number of healthy pods", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "expectedPods": { - SchemaProps: spec.SchemaProps{ - Description: "total number of pods counted by this disruption budget", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"disruptedPods", "disruptionsAllowed", "currentHealthy", "desiredHealthy", "expectedPods"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/rbac/v1.AggregationRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", - Properties: map[string]spec.Schema{ - "clusterRoleSelectors": { - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/rbac/v1.ClusterRole": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this ClusterRole", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), - }, - }, - }, - }, - }, - "aggregationRule": { - SchemaProps: spec.SchemaProps{ - Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1.AggregationRule"), - }, - }, - }, - Required: []string{"rules"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1.AggregationRule", "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1.ClusterRoleBinding": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subjects": { - SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.Subject"), - }, - }, - }, - }, - }, - "roleRef": { - SchemaProps: spec.SchemaProps{ - Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1.RoleRef"), - }, - }, - }, - Required: []string{"subjects", "roleRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1.ClusterRoleBindingList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.ClusterRoleBinding"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1.ClusterRoleList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleList is a collection of ClusterRoles", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoles", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.ClusterRole"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1.PolicyRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", - Properties: map[string]spec.Schema{ - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "apiGroups": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resourceNames": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "nonResourceURLs": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"verbs"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/rbac/v1.Role": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this Role", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.PolicyRule"), - }, - }, - }, - }, - }, - }, - Required: []string{"rules"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1.RoleBinding": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subjects": { - SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.Subject"), - }, - }, - }, - }, - }, - "roleRef": { - SchemaProps: spec.SchemaProps{ - Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1.RoleRef"), - }, - }, - }, - Required: []string{"subjects", "roleRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleRef", "k8s.io/api/rbac/v1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1.RoleBindingList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleBindingList is a collection of RoleBindings", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of RoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.RoleBinding"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1.RoleList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleList is a collection of Roles", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of Roles", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1.Role"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1.RoleRef": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleRef contains information that points to the role being used", - Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"apiGroup", "kind", "name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/rbac/v1.Subject": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", - }, - }, - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the object being referenced.", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"kind", "name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/rbac/v1alpha1.AggregationRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", - Properties: map[string]spec.Schema{ - "clusterRoleSelectors": { - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/rbac/v1alpha1.ClusterRole": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this ClusterRole", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), - }, - }, - }, - }, - }, - "aggregationRule": { - SchemaProps: spec.SchemaProps{ - Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1alpha1.AggregationRule"), - }, - }, - }, - Required: []string{"rules"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.AggregationRule", "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subjects": { - SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), - }, - }, - }, - }, - }, - "roleRef": { - SchemaProps: spec.SchemaProps{ - Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), - }, - }, - }, - Required: []string{"subjects", "roleRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1alpha1.ClusterRoleBindingList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRoleBinding"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1alpha1.ClusterRoleList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleList is a collection of ClusterRoles", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoles", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.ClusterRole"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1alpha1.PolicyRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", - Properties: map[string]spec.Schema{ - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "apiGroups": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resourceNames": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "nonResourceURLs": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"verbs"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/rbac/v1alpha1.Role": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this Role", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.PolicyRule"), - }, - }, - }, - }, - }, - }, - Required: []string{"rules"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1alpha1.RoleBinding": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subjects": { - SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.Subject"), - }, - }, - }, - }, - }, - "roleRef": { - SchemaProps: spec.SchemaProps{ - Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleRef"), - }, - }, - }, - Required: []string{"subjects", "roleRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleRef", "k8s.io/api/rbac/v1alpha1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1alpha1.RoleBindingList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleBindingList is a collection of RoleBindings", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of RoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.RoleBinding"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1alpha1.RoleList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleList is a collection of Roles", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of Roles", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1alpha1.Role"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1alpha1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1alpha1.RoleRef": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleRef contains information that points to the role being used", - Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"apiGroup", "kind", "name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/rbac/v1alpha1.Subject": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the object being referenced.", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"kind", "name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/rbac/v1beta1.AggregationRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", - Properties: map[string]spec.Schema{ - "clusterRoleSelectors": { - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/rbac/v1beta1.ClusterRole": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this ClusterRole", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), - }, - }, - }, - }, - }, - "aggregationRule": { - SchemaProps: spec.SchemaProps{ - Description: "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", - Ref: ref("k8s.io/api/rbac/v1beta1.AggregationRule"), - }, - }, - }, - Required: []string{"rules"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.AggregationRule", "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1beta1.ClusterRoleBinding": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subjects": { - SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), - }, - }, - }, - }, - }, - "roleRef": { - SchemaProps: spec.SchemaProps{ - Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), - }, - }, - }, - Required: []string{"subjects", "roleRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1beta1.ClusterRoleBindingList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRoleBinding"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.ClusterRoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1beta1.ClusterRoleList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterRoleList is a collection of ClusterRoles", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ClusterRoles", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.ClusterRole"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.ClusterRole", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1beta1.PolicyRule": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", - Properties: map[string]spec.Schema{ - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "apiGroups": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "resourceNames": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "nonResourceURLs": { - SchemaProps: spec.SchemaProps{ - Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"verbs"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/rbac/v1beta1.Role": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "rules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules holds all the PolicyRules for this Role", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.PolicyRule"), - }, - }, - }, - }, - }, - }, - Required: []string{"rules"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.PolicyRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1beta1.RoleBinding": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subjects": { - SchemaProps: spec.SchemaProps{ - Description: "Subjects holds references to the objects the role applies to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.Subject"), - }, - }, - }, - }, - }, - "roleRef": { - SchemaProps: spec.SchemaProps{ - Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - Ref: ref("k8s.io/api/rbac/v1beta1.RoleRef"), - }, - }, - }, - Required: []string{"subjects", "roleRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleRef", "k8s.io/api/rbac/v1beta1.Subject", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/rbac/v1beta1.RoleBindingList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleBindingList is a collection of RoleBindings", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of RoleBindings", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.RoleBinding"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.RoleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1beta1.RoleList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleList is a collection of Roles", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of Roles", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/rbac/v1beta1.Role"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/rbac/v1beta1.Role", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/rbac/v1beta1.RoleRef": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RoleRef contains information that points to the role being used", - Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"apiGroup", "kind", "name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/rbac/v1beta1.Subject": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", - }, - }, - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the object being referenced.", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"kind", "name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/scheduling/v1alpha1.PriorityClass": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "globalDefault": { - SchemaProps: spec.SchemaProps{ - Description: "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Description: "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"value"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/scheduling/v1alpha1.PriorityClassList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PriorityClassList is a collection of priority classes.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items is the list of PriorityClasses", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/scheduling/v1alpha1.PriorityClass"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/scheduling/v1alpha1.PriorityClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/settings/v1alpha1.PodPreset": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodPreset is a policy resource that defines additional runtime requirements for a Pod.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/settings/v1alpha1.PodPresetSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/settings/v1alpha1.PodPresetSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/settings/v1alpha1.PodPresetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodPresetList is a list of PodPreset objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of schema objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/settings/v1alpha1.PodPreset"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/settings/v1alpha1.PodPreset", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/settings/v1alpha1.PodPresetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodPresetSpec is a description of a pod preset.", - Properties: map[string]spec.Schema{ - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector is a label query over a set of resources, in this case pods. Required.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "env": { - SchemaProps: spec.SchemaProps{ - Description: "Env defines the collection of EnvVar to inject into containers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvVar"), - }, - }, - }, - }, - }, - "envFrom": { - SchemaProps: spec.SchemaProps{ - Description: "EnvFrom defines the collection of EnvFromSource to inject into containers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), - }, - }, - }, - }, - }, - "volumes": { - SchemaProps: spec.SchemaProps{ - Description: "Volumes defines the collection of Volume to inject into the pod.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Volume"), - }, - }, - }, - }, - }, - "volumeMounts": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeMounts defines the collection of VolumeMount to inject into containers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeMount"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - }, - "k8s.io/api/storage/v1.StorageClass": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "provisioner": { - SchemaProps: spec.SchemaProps{ - Description: "Provisioner indicates the type of the provisioner.", - Type: []string{"string"}, - Format: "", - }, - }, - "parameters": { - SchemaProps: spec.SchemaProps{ - Description: "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "reclaimPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", - Type: []string{"string"}, - Format: "", - }, - }, - "mountOptions": { - SchemaProps: spec.SchemaProps{ - Description: "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "allowVolumeExpansion": { - SchemaProps: spec.SchemaProps{ - Description: "AllowVolumeExpansion shows whether the storage class allow volume expand", - Type: []string{"boolean"}, - Format: "", - }, - }, - "volumeBindingMode": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is alpha-level and is only honored by servers that enable the VolumeScheduling feature.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"provisioner"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/storage/v1.StorageClassList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StorageClassList is a collection of storage classes.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of StorageClasses", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1.StorageClass"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/storage/v1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/storage/v1alpha1.VolumeAttachment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec", "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/storage/v1alpha1.VolumeAttachmentList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentList is a collection of VolumeAttachment objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of VolumeAttachments", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachment"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", - Properties: map[string]spec.Schema{ - "persistentVolumeName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the persistent volume to attach.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", - Properties: map[string]spec.Schema{ - "attacher": { - SchemaProps: spec.SchemaProps{ - Description: "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", - Type: []string{"string"}, - Format: "", - }, - }, - "source": { - SchemaProps: spec.SchemaProps{ - Description: "Source represents the volume that should be attached.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"), - }, - }, - "nodeName": { - SchemaProps: spec.SchemaProps{ - Description: "The node that the volume should be attached to.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"attacher", "source", "nodeName"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeAttachmentSource"}, - }, - "k8s.io/api/storage/v1alpha1.VolumeAttachmentStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeAttachmentStatus is the status of a VolumeAttachment request.", - Properties: map[string]spec.Schema{ - "attached": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "attachmentMetadata": { - SchemaProps: spec.SchemaProps{ - Description: "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "attachError": { - SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), - }, - }, - "detachError": { - SchemaProps: spec.SchemaProps{ - Description: "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", - Ref: ref("k8s.io/api/storage/v1alpha1.VolumeError"), - }, - }, - }, - Required: []string{"attached"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/storage/v1alpha1.VolumeError"}, - }, - "k8s.io/api/storage/v1alpha1.VolumeError": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeError captures an error encountered during a volume operation.", - Properties: map[string]spec.Schema{ - "time": { - SchemaProps: spec.SchemaProps{ - Description: "Time the error was encountered.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/api/storage/v1beta1.StorageClass": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "provisioner": { - SchemaProps: spec.SchemaProps{ - Description: "Provisioner indicates the type of the provisioner.", - Type: []string{"string"}, - Format: "", - }, - }, - "parameters": { - SchemaProps: spec.SchemaProps{ - Description: "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "reclaimPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", - Type: []string{"string"}, - Format: "", - }, - }, - "mountOptions": { - SchemaProps: spec.SchemaProps{ - Description: "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "allowVolumeExpansion": { - SchemaProps: spec.SchemaProps{ - Description: "AllowVolumeExpansion shows whether the storage class allow volume expand", - Type: []string{"boolean"}, - Format: "", - }, - }, - "volumeBindingMode": { - SchemaProps: spec.SchemaProps{ - Description: "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is alpha-level and is only honored by servers that enable the VolumeScheduling feature.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"provisioner"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - }, - "k8s.io/api/storage/v1beta1.StorageClassList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StorageClassList is a collection of storage classes.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of StorageClasses", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/storage/v1beta1.StorageClass"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/storage/v1beta1.StorageClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - }, - "k8s.io/apimachinery/pkg/api/resource.Quantity": resource.Quantity{}.OpenAPIDefinition(), - "k8s.io/apimachinery/pkg/api/resource.int64Amount": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", - Properties: map[string]spec.Schema{ - "value": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "scale": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"value", "scale"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIGroup contains the name, the supported versions, and the preferred version of a group.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the name of the group.", - Type: []string{"string"}, - Format: "", - }, - }, - "versions": { - SchemaProps: spec.SchemaProps{ - Description: "versions are the versions supported in this group.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), - }, - }, - }, - }, - }, - "preferredVersion": { - SchemaProps: spec.SchemaProps{ - Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), - }, - }, - "serverAddressByClientCIDRs": { - SchemaProps: spec.SchemaProps{ - Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), - }, - }, - }, - }, - }, - }, - Required: []string{"name", "versions", "serverAddressByClientCIDRs"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "groups": { - SchemaProps: spec.SchemaProps{ - Description: "groups is a list of APIGroup.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), - }, - }, - }, - }, - }, - }, - Required: []string{"groups"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIResource specifies the name of a resource and whether it is namespaced.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the plural name of the resource.", - Type: []string{"string"}, - Format: "", - }, - }, - "singularName": { - SchemaProps: spec.SchemaProps{ - Description: "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", - Type: []string{"string"}, - Format: "", - }, - }, - "namespaced": { - SchemaProps: spec.SchemaProps{ - Description: "namespaced indicates if a resource is namespaced or not.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Description: "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", - Type: []string{"string"}, - Format: "", - }, - }, - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "shortNames": { - SchemaProps: spec.SchemaProps{ - Description: "shortNames is a list of suggested short names of the resource.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "categories": { - SchemaProps: spec.SchemaProps{ - Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"name", "singularName", "namespaced", "kind", "verbs"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "groupVersion": { - SchemaProps: spec.SchemaProps{ - Description: "groupVersion is the group and version this APIResourceList is for.", - Type: []string{"string"}, - Format: "", - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "resources contains the name of the resources and if they are namespaced.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), - }, - }, - }, - }, - }, - }, - Required: []string{"groupVersion", "resources"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "versions": { - SchemaProps: spec.SchemaProps{ - Description: "versions are the api versions that are available.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "serverAddressByClientCIDRs": { - SchemaProps: spec.SchemaProps{ - Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), - }, - }, - }, - }, - }, - }, - Required: []string{"versions", "serverAddressByClientCIDRs"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeleteOptions may be provided when deleting an API object.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "gracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "preconditions": { - SchemaProps: spec.SchemaProps{ - Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), - }, - }, - "orphanDependents": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "propagationPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", - Properties: map[string]spec.Schema{ - "Duration": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - Required: []string{"Duration"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.ExportOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExportOptions is the query options to the standard REST get call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "export": { - SchemaProps: spec.SchemaProps{ - Description: "Should this value be exported. Export strips fields that a user can not specify.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "exact": { - SchemaProps: spec.SchemaProps{ - Description: "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"export", "exact"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GetOptions is the standard query options to the standard REST get call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - Type: []string{"string"}, - Format: "", - }, - }, - "includeUninitialized": { - SchemaProps: spec.SchemaProps{ - Description: "If true, partially initialized resources are included in the response.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "kind"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "resource"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.", - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", - Properties: map[string]spec.Schema{ - "groupVersion": { - SchemaProps: spec.SchemaProps{ - Description: "groupVersion specifies the API group and version in the form \"group/version\"", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"groupVersion", "version"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version", "kind"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling", - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version", "resource"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Initializer": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Initializer is information about an initializer that has not yet completed.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name of the process that is responsible for initializing this object.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Initializers": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Initializers tracks the progress of initialization.", - Properties: map[string]spec.Schema{ - "pending": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Initializer"), - }, - }, - }, - }, - }, - "result": { - SchemaProps: spec.SchemaProps{ - Description: "If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Status"), - }, - }, - }, - Required: []string{"pending"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Initializer", "k8s.io/apimachinery/pkg/apis/meta/v1.Status"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "InternalEvent makes watch.Event versioned", - Properties: map[string]spec.Schema{ - "Type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "Object": { - SchemaProps: spec.SchemaProps{ - Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), - }, - }, - }, - Required: []string{"Type", "Object"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Object"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", - Properties: map[string]spec.Schema{ - "matchLabels": { - SchemaProps: spec.SchemaProps{ - Description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "matchExpressions": { - SchemaProps: spec.SchemaProps{ - Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - Properties: map[string]spec.Schema{ - "key": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "key", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "key is the label key that the selector applies to.", - Type: []string{"string"}, - Format: "", - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", - Type: []string{"string"}, - Format: "", - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"key", "operator"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.List": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "List holds a list of objects, which may not be known by the server.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of objects", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - Properties: map[string]spec.Schema{ - "selfLink": { - SchemaProps: spec.SchemaProps{ - Description: "selfLink is a URL representing this object. Populated by the system. Read-only.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", - Type: []string{"string"}, - Format: "", - }, - }, - "continue": { - SchemaProps: spec.SchemaProps{ - Description: "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ListOptions is the query options to a standard REST list call.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "labelSelector": { - SchemaProps: spec.SchemaProps{ - Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldSelector": { - SchemaProps: spec.SchemaProps{ - Description: "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - Type: []string{"string"}, - Format: "", - }, - }, - "includeUninitialized": { - SchemaProps: spec.SchemaProps{ - Description: "If true, partially initialized resources are included in the response.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "watch": { - SchemaProps: spec.SchemaProps{ - Description: "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - Type: []string{"string"}, - Format: "", - }, - }, - "timeoutSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Timeout for the list/watch call.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "limit": { - SchemaProps: spec.SchemaProps{ - Description: "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "continue": { - SchemaProps: spec.SchemaProps{ - Description: "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": v1.MicroTime{}.OpenAPIDefinition(), - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - Type: []string{"string"}, - Format: "", - }, - }, - "generateName": { - SchemaProps: spec.SchemaProps{ - Description: "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", - Type: []string{"string"}, - Format: "", - }, - }, - "selfLink": { - SchemaProps: spec.SchemaProps{ - Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", - Type: []string{"string"}, - Format: "", - }, - }, - "generation": { - SchemaProps: spec.SchemaProps{ - Description: "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "creationTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "deletionTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "deletionGracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "labels": { - SchemaProps: spec.SchemaProps{ - Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "annotations": { - SchemaProps: spec.SchemaProps{ - Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "ownerReferences": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "uid", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), - }, - }, - }, - }, - }, - "initializers": { - SchemaProps: spec.SchemaProps{ - Description: "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Initializers"), - }, - }, - "finalizers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "clusterName": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Initializers", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "API version of the referent.", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "controller": { - SchemaProps: spec.SchemaProps{ - Description: "If true, this reference points to the managing controller.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "blockOwnerDeletion": { - SchemaProps: spec.SchemaProps{ - Description: "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"apiVersion", "kind", "name", "uid"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", - Properties: map[string]spec.Schema{ - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the target UID.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", - Properties: map[string]spec.Schema{ - "paths": { - SchemaProps: spec.SchemaProps{ - Description: "paths are the paths available at root.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"paths"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", - Properties: map[string]spec.Schema{ - "clientCIDR": { - SchemaProps: spec.SchemaProps{ - Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", - Type: []string{"string"}, - Format: "", - }, - }, - "serverAddress": { - SchemaProps: spec.SchemaProps{ - Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"clientCIDR", "serverAddress"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Status is a return value for calls that don't return other objects.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the status of this operation.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", - Type: []string{"string"}, - Format: "", - }, - }, - "details": { - SchemaProps: spec.SchemaProps{ - Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), - }, - }, - "code": { - SchemaProps: spec.SchemaProps{ - Description: "Suggested HTTP return code for this status, 0 if not set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", - Properties: map[string]spec.Schema{ - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "A machine-readable description of the cause of the error. If this value is empty there is no information available.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", - Type: []string{"string"}, - Format: "", - }, - }, - "field": { - SchemaProps: spec.SchemaProps{ - Description: "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "The group attribute of the resource associated with the status StatusReason.", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "causes": { - SchemaProps: spec.SchemaProps{ - Description: "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), - }, - }, - }, - }, - }, - "retryAfterSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": v1.Time{}.OpenAPIDefinition(), - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.", - Properties: map[string]spec.Schema{ - "seconds": { - SchemaProps: spec.SchemaProps{ - Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "nanos": { - SchemaProps: spec.SchemaProps{ - Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"seconds", "nanos"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Event represents a single event to a watched resource.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "object": { - SchemaProps: spec.SchemaProps{ - Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - Required: []string{"type", "object"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - }, - "k8s.io/apimachinery/pkg/runtime.RawExtension": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", - Properties: map[string]spec.Schema{ - "Raw": { - SchemaProps: spec.SchemaProps{ - Description: "Raw is the underlying serialization of this object.", - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - Required: []string{"Raw"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/runtime.TypeMeta": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this: type MyAwesomeAPIObject struct {\n runtime.TypeMeta `json:\",inline\"`\n ... // other fields\n} func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind\n\nTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.", - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/runtime.Unknown": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.", - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "Raw": { - SchemaProps: spec.SchemaProps{ - Description: "Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.", - Type: []string{"string"}, - Format: "byte", - }, - }, - "ContentEncoding": { - SchemaProps: spec.SchemaProps{ - Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", - Type: []string{"string"}, - Format: "", - }, - }, - "ContentType": { - SchemaProps: spec.SchemaProps{ - Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"Raw", "ContentEncoding", "ContentType"}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/apimachinery/pkg/util/intstr.IntOrString": intstr.IntOrString{}.OpenAPIDefinition(), - "k8s.io/apimachinery/pkg/version.Info": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Info contains versioning information. how we'll want to distribute that information.", - Properties: map[string]spec.Schema{ - "major": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "minor": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "gitVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "gitCommit": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "gitTreeState": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "buildDate": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "goVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "compiler": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "platform": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, - }, - }, - Dependencies: []string{}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.APIEndpoint": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIEndpoint represents a reachable Kubernetes API endpoint.", - Properties: map[string]spec.Schema{ - "host": { - SchemaProps: spec.SchemaProps{ - Description: "The hostname on which the API server is serving.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "The port on which the API server is serving.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"host", "port"}, - }, - }, - Dependencies: []string{}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.Cluster": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Cluster", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterSpec", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterStatus"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.Cluster"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.Cluster"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterNetworkingConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterNetworkingConfig specifies the different networking parameters for a cluster.", - Properties: map[string]spec.Schema{ - "services": { - SchemaProps: spec.SchemaProps{ - Description: "The network ranges from which service VIPs are allocated.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.NetworkRanges"), - }, - }, - "pods": { - SchemaProps: spec.SchemaProps{ - Description: "The network ranges from which POD networks are allocated.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.NetworkRanges"), - }, - }, - "serviceDomain": { - SchemaProps: spec.SchemaProps{ - Description: "Domain name for services.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"services", "pods", "serviceDomain"}, - }, - }, - Dependencies: []string{ - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.NetworkRanges"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterSchemeFns": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Cluster Functions and Structs", - Properties: map[string]spec.Schema{ - "DefaultSchemeFns": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultSchemeFns"), - }, - }, - }, - Required: []string{"DefaultSchemeFns"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultSchemeFns"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterSpec defines the desired state of Cluster", - Properties: map[string]spec.Schema{ - "clusterNetwork": { - SchemaProps: spec.SchemaProps{ - Description: "Cluster network configuration", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterNetworkingConfig"), - }, - }, - "providerConfig": { - SchemaProps: spec.SchemaProps{ - Description: "Provider-specific serialized configuration to use during cluster creation. It is recommended that providers maintain their own versioned API types that should be serialized/deserialized from this field.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ProviderConfig"), - }, - }, - }, - Required: []string{"clusterNetwork"}, - }, - }, - Dependencies: []string{ - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterNetworkingConfig", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ProviderConfig"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterStatus defines the observed state of Cluster", - Properties: map[string]spec.Schema{ - "apiEndpoints": { - SchemaProps: spec.SchemaProps{ - Description: "APIEndpoint represents the endpoint to communicate with the IP.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.APIEndpoint"), - }, - }, - }, - }, - }, - "errorReason": { - SchemaProps: spec.SchemaProps{ - Description: "If set, indicates that there is a problem reconciling the state, and will be set to a token value suitable for programmatic interpretation.", - Type: []string{"string"}, - Format: "", - }, - }, - "errorMessage": { - SchemaProps: spec.SchemaProps{ - Description: "If set, indicates that there is a problem reconciling the state, and will be set to a descriptive error message.", - Type: []string{"string"}, - Format: "", - }, - }, - "providerStatus": { - SchemaProps: spec.SchemaProps{ - Description: "Provider-specific status. It is recommended that providers maintain their own versioned API types that should be serialized/deserialized from this field.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - Required: []string{"apiEndpoints", "errorReason", "errorMessage", "providerStatus"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.APIEndpoint"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterStatusStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "DefaultStatusStorageStrategy": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStatusStorageStrategy"), - }, - }, - }, - Required: []string{"DefaultStatusStorageStrategy"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStatusStorageStrategy"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ClusterStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "DefaultStorageStrategy": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStorageStrategy"), - }, - }, - }, - Required: []string{"DefaultStorageStrategy"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStorageStrategy"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.Machine": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Machine", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSpec", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineStatus"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeployment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineDeployment", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentSpec", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentStatus"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeployment"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeployment"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentSchemeFns": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineDeployment Functions and Structs", - Properties: map[string]spec.Schema{ - "DefaultSchemeFns": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultSchemeFns"), - }, - }, - }, - Required: []string{"DefaultSchemeFns"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultSchemeFns"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineDeploymentSpec defines the desired state of MachineDeployment", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Number of desired machines. Defaults to 1. This is a pointer to distinguish between explicit zero and not specified.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Label selector for machines. Existing MachineSets whose machines are selected by this will be the ones affected by this deployment. It must match the machine template's labels.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template describes the machines that will be created.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineTemplateSpec"), - }, - }, - "strategy": { - SchemaProps: spec.SchemaProps{ - Description: "The deployment strategy to use to replace existing machines with new ones.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentStrategy"), - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created machine should be ready. Defaults to 0 (machine will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "revisionHistoryLimit": { - SchemaProps: spec.SchemaProps{ - Description: "The number of old MachineSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "paused": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the deployment is paused.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "progressDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"selector", "template"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineTemplateSpec"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineDeploymentStatus defines the observed state of MachineDeployment", - Properties: map[string]spec.Schema{ - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "The generation observed by the deployment controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of non-terminated machines targeted by this deployment (their labels match the selector).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "updatedReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of non-terminated machines targeted by this deployment that have the desired template spec.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of ready machines targeted by this deployment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of available machines (ready for at least minReadySeconds) targeted by this deployment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "unavailableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "Total number of unavailable machines targeted by this deployment. This is the total number of machines that are still required for the deployment to have 100% available capacity. They may either be machines that are running but not yet available or machines that still have not been created.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineDeploymentStrategy describes how to replace existing machines with new ones.", - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of deployment. Currently the only supported strategy is \"RollingUpdate\". Default is RollingUpdate.", - Type: []string{"string"}, - Format: "", - }, - }, - "rollingUpdate": { - SchemaProps: spec.SchemaProps{ - Description: "Rolling update config params. Present only if MachineDeploymentStrategyType = RollingUpdate.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineRollingUpdateDeployment"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineRollingUpdateDeployment"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentValidationStatusStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "DefaultStatusStorageStrategy": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStatusStorageStrategy"), - }, - }, - }, - Required: []string{"DefaultStatusStorageStrategy"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStatusStorageStrategy"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineDeploymentValidationStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "DefaultStorageStrategy": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStorageStrategy"), - }, - }, - }, - Required: []string{"DefaultStorageStrategy"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStorageStrategy"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.Machine"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.Machine"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineRollingUpdateDeployment": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Spec to control the desired behavior of rolling update.", - Properties: map[string]spec.Schema{ - "maxUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of machines that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired machines (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 0. Example: when this is set to 30%, the old MachineSet can be scaled down to 70% of desired machines immediately when the rolling update starts. Once new machines are ready, old MachineSet can be scaled down further, followed by scaling up the new MachineSet, ensuring that the total number of machines available at all times during the update is at least 70% of desired machines.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "maxSurge": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of machines that can be scheduled above the desired number of machines. Value can be an absolute number (ex: 5) or a percentage of desired machines (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 1. Example: when this is set to 30%, the new MachineSet can be scaled up immediately when the rolling update starts, such that the total number of old and new machines do not exceed 130% of desired machines. Once old machines have been killed, new MachineSet can be scaled up further, ensuring that total number of machines running at any time during the update is at most 130% of desired machines.", - Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSchemeFns": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Machine Functions and Structs", - Properties: map[string]spec.Schema{ - "DefaultSchemeFns": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultSchemeFns"), - }, - }, - }, - Required: []string{"DefaultSchemeFns"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultSchemeFns"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSet": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineSet ensures that a specified number of machines replicas are running at any given time.", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSetSpec", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSetStatus"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSetList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSet"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSet"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSetSchemeFns": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineSet Functions and Structs", - Properties: map[string]spec.Schema{ - "DefaultSchemeFns": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultSchemeFns"), - }, - }, - }, - Required: []string{"DefaultSchemeFns"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultSchemeFns"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineSetSpec defines the desired state of MachineSet", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum number of seconds for which a newly created machine should be ready. Defaults to 0 (machine will be considered available as soon as it is ready)", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector is a label query over machines that should match the replica count. Label keys and values that must match in order to be controlled by this MachineSet. It must match the machine template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template is the object that describes the machine that will be created if insufficient replicas are detected.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineTemplateSpec"), - }, - }, - }, - Required: []string{"selector"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineTemplateSpec"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSetStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineSetStatus defines the observed state of MachineSet", - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the most recently observed number of replicas.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "fullyLabeledReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of replicas that have labels matching the labels of the machine template of the MachineSet.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is \"Ready\".", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of available replicas (ready for at least minReadySeconds) for this MachineSet.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "ObservedGeneration reflects the generation of the most recently observed MachineSet.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "errorReason": { - SchemaProps: spec.SchemaProps{ - Description: "In the event that there is a terminal problem reconciling the replicas, both ErrorReason and ErrorMessage will be set. ErrorReason will be populated with a succinct value suitable for machine interpretation, while ErrorMessage will contain a more verbose string suitable for logging and human consumption.\n\nThese fields should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the MachineTemplates's spec or the configuration of the machine controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the machine controller, or the responsible machine controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconcilation of Machines can be added as events to the MachineSet object and/or logged in the controller's output.", - Type: []string{"string"}, - Format: "", - }, - }, - "errorMessage": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSetStatusStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "DefaultStatusStorageStrategy": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStatusStorageStrategy"), - }, - }, - }, - Required: []string{"DefaultStatusStorageStrategy"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStatusStorageStrategy"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSetStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "DefaultStorageStrategy": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStorageStrategy"), - }, - }, - }, - Required: []string{"DefaultStorageStrategy"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStorageStrategy"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineSpec defines the desired state of Machine", - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "This ObjectMeta will autopopulate the Node created. Use this to indicate what labels, annotations, name prefix, etc., should be used when creating the Node.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "taints": { - SchemaProps: spec.SchemaProps{ - Description: "The full, authoritative list of taints to apply to the corresponding Node. This list will overwrite any modifications made to the Node on an ongoing basis.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Taint"), - }, - }, - }, - }, - }, - "providerConfig": { - SchemaProps: spec.SchemaProps{ - Description: "Provider-specific configuration to use during node creation.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ProviderConfig"), - }, - }, - "roles": { - SchemaProps: spec.SchemaProps{ - Description: "A list of roles for this Machine to use.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "versions": { - SchemaProps: spec.SchemaProps{ - Description: "Versions of key software to use. This field is optional at cluster creation time, and omitting the field indicates that the cluster installation tool should select defaults for the user. These defaults may differ based on the cluster installer, but the tool should populate the values it uses when persisting Machine objects. A Machine spec missing this field at runtime is invalid.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineVersionInfo"), - }, - }, - "configSource": { - SchemaProps: spec.SchemaProps{ - Description: "To populate in the associated Node for dynamic kubelet config. This field already exists in Node, so any updates to it in the Machine spec will be automatially copied to the linked NodeRef from the status. The rest of dynamic kubelet config support should then work as-is.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource", "k8s.io/api/core/v1.Taint", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineVersionInfo", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ProviderConfig"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineStatus defines the observed state of Machine", - Properties: map[string]spec.Schema{ - "nodeRef": { - SchemaProps: spec.SchemaProps{ - Description: "If the corresponding Node exists, this will point to its object.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "lastUpdated": { - SchemaProps: spec.SchemaProps{ - Description: "When was this status last observed", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "versions": { - SchemaProps: spec.SchemaProps{ - Description: "The current versions of software on the corresponding Node (if it exists). This is provided for a few reasons:\n\n1) It is more convenient than checking the NodeRef, traversing it to\n the Node, and finding the appropriate field in Node.Status.NodeInfo\n (which uses different field names and formatting).\n2) It removes some of the dependency on the structure of the Node,\n so that if the structure of Node.Status.NodeInfo changes, only\n machine controllers need to be updated, rather than every client\n of the Machines API.\n3) There is no other way simple way to check the ControlPlane\n version. A client would have to connect directly to the apiserver\n running on the target node in order to find out its version.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineVersionInfo"), - }, - }, - "errorReason": { - SchemaProps: spec.SchemaProps{ - Description: "In the event that there is a terminal problem reconciling the Machine, both ErrorReason and ErrorMessage will be set. ErrorReason will be populated with a succinct value suitable for machine interpretation, while ErrorMessage will contain a more verbose string suitable for logging and human consumption.\n\nThese fields should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the Machine's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconcilation of Machines can be added as events to the Machine object and/or logged in the controller's output.", - Type: []string{"string"}, - Format: "", - }, - }, - "errorMessage": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "providerStatus": { - SchemaProps: spec.SchemaProps{ - Description: "Provider-specific status. It is recommended that providers maintain their own versioned API types that should be serialized/deserialized from this field.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - Required: []string{"providerStatus"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineVersionInfo"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineStatusStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "DefaultStatusStorageStrategy": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStatusStorageStrategy"), - }, - }, - }, - Required: []string{"DefaultStatusStorageStrategy"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStatusStorageStrategy"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineStrategy": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "DefaultStorageStrategy": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStorageStrategy"), - }, - }, - }, - Required: []string{"DefaultStorageStrategy"}, - }, - }, - Dependencies: []string{ - "github.com/kubernetes-incubator/apiserver-builder/pkg/builders.DefaultStorageStrategy"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineTemplateSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MachineTemplateSpec describes the data a machine should have when created from a template", - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Specification of the desired behavior of the machine. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineSpec"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.MachineVersionInfo": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "kubelet": { - SchemaProps: spec.SchemaProps{ - Description: "Semantic version of kubelet to run", - Type: []string{"string"}, - Format: "", - }, - }, - "controlPlane": { - SchemaProps: spec.SchemaProps{ - Description: "Semantic version of the Kubernetes control plane to run. This should only be populated when the machine is a master.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"kubelet"}, - }, - }, - Dependencies: []string{}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.NetworkRanges": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NetworkRanges represents ranges of network addresses.", - Properties: map[string]spec.Schema{ - "cidrBlocks": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"cidrBlocks"}, - }, - }, - Dependencies: []string{}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ProviderConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ProviderConfig defines the configuration to use during node creation.", - Properties: map[string]spec.Schema{ - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value is an inlined, serialized representation of the resource configuration. It is recommended that providers maintain their own versioned API types that should be serialized/deserialized from this field, akin to component config.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - "ValueFrom": { - SchemaProps: spec.SchemaProps{ - Description: "Source for the provider configuration. Cannot be used if value is not empty.", - Ref: ref("sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ProviderConfigSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ProviderConfigSource"}, - }, - "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1.ProviderConfigSource": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ProviderConfigSource represents a source for the provider-specific resource configuration.", - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - }, - } -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/BUILD.bazel deleted file mode 100644 index fa0fff43f27..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["test_cmd_runner.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner", - importpath = "sigs.k8s.io/cluster-api/pkg/test-cmd-runner", - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = ["test_cmd_runner_test.go"], - embed = [":go_default_library"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/test_cmd_runner.go b/vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/test_cmd_runner.go deleted file mode 100644 index 78f90dcdd5b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/test_cmd_runner.go +++ /dev/null @@ -1,103 +0,0 @@ -package test_cmd_runner - -import ( - "flag" - "fmt" - "os" - "os/exec" - "reflect" - "runtime" - "strings" - "testing" -) - -type TestRunner struct { - callback func(string, ...string) int -} - -var ( - TestModeEnvVar = "GO_TEST_MODE" - CallbackTestMode = "CALLBACK" - CallbackFunctionName = "GO_CALLBACK_FUNCTION_NAME" - reggedFunctions = make(map[string]func(string, ...string) int) -) - -// TestRunner makes it easy to mock out shell commands. It will start a new program that calls into the callback function -// supplied when creating TestRunner. -// -// To use TestRunner from your test, you must do the following: -// 1. In your test file's init() method call RegisterCallback with the same callback function you passed into TestRunner -// 2. Copy the TestMain below and insert it into your test file: -// func TestMain(m *testing.M) { -// cmd_runner.TestMain(m) -// } -func NewTestRunner(callback func(cmd string, args ...string) (exitCode int)) (*TestRunner, error) { - name := getFullyQualifiedFunctionName(callback) - if _, ok := reggedFunctions[name]; !ok { - shortName := getUnqualifiedFunctionName(name) - registerCallbackShortName := getUnqualifiedFunctionName(getFullyQualifiedFunctionName(RegisterCallback)) - return nil, fmt.Errorf("unregistered function: '%v', you must add the following to your package's init() method, %v(%v)", name, registerCallbackShortName, shortName) - } - return &TestRunner{ - callback: callback, - }, nil -} - -func NewTestRunnerFailOnErr(t *testing.T, callback func(cmd string, args ...string) int) *TestRunner { - runner, err := NewTestRunner(callback) - if err != nil { - t.Fatal(err) - } - return runner -} - -// Call this method to register your callback function from your init() method. This is required before creating a TestRunner that uses your function. -func RegisterCallback(fn func(cmd string, args ...string) int) { - name := getFullyQualifiedFunctionName(fn) - reggedFunctions[name] = fn -} - -func (runner *TestRunner) CombinedOutput(cmd string, args ...string) (string, error) { - args = append([]string{cmd}, args...) - command := exec.Command(os.Args[0], args...) - command.Env = []string{ - fmt.Sprintf("%v=%v", TestModeEnvVar, CallbackTestMode), - fmt.Sprintf("%v=%v", CallbackFunctionName, getFullyQualifiedFunctionName(runner.callback)), - } - output, err := command.CombinedOutput() - return string(output), err -} - -func TestMain(m *testing.M) { - flag.Parse() - os.Exit(run(m)) -} - -func run(m *testing.M) int { - switch os.Getenv(TestModeEnvVar) { - case CallbackTestMode: - return runTestExec() - default: - return m.Run() - } -} - -func runTestExec() int { - functionName := os.Getenv(CallbackFunctionName) - fn := reggedFunctions[functionName] - if fn == nil { - panic(fmt.Errorf("unregistered function name: %v", functionName)) - } - return fn(os.Args[1], os.Args[2:len(os.Args)]...) -} - -// given the output of getFullyQualifiedFunctionName(...) this function returns the actual 'short' function name stripping off the package path and file name. -func getUnqualifiedFunctionName(fullyQualifiedName string) string { - parts := strings.Split(fullyQualifiedName, ".") - return parts[len(parts)-1] -} - -// code assumes that the 'fn' parameter has a kind of 'Func' -func getFullyQualifiedFunctionName(fn interface{}) string { - return runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name() -} diff --git a/vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/test_cmd_runner_test.go b/vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/test_cmd_runner_test.go deleted file mode 100644 index 37bcbfe3c6c..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/pkg/test-cmd-runner/test_cmd_runner_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package test_cmd_runner_test - -import ( - "fmt" - "os" - "sigs.k8s.io/cluster-api/pkg/test-cmd-runner" - "strings" - "testing" -) - -func init() { - test_cmd_runner.RegisterCallback(callbackWithArgs) - test_cmd_runner.RegisterCallback(callbackWithoutArgs) -} - -var ( - callbackOutput = "**** this is test output ****" - commandName = "my-command" - argOne = "arg1" - argTwo = "arg2" - argThree = "arg3" - allArgs = []string{argOne, argTwo, argThree} -) - -func TestUnregisteredFunctionShouldError(t *testing.T) { - _, err := test_cmd_runner.NewTestRunner(unregisteredFunction) - if err == nil { - t.Fatalf("expected error, got nil") - } - expectedContains := "RegisterCallback(unregisteredFunction)" - if !strings.Contains(err.Error(), expectedContains) { - t.Errorf("expected error to contain '%v', error contents: %v", expectedContains, err) - } -} - -func TestCallbackFunctionShouldExecute(t *testing.T) { - runner := test_cmd_runner.NewTestRunnerFailOnErr(t, callbackWithArgs) - output, err := runner.CombinedOutput(commandName, allArgs...) - if err != nil { - t.Errorf("invalid error: expected 'nil', got '%v'", err) - } - if output != callbackOutput { - t.Errorf("invalid output: expected '%v' got '%v'", callbackOutput, output) - } -} - -func TestNoArgsShouldNotError(t *testing.T) { - runner := test_cmd_runner.NewTestRunnerFailOnErr(t, callbackWithoutArgs) - output, err := runner.CombinedOutput(commandName) - if err != nil { - t.Errorf("invalid error: expected 'nil', got '%v'", err) - } - if output != callbackOutput { - t.Errorf("invalid output: expected '%v' got '%v'", callbackOutput, output) - } -} - -func TestMain(m *testing.M) { - test_cmd_runner.TestMain(m) -} - -func callbackWithoutArgs(cmd string, args ...string) int { - return verifyCmdAndArgsAndPrint(commandName, []string{}, cmd, args...) -} - -func callbackWithArgs(cmd string, args ...string) int { - return verifyCmdAndArgsAndPrint(commandName, allArgs, cmd, args...) -} - -func verifyCmdAndArgsAndPrint(expectedCmd string, expectedArgs []string, cmd string, args ...string) (exitCode int) { - if cmd != expectedCmd { - fmt.Fprintln(os.Stderr, fmt.Sprintf("incorrect cmd name, expected '%v', got '%v'", commandName, cmd)) - return 1 - } - if !stringSlicesEqual(args, expectedArgs) { - fmt.Fprintln(os.Stderr, fmt.Sprintf("incorrect args, expected: '%v', got '%v'", allArgs, args)) - return 1 - } - fmt.Print(callbackOutput) - return 0 -} - -func stringSlicesEqual(s1 []string, s2 []string) bool { - if s1 == nil && s2 == nil { - return true - } - if s1 == nil && s2 != nil || s1 != nil && s2 == nil { - return false - } - for i := range s1 { - if s1[i] != s2[i] { - return false - } - } - return true -} - -func unregisteredFunction(cmd string, args ...string) int { - return 0 -} diff --git a/vendor/sigs.k8s.io/cluster-api/sample/cluster.yaml b/vendor/sigs.k8s.io/cluster-api/sample/cluster.yaml deleted file mode 100644 index 92111ec6174..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/sample/cluster.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: cluster.k8s.io/v1alpha1 -kind: Cluster -metadata: - name: cluster-example -spec: diff --git a/vendor/sigs.k8s.io/cluster-api/sample/machine.yaml b/vendor/sigs.k8s.io/cluster-api/sample/machine.yaml deleted file mode 100644 index d7ab80715b0..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/sample/machine.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: cluster.k8s.io/v1alpha1 -kind: Machine -metadata: - name: machine-example -spec: diff --git a/vendor/sigs.k8s.io/cluster-api/sample/machinedeployment.yaml b/vendor/sigs.k8s.io/cluster-api/sample/machinedeployment.yaml deleted file mode 100644 index 31f02141f9b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/sample/machinedeployment.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: "cluster.k8s.io/v1alpha1" -kind: MachineDeployment -metadata: - name: sample-machinedeployment -spec: - replicas: 3 - selector: - matchLabels: - foo: bar - template: - metadata: - labels: - foo: bar - spec: - providerConfig: - value: - apiVersion: "gceproviderconfig/v1alpha1" - kind: "GCEProviderConfig" - project: "${GCLOUD_PROJECT}" - zone: "us-central1-c" - machineType: "n1-standard-2" - os: "ubuntu-1604-lts" - versions: - kubelet: 1.9.4 - containerRuntime: - name: docker - version: 1.12.0 - roles: - - Node diff --git a/vendor/sigs.k8s.io/cluster-api/sample/machineset.yaml b/vendor/sigs.k8s.io/cluster-api/sample/machineset.yaml deleted file mode 100644 index 1442fe9796b..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/sample/machineset.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: "cluster.k8s.io/v1alpha1" -kind: MachineSet -metadata: - name: my-first-machineset -spec: - replicas: 3 - selector: - matchLabels: - foo: bar - template: - metadata: - labels: - foo: bar - spec: - providerConfig: - value: - apiVersion: "gceproviderconfig/v1alpha1" - kind: "GCEMachineProviderConfig" - zone: "us-central1-f" - machineType: "n1-standard-1" - os: "ubuntu-1604-lts" - versions: - kubelet: 1.9.4 - roles: - - Node diff --git a/vendor/sigs.k8s.io/cluster-api/scripts/ci-build.sh b/vendor/sigs.k8s.io/cluster-api/scripts/ci-build.sh deleted file mode 100755 index c8e24eeb47d..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/scripts/ci-build.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. - -go build "${REPO_ROOT}"/... diff --git a/vendor/sigs.k8s.io/cluster-api/scripts/ci-test.sh b/vendor/sigs.k8s.io/cluster-api/scripts/ci-test.sh deleted file mode 100755 index 93dd57bb667..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/scripts/ci-test.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. - -go test -v -tags=integration "${REPO_ROOT}"/... diff --git a/vendor/sigs.k8s.io/cluster-api/tools/README.md b/vendor/sigs.k8s.io/cluster-api/tools/README.md deleted file mode 100644 index 79f0cd2a258..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Tools - -Tools and code that run on top of the Cluster API. \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/tools/repair/.gitignore b/vendor/sigs.k8s.io/cluster-api/tools/repair/.gitignore deleted file mode 100644 index 53b06d880f1..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/repair/.gitignore +++ /dev/null @@ -1 +0,0 @@ -repair \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/tools/repair/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/tools/repair/BUILD.bazel deleted file mode 100644 index 136824c2cae..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/repair/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/tools/repair", - importpath = "sigs.k8s.io/cluster-api/tools/repair", - visibility = ["//visibility:private"], - deps = ["//vendor/sigs.k8s.io/cluster-api/tools/repair/cmd:go_default_library"], -) - -go_binary( - name = "repair", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/tools/repair/README.md b/vendor/sigs.k8s.io/cluster-api/tools/repair/README.md deleted file mode 100644 index b60071c65eb..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/repair/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Cluster Repair -`repair` is an standalone tool to detect problematic nodes in a cluster and -repair them. It is built on top of the Cluster API, and is an example of tooling -that can be built in a cloud-agnostic way. - -## Build - -```bash -$ cd $GOPATH/src/sigs.k8s.io/ -$ git clone https://github.com/kubernetes-sigs/cluster-api -$ cd cluster-api/tools/repair -$ go build -``` - -## Run -1) Create a cluster using the `gcp-deployer` tool. -2) To do a dry run of detecting broken nodes and seeing what needs to be -repaired, run `./repair --dryrun true`. -3) To actually repair the nodes in cluster, run `./repair` without the -`--dryrun` flag. diff --git a/vendor/sigs.k8s.io/cluster-api/tools/repair/cmd/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/tools/repair/cmd/BUILD.bazel deleted file mode 100644 index 4f2c9791cce..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/repair/cmd/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["root.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/tools/repair/cmd", - importpath = "sigs.k8s.io/cluster-api/tools/repair/cmd", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/tools/repair/util:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/tools/repair/cmd/root.go b/vendor/sigs.k8s.io/cluster-api/tools/repair/cmd/root.go deleted file mode 100644 index c45dcd868f1..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/repair/cmd/root.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "flag" - - "github.com/golang/glog" - "github.com/spf13/cobra" - "k8s.io/apiserver/pkg/util/logs" - "sigs.k8s.io/cluster-api/tools/repair/util" -) - -type RepairOptions struct { - dryRun bool - kubeConfig string -} - -var ro = &RepairOptions{} - -var rootCmd = &cobra.Command{ - Use: "repair", - Short: "Repair node", - Long: `Repairs given node`, - Run: func(cmd *cobra.Command, args []string) { - if err := RunRepair(ro); err != nil { - glog.Exit(err) - } - }, -} - -func RunRepair(ro *RepairOptions) error { - r, err := util.NewRepairer(ro.dryRun, ro.kubeConfig) - if err != nil { - return err - } - return r.RepairNode() -} - -func Execute() { - if err := rootCmd.Execute(); err != nil { - glog.Exit(err) - } -} - -func init() { - rootCmd.Flags().BoolVarP(&ro.dryRun, "dryrun", "", false, "dry run mode.") - rootCmd.PersistentFlags().StringVarP(&ro.kubeConfig, "kubeconfig", "k", "", "location for the kubernetes config file. If not provided, $HOME/.kube/config is used") - flag.CommandLine.Parse([]string{}) - logs.InitLogs() -} diff --git a/vendor/sigs.k8s.io/cluster-api/tools/repair/main.go b/vendor/sigs.k8s.io/cluster-api/tools/repair/main.go deleted file mode 100644 index 45f4e941c41..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/repair/main.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "sigs.k8s.io/cluster-api/tools/repair/cmd" -) - -func main() { - cmd.Execute() -} diff --git a/vendor/sigs.k8s.io/cluster-api/tools/repair/util/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/tools/repair/util/BUILD.bazel deleted file mode 100644 index 457e6bf3f0e..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/repair/util/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["repair.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/tools/repair/util", - importpath = "sigs.k8s.io/cluster-api/tools/repair/util", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/tools/repair/util/repair.go b/vendor/sigs.k8s.io/cluster-api/tools/repair/util/repair.go deleted file mode 100644 index 4a7465572bf..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/repair/util/repair.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "github.com/ghodss/yaml" - "github.com/golang/glog" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" -) - -type repairer struct { - dryRun bool - configPath string - machInterface v1alpha1.MachineInterface -} - -func NewRepairer(dryRun bool, configPath string) (*repairer, error) { - if configPath == "" { - configPath = util.GetDefaultKubeConfigPath() - } - - c, err := util.NewClientSet(configPath) - if err != nil { - return nil, err - } - - return &repairer{dryRun: dryRun, - configPath: configPath, - machInterface: c.ClusterV1alpha1().Machines(v1.NamespaceDefault)}, nil -} - -func (r *repairer) RepairNode() error { - nodes, err := r.getUnhealthyNodes() - if err != nil { - return err - } - if len(nodes) > 0 { - glog.Infof("found unhealthy nodes: %v", nodes) - } else { - glog.Info("All nodes are healthy") - return nil - } - - if r.dryRun { - glog.Info("Running in dry run mode. Not taking any action") - return nil - } - - for _, node := range nodes { - m, err := r.machInterface.Get(node, metav1.GetOptions{}) - - if err != nil { - glog.Info("Error retrieving machine object %v. Not taking any action on this node.", node) - continue - } - if util.IsMaster(m) { - glog.Infof("Found master node %s, skipping repair for it", m.Name) - continue - } - if err := r.machInterface.Delete(node, &metav1.DeleteOptions{}); err != nil { - return err - } - - glog.Infof("Deleted node %s", node) - - if _, err := r.machInterface.Create(util.Copy(m)); err != nil { - return err - } - - glog.Infof("Recreated node %s", node) - } - - return nil -} - -func (r *repairer) getUnhealthyNodes() ([]string, error) { - nodeList := &v1.NodeList{} - out := util.ExecCommand("kubectl", "get", "nodes", "-o=yaml", "--kubeconfig="+r.configPath) - err := yaml.Unmarshal([]byte(out), nodeList) - if err != nil { - return nil, err - } - - var healthy []string - var unhealthy []string - - for _, node := range nodeList.Items { - if util.IsNodeReady(&node) { - healthy = append(healthy, node.Name) - } else { - unhealthy = append(unhealthy, node.Name) - } - } - glog.Infof("healthy nodes: %v", healthy) - glog.Infof("unhealthy nodes: %v", unhealthy) - return unhealthy, nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/.gitignore b/vendor/sigs.k8s.io/cluster-api/tools/upgrader/.gitignore deleted file mode 100644 index 5e398be41bd..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/.gitignore +++ /dev/null @@ -1 +0,0 @@ -upgrader diff --git a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/tools/upgrader/BUILD.bazel deleted file mode 100644 index 98ec2f069cc..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/tools/upgrader", - importpath = "sigs.k8s.io/cluster-api/tools/upgrader", - visibility = ["//visibility:private"], - deps = ["//vendor/sigs.k8s.io/cluster-api/tools/upgrader/cmd:go_default_library"], -) - -go_binary( - name = "upgrader", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/README.md b/vendor/sigs.k8s.io/cluster-api/tools/upgrader/README.md deleted file mode 100644 index 11855395e60..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Cluster Upgrader - -`upgrader` is a standalone tool to upgrade an entire cluster, including the -control plane and all nodes. It is an example of a tool that can be written on -top of the Cluster API in a completely cloud-agnostic way. - -## Building - -```bash -$ cd $GOPATH/src/sigs.k8s.io/ -$ git clone https://github.com/kubernetes-sigs/cluster-api -$ cd cluster-api/tools/upgrader -$ go build -``` - -## Running -1) First, create a cluster using the `gcp-deployer` tool (the default Kubernetes version should be `1.8.3`) -2) To update the entire cluster to `v1.9.4`, run `./upgrader -v 1.9.4` diff --git a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/cmd/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/tools/upgrader/cmd/BUILD.bazel deleted file mode 100644 index 39d4caefb3a..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/cmd/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["root.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/tools/upgrader/cmd", - importpath = "sigs.k8s.io/cluster-api/tools/upgrader/cmd", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/tools/upgrader/util:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/cmd/root.go b/vendor/sigs.k8s.io/cluster-api/tools/upgrader/cmd/root.go deleted file mode 100644 index 96fb7eacbdd..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/cmd/root.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "flag" - - "github.com/golang/glog" - "github.com/spf13/cobra" - "k8s.io/apiserver/pkg/util/logs" - "sigs.k8s.io/cluster-api/tools/upgrader/util" -) - -type UpgradeOptions struct { - KubernetesVersion string - kubeConfig string -} - -var uo = &UpgradeOptions{} - -var RootCmd = &cobra.Command{ - Use: "upgrader", - Short: "cluster upgrader", - Long: `A single tool to upgrade kubernetes cluster`, - Run: func(cmd *cobra.Command, args []string) { - if uo.KubernetesVersion == "" { - glog.Exit("Please provide new kubernetes version.") - } - if err := RunUpgrade(uo); err != nil { - glog.Exit(err.Error()) - } - }, -} - -func RunUpgrade(uo *UpgradeOptions) error { - err := util.UpgradeCluster(uo.KubernetesVersion, uo.kubeConfig) - if err != nil { - glog.Errorf("Failed to upgrade cluster with error : %v", err) - } - return err -} - -func Execute() { - if err := RootCmd.Execute(); err != nil { - glog.Exit(err) - } -} - -func init() { - RootCmd.PersistentFlags().StringVarP(&uo.kubeConfig, "kubeconfig", "k", "", "location for the kubernetes config file. If not provided, $HOME/.kube/config is used") - RootCmd.PersistentFlags().StringVarP(&uo.KubernetesVersion, "version", "v", "", "target kubernetes version") - flag.CommandLine.Parse([]string{}) - logs.InitLogs() -} diff --git a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/main.go b/vendor/sigs.k8s.io/cluster-api/tools/upgrader/main.go deleted file mode 100644 index 04d61e76755..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/main.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import "sigs.k8s.io/cluster-api/tools/upgrader/cmd" - -func main() { - cmd.Execute() -} diff --git a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/util/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/tools/upgrader/util/BUILD.bazel deleted file mode 100644 index f30c42ffe71..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/util/BUILD.bazel +++ /dev/null @@ -1,20 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["upgrade.go"], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/tools/upgrader/util", - importpath = "sigs.k8s.io/cluster-api/tools/upgrader/util", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/util:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/util/upgrade.go b/vendor/sigs.k8s.io/cluster-api/tools/upgrader/util/upgrade.go deleted file mode 100644 index 07e0acfed24..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/tools/upgrader/util/upgrade.go +++ /dev/null @@ -1,188 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package util - -import ( - "fmt" - "time" - - "github.com/golang/glog" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - clientv1alpha1 "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/util" -) - -var ( - kubeClientSet *kubernetes.Clientset - client *clientv1alpha1.ClusterV1alpha1Client - machInterface clientv1alpha1.MachineInterface -) - -func initClient(kubeconfig string) error { - if kubeconfig == "" { - kubeconfig = util.GetDefaultKubeConfigPath() - } - config, err := clientcmd.BuildConfigFromFlags("", kubeconfig) - if err != nil { - glog.Fatalf("BuildConfigFromFlags failed: %v", err) - return err - } - - kubeClientSet, err = kubernetes.NewForConfig(config) - if err != nil { - glog.Fatalf("error creating kube client set: %v", err) - } - - client, err = clientv1alpha1.NewForConfig(config) - if err != nil { - glog.Fatalf("error creating cluster api client: %v", err) - return err - } - machInterface = client.Machines(v1.NamespaceDefault) - - return nil -} - -func checkMachineReady(machineName string, kubeVersion string) (bool, error) { - machine, err := machInterface.Get(machineName, metav1.GetOptions{}) - if err != nil { - return false, err - } - - if machine.Status.NodeRef == nil { - return false, nil - } - - // Find the node object via reference in machine object. - node, err := kubeClientSet.CoreV1().Nodes().Get(machine.Status.NodeRef.Name, metav1.GetOptions{}) - switch { - case err != nil: - glog.V(1).Infof("Failed to get node %s: %v", machineName, err) - return false, err - case !util.IsNodeReady(node): - glog.V(1).Infof("node %s is not ready. Status : %v", machineName, node.Status.Conditions) - return false, nil - case node.Status.NodeInfo.KubeletVersion == "v"+kubeVersion: - glog.Infof("node %s is ready", machineName) - return true, nil - default: - glog.V(1).Infof("node %s kubelet current version: %s, target: %s.", machineName, node.Status.NodeInfo.KubeletVersion, kubeVersion) - return false, nil - } -} - -func UpgradeCluster(kubeversion string, kubeconfig string) error { - glog.Infof("Starting to upgrade cluster to version: %s", kubeversion) - - if err := initClient(kubeconfig); err != nil { - return err - } - - machine_list, err := machInterface.List(metav1.ListOptions{}) - if err != nil { - return err - } - - glog.Info("Upgrading the control plane.") - - // Update the control plan first. It assumes single master. - var master *clusterv1.Machine = nil - for _, mach := range machine_list.Items { - if util.IsMaster(&mach) { - master = &mach - break - } - } - - if master == nil { - err = fmt.Errorf("No master is found.") - } else { - master.Spec.Versions.Kubelet = kubeversion - master.Spec.Versions.ControlPlane = kubeversion - new_machine, err := machInterface.Update(master) - if err == nil { - err = wait.Poll(5*time.Second, 10*time.Minute, func() (bool, error) { - ready, err := checkMachineReady(new_machine.Name, kubeversion) - if err != nil { - // Ignore the error as control plan is restarting. - return false, nil - } - return ready, nil - }) - } - } - - if err != nil { - return err - } - - glog.Info("Finished upgrading control plane.") - - num_nodes := len(machine_list.Items) - 1 - glog.Infof("Upgrading %d nodes in the cluster.", num_nodes) - - // Continue to update all the nodes. - errors := make(chan error, len(machine_list.Items)) - for i, _ := range machine_list.Items { - if !util.IsMaster(&machine_list.Items[i]) { - go func(mach *clusterv1.Machine) { - glog.Infof("Upgrading %s.", mach.Name) - mach, err = machInterface.Get(mach.Name, metav1.GetOptions{}) - if err == nil { - mach.Spec.Versions.Kubelet = kubeversion - new_machine, err := machInterface.Update(mach) - if err == nil { - // Polling the cluster until nodes are updated. - err = wait.Poll(5*time.Second, 10*time.Minute, func() (bool, error) { - ready, err := checkMachineReady(new_machine.Name, kubeversion) - if err != nil { - // Ignore the error as control plan is restarting. - return false, nil - } - return ready, nil - }) - } else { - glog.Errorf("Update to machine object (%s) failed : %v", mach.Name, err) - } - } else { - glog.Errorf("client.Machines().Get() failed : %v", err) - } - errors <- err - }(&machine_list.Items[i]) - } - } - - for _, machine := range machine_list.Items { - if !util.IsMaster(&machine) { - if err = <-errors; err != nil { - return err - } else { - num_nodes-- - if num_nodes > 0 { - glog.Infof("%d nodes are still being updated", num_nodes) - } - } - } - } - - glog.Info("Successfully upgraded the cluster.") - return nil -} diff --git a/vendor/sigs.k8s.io/cluster-api/util/BUILD.bazel b/vendor/sigs.k8s.io/cluster-api/util/BUILD.bazel deleted file mode 100644 index d64c9936356..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/util/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "retry.go", - "util.go", - ], - importmap = "installer/vendor/sigs.k8s.io/cluster-api/util", - importpath = "sigs.k8s.io/cluster-api/util", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/common:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", - "//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/cluster-api/util/retry.go b/vendor/sigs.k8s.io/cluster-api/util/retry.go deleted file mode 100644 index 13434cd2fd3..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/util/retry.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "time" - - "k8s.io/apimachinery/pkg/util/wait" -) - -const ( - backoffSteps = 10 - backoffFactor = 1.25 - backoffDuration = 5 - backoffJitter = 1.0 -) - -func Retry(fn wait.ConditionFunc, initialBackoffSec int) error { - if initialBackoffSec <= 0 { - initialBackoffSec = backoffDuration - } - backoffConfig := wait.Backoff{ - Steps: backoffSteps, - Factor: backoffFactor, - Duration: time.Duration(initialBackoffSec) * time.Second, - Jitter: backoffJitter, - } - retryErr := wait.ExponentialBackoff(backoffConfig, fn) - if retryErr != nil { - return retryErr - } - return nil -} - -func Poll(interval, timeout time.Duration, condition wait.ConditionFunc) error { - return wait.Poll(interval, timeout, condition) -} \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/util/util.go b/vendor/sigs.k8s.io/cluster-api/util/util.go deleted file mode 100644 index 3d6bb0c6835..00000000000 --- a/vendor/sigs.k8s.io/cluster-api/util/util.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "fmt" - "math/rand" - "os" - "os/exec" - "os/user" - "strings" - "time" - - "github.com/golang/glog" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - clustercommon "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" - clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" - "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset" - client "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" -) - -const ( - CharSet = "0123456789abcdefghijklmnopqrstuvwxyz" -) - -var ( - r = rand.New(rand.NewSource(time.Now().UnixNano())) -) - -func RandomToken() string { - return fmt.Sprintf("%s.%s", RandomString(6), RandomString(16)) -} - -func RandomString(n int) string { - result := make([]byte, n) - for i := range result { - result[i] = CharSet[r.Intn(len(CharSet))] - } - return string(result) -} - -func GetMaster(machines []*clusterv1.Machine) *clusterv1.Machine { - for _, machine := range machines { - if IsMaster(machine) { - return machine - } - } - return nil -} - -func MachineP(machines []clusterv1.Machine) []*clusterv1.Machine { - // Convert to list of pointers - var ret []*clusterv1.Machine - for _, machine := range machines { - ret = append(ret, machine.DeepCopy()) - } - return ret -} - -func Home() string { - home := os.Getenv("HOME") - if strings.Contains(home, "root") { - return "/root" - } - - usr, err := user.Current() - if err != nil { - glog.Warningf("unable to find user: %v", err) - return "" - } - return usr.HomeDir -} - -func GetDefaultKubeConfigPath() string { - localDir := fmt.Sprintf("%s/.kube", Home()) - if _, err := os.Stat(localDir); os.IsNotExist(err) { - if err := os.Mkdir(localDir, 0777); err != nil { - glog.Fatal(err) - } - } - return fmt.Sprintf("%s/config", localDir) -} - -func NewClientSet(configPath string) (*clientset.Clientset, error) { - config, err := clientcmd.BuildConfigFromFlags("", configPath) - if err != nil { - return nil, err - } - - cs, err := clientset.NewForConfig(config) - if err != nil { - return nil, err - } - - return cs, nil -} - -func NewKubernetesClient(configPath string) (*kubernetes.Clientset, error) { - if _, err := os.Stat(configPath); os.IsNotExist(err) { - return nil, fmt.Errorf("kubectl config file %s doesn't exist. Is kubectl configured to access a cluster?", configPath) - } - - config, err := clientcmd.BuildConfigFromFlags("", configPath) - if err != nil { - return nil, err - } - - c, err := kubernetes.NewForConfig(config) - if err != nil { - return nil, err - } - return c, nil -} - -func GetMachineIfExists(machineClient client.MachineInterface, name string) (*clusterv1.Machine, error) { - if machineClient == nil { - // Being called before k8s is setup as part of master VM creation - return nil, nil - } - - // Machines are identified by name - machine, err := machineClient.Get(name, metav1.GetOptions{}) - if err != nil { - // TODO: Use formal way to check for not found - if strings.Contains(err.Error(), "not found") { - return nil, nil - } - return nil, err - } - - return machine, nil -} - -func RoleContains(a clustercommon.MachineRole, list []clustercommon.MachineRole) bool { - for _, b := range list { - if b == a { - return true - } - } - return false -} - -func IsMaster(machine *clusterv1.Machine) bool { - return RoleContains(clustercommon.MasterRole, machine.Spec.Roles) -} - -func IsNodeReady(node *v1.Node) bool { - for _, condition := range node.Status.Conditions { - if condition.Type == v1.NodeReady { - return condition.Status == v1.ConditionTrue - } - } - - return false -} - -func Copy(m *clusterv1.Machine) *clusterv1.Machine { - ret := &clusterv1.Machine{} - ret.APIVersion = m.APIVersion - ret.Kind = m.Kind - ret.ClusterName = m.ClusterName - ret.GenerateName = m.GenerateName - ret.Name = m.Name - ret.Namespace = m.Namespace - m.Spec.DeepCopyInto(&ret.Spec) - return ret -} - -func ExecCommand(name string, args ...string) string { - cmdOut, _ := exec.Command(name, args...).Output() - return string(cmdOut) -} - -func Filter(list []string, strToFilter string) (newList []string) { - for _, item := range list { - if item != strToFilter { - newList = append(newList, item) - } - } - return -} - -func Contains(list []string, strToSearch string) bool { - for _, item := range list { - if item == strToSearch { - return true - } - } - return false -} - -func GetNamespaceOrDefault(namespace string) string { - if namespace == "" { - return v1.NamespaceDefault - } - return namespace -}