From 79294266b7fe9da8059a5b40323b2eed9ff4512d Mon Sep 17 00:00:00 2001 From: Rafael Franzke Date: Mon, 16 Dec 2019 16:36:49 +0100 Subject: [PATCH] Extensions are capable of working with `core.gardener.cloud/v1beta1` API --- Makefile | 8 - .../docs/usage-as-end-user.md | 2 +- .../pkg/controller/status.go | 6 +- .../docs/usage-as-end-user.md | 2 +- .../pkg/alicloud/client/client.go | 4 +- .../apis/alicloud/validation/controlplane.go | 8 +- .../alicloud/validation/controlplane_test.go | 6 +- .../controller/controlplane/valuesprovider.go | 32 +- .../controlplane/valuesprovider_test.go | 32 +- .../infrastructure/actuator_test.go | 6 +- .../pkg/controller/worker/machines_test.go | 8 +- .../pkg/webhook/controlplane/ensurer_test.go | 24 +- .../pkg/webhook/controlplanebackup/add.go | 2 +- .../pkg/webhook/controlplanebackup/ensurer.go | 6 +- .../controlplanebackup/ensurer_test.go | 42 +- .../pkg/webhook/controlplaneexposure/add.go | 2 +- .../webhook/controlplaneexposure/ensurer.go | 6 +- .../controlplaneexposure/ensurer_test.go | 22 +- .../e2e/networkpolicies/networkpolicy_test.go | 4 +- .../app/app.go | 4 +- .../provider-aws/docs/usage-as-end-user.md | 2 +- .../pkg/apis/aws/validation/infrastructure.go | 6 +- .../aws/validation/infrastructure_test.go | 32 +- .../pkg/apis/aws/validation/shoot.go | 6 +- .../pkg/apis/aws/validation/shoot_test.go | 14 +- .../controller/controlplane/valuesprovider.go | 24 +- .../controlplane/valuesprovider_test.go | 26 +- .../infrastructure/actuator_delete.go | 4 +- .../pkg/controller/worker/machines.go | 4 +- .../pkg/controller/worker/machines_test.go | 12 +- .../pkg/validator/serialization.go | 8 +- .../pkg/validator/shoot_handler.go | 6 +- .../pkg/validator/shoot_validator.go | 8 +- .../pkg/webhook/controlplane/ensurer.go | 14 +- .../pkg/webhook/controlplane/ensurer_test.go | 24 +- .../pkg/webhook/controlplanebackup/ensurer.go | 6 +- .../controlplanebackup/ensurer_test.go | 42 +- .../webhook/controlplaneexposure/ensurer.go | 4 +- .../controlplaneexposure/ensurer_test.go | 18 +- .../e2e/networkpolicies/networkpolicy_test.go | 4 +- .../provider-azure/docs/usage-as-end-user.md | 2 +- .../controller/controlplane/valuesprovider.go | 14 +- .../controlplane/valuesprovider_test.go | 36 +- .../pkg/controller/worker/machines_test.go | 8 +- .../internal/infrastructure/terraform_test.go | 14 +- .../provider-azure/pkg/internal/scheme.go | 4 +- .../pkg/webhook/controlplane/ensurer.go | 8 +- .../pkg/webhook/controlplane/ensurer_test.go | 16 +- .../pkg/webhook/controlplanebackup/ensurer.go | 6 +- .../controlplanebackup/ensurer_test.go | 42 +- .../webhook/controlplaneexposure/ensurer.go | 6 +- .../controlplaneexposure/ensurer_test.go | 22 +- .../e2e/networkpolicies/networkpolicy_test.go | 4 +- .../provider-gcp/docs/usage-as-end-user.md | 2 +- .../pkg/apis/gcp/validation/controlplane.go | 8 +- .../apis/gcp/validation/controlplane_test.go | 6 +- .../controller/controlplane/valuesprovider.go | 14 +- .../controlplane/valuesprovider_test.go | 26 +- .../pkg/controller/worker/machines_test.go | 8 +- .../internal/infrastructure/terraform_test.go | 8 +- .../pkg/webhook/controlplane/ensurer.go | 16 +- .../pkg/webhook/controlplane/ensurer_test.go | 34 +- .../pkg/webhook/controlplanebackup/ensurer.go | 8 +- .../controlplanebackup/ensurer_test.go | 42 +- .../webhook/controlplaneexposure/ensurer.go | 6 +- .../controlplaneexposure/ensurer_test.go | 22 +- .../e2e/networkpolicies/networkpolicy_test.go | 4 +- .../docs/usage-as-end-user.md | 2 +- .../apis/openstack/validation/controlplane.go | 8 +- .../openstack/validation/controlplane_test.go | 6 +- .../controller/controlplane/valuesprovider.go | 14 +- .../controlplane/valuesprovider_test.go | 26 +- .../pkg/controller/worker/machines_test.go | 16 +- .../internal/infrastructure/terraform_test.go | 14 +- .../provider-openstack/pkg/internal/scheme.go | 4 +- .../pkg/webhook/controlplane/ensurer.go | 8 +- .../pkg/webhook/controlplane/ensurer_test.go | 16 +- .../pkg/webhook/controlplanebackup/ensurer.go | 6 +- .../controlplanebackup/ensurer_test.go | 42 +- .../webhook/controlplaneexposure/ensurer.go | 6 +- .../controlplaneexposure/ensurer_test.go | 22 +- .../e2e/networkpolicies/networkpolicy_test.go | 4 +- .../provider-packet/docs/usage-as-end-user.md | 2 +- .../controller/controlplane/valuesprovider.go | 22 +- .../controlplane/valuesprovider_test.go | 26 +- .../pkg/controller/worker/machines_test.go | 8 +- .../pkg/webhook/controlplane/ensurer.go | 6 +- .../pkg/webhook/controlplane/ensurer_test.go | 16 +- .../pkg/webhook/controlplanebackup/ensurer.go | 4 +- .../controlplanebackup/ensurer_test.go | 30 +- .../webhook/controlplaneexposure/ensurer.go | 4 +- .../controlplaneexposure/ensurer_test.go | 18 +- go.mod | 7 +- go.sum | 64 +- hack/check-generate.sh | 8 +- hack/common.sh | 2 +- hack/generate.sh | 38 +- pkg/controller/backupbucket/reconciler.go | 18 +- pkg/controller/backupentry/mapper.go | 4 +- pkg/controller/backupentry/reconciler.go | 18 +- pkg/controller/cluster.go | 59 +- .../controlplane/genericactuator/actuator.go | 12 +- .../genericactuator/actuator_test.go | 32 +- pkg/controller/controlplane/reconciler.go | 18 +- pkg/controller/controlplane/utils.go | 4 +- pkg/controller/extension/reconciler.go | 18 +- pkg/controller/infrastructure/reconciler.go | 21 +- pkg/controller/network/reconciler.go | 18 +- .../operatingsystemconfig/reconciler.go | 18 +- pkg/controller/reconciler.go | 6 +- pkg/controller/shoot_test.go | 46 +- pkg/controller/status.go | 18 +- pkg/controller/utils.go | 1 - .../worker/genericactuator/actuator.go | 4 +- .../worker/genericactuator/actuator_delete.go | 4 +- .../genericactuator/actuator_reconcile.go | 10 +- pkg/controller/worker/machines_test.go | 20 +- pkg/controller/worker/reconciler.go | 18 +- pkg/predicate/predicate.go | 18 +- pkg/terraformer/terraformer.go | 14 +- pkg/util/deployments.go | 1 - pkg/util/shoot.go | 8 +- pkg/util/shoot_clients.go | 4 +- pkg/util/shoot_test.go | 4 +- pkg/webhook/controlplane/controlplane.go | 8 +- .../controlplane/genericmutator/mutator.go | 18 +- .../genericmutator/mutator_test.go | 28 +- pkg/webhook/handler_shootclient.go | 6 +- pkg/webhook/network/network.go | 6 +- pkg/webhook/shoot/networkpolicy.go | 10 +- pkg/webhook/shoot/shoot.go | 4 +- .../generators/networkpolicies.go | 4 +- test/e2e/framework/networkpolicies/types.go | 4 +- .../framework/networkpolicies/types_test.go | 20 +- .../pkg/manager/managedresources.go | 5 +- .../pkg/manager/managedsecrets.go | 5 +- .../gardener/pkg/api/extensions/accessor.go | 24 +- .../gardener/pkg/apis/core/install/install.go | 33 + .../gardener/pkg/apis/core/register.go | 2 + .../pkg/apis/core/types_backupbucket.go | 4 +- .../pkg/apis/core/types_backupentry.go | 4 +- .../pkg/apis/core/types_shootstate.go | 69 + .../v1alpha1/constants/types_constants.go | 25 +- .../pkg/apis/core/v1alpha1/conversions.go | 1822 ++++++ .../pkg/apis/core/v1alpha1/defaults.go | 9 + .../pkg/apis/core/v1alpha1/helper/errors.go | 2 +- .../pkg/apis/core/v1alpha1/helper/helper.go | 43 +- .../pkg/apis/core/v1alpha1/register.go | 4 +- .../apis/core/v1alpha1/types_cloudprofile.go | 30 +- .../v1alpha1/types_controllerinstallation.go | 4 +- .../pkg/apis/core/v1alpha1/types_plant.go | 8 +- .../pkg/apis/core/v1alpha1/types_seed.go | 34 +- .../pkg/apis/core/v1alpha1/types_shoot.go | 30 +- .../apis/core/v1alpha1/types_shootstate.go | 77 + .../core/v1alpha1/zz_generated.conversion.go | 4459 +++++++++++++++ .../core/v1alpha1/zz_generated.deepcopy.go | 164 +- .../core/v1alpha1/zz_generated.defaults.go | 5 + .../core/v1beta1/constants/types_constants.go | 257 + .../pkg/apis/core/v1beta1/conversions.go | 1723 ++++++ .../pkg/apis/core/v1beta1/defaults.go | 188 + .../gardener/pkg/apis/core/v1beta1/doc.go | 24 + .../pkg/apis/core/v1beta1/helper/errors.go | 150 + .../pkg/apis/core/v1beta1/helper/helper.go | 708 +++ .../pkg/apis/core/v1beta1/register.go | 75 + .../apis/core/v1beta1/types_backupbucket.go | 84 + .../apis/core/v1beta1/types_backupentry.go | 75 + .../apis/core/v1beta1/types_cloudprofile.go | 174 + .../pkg/apis/core/v1beta1/types_common.go | 172 + .../v1beta1/types_controllerinstallation.go | 75 + .../v1beta1/types_controllerregistration.go | 78 + .../pkg/apis/core/v1beta1/types_plant.go | 112 + .../pkg/apis/core/v1beta1/types_project.go | 124 + .../pkg/apis/core/v1beta1/types_quota.go | 56 + .../apis/core/v1beta1/types_secretbinding.go | 47 + .../pkg/apis/core/v1beta1/types_seed.go | 191 + .../pkg/apis/core/v1beta1/types_shoot.go | 908 +++ .../pkg/apis/core/v1beta1/types_utils.go | 80 + .../core/v1beta1/zz_generated.conversion.go | 4248 ++++++++++++++ .../core/v1beta1/zz_generated.deepcopy.go | 3132 +++++++++++ .../core/v1beta1/zz_generated.defaults.go | 87 + .../pkg/apis/core/zz_generated.deepcopy.go | 143 +- .../pkg/apis/extensions/v1alpha1/types.go | 12 +- .../extensions/v1alpha1/types_defaults.go | 12 +- .../v1alpha1/types_operatingsystemconfig.go | 8 +- .../apis/extensions/v1alpha1/types_worker.go | 8 +- .../v1alpha1/zz_generated.deepcopy.go | 8 +- .../pkg/apis/garden/field_constants.go | 4 +- .../pkg/apis/garden/helper/helpers.go | 8 +- .../gardener/pkg/apis/garden/types.go | 39 +- .../pkg/apis/garden/v1beta1/conversions.go | 2612 +++++++++ .../pkg/apis/garden/v1beta1/defaults.go | 9 + .../gardener/pkg/apis/garden/v1beta1/types.go | 224 +- .../garden/v1beta1/zz_generated.conversion.go | 4959 +++++++++++++++++ .../garden/v1beta1/zz_generated.deepcopy.go | 35 +- .../garden/v1beta1/zz_generated.defaults.go | 5 + .../pkg/apis/garden/zz_generated.deepcopy.go | 43 +- .../core/clientset/versioned/clientset.go | 14 + .../clientset/versioned/scheme/register.go | 2 + .../typed/core/v1alpha1/core_client.go | 5 + .../core/v1alpha1/generated_expansion.go | 2 + .../typed/core/v1alpha1/shootstate.go | 158 + .../typed/core/v1beta1/backupbucket.go | 164 + .../typed/core/v1beta1/backupentry.go | 175 + .../typed/core/v1beta1/cloudprofile.go | 148 + .../core/v1beta1/controllerinstallation.go | 164 + .../core/v1beta1/controllerregistration.go | 148 + .../typed/core/v1beta1/core_client.go | 124 + .../versioned/typed/core/v1beta1/doc.go | 4 + .../typed/core/v1beta1/generated_expansion.go | 25 + .../versioned/typed/core/v1beta1/plant.go | 175 + .../versioned/typed/core/v1beta1/project.go | 164 + .../versioned/typed/core/v1beta1/quota.go | 158 + .../typed/core/v1beta1/secretbinding.go | 158 + .../versioned/typed/core/v1beta1/seed.go | 164 + .../versioned/typed/core/v1beta1/shoot.go | 175 + .../externalversions/core/interface.go | 8 + .../core/v1alpha1/interface.go | 7 + .../core/v1alpha1/shootstate.go | 73 + .../core/v1beta1/backupbucket.go | 72 + .../core/v1beta1/backupentry.go | 73 + .../core/v1beta1/cloudprofile.go | 72 + .../core/v1beta1/controllerinstallation.go | 72 + .../core/v1beta1/controllerregistration.go | 72 + .../core/v1beta1/interface.go | 99 + .../externalversions/core/v1beta1/plant.go | 73 + .../externalversions/core/v1beta1/project.go | 72 + .../externalversions/core/v1beta1/quota.go | 73 + .../core/v1beta1/secretbinding.go | 73 + .../externalversions/core/v1beta1/seed.go | 72 + .../externalversions/core/v1beta1/shoot.go | 73 + .../informers/externalversions/generic.go | 27 + .../core/v1alpha1/expansion_generated.go | 8 + .../core/listers/core/v1alpha1/shootstate.go | 78 + .../core/listers/core/v1beta1/backupbucket.go | 49 + .../core/listers/core/v1beta1/backupentry.go | 78 + .../core/listers/core/v1beta1/cloudprofile.go | 49 + .../core/v1beta1/controllerinstallation.go | 49 + .../core/v1beta1/controllerregistration.go | 49 + .../core/v1beta1/expansion_generated.go | 67 + .../client/core/listers/core/v1beta1/plant.go | 78 + .../core/listers/core/v1beta1/project.go | 49 + .../client/core/listers/core/v1beta1/quota.go | 78 + .../listers/core/v1beta1/secretbinding.go | 78 + .../client/core/listers/core/v1beta1/seed.go | 49 + .../client/core/listers/core/v1beta1/shoot.go | 78 + .../gardener/pkg/client/kubernetes/client.go | 101 +- .../controller/utils/associations.go | 100 - .../pkg/controllerutils/associations.go | 163 + .../utils => controllerutils}/finalizers.go | 2 +- .../metrics/controller.go} | 26 +- .../metrics/workqueue.go | 1 - .../miscelleneous.go | 2 +- .../utils => controllerutils}/operations.go | 2 +- .../utils => controllerutils}/pointers.go | 2 +- .../pkg/controllerutils/seedfilter.go | 120 + .../utils => controllerutils}/worker.go | 2 +- .../gardener/pkg/operation/common/types.go | 17 +- .../gardener/pkg/operation/common/utils.go | 12 - .../pkg/scheduler/controller/common/seed.go | 31 + .../scheduler/controller/shoot/scheduler.go | 8 +- .../controller/shoot/scheduler_control.go | 40 +- .../gardener/pkg/scheduler/metrics.go | 27 + .../gardener/pkg/utils/errors/errors.go | 2 +- .../pkg/utils/kubernetes/bootstrap_token.go | 69 + .../pkg/utils/kubernetes/client/options.go | 32 - .../pkg/utils/kubernetes/health/health.go | 12 +- .../pkg/utils/kubernetes/kubernetes.go | 8 +- .../gardener/pkg/utils/kubernetes/seed.go | 24 + .../gardener/pkg/utils/kubernetes/shoot.go | 12 - .../pkg/utils/secrets/certificates.go | 11 +- .../gardener/pkg/utils/secrets/generate.go | 2 +- .../test/integration/framework/common.go | 40 +- .../test/integration/framework/dump.go | 5 +- .../test/integration/framework/errors.go | 4 +- .../integration/framework/garden_operation.go | 26 +- .../test/integration/framework/helm_utils.go | 4 +- .../integration/framework/plant_operations.go | 30 +- .../framework/scheduler_operations.go | 39 +- .../framework/shoot_maintenance_operations.go | 120 +- .../integration/framework/shoot_operations.go | 38 +- .../test/integration/framework/types.go | 30 +- .../test/integration/framework/utils.go | 38 +- .../framework/worker_operations.go | 4 +- vendor/k8s.io/cluster-bootstrap/LICENSE | 202 + .../k8s.io/cluster-bootstrap/token/api/doc.go | 20 + .../cluster-bootstrap/token/api/types.go | 112 + .../cluster-bootstrap/token/util/helpers.go | 133 + vendor/modules.txt | 25 +- 288 files changed, 33734 insertions(+), 1547 deletions(-) create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/install/install.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/types_shootstate.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/conversions.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shootstate.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.conversion.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/constants/types_constants.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/conversions.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/defaults.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/doc.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/errors.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/helper.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/register.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_backupbucket.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_backupentry.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_cloudprofile.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_common.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_controllerinstallation.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_controllerregistration.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_plant.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_project.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_quota.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_secretbinding.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_seed.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_shoot.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_utils.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.conversion.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.deepcopy.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.defaults.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/conversions.go create mode 100644 vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.conversion.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/shootstate.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/backupbucket.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/backupentry.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/cloudprofile.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/controllerinstallation.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/controllerregistration.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/core_client.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/doc.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/generated_expansion.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/plant.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/project.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/quota.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/secretbinding.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/seed.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/shoot.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1alpha1/shootstate.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/backupbucket.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/backupentry.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/cloudprofile.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/controllerinstallation.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/controllerregistration.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/interface.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/plant.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/project.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/quota.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/secretbinding.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/seed.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/shoot.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1/shootstate.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupbucket.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupentry.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/cloudprofile.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerinstallation.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerregistration.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/expansion_generated.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/plant.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/project.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/quota.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/secretbinding.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/seed.go create mode 100644 vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/shoot.go delete mode 100644 vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/associations.go create mode 100644 vendor/github.com/gardener/gardener/pkg/controllerutils/associations.go rename vendor/github.com/gardener/gardener/pkg/{controllermanager/controller/utils => controllerutils}/finalizers.go (99%) rename vendor/github.com/gardener/gardener/pkg/{controllermanager/metrics/controller_manager.go => controllerutils/metrics/controller.go} (78%) rename vendor/github.com/gardener/gardener/pkg/{controllermanager => controllerutils}/metrics/workqueue.go (99%) rename vendor/github.com/gardener/gardener/pkg/{controllermanager/controller/utils => controllerutils}/miscelleneous.go (98%) rename vendor/github.com/gardener/gardener/pkg/{controllermanager/controller/utils => controllerutils}/operations.go (98%) rename vendor/github.com/gardener/gardener/pkg/{controllermanager/controller/utils => controllerutils}/pointers.go (97%) create mode 100644 vendor/github.com/gardener/gardener/pkg/controllerutils/seedfilter.go rename vendor/github.com/gardener/gardener/pkg/{controllermanager/controller/utils => controllerutils}/worker.go (99%) create mode 100644 vendor/github.com/gardener/gardener/pkg/scheduler/controller/common/seed.go create mode 100644 vendor/github.com/gardener/gardener/pkg/scheduler/metrics.go create mode 100644 vendor/github.com/gardener/gardener/pkg/utils/kubernetes/bootstrap_token.go create mode 100644 vendor/k8s.io/cluster-bootstrap/LICENSE create mode 100644 vendor/k8s.io/cluster-bootstrap/token/api/doc.go create mode 100644 vendor/k8s.io/cluster-bootstrap/token/api/types.go create mode 100644 vendor/k8s.io/cluster-bootstrap/token/util/helpers.go diff --git a/Makefile b/Makefile index d448dacd9..0efca2a4d 100644 --- a/Makefile +++ b/Makefile @@ -79,14 +79,6 @@ docker-images: docker-image-hyper revendor: @GO111MODULE=on go mod vendor @GO111MODULE=on go mod tidy - # Remove conversion files to prevent cyclic dependencies between Gardener and Extension APIs. - # This is needed as long as we migrate from gardener/v1beta1 to core/v1alpha1 APIs. - # This can be removed again as soon as the old gardener/v1beta1 API group is deleted. - @rm -f vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.conversion.go - @rm -f vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/conversions.go - @rm -f vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.conversion.go - @rm -f vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/conversions.go - sed -i 's/, addConversionFuncs)/\)/g' vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/register.go .PHONY: start-os-coreos start-os-coreos: diff --git a/controllers/networking-calico/docs/usage-as-end-user.md b/controllers/networking-calico/docs/usage-as-end-user.md index 637a40d0e..242b40d10 100644 --- a/controllers/networking-calico/docs/usage-as-end-user.md +++ b/controllers/networking-calico/docs/usage-as-end-user.md @@ -1,6 +1,6 @@ # Using the Networking Calico extension with Gardener as end-user -The [`core.gardener.cloud/v1alpha1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a `networking` field that is meant to contain network-specific configuration. +The [`core.gardener.cloud/v1beta1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a `networking` field that is meant to contain network-specific configuration. In this document we are describing how this configuration looks like for Calico and provide an example `Shoot` manifest with minimal configuration that you can use to create a cluster. diff --git a/controllers/networking-calico/pkg/controller/status.go b/controllers/networking-calico/pkg/controller/status.go index b9bf76b7f..7f0de96f2 100644 --- a/controllers/networking-calico/pkg/controller/status.go +++ b/controllers/networking-calico/pkg/controller/status.go @@ -17,7 +17,7 @@ package controller import ( "context" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" calicov1alpha1 "github.com/gardener/gardener-extensions/controllers/networking-calico/pkg/apis/calico/v1alpha1" extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" @@ -38,8 +38,8 @@ func (a *actuator) updateProviderStatus( return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, a.client, network, func() error { network.Status.ProviderStatus = &runtime.RawExtension{Object: status} - network.Status.LastOperation = extensionscontroller.LastOperation(gardencorev1alpha1.LastOperationTypeReconcile, - gardencorev1alpha1.LastOperationStateSucceeded, + network.Status.LastOperation = extensionscontroller.LastOperation(gardencorev1beta1.LastOperationTypeReconcile, + gardencorev1beta1.LastOperationStateSucceeded, 100, "Calico was configured successfully") return nil diff --git a/controllers/provider-alicloud/docs/usage-as-end-user.md b/controllers/provider-alicloud/docs/usage-as-end-user.md index a5c9e28eb..4903ecc0d 100644 --- a/controllers/provider-alicloud/docs/usage-as-end-user.md +++ b/controllers/provider-alicloud/docs/usage-as-end-user.md @@ -1,6 +1,6 @@ # Using the Alicloud provider extension with Gardener as end-user -The [`core.gardener.cloud/v1alpha1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. +The [`core.gardener.cloud/v1beta1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. In this document we are describing how this configuration looks like for Alicloud and provide an example `Shoot` manifest with minimal configuration that you can use to create an Alicloud cluster (modulo the landscape-specific information like cloud profile names, secret binding names, etc.). diff --git a/controllers/provider-alicloud/pkg/alicloud/client/client.go b/controllers/provider-alicloud/pkg/alicloud/client/client.go index 2ac729724..429a9e828 100644 --- a/controllers/provider-alicloud/pkg/alicloud/client/client.go +++ b/controllers/provider-alicloud/pkg/alicloud/client/client.go @@ -19,12 +19,12 @@ import ( "fmt" "net/http" + "github.com/gardener/gardener-extensions/controllers/provider-alicloud/pkg/alicloud" + "github.com/aliyun/alibaba-cloud-sdk-go/services/ecs" "github.com/aliyun/alibaba-cloud-sdk-go/services/sts" alicloudvpc "github.com/aliyun/alibaba-cloud-sdk-go/services/vpc" "github.com/aliyun/aliyun-oss-go-sdk/oss" - "github.com/gardener/gardener-extensions/controllers/provider-alicloud/pkg/alicloud" - corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/controllers/provider-alicloud/pkg/apis/alicloud/validation/controlplane.go b/controllers/provider-alicloud/pkg/apis/alicloud/validation/controlplane.go index d2b6b67d2..293bd1f5f 100644 --- a/controllers/provider-alicloud/pkg/apis/alicloud/validation/controlplane.go +++ b/controllers/provider-alicloud/pkg/apis/alicloud/validation/controlplane.go @@ -17,13 +17,13 @@ package validation import ( apisalicloud "github.com/gardener/gardener-extensions/controllers/provider-alicloud/pkg/apis/alicloud" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" apivalidation "k8s.io/apimachinery/pkg/api/validation" "k8s.io/apimachinery/pkg/util/validation/field" ) // ValidateControlPlaneConfig validates a ControlPlaneConfig object. -func ValidateControlPlaneConfig(controlPlaneConfig *apisalicloud.ControlPlaneConfig, region string, regions []gardencorev1alpha1.Region) field.ErrorList { +func ValidateControlPlaneConfig(controlPlaneConfig *apisalicloud.ControlPlaneConfig, region string, regions []gardencorev1beta1.Region) field.ErrorList { allErrs := field.ErrorList{} if len(controlPlaneConfig.Zone) == 0 { @@ -36,7 +36,7 @@ func ValidateControlPlaneConfig(controlPlaneConfig *apisalicloud.ControlPlaneCon } // ValidateControlPlaneConfigUpdate validates a ControlPlaneConfig object. -func ValidateControlPlaneConfigUpdate(oldConfig, newConfig *apisalicloud.ControlPlaneConfig, region string, regions []gardencorev1alpha1.Region) field.ErrorList { +func ValidateControlPlaneConfigUpdate(oldConfig, newConfig *apisalicloud.ControlPlaneConfig, region string, regions []gardencorev1beta1.Region) field.ErrorList { allErrs := field.ErrorList{} allErrs = append(allErrs, apivalidation.ValidateImmutableField(newConfig.Zone, oldConfig.Zone, field.NewPath("zone"))...) @@ -44,7 +44,7 @@ func ValidateControlPlaneConfigUpdate(oldConfig, newConfig *apisalicloud.Control return allErrs } -func validateZoneConstraints(regions []gardencorev1alpha1.Region, region, zone, oldZone string) (bool, []string) { +func validateZoneConstraints(regions []gardencorev1beta1.Region, region, zone, oldZone string) (bool, []string) { if zone == oldZone { return true, nil } diff --git a/controllers/provider-alicloud/pkg/apis/alicloud/validation/controlplane_test.go b/controllers/provider-alicloud/pkg/apis/alicloud/validation/controlplane_test.go index b7a89001e..d74e279fc 100644 --- a/controllers/provider-alicloud/pkg/apis/alicloud/validation/controlplane_test.go +++ b/controllers/provider-alicloud/pkg/apis/alicloud/validation/controlplane_test.go @@ -18,7 +18,7 @@ import ( apisalicloud "github.com/gardener/gardener-extensions/controllers/provider-alicloud/pkg/apis/alicloud" . "github.com/gardener/gardener-extensions/controllers/provider-alicloud/pkg/apis/alicloud/validation" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" @@ -30,10 +30,10 @@ var _ = Describe("ControlPlaneConfig validation", func() { region = "foo" zone = "some-zone" - regions = []gardencorev1alpha1.Region{ + regions = []gardencorev1beta1.Region{ { Name: region, - Zones: []gardencorev1alpha1.AvailabilityZone{ + Zones: []gardencorev1beta1.AvailabilityZone{ {Name: zone}, }, }, diff --git a/controllers/provider-alicloud/pkg/controller/controlplane/valuesprovider.go b/controllers/provider-alicloud/pkg/controller/controlplane/valuesprovider.go index 20080c592..2964588c7 100644 --- a/controllers/provider-alicloud/pkg/controller/controlplane/valuesprovider.go +++ b/controllers/provider-alicloud/pkg/controller/controlplane/valuesprovider.go @@ -27,7 +27,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller/controlplane/genericactuator" "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/gardener/gardener/pkg/utils/chart" "github.com/gardener/gardener/pkg/utils/secrets" @@ -45,8 +45,8 @@ import ( var controlPlaneSecrets = &secrets.Secrets{ CertificateSecretConfigs: map[string]*secrets.CertificateSecretConfig{ - v1alpha1constants.SecretNameCACluster: { - Name: v1alpha1constants.SecretNameCACluster, + v1beta1constants.SecretNameCACluster: { + Name: v1beta1constants.SecretNameCACluster, CommonName: "kubernetes", CertType: secrets.CACert, }, @@ -59,11 +59,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:cloud-controller-manager", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, &secrets.ControlPlaneSecretConfig{ @@ -72,11 +72,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:csi-attacher", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, &secrets.ControlPlaneSecretConfig{ @@ -85,11 +85,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:csi-provisioner", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, &secrets.ControlPlaneSecretConfig{ @@ -98,11 +98,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:csi-snapshotter", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, &secrets.ControlPlaneSecretConfig{ @@ -111,11 +111,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:csi-resizer", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, } @@ -219,7 +219,7 @@ func NewValuesProvider(logger logr.Logger) genericactuator.ValuesProvider { } } -// valuesProvider is a ValuesProvider that provides AWS-specific values for the 2 charts applied by the generic actuator. +// valuesProvider is a ValuesProvider that provides Alicloud-specific values for the 2 charts applied by the generic actuator. type valuesProvider struct { genericactuator.NoopValuesProvider decoder runtime.Decoder @@ -372,7 +372,7 @@ func getControlPlaneChartValues( "podNetwork": extensionscontroller.GetPodNetwork(cluster), "podAnnotations": map[string]interface{}{ "checksum/secret-cloud-controller-manager": checksums["cloud-controller-manager"], - "checksum/secret-cloudprovider": checksums[v1alpha1constants.SecretNameCloudProvider], + "checksum/secret-cloudprovider": checksums[v1beta1constants.SecretNameCloudProvider], "checksum/configmap-cloud-provider-config": checksums[alicloud.CloudProviderConfigName], }, }, @@ -387,7 +387,7 @@ func getControlPlaneChartValues( "checksum/secret-csi-provisioner": checksums["csi-provisioner"], "checksum/secret-csi-snapshotter": checksums["csi-snapshotter"], "checksum/secret-csi-resizer": checksums["csi-resizer"], - "checksum/secret-cloudprovider": checksums[v1alpha1constants.SecretNameCloudProvider], + "checksum/secret-cloudprovider": checksums[v1beta1constants.SecretNameCloudProvider], }, }, } diff --git a/controllers/provider-alicloud/pkg/controller/controlplane/valuesprovider_test.go b/controllers/provider-alicloud/pkg/controller/controlplane/valuesprovider_test.go index b7f69169d..a86482312 100644 --- a/controllers/provider-alicloud/pkg/controller/controlplane/valuesprovider_test.go +++ b/controllers/provider-alicloud/pkg/controller/controlplane/valuesprovider_test.go @@ -23,8 +23,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -57,7 +57,7 @@ var _ = Describe("ValuesProvider", func() { Spec: extensionsv1alpha1.ControlPlaneSpec{ Region: "eu-central-1", SecretRef: corev1.SecretReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, ProviderConfig: &runtime.RawExtension{ @@ -89,25 +89,25 @@ var _ = Describe("ValuesProvider", func() { cidr = "10.250.0.0/19" cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ + Shoot: &gardencorev1beta1.Shoot{ ObjectMeta: metav1.ObjectMeta{ Name: "myshoot", }, - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &cidr, }, - Kubernetes: gardencorev1alpha1.Kubernetes{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.14.0", }, }, }, } - cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider} + cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider} cpSecret = &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, Type: corev1.SecretTypeOpaque, @@ -118,13 +118,13 @@ var _ = Describe("ValuesProvider", func() { } checksums = map[string]string{ - v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", - alicloud.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", - "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", - "csi-attacher": "2da58ad61c401a2af779a909d22fb42eed93a1524cbfdab974ceedb413fcb914", - "csi-provisioner": "f75b42d40ab501428c383dfb2336cb1fc892bbee1fc1d739675171e4acc4d911", - "csi-snapshotter": "bf417dd97dc3e8c2092bb5b2ba7b0f1093ebc4bb5952091ee554cf5b7ea74508", - "csi-resizer": "5df115bd53f09da2d6d27bfb048c14dabd14a66608cfdba5ecd2d0687889cc6a", + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + alicloud.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", + "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", + "csi-attacher": "2da58ad61c401a2af779a909d22fb42eed93a1524cbfdab974ceedb413fcb914", + "csi-provisioner": "f75b42d40ab501428c383dfb2336cb1fc892bbee1fc1d739675171e4acc4d911", + "csi-snapshotter": "bf417dd97dc3e8c2092bb5b2ba7b0f1093ebc4bb5952091ee554cf5b7ea74508", + "csi-resizer": "5df115bd53f09da2d6d27bfb048c14dabd14a66608cfdba5ecd2d0687889cc6a", } configChartValues = map[string]interface{}{ diff --git a/controllers/provider-alicloud/pkg/controller/infrastructure/actuator_test.go b/controllers/provider-alicloud/pkg/controller/infrastructure/actuator_test.go index e8a30a0b7..c3bd03ddc 100644 --- a/controllers/provider-alicloud/pkg/controller/infrastructure/actuator_test.go +++ b/controllers/provider-alicloud/pkg/controller/infrastructure/actuator_test.go @@ -37,7 +37,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/mock/go-logr/logr" realterraformer "github.com/gardener/gardener-extensions/pkg/terraformer" "github.com/gardener/gardener-extensions/pkg/util/chart" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/aliyun/alibaba-cloud-sdk-go/services/vpc" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" @@ -150,8 +150,8 @@ var _ = Describe("Actuator", func() { accessKeyID = "accessKeyID" accessKeySecret = "accessKeySecret" cluster = controller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ Region: region, }, }, diff --git a/controllers/provider-alicloud/pkg/controller/worker/machines_test.go b/controllers/provider-alicloud/pkg/controller/worker/machines_test.go index d416ac9db..39f1b1a91 100644 --- a/controllers/provider-alicloud/pkg/controller/worker/machines_test.go +++ b/controllers/provider-alicloud/pkg/controller/worker/machines_test.go @@ -30,7 +30,7 @@ import ( mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" mockkubernetes "github.com/gardener/gardener-extensions/pkg/mock/gardener/client/kubernetes" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" "github.com/golang/mock/gomock" @@ -191,9 +191,9 @@ var _ = Describe("Machines", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: shootVersion, }, }, diff --git a/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer_test.go b/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer_test.go index cb4ec754d..0b06857bc 100644 --- a/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer_test.go +++ b/controllers/provider-alicloud/pkg/webhook/controlplane/ensurer_test.go @@ -22,10 +22,10 @@ import ( extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/test" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/coreos/go-systemd/unit" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -45,9 +45,9 @@ var _ = Describe("Ensurer", func() { ctrl *gomock.Controller eContext13 = genericmutator.NewInternalEnsurerContext( &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.0", }, }, @@ -56,9 +56,9 @@ var _ = Describe("Ensurer", func() { ) eContext14 = genericmutator.NewInternalEnsurerContext( &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.14.0", }, }, @@ -80,7 +80,7 @@ var _ = Describe("Ensurer", func() { var ( apidep = func() *appsv1.Deployment { return &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -117,7 +117,7 @@ var _ = Describe("Ensurer", func() { var ( apidep = func() *appsv1.Deployment { return &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -159,7 +159,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -186,7 +186,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ diff --git a/controllers/provider-alicloud/pkg/webhook/controlplanebackup/add.go b/controllers/provider-alicloud/pkg/webhook/controlplanebackup/add.go index 291d0d8a9..1a04e7edc 100644 --- a/controllers/provider-alicloud/pkg/webhook/controlplanebackup/add.go +++ b/controllers/provider-alicloud/pkg/webhook/controlplanebackup/add.go @@ -33,7 +33,7 @@ var ( DefaultAddOptions = AddOptions{} ) -// AddOptions are options to apply when adding the AWS backup webhook to the manager. +// AddOptions are options to apply when adding the Alicloud backup webhook to the manager. type AddOptions struct { // ETCDBackup is the etcd backup configuration. ETCDBackup config.ETCDBackup diff --git a/controllers/provider-alicloud/pkg/webhook/controlplanebackup/ensurer.go b/controllers/provider-alicloud/pkg/webhook/controlplanebackup/ensurer.go index 097227402..d856f675a 100644 --- a/controllers/provider-alicloud/pkg/webhook/controlplanebackup/ensurer.go +++ b/controllers/provider-alicloud/pkg/webhook/controlplanebackup/ensurer.go @@ -23,7 +23,7 @@ import ( extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/operation/common" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/go-logr/logr" @@ -80,7 +80,7 @@ func (e *ensurer) ensureContainers(ps *corev1.PodSpec, name string, cluster *ext } func (e *ensurer) ensureChecksumAnnotations(ctx context.Context, template *corev1.PodTemplateSpec, namespace, name string, backupConfigured bool) error { - if name == v1alpha1constants.StatefulSetNameETCDMain && backupConfigured { + if name == v1beta1constants.StatefulSetNameETCDMain && backupConfigured { return controlplane.EnsureSecretChecksumAnnotation(ctx, template, e.client, namespace, alicloud.BackupSecretName) } return nil @@ -102,7 +102,7 @@ func (e *ensurer) ensureBackupRestoreContainer(existingContainer *corev1.Contain env []corev1.EnvVar volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { if cluster.Seed.Spec.Backup == nil { e.logger.Info("Backup profile is not configured; backup will not be taken for etcd-main") } else { diff --git a/controllers/provider-alicloud/pkg/webhook/controlplanebackup/ensurer_test.go b/controllers/provider-alicloud/pkg/webhook/controlplanebackup/ensurer_test.go index 1680e4931..d3159cad9 100644 --- a/controllers/provider-alicloud/pkg/webhook/controlplanebackup/ensurer_test.go +++ b/controllers/provider-alicloud/pkg/webhook/controlplanebackup/ensurer_test.go @@ -27,8 +27,8 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -69,20 +69,20 @@ var _ = Describe("Ensurer", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, - Status: gardencorev1alpha1.ShootStatus{ + Status: gardencorev1beta1.ShootStatus{ TechnicalID: "shoot--test--sample", UID: types.UID("test-uid"), }, }, - Seed: &gardencorev1alpha1.Seed{ - Spec: gardencorev1alpha1.SeedSpec{ - Backup: &gardencorev1alpha1.SeedBackup{}, + Seed: &gardencorev1beta1.Seed{ + Spec: gardencorev1beta1.SeedSpec{ + Backup: &gardencorev1beta1.SeedBackup{}, }, }, } @@ -111,7 +111,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -133,7 +133,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -165,7 +165,7 @@ var _ = Describe("Ensurer", func() { It("should not configure backup to etcd-main statefulset if backup profile is missing", func() { ss := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } cluster.Seed.Spec.Backup = nil @@ -186,7 +186,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -211,7 +211,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -222,7 +222,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -238,7 +238,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -265,7 +265,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -290,7 +290,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -343,21 +343,21 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet, annotations map[string]str ) c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", alicloud.StorageProviderName, "shoot--test--sample--test-uid", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", alicloud.StorageProviderName, "shoot--test--sample--test-uid", "test-repository:test-tag", nil, env, nil))) Expect(ss.Spec.Template.Annotations).To(Equal(annotations)) } func checkETCDMainStatefulSetWithoutBackup(ss *appsv1.StatefulSet, annotations map[string]string) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", "", "", "test-repository:test-tag", nil, nil, nil))) Expect(ss.Spec.Template.Annotations).To(BeNil()) } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDEvents, v1alpha1constants.StatefulSetNameETCDEvents, "0 */24 * * *", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDEvents, v1beta1constants.StatefulSetNameETCDEvents, "0 */24 * * *", "", "", "test-repository:test-tag", nil, nil, nil))) } diff --git a/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/add.go b/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/add.go index 6e65875ff..b18594884 100644 --- a/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/add.go +++ b/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/add.go @@ -32,7 +32,7 @@ var ( DefaultAddOptions = AddOptions{} ) -// AddOptions are options to apply when adding the AWS exposure webhook to the manager. +// AddOptions are options to apply when adding the Alicloud exposure webhook to the manager. type AddOptions struct { // ETCDStorage is the etcd storage configuration. ETCDStorage config.ETCDStorage diff --git a/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/ensurer.go b/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/ensurer.go index 0ad4a3827..45757d87e 100644 --- a/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/ensurer.go +++ b/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/ensurer.go @@ -22,7 +22,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "github.com/go-logr/logr" "github.com/pkg/errors" @@ -56,7 +56,7 @@ func (e *ensurer) InjectClient(client client.Client) error { // EnsureKubeAPIServerDeployment ensures that the kube-apiserver deployment conforms to the provider requirements. func (e *ensurer) EnsureKubeAPIServerDeployment(ctx context.Context, ectx genericmutator.EnsurerContext, dep *appsv1.Deployment) error { // Get load balancer address of the kube-apiserver service - address, err := kutil.GetLoadBalancerIngress(ctx, e.client, dep.Namespace, v1alpha1constants.DeploymentNameKubeAPIServer) + address, err := kutil.GetLoadBalancerIngress(ctx, e.client, dep.Namespace, v1beta1constants.DeploymentNameKubeAPIServer) if err != nil { return errors.Wrap(err, "could not get kube-apiserver service load balancer address") } @@ -80,7 +80,7 @@ func (e *ensurer) ensureVolumeClaimTemplates(spec *appsv1.StatefulSetSpec, name } func (e *ensurer) getVolumeClaimTemplate(name string) *corev1.PersistentVolumeClaim { - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { return controlplane.GetETCDVolumeClaimTemplate(controlplane.EtcdMainVolumeClaimTemplateName, e.etcdStorage.ClassName, e.etcdStorage.Capacity) } else { return controlplane.GetETCDVolumeClaimTemplate(name, nil, util.QuantityPtr(resource.MustParse("20Gi"))) diff --git a/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/ensurer_test.go b/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/ensurer_test.go index c02d62e53..2c2b2ac35 100644 --- a/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/ensurer_test.go +++ b/controllers/provider-alicloud/pkg/webhook/controlplaneexposure/ensurer_test.go @@ -25,7 +25,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -58,9 +58,9 @@ var _ = Describe("Ensurer", func() { dummyContext = genericmutator.NewEnsurerContext(nil, nil) - svcKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer} + svcKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer} svc = &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Status: corev1.ServiceStatus{ LoadBalancer: corev1.LoadBalancerStatus{ Ingress: []corev1.LoadBalancerIngress{ @@ -83,7 +83,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -116,7 +116,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -152,7 +152,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -168,7 +168,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -199,7 +199,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -215,7 +215,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -260,8 +260,8 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet) { } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { - pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1alpha1constants.StatefulSetNameETCDEvents) - Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1alpha1constants.StatefulSetNameETCDEvents, nil, util.QuantityPtr(resource.MustParse("20Gi"))))) + pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1beta1constants.StatefulSetNameETCDEvents) + Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1beta1constants.StatefulSetNameETCDEvents, nil, util.QuantityPtr(resource.MustParse("20Gi"))))) } func clientGet(result runtime.Object) interface{} { diff --git a/controllers/provider-alicloud/test/e2e/networkpolicies/networkpolicy_test.go b/controllers/provider-alicloud/test/e2e/networkpolicies/networkpolicy_test.go index 3acfb864d..cec842385 100644 --- a/controllers/provider-alicloud/test/e2e/networkpolicies/networkpolicy_test.go +++ b/controllers/provider-alicloud/test/e2e/networkpolicies/networkpolicy_test.go @@ -29,7 +29,7 @@ import ( "github.com/gardener/gardener-extensions/test/e2e/framework/executor" networkpolicies "github.com/gardener/gardener-extensions/test/e2e/framework/networkpolicies" - "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/logger" utilclient "github.com/gardener/gardener/pkg/utils/kubernetes/client" @@ -95,7 +95,7 @@ var _ = Describe("Network Policy Testing", func() { shootGardenerTest, err = gardenerframework.NewShootGardenerTest(*kubeconfig, nil, shootAppTestLogger) Expect(err).NotTo(HaveOccurred()) - shoot := &v1alpha1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} + shoot := &v1beta1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} shootTestOperations, err = gardenerframework.NewGardenTestOperationWithShoot(ctx, shootGardenerTest.GardenClient, shootAppTestLogger, shoot) Expect(err).NotTo(HaveOccurred()) } diff --git a/controllers/provider-aws/cmd/gardener-extension-validator-aws/app/app.go b/controllers/provider-aws/cmd/gardener-extension-validator-aws/app/app.go index 976026430..c51c67534 100644 --- a/controllers/provider-aws/cmd/gardener-extension-validator-aws/app/app.go +++ b/controllers/provider-aws/cmd/gardener-extension-validator-aws/app/app.go @@ -23,7 +23,7 @@ import ( "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/validator" controllercmd "github.com/gardener/gardener-extensions/pkg/controller/cmd" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" componentbaseconfig "k8s.io/component-base/config" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" @@ -66,7 +66,7 @@ func NewValidatorCommand(ctx context.Context) *cobra.Command { controllercmd.LogErrAndExit(err, "Could not instantiate manager") } - if err := gardencorev1alpha1.AddToScheme(mgr.GetScheme()); err != nil { + if err := gardencorev1beta1.AddToScheme(mgr.GetScheme()); err != nil { controllercmd.LogErrAndExit(err, "Could not update manager scheme") } diff --git a/controllers/provider-aws/docs/usage-as-end-user.md b/controllers/provider-aws/docs/usage-as-end-user.md index 0bd2b499c..72e7773f0 100644 --- a/controllers/provider-aws/docs/usage-as-end-user.md +++ b/controllers/provider-aws/docs/usage-as-end-user.md @@ -1,6 +1,6 @@ # Using the AWS provider extension with Gardener as end-user -The [`core.gardener.cloud/v1alpha1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. +The [`core.gardener.cloud/v1beta1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. In this document we are describing how this configuration looks like for AWS and provide an example `Shoot` manifest with minimal configuration that you can use to create an AWS cluster (modulo the landscape-specific information like cloud profile names, secret binding names, etc.). diff --git a/controllers/provider-aws/pkg/apis/aws/validation/infrastructure.go b/controllers/provider-aws/pkg/apis/aws/validation/infrastructure.go index d61f22262..51b8e4fe4 100644 --- a/controllers/provider-aws/pkg/apis/aws/validation/infrastructure.go +++ b/controllers/provider-aws/pkg/apis/aws/validation/infrastructure.go @@ -18,7 +18,7 @@ import ( "fmt" apisaws "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" cidrvalidation "github.com/gardener/gardener/pkg/utils/validation/cidr" apivalidation "k8s.io/apimachinery/pkg/api/validation" @@ -27,7 +27,7 @@ import ( ) // ValidateInfrastructureConfigAgainstCloudProfile validates the given `InfrastructureConfig` against the given `CloudProfile`. -func ValidateInfrastructureConfigAgainstCloudProfile(infra *apisaws.InfrastructureConfig, shoot *gardencorev1alpha1.Shoot, cloudProfile *gardencorev1alpha1.CloudProfile, fldPath *field.Path) field.ErrorList { +func ValidateInfrastructureConfigAgainstCloudProfile(infra *apisaws.InfrastructureConfig, shoot *gardencorev1beta1.Shoot, cloudProfile *gardencorev1beta1.CloudProfile, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} shootRegion := shoot.Spec.Region @@ -42,7 +42,7 @@ func ValidateInfrastructureConfigAgainstCloudProfile(infra *apisaws.Infrastructu } // validateInfrastructureConfigZones validates the given `InfrastructureConfig` against the given `Zones`. -func validateInfrastructureConfigZones(infra *apisaws.InfrastructureConfig, zones []gardencorev1alpha1.AvailabilityZone, fldPath *field.Path) field.ErrorList { +func validateInfrastructureConfigZones(infra *apisaws.InfrastructureConfig, zones []gardencorev1beta1.AvailabilityZone, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} awsZones := sets.NewString() diff --git a/controllers/provider-aws/pkg/apis/aws/validation/infrastructure_test.go b/controllers/provider-aws/pkg/apis/aws/validation/infrastructure_test.go index 14f3acfe9..4019236a3 100644 --- a/controllers/provider-aws/pkg/apis/aws/validation/infrastructure_test.go +++ b/controllers/provider-aws/pkg/apis/aws/validation/infrastructure_test.go @@ -17,7 +17,7 @@ package validation_test import ( apisaws "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws" . "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws/validation" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "k8s.io/apimachinery/pkg/util/validation/field" . "github.com/gardener/gardener/pkg/utils/validation/gomega" @@ -66,34 +66,34 @@ var _ = Describe("InfrastructureConfig validation", func() { Describe("#ValidateInfrastructureConfigAgainstCloudProfile", func() { var ( - cloudProfile *gardencorev1alpha1.CloudProfile - shoot *gardencorev1alpha1.Shoot + cloudProfile *gardencorev1beta1.CloudProfile + shoot *gardencorev1beta1.Shoot region = "eu-west" region2 = "us-west" ) Context("zones validation", func() { BeforeEach(func() { - cloudProfile = &gardencorev1alpha1.CloudProfile{ - Spec: gardencorev1alpha1.CloudProfileSpec{ - Regions: []gardencorev1alpha1.Region{ - gardencorev1alpha1.Region{ + cloudProfile = &gardencorev1beta1.CloudProfile{ + Spec: gardencorev1beta1.CloudProfileSpec{ + Regions: []gardencorev1beta1.Region{ + gardencorev1beta1.Region{ Name: region2, - Zones: []gardencorev1alpha1.AvailabilityZone{ - gardencorev1alpha1.AvailabilityZone{ + Zones: []gardencorev1beta1.AvailabilityZone{ + gardencorev1beta1.AvailabilityZone{ Name: zone2, }, - gardencorev1alpha1.AvailabilityZone{ + gardencorev1beta1.AvailabilityZone{ Name: zone, }, }, }, - gardencorev1alpha1.Region{ + gardencorev1beta1.Region{ Name: region, - Zones: []gardencorev1alpha1.AvailabilityZone{ - gardencorev1alpha1.AvailabilityZone{ + Zones: []gardencorev1beta1.AvailabilityZone{ + gardencorev1beta1.AvailabilityZone{ Name: zone2, }, - gardencorev1alpha1.AvailabilityZone{ + gardencorev1beta1.AvailabilityZone{ Name: zone, }, }, @@ -101,8 +101,8 @@ var _ = Describe("InfrastructureConfig validation", func() { }, }, } - shoot = &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ + shoot = &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ Region: region, }, } diff --git a/controllers/provider-aws/pkg/apis/aws/validation/shoot.go b/controllers/provider-aws/pkg/apis/aws/validation/shoot.go index af3dd84a3..28eb29992 100644 --- a/controllers/provider-aws/pkg/apis/aws/validation/shoot.go +++ b/controllers/provider-aws/pkg/apis/aws/validation/shoot.go @@ -18,14 +18,14 @@ import ( "fmt" apisaws "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/util/sets" ) // ValidateWorkers validates the workers of a Shoot. -func ValidateWorkers(workers []gardencorev1alpha1.Worker, zones []apisaws.Zone, fldPath *field.Path) field.ErrorList { +func ValidateWorkers(workers []gardencorev1beta1.Worker, zones []apisaws.Zone, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} awsZones := sets.NewString() @@ -61,7 +61,7 @@ func validateZones(zones []string, allowedZones sets.String, fldPath *field.Path return allErrs } -func validateVolume(vol *gardencorev1alpha1.Volume, fldPath *field.Path) field.ErrorList { +func validateVolume(vol *gardencorev1beta1.Volume, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if vol.Type == nil { allErrs = append(allErrs, field.Required(fldPath.Child("type"), "must not be empty")) diff --git a/controllers/provider-aws/pkg/apis/aws/validation/shoot_test.go b/controllers/provider-aws/pkg/apis/aws/validation/shoot_test.go index 5d8797172..afee9b6b9 100644 --- a/controllers/provider-aws/pkg/apis/aws/validation/shoot_test.go +++ b/controllers/provider-aws/pkg/apis/aws/validation/shoot_test.go @@ -17,7 +17,7 @@ package validation_test import ( apisaws "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws" . "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws/validation" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -27,14 +27,14 @@ import ( var _ = Describe("ValidateWorkerConfig", func() { var ( - workers []gardencorev1alpha1.Worker + workers []gardencorev1beta1.Worker awsZones []apisaws.Zone ) BeforeEach(func() { - workers = []gardencorev1alpha1.Worker{ - gardencorev1alpha1.Worker{ - Volume: &gardencorev1alpha1.Volume{ + workers = []gardencorev1beta1.Worker{ + gardencorev1beta1.Worker{ + Volume: &gardencorev1beta1.Volume{ Type: makeStringPointer("Volume"), Size: "30G", }, @@ -43,8 +43,8 @@ var _ = Describe("ValidateWorkerConfig", func() { "zone2", }, }, - gardencorev1alpha1.Worker{ - Volume: &gardencorev1alpha1.Volume{ + gardencorev1beta1.Worker{ + Volume: &gardencorev1beta1.Volume{ Type: makeStringPointer("Volume"), Size: "20G", }, diff --git a/controllers/provider-aws/pkg/controller/controlplane/valuesprovider.go b/controllers/provider-aws/pkg/controller/controlplane/valuesprovider.go index 74ebeb3a5..4b1aba0e8 100644 --- a/controllers/provider-aws/pkg/controller/controlplane/valuesprovider.go +++ b/controllers/provider-aws/pkg/controller/controlplane/valuesprovider.go @@ -26,7 +26,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller/controlplane/genericactuator" "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/gardener/gardener/pkg/utils/chart" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" @@ -51,8 +51,8 @@ const ( var controlPlaneSecrets = &secrets.Secrets{ CertificateSecretConfigs: map[string]*secrets.CertificateSecretConfig{ - v1alpha1constants.SecretNameCACluster: { - Name: v1alpha1constants.SecretNameCACluster, + v1beta1constants.SecretNameCACluster: { + Name: v1beta1constants.SecretNameCACluster, CommonName: "kubernetes", CertType: secrets.CACert, }, @@ -65,11 +65,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:cloud-controller-manager", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, &secrets.ControlPlaneSecretConfig{ @@ -78,7 +78,7 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: cloudControllerManagerDeploymentName, DNSNames: controlplane.DNSNamesForService(cloudControllerManagerDeploymentName, clusterName), CertType: secrets.ServerCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, }, } @@ -87,8 +87,8 @@ var controlPlaneSecrets = &secrets.Secrets{ var controlPlaneExposureSecrets = &secrets.Secrets{ CertificateSecretConfigs: map[string]*secrets.CertificateSecretConfig{ - v1alpha1constants.SecretNameCACluster: { - Name: v1alpha1constants.SecretNameCACluster, + v1beta1constants.SecretNameCACluster: { + Name: v1beta1constants.SecretNameCACluster, CommonName: "kubernetes", CertType: secrets.CACert, }, @@ -103,12 +103,12 @@ var controlPlaneExposureSecrets = &secrets.Secrets{ DNSNames: nil, IPAddresses: nil, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, } @@ -235,7 +235,7 @@ func (vp *valuesProvider) GetControlPlaneExposureChartValues( ) (map[string]interface{}, error) { // Get load balancer address of the kube-apiserver service - address, err := kutil.GetLoadBalancerIngress(ctx, vp.client, cp.Namespace, v1alpha1constants.DeploymentNameKubeAPIServer) + address, err := kutil.GetLoadBalancerIngress(ctx, vp.client, cp.Namespace, v1beta1constants.DeploymentNameKubeAPIServer) if err != nil { return nil, errors.Wrap(err, "could not get kube-apiserver service load balancer address") } @@ -285,7 +285,7 @@ func getCCMChartValues( "podAnnotations": map[string]interface{}{ "checksum/secret-cloud-controller-manager": checksums[cloudControllerManagerDeploymentName], "checksum/secret-cloud-controller-manager-server": checksums[cloudControllerManagerServerName], - "checksum/secret-cloudprovider": checksums[v1alpha1constants.SecretNameCloudProvider], + "checksum/secret-cloudprovider": checksums[v1beta1constants.SecretNameCloudProvider], "checksum/configmap-cloud-provider-config": checksums[aws.CloudProviderConfigName], }, } diff --git a/controllers/provider-aws/pkg/controller/controlplane/valuesprovider_test.go b/controllers/provider-aws/pkg/controller/controlplane/valuesprovider_test.go index 21d127920..74959a6ba 100644 --- a/controllers/provider-aws/pkg/controller/controlplane/valuesprovider_test.go +++ b/controllers/provider-aws/pkg/controller/controlplane/valuesprovider_test.go @@ -23,8 +23,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -83,12 +83,12 @@ var _ = Describe("ValuesProvider", func() { cidr = "10.250.0.0/19" cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &cidr, }, - Kubernetes: gardencorev1alpha1.Kubernetes{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, @@ -96,7 +96,7 @@ var _ = Describe("ValuesProvider", func() { } cpService = &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - Name: v1alpha1constants.DeploymentNameKubeAPIServer, + Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace, }, Status: corev1.ServiceStatus{ @@ -109,11 +109,11 @@ var _ = Describe("ValuesProvider", func() { } checksums = map[string]string{ - v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", - aws.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", - "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", - "cloud-controller-manager-server": "6dff2a2e6f14444b66d8e4a351c049f7e89ee24ba3eaab95dbec40ba6bdebb52", - awsLBReadvertiserDeploymentName: "599aeee0cbbfdab4ea29c642cb04a6c9a3eb90ec21b41570efb987958f99d4b1", + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + aws.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", + "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", + "cloud-controller-manager-server": "6dff2a2e6f14444b66d8e4a351c049f7e89ee24ba3eaab95dbec40ba6bdebb52", + awsLBReadvertiserDeploymentName: "599aeee0cbbfdab4ea29c642cb04a6c9a3eb90ec21b41570efb987958f99d4b1", } configChartValues = map[string]interface{}{ @@ -188,7 +188,7 @@ var _ = Describe("ValuesProvider", func() { Describe("#GetControlPlaneExposureChartValues", func() { It("should return correct control plane exposure chart values", func() { - serviceKey := client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer} + serviceKey := client.ObjectKey{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer} // Create mock client client := mockclient.NewMockClient(ctrl) client.EXPECT().Get(context.TODO(), serviceKey, &corev1.Service{}).DoAndReturn(clientGet(cpService)) diff --git a/controllers/provider-aws/pkg/controller/infrastructure/actuator_delete.go b/controllers/provider-aws/pkg/controller/infrastructure/actuator_delete.go index c50c3574e..52b26e165 100644 --- a/controllers/provider-aws/pkg/controller/infrastructure/actuator_delete.go +++ b/controllers/provider-aws/pkg/controller/infrastructure/actuator_delete.go @@ -25,7 +25,7 @@ import ( controllererrors "github.com/gardener/gardener-extensions/pkg/controller/error" "github.com/gardener/gardener-extensions/pkg/terraformer" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" glogger "github.com/gardener/gardener/pkg/logger" "github.com/gardener/gardener/pkg/utils/flow" @@ -73,7 +73,7 @@ func (a *actuator) delete(ctx context.Context, infrastructure *extensionsv1alpha Name: "Destroying Kubernetes load balancers and security groups", Fn: flow.TaskFn(func(ctx context.Context) error { if err := a.destroyKubernetesLoadBalancersAndSecurityGroups(ctx, awsClient, vpcID, infrastructure.Namespace); err != nil { - return gardencorev1alpha1helper.DetermineError(fmt.Sprintf("Failed to destroy load balancers and security groups: %+v", err.Error())) + return gardencorev1beta1helper.DetermineError(fmt.Sprintf("Failed to destroy load balancers and security groups: %+v", err.Error())) } return nil }).RetryUntilTimeout(10*time.Second, 5*time.Minute).DoIf(configExists), diff --git a/controllers/provider-aws/pkg/controller/worker/machines.go b/controllers/provider-aws/pkg/controller/worker/machines.go index 82510f5c9..29d89b5c6 100644 --- a/controllers/provider-aws/pkg/controller/worker/machines.go +++ b/controllers/provider-aws/pkg/controller/worker/machines.go @@ -25,7 +25,7 @@ import ( "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/aws" extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" "github.com/gardener/gardener-extensions/pkg/controller/worker" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" "k8s.io/apimachinery/pkg/runtime" @@ -195,7 +195,7 @@ func (w *workerDelegate) generateMachineConfig(ctx context.Context) error { machineClassSpec["name"] = className machineClassSpec["labels"] = map[string]string{ - v1alpha1constants.GardenPurpose: v1alpha1constants.GardenPurposeMachineClass, + v1beta1constants.GardenPurpose: v1beta1constants.GardenPurposeMachineClass, } machineClassSpec["secret"].(map[string]interface{})[aws.AccessKeyID] = string(machineClassSecretData[machinev1alpha1.AWSAccessKeyID]) machineClassSpec["secret"].(map[string]interface{})[aws.SecretAccessKey] = string(machineClassSecretData[machinev1alpha1.AWSSecretAccessKey]) diff --git a/controllers/provider-aws/pkg/controller/worker/machines_test.go b/controllers/provider-aws/pkg/controller/worker/machines_test.go index 10de6c399..917713278 100644 --- a/controllers/provider-aws/pkg/controller/worker/machines_test.go +++ b/controllers/provider-aws/pkg/controller/worker/machines_test.go @@ -29,9 +29,9 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller/worker" mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" mockkubernetes "github.com/gardener/gardener-extensions/pkg/mock/gardener/client/kubernetes" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" "github.com/golang/mock/gomock" @@ -186,9 +186,9 @@ var _ = Describe("Machines", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: shootVersion, }, }, @@ -632,7 +632,7 @@ func useDefaultMachineClass(def map[string]interface{}, key string, value interf func addNameAndSecretToMachineClass(class map[string]interface{}, awsAccessKeyID, awsSecretAccessKey, name string) { class["name"] = name class["labels"] = map[string]string{ - v1alpha1constants.GardenPurpose: v1alpha1constants.GardenPurposeMachineClass, + v1beta1constants.GardenPurpose: v1beta1constants.GardenPurposeMachineClass, } class["secret"].(map[string]interface{})[aws.AccessKeyID] = awsAccessKeyID class["secret"].(map[string]interface{})[aws.SecretAccessKey] = awsSecretAccessKey diff --git a/controllers/provider-aws/pkg/validator/serialization.go b/controllers/provider-aws/pkg/validator/serialization.go index f586f5ec4..5b845d7e9 100644 --- a/controllers/provider-aws/pkg/validator/serialization.go +++ b/controllers/provider-aws/pkg/validator/serialization.go @@ -17,12 +17,12 @@ package validator import ( "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" ) -func decodeWorkerConfig(decoder runtime.Decoder, worker *gardencorev1alpha1.ProviderConfig, fldPath *field.Path) (*aws.WorkerConfig, error) { +func decodeWorkerConfig(decoder runtime.Decoder, worker *gardencorev1beta1.ProviderConfig, fldPath *field.Path) (*aws.WorkerConfig, error) { workerConfig := &aws.WorkerConfig{} if err := util.Decode(decoder, worker.Raw, workerConfig); err != nil { return nil, field.Invalid(fldPath, string(worker.Raw), "isn't a supported version") @@ -31,7 +31,7 @@ func decodeWorkerConfig(decoder runtime.Decoder, worker *gardencorev1alpha1.Prov return workerConfig, nil } -func decodeControlPlaneConfig(decoder runtime.Decoder, cp *gardencorev1alpha1.ProviderConfig, fldPath *field.Path) (*aws.ControlPlaneConfig, error) { +func decodeControlPlaneConfig(decoder runtime.Decoder, cp *gardencorev1beta1.ProviderConfig, fldPath *field.Path) (*aws.ControlPlaneConfig, error) { controlPlaneConfig := &aws.ControlPlaneConfig{} if err := util.Decode(decoder, cp.Raw, controlPlaneConfig); err != nil { return nil, field.Invalid(fldPath, string(cp.Raw), "isn't a supported version") @@ -40,7 +40,7 @@ func decodeControlPlaneConfig(decoder runtime.Decoder, cp *gardencorev1alpha1.Pr return controlPlaneConfig, nil } -func decodeInfrastructureConfig(decoder runtime.Decoder, infra *gardencorev1alpha1.ProviderConfig, fldPath *field.Path) (*aws.InfrastructureConfig, error) { +func decodeInfrastructureConfig(decoder runtime.Decoder, infra *gardencorev1beta1.ProviderConfig, fldPath *field.Path) (*aws.InfrastructureConfig, error) { infraConfig := &aws.InfrastructureConfig{} if err := util.Decode(decoder, infra.Raw, infraConfig); err != nil { return nil, field.Invalid(fldPath, string(infra.Raw), "isn't a supported version") diff --git a/controllers/provider-aws/pkg/validator/shoot_handler.go b/controllers/provider-aws/pkg/validator/shoot_handler.go index 68478cdfa..82ac3f982 100644 --- a/controllers/provider-aws/pkg/validator/shoot_handler.go +++ b/controllers/provider-aws/pkg/validator/shoot_handler.go @@ -19,7 +19,7 @@ import ( "net/http" provideraws "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/aws" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/go-logr/logr" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" @@ -38,7 +38,7 @@ type Shoot struct { // Handle implements Handler.Handle func (v *Shoot) Handle(ctx context.Context, req admission.Request) admission.Response { - shoot := &gardencorev1alpha1.Shoot{} + shoot := &gardencorev1beta1.Shoot{} _, _, err := v.decoder.Decode(req.Object.Raw, nil, shoot) if err != nil { @@ -57,7 +57,7 @@ func (v *Shoot) Handle(ctx context.Context, req admission.Request) admission.Res return admission.Errored(http.StatusBadRequest, err) } case admissionv1beta1.Update: - oldShoot := &gardencorev1alpha1.Shoot{} + oldShoot := &gardencorev1beta1.Shoot{} _, _, err := v.decoder.Decode(req.OldObject.Raw, nil, oldShoot) if err != nil { v.Logger.Error(err, "failed to decode old shoot", string(req.OldObject.Raw)) diff --git a/controllers/provider-aws/pkg/validator/shoot_validator.go b/controllers/provider-aws/pkg/validator/shoot_validator.go index 06a348e73..7a50152e1 100644 --- a/controllers/provider-aws/pkg/validator/shoot_validator.go +++ b/controllers/provider-aws/pkg/validator/shoot_validator.go @@ -20,12 +20,12 @@ import ( "reflect" awsvalidation "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws/validation" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "k8s.io/apimachinery/pkg/util/validation/field" ) -func (v *Shoot) validateShoot(ctx context.Context, shoot *gardencorev1alpha1.Shoot) error { +func (v *Shoot) validateShoot(ctx context.Context, shoot *gardencorev1beta1.Shoot) error { fldPath := field.NewPath("spec", "provider") // InfrastructureConfig @@ -44,7 +44,7 @@ func (v *Shoot) validateShoot(ctx context.Context, shoot *gardencorev1alpha1.Sho return errList.ToAggregate() } - cloudProfile := &gardencorev1alpha1.CloudProfile{} + cloudProfile := &gardencorev1beta1.CloudProfile{} if err := v.client.Get(ctx, kutil.Key(shoot.Spec.CloudProfileName), cloudProfile); err != nil { return err } @@ -90,7 +90,7 @@ func (v *Shoot) validateShoot(ctx context.Context, shoot *gardencorev1alpha1.Sho return nil } -func (v *Shoot) validateShootUpdate(ctx context.Context, oldShoot, shoot *gardencorev1alpha1.Shoot) error { +func (v *Shoot) validateShootUpdate(ctx context.Context, oldShoot, shoot *gardencorev1beta1.Shoot) error { fldPath := field.NewPath("spec", "provider") // InfrastructureConfig update diff --git a/controllers/provider-aws/pkg/webhook/controlplane/ensurer.go b/controllers/provider-aws/pkg/webhook/controlplane/ensurer.go index 8c4eba479..3d0bde52e 100644 --- a/controllers/provider-aws/pkg/webhook/controlplane/ensurer.go +++ b/controllers/provider-aws/pkg/webhook/controlplane/ensurer.go @@ -24,7 +24,7 @@ import ( extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" @@ -97,9 +97,9 @@ func ensureKubeControllerManagerCommandLineArgs(c *corev1.Container) { } func ensureKubeControllerManagerAnnotations(t *corev1.PodTemplateSpec) { - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToPublicNetworks, v1alpha1constants.LabelNetworkPolicyAllowed) - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToPrivateNetworks, v1alpha1constants.LabelNetworkPolicyAllowed) - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToBlockedCIDRs, v1alpha1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToPublicNetworks, v1beta1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToPrivateNetworks, v1beta1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToBlockedCIDRs, v1beta1constants.LabelNetworkPolicyAllowed) } var ( @@ -108,7 +108,7 @@ var ( ValueFrom: &corev1.EnvVarSource{ SecretKeyRef: &corev1.SecretKeySelector{ Key: aws.AccessKeyID, - LocalObjectReference: corev1.LocalObjectReference{Name: v1alpha1constants.SecretNameCloudProvider}, + LocalObjectReference: corev1.LocalObjectReference{Name: v1beta1constants.SecretNameCloudProvider}, }, }, } @@ -117,7 +117,7 @@ var ( ValueFrom: &corev1.EnvVarSource{ SecretKeyRef: &corev1.SecretKeySelector{ Key: aws.SecretAccessKey, - LocalObjectReference: corev1.LocalObjectReference{Name: v1alpha1constants.SecretNameCloudProvider}, + LocalObjectReference: corev1.LocalObjectReference{Name: v1beta1constants.SecretNameCloudProvider}, }, }, } @@ -152,7 +152,7 @@ func ensureVolumes(ps *corev1.PodSpec) { } func (e *ensurer) ensureChecksumAnnotations(ctx context.Context, template *corev1.PodTemplateSpec, namespace string) error { - if err := controlplane.EnsureSecretChecksumAnnotation(ctx, template, e.client, namespace, v1alpha1constants.SecretNameCloudProvider); err != nil { + if err := controlplane.EnsureSecretChecksumAnnotation(ctx, template, e.client, namespace, v1beta1constants.SecretNameCloudProvider); err != nil { return err } return controlplane.EnsureConfigMapChecksumAnnotation(ctx, template, e.client, namespace, aws.CloudProviderConfigName) diff --git a/controllers/provider-aws/pkg/webhook/controlplane/ensurer_test.go b/controllers/provider-aws/pkg/webhook/controlplane/ensurer_test.go index 35eb7ae64..7b31fc274 100644 --- a/controllers/provider-aws/pkg/webhook/controlplane/ensurer_test.go +++ b/controllers/provider-aws/pkg/webhook/controlplane/ensurer_test.go @@ -27,7 +27,7 @@ import ( extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/coreos/go-systemd/unit" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -55,9 +55,9 @@ var _ = Describe("Ensurer", func() { dummyContext = genericmutator.NewEnsurerContext(nil, nil) - secretKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider} + secretKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider} secret = &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider}, Data: map[string][]byte{"foo": []byte("bar")}, } @@ -68,14 +68,14 @@ var _ = Describe("Ensurer", func() { } annotations = map[string]string{ - "checksum/secret-" + v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", - "checksum/configmap-" + aws.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", + "checksum/secret-" + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + "checksum/configmap-" + aws.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", } kubeControllerManagerLabels = map[string]string{ - v1alpha1constants.LabelNetworkPolicyToPublicNetworks: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToPrivateNetworks: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToBlockedCIDRs: v1alpha1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToPublicNetworks: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToPrivateNetworks: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToBlockedCIDRs: v1beta1constants.LabelNetworkPolicyAllowed, } ) @@ -91,7 +91,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -125,7 +125,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -177,7 +177,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -211,7 +211,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ diff --git a/controllers/provider-aws/pkg/webhook/controlplanebackup/ensurer.go b/controllers/provider-aws/pkg/webhook/controlplanebackup/ensurer.go index 3931df5ab..185f5980c 100644 --- a/controllers/provider-aws/pkg/webhook/controlplanebackup/ensurer.go +++ b/controllers/provider-aws/pkg/webhook/controlplanebackup/ensurer.go @@ -23,7 +23,7 @@ import ( extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/operation/common" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/go-logr/logr" @@ -80,7 +80,7 @@ func (e *ensurer) ensureContainers(ps *corev1.PodSpec, name string, cluster *ext } func (e *ensurer) ensureChecksumAnnotations(ctx context.Context, template *corev1.PodTemplateSpec, namespace, name string, backupConfigured bool) error { - if name == v1alpha1constants.StatefulSetNameETCDMain && backupConfigured { + if name == v1beta1constants.StatefulSetNameETCDMain && backupConfigured { return controlplane.EnsureSecretChecksumAnnotation(ctx, template, e.client, namespace, aws.BackupSecretName) } return nil @@ -102,7 +102,7 @@ func (e *ensurer) ensureBackupRestoreContainer(existingContainer *corev1.Contain env []corev1.EnvVar volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { if cluster.Seed.Spec.Backup == nil { e.logger.Info("Backup profile is not configured; backups will not be taken for etcd-main") } else { diff --git a/controllers/provider-aws/pkg/webhook/controlplanebackup/ensurer_test.go b/controllers/provider-aws/pkg/webhook/controlplanebackup/ensurer_test.go index 1d465017d..91390ad38 100644 --- a/controllers/provider-aws/pkg/webhook/controlplanebackup/ensurer_test.go +++ b/controllers/provider-aws/pkg/webhook/controlplanebackup/ensurer_test.go @@ -27,8 +27,8 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -69,20 +69,20 @@ var _ = Describe("Ensurer", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, - Status: gardencorev1alpha1.ShootStatus{ + Status: gardencorev1beta1.ShootStatus{ TechnicalID: "shoot--test--sample", UID: types.UID("test-uid"), }, }, - Seed: &gardencorev1alpha1.Seed{ - Spec: gardencorev1alpha1.SeedSpec{ - Backup: &gardencorev1alpha1.SeedBackup{}, + Seed: &gardencorev1beta1.Seed{ + Spec: gardencorev1beta1.SeedSpec{ + Backup: &gardencorev1beta1.SeedBackup{}, }, }, } @@ -111,7 +111,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -133,7 +133,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -165,7 +165,7 @@ var _ = Describe("Ensurer", func() { It("should not configure backup to etcd-main statefulset if backup profile is missing", func() { ss := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } cluster.Seed.Spec.Backup = nil @@ -186,7 +186,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -211,7 +211,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -222,7 +222,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -238,7 +238,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -265,7 +265,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -290,7 +290,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -343,21 +343,21 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet, annotations map[string]str ) c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", aws.StorageProviderName, "shoot--test--sample--test-uid", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", aws.StorageProviderName, "shoot--test--sample--test-uid", "test-repository:test-tag", nil, env, nil))) Expect(ss.Spec.Template.Annotations).To(Equal(annotations)) } func checkETCDMainStatefulSetWithoutBackup(ss *appsv1.StatefulSet, annotations map[string]string) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", "", "", "test-repository:test-tag", nil, nil, nil))) Expect(ss.Spec.Template.Annotations).To(BeNil()) } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDEvents, v1alpha1constants.StatefulSetNameETCDEvents, "0 */24 * * *", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDEvents, v1beta1constants.StatefulSetNameETCDEvents, "0 */24 * * *", "", "", "test-repository:test-tag", nil, nil, nil))) } diff --git a/controllers/provider-aws/pkg/webhook/controlplaneexposure/ensurer.go b/controllers/provider-aws/pkg/webhook/controlplaneexposure/ensurer.go index 8e0487974..28cc269ae 100644 --- a/controllers/provider-aws/pkg/webhook/controlplaneexposure/ensurer.go +++ b/controllers/provider-aws/pkg/webhook/controlplaneexposure/ensurer.go @@ -21,7 +21,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -82,7 +82,7 @@ func (e *ensurer) getVolumeClaimTemplate(name string) *corev1.PersistentVolumeCl volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { etcdStorage = *e.etcdStorage volumeClaimTemplateName = controlplane.EtcdMainVolumeClaimTemplateName } diff --git a/controllers/provider-aws/pkg/webhook/controlplaneexposure/ensurer_test.go b/controllers/provider-aws/pkg/webhook/controlplaneexposure/ensurer_test.go index 65370ed41..a16c60052 100644 --- a/controllers/provider-aws/pkg/webhook/controlplaneexposure/ensurer_test.go +++ b/controllers/provider-aws/pkg/webhook/controlplaneexposure/ensurer_test.go @@ -24,7 +24,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" @@ -77,7 +77,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -104,7 +104,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -134,7 +134,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -150,7 +150,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -181,7 +181,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -197,7 +197,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -241,6 +241,6 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet) { } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { - pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1alpha1constants.StatefulSetNameETCDEvents) - Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1alpha1constants.StatefulSetNameETCDEvents, nil, nil))) + pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1beta1constants.StatefulSetNameETCDEvents) + Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1beta1constants.StatefulSetNameETCDEvents, nil, nil))) } diff --git a/controllers/provider-aws/test/e2e/networkpolicies/networkpolicy_test.go b/controllers/provider-aws/test/e2e/networkpolicies/networkpolicy_test.go index f2979daaa..0b1a738f7 100644 --- a/controllers/provider-aws/test/e2e/networkpolicies/networkpolicy_test.go +++ b/controllers/provider-aws/test/e2e/networkpolicies/networkpolicy_test.go @@ -29,7 +29,7 @@ import ( "github.com/gardener/gardener-extensions/test/e2e/framework/executor" networkpolicies "github.com/gardener/gardener-extensions/test/e2e/framework/networkpolicies" - "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/logger" utilclient "github.com/gardener/gardener/pkg/utils/kubernetes/client" @@ -95,7 +95,7 @@ var _ = Describe("Network Policy Testing", func() { shootGardenerTest, err = gardenerframework.NewShootGardenerTest(*kubeconfig, nil, shootAppTestLogger) Expect(err).NotTo(HaveOccurred()) - shoot := &v1alpha1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} + shoot := &v1beta1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} shootTestOperations, err = gardenerframework.NewGardenTestOperationWithShoot(ctx, shootGardenerTest.GardenClient, shootAppTestLogger, shoot) Expect(err).NotTo(HaveOccurred()) } diff --git a/controllers/provider-azure/docs/usage-as-end-user.md b/controllers/provider-azure/docs/usage-as-end-user.md index 9f30f71b0..e681e996c 100644 --- a/controllers/provider-azure/docs/usage-as-end-user.md +++ b/controllers/provider-azure/docs/usage-as-end-user.md @@ -1,6 +1,6 @@ # Using the Azure provider extension with Gardener as end-user -The [`core.gardener.cloud/v1alpha1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. +The [`core.gardener.cloud/v1beta1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. In this document we are describing how this configuration looks like for Azure and provide an example `Shoot` manifest with minimal configuration that you can use to create an Azure cluster (modulo the landscape-specific information like cloud profile names, secret binding names, etc.). diff --git a/controllers/provider-azure/pkg/controller/controlplane/valuesprovider.go b/controllers/provider-azure/pkg/controller/controlplane/valuesprovider.go index f23b327bb..0458622b5 100644 --- a/controllers/provider-azure/pkg/controller/controlplane/valuesprovider.go +++ b/controllers/provider-azure/pkg/controller/controlplane/valuesprovider.go @@ -27,7 +27,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller/controlplane/genericactuator" "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/gardener/gardener/pkg/utils/chart" "github.com/gardener/gardener/pkg/utils/secrets" @@ -50,8 +50,8 @@ const ( var controlPlaneSecrets = &secrets.Secrets{ CertificateSecretConfigs: map[string]*secrets.CertificateSecretConfig{ - v1alpha1constants.SecretNameCACluster: { - Name: v1alpha1constants.SecretNameCACluster, + v1beta1constants.SecretNameCACluster: { + Name: v1beta1constants.SecretNameCACluster, CommonName: "kubernetes", CertType: secrets.CACert, }, @@ -64,11 +64,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:cloud-controller-manager", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, &secrets.ControlPlaneSecretConfig{ @@ -77,7 +77,7 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: cloudControllerManagerDeploymentName, DNSNames: controlplane.DNSNamesForService(cloudControllerManagerDeploymentName, clusterName), CertType: secrets.ServerCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, }, } @@ -260,7 +260,7 @@ func getCCMChartValues( "podAnnotations": map[string]interface{}{ "checksum/secret-cloud-controller-manager": checksums[cloudControllerManagerDeploymentName], "checksum/secret-cloud-controller-manager-server": checksums[cloudControllerManagerServerName], - "checksum/secret-cloudprovider": checksums[v1alpha1constants.SecretNameCloudProvider], + "checksum/secret-cloudprovider": checksums[v1beta1constants.SecretNameCloudProvider], "checksum/configmap-cloud-provider-config": checksums[azure.CloudProviderConfigName], }, } diff --git a/controllers/provider-azure/pkg/controller/controlplane/valuesprovider_test.go b/controllers/provider-azure/pkg/controller/controlplane/valuesprovider_test.go index 72f32a1ff..f46b86c7f 100644 --- a/controllers/provider-azure/pkg/controller/controlplane/valuesprovider_test.go +++ b/controllers/provider-azure/pkg/controller/controlplane/valuesprovider_test.go @@ -23,8 +23,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -57,7 +57,7 @@ var _ = Describe("ValuesProvider", func() { Spec: extensionsv1alpha1.ControlPlaneSpec{ Region: "eu-west-1a", SecretRef: corev1.SecretReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, ProviderConfig: &runtime.RawExtension{ @@ -118,7 +118,7 @@ var _ = Describe("ValuesProvider", func() { Spec: extensionsv1alpha1.ControlPlaneSpec{ Region: "eu-west-1a", SecretRef: corev1.SecretReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, ProviderConfig: &runtime.RawExtension{ @@ -179,7 +179,7 @@ var _ = Describe("ValuesProvider", func() { Spec: extensionsv1alpha1.ControlPlaneSpec{ Region: "eu-west-1a", SecretRef: corev1.SecretReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, ProviderConfig: &runtime.RawExtension{ @@ -233,7 +233,7 @@ var _ = Describe("ValuesProvider", func() { Spec: extensionsv1alpha1.ControlPlaneSpec{ Region: "eu-west-1a", SecretRef: corev1.SecretReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, ProviderConfig: &runtime.RawExtension{ @@ -294,7 +294,7 @@ var _ = Describe("ValuesProvider", func() { Spec: extensionsv1alpha1.ControlPlaneSpec{ Region: "eu-west-1a", SecretRef: corev1.SecretReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, ProviderConfig: &runtime.RawExtension{ @@ -355,7 +355,7 @@ var _ = Describe("ValuesProvider", func() { Spec: extensionsv1alpha1.ControlPlaneSpec{ Region: "eu-west-1a", SecretRef: corev1.SecretReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, ProviderConfig: &runtime.RawExtension{ @@ -403,22 +403,22 @@ var _ = Describe("ValuesProvider", func() { cidr = "10.250.0.0/19" cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &cidr, }, - Kubernetes: gardencorev1alpha1.Kubernetes{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, }, } - cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider} + cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider} cpSecret = &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, Type: corev1.SecretTypeOpaque, @@ -431,10 +431,10 @@ var _ = Describe("ValuesProvider", func() { } checksums = map[string]string{ - v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", - azure.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", - "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", - "cloud-controller-manager-server": "6dff2a2e6f14444b66d8e4a351c049f7e89ee24ba3eaab95dbec40ba6bdebb52", + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + azure.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", + "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", + "cloud-controller-manager-server": "6dff2a2e6f14444b66d8e4a351c049f7e89ee24ba3eaab95dbec40ba6bdebb52", } configNonZonedClusterChartValues = map[string]interface{}{ diff --git a/controllers/provider-azure/pkg/controller/worker/machines_test.go b/controllers/provider-azure/pkg/controller/worker/machines_test.go index 5cfc1854c..1717263ef 100644 --- a/controllers/provider-azure/pkg/controller/worker/machines_test.go +++ b/controllers/provider-azure/pkg/controller/worker/machines_test.go @@ -30,7 +30,7 @@ import ( mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" mockkubernetes "github.com/gardener/gardener-extensions/pkg/mock/gardener/client/kubernetes" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" "github.com/golang/mock/gomock" @@ -170,9 +170,9 @@ var _ = Describe("Machines", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: shootVersion, }, }, diff --git a/controllers/provider-azure/pkg/internal/infrastructure/terraform_test.go b/controllers/provider-azure/pkg/internal/infrastructure/terraform_test.go index 53782972a..4c9b66ef3 100644 --- a/controllers/provider-azure/pkg/internal/infrastructure/terraform_test.go +++ b/controllers/provider-azure/pkg/internal/infrastructure/terraform_test.go @@ -21,7 +21,7 @@ import ( "github.com/gardener/gardener-extensions/controllers/provider-azure/pkg/internal" "github.com/gardener/gardener-extensions/pkg/controller" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -32,9 +32,9 @@ import ( func makeCluster(pods, services string, region string, countFaultDomain, countUpdateDomain int) *controller.Cluster { var ( - shoot = gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + shoot = gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &pods, Services: &services, }, @@ -49,9 +49,9 @@ func makeCluster(pods, services string, region string, countFaultDomain, countUp }, } cloudProfileConfigJSON, _ = json.Marshal(cloudProfileConfig) - cloudProfile = gardencorev1alpha1.CloudProfile{ - Spec: gardencorev1alpha1.CloudProfileSpec{ - ProviderConfig: &gardencorev1alpha1.ProviderConfig{ + cloudProfile = gardencorev1beta1.CloudProfile{ + Spec: gardencorev1beta1.CloudProfileSpec{ + ProviderConfig: &gardencorev1beta1.ProviderConfig{ RawExtension: runtime.RawExtension{ Raw: cloudProfileConfigJSON, }, diff --git a/controllers/provider-azure/pkg/internal/scheme.go b/controllers/provider-azure/pkg/internal/scheme.go index a795e72f6..991d673de 100644 --- a/controllers/provider-azure/pkg/internal/scheme.go +++ b/controllers/provider-azure/pkg/internal/scheme.go @@ -20,7 +20,7 @@ import ( "github.com/gardener/gardener-extensions/controllers/provider-azure/pkg/apis/azure/install" azurev1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-azure/pkg/apis/azure/v1alpha1" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" @@ -57,7 +57,7 @@ func InfrastructureConfigFromInfrastructure(infra *extensionsv1alpha1.Infrastruc // CloudProfileConfigFromCloudProfile extracts the CloudProfileConfig from the // ProviderConfig section of the given CloudProfile. -func CloudProfileConfigFromCloudProfile(cloudProfile *gardencorev1alpha1.CloudProfile) (*azurev1alpha1.CloudProfileConfig, error) { +func CloudProfileConfigFromCloudProfile(cloudProfile *gardencorev1beta1.CloudProfile) (*azurev1alpha1.CloudProfileConfig, error) { config := &azurev1alpha1.CloudProfileConfig{} if cloudProfile.Spec.ProviderConfig != nil && cloudProfile.Spec.ProviderConfig.Raw != nil { if _, _, err := decoder.Decode(cloudProfile.Spec.ProviderConfig.Raw, nil, config); err != nil { diff --git a/controllers/provider-azure/pkg/webhook/controlplane/ensurer.go b/controllers/provider-azure/pkg/webhook/controlplane/ensurer.go index 3aa49308f..add79d707 100644 --- a/controllers/provider-azure/pkg/webhook/controlplane/ensurer.go +++ b/controllers/provider-azure/pkg/webhook/controlplane/ensurer.go @@ -23,7 +23,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" "github.com/coreos/go-systemd/unit" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "github.com/go-logr/logr" "github.com/pkg/errors" @@ -96,9 +96,9 @@ func ensureKubeControllerManagerCommandLineArgs(c *corev1.Container) { } func ensureKubeControllerManagerAnnotations(t *corev1.PodTemplateSpec) { - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToPublicNetworks, v1alpha1constants.LabelNetworkPolicyAllowed) - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToPrivateNetworks, v1alpha1constants.LabelNetworkPolicyAllowed) - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToBlockedCIDRs, v1alpha1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToPublicNetworks, v1beta1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToPrivateNetworks, v1beta1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToBlockedCIDRs, v1beta1constants.LabelNetworkPolicyAllowed) } var ( diff --git a/controllers/provider-azure/pkg/webhook/controlplane/ensurer_test.go b/controllers/provider-azure/pkg/webhook/controlplane/ensurer_test.go index a7ba832b0..97ce4a377 100644 --- a/controllers/provider-azure/pkg/webhook/controlplane/ensurer_test.go +++ b/controllers/provider-azure/pkg/webhook/controlplane/ensurer_test.go @@ -26,7 +26,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/test" "github.com/coreos/go-systemd/unit" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -67,9 +67,9 @@ var _ = Describe("Ensurer", func() { } kubeControllerManagerLabels = map[string]string{ - v1alpha1constants.LabelNetworkPolicyToPublicNetworks: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToPrivateNetworks: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToBlockedCIDRs: v1alpha1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToPublicNetworks: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToPrivateNetworks: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToBlockedCIDRs: v1beta1constants.LabelNetworkPolicyAllowed, } ) @@ -85,7 +85,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -118,7 +118,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -165,7 +165,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -198,7 +198,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ diff --git a/controllers/provider-azure/pkg/webhook/controlplanebackup/ensurer.go b/controllers/provider-azure/pkg/webhook/controlplanebackup/ensurer.go index d2bbd75d2..09a5e710e 100644 --- a/controllers/provider-azure/pkg/webhook/controlplanebackup/ensurer.go +++ b/controllers/provider-azure/pkg/webhook/controlplanebackup/ensurer.go @@ -23,7 +23,7 @@ import ( extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/operation/common" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/go-logr/logr" @@ -80,7 +80,7 @@ func (e *ensurer) ensureContainers(ps *corev1.PodSpec, name string, cluster *ext } func (e *ensurer) ensureChecksumAnnotations(ctx context.Context, template *corev1.PodTemplateSpec, namespace, name string, backupConfigured bool) error { - if name == v1alpha1constants.StatefulSetNameETCDMain && backupConfigured { + if name == v1beta1constants.StatefulSetNameETCDMain && backupConfigured { return controlplane.EnsureSecretChecksumAnnotation(ctx, template, e.client, namespace, azure.BackupSecretName) } return nil @@ -102,7 +102,7 @@ func (e *ensurer) ensureBackupRestoreContainer(existingContainer *corev1.Contain env []corev1.EnvVar volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { if cluster.Seed.Spec.Backup == nil { e.logger.Info("Backup profile is not configured; backup will not be taken for etcd-main") } else { diff --git a/controllers/provider-azure/pkg/webhook/controlplanebackup/ensurer_test.go b/controllers/provider-azure/pkg/webhook/controlplanebackup/ensurer_test.go index 8e976d5d6..5eb557d8e 100644 --- a/controllers/provider-azure/pkg/webhook/controlplanebackup/ensurer_test.go +++ b/controllers/provider-azure/pkg/webhook/controlplanebackup/ensurer_test.go @@ -27,8 +27,8 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -69,20 +69,20 @@ var _ = Describe("Ensurer", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, - Status: gardencorev1alpha1.ShootStatus{ + Status: gardencorev1beta1.ShootStatus{ TechnicalID: "shoot--test--sample", UID: types.UID("test-uid"), }, }, - Seed: &gardencorev1alpha1.Seed{ - Spec: gardencorev1alpha1.SeedSpec{ - Backup: &gardencorev1alpha1.SeedBackup{}, + Seed: &gardencorev1beta1.Seed{ + Spec: gardencorev1beta1.SeedSpec{ + Backup: &gardencorev1beta1.SeedBackup{}, }, }, } @@ -111,7 +111,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -133,7 +133,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -165,7 +165,7 @@ var _ = Describe("Ensurer", func() { It("should not configure backup to etcd-main statefulset if backup profile is missing", func() { ss := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } cluster.Seed.Spec.Backup = nil @@ -186,7 +186,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -211,7 +211,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -222,7 +222,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -238,7 +238,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -265,7 +265,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -290,7 +290,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -334,21 +334,21 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet, annotations map[string]str ) c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", azure.StorageProviderName, "shoot--test--sample--test-uid", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", azure.StorageProviderName, "shoot--test--sample--test-uid", "test-repository:test-tag", nil, env, nil))) Expect(ss.Spec.Template.Annotations).To(Equal(annotations)) } func checkETCDMainStatefulSetWithoutBackup(ss *appsv1.StatefulSet, annotations map[string]string) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", "", "", "test-repository:test-tag", nil, nil, nil))) Expect(ss.Spec.Template.Annotations).To(BeNil()) } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDEvents, v1alpha1constants.StatefulSetNameETCDEvents, "0 */24 * * *", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDEvents, v1beta1constants.StatefulSetNameETCDEvents, "0 */24 * * *", "", "", "test-repository:test-tag", nil, nil, nil))) } diff --git a/controllers/provider-azure/pkg/webhook/controlplaneexposure/ensurer.go b/controllers/provider-azure/pkg/webhook/controlplaneexposure/ensurer.go index 723607da2..d124af32c 100644 --- a/controllers/provider-azure/pkg/webhook/controlplaneexposure/ensurer.go +++ b/controllers/provider-azure/pkg/webhook/controlplaneexposure/ensurer.go @@ -21,7 +21,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "github.com/go-logr/logr" "github.com/pkg/errors" @@ -64,7 +64,7 @@ func (e *ensurer) EnsureKubeAPIServerService(ctx context.Context, ectx genericmu // EnsureKubeAPIServerDeployment ensures that the kube-apiserver deployment conforms to the provider requirements. func (e *ensurer) EnsureKubeAPIServerDeployment(ctx context.Context, ectx genericmutator.EnsurerContext, dep *appsv1.Deployment) error { // Get load balancer address of the kube-apiserver service - address, err := kutil.GetLoadBalancerIngress(ctx, e.client, dep.Namespace, v1alpha1constants.DeploymentNameKubeAPIServer) + address, err := kutil.GetLoadBalancerIngress(ctx, e.client, dep.Namespace, v1beta1constants.DeploymentNameKubeAPIServer) if err != nil { return errors.Wrap(err, "could not get kube-apiserver service load balancer address") } @@ -93,7 +93,7 @@ func (e *ensurer) getVolumeClaimTemplate(name string) *corev1.PersistentVolumeCl volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { etcdStorage = *e.etcdStorage volumeClaimTemplateName = controlplane.EtcdMainVolumeClaimTemplateName } diff --git a/controllers/provider-azure/pkg/webhook/controlplaneexposure/ensurer_test.go b/controllers/provider-azure/pkg/webhook/controlplaneexposure/ensurer_test.go index cae40be17..85556b114 100644 --- a/controllers/provider-azure/pkg/webhook/controlplaneexposure/ensurer_test.go +++ b/controllers/provider-azure/pkg/webhook/controlplaneexposure/ensurer_test.go @@ -25,7 +25,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -58,9 +58,9 @@ var _ = Describe("Ensurer", func() { ctrl *gomock.Controller - svcKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer} + svcKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer} svc = &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Status: corev1.ServiceStatus{ LoadBalancer: corev1.LoadBalancerStatus{ Ingress: []corev1.LoadBalancerIngress{ @@ -83,7 +83,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -116,7 +116,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -152,7 +152,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -168,7 +168,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -199,7 +199,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -215,7 +215,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -260,8 +260,8 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet) { } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { - pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1alpha1constants.StatefulSetNameETCDEvents) - Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1alpha1constants.StatefulSetNameETCDEvents, nil, nil))) + pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1beta1constants.StatefulSetNameETCDEvents) + Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1beta1constants.StatefulSetNameETCDEvents, nil, nil))) } func clientGet(result runtime.Object) interface{} { diff --git a/controllers/provider-azure/test/e2e/networkpolicies/networkpolicy_test.go b/controllers/provider-azure/test/e2e/networkpolicies/networkpolicy_test.go index 84a7bff74..0cd18107d 100644 --- a/controllers/provider-azure/test/e2e/networkpolicies/networkpolicy_test.go +++ b/controllers/provider-azure/test/e2e/networkpolicies/networkpolicy_test.go @@ -29,7 +29,7 @@ import ( "github.com/gardener/gardener-extensions/test/e2e/framework/executor" networkpolicies "github.com/gardener/gardener-extensions/test/e2e/framework/networkpolicies" - "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/logger" utilclient "github.com/gardener/gardener/pkg/utils/kubernetes/client" @@ -95,7 +95,7 @@ var _ = Describe("Network Policy Testing", func() { shootGardenerTest, err = gardenerframework.NewShootGardenerTest(*kubeconfig, nil, shootAppTestLogger) Expect(err).NotTo(HaveOccurred()) - shoot := &v1alpha1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} + shoot := &v1beta1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} shootTestOperations, err = gardenerframework.NewGardenTestOperationWithShoot(ctx, shootGardenerTest.GardenClient, shootAppTestLogger, shoot) Expect(err).NotTo(HaveOccurred()) } diff --git a/controllers/provider-gcp/docs/usage-as-end-user.md b/controllers/provider-gcp/docs/usage-as-end-user.md index 2d6bd6ad5..93d83a2f0 100644 --- a/controllers/provider-gcp/docs/usage-as-end-user.md +++ b/controllers/provider-gcp/docs/usage-as-end-user.md @@ -1,6 +1,6 @@ # Using the GCP provider extension with Gardener as end-user -The [`core.gardener.cloud/v1alpha1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. +The [`core.gardener.cloud/v1beta1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. In this document we are describing how this configuration looks like for GCP and provide an example `Shoot` manifest with minimal configuration that you can use to create an GCP cluster (modulo the landscape-specific information like cloud profile names, secret binding names, etc.). diff --git a/controllers/provider-gcp/pkg/apis/gcp/validation/controlplane.go b/controllers/provider-gcp/pkg/apis/gcp/validation/controlplane.go index 763581943..73a7261fa 100644 --- a/controllers/provider-gcp/pkg/apis/gcp/validation/controlplane.go +++ b/controllers/provider-gcp/pkg/apis/gcp/validation/controlplane.go @@ -17,13 +17,13 @@ package validation import ( apisgcp "github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/apis/gcp" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" apivalidation "k8s.io/apimachinery/pkg/api/validation" "k8s.io/apimachinery/pkg/util/validation/field" ) // ValidateControlPlaneConfig validates a ControlPlaneConfig object. -func ValidateControlPlaneConfig(controlPlaneConfig *apisgcp.ControlPlaneConfig, region string, regions []gardencorev1alpha1.Region) field.ErrorList { +func ValidateControlPlaneConfig(controlPlaneConfig *apisgcp.ControlPlaneConfig, region string, regions []gardencorev1beta1.Region) field.ErrorList { allErrs := field.ErrorList{} if len(controlPlaneConfig.Zone) == 0 { @@ -36,7 +36,7 @@ func ValidateControlPlaneConfig(controlPlaneConfig *apisgcp.ControlPlaneConfig, } // ValidateControlPlaneConfigUpdate validates a ControlPlaneConfig object. -func ValidateControlPlaneConfigUpdate(oldConfig, newConfig *apisgcp.ControlPlaneConfig, region string, regions []gardencorev1alpha1.Region) field.ErrorList { +func ValidateControlPlaneConfigUpdate(oldConfig, newConfig *apisgcp.ControlPlaneConfig, region string, regions []gardencorev1beta1.Region) field.ErrorList { allErrs := field.ErrorList{} allErrs = append(allErrs, apivalidation.ValidateImmutableField(newConfig.Zone, oldConfig.Zone, field.NewPath("zone"))...) @@ -44,7 +44,7 @@ func ValidateControlPlaneConfigUpdate(oldConfig, newConfig *apisgcp.ControlPlane return allErrs } -func validateZoneConstraints(regions []gardencorev1alpha1.Region, region, zone, oldZone string) (bool, []string) { +func validateZoneConstraints(regions []gardencorev1beta1.Region, region, zone, oldZone string) (bool, []string) { if zone == oldZone { return true, nil } diff --git a/controllers/provider-gcp/pkg/apis/gcp/validation/controlplane_test.go b/controllers/provider-gcp/pkg/apis/gcp/validation/controlplane_test.go index fbde54d7c..963146648 100644 --- a/controllers/provider-gcp/pkg/apis/gcp/validation/controlplane_test.go +++ b/controllers/provider-gcp/pkg/apis/gcp/validation/controlplane_test.go @@ -18,7 +18,7 @@ import ( apisgcp "github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/apis/gcp" . "github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/apis/gcp/validation" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" @@ -30,10 +30,10 @@ var _ = Describe("ControlPlaneConfig validation", func() { region = "foo" zone = "some-zone" - regions = []gardencorev1alpha1.Region{ + regions = []gardencorev1beta1.Region{ { Name: region, - Zones: []gardencorev1alpha1.AvailabilityZone{ + Zones: []gardencorev1beta1.AvailabilityZone{ {Name: zone}, }, }, diff --git a/controllers/provider-gcp/pkg/controller/controlplane/valuesprovider.go b/controllers/provider-gcp/pkg/controller/controlplane/valuesprovider.go index 7881736fd..c97528604 100644 --- a/controllers/provider-gcp/pkg/controller/controlplane/valuesprovider.go +++ b/controllers/provider-gcp/pkg/controller/controlplane/valuesprovider.go @@ -27,7 +27,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller/controlplane/genericactuator" "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/gardener/gardener/pkg/utils/chart" "github.com/gardener/gardener/pkg/utils/secrets" @@ -50,8 +50,8 @@ const ( var controlPlaneSecrets = &secrets.Secrets{ CertificateSecretConfigs: map[string]*secrets.CertificateSecretConfig{ - v1alpha1constants.SecretNameCACluster: { - Name: v1alpha1constants.SecretNameCACluster, + v1beta1constants.SecretNameCACluster: { + Name: v1beta1constants.SecretNameCACluster, CommonName: "kubernetes", CertType: secrets.CACert, }, @@ -64,11 +64,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:cloud-controller-manager", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, &secrets.ControlPlaneSecretConfig{ @@ -77,7 +77,7 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: cloudControllerManagerDeploymentName, DNSNames: controlplane.DNSNamesForService(cloudControllerManagerDeploymentName, clusterName), CertType: secrets.ServerCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, }, } @@ -233,7 +233,7 @@ func getCCMChartValues( "podAnnotations": map[string]interface{}{ "checksum/secret-cloud-controller-manager": checksums[cloudControllerManagerDeploymentName], "checksum/secret-cloud-controller-manager-server": checksums[cloudControllerManagerServerName], - "checksum/secret-cloudprovider": checksums[v1alpha1constants.SecretNameCloudProvider], + "checksum/secret-cloudprovider": checksums[v1beta1constants.SecretNameCloudProvider], "checksum/configmap-cloud-provider-config": checksums[internal.CloudProviderConfigName], }, } diff --git a/controllers/provider-gcp/pkg/controller/controlplane/valuesprovider_test.go b/controllers/provider-gcp/pkg/controller/controlplane/valuesprovider_test.go index 8e03d9be6..a03b179ef 100644 --- a/controllers/provider-gcp/pkg/controller/controlplane/valuesprovider_test.go +++ b/controllers/provider-gcp/pkg/controller/controlplane/valuesprovider_test.go @@ -24,8 +24,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -57,7 +57,7 @@ var _ = Describe("ValuesProvider", func() { }, Spec: extensionsv1alpha1.ControlPlaneSpec{ SecretRef: corev1.SecretReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, ProviderConfig: &runtime.RawExtension{ @@ -90,22 +90,22 @@ var _ = Describe("ValuesProvider", func() { cidr = "10.250.0.0/19" cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &cidr, }, - Kubernetes: gardencorev1alpha1.Kubernetes{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, }, } - cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider} + cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider} cpSecret = &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, Type: corev1.SecretTypeOpaque, @@ -115,10 +115,10 @@ var _ = Describe("ValuesProvider", func() { } checksums = map[string]string{ - v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", - internal.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", - "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", - "cloud-controller-manager-server": "6dff2a2e6f14444b66d8e4a351c049f7e89ee24ba3eaab95dbec40ba6bdebb52", + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + internal.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", + "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", + "cloud-controller-manager-server": "6dff2a2e6f14444b66d8e4a351c049f7e89ee24ba3eaab95dbec40ba6bdebb52", } configChartValues = map[string]interface{}{ diff --git a/controllers/provider-gcp/pkg/controller/worker/machines_test.go b/controllers/provider-gcp/pkg/controller/worker/machines_test.go index ec9b66889..1e1b41bb3 100644 --- a/controllers/provider-gcp/pkg/controller/worker/machines_test.go +++ b/controllers/provider-gcp/pkg/controller/worker/machines_test.go @@ -30,7 +30,7 @@ import ( mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" mockkubernetes "github.com/gardener/gardener-extensions/pkg/mock/gardener/client/kubernetes" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" "github.com/golang/mock/gomock" @@ -170,9 +170,9 @@ var _ = Describe("Machines", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: shootVersion, }, }, diff --git a/controllers/provider-gcp/pkg/internal/infrastructure/terraform_test.go b/controllers/provider-gcp/pkg/internal/infrastructure/terraform_test.go index 13d9f3c08..c5de2dc9f 100644 --- a/controllers/provider-gcp/pkg/internal/infrastructure/terraform_test.go +++ b/controllers/provider-gcp/pkg/internal/infrastructure/terraform_test.go @@ -24,7 +24,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller" mockterraformer "github.com/gardener/gardener-extensions/pkg/mock/gardener-extensions/terraformer" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -88,9 +88,9 @@ var _ = Describe("Terraform", func() { } cluster = &controller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &podsCIDR, Services: &servicesCIDR, }, diff --git a/controllers/provider-gcp/pkg/webhook/controlplane/ensurer.go b/controllers/provider-gcp/pkg/webhook/controlplane/ensurer.go index c2753f8aa..c81a6456b 100644 --- a/controllers/provider-gcp/pkg/webhook/controlplane/ensurer.go +++ b/controllers/provider-gcp/pkg/webhook/controlplane/ensurer.go @@ -27,7 +27,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" "github.com/coreos/go-systemd/unit" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -99,9 +99,9 @@ func ensureKubeControllerManagerCommandLineArgs(c *corev1.Container) { } func ensureKubeControllerManagerAnnotations(t *corev1.PodTemplateSpec) { - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToPublicNetworks, v1alpha1constants.LabelNetworkPolicyAllowed) - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToPrivateNetworks, v1alpha1constants.LabelNetworkPolicyAllowed) - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToBlockedCIDRs, v1alpha1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToPublicNetworks, v1beta1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToPrivateNetworks, v1beta1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToBlockedCIDRs, v1beta1constants.LabelNetworkPolicyAllowed) } var ( @@ -121,7 +121,7 @@ var ( MountPath: "/etc/kubernetes/cloudprovider", } cloudProviderSecretVolumeMount = corev1.VolumeMount{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, MountPath: "/srv/cloudprovider", } @@ -134,10 +134,10 @@ var ( }, } cloudProviderSecretVolume = corev1.Volume{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, VolumeSource: corev1.VolumeSource{ Secret: &corev1.SecretVolumeSource{ - SecretName: v1alpha1constants.SecretNameCloudProvider, + SecretName: v1beta1constants.SecretNameCloudProvider, }, }, } @@ -154,7 +154,7 @@ func ensureVolumes(ps *corev1.PodSpec) { } func (e *ensurer) ensureChecksumAnnotations(ctx context.Context, template *corev1.PodTemplateSpec, namespace string) error { - if err := controlplane.EnsureSecretChecksumAnnotation(ctx, template, e.client, namespace, v1alpha1constants.SecretNameCloudProvider); err != nil { + if err := controlplane.EnsureSecretChecksumAnnotation(ctx, template, e.client, namespace, v1beta1constants.SecretNameCloudProvider); err != nil { return err } return controlplane.EnsureConfigMapChecksumAnnotation(ctx, template, e.client, namespace, internal.CloudProviderConfigName) diff --git a/controllers/provider-gcp/pkg/webhook/controlplane/ensurer_test.go b/controllers/provider-gcp/pkg/webhook/controlplane/ensurer_test.go index b9065641d..1d5c83caa 100644 --- a/controllers/provider-gcp/pkg/webhook/controlplane/ensurer_test.go +++ b/controllers/provider-gcp/pkg/webhook/controlplane/ensurer_test.go @@ -26,7 +26,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/test" "github.com/coreos/go-systemd/unit" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -54,9 +54,9 @@ var _ = Describe("Ensurer", func() { dummyContext = genericmutator.NewEnsurerContext(nil, nil) - secretKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider} + secretKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider} secret = &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider}, Data: map[string][]byte{"foo": []byte("bar")}, } @@ -67,14 +67,14 @@ var _ = Describe("Ensurer", func() { } annotations = map[string]string{ - "checksum/secret-" + v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", - "checksum/configmap-" + internal.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", + "checksum/secret-" + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + "checksum/configmap-" + internal.CloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", } kubeControllerManagerLabels = map[string]string{ - v1alpha1constants.LabelNetworkPolicyToPublicNetworks: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToPrivateNetworks: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToBlockedCIDRs: v1alpha1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToPublicNetworks: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToPrivateNetworks: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToBlockedCIDRs: v1beta1constants.LabelNetworkPolicyAllowed, } ) @@ -90,7 +90,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -124,7 +124,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -142,15 +142,13 @@ var _ = Describe("Ensurer", func() { }, VolumeMounts: []corev1.VolumeMount{ {Name: internal.CloudProviderConfigName, MountPath: "?"}, - // TODO Use constant from github.com/gardener/gardener/pkg/apis/core/v1alpha1 when available - // See https://github.com/gardener/gardener/pull/930 - {Name: v1alpha1constants.SecretNameCloudProvider, MountPath: "?"}, + {Name: v1beta1constants.SecretNameCloudProvider, MountPath: "?"}, }, }, }, Volumes: []corev1.Volume{ {Name: internal.CloudProviderConfigName}, - {Name: v1alpha1constants.SecretNameCloudProvider}, + {Name: v1beta1constants.SecretNameCloudProvider}, }, }, }, @@ -179,7 +177,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -213,7 +211,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -230,13 +228,13 @@ var _ = Describe("Ensurer", func() { }, VolumeMounts: []corev1.VolumeMount{ {Name: internal.CloudProviderConfigName, MountPath: "?"}, - {Name: v1alpha1constants.SecretNameCloudProvider, MountPath: "?"}, + {Name: v1beta1constants.SecretNameCloudProvider, MountPath: "?"}, }, }, }, Volumes: []corev1.Volume{ {Name: internal.CloudProviderConfigName}, - {Name: v1alpha1constants.SecretNameCloudProvider}, + {Name: v1beta1constants.SecretNameCloudProvider}, }, }, }, diff --git a/controllers/provider-gcp/pkg/webhook/controlplanebackup/ensurer.go b/controllers/provider-gcp/pkg/webhook/controlplanebackup/ensurer.go index e5b4ca64f..50b794722 100644 --- a/controllers/provider-gcp/pkg/webhook/controlplanebackup/ensurer.go +++ b/controllers/provider-gcp/pkg/webhook/controlplanebackup/ensurer.go @@ -24,7 +24,7 @@ import ( extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/operation/common" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/go-logr/logr" @@ -84,7 +84,7 @@ func (e *ensurer) ensureContainers(ps *corev1.PodSpec, name string, cluster *ext } func (e *ensurer) ensureChecksumAnnotations(ctx context.Context, template *corev1.PodTemplateSpec, namespace, name string, backupConfigured bool) error { - if name == v1alpha1constants.StatefulSetNameETCDMain && backupConfigured { + if name == v1beta1constants.StatefulSetNameETCDMain && backupConfigured { return controlplane.EnsureSecretChecksumAnnotation(ctx, template, e.client, namespace, gcp.BackupSecretName) } return nil @@ -111,7 +111,7 @@ func (e *ensurer) ensureBackupRestoreContainer(existingContainer *corev1.Contain volumeMounts []corev1.VolumeMount volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { if cluster.Seed.Spec.Backup == nil { e.logger.Info("Backup profile is not configured; backup will not be taken for etcd-main") } else { @@ -159,7 +159,7 @@ func (e *ensurer) ensureBackupRestoreContainer(existingContainer *corev1.Contain } func (e *ensurer) ensureVolumes(ps *corev1.PodSpec, name string, backupConfigured bool) { - if name == v1alpha1constants.StatefulSetNameETCDMain && backupConfigured { + if name == v1beta1constants.StatefulSetNameETCDMain && backupConfigured { etcdBackupSecretVolume := corev1.Volume{ Name: gcp.BackupSecretName, VolumeSource: corev1.VolumeSource{ diff --git a/controllers/provider-gcp/pkg/webhook/controlplanebackup/ensurer_test.go b/controllers/provider-gcp/pkg/webhook/controlplanebackup/ensurer_test.go index 86e4894ca..2ce5e6f5d 100644 --- a/controllers/provider-gcp/pkg/webhook/controlplanebackup/ensurer_test.go +++ b/controllers/provider-gcp/pkg/webhook/controlplanebackup/ensurer_test.go @@ -28,8 +28,8 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -70,20 +70,20 @@ var _ = Describe("Ensurer", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, - Status: gardencorev1alpha1.ShootStatus{ + Status: gardencorev1beta1.ShootStatus{ TechnicalID: "shoot--test--sample", UID: types.UID("test-uid"), }, }, - Seed: &gardencorev1alpha1.Seed{ - Spec: gardencorev1alpha1.SeedSpec{ - Backup: &gardencorev1alpha1.SeedBackup{}, + Seed: &gardencorev1beta1.Seed{ + Spec: gardencorev1beta1.SeedSpec{ + Backup: &gardencorev1beta1.SeedBackup{}, }, }, } @@ -112,7 +112,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -134,7 +134,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -166,7 +166,7 @@ var _ = Describe("Ensurer", func() { It("should not configure backup to etcd-main statefulset if backup profile is missing", func() { ss := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } cluster.Seed.Spec.Backup = nil @@ -187,7 +187,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -212,7 +212,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -223,7 +223,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -239,7 +239,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -266,7 +266,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -291,7 +291,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -335,7 +335,7 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet, annotations map[string]str ) c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", gcp.StorageProviderName, "shoot--test--sample--test-uid", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", gcp.StorageProviderName, "shoot--test--sample--test-uid", "test-repository:test-tag", nil, env, volumeMounts))) Expect(ss.Spec.Template.Spec.Volumes).To(ContainElement(etcdBackupSecretVolume)) @@ -343,14 +343,14 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet, annotations map[string]str func checkETCDMainStatefulSetWithoutBackup(ss *appsv1.StatefulSet, annotations map[string]string) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", "", "", "test-repository:test-tag", nil, nil, nil))) Expect(ss.Spec.Template.Annotations).To(BeNil()) } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDEvents, v1alpha1constants.StatefulSetNameETCDEvents, "0 */24 * * *", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDEvents, v1beta1constants.StatefulSetNameETCDEvents, "0 */24 * * *", "", "", "test-repository:test-tag", nil, nil, nil))) Expect(ss.Spec.Template.Spec.Volumes).To(BeEmpty()) } diff --git a/controllers/provider-gcp/pkg/webhook/controlplaneexposure/ensurer.go b/controllers/provider-gcp/pkg/webhook/controlplaneexposure/ensurer.go index b948f346e..e5a0f8726 100644 --- a/controllers/provider-gcp/pkg/webhook/controlplaneexposure/ensurer.go +++ b/controllers/provider-gcp/pkg/webhook/controlplaneexposure/ensurer.go @@ -21,7 +21,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "github.com/go-logr/logr" "github.com/pkg/errors" @@ -54,7 +54,7 @@ func (e *ensurer) InjectClient(client client.Client) error { // EnsureKubeAPIServerDeployment ensures that the kube-apiserver deployment conforms to the provider requirements. func (e *ensurer) EnsureKubeAPIServerDeployment(ctx context.Context, ectx genericmutator.EnsurerContext, dep *appsv1.Deployment) error { // Get load balancer address of the kube-apiserver service - address, err := kutil.GetLoadBalancerIngress(ctx, e.client, dep.Namespace, v1alpha1constants.DeploymentNameKubeAPIServer) + address, err := kutil.GetLoadBalancerIngress(ctx, e.client, dep.Namespace, v1beta1constants.DeploymentNameKubeAPIServer) if err != nil { return errors.Wrap(err, "could not get kube-apiserver service load balancer address") } @@ -82,7 +82,7 @@ func (e *ensurer) getVolumeClaimTemplate(name string) *corev1.PersistentVolumeCl volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { etcdStorage = *e.etcdStorage volumeClaimTemplateName = controlplane.EtcdMainVolumeClaimTemplateName } diff --git a/controllers/provider-gcp/pkg/webhook/controlplaneexposure/ensurer_test.go b/controllers/provider-gcp/pkg/webhook/controlplaneexposure/ensurer_test.go index 9f41d1143..be6710ad8 100644 --- a/controllers/provider-gcp/pkg/webhook/controlplaneexposure/ensurer_test.go +++ b/controllers/provider-gcp/pkg/webhook/controlplaneexposure/ensurer_test.go @@ -25,7 +25,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -58,9 +58,9 @@ var _ = Describe("Ensurer", func() { dummyContext = genericmutator.NewEnsurerContext(nil, nil) - svcKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer} + svcKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer} svc = &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Status: corev1.ServiceStatus{ LoadBalancer: corev1.LoadBalancerStatus{ Ingress: []corev1.LoadBalancerIngress{ @@ -83,7 +83,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -116,7 +116,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -152,7 +152,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -168,7 +168,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -199,7 +199,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -215,7 +215,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -259,8 +259,8 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet) { } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { - pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1alpha1constants.StatefulSetNameETCDEvents) - Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1alpha1constants.StatefulSetNameETCDEvents, nil, nil))) + pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1beta1constants.StatefulSetNameETCDEvents) + Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1beta1constants.StatefulSetNameETCDEvents, nil, nil))) } func clientGet(result runtime.Object) interface{} { diff --git a/controllers/provider-gcp/test/e2e/networkpolicies/networkpolicy_test.go b/controllers/provider-gcp/test/e2e/networkpolicies/networkpolicy_test.go index ff7b6cfba..fc80c784d 100644 --- a/controllers/provider-gcp/test/e2e/networkpolicies/networkpolicy_test.go +++ b/controllers/provider-gcp/test/e2e/networkpolicies/networkpolicy_test.go @@ -29,7 +29,7 @@ import ( "github.com/gardener/gardener-extensions/test/e2e/framework/executor" networkpolicies "github.com/gardener/gardener-extensions/test/e2e/framework/networkpolicies" - "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/logger" utilclient "github.com/gardener/gardener/pkg/utils/kubernetes/client" @@ -95,7 +95,7 @@ var _ = Describe("Network Policy Testing", func() { shootGardenerTest, err = gardenerframework.NewShootGardenerTest(*kubeconfig, nil, shootAppTestLogger) Expect(err).NotTo(HaveOccurred()) - shoot := &v1alpha1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} + shoot := &v1beta1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} shootTestOperations, err = gardenerframework.NewGardenTestOperationWithShoot(ctx, shootGardenerTest.GardenClient, shootAppTestLogger, shoot) Expect(err).NotTo(HaveOccurred()) } diff --git a/controllers/provider-openstack/docs/usage-as-end-user.md b/controllers/provider-openstack/docs/usage-as-end-user.md index 7909db7cd..cdbdb46e3 100644 --- a/controllers/provider-openstack/docs/usage-as-end-user.md +++ b/controllers/provider-openstack/docs/usage-as-end-user.md @@ -1,6 +1,6 @@ # Using the OpenStack provider extension with Gardener as end-user -The [`core.gardener.cloud/v1alpha1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. +The [`core.gardener.cloud/v1beta1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. In this document we are describing how this configuration looks like for OpenStack and provide an example `Shoot` manifest with minimal configuration that you can use to create an OpenStack cluster (modulo the landscape-specific information like cloud profile names, secret binding names, etc.). diff --git a/controllers/provider-openstack/pkg/apis/openstack/validation/controlplane.go b/controllers/provider-openstack/pkg/apis/openstack/validation/controlplane.go index 428dc15b8..289548968 100644 --- a/controllers/provider-openstack/pkg/apis/openstack/validation/controlplane.go +++ b/controllers/provider-openstack/pkg/apis/openstack/validation/controlplane.go @@ -17,13 +17,13 @@ package validation import ( apisopenstack "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" apivalidation "k8s.io/apimachinery/pkg/api/validation" "k8s.io/apimachinery/pkg/util/validation/field" ) // ValidateControlPlaneConfig validates a ControlPlaneConfig object. -func ValidateControlPlaneConfig(controlPlaneConfig *apisopenstack.ControlPlaneConfig, region string, regions []gardencorev1alpha1.Region, constraints apisopenstack.Constraints) field.ErrorList { +func ValidateControlPlaneConfig(controlPlaneConfig *apisopenstack.ControlPlaneConfig, region string, regions []gardencorev1beta1.Region, constraints apisopenstack.Constraints) field.ErrorList { allErrs := field.ErrorList{} if len(controlPlaneConfig.LoadBalancerProvider) == 0 { @@ -42,7 +42,7 @@ func ValidateControlPlaneConfig(controlPlaneConfig *apisopenstack.ControlPlaneCo } // ValidateControlPlaneConfigUpdate validates a ControlPlaneConfig object. -func ValidateControlPlaneConfigUpdate(oldConfig, newConfig *apisopenstack.ControlPlaneConfig, region string, regions []gardencorev1alpha1.Region, constraints apisopenstack.Constraints) field.ErrorList { +func ValidateControlPlaneConfigUpdate(oldConfig, newConfig *apisopenstack.ControlPlaneConfig, region string, regions []gardencorev1beta1.Region, constraints apisopenstack.Constraints) field.ErrorList { allErrs := field.ErrorList{} allErrs = append(allErrs, apivalidation.ValidateImmutableField(newConfig.Zone, oldConfig.Zone, field.NewPath("zone"))...) @@ -67,7 +67,7 @@ func validateLoadBalancerProviderConstraints(providers []apisopenstack.LoadBalan return false, validValues } -func validateZoneConstraints(regions []gardencorev1alpha1.Region, region, zone, oldZone string) (bool, []string) { +func validateZoneConstraints(regions []gardencorev1beta1.Region, region, zone, oldZone string) (bool, []string) { if zone == oldZone { return true, nil } diff --git a/controllers/provider-openstack/pkg/apis/openstack/validation/controlplane_test.go b/controllers/provider-openstack/pkg/apis/openstack/validation/controlplane_test.go index ccdeeed3e..6d46b449c 100644 --- a/controllers/provider-openstack/pkg/apis/openstack/validation/controlplane_test.go +++ b/controllers/provider-openstack/pkg/apis/openstack/validation/controlplane_test.go @@ -18,7 +18,7 @@ import ( apisopenstack "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack" . "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack/validation" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" @@ -31,10 +31,10 @@ var _ = Describe("ControlPlaneConfig validation", func() { zone = "some-zone" lbProvider1 = "foo" - regions = []gardencorev1alpha1.Region{ + regions = []gardencorev1beta1.Region{ { Name: region, - Zones: []gardencorev1alpha1.AvailabilityZone{ + Zones: []gardencorev1beta1.AvailabilityZone{ {Name: zone}, }, }, diff --git a/controllers/provider-openstack/pkg/controller/controlplane/valuesprovider.go b/controllers/provider-openstack/pkg/controller/controlplane/valuesprovider.go index fbc547e8d..f151da152 100644 --- a/controllers/provider-openstack/pkg/controller/controlplane/valuesprovider.go +++ b/controllers/provider-openstack/pkg/controller/controlplane/valuesprovider.go @@ -28,7 +28,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller/controlplane/genericactuator" "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/gardener/gardener/pkg/utils/chart" "github.com/gardener/gardener/pkg/utils/secrets" @@ -51,8 +51,8 @@ const ( var controlPlaneSecrets = &secrets.Secrets{ CertificateSecretConfigs: map[string]*secrets.CertificateSecretConfig{ - v1alpha1constants.SecretNameCACluster: { - Name: v1alpha1constants.SecretNameCACluster, + v1beta1constants.SecretNameCACluster: { + Name: v1beta1constants.SecretNameCACluster, CommonName: "kubernetes", CertType: secrets.CACert, }, @@ -65,11 +65,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:cloud-controller-manager", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, &secrets.ControlPlaneSecretConfig{ @@ -78,7 +78,7 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: cloudControllerManagerDeploymentName, DNSNames: controlplane.DNSNamesForService(cloudControllerManagerDeploymentName, clusterName), CertType: secrets.ServerCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, }, } @@ -326,7 +326,7 @@ func getCCMChartValues( "podAnnotations": map[string]interface{}{ "checksum/secret-cloud-controller-manager": checksums[cloudControllerManagerDeploymentName], "checksum/secret-cloud-controller-manager-server": checksums[cloudControllerManagerServerName], - "checksum/secret-cloudprovider": checksums[v1alpha1constants.SecretNameCloudProvider], + "checksum/secret-cloudprovider": checksums[v1beta1constants.SecretNameCloudProvider], "checksum/configmap-cloud-provider-config-cloud-controller-manager": checksums[openstacktypes.CloudProviderConfigCloudControllerManagerName], }, } diff --git a/controllers/provider-openstack/pkg/controller/controlplane/valuesprovider_test.go b/controllers/provider-openstack/pkg/controller/controlplane/valuesprovider_test.go index 1abf3500f..cf2a2949a 100644 --- a/controllers/provider-openstack/pkg/controller/controlplane/valuesprovider_test.go +++ b/controllers/provider-openstack/pkg/controller/controlplane/valuesprovider_test.go @@ -24,8 +24,8 @@ import ( mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -66,7 +66,7 @@ func controlPlane(floatingPoolID string, cfg *openstack.ControlPlaneConfig) *ext }, Spec: extensionsv1alpha1.ControlPlaneSpec{ SecretRef: corev1.SecretReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, ProviderConfig: &runtime.RawExtension{ @@ -109,31 +109,31 @@ var _ = Describe("ValuesProvider", func() { } cloudProfileConfigJSON, _ = json.Marshal(cloudProfileConfig) cluster = &extensionscontroller.Cluster{ - CloudProfile: &gardencorev1alpha1.CloudProfile{ - Spec: gardencorev1alpha1.CloudProfileSpec{ - ProviderConfig: &gardencorev1alpha1.ProviderConfig{ + CloudProfile: &gardencorev1beta1.CloudProfile{ + Spec: gardencorev1beta1.CloudProfileSpec{ + ProviderConfig: &gardencorev1beta1.ProviderConfig{ RawExtension: runtime.RawExtension{ Raw: cloudProfileConfigJSON, }, }, }, }, - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &cidr, }, - Kubernetes: gardencorev1alpha1.Kubernetes{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, }, } - cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider} + cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider} cpSecret = &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, Type: corev1.SecretTypeOpaque, @@ -146,7 +146,7 @@ var _ = Describe("ValuesProvider", func() { } checksums = map[string]string{ - v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", "cloud-controller-manager-server": "6dff2a2e6f14444b66d8e4a351c049f7e89ee24ba3eaab95dbec40ba6bdebb52", openstacktypes.CloudProviderConfigCloudControllerManagerName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", diff --git a/controllers/provider-openstack/pkg/controller/worker/machines_test.go b/controllers/provider-openstack/pkg/controller/worker/machines_test.go index 659d64bc9..223a7a07b 100644 --- a/controllers/provider-openstack/pkg/controller/worker/machines_test.go +++ b/controllers/provider-openstack/pkg/controller/worker/machines_test.go @@ -30,7 +30,7 @@ import ( mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" mockkubernetes "github.com/gardener/gardener-extensions/pkg/mock/gardener/client/kubernetes" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" "github.com/golang/mock/gomock" @@ -187,24 +187,24 @@ var _ = Describe("Machines", func() { } cloudProfileConfigJSON, _ = json.Marshal(cloudProfileConfig) cluster = &extensionscontroller.Cluster{ - CloudProfile: &gardencorev1alpha1.CloudProfile{ + CloudProfile: &gardencorev1beta1.CloudProfile{ ObjectMeta: metav1.ObjectMeta{ Name: cloudProfileName, }, - Spec: gardencorev1alpha1.CloudProfileSpec{ - ProviderConfig: &gardencorev1alpha1.ProviderConfig{ + Spec: gardencorev1beta1.CloudProfileSpec{ + ProviderConfig: &gardencorev1beta1.ProviderConfig{ RawExtension: runtime.RawExtension{ Raw: cloudProfileConfigJSON, }, }, }, }, - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &podCIDR, }, - Kubernetes: gardencorev1alpha1.Kubernetes{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: shootVersion, }, }, diff --git a/controllers/provider-openstack/pkg/internal/infrastructure/terraform_test.go b/controllers/provider-openstack/pkg/internal/infrastructure/terraform_test.go index a635e37a1..dd06671a0 100644 --- a/controllers/provider-openstack/pkg/internal/infrastructure/terraform_test.go +++ b/controllers/provider-openstack/pkg/internal/infrastructure/terraform_test.go @@ -21,7 +21,7 @@ import ( "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/internal" "github.com/gardener/gardener-extensions/pkg/controller" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -80,18 +80,18 @@ var _ = Describe("Terraform", func() { } cloudProfileConfigJSON, _ = json.Marshal(cloudProfileConfig) cluster = &controller.Cluster{ - CloudProfile: &gardencorev1alpha1.CloudProfile{ - Spec: gardencorev1alpha1.CloudProfileSpec{ - ProviderConfig: &gardencorev1alpha1.ProviderConfig{ + CloudProfile: &gardencorev1beta1.CloudProfile{ + Spec: gardencorev1beta1.CloudProfileSpec{ + ProviderConfig: &gardencorev1beta1.ProviderConfig{ RawExtension: runtime.RawExtension{ Raw: cloudProfileConfigJSON, }, }, }, }, - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &podsCIDR, Services: &servicesCIDR, }, diff --git a/controllers/provider-openstack/pkg/internal/scheme.go b/controllers/provider-openstack/pkg/internal/scheme.go index eac050cb9..fec216e12 100644 --- a/controllers/provider-openstack/pkg/internal/scheme.go +++ b/controllers/provider-openstack/pkg/internal/scheme.go @@ -20,7 +20,7 @@ import ( "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack/install" openstackv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack/v1alpha1" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" @@ -57,7 +57,7 @@ func InfrastructureConfigFromInfrastructure(infra *extensionsv1alpha1.Infrastruc // CloudProfileConfigFromCloudProfile extracts the CloudProfileConfig from the // ProviderConfig section of the given CloudProfile. -func CloudProfileConfigFromCloudProfile(infra *gardencorev1alpha1.CloudProfile) (*openstackv1alpha1.CloudProfileConfig, error) { +func CloudProfileConfigFromCloudProfile(infra *gardencorev1beta1.CloudProfile) (*openstackv1alpha1.CloudProfileConfig, error) { config := &openstackv1alpha1.CloudProfileConfig{} if infra.Spec.ProviderConfig != nil && infra.Spec.ProviderConfig.Raw != nil { if _, _, err := decoder.Decode(infra.Spec.ProviderConfig.Raw, nil, config); err != nil { diff --git a/controllers/provider-openstack/pkg/webhook/controlplane/ensurer.go b/controllers/provider-openstack/pkg/webhook/controlplane/ensurer.go index 1badd5380..07bb5a5e7 100644 --- a/controllers/provider-openstack/pkg/webhook/controlplane/ensurer.go +++ b/controllers/provider-openstack/pkg/webhook/controlplane/ensurer.go @@ -21,7 +21,7 @@ import ( extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/coreos/go-systemd/unit" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" @@ -96,9 +96,9 @@ func ensureKubeControllerManagerCommandLineArgs(c *corev1.Container) { } func ensureKubeControllerManagerAnnotations(t *corev1.PodTemplateSpec) { - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToPublicNetworks, v1alpha1constants.LabelNetworkPolicyAllowed) - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToPrivateNetworks, v1alpha1constants.LabelNetworkPolicyAllowed) - t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1alpha1constants.LabelNetworkPolicyToBlockedCIDRs, v1alpha1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToPublicNetworks, v1beta1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToPrivateNetworks, v1beta1constants.LabelNetworkPolicyAllowed) + t.Labels = extensionswebhook.EnsureAnnotationOrLabel(t.Labels, v1beta1constants.LabelNetworkPolicyToBlockedCIDRs, v1beta1constants.LabelNetworkPolicyAllowed) } var ( diff --git a/controllers/provider-openstack/pkg/webhook/controlplane/ensurer_test.go b/controllers/provider-openstack/pkg/webhook/controlplane/ensurer_test.go index 61f1bb578..493835c40 100644 --- a/controllers/provider-openstack/pkg/webhook/controlplane/ensurer_test.go +++ b/controllers/provider-openstack/pkg/webhook/controlplane/ensurer_test.go @@ -26,7 +26,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/test" "github.com/coreos/go-systemd/unit" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -69,9 +69,9 @@ var _ = Describe("Ensurer", func() { } kubeControllerManagerLabels = map[string]string{ - v1alpha1constants.LabelNetworkPolicyToPublicNetworks: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToPrivateNetworks: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToBlockedCIDRs: v1alpha1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToPublicNetworks: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToPrivateNetworks: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToBlockedCIDRs: v1beta1constants.LabelNetworkPolicyAllowed, } ) @@ -87,7 +87,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -120,7 +120,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -161,7 +161,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -194,7 +194,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ diff --git a/controllers/provider-openstack/pkg/webhook/controlplanebackup/ensurer.go b/controllers/provider-openstack/pkg/webhook/controlplanebackup/ensurer.go index d87a1452b..89ceb08f5 100644 --- a/controllers/provider-openstack/pkg/webhook/controlplanebackup/ensurer.go +++ b/controllers/provider-openstack/pkg/webhook/controlplanebackup/ensurer.go @@ -23,7 +23,7 @@ import ( extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/operation/common" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/go-logr/logr" @@ -80,7 +80,7 @@ func (e *ensurer) ensureContainers(ps *corev1.PodSpec, name string, cluster *ext } func (e *ensurer) ensureChecksumAnnotations(ctx context.Context, template *corev1.PodTemplateSpec, namespace, name string, backupConfigured bool) error { - if name == v1alpha1constants.StatefulSetNameETCDMain && backupConfigured { + if name == v1beta1constants.StatefulSetNameETCDMain && backupConfigured { return controlplane.EnsureSecretChecksumAnnotation(ctx, template, e.client, namespace, openstack.BackupSecretName) } return nil @@ -102,7 +102,7 @@ func (e *ensurer) ensureBackupRestoreContainer(existingContainer *corev1.Contain env []corev1.EnvVar volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { if cluster.Seed.Spec.Backup == nil { e.logger.Info("Backup profile is not configured; backup will not be taken for etcd-main") } else { diff --git a/controllers/provider-openstack/pkg/webhook/controlplanebackup/ensurer_test.go b/controllers/provider-openstack/pkg/webhook/controlplanebackup/ensurer_test.go index 4739f41c6..6406d6bc0 100644 --- a/controllers/provider-openstack/pkg/webhook/controlplanebackup/ensurer_test.go +++ b/controllers/provider-openstack/pkg/webhook/controlplanebackup/ensurer_test.go @@ -27,8 +27,8 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -69,20 +69,20 @@ var _ = Describe("Ensurer", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, - Status: gardencorev1alpha1.ShootStatus{ + Status: gardencorev1beta1.ShootStatus{ TechnicalID: "shoot--test--sample", UID: types.UID("test-uid"), }, }, - Seed: &gardencorev1alpha1.Seed{ - Spec: gardencorev1alpha1.SeedSpec{ - Backup: &gardencorev1alpha1.SeedBackup{}, + Seed: &gardencorev1beta1.Seed{ + Spec: gardencorev1beta1.SeedSpec{ + Backup: &gardencorev1beta1.SeedBackup{}, }, }, } @@ -111,7 +111,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -133,7 +133,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -165,7 +165,7 @@ var _ = Describe("Ensurer", func() { It("should not configure backup to etcd-main statefulset if backup profile is missing", func() { ss := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } cluster.Seed.Spec.Backup = nil @@ -186,7 +186,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -211,7 +211,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -222,7 +222,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -238,7 +238,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -265,7 +265,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -290,7 +290,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -361,21 +361,21 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet, annotations map[string]str ) c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", openstack.StorageProviderName, "shoot--test--sample--test-uid", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", openstack.StorageProviderName, "shoot--test--sample--test-uid", "test-repository:test-tag", nil, env, nil))) Expect(ss.Spec.Template.Annotations).To(Equal(annotations)) } func checkETCDMainStatefulSetWithoutBackup(ss *appsv1.StatefulSet, annotations map[string]string) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "0 */24 * * *", "", "", "test-repository:test-tag", nil, nil, nil))) Expect(ss.Spec.Template.Annotations).To(BeNil()) } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDEvents, v1alpha1constants.StatefulSetNameETCDEvents, "0 */24 * * *", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDEvents, v1beta1constants.StatefulSetNameETCDEvents, "0 */24 * * *", "", "", "test-repository:test-tag", nil, nil, nil))) } diff --git a/controllers/provider-openstack/pkg/webhook/controlplaneexposure/ensurer.go b/controllers/provider-openstack/pkg/webhook/controlplaneexposure/ensurer.go index fcec1c801..39a411a5a 100644 --- a/controllers/provider-openstack/pkg/webhook/controlplaneexposure/ensurer.go +++ b/controllers/provider-openstack/pkg/webhook/controlplaneexposure/ensurer.go @@ -21,7 +21,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "github.com/go-logr/logr" "github.com/pkg/errors" @@ -54,7 +54,7 @@ func (e *ensurer) InjectClient(client client.Client) error { // EnsureKubeAPIServerDeployment ensures that the kube-apiserver deployment conforms to the provider requirements. func (e *ensurer) EnsureKubeAPIServerDeployment(ctx context.Context, ectx genericmutator.EnsurerContext, dep *appsv1.Deployment) error { // Get load balancer address of the kube-apiserver service - address, err := kutil.GetLoadBalancerIngress(ctx, e.client, dep.Namespace, v1alpha1constants.DeploymentNameKubeAPIServer) + address, err := kutil.GetLoadBalancerIngress(ctx, e.client, dep.Namespace, v1beta1constants.DeploymentNameKubeAPIServer) if err != nil { return errors.Wrap(err, "could not get kube-apiserver service load balancer address") } @@ -83,7 +83,7 @@ func (e *ensurer) getVolumeClaimTemplate(name string) *corev1.PersistentVolumeCl volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { etcdStorage = *e.etcdStorage volumeClaimTemplateName = controlplane.EtcdMainVolumeClaimTemplateName } diff --git a/controllers/provider-openstack/pkg/webhook/controlplaneexposure/ensurer_test.go b/controllers/provider-openstack/pkg/webhook/controlplaneexposure/ensurer_test.go index 6a19403bd..5fffbbe81 100644 --- a/controllers/provider-openstack/pkg/webhook/controlplaneexposure/ensurer_test.go +++ b/controllers/provider-openstack/pkg/webhook/controlplaneexposure/ensurer_test.go @@ -25,7 +25,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -58,9 +58,9 @@ var _ = Describe("Ensurer", func() { dummyContext = genericmutator.NewEnsurerContext(nil, nil) - svcKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer} + svcKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer} svc = &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Status: corev1.ServiceStatus{ LoadBalancer: corev1.LoadBalancerStatus{ Ingress: []corev1.LoadBalancerIngress{ @@ -83,7 +83,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -116,7 +116,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -152,7 +152,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -168,7 +168,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -199,7 +199,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -215,7 +215,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -260,8 +260,8 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet) { } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { - pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1alpha1constants.StatefulSetNameETCDEvents) - Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1alpha1constants.StatefulSetNameETCDEvents, nil, nil))) + pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1beta1constants.StatefulSetNameETCDEvents) + Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1beta1constants.StatefulSetNameETCDEvents, nil, nil))) } func clientGet(result runtime.Object) interface{} { diff --git a/controllers/provider-openstack/test/e2e/networkpolicies/networkpolicy_test.go b/controllers/provider-openstack/test/e2e/networkpolicies/networkpolicy_test.go index 7598da456..30afcf6c1 100644 --- a/controllers/provider-openstack/test/e2e/networkpolicies/networkpolicy_test.go +++ b/controllers/provider-openstack/test/e2e/networkpolicies/networkpolicy_test.go @@ -29,7 +29,7 @@ import ( "github.com/gardener/gardener-extensions/test/e2e/framework/executor" networkpolicies "github.com/gardener/gardener-extensions/test/e2e/framework/networkpolicies" - "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/logger" utilclient "github.com/gardener/gardener/pkg/utils/kubernetes/client" @@ -95,7 +95,7 @@ var _ = Describe("Network Policy Testing", func() { shootGardenerTest, err = gardenerframework.NewShootGardenerTest(*kubeconfig, nil, shootAppTestLogger) Expect(err).NotTo(HaveOccurred()) - shoot := &v1alpha1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} + shoot := &v1beta1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} shootTestOperations, err = gardenerframework.NewGardenTestOperationWithShoot(ctx, shootGardenerTest.GardenClient, shootAppTestLogger, shoot) Expect(err).NotTo(HaveOccurred()) } diff --git a/controllers/provider-packet/docs/usage-as-end-user.md b/controllers/provider-packet/docs/usage-as-end-user.md index 612f6a257..83f846269 100644 --- a/controllers/provider-packet/docs/usage-as-end-user.md +++ b/controllers/provider-packet/docs/usage-as-end-user.md @@ -1,6 +1,6 @@ # Using the Packet provider extension with Gardener as end-user -The [`core.gardener.cloud/v1alpha1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. +The [`core.gardener.cloud/v1beta1.Shoot` resource](https://github.com/gardener/gardener/blob/master/example/90-shoot.yaml) declares a few fields that are meant to contain provider-specific configuration. In this document we are describing how this configuration looks like for Packet and provide an example `Shoot` manifest with minimal configuration that you can use to create an Packet cluster (modulo the landscape-specific information like cloud profile names, secret binding names, etc.). diff --git a/controllers/provider-packet/pkg/controller/controlplane/valuesprovider.go b/controllers/provider-packet/pkg/controller/controlplane/valuesprovider.go index 3ca703217..05ca6efd7 100644 --- a/controllers/provider-packet/pkg/controller/controlplane/valuesprovider.go +++ b/controllers/provider-packet/pkg/controller/controlplane/valuesprovider.go @@ -25,7 +25,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller/controlplane/genericactuator" "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/gardener/gardener/pkg/utils/chart" "github.com/gardener/gardener/pkg/utils/secrets" @@ -43,8 +43,8 @@ import ( var controlPlaneSecrets = &secrets.Secrets{ CertificateSecretConfigs: map[string]*secrets.CertificateSecretConfig{ - v1alpha1constants.SecretNameCACluster: { - Name: v1alpha1constants.SecretNameCACluster, + v1beta1constants.SecretNameCACluster: { + Name: v1beta1constants.SecretNameCACluster, CommonName: "kubernetes", CertType: secrets.CACert, }, @@ -57,11 +57,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:cloud-controller-manager", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, &secrets.ControlPlaneSecretConfig{ @@ -70,11 +70,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:csi-attacher", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, &secrets.ControlPlaneSecretConfig{ @@ -83,11 +83,11 @@ var controlPlaneSecrets = &secrets.Secrets{ CommonName: "system:csi-provisioner", Organization: []string{user.SystemPrivilegedGroup}, CertType: secrets.ClientCert, - SigningCA: cas[v1alpha1constants.SecretNameCACluster], + SigningCA: cas[v1beta1constants.SecretNameCACluster], }, KubeConfigRequest: &secrets.KubeConfigRequest{ ClusterName: clusterName, - APIServerURL: v1alpha1constants.DeploymentNameKubeAPIServer, + APIServerURL: v1beta1constants.DeploymentNameKubeAPIServer, }, }, } @@ -254,7 +254,7 @@ func getControlPlaneChartValues( "podNetwork": extensionscontroller.GetPodNetwork(cluster), "podAnnotations": map[string]interface{}{ "checksum/secret-cloud-controller-manager": checksums[packet.CloudControllerManagerImageName], - "checksum/secret-cloudprovider": checksums[v1alpha1constants.SecretNameCloudProvider], + "checksum/secret-cloudprovider": checksums[v1beta1constants.SecretNameCloudProvider], }, }, "csi-packet": map[string]interface{}{ @@ -264,7 +264,7 @@ func getControlPlaneChartValues( "podAnnotations": map[string]interface{}{ "checksum/secret-csi-attacher": checksums[packet.CSIAttacherImageName], "checksum/secret-csi-provisioner": checksums[packet.CSIProvisionerImageName], - "checksum/secret-cloudprovider": checksums[v1alpha1constants.SecretNameCloudProvider], + "checksum/secret-cloudprovider": checksums[v1beta1constants.SecretNameCloudProvider], }, }, } diff --git a/controllers/provider-packet/pkg/controller/controlplane/valuesprovider_test.go b/controllers/provider-packet/pkg/controller/controlplane/valuesprovider_test.go index 1d1b6e920..3bba11227 100644 --- a/controllers/provider-packet/pkg/controller/controlplane/valuesprovider_test.go +++ b/controllers/provider-packet/pkg/controller/controlplane/valuesprovider_test.go @@ -23,8 +23,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -57,7 +57,7 @@ var _ = Describe("ValuesProvider", func() { Spec: extensionsv1alpha1.ControlPlaneSpec{ Region: "EWR1", SecretRef: corev1.SecretReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, ProviderConfig: &runtime.RawExtension{ @@ -71,22 +71,22 @@ var _ = Describe("ValuesProvider", func() { cidr = "10.250.0.0/19" cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &cidr, }, - Kubernetes: gardencorev1alpha1.Kubernetes{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, }, } - cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider} + cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider} cpSecret = &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace, }, Type: corev1.SecretTypeOpaque, @@ -97,10 +97,10 @@ var _ = Describe("ValuesProvider", func() { } checksums = map[string]string{ - v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", - "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", - "csi-attacher": "2da58ad61c401a2af779a909d22fb42eed93a1524cbfdab974ceedb413fcb914", - "csi-provisioner": "f75b42d40ab501428c383dfb2336cb1fc892bbee1fc1d739675171e4acc4d911", + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", + "csi-attacher": "2da58ad61c401a2af779a909d22fb42eed93a1524cbfdab974ceedb413fcb914", + "csi-provisioner": "f75b42d40ab501428c383dfb2336cb1fc892bbee1fc1d739675171e4acc4d911", } controlPlaneChartValues = map[string]interface{}{ diff --git a/controllers/provider-packet/pkg/controller/worker/machines_test.go b/controllers/provider-packet/pkg/controller/worker/machines_test.go index 822424c55..3346de309 100644 --- a/controllers/provider-packet/pkg/controller/worker/machines_test.go +++ b/controllers/provider-packet/pkg/controller/worker/machines_test.go @@ -30,7 +30,7 @@ import ( mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" mockkubernetes "github.com/gardener/gardener-extensions/pkg/mock/gardener/client/kubernetes" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" "github.com/golang/mock/gomock" @@ -162,9 +162,9 @@ var _ = Describe("Machines", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: shootVersion, }, }, diff --git a/controllers/provider-packet/pkg/webhook/controlplane/ensurer.go b/controllers/provider-packet/pkg/webhook/controlplane/ensurer.go index 736fe16eb..a3f66ab0b 100644 --- a/controllers/provider-packet/pkg/webhook/controlplane/ensurer.go +++ b/controllers/provider-packet/pkg/webhook/controlplane/ensurer.go @@ -22,7 +22,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" "github.com/coreos/go-systemd/unit" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -56,7 +56,7 @@ func (e *ensurer) EnsureKubeAPIServerDeployment(ctx context.Context, ectx generi ensureKubeAPIServerCommandLineArgs(c) ensureEnvVars(c) } - return controlplane.EnsureSecretChecksumAnnotation(ctx, &dep.Spec.Template, e.client, dep.Namespace, v1alpha1constants.SecretNameCloudProvider) + return controlplane.EnsureSecretChecksumAnnotation(ctx, &dep.Spec.Template, e.client, dep.Namespace, v1beta1constants.SecretNameCloudProvider) } // EnsureKubeControllerManagerDeployment ensures that the kube-controller-manager deployment conforms to the provider requirements. @@ -103,7 +103,7 @@ var ( SecretKeyRef: &corev1.SecretKeySelector{ Key: packet.APIToken, LocalObjectReference: corev1.LocalObjectReference{ - Name: v1alpha1constants.SecretNameCloudProvider, + Name: v1beta1constants.SecretNameCloudProvider, }, }, }, diff --git a/controllers/provider-packet/pkg/webhook/controlplane/ensurer_test.go b/controllers/provider-packet/pkg/webhook/controlplane/ensurer_test.go index f2715d619..e68ed143b 100644 --- a/controllers/provider-packet/pkg/webhook/controlplane/ensurer_test.go +++ b/controllers/provider-packet/pkg/webhook/controlplane/ensurer_test.go @@ -24,7 +24,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/test" "github.com/coreos/go-systemd/unit" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -52,14 +52,14 @@ var _ = Describe("Ensurer", func() { dummyContext = genericmutator.NewEnsurerContext(nil, nil) - secretKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider} + secretKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider} secret = &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider}, Data: map[string][]byte{"foo": []byte("bar")}, } annotations = map[string]string{ - "checksum/secret-" + v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + "checksum/secret-" + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", } ) @@ -75,7 +75,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -108,7 +108,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -151,7 +151,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -178,7 +178,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeControllerManager}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ diff --git a/controllers/provider-packet/pkg/webhook/controlplanebackup/ensurer.go b/controllers/provider-packet/pkg/webhook/controlplanebackup/ensurer.go index f38837325..5420fa768 100644 --- a/controllers/provider-packet/pkg/webhook/controlplanebackup/ensurer.go +++ b/controllers/provider-packet/pkg/webhook/controlplanebackup/ensurer.go @@ -22,7 +22,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/go-logr/logr" "github.com/pkg/errors" @@ -75,7 +75,7 @@ func (e *ensurer) getBackupRestoreContainer(name string, cluster *extensionscont var ( volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { volumeClaimTemplateName = controlplane.EtcdMainVolumeClaimTemplateName } diff --git a/controllers/provider-packet/pkg/webhook/controlplanebackup/ensurer_test.go b/controllers/provider-packet/pkg/webhook/controlplanebackup/ensurer_test.go index 94aa03f15..1761b1c59 100644 --- a/controllers/provider-packet/pkg/webhook/controlplanebackup/ensurer_test.go +++ b/controllers/provider-packet/pkg/webhook/controlplanebackup/ensurer_test.go @@ -25,8 +25,8 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -59,9 +59,9 @@ var _ = Describe("Ensurer", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.13.4", }, }, @@ -82,7 +82,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -98,7 +98,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -125,7 +125,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -145,7 +145,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -156,7 +156,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -172,7 +172,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -199,7 +199,7 @@ var _ = Describe("Ensurer", func() { It("should not modify elements to same etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -219,7 +219,7 @@ var _ = Describe("Ensurer", func() { // Re-ensure on new statefulset request newSS := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: v1beta1constants.StatefulSetNameETCDEvents}, } err = ensurer.EnsureETCDStatefulSet(context.TODO(), dummyContext, newSS) @@ -231,13 +231,13 @@ var _ = Describe("Ensurer", func() { func checkETCDMainStatefulSet(ss *appsv1.StatefulSet, annotations map[string]string) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDMain, controlplane.EtcdMainVolumeClaimTemplateName, "", "", "", "test-repository:test-tag", nil, nil, nil))) Expect(ss.Spec.Template.Annotations).To(Equal(annotations)) } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { c := extensionswebhook.ContainerWithName(ss.Spec.Template.Spec.Containers, "backup-restore") - Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1alpha1constants.StatefulSetNameETCDEvents, v1alpha1constants.StatefulSetNameETCDEvents, "", "", "", + Expect(c).To(Equal(controlplane.GetBackupRestoreContainer(v1beta1constants.StatefulSetNameETCDEvents, v1beta1constants.StatefulSetNameETCDEvents, "", "", "", "test-repository:test-tag", nil, nil, nil))) } diff --git a/controllers/provider-packet/pkg/webhook/controlplaneexposure/ensurer.go b/controllers/provider-packet/pkg/webhook/controlplaneexposure/ensurer.go index 542cbb003..e9d3c4335 100644 --- a/controllers/provider-packet/pkg/webhook/controlplaneexposure/ensurer.go +++ b/controllers/provider-packet/pkg/webhook/controlplaneexposure/ensurer.go @@ -21,7 +21,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -58,7 +58,7 @@ func (e *ensurer) getVolumeClaimTemplate(name string) *corev1.PersistentVolumeCl volumeClaimTemplateName = name ) - if name == v1alpha1constants.StatefulSetNameETCDMain { + if name == v1beta1constants.StatefulSetNameETCDMain { etcdStorage = *e.etcdStorage volumeClaimTemplateName = controlplane.EtcdMainVolumeClaimTemplateName } diff --git a/controllers/provider-packet/pkg/webhook/controlplaneexposure/ensurer_test.go b/controllers/provider-packet/pkg/webhook/controlplaneexposure/ensurer_test.go index 6371c6575..7179cf278 100644 --- a/controllers/provider-packet/pkg/webhook/controlplaneexposure/ensurer_test.go +++ b/controllers/provider-packet/pkg/webhook/controlplaneexposure/ensurer_test.go @@ -24,7 +24,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -67,7 +67,7 @@ var _ = Describe("Ensurer", func() { It("should add missing elements to kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -94,7 +94,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer, Namespace: namespace}, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -124,7 +124,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, } ) @@ -140,7 +140,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-main statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -171,7 +171,7 @@ var _ = Describe("Ensurer", func() { It("should add or modify elements to etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, } ) @@ -187,7 +187,7 @@ var _ = Describe("Ensurer", func() { It("should modify existing elements of etcd-events statefulset", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents}, Spec: appsv1.StatefulSetSpec{ VolumeClaimTemplates: []corev1.PersistentVolumeClaim{ { @@ -230,6 +230,6 @@ func checkETCDMainStatefulSet(ss *appsv1.StatefulSet) { } func checkETCDEventsStatefulSet(ss *appsv1.StatefulSet) { - pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1alpha1constants.StatefulSetNameETCDEvents) - Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1alpha1constants.StatefulSetNameETCDEvents, nil, nil))) + pvc := extensionswebhook.PVCWithName(ss.Spec.VolumeClaimTemplates, v1beta1constants.StatefulSetNameETCDEvents) + Expect(pvc).To(Equal(controlplane.GetETCDVolumeClaimTemplate(v1beta1constants.StatefulSetNameETCDEvents, nil, nil))) } diff --git a/go.mod b/go.mod index 3f129d92b..e215593b6 100644 --- a/go.mod +++ b/go.mod @@ -13,11 +13,10 @@ require ( github.com/aliyun/aliyun-oss-go-sdk v2.0.1+incompatible github.com/aws/aws-sdk-go v1.21.10 github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f - github.com/gardener/gardener v0.0.0-20191127162005-7672763b3716 - github.com/gardener/gardener-resource-manager v0.0.0-20191025075317-09173887c1a7 - github.com/gardener/machine-controller-manager v0.0.0-20191118095523-e30355bc7945 + github.com/gardener/gardener v0.33.1-0.20191217084546-948979065a54 + github.com/gardener/gardener-resource-manager v0.8.1 + github.com/gardener/machine-controller-manager v0.25.0 github.com/go-logr/logr v0.1.0 - github.com/go-logr/zapr v0.1.1 github.com/gobuffalo/packr v1.25.0 github.com/gobuffalo/packr/v2 v2.1.0 github.com/golang/mock v1.3.1 diff --git a/go.sum b/go.sum index 139d5ee99..87bd1edae 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.1 h1:2kHhTjz+eKEI7tt3Fqf5j3APCq+z9tuY2CzeCIxTo+A= cloud.google.com/go v0.37.1/go.mod h1:SAbnLi6YTSPKSI0dTUEOVLCkyPfKXK8n4ibqiMoj4ok= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.43.0 h1:banaiRPAM8kUVYneOSkhgcDsLzEvL25FinuiSZaH/2w= cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= contrib.go.opencensus.io/exporter/ocagent v0.2.0/go.mod h1:0fnkYHF+ORKj7HWzOExKkUHeFX79gXSKUQbpnAM+wzo= contrib.go.opencensus.io/exporter/ocagent v0.4.6/go.mod h1:YuG83h+XWwqWjvCqn7vK4KSyLKhThY3+gNGQ37iS2V0= -contrib.go.opencensus.io/exporter/ocagent v0.4.10 h1:Trr4zF3bbDxrde1svPSW0PkGwCzoHY7f3JL8g5Gl+hM= contrib.go.opencensus.io/exporter/ocagent v0.4.10/go.mod h1:ueLzZcP7LPhPulEBukGn4aLh7Mx9YJwpVJ9nL2FYltw= contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= @@ -28,7 +26,6 @@ github.com/Azure/go-autorest v12.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.2.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= -github.com/Azure/go-autorest/autorest/adal v0.4.0 h1:e4yveyEm5WvJDtmxJCY8fW1d3MY7vlQw/dVgL7kEmAg= github.com/Azure/go-autorest/autorest/adal v0.4.0/go.mod h1:n1iM1u+ZMYni6IIY+FB82IT/DbSdC3T3gO1qFQ/3jEw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.6.0 h1:UCTq22yE3RPgbU/8u4scfnnzuCW6pwQ9n+uBtV78ouo= @@ -53,7 +50,6 @@ github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRY github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= -github.com/Azure/go-autorest/tracing v0.4.0 h1:r5D+n0u8XGFQIpIYk0xlKLDgiArnnIsfUjWANW5Wto0= github.com/Azure/go-autorest/tracing v0.4.0/go.mod h1:sVZ/n8H0f4naUjHNvSe2qjNiC3oV6+8CCqU9mhEvav8= github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= @@ -64,9 +60,7 @@ github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RP github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v0.0.0-20190301161902-9f8fceff796f h1:lGvI8+dm9Y/Qr6BfsbmjAz3iC3iq9+vUQLSKCDROE6s= github.com/Masterminds/sprig v0.0.0-20190301161902-9f8fceff796f/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig v2.20.0+incompatible h1:dJTKKuUkYW3RMFdQFXPU/s6hg10RgctmTjRcbZ98Ap8= github.com/Masterminds/sprig v2.20.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= @@ -94,7 +88,6 @@ github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 h1:Kn3rqvbUFqSepE2OqVu0Pn1CbDw9IuMlONapol0zuwk= github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30/go.mod h1:4AJxUpXUhv4N+ziTvIcWWXgeorXpxPZOfk9HdEVr96M= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aws/aws-sdk-go v1.12.79 h1:vVHvlFso5qhjZrp6z03WGoMwq9QFLOk7WY3Hf653l5I= github.com/aws/aws-sdk-go v1.12.79/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k= github.com/aws/aws-sdk-go v1.13.54/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k= github.com/aws/aws-sdk-go v1.21.10 h1:lTRdgyxraKbnNhx7kWeoW/Uow1TKnSNDpQGTtEXJQgk= @@ -110,7 +103,6 @@ github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBT github.com/census-instrumentation/opencensus-proto v0.0.2-0.20180913191712-f303ae3f8d6a/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.0.3-0.20181214143942-ba49f56771b8/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.1.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= @@ -120,7 +112,6 @@ github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8Nz github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -146,13 +137,10 @@ github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdf github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/elazarl/goproxy v0.0.0-20190703090003-6125c262ffb0 h1:ZMEV8o5EYDSweKafp0aPe65/raLEZ7CF9ab9UDMaIMk= github.com/elazarl/goproxy v0.0.0-20190703090003-6125c262ffb0/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy v0.0.0-20190711103511-473e67f1d7d2 h1:aZtFdDNWY/yH86JPR2WX/PN63635VsE/f/nXNPAbYxY= github.com/elazarl/goproxy v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 h1:pEtiCjIXx3RvGjlUJuCNxNOw0MNblyR9Wi+vJGBFh+8= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= -github.com/elazarl/goproxy/ext v0.0.0-20190703090003-6125c262ffb0 h1:ht1Fo9uxmemH6/Or11+OosQxf6UKeauPI6Ure8KVuWw= github.com/elazarl/goproxy/ext v0.0.0-20190703090003-6125c262ffb0/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= @@ -170,14 +158,11 @@ github.com/frankban/quicktest v1.5.0 h1:Tb4jWdSpdjKzTUicPnY61PZxKbDoGa7ABbrReT3g github.com/frankban/quicktest v1.5.0/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gardener/controller-manager-library v0.0.0-20190418145731-83f4bac4b55f h1:GliE5Zx3sGDusPm5Yc/GlKCkPAsSAUVkkMOakKWmQwM= github.com/gardener/controller-manager-library v0.0.0-20190418145731-83f4bac4b55f/go.mod h1:v6cbldxmpL2fYBEB2lSnq3LSEPwIHus9En6iIhwNE1k= -github.com/gardener/controller-manager-library v0.0.0-20190715130150-315e86b01963 h1:LS0tMn5CGhZlSIcqTpPBKvaBwk1KhgaW+dlvZ425/i4= github.com/gardener/controller-manager-library v0.0.0-20190715130150-315e86b01963/go.mod h1:v6cbldxmpL2fYBEB2lSnq3LSEPwIHus9En6iIhwNE1k= -github.com/gardener/controller-manager-library v0.0.0-20190830161011-2626c078acef h1:JPpsEjL/YaI1SeB4auo18tfykegJl8ItAjpY4xVjLUo= github.com/gardener/controller-manager-library v0.0.0-20190830161011-2626c078acef/go.mod h1:v6cbldxmpL2fYBEB2lSnq3LSEPwIHus9En6iIhwNE1k= -github.com/gardener/controller-manager-library v0.0.0-20191022090355-2f744b5822cc h1:9iqVa4Z+VfvAWuZFxdtAdznLPJk6+9k2R9zR7yiCmRE= -github.com/gardener/controller-manager-library v0.0.0-20191022090355-2f744b5822cc/go.mod h1:v6cbldxmpL2fYBEB2lSnq3LSEPwIHus9En6iIhwNE1k= +github.com/gardener/controller-manager-library v0.1.0 h1:jwPhyo8qe6X+5Zui/qOMVLF3xB3sHsT0jyLKqquN+IU= +github.com/gardener/controller-manager-library v0.1.0/go.mod h1:v6cbldxmpL2fYBEB2lSnq3LSEPwIHus9En6iIhwNE1k= github.com/gardener/etcd-backup-restore v0.0.0-20190807103447-4c8bc2972b60/go.mod h1:w55uXFfKnGZFpcfl18L1yFtd2ZhRt1NpA7bxkAAHeKg= github.com/gardener/external-dns-management v0.0.0-20190927090840-6659f5a46d13 h1:RBpQLA/TOYGfG0rpm4KC47WG2tUs4CIjUD8iWWw+VlM= github.com/gardener/external-dns-management v0.0.0-20190927090840-6659f5a46d13/go.mod h1:Y3om11E865x4aQ7cmcHjknb8RMgCO153huRb/SvP+9o= @@ -186,37 +171,34 @@ github.com/gardener/gardener v0.0.0-20190830053951-194cf8abb797/go.mod h1:UjyQiG github.com/gardener/gardener v0.0.0-20190913144920-5b4adb9f114d/go.mod h1:8LOLWzproKzfww5LdDo0/7FyVQR7gR1QA5LQc5buDzQ= github.com/gardener/gardener v0.0.0-20191004085047-5707d498b40c/go.mod h1:zvajWsteDY43oECil7ADr4NNp88CMltFEutUp1jX+zA= github.com/gardener/gardener v0.0.0-20191028054636-32cb0027c126/go.mod h1:Ow7vOXQYgQeHTRFn2HdbEIptelrSB5NLmVFIt2rgNeY= -github.com/gardener/gardener v0.0.0-20191127162005-7672763b3716 h1:kgId28oDm4L3YZBxLetHlSZxh5WtaGrqEbtbvLIDnlc= -github.com/gardener/gardener v0.0.0-20191127162005-7672763b3716/go.mod h1:1jloIC1rnp1/+tADocrCsCuPuZL0o5PfgWAu3DQ2w10= +github.com/gardener/gardener v0.33.1-0.20191217084546-948979065a54 h1:8qndSViHaSFr5sJ5AAMVc6hMWWnEFQTz9lcgDp+7A64= +github.com/gardener/gardener v0.33.1-0.20191217084546-948979065a54/go.mod h1:ABQbMpOczmL52FWopbCpzDFpzOg01Jasslez5PAiAqs= github.com/gardener/gardener-extensions v0.0.0-20190725050243-a80ef643c64b/go.mod h1:uXjtl3KeVdQXuGIP26+84wJY1Kwru67l0FXm7A5DiME= github.com/gardener/gardener-extensions v0.0.0-20190820050625-a15de8a82f6b/go.mod h1:q69+1cUGSfQ8gSMWzU7GFz/R8K8MpOLQBT2wJJcCjEA= github.com/gardener/gardener-extensions v0.0.0-20190906160200-5c329d46ae81/go.mod h1:OBUAbab8OMm8pvzr/1/cdwIQnQYuMoGDTNR2c+i9nYo= github.com/gardener/gardener-extensions v0.0.0-20191007140606-8fe857e58f6f/go.mod h1:/AwfFcWXgW9iNnKcrtWWdwMaQSS+jqlvTHFCm1Qh1A4= github.com/gardener/gardener-extensions v0.0.0-20191028142629-438a3dcf5eca/go.mod h1:+Rhnk/Jjn0pvWi2WWpSiSnlugHGfBikMvnJI7Y56fJY= github.com/gardener/gardener-resource-manager v0.0.0-20190802142246-6b2029430332/go.mod h1:kIPm1DlE5jChb4moAseumj1qr+IITKXPJcqyIKJp14Y= -github.com/gardener/gardener-resource-manager v0.0.0-20190802153254-ea0dc5872b6a h1:8JeTMvqNg9PhDsvSDPnNNpYx4inYbtAAxpL8BJlFHME= github.com/gardener/gardener-resource-manager v0.0.0-20190802153254-ea0dc5872b6a/go.mod h1:kIPm1DlE5jChb4moAseumj1qr+IITKXPJcqyIKJp14Y= -github.com/gardener/gardener-resource-manager v0.0.0-20190828115855-7ceeb3021993 h1:HoOo1rfm4n/T23886/Yj2yCVC81cVuXMbzdMo6PzTOs= github.com/gardener/gardener-resource-manager v0.0.0-20190828115855-7ceeb3021993/go.mod h1:l18ykpXeMDrrrtiA99YTdvZPW2TOaHIR/LrtbVELIiU= github.com/gardener/gardener-resource-manager v0.0.0-20191025075317-09173887c1a7 h1:4Ub4XEIe9wkLXTwyyXPbCB6NU5Vf2muug4Bo3+PdDNQ= github.com/gardener/gardener-resource-manager v0.0.0-20191025075317-09173887c1a7/go.mod h1:sx7C8db4Q/gyddvFPZ+vbfCZpXmsRMpsfgqwn42PpXg= -github.com/gardener/hvpa-controller v0.0.0-20190924063424-ef5c3668949d h1:PbaSklo24t3741UtA3R6z7TEY3WdhcMaOy/I0VFVHj4= +github.com/gardener/gardener-resource-manager v0.8.1 h1:2vDiN9oJkP9BbExcuST8PsvMrUKsCH8GFL6VMYHZQUA= +github.com/gardener/gardener-resource-manager v0.8.1/go.mod h1:e6ORXVT0tt/rKz4CZwC/AVMCpebY0pkWcYrmShhULRw= github.com/gardener/hvpa-controller v0.0.0-20190924063424-ef5c3668949d/go.mod h1:YUvzinEboe8b9FTflj+wGvXaZBHHhQTd+R9Vk581wIE= github.com/gardener/hvpa-controller v0.0.0-20191014062307-fad3bdf06a25 h1:nOFITmV7vt4fcYPEXgj66Qs83FdDEMvL/LQcR0diRRE= github.com/gardener/hvpa-controller v0.0.0-20191014062307-fad3bdf06a25/go.mod h1:yj7YJ6ijo4adcpXQKutPFZfQuKLdM5UMZZUlpbM3vig= github.com/gardener/machine-controller-manager v0.0.0-20190228095106-36a42c48af0a/go.mod h1:/ZDmMugbfkBfOO6/nrdnqV+OMSEuF75wrF9KFIuqndM= github.com/gardener/machine-controller-manager v0.0.0-20190606071036-119056ee3fdd h1:PrtJshi9rSN6V5w6FDFh9u1arfplk7ufxLKXFsasqzs= github.com/gardener/machine-controller-manager v0.0.0-20190606071036-119056ee3fdd/go.mod h1:/ZDmMugbfkBfOO6/nrdnqV+OMSEuF75wrF9KFIuqndM= -github.com/gardener/machine-controller-manager v0.0.0-20191118095523-e30355bc7945 h1:r8byoT/xXJ8plkoXRKVLXE+ztnnnqFek3gn2NUe+n2s= -github.com/gardener/machine-controller-manager v0.0.0-20191118095523-e30355bc7945/go.mod h1:anjeXFvK/AWZAhWT17qXFjt8SgZgbQaHbZIL7vf2lqo= +github.com/gardener/machine-controller-manager v0.25.0 h1:YM3IBp5sUAtC+ULwWxw4Pd/YwZtTTm+/hWvOyTkneXI= +github.com/gardener/machine-controller-manager v0.25.0/go.mod h1:aVUz5U39DEcQ3Jl/0bH28zfm0mV12OX9bqWf8V6mubQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-ini/ini v1.36.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-ini/ini v1.42.0 h1:TWr1wGj35+UiWHlBA8er89seFXxzwFn11spilrrj+38= github.com/go-ini/ini v1.42.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-ini/ini v1.44.0 h1:8+SRbfpRFlIunpSum4BEf1ClTtVjOgKzgBv9pHFkI6w= github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-ini/ini v1.46.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -271,15 +253,14 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 h1:u4bArs140e9+AfE52mFHOXVFnOSBJBRlzTHrOPLOIhE= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -329,12 +310,10 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.0 h1:CcQijm0XKekKjP/YCz28LXVSpgguuB+nCxaSjCe09y0= github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/gophercloud/gophercloud v0.0.0-20190212181753-892256c46858/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gophercloud/gophercloud v0.2.0 h1:lD2Bce2xBAMNNcFZ0dObTpXkGLlVIb33RPVUNVpw6ic= github.com/gophercloud/gophercloud v0.2.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.3.0 h1:6sjpKIpVwRIIwmcEGp+WwNovNsem+c+2vm6oxshRpL8= github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= @@ -357,13 +336,12 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.3 h1:O8JuYkaEesTVBN68o2pLhRGTfVXnGhKtx3qjOmQkJV0= github.com/grpc-ecosystem/grpc-gateway v1.9.3/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.11.3/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0 h1:j30noezaCfvNLcdMYSvHLv81DxYRSt1grlpseG67vhU= github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= @@ -434,7 +412,6 @@ github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149 h1:HfxbT6/JcvIljmERptWhwa8XzP7H3T+Z2N26gTsaDaA= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d h1:oNAwILwmgWKFpuU+dXvI6dl9jG2mAWAZLX3r9s0PPiw= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb h1:hXqqXzQtJbENrsb+rsIqkVqcg4FUJL0SQFGw08Dgivw= github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= @@ -485,7 +462,6 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v0.0.0-20190415111752-9419d2361c8a/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.3.0+incompatible h1:CZzRn4Ut9GbUkHlQ7jqBXeZQV41ZSKWFc302ZU6lUTk= github.com/pierrec/lz4 v2.3.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -499,7 +475,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -518,7 +493,6 @@ github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+ github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190412120340-e22ddced7142 h1:JO6VBMEDSBX/LT4GKwSdvuFigZNwVD4lkPyUE4BDCKE= github.com/prometheus/procfs v0.0.0-20190412120340-e22ddced7142/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -591,7 +565,6 @@ go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.17.0/go.mod h1:mp1VrMQxhlqqDpKvH4UcQUa4YwlzNmymAjPrDdfxNpI= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opencensus.io v0.19.1 h1:gPYKQ/GAQYR2ksU+qXNmq3CrOZWT1kkryvW6O0v1acY= go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -620,7 +593,6 @@ golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaE golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 h1:1wopBVtVdWnn03fZelqdXTqk7U7zPQCb+T4rbU9ZEoU= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -657,7 +629,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowK golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 h1:Ao/3l156eZf2AW5wK8a7/smtodRU+gha3+BeqJ69lRk= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -701,8 +672,8 @@ golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f h1:25KHgbfyiSm6vwQLbM3zZIe1v golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 h1:LepdCS8Gf/MVejFIt8lsiexZATdoGVyp5bcyS+rYoUI= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 h1:4y9KwBHBgBNwDbtu44R5o1fdOCQUEXhbk/P4A9WmJq0= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa h1:KIDDMLT1O0Nr7TSxp8xM5tJcdn8tgyAONntO829og1M= golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -736,7 +707,6 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 h1:QjA/9ArTfVTLfEhClDCG7SGrZkZixxWpwNCDiwJfh88= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c h1:KfpJVdWhuRqNk4XVXzjXf2KAV4TBEP77SYdFGjeGuIE= golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0 h1:Dh6fw+p6FyRl5x/FvNswO1ji0lIGzm3KP8Y9VkS9PTE= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -750,7 +720,6 @@ gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmK google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.2.0 h1:B5VXkdjt7K2Gm6fGBC9C9a1OAKJDT95cTqwet+2zib0= google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -776,7 +745,6 @@ google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610 h1:Ygq9/SRJX9+dU0WCIICM8RkWvDw03lvB77hrhJnpxfU= google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64 h1:iKtrH9Y8mcbADOP0YFaEMth7OfuHY9xHOwNj4znpM1A= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -789,8 +757,8 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0 h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.22.1 h1:/7cs52RnTJmD43s3uxzlq2U7nqVTd/37viQwMrMNlOM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -833,24 +801,21 @@ k8s.io/apiextensions-apiserver v0.0.0-20190315093550-53c4693659ed/go.mod h1:Ixke k8s.io/apimachinery v0.0.0-20190313205120-d7deff9243b1 h1:IS7K02iBkQXpCeieSiyJjGoLSdVOv2DbPaWHJ+ZtgKg= k8s.io/apimachinery v0.0.0-20190313205120-d7deff9243b1/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= k8s.io/apiserver v0.0.0-20181005205051-9f398e330d7f/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= -k8s.io/apiserver v0.0.0-20190313205120-8b27c41bdbb1 h1:8JYeBJdfXeNkq2RsG0hmvA4miGaN/3Y7bTt+vs2MnOE= k8s.io/apiserver v0.0.0-20190313205120-8b27c41bdbb1/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= k8s.io/apiserver v0.0.0-20191010014313-3893be10d307 h1:wg7tBmpN2vDhsSOAR61X3Qz9d5vftFqSDDuPJjm3dbI= k8s.io/apiserver v0.0.0-20191010014313-3893be10d307/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= -k8s.io/autoscaler v0.0.0-20190425094807-60ef58f770d8 h1:4gia+9az+ipWHMXI7brL4tkO3PNMgWgxmTDAE5gaoOA= k8s.io/autoscaler v0.0.0-20190425094807-60ef58f770d8/go.mod h1:QEXezc9uKPT91dwqhSJq3GNI3B1HxFRQHiku9kmrsSA= k8s.io/autoscaler v0.0.0-20190805135949-100e91ba756e h1:5AX59ZgftHpbmNupSWosdtW4q/rCnF4s/0J0dEfJkAQ= k8s.io/autoscaler v0.0.0-20190805135949-100e91ba756e/go.mod h1:QEXezc9uKPT91dwqhSJq3GNI3B1HxFRQHiku9kmrsSA= k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= k8s.io/cluster-bootstrap v0.0.0-20190314002537-50662da99b70/go.mod h1:iBSm2nwo3OaiuW8VDvc3ySDXK5SKfUrxwPvBloKG7zg= +k8s.io/cluster-bootstrap v0.0.0-20190816225014-88e17f53ad9d h1:AhNKa+4ZiwOLxzC+LJVaBP4fRj+IxzgzOun7pmhgyUs= k8s.io/cluster-bootstrap v0.0.0-20190816225014-88e17f53ad9d/go.mod h1:iBSm2nwo3OaiuW8VDvc3ySDXK5SKfUrxwPvBloKG7zg= k8s.io/code-generator v0.0.0-20180823001027-3dcf91f64f63/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= -k8s.io/code-generator v0.0.0-20190311093542-50b561225d70 h1:lgPp615xLHxN84RBd+viA/oHzJfI0miFYFH4T9wpPQ4= k8s.io/code-generator v0.0.0-20190311093542-50b561225d70/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= k8s.io/code-generator v0.0.0-20190713022532-93d7507fc8ff h1:1HU+c0C2+T9QpX3ngxtGQREWlaDnTRw6HuOdtYj231U= k8s.io/code-generator v0.0.0-20190713022532-93d7507fc8ff/go.mod h1:mdlckYc+qIcm9LO4wF2aMreloe3RdtmWtJWN0a5jC7w= -k8s.io/component-base v0.0.0-20190314000054-4a91899592f4 h1:XOA0webBnNMJ6WOYQT1LzYtpEopiFgNzFI/L53B3ZsE= k8s.io/component-base v0.0.0-20190314000054-4a91899592f4/go.mod h1:DMaomcf3j3MM2j1FsvlLVVlc7wA2jPytEur3cP9zRxQ= k8s.io/component-base v0.0.0-20190816222507-f3799749b6b7 h1:Vs/affBGj/GDM46bQfiKkEcVUrSxIaRf4IeGmLkIGIs= k8s.io/component-base v0.0.0-20190816222507-f3799749b6b7/go.mod h1:DMaomcf3j3MM2j1FsvlLVVlc7wA2jPytEur3cP9zRxQ= @@ -869,20 +834,17 @@ k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c= k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/kube-aggregator v0.0.0-20190314000639-da8327669ac5 h1:LcJk/XH8WmmNigvMH4uPJUgpukqYVFXIYM9WSEyPqj4= k8s.io/kube-aggregator v0.0.0-20190314000639-da8327669ac5/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= k8s.io/kube-aggregator v0.0.0-20191004104030-d9d5f0cc7532 h1:ot65OvVdFFN2I3/EjlA4TcaE1coPa2BmCMH6Vi3epb4= k8s.io/kube-aggregator v0.0.0-20191004104030-d9d5f0cc7532/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= k8s.io/kube-openapi v0.0.0-20180216212618-50ae88d24ede/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580 h1:fq0ZXW/BAIFZH+dazlups6JTVdwzRo5d9riFA103yuQ= k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190722073852-5e22f3d471e6 h1:s9IxTKe9GwDH0S/WaX62nFYr0or32DsTWex9AileL7U= k8s.io/kube-openapi v0.0.0-20190722073852-5e22f3d471e6/go.mod h1:RZvgC8MSN6DjiMV6oIfEE9pDL9CYXokkfaCKZeHm3nc= k8s.io/kubelet v0.0.0-20190314002251-f6da02f58325 h1:CpcomcirspBmVKf3SPNnTsp91tTOUIfyt211vFWvhYA= k8s.io/kubelet v0.0.0-20190314002251-f6da02f58325/go.mod h1:m6JOtVhjgs4GGnzhPpXuNF9VG+IjARwo/dHCNw4+QDA= -k8s.io/metrics v0.0.0-20190816224245-c61a0d549e17 h1:BkLrAzKI4Tu/1IFdBAYtOCnPFEE2xzscMSP0z7ftw08= k8s.io/metrics v0.0.0-20190816224245-c61a0d549e17/go.mod h1:a25VAbm3QT3xiVl1jtoF1ueAKQM149UdZ+L93ePfV3M= k8s.io/metrics v0.0.0-20191004105854-2e8cf7d0888c h1:qkfVb8PX30hnQXqRj6rxnMtd9GagB/e8r6E+bS651CU= k8s.io/metrics v0.0.0-20191004105854-2e8cf7d0888c/go.mod h1:a25VAbm3QT3xiVl1jtoF1ueAKQM149UdZ+L93ePfV3M= diff --git a/hack/check-generate.sh b/hack/check-generate.sh index a7010018f..1610ce4f9 100755 --- a/hack/check-generate.sh +++ b/hack/check-generate.sh @@ -13,8 +13,8 @@ # WITHOUT 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 -e +set -e DIRNAME="$(echo "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )")" source "$DIRNAME/common.sh" @@ -31,7 +31,7 @@ function delete-check-branch { function cleanup { if [[ "$generated" == true ]]; then - if ! clean_err="$("$DIRNAME/clean.sh" && git reset --hard -q && git clean -qdf)"; then + if ! clean_err="$(git reset --hard -q && git clean -qdf)"; then echo "Could not clean: $clean_err" fi fi @@ -87,10 +87,6 @@ if which git &>/dev/null; then git commit -q --allow-empty -m 'check-generate checkpoint' old_status="$(git status -s)" - if ! out=$("$DIRNAME/clean.sh" 2>&1); then - echo "Error during calling $DIRNAME/clean.sh: $out" - exit 1 - fi generated=true # We are using VERSIONFILE_VERSION since we want to check with respect to # the content of the source state. diff --git a/hack/common.sh b/hack/common.sh index d134db7ae..ced231cf2 100644 --- a/hack/common.sh +++ b/hack/common.sh @@ -44,7 +44,7 @@ function header_text { echo "$header$*$reset" } -SOURCE_TREES=(./pkg/... ./controllers/...) +SOURCE_TREES=(./controllers/... ./pkg/...) CMD_TREES=(./controllers/...) VERSIONFILE_VERSION="$(cat "$DIRNAME/../VERSION")" diff --git a/hack/generate.sh b/hack/generate.sh index 730be054c..d8507a6c3 100755 --- a/hack/generate.sh +++ b/hack/generate.sh @@ -21,4 +21,40 @@ source "$DIRNAME/common.sh" header_text "Generate" -GO111MODULE=on GOFLAGS="-mod=vendor" go generate "${SOURCE_TREES[@]}" +# Temporary trick avoiding the cyclic dependendies between gardener/gardener-extensions and +# gardener/gardener (for backwards compatibility g/g needs to know the extensions APIs, but +# the extensions need to know the gardener APIs as well). +# Will be removed in the future agian once the deprecated garden.sapcloud.io API group is removed. +( + export GO111MODULE=on + export GOFLAGS="-mod=vendor" + + for dir in "${SOURCE_TREES[@]}"; do + if [[ "$(basename "$dir")" != "..." ]]; then + go generate "$dir" + continue + fi + + found=( ) + while IFS= read -r a; do + if [[ -z "$a" ]]; then + continue + fi + + found=( "${found[@]}" "$a" ) + go generate "$a/..." + done <<< "$(find "$(dirname "$dir")" -type d | grep 'pkg/apis$')" + + find "$(dirname "$dir")" -type d | grep -v 'pkg/apis' | while IFS= read -r a; do + for f in "${found[@]}"; do + if [[ "${f##$a}" != "$f" ]]; then + continue 2 + fi + done + + if ls "$a"/*.go >/dev/null 2>&1; then + go generate "$a" + fi + done + done +) diff --git a/pkg/controller/backupbucket/reconciler.go b/pkg/controller/backupbucket/reconciler.go index b8fa69126..682bd6578 100644 --- a/pkg/controller/backupbucket/reconciler.go +++ b/pkg/controller/backupbucket/reconciler.go @@ -20,8 +20,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/go-logr/logr" @@ -99,7 +99,7 @@ func (r *reconciler) reconcile(ctx context.Context, bb *extensionsv1alpha1.Backu return reconcile.Result{}, err } - operationType := gardencorev1alpha1helper.ComputeOperationType(bb.ObjectMeta, bb.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(bb.ObjectMeta, bb.Status.LastOperation) if err := r.updateStatusProcessing(ctx, bb, operationType, "Reconciling the backupbucket"); err != nil { return reconcile.Result{}, err } @@ -144,7 +144,7 @@ func (r *reconciler) delete(ctx context.Context, bb *extensionsv1alpha1.BackupBu return reconcile.Result{}, nil } - operationType := gardencorev1alpha1helper.ComputeOperationType(bb.ObjectMeta, bb.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(bb.ObjectMeta, bb.Status.LastOperation) if err := r.updateStatusProcessing(ctx, bb, operationType, "Deleting the backupbucket"); err != nil { return reconcile.Result{}, err } @@ -185,22 +185,22 @@ func (r *reconciler) delete(ctx context.Context, bb *extensionsv1alpha1.BackupBu return reconcile.Result{}, nil } -func (r *reconciler) updateStatusProcessing(ctx context.Context, bb *extensionsv1alpha1.BackupBucket, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusProcessing(ctx context.Context, bb *extensionsv1alpha1.BackupBucket, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, bb, func() error { - bb.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1alpha1.LastOperationStateProcessing, 1, description) + bb.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1beta1.LastOperationStateProcessing, 1, description) return nil }) } -func (r *reconciler) updateStatusError(ctx context.Context, err error, bb *extensionsv1alpha1.BackupBucket, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusError(ctx context.Context, err error, bb *extensionsv1alpha1.BackupBucket, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, bb, func() error { bb.Status.ObservedGeneration = bb.Generation - bb.Status.LastOperation, bb.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1alpha1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1alpha1helper.ExtractErrorCodes(err)...) + bb.Status.LastOperation, bb.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1beta1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1beta1helper.ExtractErrorCodes(err)...) return nil }) } -func (r *reconciler) updateStatusSuccess(ctx context.Context, bb *extensionsv1alpha1.BackupBucket, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusSuccess(ctx context.Context, bb *extensionsv1alpha1.BackupBucket, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, bb, func() error { bb.Status.ObservedGeneration = bb.Generation bb.Status.LastOperation, bb.Status.LastError = extensionscontroller.ReconcileSucceeded(lastOperationType, description) diff --git a/pkg/controller/backupentry/mapper.go b/pkg/controller/backupentry/mapper.go index 76f00a8a9..af4987141 100644 --- a/pkg/controller/backupentry/mapper.go +++ b/pkg/controller/backupentry/mapper.go @@ -19,7 +19,7 @@ import ( extensionspredicate "github.com/gardener/gardener-extensions/pkg/predicate" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" @@ -89,7 +89,7 @@ func (m *namespaceToBackupEntryMapper) Map(obj handler.MapObject) []reconcile.Re return nil } - shootUID := namespace.Annotations[v1alpha1constants.DeprecatedShootUID] + shootUID := namespace.Annotations[v1beta1constants.DeprecatedShootUID] var requests []reconcile.Request for _, backupEntry := range backupEntryList.Items { if !extensionspredicate.EvalGeneric(&backupEntry, m.predicates...) { diff --git a/pkg/controller/backupentry/reconciler.go b/pkg/controller/backupentry/reconciler.go index 8bf6993cf..b62a7d557 100644 --- a/pkg/controller/backupentry/reconciler.go +++ b/pkg/controller/backupentry/reconciler.go @@ -20,8 +20,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/go-logr/logr" @@ -98,7 +98,7 @@ func (r *reconciler) reconcile(ctx context.Context, be *extensionsv1alpha1.Backu return reconcile.Result{}, err } - operationType := gardencorev1alpha1helper.ComputeOperationType(be.ObjectMeta, be.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(be.ObjectMeta, be.Status.LastOperation) if err := r.updateStatusProcessing(ctx, be, operationType, "Reconciling the backupentry"); err != nil { return reconcile.Result{}, err } @@ -143,7 +143,7 @@ func (r *reconciler) delete(ctx context.Context, be *extensionsv1alpha1.BackupEn return reconcile.Result{}, nil } - operationType := gardencorev1alpha1helper.ComputeOperationType(be.ObjectMeta, be.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(be.ObjectMeta, be.Status.LastOperation) if err := r.updateStatusProcessing(ctx, be, operationType, "Deleting the backupentry"); err != nil { return reconcile.Result{}, err } @@ -184,22 +184,22 @@ func (r *reconciler) delete(ctx context.Context, be *extensionsv1alpha1.BackupEn return reconcile.Result{}, nil } -func (r *reconciler) updateStatusProcessing(ctx context.Context, be *extensionsv1alpha1.BackupEntry, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusProcessing(ctx context.Context, be *extensionsv1alpha1.BackupEntry, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, be, func() error { - be.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1alpha1.LastOperationStateProcessing, 1, description) + be.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1beta1.LastOperationStateProcessing, 1, description) return nil }) } -func (r *reconciler) updateStatusError(ctx context.Context, err error, be *extensionsv1alpha1.BackupEntry, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusError(ctx context.Context, err error, be *extensionsv1alpha1.BackupEntry, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, be, func() error { be.Status.ObservedGeneration = be.Generation - be.Status.LastOperation, be.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1alpha1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1alpha1helper.ExtractErrorCodes(err)...) + be.Status.LastOperation, be.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1beta1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1beta1helper.ExtractErrorCodes(err)...) return nil }) } -func (r *reconciler) updateStatusSuccess(ctx context.Context, be *extensionsv1alpha1.BackupEntry, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusSuccess(ctx context.Context, be *extensionsv1alpha1.BackupEntry, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, be, func() error { be.Status.ObservedGeneration = be.Generation be.Status.LastOperation, be.Status.LastError = extensionscontroller.ReconcileSucceeded(lastOperationType, description) diff --git a/pkg/controller/cluster.go b/pkg/controller/cluster.go index 1396702d8..aaba83638 100644 --- a/pkg/controller/cluster.go +++ b/pkg/controller/cluster.go @@ -17,19 +17,28 @@ package controller import ( "context" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencoreinstall "github.com/gardener/gardener/pkg/apis/core/install" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" + "github.com/gardener/gardener/pkg/apis/garden" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" "sigs.k8s.io/controller-runtime/pkg/client" ) +var gardenscheme *runtime.Scheme + +func init() { + gardenscheme = runtime.NewScheme() + gardencoreinstall.Install(gardenscheme) +} + // Cluster contains the decoded resources of Gardener's extension Cluster resource. type Cluster struct { - CloudProfile *gardencorev1alpha1.CloudProfile - Seed *gardencorev1alpha1.Seed - Shoot *gardencorev1alpha1.Shoot + CloudProfile *gardencorev1beta1.CloudProfile + Seed *gardencorev1beta1.Seed + Shoot *gardencorev1beta1.Shoot } // GetCluster tries to read Gardener's Cluster extension resource in the given namespace. @@ -61,13 +70,19 @@ func GetCluster(ctx context.Context, c client.Client, namespace string) (*Cluste } // CloudProfileFromCluster returns the CloudProfile resource inside the Cluster resource. -func CloudProfileFromCluster(decoder runtime.Decoder, cluster *extensionsv1alpha1.Cluster) (*gardencorev1alpha1.CloudProfile, error) { - cloudProfile := &gardencorev1alpha1.CloudProfile{} +func CloudProfileFromCluster(decoder runtime.Decoder, cluster *extensionsv1alpha1.Cluster) (*gardencorev1beta1.CloudProfile, error) { + var ( + cloudProfileInternal = &garden.CloudProfile{} + cloudProfile = &gardencorev1beta1.CloudProfile{} + ) if cluster.Spec.CloudProfile.Raw == nil { return nil, nil } - if _, _, err := decoder.Decode(cluster.Spec.CloudProfile.Raw, nil, cloudProfile); err != nil { + if _, _, err := decoder.Decode(cluster.Spec.CloudProfile.Raw, nil, cloudProfileInternal); err != nil { + return nil, err + } + if err := gardenscheme.Convert(cloudProfileInternal, cloudProfile, nil); err != nil { return nil, err } @@ -75,13 +90,19 @@ func CloudProfileFromCluster(decoder runtime.Decoder, cluster *extensionsv1alpha } // SeedFromCluster returns the Seed resource inside the Cluster resource. -func SeedFromCluster(decoder runtime.Decoder, cluster *extensionsv1alpha1.Cluster) (*gardencorev1alpha1.Seed, error) { - seed := &gardencorev1alpha1.Seed{} +func SeedFromCluster(decoder runtime.Decoder, cluster *extensionsv1alpha1.Cluster) (*gardencorev1beta1.Seed, error) { + var ( + seedInternal = &garden.Seed{} + seed = &gardencorev1beta1.Seed{} + ) if cluster.Spec.Seed.Raw == nil { return nil, nil } - if _, _, err := decoder.Decode(cluster.Spec.Seed.Raw, nil, seed); err != nil { + if _, _, err := decoder.Decode(cluster.Spec.Seed.Raw, nil, seedInternal); err != nil { + return nil, err + } + if err := gardenscheme.Convert(seedInternal, seed, nil); err != nil { return nil, err } @@ -89,13 +110,19 @@ func SeedFromCluster(decoder runtime.Decoder, cluster *extensionsv1alpha1.Cluste } // ShootFromCluster returns the Shoot resource inside the Cluster resource. -func ShootFromCluster(decoder runtime.Decoder, cluster *extensionsv1alpha1.Cluster) (*gardencorev1alpha1.Shoot, error) { - shoot := &gardencorev1alpha1.Shoot{} +func ShootFromCluster(decoder runtime.Decoder, cluster *extensionsv1alpha1.Cluster) (*gardencorev1beta1.Shoot, error) { + var ( + shootInternal = &garden.Shoot{} + shoot = &gardencorev1beta1.Shoot{} + ) if cluster.Spec.Shoot.Raw == nil { return nil, nil } - if _, _, err := decoder.Decode(cluster.Spec.Shoot.Raw, nil, shoot); err != nil { + if _, _, err := decoder.Decode(cluster.Spec.Shoot.Raw, nil, shootInternal); err != nil { + return nil, err + } + if err := gardenscheme.Convert(shootInternal, shoot, nil); err != nil { return nil, err } @@ -104,9 +131,5 @@ func ShootFromCluster(decoder runtime.Decoder, cluster *extensionsv1alpha1.Clust // NewGardenDecoder returns a new Garden API decoder. func NewGardenDecoder() (runtime.Decoder, error) { - scheme := runtime.NewScheme() - if err := gardencorev1alpha1.AddToScheme(scheme); err != nil { - return nil, err - } - return serializer.NewCodecFactory(scheme).UniversalDecoder(), nil + return serializer.NewCodecFactory(gardenscheme).UniversalDecoder(), nil } diff --git a/pkg/controller/controlplane/genericactuator/actuator.go b/pkg/controller/controlplane/genericactuator/actuator.go index 09cf03a73..f16d124f0 100644 --- a/pkg/controller/controlplane/genericactuator/actuator.go +++ b/pkg/controller/controlplane/genericactuator/actuator.go @@ -26,7 +26,7 @@ import ( extensionswebhookshoot "github.com/gardener/gardener-extensions/pkg/webhook/shoot" "github.com/gardener/gardener-resource-manager/pkg/manager" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" gardenerkubernetes "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/utils/imagevector" @@ -276,8 +276,8 @@ func (a *actuator) reconcileControlPlane( if extensionscontroller.IsHibernated(cluster) { dep := &appsv1.Deployment{} - if err := a.client.Get(ctx, client.ObjectKey{Namespace: cp.Namespace, Name: v1alpha1constants.DeploymentNameKubeAPIServer}, dep); client.IgnoreNotFound(err) != nil { - return false, errors.Wrapf(err, "could not get deployment '%s/%s'", cp.Namespace, v1alpha1constants.DeploymentNameKubeAPIServer) + if err := a.client.Get(ctx, client.ObjectKey{Namespace: cp.Namespace, Name: v1beta1constants.DeploymentNameKubeAPIServer}, dep); client.IgnoreNotFound(err) != nil { + return false, errors.Wrapf(err, "could not get deployment '%s/%s'", cp.Namespace, v1beta1constants.DeploymentNameKubeAPIServer) } // If the cluster is hibernated, check if kube-apiserver has been already scaled down. If it is not yet scaled down @@ -456,12 +456,12 @@ func (a *actuator) computeChecksums( ) (map[string]string, error) { // Get cloud provider secret and config from cluster cpSecret := &corev1.Secret{} - if err := a.client.Get(ctx, client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider}, cpSecret); err != nil { - return nil, errors.Wrapf(err, "could not get secret '%s/%s'", namespace, v1alpha1constants.SecretNameCloudProvider) + if err := a.client.Get(ctx, client.ObjectKey{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider}, cpSecret); err != nil { + return nil, errors.Wrapf(err, "could not get secret '%s/%s'", namespace, v1beta1constants.SecretNameCloudProvider) } csSecrets := controlplane.MergeSecretMaps(deployedSecrets, map[string]*corev1.Secret{ - v1alpha1constants.SecretNameCloudProvider: cpSecret, + v1beta1constants.SecretNameCloudProvider: cpSecret, }) var csConfigMaps map[string]*corev1.ConfigMap diff --git a/pkg/controller/controlplane/genericactuator/actuator_test.go b/pkg/controller/controlplane/genericactuator/actuator_test.go index b6f668a51..f5f495d01 100644 --- a/pkg/controller/controlplane/genericactuator/actuator_test.go +++ b/pkg/controller/controlplane/genericactuator/actuator_test.go @@ -30,8 +30,8 @@ import ( resourcemanagerv1alpha1 "github.com/gardener/gardener-resource-manager/pkg/apis/resources/v1alpha1" resourcesv1alpha1 "github.com/gardener/gardener-resource-manager/pkg/apis/resources/v1alpha1" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/gardener/gardener/pkg/utils/imagevector" "github.com/golang/mock/gomock" @@ -92,9 +92,9 @@ var _ = Describe("Actuator", func() { } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: shootVersion, }, }, @@ -114,10 +114,10 @@ var _ = Describe("Actuator", func() { }, } - cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1alpha1constants.SecretNameCloudProvider} + cpSecretKey = client.ObjectKey{Namespace: namespace, Name: v1beta1constants.SecretNameCloudProvider} cpConfigMapKey = client.ObjectKey{Namespace: namespace, Name: cloudProviderConfigName} cpSecret = &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.SecretNameCloudProvider, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.SecretNameCloudProvider, Namespace: namespace}, Data: map[string][]byte{"foo": []byte("bar")}, } cpConfigMap = &corev1.ConfigMap{ @@ -190,8 +190,8 @@ var _ = Describe("Actuator", func() { { NamespaceSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ - v1alpha1constants.LabelControllerRegistrationName: providerName, - v1alpha1constants.GardenRole: v1alpha1constants.GardenRoleExtension, + v1beta1constants.LabelControllerRegistrationName: providerName, + v1beta1constants.GardenRole: v1beta1constants.GardenRoleExtension, }, }, PodSelector: &metav1.LabelSelector{ @@ -205,8 +205,8 @@ var _ = Describe("Actuator", func() { }, PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{ - v1alpha1constants.LabelApp: v1alpha1constants.LabelKubernetes, - v1alpha1constants.LabelRole: v1alpha1constants.LabelAPIServer, + v1beta1constants.LabelApp: v1beta1constants.LabelKubernetes, + v1beta1constants.LabelRole: v1beta1constants.LabelAPIServer, }, }, }, @@ -234,13 +234,13 @@ var _ = Describe("Actuator", func() { imageVector = imagevector.ImageVector([]*imagevector.ImageSource{}) checksums = map[string]string{ - v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", - cloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", - "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + cloudProviderConfigName: "08a7bc7fe8f59b055f173145e211760a83f02cf89635cef26ebb351378635606", + "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", } checksumsNoConfig = map[string]string{ - v1alpha1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", - "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", + v1beta1constants.SecretNameCloudProvider: "8bafb35ff1ac60275d62e1cbd495aceb511fb354f74a20f7d06ecb48b3a68432", + "cloud-controller-manager": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", } exposureChecksums = map[string]string{ "lb-readvertiser": "3d791b164a808638da9a8df03924be2a41e34cd664e42231c00fe369e3588272", diff --git a/pkg/controller/controlplane/reconciler.go b/pkg/controller/controlplane/reconciler.go index 3d9a2acb1..ef043de57 100644 --- a/pkg/controller/controlplane/reconciler.go +++ b/pkg/controller/controlplane/reconciler.go @@ -22,8 +22,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -106,7 +106,7 @@ func (r *reconciler) reconcile(ctx context.Context, cp *extensionsv1alpha1.Contr return reconcile.Result{}, err } - operationType := gardencorev1alpha1helper.ComputeOperationType(cp.ObjectMeta, cp.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(cp.ObjectMeta, cp.Status.LastOperation) if err := r.updateStatusProcessing(ctx, cp, operationType, "Reconciling the controlplane"); err != nil { return reconcile.Result{}, err } @@ -145,7 +145,7 @@ func (r *reconciler) delete(ctx context.Context, cp *extensionsv1alpha1.ControlP return reconcile.Result{}, nil } - operationType := gardencorev1alpha1helper.ComputeOperationType(cp.ObjectMeta, cp.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(cp.ObjectMeta, cp.Status.LastOperation) if err := r.updateStatusProcessing(ctx, cp, operationType, "Deleting the controlplane"); err != nil { return reconcile.Result{}, err } @@ -176,18 +176,18 @@ func (r *reconciler) delete(ctx context.Context, cp *extensionsv1alpha1.ControlP return reconcile.Result{}, nil } -func (r *reconciler) updateStatusProcessing(ctx context.Context, cp *extensionsv1alpha1.ControlPlane, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { - cp.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1alpha1.LastOperationStateProcessing, 1, description) +func (r *reconciler) updateStatusProcessing(ctx context.Context, cp *extensionsv1alpha1.ControlPlane, lastOperationType gardencorev1beta1.LastOperationType, description string) error { + cp.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1beta1.LastOperationStateProcessing, 1, description) return r.client.Status().Update(ctx, cp) } -func (r *reconciler) updateStatusError(ctx context.Context, err error, cp *extensionsv1alpha1.ControlPlane, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusError(ctx context.Context, err error, cp *extensionsv1alpha1.ControlPlane, lastOperationType gardencorev1beta1.LastOperationType, description string) error { cp.Status.ObservedGeneration = cp.Generation - cp.Status.LastOperation, cp.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1alpha1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1alpha1helper.ExtractErrorCodes(err)...) + cp.Status.LastOperation, cp.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1beta1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1beta1helper.ExtractErrorCodes(err)...) return r.client.Status().Update(ctx, cp) } -func (r *reconciler) updateStatusSuccess(ctx context.Context, cp *extensionsv1alpha1.ControlPlane, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusSuccess(ctx context.Context, cp *extensionsv1alpha1.ControlPlane, lastOperationType gardencorev1beta1.LastOperationType, description string) error { cp.Status.ObservedGeneration = cp.Generation cp.Status.LastOperation, cp.Status.LastError = extensionscontroller.ReconcileSucceeded(lastOperationType, description) return r.client.Status().Update(ctx, cp) diff --git a/pkg/controller/controlplane/utils.go b/pkg/controller/controlplane/utils.go index b4958a850..093d1fe70 100644 --- a/pkg/controller/controlplane/utils.go +++ b/pkg/controller/controlplane/utils.go @@ -19,7 +19,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" corev1 "k8s.io/api/core/v1" ) @@ -29,7 +29,7 @@ func DNSNamesForService(name, namespace string) []string { name, fmt.Sprintf("%s.%s", name, namespace), fmt.Sprintf("%s.%s.svc", name, namespace), - fmt.Sprintf("%s.%s.svc.%s", name, namespace, gardencorev1alpha1.DefaultDomain), + fmt.Sprintf("%s.%s.svc.%s", name, namespace, gardencorev1beta1.DefaultDomain), } } diff --git a/pkg/controller/extension/reconciler.go b/pkg/controller/extension/reconciler.go index 2b9a4a01c..35847cfe4 100644 --- a/pkg/controller/extension/reconciler.go +++ b/pkg/controller/extension/reconciler.go @@ -24,8 +24,8 @@ import ( extensionspredicate "github.com/gardener/gardener-extensions/pkg/predicate" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/go-logr/logr" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -191,7 +191,7 @@ func (r *reconciler) reconcile(ctx context.Context, ex *extensionsv1alpha1.Exten msg := "Reconciling Extension resource" r.logger.Info("Reconciling Extension resource", "extension", ex.Name, "namespace", ex.Namespace) - operationType := gardencorev1alpha1helper.ComputeOperationType(ex.ObjectMeta, ex.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(ex.ObjectMeta, ex.Status.LastOperation) if err := r.updateStatusProcessing(ctx, ex, operationType, msg); err != nil { return reconcile.Result{}, err } @@ -223,7 +223,7 @@ func (r *reconciler) delete(ctx context.Context, ex *extensionsv1alpha1.Extensio return reconcile.Result{}, nil } - operationType := gardencorev1alpha1helper.ComputeOperationType(ex.ObjectMeta, ex.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(ex.ObjectMeta, ex.Status.LastOperation) if err := r.updateStatusProcessing(ctx, ex, operationType, "Deleting Extension resource."); err != nil { return reconcile.Result{}, err } @@ -249,22 +249,22 @@ func (r *reconciler) delete(ctx context.Context, ex *extensionsv1alpha1.Extensio return reconcile.Result{}, nil } -func (r *reconciler) updateStatusProcessing(ctx context.Context, ex *extensionsv1alpha1.Extension, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusProcessing(ctx context.Context, ex *extensionsv1alpha1.Extension, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, ex, func() error { - ex.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1alpha1.LastOperationStateProcessing, 1, description) + ex.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1beta1.LastOperationStateProcessing, 1, description) return nil }) } -func (r *reconciler) updateStatusError(ctx context.Context, err error, ex *extensionsv1alpha1.Extension, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusError(ctx context.Context, err error, ex *extensionsv1alpha1.Extension, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, ex, func() error { ex.Status.ObservedGeneration = ex.Generation - ex.Status.LastOperation, ex.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1alpha1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1alpha1helper.ExtractErrorCodes(err)...) + ex.Status.LastOperation, ex.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1beta1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1beta1helper.ExtractErrorCodes(err)...) return nil }) } -func (r *reconciler) updateStatusSuccess(ctx context.Context, ex *extensionsv1alpha1.Extension, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusSuccess(ctx context.Context, ex *extensionsv1alpha1.Extension, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, ex, func() error { ex.Status.ObservedGeneration = ex.Generation ex.Status.LastOperation, ex.Status.LastError = extensionscontroller.ReconcileSucceeded(lastOperationType, description) diff --git a/pkg/controller/infrastructure/reconciler.go b/pkg/controller/infrastructure/reconciler.go index 6f103850a..8342f3018 100644 --- a/pkg/controller/infrastructure/reconciler.go +++ b/pkg/controller/infrastructure/reconciler.go @@ -21,18 +21,15 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/retry" - "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -108,7 +105,7 @@ func (r *reconciler) reconcile(ctx context.Context, infrastructure *extensionsv1 return reconcile.Result{}, err } - operationType := gardencorev1alpha1helper.ComputeOperationType(infrastructure.ObjectMeta, infrastructure.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(infrastructure.ObjectMeta, infrastructure.Status.LastOperation) if err := r.updateStatusProcessing(ctx, infrastructure, operationType, "Reconciling the infrastructure"); err != nil { return reconcile.Result{}, err } @@ -143,7 +140,7 @@ func (r *reconciler) delete(ctx context.Context, infrastructure *extensionsv1alp return reconcile.Result{}, nil } - operationType := gardencorev1alpha1helper.ComputeOperationType(infrastructure.ObjectMeta, infrastructure.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(infrastructure.ObjectMeta, infrastructure.Status.LastOperation) if err := r.updateStatusProcessing(ctx, infrastructure, operationType, "Deleting the infrastructure"); err != nil { return reconcile.Result{}, err } @@ -174,22 +171,22 @@ func (r *reconciler) delete(ctx context.Context, infrastructure *extensionsv1alp return reconcile.Result{}, nil } -func (r *reconciler) updateStatusProcessing(ctx context.Context, infrastructure *extensionsv1alpha1.Infrastructure, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusProcessing(ctx context.Context, infrastructure *extensionsv1alpha1.Infrastructure, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, infrastructure, func() error { - infrastructure.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1alpha1.LastOperationStateProcessing, 1, description) + infrastructure.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1beta1.LastOperationStateProcessing, 1, description) return nil }) } -func (r *reconciler) updateStatusError(ctx context.Context, err error, infrastructure *extensionsv1alpha1.Infrastructure, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusError(ctx context.Context, err error, infrastructure *extensionsv1alpha1.Infrastructure, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, infrastructure, func() error { infrastructure.Status.ObservedGeneration = infrastructure.Generation - infrastructure.Status.LastOperation, infrastructure.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1alpha1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1alpha1helper.ExtractErrorCodes(err)...) + infrastructure.Status.LastOperation, infrastructure.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1beta1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1beta1helper.ExtractErrorCodes(err)...) return nil }) } -func (r *reconciler) updateStatusSuccess(ctx context.Context, infrastructure *extensionsv1alpha1.Infrastructure, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusSuccess(ctx context.Context, infrastructure *extensionsv1alpha1.Infrastructure, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, infrastructure, func() error { infrastructure.Status.ObservedGeneration = infrastructure.Generation infrastructure.Status.LastOperation, infrastructure.Status.LastError = extensionscontroller.ReconcileSucceeded(lastOperationType, description) diff --git a/pkg/controller/network/reconciler.go b/pkg/controller/network/reconciler.go index 6c0189ed2..9d1f548a4 100644 --- a/pkg/controller/network/reconciler.go +++ b/pkg/controller/network/reconciler.go @@ -21,8 +21,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -106,7 +106,7 @@ func (r *reconciler) reconcile(ctx context.Context, network *extensionsv1alpha1. return reconcile.Result{}, err } - operationType := gardencorev1alpha1helper.ComputeOperationType(network.ObjectMeta, network.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(network.ObjectMeta, network.Status.LastOperation) if err := r.updateStatusProcessing(ctx, network, operationType, "Reconciling the network"); err != nil { return reconcile.Result{}, err } @@ -141,7 +141,7 @@ func (r *reconciler) delete(ctx context.Context, network *extensionsv1alpha1.Net return reconcile.Result{}, nil } - operationType := gardencorev1alpha1helper.ComputeOperationType(network.ObjectMeta, network.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(network.ObjectMeta, network.Status.LastOperation) if err := r.updateStatusProcessing(ctx, network, operationType, "Deleting the network"); err != nil { return reconcile.Result{}, err } @@ -172,22 +172,22 @@ func (r *reconciler) delete(ctx context.Context, network *extensionsv1alpha1.Net return reconcile.Result{}, nil } -func (r *reconciler) updateStatusProcessing(ctx context.Context, network *extensionsv1alpha1.Network, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusProcessing(ctx context.Context, network *extensionsv1alpha1.Network, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, network, func() error { - network.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1alpha1.LastOperationStateProcessing, 1, description) + network.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1beta1.LastOperationStateProcessing, 1, description) return nil }) } -func (r *reconciler) updateStatusError(ctx context.Context, err error, network *extensionsv1alpha1.Network, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusError(ctx context.Context, err error, network *extensionsv1alpha1.Network, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, network, func() error { network.Status.ObservedGeneration = network.Generation - network.Status.LastOperation, network.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1alpha1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1alpha1helper.ExtractErrorCodes(err)...) + network.Status.LastOperation, network.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1beta1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1beta1helper.ExtractErrorCodes(err)...) return nil }) } -func (r *reconciler) updateStatusSuccess(ctx context.Context, network *extensionsv1alpha1.Network, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusSuccess(ctx context.Context, network *extensionsv1alpha1.Network, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, network, func() error { network.Status.ObservedGeneration = network.Generation network.Status.LastOperation, network.Status.LastError = extensionscontroller.ReconcileSucceeded(lastOperationType, description) diff --git a/pkg/controller/operatingsystemconfig/reconciler.go b/pkg/controller/operatingsystemconfig/reconciler.go index bad498726..ad6972589 100644 --- a/pkg/controller/operatingsystemconfig/reconciler.go +++ b/pkg/controller/operatingsystemconfig/reconciler.go @@ -22,8 +22,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "sigs.k8s.io/controller-runtime/pkg/client" @@ -107,7 +107,7 @@ func (r *reconciler) reconcile(ctx context.Context, osc *extensionsv1alpha1.Oper return reconcile.Result{}, err } - operationType := gardencorev1alpha1helper.ComputeOperationType(osc.ObjectMeta, osc.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(osc.ObjectMeta, osc.Status.LastOperation) if err := r.updateStatusProcessing(ctx, osc, operationType, "Reconciling the operating system config"); err != nil { return reconcile.Result{}, err } @@ -167,7 +167,7 @@ func (r *reconciler) delete(ctx context.Context, osc *extensionsv1alpha1.Operati return reconcile.Result{}, nil } - operationType := gardencorev1alpha1helper.ComputeOperationType(osc.ObjectMeta, osc.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(osc.ObjectMeta, osc.Status.LastOperation) if err := r.updateStatusProcessing(ctx, osc, operationType, "Deleting the operating system config"); err != nil { return reconcile.Result{}, err } @@ -195,18 +195,18 @@ func (r *reconciler) delete(ctx context.Context, osc *extensionsv1alpha1.Operati return reconcile.Result{}, nil } -func (r *reconciler) updateStatusProcessing(ctx context.Context, osc *extensionsv1alpha1.OperatingSystemConfig, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { - osc.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1alpha1.LastOperationStateProcessing, 1, description) +func (r *reconciler) updateStatusProcessing(ctx context.Context, osc *extensionsv1alpha1.OperatingSystemConfig, lastOperationType gardencorev1beta1.LastOperationType, description string) error { + osc.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1beta1.LastOperationStateProcessing, 1, description) return r.client.Status().Update(ctx, osc) } -func (r *reconciler) updateStatusError(ctx context.Context, err error, osc *extensionsv1alpha1.OperatingSystemConfig, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusError(ctx context.Context, err error, osc *extensionsv1alpha1.OperatingSystemConfig, lastOperationType gardencorev1beta1.LastOperationType, description string) error { osc.Status.ObservedGeneration = osc.Generation - osc.Status.LastOperation, osc.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1alpha1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1alpha1helper.ExtractErrorCodes(err)...) + osc.Status.LastOperation, osc.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1beta1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1beta1helper.ExtractErrorCodes(err)...) return r.client.Status().Update(ctx, osc) } -func (r *reconciler) updateStatusSuccess(ctx context.Context, osc *extensionsv1alpha1.OperatingSystemConfig, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusSuccess(ctx context.Context, osc *extensionsv1alpha1.OperatingSystemConfig, lastOperationType gardencorev1beta1.LastOperationType, description string) error { osc.Status.ObservedGeneration = osc.Generation osc.Status.LastOperation, osc.Status.LastError = extensionscontroller.ReconcileSucceeded(lastOperationType, description) return r.client.Status().Update(ctx, osc) diff --git a/pkg/controller/reconciler.go b/pkg/controller/reconciler.go index f604ed2db..f84441ce6 100644 --- a/pkg/controller/reconciler.go +++ b/pkg/controller/reconciler.go @@ -18,7 +18,7 @@ import ( "context" "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -74,9 +74,9 @@ func (o *operationAnnotationWrapper) Reconcile(request reconcile.Request) (recon } annotations := acc.GetAnnotations() - if annotations[v1alpha1constants.GardenerOperation] == v1alpha1constants.GardenerOperationReconcile { + if annotations[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationReconcile { withOpAnnotation := obj.DeepCopyObject() - delete(annotations, v1alpha1constants.GardenerOperation) + delete(annotations, v1beta1constants.GardenerOperation) acc.SetAnnotations(annotations) if err := o.client.Patch(o.ctx, obj, client.MergeFrom(withOpAnnotation)); err != nil { return reconcile.Result{}, err diff --git a/pkg/controller/shoot_test.go b/pkg/controller/shoot_test.go index 70bbd31c4..bb3f3d576 100644 --- a/pkg/controller/shoot_test.go +++ b/pkg/controller/shoot_test.go @@ -15,7 +15,7 @@ package controller import ( - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" @@ -34,9 +34,9 @@ var _ = Describe("Shoot", func() { }, Entry("pod cidr is given", &Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Networking: gardencorev1alpha1.Networking{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Networking: gardencorev1beta1.Networking{ Pods: &cidr, }, }, @@ -45,10 +45,10 @@ var _ = Describe("Shoot", func() { ) DescribeTable("#IsHibernated", - func(hibernation *gardencorev1alpha1.Hibernation, expectation bool) { + func(hibernation *gardencorev1beta1.Hibernation, expectation bool) { cluster := &Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ Hibernation: hibernation, }, }, @@ -58,8 +58,8 @@ var _ = Describe("Shoot", func() { }, Entry("hibernation is nil", nil, false), - Entry("hibernation is not enabled", &gardencorev1alpha1.Hibernation{Enabled: &falseVar}, false), - Entry("hibernation is enabled", &gardencorev1alpha1.Hibernation{Enabled: &trueVar}, true), + Entry("hibernation is not enabled", &gardencorev1beta1.Hibernation{Enabled: &falseVar}, false), + Entry("hibernation is enabled", &gardencorev1beta1.Hibernation{Enabled: &trueVar}, true), ) var ( @@ -69,10 +69,10 @@ var _ = Describe("Shoot", func() { ) DescribeTable("#IsUnmanagedDNSProvider", - func(dns *gardencorev1alpha1.DNS, expectation bool) { + func(dns *gardencorev1beta1.DNS, expectation bool) { cluster := &Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ DNS: dns, }, }, @@ -82,29 +82,29 @@ var _ = Describe("Shoot", func() { }, Entry("dns is nil", nil, true), - Entry("dns domain is set", &gardencorev1alpha1.DNS{ + Entry("dns domain is set", &gardencorev1beta1.DNS{ Domain: &dnsDomain, }, false), - Entry("dns domain is not set and provider is not given", &gardencorev1alpha1.DNS{ - Providers: []gardencorev1alpha1.DNSProvider{}, + Entry("dns domain is not set and provider is not given", &gardencorev1beta1.DNS{ + Providers: []gardencorev1beta1.DNSProvider{}, }, false), - Entry("dns domain is not set and provider is given but type is not unmanaged", &gardencorev1alpha1.DNS{ - Providers: []gardencorev1alpha1.DNSProvider{{ + Entry("dns domain is not set and provider is given but type is not unmanaged", &gardencorev1beta1.DNS{ + Providers: []gardencorev1beta1.DNSProvider{{ Type: &dnsProviderType, }}, }, false), - Entry("dns domain is not set and provider is given and type is unmanaged", &gardencorev1alpha1.DNS{ - Providers: []gardencorev1alpha1.DNSProvider{{ + Entry("dns domain is not set and provider is given and type is unmanaged", &gardencorev1beta1.DNS{ + Providers: []gardencorev1beta1.DNSProvider{{ Type: &dnsProviderUnmanaged, }}, }, true), ) DescribeTable("#GetReplicas", - func(hibernation *gardencorev1alpha1.Hibernation, wokenUp, expectation int) { + func(hibernation *gardencorev1beta1.Hibernation, wokenUp, expectation int) { cluster := &Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ Hibernation: hibernation, }, }, @@ -114,6 +114,6 @@ var _ = Describe("Shoot", func() { }, Entry("hibernation is not enabled", nil, 3, 3), - Entry("hibernation is enabled", &gardencorev1alpha1.Hibernation{Enabled: &trueVar}, 1, 0), + Entry("hibernation is enabled", &gardencorev1beta1.Hibernation{Enabled: &trueVar}, 1, 0), ) }) diff --git a/pkg/controller/status.go b/pkg/controller/status.go index 3d8806686..9c6a1e84f 100644 --- a/pkg/controller/status.go +++ b/pkg/controller/status.go @@ -15,14 +15,14 @@ package controller import ( - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // LastOperation creates a new LastOperation from the given parameters. -func LastOperation(t gardencorev1alpha1.LastOperationType, state gardencorev1alpha1.LastOperationState, progress int, description string) *gardencorev1alpha1.LastOperation { - return &gardencorev1alpha1.LastOperation{ +func LastOperation(t gardencorev1beta1.LastOperationType, state gardencorev1beta1.LastOperationState, progress int, description string) *gardencorev1beta1.LastOperation { + return &gardencorev1beta1.LastOperation{ LastUpdateTime: metav1.Now(), Type: t, State: state, @@ -32,10 +32,10 @@ func LastOperation(t gardencorev1alpha1.LastOperationType, state gardencorev1alp } // LastError creates a new LastError from the given parameters. -func LastError(description string, codes ...gardencorev1alpha1.ErrorCode) *gardencorev1alpha1.LastError { +func LastError(description string, codes ...gardencorev1beta1.ErrorCode) *gardencorev1beta1.LastError { now := metav1.Now() - return &gardencorev1alpha1.LastError{ + return &gardencorev1beta1.LastError{ Description: description, Codes: codes, LastUpdateTime: &now, @@ -43,11 +43,11 @@ func LastError(description string, codes ...gardencorev1alpha1.ErrorCode) *garde } // ReconcileSucceeded returns a LastOperation with state succeeded at 100 percent and a nil LastError. -func ReconcileSucceeded(t gardencorev1alpha1.LastOperationType, description string) (*gardencorev1alpha1.LastOperation, *gardencorev1alpha1.LastError) { - return LastOperation(t, gardencorev1alpha1.LastOperationStateSucceeded, 100, description), nil +func ReconcileSucceeded(t gardencorev1beta1.LastOperationType, description string) (*gardencorev1beta1.LastOperation, *gardencorev1beta1.LastError) { + return LastOperation(t, gardencorev1beta1.LastOperationStateSucceeded, 100, description), nil } // ReconcileError returns a LastOperation with state error and a LastError with the given description and codes. -func ReconcileError(t gardencorev1alpha1.LastOperationType, description string, progress int, codes ...gardencorev1alpha1.ErrorCode) (*gardencorev1alpha1.LastOperation, *gardencorev1alpha1.LastError) { - return LastOperation(t, gardencorev1alpha1.LastOperationStateError, progress, description), LastError(description, codes...) +func ReconcileError(t gardencorev1beta1.LastOperationType, description string, progress int, codes ...gardencorev1beta1.ErrorCode) (*gardencorev1beta1.LastOperation, *gardencorev1beta1.LastError) { + return LastOperation(t, gardencorev1beta1.LastOperationStateError, progress, description), LastError(description, codes...) } diff --git a/pkg/controller/utils.go b/pkg/controller/utils.go index 80d189c8c..bc368f30f 100644 --- a/pkg/controller/utils.go +++ b/pkg/controller/utils.go @@ -187,7 +187,6 @@ func GetSecretByReference(ctx context.Context, c client.Client, ref *corev1.Secr if err := c.Get(ctx, SecretReferenceToKey(ref), secret); err != nil { return nil, err } - return secret, nil } diff --git a/pkg/controller/worker/genericactuator/actuator.go b/pkg/controller/worker/genericactuator/actuator.go index a85ccaa14..746f6fab8 100644 --- a/pkg/controller/worker/genericactuator/actuator.go +++ b/pkg/controller/worker/genericactuator/actuator.go @@ -21,7 +21,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller/worker" "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" gardenerkubernetes "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/utils/imagevector" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" @@ -157,7 +157,7 @@ func (a *genericActuator) listMachineClassSecrets(ctx context.Context, namespace var ( secretList = &corev1.SecretList{} labels = map[string]string{ - v1alpha1constants.GardenPurpose: v1alpha1constants.GardenPurposeMachineClass, + v1beta1constants.GardenPurpose: v1beta1constants.GardenPurposeMachineClass, } ) diff --git a/pkg/controller/worker/genericactuator/actuator_delete.go b/pkg/controller/worker/genericactuator/actuator_delete.go index 0d78e75aa..8fc34e04d 100644 --- a/pkg/controller/worker/genericactuator/actuator_delete.go +++ b/pkg/controller/worker/genericactuator/actuator_delete.go @@ -23,7 +23,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" "github.com/pkg/errors" @@ -86,7 +86,7 @@ func (a *genericActuator) Delete(ctx context.Context, worker *extensionsv1alpha1 defer cancel() if err := a.waitUntilMachineResourcesDeleted(timeoutCtx, worker, workerDelegate); err != nil { - return gardencorev1alpha1helper.DetermineError(fmt.Sprintf("Failed while waiting for all machine resources to be deleted: '%s'", err.Error())) + return gardencorev1beta1helper.DetermineError(fmt.Sprintf("Failed while waiting for all machine resources to be deleted: '%s'", err.Error())) } // Delete the machine-controller-manager. diff --git a/pkg/controller/worker/genericactuator/actuator_reconcile.go b/pkg/controller/worker/genericactuator/actuator_reconcile.go index 746420277..b5e39f18a 100644 --- a/pkg/controller/worker/genericactuator/actuator_reconcile.go +++ b/pkg/controller/worker/genericactuator/actuator_reconcile.go @@ -24,8 +24,8 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller/worker" "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" extensionsv1alpha1helper "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/helper" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" @@ -102,7 +102,7 @@ func (a *genericActuator) Reconcile(ctx context.Context, worker *extensionsv1alp // with Gardeners modifications on the machine deployment's replicas fields. if controller.IsHibernated(cluster) || rollingUpdate { deployment := &appsv1.Deployment{} - if err := a.client.Get(ctx, kutil.Key(worker.Namespace, v1alpha1constants.DeploymentNameClusterAutoscaler), deployment); err != nil { + if err := a.client.Get(ctx, kutil.Key(worker.Namespace, v1beta1constants.DeploymentNameClusterAutoscaler), deployment); err != nil { if !apierrors.IsNotFound(err) { return err } @@ -146,7 +146,7 @@ func (a *genericActuator) Reconcile(ctx context.Context, worker *extensionsv1alp defer cancel() if err := a.waitUntilMachineDeploymentsAvailable(timeoutCtx, cluster, worker, wantedMachineDeployments); err != nil { - return gardencorev1alpha1helper.DetermineError(fmt.Sprintf("Failed while waiting for all machine deployments to be ready: '%s'", err.Error())) + return gardencorev1beta1helper.DetermineError(fmt.Sprintf("Failed while waiting for all machine deployments to be ready: '%s'", err.Error())) } // Delete all old machine deployments (i.e. those which were not previously computed but exist in the cluster). @@ -177,7 +177,7 @@ func (a *genericActuator) Reconcile(ctx context.Context, worker *extensionsv1alp if rollingUpdate { deployment := &appsv1.Deployment{} - if err := a.client.Get(ctx, kutil.Key(worker.Namespace, v1alpha1constants.DeploymentNameClusterAutoscaler), deployment); err != nil { + if err := a.client.Get(ctx, kutil.Key(worker.Namespace, v1beta1constants.DeploymentNameClusterAutoscaler), deployment); err != nil { if !apierrors.IsNotFound(err) { return err } diff --git a/pkg/controller/worker/machines_test.go b/pkg/controller/worker/machines_test.go index 8c8e16c24..4240ebc56 100644 --- a/pkg/controller/worker/machines_test.go +++ b/pkg/controller/worker/machines_test.go @@ -18,7 +18,7 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" . "github.com/gardener/gardener-extensions/pkg/controller/worker" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" @@ -83,9 +83,9 @@ var _ = Describe("Machines", func() { }, } cluster = &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.2.3", }, }, @@ -163,9 +163,9 @@ var _ = Describe("Machines", func() { It("when changing the kubernetes patch version", func() { v, err = WorkerPoolHash(*p, &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.2.4", }, }, @@ -213,9 +213,9 @@ var _ = Describe("Machines", func() { It("when changing the kubernetes major/minor version", func() { v, err = WorkerPoolHash(*p, &extensionscontroller.Cluster{ - Shoot: &gardencorev1alpha1.Shoot{ - Spec: gardencorev1alpha1.ShootSpec{ - Kubernetes: gardencorev1alpha1.Kubernetes{ + Shoot: &gardencorev1beta1.Shoot{ + Spec: gardencorev1beta1.ShootSpec{ + Kubernetes: gardencorev1beta1.Kubernetes{ Version: "1.3.3", }, }, diff --git a/pkg/controller/worker/reconciler.go b/pkg/controller/worker/reconciler.go index 28dde9112..393b2c472 100644 --- a/pkg/controller/worker/reconciler.go +++ b/pkg/controller/worker/reconciler.go @@ -22,8 +22,8 @@ import ( extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller" "github.com/gardener/gardener-extensions/pkg/util" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/go-logr/logr" @@ -99,7 +99,7 @@ func (r *reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err return reconcile.Result{}, nil } - operationType := gardencorev1alpha1helper.ComputeOperationType(worker.ObjectMeta, worker.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(worker.ObjectMeta, worker.Status.LastOperation) if err := r.updateStatusProcessing(r.ctx, worker, operationType, "Deleting the worker"); err != nil { return reconcile.Result{}, err } @@ -132,7 +132,7 @@ func (r *reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err return reconcile.Result{}, err } - operationType := gardencorev1alpha1helper.ComputeOperationType(worker.ObjectMeta, worker.Status.LastOperation) + operationType := gardencorev1beta1helper.ComputeOperationType(worker.ObjectMeta, worker.Status.LastOperation) if err := r.updateStatusProcessing(r.ctx, worker, operationType, "Reconciling the worker"); err != nil { return reconcile.Result{}, err } @@ -153,22 +153,22 @@ func (r *reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err return reconcile.Result{}, nil } -func (r *reconciler) updateStatusProcessing(ctx context.Context, worker *extensionsv1alpha1.Worker, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusProcessing(ctx context.Context, worker *extensionsv1alpha1.Worker, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, worker, func() error { - worker.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1alpha1.LastOperationStateProcessing, 1, description) + worker.Status.LastOperation = extensionscontroller.LastOperation(lastOperationType, gardencorev1beta1.LastOperationStateProcessing, 1, description) return nil }) } -func (r *reconciler) updateStatusError(ctx context.Context, err error, worker *extensionsv1alpha1.Worker, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusError(ctx context.Context, err error, worker *extensionsv1alpha1.Worker, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, worker, func() error { worker.Status.ObservedGeneration = worker.Generation - worker.Status.LastOperation, worker.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1alpha1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1alpha1helper.ExtractErrorCodes(err)...) + worker.Status.LastOperation, worker.Status.LastError = extensionscontroller.ReconcileError(lastOperationType, gardencorev1beta1helper.FormatLastErrDescription(fmt.Errorf("%s: %v", description, err)), 50, gardencorev1beta1helper.ExtractErrorCodes(err)...) return nil }) } -func (r *reconciler) updateStatusSuccess(ctx context.Context, worker *extensionsv1alpha1.Worker, lastOperationType gardencorev1alpha1.LastOperationType, description string) error { +func (r *reconciler) updateStatusSuccess(ctx context.Context, worker *extensionsv1alpha1.Worker, lastOperationType gardencorev1beta1.LastOperationType, description string) error { return extensionscontroller.TryUpdateStatus(ctx, retry.DefaultBackoff, r.client, worker, func() error { worker.Status.ObservedGeneration = worker.Generation worker.Status.LastOperation, worker.Status.LastError = extensionscontroller.ReconcileSucceeded(lastOperationType, description) diff --git a/pkg/predicate/predicate.go b/pkg/predicate/predicate.go index c7b7fb2a4..32bc509b1 100644 --- a/pkg/predicate/predicate.go +++ b/pkg/predicate/predicate.go @@ -20,18 +20,16 @@ import ( "github.com/gardener/gardener-extensions/pkg/controller" extensionsevent "github.com/gardener/gardener-extensions/pkg/event" extensionsinject "github.com/gardener/gardener-extensions/pkg/inject" - "github.com/gardener/gardener/pkg/api/extensions" - "sigs.k8s.io/controller-runtime/pkg/runtime/inject" + "github.com/gardener/gardener/pkg/api/extensions" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/go-logr/logr" - - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/event" + "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" + "sigs.k8s.io/controller-runtime/pkg/runtime/inject" ) // Log is the logger for predicates. @@ -77,7 +75,7 @@ func (s *shootNotFailedMapper) Map(e event.GenericEvent) bool { lastOperation := cluster.Shoot.Status.LastOperation return lastOperation != nil && - lastOperation.State != gardencorev1alpha1.LastOperationStateFailed && + lastOperation.State != gardencorev1beta1.LastOperationStateFailed && cluster.Shoot.Generation == cluster.Shoot.Status.ObservedGeneration } @@ -158,7 +156,7 @@ func HasName(name string) predicate.Predicate { // HasOperationAnnotation is a predicate for the operation annotation. func HasOperationAnnotation() predicate.Predicate { return FromMapper(MapperFunc(func(e event.GenericEvent) bool { - return e.Meta.GetAnnotations()[v1alpha1constants.GardenerOperation] == v1alpha1constants.GardenerOperationReconcile + return e.Meta.GetAnnotations()[v1beta1constants.GardenerOperation] == v1beta1constants.GardenerOperationReconcile }), CreateTrigger, UpdateNewTrigger, GenericTrigger) } @@ -172,7 +170,7 @@ func LastOperationNotSuccessful() predicate.Predicate { lastOp := acc.GetExtensionStatus().GetLastOperation() return lastOp == nil || - lastOp.GetState() != gardencorev1alpha1.LastOperationStateSucceeded + lastOp.GetState() != gardencorev1beta1.LastOperationStateSucceeded } return predicate.Funcs{ diff --git a/pkg/terraformer/terraformer.go b/pkg/terraformer/terraformer.go index e3794c986..20287f8a5 100644 --- a/pkg/terraformer/terraformer.go +++ b/pkg/terraformer/terraformer.go @@ -21,8 +21,8 @@ import ( "strings" "time" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" - gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" + gardencorev1beta1helper "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" "github.com/gardener/gardener/pkg/client/kubernetes" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "github.com/gardener/gardener/pkg/utils/retry" @@ -230,7 +230,7 @@ func (t *terraformer) execute(ctx context.Context, scriptName string) error { if terraformErrors := retrieveTerraformErrors(logList); terraformErrors != nil { errorMessage += fmt.Sprintf(" The following issues have been found in the logs:\n\n%s", strings.Join(terraformErrors, "\n\n")) } - return gardencorev1alpha1helper.DetermineError(errorMessage) + return gardencorev1beta1helper.DetermineError(errorMessage) } return nil } @@ -306,10 +306,10 @@ func (t *terraformer) deployTerraformerPod(ctx context.Context, generateName, co TerraformerLabelKeyName: t.name, TerraformerLabelKeyPurpose: t.purpose, // Network policy labels - v1alpha1constants.LabelNetworkPolicyToDNS: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToPrivateNetworks: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToPublicNetworks: v1alpha1constants.LabelNetworkPolicyAllowed, - v1alpha1constants.LabelNetworkPolicyToSeedAPIServer: v1alpha1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToDNS: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToPrivateNetworks: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToPublicNetworks: v1beta1constants.LabelNetworkPolicyAllowed, + v1beta1constants.LabelNetworkPolicyToSeedAPIServer: v1beta1constants.LabelNetworkPolicyAllowed, }, }, Spec: podSpec, diff --git a/pkg/util/deployments.go b/pkg/util/deployments.go index b97bb82fd..afbee9df0 100644 --- a/pkg/util/deployments.go +++ b/pkg/util/deployments.go @@ -18,7 +18,6 @@ import ( "context" appsv1 "k8s.io/api/apps/v1" - "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/pkg/util/shoot.go b/pkg/util/shoot.go index 350a20415..9ebe79d45 100644 --- a/pkg/util/shoot.go +++ b/pkg/util/shoot.go @@ -18,7 +18,7 @@ import ( "context" "fmt" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/utils/secrets" "github.com/Masterminds/semver" @@ -38,9 +38,9 @@ const CAChecksumAnnotation = "checksum/ca" // If the CA of an existing Kubeconfig has changed, it creates a new Kubeconfig. // Newly generated Kubeconfigs are applied with the given `client` to the given `namespace`. func GetOrCreateShootKubeconfig(ctx context.Context, c client.Client, certificateConfig secrets.CertificateSecretConfig, namespace string) (*corev1.Secret, error) { - caSecret, ca, err := secrets.LoadCAFromSecret(c, namespace, v1alpha1constants.SecretNameCACluster) + caSecret, ca, err := secrets.LoadCAFromSecret(c, namespace, v1beta1constants.SecretNameCACluster) if err != nil { - return nil, fmt.Errorf("error fetching CA secret %s/%s: %v", namespace, v1alpha1constants.SecretNameCACluster, err) + return nil, fmt.Errorf("error fetching CA secret %s/%s: %v", namespace, v1beta1constants.SecretNameCACluster, err) } var ( @@ -101,7 +101,7 @@ func GetOrCreateShootKubeconfig(ctx context.Context, c client.Client, certificat // the Kube-Apiserver deployment of a Shoot within the Seed cluster. // e.g. kube-apiserver.shoot--project--prod.svc.cluster.local. func kubeAPIServerServiceDNS(namespace string) string { - return fmt.Sprintf("%s.%s", v1alpha1constants.DeploymentNameKubeAPIServer, namespace) + return fmt.Sprintf("%s.%s", v1beta1constants.DeploymentNameKubeAPIServer, namespace) } // VersionMajorMinor extracts and returns the major and the minor part of the given version (input must be a semantic version). diff --git a/pkg/util/shoot_clients.go b/pkg/util/shoot_clients.go index c5976cfb8..48232e5db 100644 --- a/pkg/util/shoot_clients.go +++ b/pkg/util/shoot_clients.go @@ -17,7 +17,7 @@ package util import ( "context" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/gardener/gardener/pkg/chartrenderer" gardener "github.com/gardener/gardener/pkg/client/kubernetes" gardenerkubernetes "github.com/gardener/gardener/pkg/client/kubernetes" @@ -69,7 +69,7 @@ func NewShootClients(c client.Client, clientset kubernetes.Interface, gardenerCl // NewClientForShoot returns the rest config and the client for the given shoot namespace. func NewClientForShoot(ctx context.Context, c client.Client, namespace string, opts client.Options) (*rest.Config, client.Client, error) { gardenerSecret := &corev1.Secret{} - if err := c.Get(ctx, kutil.Key(namespace, v1alpha1constants.SecretNameGardener), gardenerSecret); err != nil { + if err := c.Get(ctx, kutil.Key(namespace, v1beta1constants.SecretNameGardener), gardenerSecret); err != nil { return nil, nil, err } shootRESTConfig, err := NewRESTConfigFromKubeconfig(gardenerSecret.Data[secrets.DataKeyKubeconfig]) diff --git a/pkg/util/shoot_test.go b/pkg/util/shoot_test.go index 158ac4f4b..34dbc2810 100644 --- a/pkg/util/shoot_test.go +++ b/pkg/util/shoot_test.go @@ -21,7 +21,7 @@ import ( mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client" "github.com/gardener/gardener-extensions/pkg/util" . "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "github.com/gardener/gardener/pkg/utils/secrets" @@ -69,7 +69,7 @@ var _ = Describe("Shoot", func() { ctx = context.TODO() namespace = "shoot--foo--bar" - caName = v1alpha1constants.SecretNameCACluster + caName = v1beta1constants.SecretNameCACluster caSecret = createNewCA(caName) certificateConfig = &secrets.CertificateSecretConfig{ diff --git a/pkg/webhook/controlplane/controlplane.go b/pkg/webhook/controlplane/controlplane.go index 73352d88c..691f1c85d 100644 --- a/pkg/webhook/controlplane/controlplane.go +++ b/pkg/webhook/controlplane/controlplane.go @@ -19,7 +19,7 @@ import ( extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/log" @@ -105,11 +105,11 @@ func buildSelector(kind, provider string) (*metav1.LabelSelector, error) { var key string switch kind { case KindSeed: - key = v1alpha1constants.LabelSeedProvider + key = v1beta1constants.LabelSeedProvider case KindShoot: - key = v1alpha1constants.LabelShootProvider + key = v1beta1constants.LabelShootProvider case KindBackup: - key = v1alpha1constants.LabelBackupProvider + key = v1beta1constants.LabelBackupProvider default: return nil, fmt.Errorf("invalid webhook kind '%s'", kind) } diff --git a/pkg/webhook/controlplane/genericmutator/mutator.go b/pkg/webhook/controlplane/genericmutator/mutator.go index 37fb7c2de..22e3ef321 100644 --- a/pkg/webhook/controlplane/genericmutator/mutator.go +++ b/pkg/webhook/controlplane/genericmutator/mutator.go @@ -24,7 +24,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane" "github.com/coreos/go-systemd/unit" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/go-logr/logr" "github.com/pkg/errors" @@ -160,25 +160,25 @@ func (m *mutator) Mutate(ctx context.Context, obj runtime.Object) error { switch x := obj.(type) { case *corev1.Service: switch x.Name { - case v1alpha1constants.DeploymentNameKubeAPIServer: + case v1beta1constants.DeploymentNameKubeAPIServer: extensionswebhook.LogMutation(m.logger, x.Kind, x.Namespace, x.Name) return m.ensurer.EnsureKubeAPIServerService(ctx, ectx, x) } case *appsv1.Deployment: switch x.Name { - case v1alpha1constants.DeploymentNameKubeAPIServer: + case v1beta1constants.DeploymentNameKubeAPIServer: extensionswebhook.LogMutation(m.logger, x.Kind, x.Namespace, x.Name) return m.ensurer.EnsureKubeAPIServerDeployment(ctx, ectx, x) - case v1alpha1constants.DeploymentNameKubeControllerManager: + case v1beta1constants.DeploymentNameKubeControllerManager: extensionswebhook.LogMutation(m.logger, x.Kind, x.Namespace, x.Name) return m.ensurer.EnsureKubeControllerManagerDeployment(ctx, ectx, x) - case v1alpha1constants.DeploymentNameKubeScheduler: + case v1beta1constants.DeploymentNameKubeScheduler: extensionswebhook.LogMutation(m.logger, x.Kind, x.Namespace, x.Name) return m.ensurer.EnsureKubeSchedulerDeployment(ctx, ectx, x) } case *appsv1.StatefulSet: switch x.Name { - case v1alpha1constants.StatefulSetNameETCDMain, v1alpha1constants.StatefulSetNameETCDEvents: + case v1beta1constants.StatefulSetNameETCDMain, v1beta1constants.StatefulSetNameETCDEvents: extensionswebhook.LogMutation(m.logger, x.Kind, x.Namespace, x.Name) return m.ensurer.EnsureETCDStatefulSet(ctx, ectx, x) } @@ -194,21 +194,21 @@ func (m *mutator) Mutate(ctx context.Context, obj runtime.Object) error { func (m *mutator) mutateOperatingSystemConfig(ctx context.Context, ectx EnsurerContext, osc *extensionsv1alpha1.OperatingSystemConfig) error { // Mutate kubelet.service unit, if present - if u := extensionswebhook.UnitWithName(osc.Spec.Units, v1alpha1constants.OperatingSystemConfigUnitNameKubeletService); u != nil && u.Content != nil { + if u := extensionswebhook.UnitWithName(osc.Spec.Units, v1beta1constants.OperatingSystemConfigUnitNameKubeletService); u != nil && u.Content != nil { if err := m.ensureKubeletServiceUnitContent(ctx, ectx, u.Content); err != nil { return err } } // Mutate kubelet configuration file, if present - if f := extensionswebhook.FileWithPath(osc.Spec.Files, v1alpha1constants.OperatingSystemConfigFilePathKubeletConfig); f != nil && f.Content.Inline != nil { + if f := extensionswebhook.FileWithPath(osc.Spec.Files, v1beta1constants.OperatingSystemConfigFilePathKubeletConfig); f != nil && f.Content.Inline != nil { if err := m.ensureKubeletConfigFileContent(ctx, ectx, f.Content.Inline); err != nil { return err } } // Mutate 99 kubernetes general configuration file, if present - if f := extensionswebhook.FileWithPath(osc.Spec.Files, v1alpha1constants.OperatingSystemConfigFilePathKernelSettings); f != nil && f.Content.Inline != nil { + if f := extensionswebhook.FileWithPath(osc.Spec.Files, v1beta1constants.OperatingSystemConfigFilePathKernelSettings); f != nil && f.Content.Inline != nil { if err := m.ensureKubernetesGeneralConfiguration(ctx, ectx, f.Content.Inline); err != nil { return err } diff --git a/pkg/webhook/controlplane/genericmutator/mutator_test.go b/pkg/webhook/controlplane/genericmutator/mutator_test.go index a2a24fda3..c496cff2f 100644 --- a/pkg/webhook/controlplane/genericmutator/mutator_test.go +++ b/pkg/webhook/controlplane/genericmutator/mutator_test.go @@ -28,8 +28,8 @@ import ( "github.com/gardener/gardener-extensions/pkg/webhook/controlplane/genericmutator" "github.com/coreos/go-systemd/unit" - gardencorevalpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + gardencorevalpha1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo" @@ -113,7 +113,7 @@ var _ = Describe("Mutator", func() { It("should invoke ensurer.EnsureKubeAPIServerService with a kube-apiserver service", func() { var ( svc = &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer}, } ) @@ -147,7 +147,7 @@ var _ = Describe("Mutator", func() { It("should invoke ensurer.EnsureKubeAPIServerDeployment with a kube-apiserver deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeAPIServer}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeAPIServer}, } ) @@ -166,7 +166,7 @@ var _ = Describe("Mutator", func() { It("should invoke ensurer.EnsureKubeControllerManagerDeployment with a kube-controller-manager deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeControllerManager}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeControllerManager}, } ) @@ -185,7 +185,7 @@ var _ = Describe("Mutator", func() { It("should invoke ensurer.EnsureKubeSchedulerDeployment with a kube-scheduler deployment", func() { var ( dep = &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.DeploymentNameKubeScheduler}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.DeploymentNameKubeScheduler}, } ) @@ -219,7 +219,7 @@ var _ = Describe("Mutator", func() { It("should invoke ensurer.EnsureETCDStatefulSet with a etcd-main stateful set", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDMain, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDMain, Namespace: namespace}, } ) @@ -249,7 +249,7 @@ var _ = Describe("Mutator", func() { It("should invoke ensurer.EnsureETCDStatefulSet with a etcd-events stateful set", func() { var ( ss = &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: v1alpha1constants.StatefulSetNameETCDEvents, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: v1beta1constants.StatefulSetNameETCDEvents, Namespace: namespace}, } ) @@ -299,13 +299,13 @@ var _ = Describe("Mutator", func() { Purpose: extensionsv1alpha1.OperatingSystemConfigPurposeReconcile, Units: []extensionsv1alpha1.Unit{ { - Name: v1alpha1constants.OperatingSystemConfigUnitNameKubeletService, + Name: v1beta1constants.OperatingSystemConfigUnitNameKubeletService, Content: util.StringPtr(oldServiceContent), }, }, Files: []extensionsv1alpha1.File{ { - Path: v1alpha1constants.OperatingSystemConfigFilePathKubeletConfig, + Path: v1beta1constants.OperatingSystemConfigFilePathKubeletConfig, Content: extensionsv1alpha1.FileContent{ Inline: &extensionsv1alpha1.FileContentInline{ Data: oldKubeletConfigData, @@ -313,7 +313,7 @@ var _ = Describe("Mutator", func() { }, }, { - Path: v1alpha1constants.OperatingSystemConfigFilePathKernelSettings, + Path: v1beta1constants.OperatingSystemConfigFilePathKernelSettings, Content: extensionsv1alpha1.FileContent{ Inline: &extensionsv1alpha1.FileContentInline{ Data: oldKubernetesGeneralConfigData, @@ -416,7 +416,7 @@ var _ = Describe("Mutator", func() { }) func checkOperatingSystemConfig(osc *extensionsv1alpha1.OperatingSystemConfig) { - kubeletUnit := extensionswebhook.UnitWithName(osc.Spec.Units, v1alpha1constants.OperatingSystemConfigUnitNameKubeletService) + kubeletUnit := extensionswebhook.UnitWithName(osc.Spec.Units, v1beta1constants.OperatingSystemConfigUnitNameKubeletService) Expect(kubeletUnit).To(Not(BeNil())) Expect(kubeletUnit.Content).To(Equal(util.StringPtr(newServiceContent))) @@ -426,11 +426,11 @@ func checkOperatingSystemConfig(osc *extensionsv1alpha1.OperatingSystemConfig) { customFile := extensionswebhook.FileWithPath(osc.Spec.Files, "/test/path") Expect(customFile).To(Not(BeNil())) - kubeletFile := extensionswebhook.FileWithPath(osc.Spec.Files, v1alpha1constants.OperatingSystemConfigFilePathKubeletConfig) + kubeletFile := extensionswebhook.FileWithPath(osc.Spec.Files, v1beta1constants.OperatingSystemConfigFilePathKubeletConfig) Expect(kubeletFile).To(Not(BeNil())) Expect(kubeletFile.Content.Inline).To(Equal(&extensionsv1alpha1.FileContentInline{Data: newKubeletConfigData})) - general := extensionswebhook.FileWithPath(osc.Spec.Files, v1alpha1constants.OperatingSystemConfigFilePathKernelSettings) + general := extensionswebhook.FileWithPath(osc.Spec.Files, v1beta1constants.OperatingSystemConfigFilePathKernelSettings) Expect(general).To(Not(BeNil())) Expect(general.Content.Inline).To(Equal(&extensionsv1alpha1.FileContentInline{Data: newKubernetesGeneralConfigData})) diff --git a/pkg/webhook/handler_shootclient.go b/pkg/webhook/handler_shootclient.go index 1dde30576..a7b955a39 100644 --- a/pkg/webhook/handler_shootclient.go +++ b/pkg/webhook/handler_shootclient.go @@ -25,7 +25,7 @@ import ( "github.com/gardener/gardener-extensions/pkg/util" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "github.com/go-logr/logr" "github.com/pkg/errors" "k8s.io/api/admission/v1beta1" @@ -95,8 +95,8 @@ func (h *handlerShootClient) HandleWithRequest(ctx context.Context, req admissio podList := &corev1.PodList{} if err := h.client.List(ctx, podList, client.MatchingLabels(map[string]string{ - v1alpha1constants.LabelApp: v1alpha1constants.LabelKubernetes, - v1alpha1constants.LabelRole: v1alpha1constants.LabelAPIServer, + v1beta1constants.LabelApp: v1beta1constants.LabelKubernetes, + v1beta1constants.LabelRole: v1beta1constants.LabelAPIServer, })); err != nil { return errors.Wrapf(err, "error while listing all pods") } diff --git a/pkg/webhook/network/network.go b/pkg/webhook/network/network.go index a8f9f501f..3ff64bd4a 100644 --- a/pkg/webhook/network/network.go +++ b/pkg/webhook/network/network.go @@ -17,7 +17,7 @@ package network import ( "github.com/gardener/gardener-extensions/pkg/webhook" extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -85,8 +85,8 @@ func buildSelector(networkProvider, cloudProvider string) (*metav1.LabelSelector // Create and return LabelSelector return &metav1.LabelSelector{ MatchExpressions: []metav1.LabelSelectorRequirement{ - {Key: v1alpha1constants.LabelShootProvider, Operator: metav1.LabelSelectorOpIn, Values: []string{cloudProvider}}, - {Key: v1alpha1constants.LabelNetworkingProvider, Operator: metav1.LabelSelectorOpIn, Values: []string{networkProvider}}, + {Key: v1beta1constants.LabelShootProvider, Operator: metav1.LabelSelectorOpIn, Values: []string{cloudProvider}}, + {Key: v1beta1constants.LabelNetworkingProvider, Operator: metav1.LabelSelectorOpIn, Values: []string{networkProvider}}, }, }, nil } diff --git a/pkg/webhook/shoot/networkpolicy.go b/pkg/webhook/shoot/networkpolicy.go index 11cbbf4f1..7c81b6d01 100644 --- a/pkg/webhook/shoot/networkpolicy.go +++ b/pkg/webhook/shoot/networkpolicy.go @@ -17,7 +17,7 @@ package shoot import ( "context" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" corev1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" @@ -55,8 +55,8 @@ func EnsureNetworkPolicy(ctx context.Context, c client.Client, namespace, provid { NamespaceSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ - v1alpha1constants.LabelControllerRegistrationName: providerName, - v1alpha1constants.GardenRole: v1alpha1constants.GardenRoleExtension, + v1beta1constants.LabelControllerRegistrationName: providerName, + v1beta1constants.GardenRole: v1beta1constants.GardenRoleExtension, }, }, PodSelector: &metav1.LabelSelector{ @@ -70,8 +70,8 @@ func EnsureNetworkPolicy(ctx context.Context, c client.Client, namespace, provid }, PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{ - v1alpha1constants.LabelApp: v1alpha1constants.LabelKubernetes, - v1alpha1constants.LabelRole: v1alpha1constants.LabelAPIServer, + v1beta1constants.LabelApp: v1beta1constants.LabelKubernetes, + v1beta1constants.LabelRole: v1beta1constants.LabelAPIServer, }, }, } diff --git a/pkg/webhook/shoot/shoot.go b/pkg/webhook/shoot/shoot.go index 97ef18d67..08e5a57c5 100644 --- a/pkg/webhook/shoot/shoot.go +++ b/pkg/webhook/shoot/shoot.go @@ -19,7 +19,7 @@ import ( extensionswebhook "github.com/gardener/gardener-extensions/pkg/webhook" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/log" @@ -100,7 +100,7 @@ func buildSelector() (*metav1.LabelSelector, error) { // Create and return LabelSelector return &metav1.LabelSelector{ MatchExpressions: []metav1.LabelSelectorRequirement{ - {Key: v1alpha1constants.GardenerPurpose, Operator: metav1.LabelSelectorOpIn, Values: []string{metav1.NamespaceSystem}}, + {Key: v1beta1constants.GardenerPurpose, Operator: metav1.LabelSelectorOpIn, Values: []string{metav1.NamespaceSystem}}, }, }, nil } diff --git a/test/e2e/framework/networkpolicies/generators/networkpolicies.go b/test/e2e/framework/networkpolicies/generators/networkpolicies.go index fad57277e..77b36ce5d 100644 --- a/test/e2e/framework/networkpolicies/generators/networkpolicies.go +++ b/test/e2e/framework/networkpolicies/generators/networkpolicies.go @@ -120,7 +120,7 @@ func (g *genTest) Imports(c *generator.Context) (imports []string) { `. "github.com/onsi/ginkgo"`, `. "github.com/onsi/gomega"`, `corev1 "k8s.io/api/core/v1"`, - `github.com/gardener/gardener/pkg/apis/core/v1alpha1`, + `github.com/gardener/gardener/pkg/apis/core/v1beta1`, `github.com/gardener/gardener/pkg/client/kubernetes`, `github.com/gardener/gardener/pkg/logger`, `github.com/gardener/gardener-extensions/test/e2e/framework/executor`, @@ -453,7 +453,7 @@ var _ = Describe("Network Policy Testing", func() { shootGardenerTest, err = gardenerframework.NewShootGardenerTest(*kubeconfig, nil, shootAppTestLogger) Expect(err).NotTo(HaveOccurred()) - shoot := &v1alpha1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} + shoot := &v1beta1.Shoot{ObjectMeta: metav1.ObjectMeta{Namespace: *shootNamespace, Name: *shootName}} shootTestOperations, err = gardenerframework.NewGardenTestOperationWithShoot(ctx, shootGardenerTest.GardenClient, shootAppTestLogger, shoot) Expect(err).NotTo(HaveOccurred()) } diff --git a/test/e2e/framework/networkpolicies/types.go b/test/e2e/framework/networkpolicies/types.go index 7dd8a2677..347c8a4c4 100644 --- a/test/e2e/framework/networkpolicies/types.go +++ b/test/e2e/framework/networkpolicies/types.go @@ -18,7 +18,7 @@ import ( "fmt" "github.com/Masterminds/semver" - "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" ) @@ -125,7 +125,7 @@ func NewSinglePort(p int32) []Port { } // CheckVersion checks if shoot version is matched by ShootVersionConstraint. -func (p *Pod) CheckVersion(shoot *v1alpha1.Shoot) bool { +func (p *Pod) CheckVersion(shoot *v1beta1.Shoot) bool { if len(p.ShootVersionConstraint) == 0 { return true } diff --git a/test/e2e/framework/networkpolicies/types_test.go b/test/e2e/framework/networkpolicies/types_test.go index d87b990f1..9e910c3e1 100644 --- a/test/e2e/framework/networkpolicies/types_test.go +++ b/test/e2e/framework/networkpolicies/types_test.go @@ -15,7 +15,7 @@ package networkpolicies import ( - "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/labels" @@ -80,9 +80,9 @@ var _ = Describe("Types", func() { It("should panic when Shoot kubernetes version is invalid", func() { Expect(func() { - shoot := &v1alpha1.Shoot{ - Spec: v1alpha1.ShootSpec{ - Kubernetes: v1alpha1.Kubernetes{ + shoot := &v1beta1.Shoot{ + Spec: v1beta1.ShootSpec{ + Kubernetes: v1beta1.Kubernetes{ Version: "something invalid", }, }, @@ -93,9 +93,9 @@ var _ = Describe("Types", func() { }) It("should return false when Pod versions is greater than Shoot version", func() { - shoot := &v1alpha1.Shoot{ - Spec: v1alpha1.ShootSpec{ - Kubernetes: v1alpha1.Kubernetes{ + shoot := &v1beta1.Shoot{ + Spec: v1beta1.ShootSpec{ + Kubernetes: v1beta1.Kubernetes{ Version: "0.9", }, }, @@ -104,9 +104,9 @@ var _ = Describe("Types", func() { Expect(p.CheckVersion(shoot)).To(BeFalse()) }) It("should return true when Pod versions matches than Shoot version", func() { - shoot := &v1alpha1.Shoot{ - Spec: v1alpha1.ShootSpec{ - Kubernetes: v1alpha1.Kubernetes{ + shoot := &v1beta1.Shoot{ + Spec: v1beta1.ShootSpec{ + Kubernetes: v1beta1.Kubernetes{ Version: "1.1", }, }, diff --git a/vendor/github.com/gardener/gardener-resource-manager/pkg/manager/managedresources.go b/vendor/github.com/gardener/gardener-resource-manager/pkg/manager/managedresources.go index 5e0cd925e..0a9127420 100644 --- a/vendor/github.com/gardener/gardener-resource-manager/pkg/manager/managedresources.go +++ b/vendor/github.com/gardener/gardener-resource-manager/pkg/manager/managedresources.go @@ -21,6 +21,7 @@ import ( corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" ) @@ -93,7 +94,9 @@ func (m *ManagedResource) KeepObjects(v bool) *ManagedResource { } func (m *ManagedResource) Reconcile(ctx context.Context) error { - resource := &resourcesv1alpha1.ManagedResource{ObjectMeta: m.resource.ObjectMeta} + resource := &resourcesv1alpha1.ManagedResource{ + ObjectMeta: metav1.ObjectMeta{Name: m.resource.Name, Namespace: m.resource.Namespace}, + } _, err := controllerutil.CreateOrUpdate(ctx, m.client, resource, func() error { resource.Labels = m.resource.Labels diff --git a/vendor/github.com/gardener/gardener-resource-manager/pkg/manager/managedsecrets.go b/vendor/github.com/gardener/gardener-resource-manager/pkg/manager/managedsecrets.go index 24e72e17a..d04f7cfd5 100644 --- a/vendor/github.com/gardener/gardener-resource-manager/pkg/manager/managedsecrets.go +++ b/vendor/github.com/gardener/gardener-resource-manager/pkg/manager/managedsecrets.go @@ -19,6 +19,7 @@ import ( corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" ) @@ -60,7 +61,9 @@ func (s *Secret) WithKeyValues(keyValues map[string][]byte) *Secret { } func (s *Secret) Reconcile(ctx context.Context) error { - secret := &corev1.Secret{ObjectMeta: s.secret.ObjectMeta} + secret := &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: s.secret.Name, Namespace: s.secret.Namespace}, + } _, err := controllerutil.CreateOrUpdate(ctx, s.client, secret, func() error { secret.Labels = s.secret.Labels diff --git a/vendor/github.com/gardener/gardener/pkg/api/extensions/accessor.go b/vendor/github.com/gardener/gardener/pkg/api/extensions/accessor.go index 9a745ab2f..96d95ee1b 100644 --- a/vendor/github.com/gardener/gardener/pkg/api/extensions/accessor.go +++ b/vendor/github.com/gardener/gardener/pkg/api/extensions/accessor.go @@ -17,7 +17,7 @@ package extensions import ( "fmt" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -128,13 +128,13 @@ func (u unstructuredLastOperationAccessor) GetProgress() int { } // GetState implements LastOperation. -func (u unstructuredLastOperationAccessor) GetState() gardencorev1alpha1.LastOperationState { - return gardencorev1alpha1.LastOperationState(nestedString(u.UnstructuredContent(), "status", "lastOperation", "state")) +func (u unstructuredLastOperationAccessor) GetState() gardencorev1beta1.LastOperationState { + return gardencorev1beta1.LastOperationState(nestedString(u.UnstructuredContent(), "status", "lastOperation", "state")) } // GetType implements LastOperation. -func (u unstructuredLastOperationAccessor) GetType() gardencorev1alpha1.LastOperationType { - return gardencorev1alpha1.LastOperationType(nestedString(u.UnstructuredContent(), "status", "lastOperation", "type")) +func (u unstructuredLastOperationAccessor) GetType() gardencorev1beta1.LastOperationType { + return gardencorev1beta1.LastOperationType(nestedString(u.UnstructuredContent(), "status", "lastOperation", "type")) } // GetExtensionType implements Spec. @@ -143,16 +143,16 @@ func (u unstructuredSpecAccessor) GetExtensionType() string { } // GetConditions implements Status. -func (u unstructuredStatusAccessor) GetConditions() []gardencorev1alpha1.Condition { +func (u unstructuredStatusAccessor) GetConditions() []gardencorev1beta1.Condition { val, ok, err := unstructured.NestedFieldNoCopy(u.UnstructuredContent(), "status", "conditions") if err != nil || !ok { return nil } - var conditions []gardencorev1alpha1.Condition + var conditions []gardencorev1beta1.Condition interfaceConditionSlice := val.([]interface{}) for _, interfaceCondition := range interfaceConditionSlice { new := interfaceCondition.(map[string]interface{}) - condition := &gardencorev1alpha1.Condition{} + condition := &gardencorev1beta1.Condition{} err = runtime.DefaultUnstructuredConverter.FromUnstructured(new, condition) if err != nil { return nil @@ -163,7 +163,7 @@ func (u unstructuredStatusAccessor) GetConditions() []gardencorev1alpha1.Conditi } // SetConditions implements Status. -func (u unstructuredStatusAccessor) SetConditions(conditions []gardencorev1alpha1.Condition) { +func (u unstructuredStatusAccessor) SetConditions(conditions []gardencorev1beta1.Condition) { var interfaceSlice = make([]interface{}, len(conditions)) for i, d := range conditions { unstrc, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&d) @@ -207,11 +207,11 @@ func (u unstructuredLastErrorAccessor) GetTaskID() *string { } // GetCodes implements LastError. -func (u unstructuredLastErrorAccessor) GetCodes() []gardencorev1alpha1.ErrorCode { +func (u unstructuredLastErrorAccessor) GetCodes() []gardencorev1beta1.ErrorCode { codeStrings := nestedStringSlice(u.Object, "status", "lastError", "codes") - var codes []gardencorev1alpha1.ErrorCode + var codes []gardencorev1beta1.ErrorCode for _, codeString := range codeStrings { - codes = append(codes, gardencorev1alpha1.ErrorCode(codeString)) + codes = append(codes, gardencorev1beta1.ErrorCode(codeString)) } return codes } diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/install/install.go b/vendor/github.com/gardener/gardener/pkg/apis/core/install/install.go new file mode 100644 index 000000000..78c1b282d --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/install/install.go @@ -0,0 +1,33 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package install + +import ( + "github.com/gardener/gardener/pkg/apis/core" + "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" + + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +// Install registers the API group and adds types to a scheme. +func Install(scheme *runtime.Scheme) { + utilruntime.Must(core.AddToScheme(scheme)) + utilruntime.Must(v1alpha1.AddToScheme(scheme)) + utilruntime.Must(v1beta1.AddToScheme(scheme)) + + utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion, v1beta1.SchemeGroupVersion)) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/register.go b/vendor/github.com/gardener/gardener/pkg/apis/core/register.go index d28aa6dba..1eedd3397 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/register.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/register.go @@ -66,6 +66,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &garden.SecretBindingList{}, &garden.Seed{}, &garden.SeedList{}, + &ShootState{}, + &ShootStateList{}, &garden.Shoot{}, &garden.ShootList{}, ) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/types_backupbucket.go b/vendor/github.com/gardener/gardener/pkg/apis/core/types_backupbucket.go index 421af0496..27b006a81 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/types_backupbucket.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/types_backupbucket.go @@ -51,8 +51,8 @@ type BackupBucketSpec struct { Provider BackupBucketProvider // SecretRef is a reference to a secret that contains the credentials to access object store. SecretRef corev1.SecretReference - // Seed holds the name of the seed allocated to BackupBucket for running controller. - Seed *string + // SeedName holds the name of the seed allocated to BackupBucket for running controller. + SeedName *string } // BackupBucketStatus holds the most recently observed status of the Backup Bucket. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/types_backupentry.go b/vendor/github.com/gardener/gardener/pkg/apis/core/types_backupentry.go index 26c564b44..287334741 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/types_backupentry.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/types_backupentry.go @@ -52,8 +52,8 @@ type BackupEntryList struct { type BackupEntrySpec struct { // BucketName is the name of backup bucket for this Backup Entry. BucketName string - // Seed holds the name of the seed allocated to BackupBucket for running controller. - Seed *string + // SeedName holds the name of the seed allocated to BackupBucket for running controller. + SeedName *string } // BackupEntryStatus holds the most recently observed status of the Backup Entry. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/types_shootstate.go b/vendor/github.com/gardener/gardener/pkg/apis/core/types_shootstate.go new file mode 100644 index 000000000..608376e24 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/types_shootstate.go @@ -0,0 +1,69 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 core + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ShootState contains the state of a Shoot cluster required to migrate the Shoot's control plane to a new Seed. +type ShootState struct { + metav1.TypeMeta + // Standard object metadata. + metav1.ObjectMeta + // Specification of the ShootState. + Spec ShootStateSpec +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ShootStateList is a list of ShootState objects. +type ShootStateList struct { + metav1.TypeMeta + // Standard list object metadata. + metav1.ListMeta + // Items is the list of ShootStates. + Items []ShootState +} + +// ShootStateSpec is the specification of the ShootState. +type ShootStateSpec struct { + // Gardener holds the data required to generate resources deployed by the gardenlet + Gardener []GardenerResourceData + // Extensions holds the state of custom resources reconciled by extension controllers in the seed + Extensions []ExtensionResourceState +} + +// GardenerResourceData holds the data which is used to generate resources, deployed in the Shoot's control plane. +type GardenerResourceData struct { + // Name of the object required to generate resources + Name string + // Data contains the payload required to generate resources + Data map[string]string +} + +// ExtensionResourceState contains the kind of the extension custom resource and its last observed state in the Shoot's +// namespace on the Seed cluster. +type ExtensionResourceState struct { + // Kind (type) of the extension custom resource + Kind string + // Purpose of the extension custom resource + Purpose *string + // State of the extension resource + State ProviderConfig +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants/types_constants.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants/types_constants.go index 30734ebbd..b3a8afe60 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants/types_constants.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants/types_constants.go @@ -43,16 +43,32 @@ const ( // privileges. SecretNameGardener = "gardener" + // ConfigMapNameDependencyWatchdog is a constant for the name of a Kubernetes configmap object that used to + // configure the dependency-watchdog pod. + ConfigMapNameDependencyWatchdog = "dependency-watchdog-config" + // VPANameDependencyWatchdog is a constant for the name of a Kubernetes VPA object that used to + // scale the dependency-watchdog pod. + VPANameDependencyWatchdog = "dependency-watchdog-vpa" + // ServiceAccountNameDependencyWatchdog is a constant for the name of a Kubernetes serviceaccount object that used to + // authorise the dependency-watchdog pod. + ServiceAccountNameDependencyWatchdog = "dependency-watchdog" + // RoleBindingNameDependencyWatchdog is a constant for the name of a Kubernetes rolebinding object that used to + // authorise the dependency-watchdog pod. + RoleBindingNameDependencyWatchdog = "gardener.cloud:dependency-watchdog:role-binding" + // RoleNameDependencyWatchdog is a constant for the name of a Kubernetes role object that used to + // authorise the dependency-watchdog pod. + RoleNameDependencyWatchdog = "gardener.cloud:dependency-watchdog:role" + // DeploymentNameClusterAutoscaler is a constant for the name of a Kubernetes deployment object that contains // the cluster-autoscaler pod. DeploymentNameClusterAutoscaler = "cluster-autoscaler" - // DeploymentNameClusterAutoscaler is a constant for the name of a Kubernetes deployment object that contains + // DeploymentNameDependencyWatchdog is a constant for the name of a Kubernetes deployment object that contains // the dependency-watchdog pod. DeploymentNameDependencyWatchdog = "dependency-watchdog" - // DeploymentNameClusterAutoscaler is a constant for the name of a Kubernetes deployment object that contains + // DeploymentNameKubeAPIServer is a constant for the name of a Kubernetes deployment object that contains // the kube-apiserver pod. DeploymentNameKubeAPIServer = "kube-apiserver" - // DeploymentNameClusterAutoscaler is a constant for the name of a Kubernetes deployment object that contains + // DeploymentNameKubeControllerManager is a constant for the name of a Kubernetes deployment object that contains // the kube-controller-manager pod. DeploymentNameKubeControllerManager = "kube-controller-manager" @@ -227,6 +243,9 @@ const ( // For example, if the shoot is annotated with key=value, // then the namespace in the seed will be annotated with key=value, as well. AnnotationShootCustom = "custom.shoot.sapcloud.io/" + // AnnotationShootSkipCleanup is a key for an annotation on a Shoot resource that declares that the clean up steps should be skipped when the + // cluster is deleted. Concretely, this will skip everything except the deletion of (load balancer) services and persistent volume resources. + AnnotationShootSkipCleanup = "shoot.gardener.cloud/skip-cleanup" // OperatingSystemConfigUnitNameKubeletService is a constant for a unit in the operating system config that contains the kubelet service. OperatingSystemConfigUnitNameKubeletService = "kubelet.service" diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/conversions.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/conversions.go new file mode 100644 index 000000000..ee34ff276 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/conversions.go @@ -0,0 +1,1822 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 ( + "encoding/json" + "fmt" + "strings" + "unsafe" + + "github.com/gardener/gardener/pkg/apis/core" + "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + "github.com/gardener/gardener/pkg/apis/garden" + "github.com/gardener/gardener/pkg/utils" + + alicloudinstall "github.com/gardener/gardener-extensions/controllers/provider-alicloud/pkg/apis/alicloud/install" + alicloudv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-alicloud/pkg/apis/alicloud/v1alpha1" + awsinstall "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws/install" + awsv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws/v1alpha1" + azureinstall "github.com/gardener/gardener-extensions/controllers/provider-azure/pkg/apis/azure/install" + azurev1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-azure/pkg/apis/azure/v1alpha1" + gcpinstall "github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/apis/gcp/install" + gcpv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/apis/gcp/v1alpha1" + openstackinstall "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack/install" + openstackv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/klog" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + if err := scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("Shoot"), + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", "metadata.namespace", garden.ShootSeedName, garden.ShootCloudProfileName: + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ); err != nil { + return err + } + + // Add non-generated conversion functions + return scheme.AddConversionFuncs( + Convert_v1alpha1_BackupBucket_To_core_BackupBucket, + Convert_core_BackupBucket_To_v1alpha1_BackupBucket, + Convert_v1alpha1_BackupEntry_To_core_BackupEntry, + Convert_core_BackupEntry_To_v1alpha1_BackupEntry, + Convert_v1alpha1_Seed_To_garden_Seed, + Convert_garden_Seed_To_v1alpha1_Seed, + Convert_v1alpha1_CloudProfile_To_garden_CloudProfile, + Convert_garden_CloudProfile_To_v1alpha1_CloudProfile, + ) +} + +func Convert_v1alpha1_BackupBucket_To_core_BackupBucket(in *BackupBucket, out *core.BackupBucket, s conversion.Scope) error { + if err := autoConvert_v1alpha1_BackupBucket_To_core_BackupBucket(in, out, s); err != nil { + return err + } + + out.Spec.SeedName = in.Spec.Seed + + return nil +} + +func Convert_core_BackupBucket_To_v1alpha1_BackupBucket(in *core.BackupBucket, out *BackupBucket, s conversion.Scope) error { + if err := autoConvert_core_BackupBucket_To_v1alpha1_BackupBucket(in, out, s); err != nil { + return err + } + + out.Spec.Seed = in.Spec.SeedName + + return nil +} + +func Convert_core_BackupBucketSpec_To_v1alpha1_BackupBucketSpec(in *core.BackupBucketSpec, out *BackupBucketSpec, s conversion.Scope) error { + return autoConvert_core_BackupBucketSpec_To_v1alpha1_BackupBucketSpec(in, out, s) +} + +func Convert_v1alpha1_BackupBucketSpec_To_core_BackupBucketSpec(in *BackupBucketSpec, out *core.BackupBucketSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_BackupBucketSpec_To_core_BackupBucketSpec(in, out, s) +} + +func Convert_v1alpha1_BackupEntry_To_core_BackupEntry(in *BackupEntry, out *core.BackupEntry, s conversion.Scope) error { + if err := autoConvert_v1alpha1_BackupEntry_To_core_BackupEntry(in, out, s); err != nil { + return err + } + + out.Spec.SeedName = in.Spec.Seed + + return nil +} + +func Convert_core_BackupEntry_To_v1alpha1_BackupEntry(in *core.BackupEntry, out *BackupEntry, s conversion.Scope) error { + if err := autoConvert_core_BackupEntry_To_v1alpha1_BackupEntry(in, out, s); err != nil { + return err + } + + out.Spec.Seed = in.Spec.SeedName + + return nil +} + +func Convert_core_BackupEntrySpec_To_v1alpha1_BackupEntrySpec(in *core.BackupEntrySpec, out *BackupEntrySpec, s conversion.Scope) error { + return autoConvert_core_BackupEntrySpec_To_v1alpha1_BackupEntrySpec(in, out, s) +} + +func Convert_v1alpha1_BackupEntrySpec_To_core_BackupEntrySpec(in *BackupEntrySpec, out *core.BackupEntrySpec, s conversion.Scope) error { + return autoConvert_v1alpha1_BackupEntrySpec_To_core_BackupEntrySpec(in, out, s) +} + +func Convert_v1alpha1_Seed_To_garden_Seed(in *Seed, out *garden.Seed, s conversion.Scope) error { + if err := autoConvert_v1alpha1_Seed_To_garden_Seed(in, out, s); err != nil { + return err + } + + if a := in.Annotations; a != nil { + if v, ok := a[garden.MigrationSeedCloudProfile]; ok { + out.Spec.Cloud.Profile = v + } + + if v, ok := a[garden.MigrationSeedCloudRegion]; ok { + out.Spec.Cloud.Region = v + } + } + + out.Spec.IngressDomain = in.Spec.DNS.IngressDomain + out.Spec.Cloud.Region = in.Spec.Provider.Region + out.Spec.Networks.BlockCIDRs = in.Spec.BlockCIDRs + + return nil +} + +func Convert_garden_Seed_To_v1alpha1_Seed(in *garden.Seed, out *Seed, s conversion.Scope) error { + if err := autoConvert_garden_Seed_To_v1alpha1_Seed(in, out, s); err != nil { + return err + } + + if len(in.Spec.Cloud.Profile) > 0 || len(in.Spec.Cloud.Region) > 0 || in.Spec.Volume != nil { + old := out.Annotations + out.Annotations = make(map[string]string, len(old)+2) + for k, v := range old { + if k != "persistentvolume.garden.sapcloud.io/provider" && k != "persistentvolume.garden.sapcloud.io/minimumSize" { + out.Annotations[k] = v + } + } + } + + if len(in.Spec.Cloud.Profile) > 0 { + out.Annotations[garden.MigrationSeedCloudProfile] = in.Spec.Cloud.Profile + } + + if len(in.Spec.Cloud.Region) > 0 { + out.Annotations[garden.MigrationSeedCloudRegion] = in.Spec.Cloud.Region + } + + if len(in.Spec.IngressDomain) > 0 { + out.Spec.DNS = SeedDNS{ + IngressDomain: in.Spec.IngressDomain, + } + } + + out.Spec.BlockCIDRs = in.Spec.Networks.BlockCIDRs + + return nil +} + +func Convert_garden_SeedSpec_To_v1alpha1_SeedSpec(in *garden.SeedSpec, out *SeedSpec, s conversion.Scope) error { + return autoConvert_garden_SeedSpec_To_v1alpha1_SeedSpec(in, out, s) +} + +func Convert_v1alpha1_SeedSpec_To_garden_SeedSpec(in *SeedSpec, out *garden.SeedSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedSpec_To_garden_SeedSpec(in, out, s) +} + +func Convert_garden_SeedNetworks_To_v1alpha1_SeedNetworks(in *garden.SeedNetworks, out *SeedNetworks, s conversion.Scope) error { + return autoConvert_garden_SeedNetworks_To_v1alpha1_SeedNetworks(in, out, s) +} + +func Convert_v1alpha1_SeedNetworks_To_garden_SeedNetworks(in *SeedNetworks, out *garden.SeedNetworks, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedNetworks_To_garden_SeedNetworks(in, out, s) +} + +func Convert_v1alpha1_ProjectSpec_To_garden_ProjectSpec(in *ProjectSpec, out *garden.ProjectSpec, s conversion.Scope) error { + if err := autoConvert_v1alpha1_ProjectSpec_To_garden_ProjectSpec(in, out, s); err != nil { + return err + } + + for _, member := range in.Members { + out.ProjectMembers = append(out.ProjectMembers, garden.ProjectMember{ + Subject: member.Subject, + Role: member.Role, + }) + } + + return nil +} + +func Convert_garden_ProjectSpec_To_v1alpha1_ProjectSpec(in *garden.ProjectSpec, out *ProjectSpec, s conversion.Scope) error { + if err := autoConvert_garden_ProjectSpec_To_v1alpha1_ProjectSpec(in, out, s); err != nil { + return err + } + + for _, member := range in.ProjectMembers { + out.Members = append(out.Members, ProjectMember{ + Subject: member.Subject, + Role: member.Role, + }) + } + + return nil +} + +func Convert_v1alpha1_CloudProfile_To_garden_CloudProfile(in *CloudProfile, out *garden.CloudProfile, s conversion.Scope) error { + if err := autoConvert_v1alpha1_CloudProfile_To_garden_CloudProfile(in, out, s); err != nil { + return err + } + + if out.Annotations == nil { + out.Annotations = make(map[string]string) + } + + switch in.Spec.Type { + case "aws": + if out.Spec.AWS == nil { + out.Spec.AWS = &garden.AWSProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.AWS.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.AWS.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.AWS.Constraints.Kubernetes.OfferedVersions = append(out.Spec.AWS.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.AWS.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.AWS.Constraints.MachineImages = append(out.Spec.AWS.Constraints.MachineImages, m) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !machineTypesHaveName(out.Spec.AWS.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := autoConvert_v1alpha1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.AWS.Constraints.MachineTypes = append(out.Spec.AWS.Constraints.MachineTypes, o) + } + } + + for _, volumeType := range in.Spec.VolumeTypes { + if !volumeTypesHaveName(out.Spec.AWS.Constraints.VolumeTypes, volumeType.Name) { + var o garden.VolumeType + if err := autoConvert_v1alpha1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.AWS.Constraints.VolumeTypes = append(out.Spec.AWS.Constraints.VolumeTypes, o) + } + } + + for _, region := range in.Spec.Regions { + if !zonesHaveName(out.Spec.AWS.Constraints.Zones, region.Name) { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + } + out.Spec.AWS.Constraints.Zones = append(out.Spec.AWS.Constraints.Zones, z) + } + } + + case "azure": + if out.Spec.Azure == nil { + out.Spec.Azure = &garden.AzureProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.Azure.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.Azure.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.Azure.Constraints.Kubernetes.OfferedVersions = append(out.Spec.Azure.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.Azure.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.Azure.Constraints.MachineImages = append(out.Spec.Azure.Constraints.MachineImages, m) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !machineTypesHaveName(out.Spec.Azure.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := autoConvert_v1alpha1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.Azure.Constraints.MachineTypes = append(out.Spec.Azure.Constraints.MachineTypes, o) + } + } + + for _, volumeType := range in.Spec.VolumeTypes { + if !volumeTypesHaveName(out.Spec.Azure.Constraints.VolumeTypes, volumeType.Name) { + var o garden.VolumeType + if err := autoConvert_v1alpha1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.Azure.Constraints.VolumeTypes = append(out.Spec.Azure.Constraints.VolumeTypes, o) + } + } + + for _, region := range in.Spec.Regions { + if !zonesHaveName(out.Spec.Azure.Constraints.Zones, region.Name) { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + } + out.Spec.Azure.Constraints.Zones = append(out.Spec.Azure.Constraints.Zones, z) + } + } + cloudProfileConfig := &azurev1alpha1.CloudProfileConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: azurev1alpha1.SchemeGroupVersion.String(), + Kind: "CloudProfileConfig", + }, + } + if in.Spec.ProviderConfig != nil { + extensionsScheme := runtime.NewScheme() + if err := azureinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + switch { + case in.Spec.ProviderConfig.Object != nil: + var ok bool + cloudProfileConfig, ok = in.Spec.ProviderConfig.Object.(*azurev1alpha1.CloudProfileConfig) + if !ok { + klog.Errorf("Cannot cast providerConfig of core.gardener.cloud/v1alpha1.CloudProfile %s", in.Name) + } + case in.Spec.ProviderConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.ProviderConfig.Raw, nil, cloudProfileConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode providerConfig of core.gardener.cloud/v1alpha1.CloudProfile %s", in.Name) + } + } + } + for _, c := range cloudProfileConfig.CountFaultDomains { + if !domainCountsHaveRegion(out.Spec.Azure.CountFaultDomains, c.Region) { + out.Spec.Azure.CountFaultDomains = append(out.Spec.Azure.CountFaultDomains, garden.AzureDomainCount{ + Region: c.Region, + Count: c.Count, + }) + } + } + for _, c := range cloudProfileConfig.CountUpdateDomains { + if !domainCountsHaveRegion(out.Spec.Azure.CountUpdateDomains, c.Region) { + out.Spec.Azure.CountUpdateDomains = append(out.Spec.Azure.CountUpdateDomains, garden.AzureDomainCount{ + Region: c.Region, + Count: c.Count, + }) + } + } + + case "gcp": + if out.Spec.GCP == nil { + out.Spec.GCP = &garden.GCPProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.GCP.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.GCP.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.GCP.Constraints.Kubernetes.OfferedVersions = append(out.Spec.GCP.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.GCP.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.GCP.Constraints.MachineImages = append(out.Spec.GCP.Constraints.MachineImages, m) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !machineTypesHaveName(out.Spec.GCP.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := autoConvert_v1alpha1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.GCP.Constraints.MachineTypes = append(out.Spec.GCP.Constraints.MachineTypes, o) + } + } + + for _, volumeType := range in.Spec.VolumeTypes { + if !volumeTypesHaveName(out.Spec.GCP.Constraints.VolumeTypes, volumeType.Name) { + var o garden.VolumeType + if err := autoConvert_v1alpha1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.GCP.Constraints.VolumeTypes = append(out.Spec.GCP.Constraints.VolumeTypes, o) + } + } + + for _, region := range in.Spec.Regions { + if !zonesHaveName(out.Spec.GCP.Constraints.Zones, region.Name) { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + } + out.Spec.GCP.Constraints.Zones = append(out.Spec.GCP.Constraints.Zones, z) + } + } + + case "openstack": + if out.Spec.OpenStack == nil { + out.Spec.OpenStack = &garden.OpenStackProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.OpenStack.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.OpenStack.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.OpenStack.Constraints.Kubernetes.OfferedVersions = append(out.Spec.OpenStack.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.OpenStack.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.OpenStack.Constraints.MachineImages = append(out.Spec.OpenStack.Constraints.MachineImages, m) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !openStackMachineTypesHaveName(out.Spec.OpenStack.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := Convert_v1alpha1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + t := garden.OpenStackMachineType{MachineType: o} + if machineType.Storage != nil { + t.Storage = &garden.MachineTypeStorage{ + Class: machineType.Storage.Class, + Size: machineType.Storage.Size, + Type: machineType.Storage.Type, + } + t.VolumeSize = machineType.Storage.Size + t.VolumeType = machineType.Storage.Type + } + out.Spec.OpenStack.Constraints.MachineTypes = append(out.Spec.OpenStack.Constraints.MachineTypes, t) + } + } + + for _, region := range in.Spec.Regions { + if !zonesHaveName(out.Spec.OpenStack.Constraints.Zones, region.Name) { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + } + out.Spec.OpenStack.Constraints.Zones = append(out.Spec.OpenStack.Constraints.Zones, z) + } + } + + cloudProfileConfig := &openstackv1alpha1.CloudProfileConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: openstackv1alpha1.SchemeGroupVersion.String(), + Kind: "CloudProfileConfig", + }, + } + if in.Spec.ProviderConfig != nil { + extensionsScheme := runtime.NewScheme() + if err := openstackinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + switch { + case in.Spec.ProviderConfig.Object != nil: + var ok bool + cloudProfileConfig, ok = in.Spec.ProviderConfig.Object.(*openstackv1alpha1.CloudProfileConfig) + if !ok { + klog.Errorf("Cannot cast providerConfig of core.gardener.cloud/v1alpha1.CloudProfile %s", in.Name) + } + case in.Spec.ProviderConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.ProviderConfig.Raw, nil, cloudProfileConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode providerConfig of core.gardener.cloud/v1alpha1.CloudProfile %s", in.Name) + } + } + } + for _, p := range cloudProfileConfig.Constraints.LoadBalancerProviders { + if !loadBalancerProvidersHaveName(out.Spec.OpenStack.Constraints.LoadBalancerProviders, p.Name) { + out.Spec.OpenStack.Constraints.LoadBalancerProviders = append(out.Spec.OpenStack.Constraints.LoadBalancerProviders, garden.OpenStackLoadBalancerProvider{ + Name: p.Name, + }) + } + } + for _, p := range cloudProfileConfig.Constraints.FloatingPools { + if !floatingPoolsHavePool(out.Spec.OpenStack.Constraints.FloatingPools, p.Name) { + f := garden.OpenStackFloatingPool{ + Name: p.Name, + } + for _, c := range p.LoadBalancerClasses { + f.LoadBalancerClasses = append(f.LoadBalancerClasses, garden.OpenStackLoadBalancerClass{ + Name: c.Name, + FloatingSubnetID: c.FloatingSubnetID, + FloatingNetworkID: c.FloatingNetworkID, + SubnetID: c.SubnetID, + }) + } + out.Spec.OpenStack.Constraints.FloatingPools = append(out.Spec.OpenStack.Constraints.FloatingPools, f) + } + } + out.Spec.OpenStack.DNSServers = cloudProfileConfig.DNSServers + out.Spec.OpenStack.DHCPDomain = cloudProfileConfig.DHCPDomain + out.Spec.OpenStack.KeyStoneURL = cloudProfileConfig.KeyStoneURL + out.Spec.OpenStack.RequestTimeout = cloudProfileConfig.RequestTimeout + + case "alicloud": + if out.Spec.Alicloud == nil { + out.Spec.Alicloud = &garden.AlicloudProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.Alicloud.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.Alicloud.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.Alicloud.Constraints.Kubernetes.OfferedVersions = append(out.Spec.Alicloud.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.Alicloud.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.Alicloud.Constraints.MachineImages = append(out.Spec.Alicloud.Constraints.MachineImages, m) + } + } + + allZones := sets.NewString() + unavailableMachineTypesPerZone := map[string][]string{} + unavailableVolumeTypesPerZone := map[string][]string{} + for _, region := range in.Spec.Regions { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + allZones.Insert(zones.Name) + for _, t := range zones.UnavailableMachineTypes { + unavailableMachineTypesPerZone[zones.Name] = append(unavailableMachineTypesPerZone[zones.Name], t) + } + for _, t := range zones.UnavailableVolumeTypes { + unavailableVolumeTypesPerZone[zones.Name] = append(unavailableVolumeTypesPerZone[zones.Name], t) + } + } + if !zonesHaveName(out.Spec.Alicloud.Constraints.Zones, region.Name) { + out.Spec.Alicloud.Constraints.Zones = append(out.Spec.Alicloud.Constraints.Zones, z) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !alicloudMachineTypesHaveName(out.Spec.Alicloud.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := Convert_v1alpha1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + var zones []string + for _, zone := range allZones.List() { + if !zoneHaveAlicloudType(unavailableMachineTypesPerZone, zone, machineType.Name) { + zones = append(zones, zone) + } + } + out.Spec.Alicloud.Constraints.MachineTypes = append(out.Spec.Alicloud.Constraints.MachineTypes, garden.AlicloudMachineType{ + MachineType: o, + Zones: zones, + }) + } + } + + for _, volumeType := range in.Spec.VolumeTypes { + if !alicloudVolumeTypesHaveName(out.Spec.Alicloud.Constraints.VolumeTypes, volumeType.Name) { + var o garden.VolumeType + if err := Convert_v1alpha1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + var zones []string + for _, zone := range allZones.List() { + if !zoneHaveAlicloudType(unavailableVolumeTypesPerZone, zone, volumeType.Name) { + zones = append(zones, zone) + } + } + out.Spec.Alicloud.Constraints.VolumeTypes = append(out.Spec.Alicloud.Constraints.VolumeTypes, garden.AlicloudVolumeType{ + VolumeType: o, + Zones: zones, + }) + } + } + + case "packet": + if out.Spec.Packet == nil { + out.Spec.Packet = &garden.PacketProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.Packet.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.Packet.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.Packet.Constraints.Kubernetes.OfferedVersions = append(out.Spec.Packet.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.Packet.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.Packet.Constraints.MachineImages = append(out.Spec.Packet.Constraints.MachineImages, m) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !machineTypesHaveName(out.Spec.Packet.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := autoConvert_v1alpha1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.Packet.Constraints.MachineTypes = append(out.Spec.Packet.Constraints.MachineTypes, o) + } + } + + for _, volumeType := range in.Spec.VolumeTypes { + if !volumeTypesHaveName(out.Spec.Packet.Constraints.VolumeTypes, volumeType.Name) { + var o garden.VolumeType + if err := autoConvert_v1alpha1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.Packet.Constraints.VolumeTypes = append(out.Spec.Packet.Constraints.VolumeTypes, o) + } + } + + for _, region := range in.Spec.Regions { + if !zonesHaveName(out.Spec.Packet.Constraints.Zones, region.Name) { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + } + out.Spec.Packet.Constraints.Zones = append(out.Spec.Packet.Constraints.Zones, z) + } + } + + default: + out.Annotations[garden.MigrationCloudProfileType] = in.Spec.Type + } + + if in.Spec.ProviderConfig != nil { + data, err := json.Marshal(in.Spec.ProviderConfig) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileProviderConfig] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileProviderConfig) + } + + if in.Spec.SeedSelector != nil { + data, err := json.Marshal(in.Spec.SeedSelector) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileSeedSelector] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileSeedSelector) + } + + return nil +} + +func Convert_garden_CloudProfile_To_v1alpha1_CloudProfile(in *garden.CloudProfile, out *CloudProfile, s conversion.Scope) error { + if err := autoConvert_garden_CloudProfile_To_v1alpha1_CloudProfile(in, out, s); err != nil { + return err + } + + switch { + case in.Spec.AWS != nil: + out.Spec.Type = "aws" + + if len(in.Spec.AWS.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.AWS.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + + case in.Spec.Azure != nil: + out.Spec.Type = "azure" + + if len(in.Spec.Azure.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.Azure.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + + case in.Spec.GCP != nil: + out.Spec.Type = "gcp" + + if len(in.Spec.GCP.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.GCP.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + + case in.Spec.OpenStack != nil: + out.Spec.Type = "openstack" + + if len(in.Spec.OpenStack.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.OpenStack.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + out.Spec.VolumeTypes = nil + + case in.Spec.Alicloud != nil: + out.Spec.Type = "alicloud" + + if len(in.Spec.Alicloud.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.Alicloud.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + + case in.Spec.Packet != nil: + out.Spec.Type = "packet" + + if len(in.Spec.Packet.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.Packet.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + } + + return nil +} + +func Convert_v1alpha1_CloudProfileSpec_To_garden_CloudProfileSpec(in *CloudProfileSpec, out *garden.CloudProfileSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_CloudProfileSpec_To_garden_CloudProfileSpec(in, out, s) +} + +func Convert_garden_CloudProfileSpec_To_v1alpha1_CloudProfileSpec(in *garden.CloudProfileSpec, out *CloudProfileSpec, s conversion.Scope) error { + return autoConvert_garden_CloudProfileSpec_To_v1alpha1_CloudProfileSpec(in, out, s) +} + +func dnsProviderConstraintToStringSlice(dnsConstraints []garden.DNSProviderConstraint) []string { + out := make([]string, 0, len(dnsConstraints)) + for _, d := range dnsConstraints { + out = append(out, d.Name) + } + return out +} + +func stringSliceToDNSProviderConstraint(slice []string) []garden.DNSProviderConstraint { + dnsConstraints := make([]garden.DNSProviderConstraint, 0, len(slice)) + for _, s := range slice { + dnsConstraints = append(dnsConstraints, garden.DNSProviderConstraint{Name: s}) + } + return dnsConstraints +} + +func offeredVersionsHaveVersion(offeredVersions []garden.KubernetesVersion, version string) bool { + for _, v := range offeredVersions { + if v.Version == version { + return true + } + } + return false +} + +func machineImagesHaveImage(machineImages []garden.MachineImage, name string) bool { + for _, i := range machineImages { + if i.Name == name { + return true + } + } + return false +} + +func machineTypesHaveName(machineTypes []garden.MachineType, name string) bool { + for _, i := range machineTypes { + if i.Name == name { + return true + } + } + return false +} + +func volumeTypesHaveName(volumeTypes []garden.VolumeType, name string) bool { + for _, i := range volumeTypes { + if i.Name == name { + return true + } + } + return false +} + +func alicloudMachineTypesHaveName(machineTypes []garden.AlicloudMachineType, name string) bool { + for _, i := range machineTypes { + if i.Name == name { + return true + } + } + return false +} + +func alicloudVolumeTypesHaveName(volumeTypes []garden.AlicloudVolumeType, name string) bool { + for _, i := range volumeTypes { + if i.Name == name { + return true + } + } + return false +} + +func openStackMachineTypesHaveName(machineTypes []garden.OpenStackMachineType, name string) bool { + for _, i := range machineTypes { + if i.Name == name { + return true + } + } + return false +} + +func zonesHaveName(zones []garden.Zone, name string) bool { + for _, z := range zones { + if z.Region == name { + return true + } + } + return false +} + +func zoneHaveAlicloudType(typesPerZone map[string][]string, name, typeName string) bool { + types, ok := typesPerZone[name] + if !ok { + return false + } + + for _, t := range types { + if t == typeName { + return true + } + } + return false +} + +func domainCountsHaveRegion(domainCount []garden.AzureDomainCount, regionName string) bool { + for _, d := range domainCount { + if d.Region == regionName { + return true + } + } + return false +} + +func loadBalancerProvidersHaveName(providers []garden.OpenStackLoadBalancerProvider, providerName string) bool { + for _, d := range providers { + if d.Name == providerName { + return true + } + } + return false +} + +func floatingPoolsHavePool(pools []garden.OpenStackFloatingPool, poolName string) bool { + for _, d := range pools { + if d.Name == poolName { + return true + } + } + return false +} + +func Convert_v1alpha1_Shoot_To_garden_Shoot(in *Shoot, out *garden.Shoot, s conversion.Scope) error { + if err := autoConvert_v1alpha1_Shoot_To_garden_Shoot(in, out, s); err != nil { + return err + } + + var addonClusterAutoScaler *garden.AddonClusterAutoscaler + if data, ok := in.Annotations[garden.MigrationShootAddonsClusterAutoscaler]; ok { + addonClusterAutoScaler = &garden.AddonClusterAutoscaler{} + if err := json.Unmarshal([]byte(data), addonClusterAutoScaler); err != nil { + return err + } + } + out.Spec.Addons.ClusterAutoscaler = addonClusterAutoScaler + + var addonHeapster *garden.Heapster + if data, ok := in.Annotations[garden.MigrationShootAddonsHeapster]; ok { + addonHeapster = &garden.Heapster{} + if err := json.Unmarshal([]byte(data), addonHeapster); err != nil { + return err + } + } + out.Spec.Addons.Heapster = addonHeapster + + var addonKubeLego *garden.KubeLego + if data, ok := in.Annotations[garden.MigrationShootAddonsKubeLego]; ok { + addonKubeLego = &garden.KubeLego{} + if err := json.Unmarshal([]byte(data), addonKubeLego); err != nil { + return err + } + } + out.Spec.Addons.KubeLego = addonKubeLego + + var addonKube2IAM *garden.Kube2IAM + if data, ok := in.Annotations[garden.MigrationShootAddonsKube2IAM]; ok { + addonKube2IAM = &garden.Kube2IAM{} + if err := json.Unmarshal([]byte(data), addonKube2IAM); err != nil { + return err + } + } + out.Spec.Addons.Kube2IAM = addonKube2IAM + + var addonMonocular *garden.Monocular + if data, ok := in.Annotations[garden.MigrationShootAddonsMonocular]; ok { + addonMonocular = &garden.Monocular{} + if err := json.Unmarshal([]byte(data), addonMonocular); err != nil { + return err + } + } + out.Spec.Addons.Monocular = addonMonocular + + switch in.Spec.Provider.Type { + case "aws": + if out.Spec.Cloud.AWS == nil { + out.Spec.Cloud.AWS = &garden.AWSCloud{} + } + + extensionsScheme := runtime.NewScheme() + if err := awsinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + + infrastructureConfig := &awsv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: awsv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + if in.Spec.Provider.InfrastructureConfig != nil { + switch { + case in.Spec.Provider.InfrastructureConfig.Object != nil: + var ok bool + infrastructureConfig, ok = in.Spec.Provider.InfrastructureConfig.Object.(*awsv1alpha1.InfrastructureConfig) + if !ok { + klog.Errorf("Cannot cast infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + case in.Spec.Provider.InfrastructureConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.InfrastructureConfig.Raw, nil, infrastructureConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + } + } + + out.Spec.Cloud.AWS.Zones = nil + out.Spec.Cloud.AWS.Networks.Internal = nil + out.Spec.Cloud.AWS.Networks.Public = nil + out.Spec.Cloud.AWS.Networks.Workers = nil + for _, zone := range infrastructureConfig.Networks.Zones { + out.Spec.Cloud.AWS.Zones = append(out.Spec.Cloud.AWS.Zones, zone.Name) + out.Spec.Cloud.AWS.Networks.Internal = append(out.Spec.Cloud.AWS.Networks.Internal, zone.Internal) + out.Spec.Cloud.AWS.Networks.Public = append(out.Spec.Cloud.AWS.Networks.Public, zone.Public) + out.Spec.Cloud.AWS.Networks.Workers = append(out.Spec.Cloud.AWS.Networks.Workers, zone.Workers) + } + out.Spec.Cloud.AWS.Networks.VPC.CIDR = infrastructureConfig.Networks.VPC.CIDR + out.Spec.Cloud.AWS.Networks.VPC.ID = infrastructureConfig.Networks.VPC.ID + out.Spec.Cloud.AWS.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.AWS.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.AWS.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.AWS.MachineImage = &machineImage + } else { + out.Spec.Cloud.AWS.MachineImage = nil + } + + controlPlaneConfig := &awsv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: awsv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + if in.Spec.Provider.ControlPlaneConfig != nil { + switch { + case in.Spec.Provider.ControlPlaneConfig.Object != nil: + var ok bool + controlPlaneConfig, ok = in.Spec.Provider.ControlPlaneConfig.Object.(*awsv1alpha1.ControlPlaneConfig) + if !ok { + klog.Errorf("Cannot cast controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + case in.Spec.Provider.ControlPlaneConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.ControlPlaneConfig.Raw, nil, controlPlaneConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + } + } + + if controlPlaneConfig.CloudControllerManager == nil { + out.Spec.Kubernetes.CloudControllerManager = nil + } else { + out.Spec.Kubernetes.CloudControllerManager = &garden.CloudControllerManagerConfig{ + KubernetesConfig: garden.KubernetesConfig{ + FeatureGates: controlPlaneConfig.CloudControllerManager.FeatureGates, + }, + } + } + + out.Spec.Cloud.AWS.Workers = nil + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1alpha1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.AWS.Workers = append(out.Spec.Cloud.AWS.Workers, o) + } + + case "azure": + if out.Spec.Cloud.Azure == nil { + out.Spec.Cloud.Azure = &garden.AzureCloud{} + } + + extensionsScheme := runtime.NewScheme() + if err := azureinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + + infrastructureConfig := &azurev1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: azurev1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + if in.Spec.Provider.InfrastructureConfig != nil { + switch { + case in.Spec.Provider.InfrastructureConfig.Object != nil: + var ok bool + infrastructureConfig, ok = in.Spec.Provider.InfrastructureConfig.Object.(*azurev1alpha1.InfrastructureConfig) + if !ok { + klog.Errorf("Cannot cast infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + case in.Spec.Provider.InfrastructureConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.InfrastructureConfig.Raw, nil, infrastructureConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + } + } + + out.Spec.Cloud.Azure.ResourceGroup = nil + if infrastructureConfig.ResourceGroup != nil { + out.Spec.Cloud.Azure.ResourceGroup = &garden.AzureResourceGroup{ + Name: infrastructureConfig.ResourceGroup.Name, + } + } + + out.Spec.Cloud.Azure.Networks.Workers = infrastructureConfig.Networks.Workers + out.Spec.Cloud.Azure.Networks.VNet.CIDR = infrastructureConfig.Networks.VNet.CIDR + out.Spec.Cloud.Azure.Networks.VNet.Name = infrastructureConfig.Networks.VNet.Name + out.Spec.Cloud.Azure.Networks.VNet.ResourceGroup = infrastructureConfig.Networks.VNet.ResourceGroup + out.Spec.Cloud.Azure.Networks.ServiceEndpoints = infrastructureConfig.Networks.ServiceEndpoints + out.Spec.Cloud.Azure.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.Azure.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.Azure.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.Azure.MachineImage = &machineImage + } else { + out.Spec.Cloud.Azure.MachineImage = nil + } + + controlPlaneConfig := &azurev1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: azurev1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + if in.Spec.Provider.ControlPlaneConfig != nil { + switch { + case in.Spec.Provider.ControlPlaneConfig.Object != nil: + var ok bool + controlPlaneConfig, ok = in.Spec.Provider.ControlPlaneConfig.Object.(*azurev1alpha1.ControlPlaneConfig) + if !ok { + klog.Errorf("Cannot cast controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + case in.Spec.Provider.ControlPlaneConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.ControlPlaneConfig.Raw, nil, controlPlaneConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + } + } + + if controlPlaneConfig.CloudControllerManager == nil { + out.Spec.Kubernetes.CloudControllerManager = nil + } else { + out.Spec.Kubernetes.CloudControllerManager = &garden.CloudControllerManagerConfig{ + KubernetesConfig: garden.KubernetesConfig{ + FeatureGates: controlPlaneConfig.CloudControllerManager.FeatureGates, + }, + } + } + + out.Spec.Cloud.Azure.Zones = nil + out.Spec.Cloud.Azure.Workers = nil + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1alpha1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.Azure.Workers = append(out.Spec.Cloud.Azure.Workers, o) + out.Spec.Cloud.Azure.Zones = o.Zones + } + + case "gcp": + if out.Spec.Cloud.GCP == nil { + out.Spec.Cloud.GCP = &garden.GCPCloud{} + } + + extensionsScheme := runtime.NewScheme() + if err := gcpinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + + infrastructureConfig := &gcpv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: gcpv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + if in.Spec.Provider.InfrastructureConfig != nil { + switch { + case in.Spec.Provider.InfrastructureConfig.Object != nil: + var ok bool + infrastructureConfig, ok = in.Spec.Provider.InfrastructureConfig.Object.(*gcpv1alpha1.InfrastructureConfig) + if !ok { + klog.Errorf("Cannot cast infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + case in.Spec.Provider.InfrastructureConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.InfrastructureConfig.Raw, nil, infrastructureConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + } + } + + if infrastructureConfig.Networks.VPC != nil { + out.Spec.Cloud.GCP.Networks.VPC = &garden.GCPVPC{ + Name: infrastructureConfig.Networks.VPC.Name, + } + } + + out.Spec.Cloud.GCP.Networks.Internal = infrastructureConfig.Networks.Internal + out.Spec.Cloud.GCP.Networks.Workers = []string{infrastructureConfig.Networks.Worker} + out.Spec.Cloud.GCP.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.GCP.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.GCP.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.GCP.MachineImage = &machineImage + } else { + out.Spec.Cloud.GCP.MachineImage = nil + } + + controlPlaneConfig := &gcpv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: gcpv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + if in.Spec.Provider.ControlPlaneConfig != nil { + switch { + case in.Spec.Provider.ControlPlaneConfig.Object != nil: + var ok bool + controlPlaneConfig, ok = in.Spec.Provider.ControlPlaneConfig.Object.(*gcpv1alpha1.ControlPlaneConfig) + if !ok { + klog.Errorf("Cannot cast controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + case in.Spec.Provider.ControlPlaneConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.ControlPlaneConfig.Raw, nil, controlPlaneConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + } + } + + if controlPlaneConfig.CloudControllerManager == nil { + out.Spec.Kubernetes.CloudControllerManager = nil + } else { + out.Spec.Kubernetes.CloudControllerManager = &garden.CloudControllerManagerConfig{ + KubernetesConfig: garden.KubernetesConfig{ + FeatureGates: controlPlaneConfig.CloudControllerManager.FeatureGates, + }, + } + } + + out.Spec.Cloud.GCP.Workers = nil + zones := sets.NewString() + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1alpha1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.GCP.Workers = append(out.Spec.Cloud.GCP.Workers, o) + zones.Insert(o.Zones...) + } + out.Spec.Cloud.GCP.Zones = zones.List() + + case "openstack": + if out.Spec.Cloud.OpenStack == nil { + out.Spec.Cloud.OpenStack = &garden.OpenStackCloud{} + } + + extensionsScheme := runtime.NewScheme() + if err := openstackinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + + infrastructureConfig := &openstackv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: openstackv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + if in.Spec.Provider.InfrastructureConfig != nil { + switch { + case in.Spec.Provider.InfrastructureConfig.Object != nil: + var ok bool + infrastructureConfig, ok = in.Spec.Provider.InfrastructureConfig.Object.(*openstackv1alpha1.InfrastructureConfig) + if !ok { + klog.Errorf("Cannot cast infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + case in.Spec.Provider.InfrastructureConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.InfrastructureConfig.Raw, nil, infrastructureConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + } + } + + if infrastructureConfig.Networks.Router != nil { + out.Spec.Cloud.OpenStack.Networks.Router = &garden.OpenStackRouter{ + ID: infrastructureConfig.Networks.Router.ID, + } + } + out.Spec.Cloud.OpenStack.FloatingPoolName = infrastructureConfig.FloatingPoolName + out.Spec.Cloud.OpenStack.Networks.Workers = []string{infrastructureConfig.Networks.Worker} + out.Spec.Cloud.OpenStack.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.OpenStack.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.OpenStack.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.OpenStack.MachineImage = &machineImage + } else { + out.Spec.Cloud.OpenStack.MachineImage = nil + } + + controlPlaneConfig := &openstackv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: openstackv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + if in.Spec.Provider.ControlPlaneConfig != nil { + switch { + case in.Spec.Provider.ControlPlaneConfig.Object != nil: + var ok bool + controlPlaneConfig, ok = in.Spec.Provider.ControlPlaneConfig.Object.(*openstackv1alpha1.ControlPlaneConfig) + if !ok { + klog.Errorf("Cannot cast controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + case in.Spec.Provider.ControlPlaneConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.ControlPlaneConfig.Raw, nil, controlPlaneConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + } + } + + if controlPlaneConfig.CloudControllerManager == nil { + out.Spec.Kubernetes.CloudControllerManager = nil + } else { + out.Spec.Kubernetes.CloudControllerManager = &garden.CloudControllerManagerConfig{ + KubernetesConfig: garden.KubernetesConfig{ + FeatureGates: controlPlaneConfig.CloudControllerManager.FeatureGates, + }, + } + } + + var loadBalancerClasses = make([]garden.OpenStackLoadBalancerClass, 0, len(controlPlaneConfig.LoadBalancerClasses)) + for _, loadBalancerClass := range controlPlaneConfig.LoadBalancerClasses { + loadBalancerClasses = append(loadBalancerClasses, garden.OpenStackLoadBalancerClass{ + Name: loadBalancerClass.Name, + FloatingSubnetID: loadBalancerClass.FloatingSubnetID, + FloatingNetworkID: loadBalancerClass.FloatingNetworkID, + SubnetID: loadBalancerClass.SubnetID, + }) + } + out.Spec.Cloud.OpenStack.LoadBalancerClasses = loadBalancerClasses + out.Spec.Cloud.OpenStack.LoadBalancerProvider = controlPlaneConfig.LoadBalancerProvider + + out.Spec.Cloud.OpenStack.Workers = nil + zones := sets.NewString() + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1alpha1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.OpenStack.Workers = append(out.Spec.Cloud.OpenStack.Workers, o) + zones.Insert(o.Zones...) + } + out.Spec.Cloud.OpenStack.Zones = zones.List() + + case "alicloud": + if out.Spec.Cloud.Alicloud == nil { + out.Spec.Cloud.Alicloud = &garden.Alicloud{} + } + + extensionsScheme := runtime.NewScheme() + if err := alicloudinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + + infrastructureConfig := &alicloudv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: alicloudv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + if in.Spec.Provider.InfrastructureConfig != nil { + switch { + case in.Spec.Provider.InfrastructureConfig.Object != nil: + var ok bool + infrastructureConfig, ok = in.Spec.Provider.InfrastructureConfig.Object.(*alicloudv1alpha1.InfrastructureConfig) + if !ok { + klog.Errorf("Cannot cast infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + case in.Spec.Provider.InfrastructureConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.InfrastructureConfig.Raw, nil, infrastructureConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + } + } + + out.Spec.Cloud.Alicloud.Zones = nil + out.Spec.Cloud.Alicloud.Networks.Workers = nil + for _, zone := range infrastructureConfig.Networks.Zones { + out.Spec.Cloud.Alicloud.Zones = append(out.Spec.Cloud.Alicloud.Zones, zone.Name) + out.Spec.Cloud.Alicloud.Networks.Workers = append(out.Spec.Cloud.Alicloud.Networks.Workers, zone.Worker) + } + out.Spec.Cloud.Alicloud.Networks.VPC.CIDR = infrastructureConfig.Networks.VPC.CIDR + out.Spec.Cloud.Alicloud.Networks.VPC.ID = infrastructureConfig.Networks.VPC.ID + out.Spec.Cloud.Alicloud.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.Alicloud.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.Alicloud.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.Alicloud.MachineImage = &machineImage + } else { + out.Spec.Cloud.Alicloud.MachineImage = nil + } + + controlPlaneConfig := &alicloudv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: alicloudv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + if in.Spec.Provider.ControlPlaneConfig != nil { + switch { + case in.Spec.Provider.ControlPlaneConfig.Object != nil: + var ok bool + controlPlaneConfig, ok = in.Spec.Provider.ControlPlaneConfig.Object.(*alicloudv1alpha1.ControlPlaneConfig) + if !ok { + klog.Errorf("Cannot cast controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + case in.Spec.Provider.ControlPlaneConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.ControlPlaneConfig.Raw, nil, controlPlaneConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + } + } + + if controlPlaneConfig.CloudControllerManager == nil { + out.Spec.Kubernetes.CloudControllerManager = nil + } else { + out.Spec.Kubernetes.CloudControllerManager = &garden.CloudControllerManagerConfig{ + KubernetesConfig: garden.KubernetesConfig{ + FeatureGates: controlPlaneConfig.CloudControllerManager.FeatureGates, + }, + } + } + + out.Spec.Cloud.Alicloud.Workers = nil + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1alpha1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.Alicloud.Workers = append(out.Spec.Cloud.Alicloud.Workers, o) + } + + case "packet": + if out.Spec.Cloud.Packet == nil { + out.Spec.Cloud.Packet = &garden.PacketCloud{} + } + + out.Spec.Cloud.Packet.Zones = nil + out.Spec.Cloud.Packet.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.Packet.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.Packet.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.Packet.MachineImage = &machineImage + } else { + out.Spec.Cloud.Packet.MachineImage = nil + } + + out.Spec.Cloud.Packet.Workers = nil + zones := sets.NewString() + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1alpha1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.Packet.Workers = append(out.Spec.Cloud.Packet.Workers, o) + zones.Insert(o.Zones...) + } + out.Spec.Cloud.Packet.Zones = zones.List() + + var cloudControllerManager *garden.CloudControllerManagerConfig + if data, ok := in.Annotations[garden.MigrationShootCloudControllerManager]; ok { + cloudControllerManager = &garden.CloudControllerManagerConfig{} + if err := json.Unmarshal([]byte(data), cloudControllerManager); err != nil { + return err + } + } + out.Spec.Kubernetes.CloudControllerManager = cloudControllerManager + } + + out.Spec.Cloud.Profile = in.Spec.CloudProfileName + out.Spec.Cloud.Region = in.Spec.Region + out.Spec.Cloud.SecretBindingRef.Name = in.Spec.SecretBindingName + out.Spec.Cloud.Seed = in.Spec.SeedName + + return nil +} + +func Convert_garden_Shoot_To_v1alpha1_Shoot(in *garden.Shoot, out *Shoot, s conversion.Scope) error { + if err := autoConvert_garden_Shoot_To_v1alpha1_Shoot(in, out, s); err != nil { + return err + } + + var addons *Addons + if in.Spec.Addons != nil { + addons = &Addons{} + if err := autoConvert_garden_Addons_To_v1alpha1_Addons(in.Spec.Addons, addons, s); err != nil { + return err + } + + if in.Spec.Addons.ClusterAutoscaler != nil { + data, err := json.Marshal(in.Spec.Addons.ClusterAutoscaler) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootAddonsClusterAutoscaler, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootAddonsClusterAutoscaler) + } + if in.Spec.Addons.Heapster != nil { + data, err := json.Marshal(in.Spec.Addons.Heapster) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootAddonsHeapster, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootAddonsHeapster) + } + if in.Spec.Addons.Kube2IAM != nil { + data, err := json.Marshal(in.Spec.Addons.Kube2IAM) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootAddonsKube2IAM, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootAddonsKube2IAM) + } + if in.Spec.Addons.KubeLego != nil { + data, err := json.Marshal(in.Spec.Addons.KubeLego) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootAddonsKubeLego, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootAddonsKubeLego) + } + if in.Spec.Addons.Monocular != nil { + data, err := json.Marshal(in.Spec.Addons.Monocular) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootAddonsMonocular, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootAddonsMonocular) + } + } + + out.Spec.CloudProfileName = in.Spec.Cloud.Profile + out.Spec.Region = in.Spec.Cloud.Region + out.Spec.SecretBindingName = in.Spec.Cloud.SecretBindingRef.Name + out.Spec.SeedName = in.Spec.Cloud.Seed + + if email, ok := in.Annotations[constants.AnnotationShootOperatedBy]; ok && utils.TestEmail(email) { + exists := false + if in.Spec.Monitoring == nil { + out.Spec.Monitoring = &Monitoring{ + Alerting: &Alerting{}, + } + } + if in.Spec.Monitoring != nil && in.Spec.Monitoring.Alerting == nil { + out.Spec.Monitoring.Alerting = &Alerting{} + } + if in.Spec.Monitoring != nil && in.Spec.Monitoring.Alerting != nil { + for _, receiver := range in.Spec.Monitoring.Alerting.EmailReceivers { + if receiver == email { + exists = true + break + } + } + } + if !exists { + out.Spec.Monitoring.Alerting.EmailReceivers = append(out.Spec.Monitoring.Alerting.EmailReceivers, email) + } + // Always delete annotation (Either email gets appended to emailReceivers or email already exists). + delete(out.Annotations, constants.AnnotationShootOperatedBy) + } + + switch in.Spec.Provider.Type { + case "aws": + if in.Spec.Cloud.AWS != nil && in.Spec.Cloud.AWS.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.AWS.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + case "azure": + if in.Spec.Cloud.Azure != nil && in.Spec.Cloud.Azure.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.Azure.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + case "gcp": + if in.Spec.Cloud.GCP != nil && in.Spec.Cloud.GCP.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.GCP.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + case "openstack": + if in.Spec.Cloud.OpenStack != nil && in.Spec.Cloud.OpenStack.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.OpenStack.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + case "alicloud": + if in.Spec.Cloud.Alicloud != nil && in.Spec.Cloud.Alicloud.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.Alicloud.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + case "packet": + if in.Spec.Cloud.Packet != nil && in.Spec.Cloud.Packet.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.Packet.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + if in.Spec.Kubernetes.CloudControllerManager != nil { + data, err := json.Marshal(in.Spec.Kubernetes.CloudControllerManager) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootCloudControllerManager, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootCloudControllerManager) + } + } + + return nil +} + +func Convert_garden_ShootSpec_To_v1alpha1_ShootSpec(in *garden.ShootSpec, out *ShootSpec, s conversion.Scope) error { + return autoConvert_garden_ShootSpec_To_v1alpha1_ShootSpec(in, out, s) +} + +func Convert_v1alpha1_ShootSpec_To_garden_ShootSpec(in *ShootSpec, out *garden.ShootSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootSpec_To_garden_ShootSpec(in, out, s) +} + +func Convert_garden_ShootStatus_To_v1alpha1_ShootStatus(in *garden.ShootStatus, out *ShootStatus, s conversion.Scope) error { + if err := autoConvert_garden_ShootStatus_To_v1alpha1_ShootStatus(in, out, s); err != nil { + return err + } + + if len(in.LastErrors) != 0 { + out.LastError = (*LastError)(unsafe.Pointer(&in.LastErrors[0])) + if len(in.LastErrors) > 1 { + lastErrors := in.LastErrors[1:] + out.LastErrors = *(*[]LastError)(unsafe.Pointer(&lastErrors)) + } else { + out.LastErrors = nil + } + } + + if in.IsHibernated == nil { + out.IsHibernated = false + } else { + out.IsHibernated = *in.IsHibernated + } + + out.Seed = in.SeedName + + return nil +} + +func Convert_v1alpha1_ShootStatus_To_garden_ShootStatus(in *ShootStatus, out *garden.ShootStatus, s conversion.Scope) error { + if err := autoConvert_v1alpha1_ShootStatus_To_garden_ShootStatus(in, out, s); err != nil { + return err + } + + if in.LastError != nil { + outLastErrors := []garden.LastError{ + { + Description: in.LastError.Description, + Codes: *(*[]garden.ErrorCode)(unsafe.Pointer(&in.LastError.Codes)), + LastUpdateTime: in.LastError.LastUpdateTime, + }, + } + out.LastErrors = append(outLastErrors, *(*[]garden.LastError)(unsafe.Pointer(&in.LastErrors))...) + } else { + out.LastErrors = nil + } + + out.IsHibernated = &in.IsHibernated + out.SeedName = in.Seed + + return nil +} + +func Convert_garden_Addons_To_v1alpha1_Addons(in *garden.Addons, out *Addons, s conversion.Scope) error { + return autoConvert_garden_Addons_To_v1alpha1_Addons(in, out, s) +} + +func Convert_v1alpha1_Addons_To_garden_Addons(in *Addons, out *garden.Addons, s conversion.Scope) error { + return autoConvert_v1alpha1_Addons_To_garden_Addons(in, out, s) +} + +func Convert_garden_Kubernetes_To_v1alpha1_Kubernetes(in *garden.Kubernetes, out *Kubernetes, s conversion.Scope) error { + return autoConvert_garden_Kubernetes_To_v1alpha1_Kubernetes(in, out, s) +} + +func Convert_v1alpha1_Kubernetes_To_garden_Kubernetes(in *Kubernetes, out *garden.Kubernetes, s conversion.Scope) error { + return autoConvert_v1alpha1_Kubernetes_To_garden_Kubernetes(in, out, s) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/defaults.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/defaults.go index 2049b1d25..3c8aff634 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/defaults.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/defaults.go @@ -19,6 +19,7 @@ import ( "github.com/gardener/gardener/pkg/utils" + corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/runtime" ) @@ -158,6 +159,14 @@ func SetDefaults_Worker(obj *Worker) { } } +// SetDefaults_NginxIngress sets default values for NginxIngress objects. +func SetDefaults_NginxIngress(obj *NginxIngress) { + if obj.ExternalTrafficPolicy == nil { + v := corev1.ServiceExternalTrafficPolicyTypeCluster + obj.ExternalTrafficPolicy = &v + } +} + // Helper functions func calculateDefaultNodeCIDRMaskSize(kubelet *KubeletConfig, workers []Worker) *int32 { diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper/errors.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper/errors.go index cd4fa507c..934f5f846 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper/errors.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper/errors.go @@ -50,7 +50,7 @@ var ( unauthorizedRegexp = regexp.MustCompile(`(?i)(Unauthorized|InvalidClientTokenId|SignatureDoesNotMatch|Authentication failed|AuthFailure|AuthorizationFailed|invalid character|invalid_grant|invalid_client|Authorization Profile was not found|cannot fetch token|no active subscriptions|InvalidAccessKeyId|InvalidSecretAccessKey)`) quotaExceededRegexp = regexp.MustCompile(`(?i)(LimitExceeded|Quota)`) insufficientPrivilegesRegexp = regexp.MustCompile(`(?i)(AccessDenied|Forbidden|deny|denied)`) - dependenciesRegexp = regexp.MustCompile(`(?i)(PendingVerification|Access Not Configured|accessNotConfigured|DependencyViolation|OptInRequired|DeleteConflict|Conflict|inactive billing state|ReadOnlyDisabledSubscription|is already being used)`) + dependenciesRegexp = regexp.MustCompile(`(?i)(PendingVerification|Access Not Configured|accessNotConfigured|DependencyViolation|OptInRequired|DeleteConflict|Conflict|inactive billing state|ReadOnlyDisabledSubscription|is already being used|not available in the current hardware cluster)`) ) // DetermineError determines the Garden error code for the given error message. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper/helper.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper/helper.go index ae4f5c191..bee1763c8 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper/helper.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper/helper.go @@ -16,16 +16,17 @@ package helper import ( "fmt" - "github.com/gardener/gardener/pkg/logger" "sort" "strconv" "strings" gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" + "github.com/gardener/gardener/pkg/logger" "github.com/gardener/gardener/pkg/utils" "github.com/Masterminds/semver" + errors "github.com/pkg/errors" apiequality "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/validation/field" @@ -42,6 +43,7 @@ func InitCondition(conditionType gardencorev1alpha1.ConditionType) gardencorev1a Reason: "ConditionInitialized", Message: "The condition has been initialized but its semantic check has not been performed yet.", LastTransitionTime: Now(), + LastUpdateTime: Now(), } } @@ -113,7 +115,7 @@ func UpdatedConditionUnknownErrorMessage(condition gardencorev1alpha1.Condition, // the (depending on the condition type). func MergeConditions(oldConditions []gardencorev1alpha1.Condition, newConditions ...gardencorev1alpha1.Condition) []gardencorev1alpha1.Condition { var ( - out = make([]gardencorev1alpha1.Condition, 0, len(oldConditions)) + out = make([]gardencorev1alpha1.Condition, 0, len(oldConditions)+len(newConditions)) typeToIndex = make(map[gardencorev1alpha1.ConditionType]int, len(oldConditions)) ) @@ -185,6 +187,7 @@ func TaintsHave(taints []gardencorev1alpha1.SeedTaint, key string) bool { } type ShootedSeed struct { + DisableDNS *bool Protected *bool Visible *bool MinimumVolumeSize *string @@ -192,6 +195,8 @@ type ShootedSeed struct { BlockCIDRs []string ShootDefaults *gardencorev1alpha1.ShootNetworks Backup *gardencorev1alpha1.SeedBackup + NoGardenlet bool + WithSecretRef bool } type ShootedSeedAPIServer struct { @@ -265,6 +270,16 @@ func parseShootedSeed(annotation string) (*ShootedSeed, error) { shootedSeed.MinimumVolumeSize = &size } + if _, ok := flags["disable-dns"]; ok { + shootedSeed.DisableDNS = &trueVar + } + if _, ok := flags["no-gardenlet"]; ok { + shootedSeed.NoGardenlet = true + } + if _, ok := flags["with-secret-ref"]; ok { + shootedSeed.WithSecretRef = true + } + if _, ok := flags["protected"]; ok { shootedSeed.Protected = &trueVar } @@ -545,6 +560,22 @@ func ShootWantsBasicAuthentication(shoot *gardencorev1alpha1.Shoot) bool { return *kubeAPIServerConfig.EnableBasicAuthentication } +// ShootUsesUnmanagedDNS returns true if the shoot's DNS section is marked as 'unmanaged'. +func ShootUsesUnmanagedDNS(shoot *gardencorev1alpha1.Shoot) bool { + return shoot.Spec.DNS != nil && len(shoot.Spec.DNS.Providers) > 0 && shoot.Spec.DNS.Providers[0].Type != nil && *shoot.Spec.DNS.Providers[0].Type == "unmanaged" +} + +// GetMachineImagesFor returns a list of all machine images for a given shoot. +func GetMachineImagesFor(shoot *gardencorev1alpha1.Shoot) []*gardencorev1alpha1.ShootMachineImage { + var workerMachineImages []*gardencorev1alpha1.ShootMachineImage + for _, worker := range shoot.Spec.Provider.Workers { + if worker.Machine.Image != nil { + workerMachineImages = append(workerMachineImages, worker.Machine.Image) + } + } + return workerMachineImages +} + // DetermineMachineImageForName finds the cloud specific machine images in the for the given and // region. In case it does not find the machine image with the , it returns false. Otherwise, true and the // cloud-specific machine image will be returned. @@ -697,3 +728,11 @@ func GetDefaultMachineImageFromCloudProfile(profile gardencorev1alpha1.CloudProf } return &profile.Spec.MachineImages[0] } + +// WrapWithLastError is wrapper function for gardencorev1alpha1.LastError +func WrapWithLastError(err error, lastError *gardencorev1alpha1.LastError) error { + if err == nil || lastError == nil { + return err + } + return errors.Wrapf(err, "last error: %s", lastError.Description) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/register.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/register.go index f5ee5e334..0e9c27c36 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/register.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/register.go @@ -38,7 +38,7 @@ func Resource(resource string) schema.GroupResource { var ( // SchemeBuilder is a new Scheme Builder which registers our API. - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) localSchemeBuilder = &SchemeBuilder // AddToScheme is a reference to the Scheme Builder's AddToScheme function. AddToScheme = SchemeBuilder.AddToScheme @@ -67,6 +67,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &SecretBindingList{}, &Seed{}, &SeedList{}, + &ShootState{}, + &ShootStateList{}, &Shoot{}, &ShootList{}, ) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_cloudprofile.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_cloudprofile.go index 657b21c21..81da62cb6 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_cloudprofile.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_cloudprofile.go @@ -49,20 +49,26 @@ type CloudProfileList struct { // CloudProfileSpec is the specification of a CloudProfile. // It must contain exactly one of its defined keys. type CloudProfileSpec struct { - // CABundle is a certificate bundle which will be installed onto every host machine of shoot cluster targetting this profile. + // CABundle is a certificate bundle which will be installed onto every host machine of shoot cluster targeting this profile. // +optional CABundle *string `json:"caBundle,omitempty"` // Kubernetes contains constraints regarding allowed values of the 'kubernetes' block in the Shoot specification. Kubernetes KubernetesSettings `json:"kubernetes"` // MachineImages contains constraints regarding allowed values for machine images in the Shoot specification. - MachineImages []MachineImage `json:"machineImages"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineImages []MachineImage `json:"machineImages" patchStrategy:"merge" patchMergeKey:"name"` // MachineTypes contains constraints regarding allowed values for machine types in the 'workers' block in the Shoot specification. - MachineTypes []MachineType `json:"machineTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineTypes []MachineType `json:"machineTypes" patchStrategy:"merge" patchMergeKey:"name"` // ProviderConfig contains provider-specific configuration for the profile. // +optional ProviderConfig *ProviderConfig `json:"providerConfig,omitempty"` // Regions contains constraints regarding allowed values for regions and zones. - Regions []Region `json:"regions"` + // +patchMergeKey=name + // +patchStrategy=merge + Regions []Region `json:"regions" patchStrategy:"merge" patchMergeKey:"name"` // SeedSelector contains an optional list of labels on `Seed` resources that marks those seeds whose shoots may use this provider profile. // An empty list means that all seeds of the same provider type are supported. // This is useful for environments that are of the same type (like openstack) but may have different "instances"/landscapes. @@ -71,15 +77,19 @@ type CloudProfileSpec struct { // Type is the name of the provider. Type string `json:"type"` // VolumeTypes contains constraints regarding allowed values for volume types in the 'workers' block in the Shoot specification. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - VolumeTypes []VolumeType `json:"volumeTypes,omitempty"` + VolumeTypes []VolumeType `json:"volumeTypes,omitempty" patchStrategy:"merge" patchMergeKey:"name"` } // KubernetesSettings contains constraints regarding allowed values of the 'kubernetes' block in the Shoot specification. type KubernetesSettings struct { // Versions is the list of allowed Kubernetes versions with optional expiration dates for Shoot clusters. + // +patchMergeKey=version + // +patchStrategy=merge // +optional - Versions []ExpirableVersion `json:"versions,omitempty"` + Versions []ExpirableVersion `json:"versions,omitempty" patchStrategy:"merge" patchMergeKey:"version"` } // MachineImage defines the name and multiple versions of the machine image in any environment. @@ -87,7 +97,9 @@ type MachineImage struct { // Name is the name of the image. Name string `json:"name"` // Versions contains versions and expiration dates of the machine image - Versions []ExpirableVersion `json:"versions"` + // +patchMergeKey=version + // +patchStrategy=merge + Versions []ExpirableVersion `json:"versions" patchStrategy:"merge" patchMergeKey:"version"` } // ExpirableVersion contains a version and an expiration date. @@ -132,8 +144,10 @@ type Region struct { // Name is a region name. Name string `json:"name"` // Zones is a list of availability zones in this region. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - Zones []AvailabilityZone `json:"zones,omitempty"` + Zones []AvailabilityZone `json:"zones,omitempty" patchStrategy:"merge" patchMergeKey:"name"` } // AvailabilityZone is an availability zone. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_controllerinstallation.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_controllerinstallation.go index 3db4d2cc2..9ccc34510 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_controllerinstallation.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_controllerinstallation.go @@ -57,8 +57,10 @@ type ControllerInstallationSpec struct { // ControllerInstallationStatus is the status of a ControllerInstallation. type ControllerInstallationStatus struct { // Conditions represents the latest available observations of a ControllerInstallations's current state. + // +patchMergeKey=type + // +patchStrategy=merge // +optional - Conditions []Condition `json:"conditions,omitempty"` + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // ProviderStatus contains type-specific status. // +optional ProviderStatus *ProviderConfig `json:"providerStatus,omitempty"` diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_plant.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_plant.go index e19de8ad4..7cb70257e 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_plant.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_plant.go @@ -58,15 +58,19 @@ type PlantSpec struct { // clusters to be added to Gardener. SecretRef corev1.LocalObjectReference `json:"secretRef"` // Endpoints is the configuration plant endpoints + // +patchMergeKey=name + // +patchStrategy=merge // +optional - Endpoints []Endpoint `json:"endpoints,omitempty"` + Endpoints []Endpoint `json:"endpoints,omitempty" patchStrategy:"merge" patchMergeKey:"name"` } // PlantStatus is the status of a Plant. type PlantStatus struct { // Conditions represents the latest available observations of a Plant's current state. + // +patchMergeKey=type + // +patchStrategy=merge // +optional - Conditions []Condition `json:"conditions,omitempty"` + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // ObservedGeneration is the most recent generation observed for this Plant. It corresponds to the // Plant's generation, which is updated on mutation by the API Server. // +optional diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_seed.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_seed.go index 99245dd27..cf1873dcf 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_seed.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_seed.go @@ -55,7 +55,7 @@ type SeedSpec struct { // under the configured object store. // +optional Backup *SeedBackup `json:"backup,omitempty"` - // BlockCIDRs is a list of network addresses tha should be blocked for shoot control plane components running + // BlockCIDRs is a list of network addresses that should be blocked for shoot control plane components running // in the seed cluster. // +optional BlockCIDRs []string `json:"blockCIDRs,omitempty"` @@ -67,7 +67,8 @@ type SeedSpec struct { Provider SeedProvider `json:"provider"` // SecretRef is a reference to a Secret object containing the Kubeconfig and the cloud provider credentials for // the account the Seed cluster has been deployed to. - SecretRef corev1.SecretReference `json:"secretRef"` + // +optional + SecretRef *corev1.SecretReference `json:"secretRef,omitempty"` // Taints describes taints on the seed. // +optional Taints []SeedTaint `json:"taints,omitempty"` @@ -78,12 +79,17 @@ type SeedSpec struct { // SeedStatus is the status of a Seed. type SeedStatus struct { - // Gardener holds information about the Gardener which last acted on the Shoot. - // +optional - Gardener Gardener `json:"gardener,omitempty"` // Conditions represents the latest available observations of a Seed's current state. + // +patchMergeKey=type + // +patchStrategy=merge // +optional - Conditions []Condition `json:"conditions,omitempty"` + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // Gardener holds information about the Gardener instance which last acted on the Seed. + // +optional + Gardener *Gardener `json:"gardener,omitempty"` + // KubernetesVersion is the Kubernetes version of the seed cluster. + // +optional + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` // ObservedGeneration is the most recent generation observed for this Seed. It corresponds to the // Seed's generation, which is updated on mutation by the API Server. // +optional @@ -95,6 +101,7 @@ type SeedBackup struct { // Provider is a provider name. Provider string `json:"provider"` // Region is a region name. + // +optional Region *string `json:"region,omitempty"` // SecretRef is a reference to a Secret object containing the cloud provider credentials for // the object store where backups should be stored. It should have enough privileges to manipulate @@ -150,6 +157,10 @@ type SeedTaint struct { } const ( + // SeedTaintDisableDNS is a constant for a taint key on a seed that marks it for disabling DNS. All shoots + // using this seed won't get any DNS providers, DNS records, and no DNS extension controller is required to + // be installed here. This is useful for environment where DNS is not required. + SeedTaintDisableDNS = "seed.gardener.cloud/disable-dns" // SeedTaintProtected is a constant for a taint key on a seed that marks it as protected. Protected seeds // may only be used by shoots in the `garden` namespace. SeedTaintProtected = "seed.gardener.cloud/protected" @@ -164,8 +175,10 @@ type SeedVolume struct { // +optional MinimumSize *resource.Quantity `json:"minimumSize,omitempty"` // Providers is a list of storage class provisioner types for the seed. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - Providers []SeedVolumeProvider `json:"providers,omitempty"` + Providers []SeedVolumeProvider `json:"providers,omitempty" patchStrategy:"merge" patchMergeKey:"name"` } // SeedVolumeProvider is a storage class provisioner type. @@ -177,6 +190,9 @@ type SeedVolumeProvider struct { } const ( - // SeedAvailable is a constant for a condition type indicating the Seed cluster availability. - SeedAvailable ConditionType = "Available" + // SeedGardenletReady is a constant for a condition type indicating that the Gardenlet is ready. + SeedGardenletReady ConditionType = "GardenletReady" + // SeedBootstrapped is a constant for a condition type indicating that the seed cluster has been + // bootstrapped. + SeedBootstrapped ConditionType = "Bootstrapped" ) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shoot.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shoot.go index 7c1b21931..85052d040 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shoot.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shoot.go @@ -96,7 +96,14 @@ type ShootSpec struct { type ShootStatus struct { // Conditions represents the latest available observations of a Shoots's current state. // +optional - Conditions []Condition `json:"conditions,omitempty"` + // +patchMergeKey=type + // +patchStrategy=merge + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // Constraints represents conditions of a Shoot's current state that constraint some operations on it. + // +optional + // +patchMergeKey=type + // +patchStrategy=merge + Constraints []Condition `json:"constraints,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // Gardener holds information about the Gardener which last acted on the Shoot. Gardener Gardener `json:"gardener"` // IsHibernated indicates whether the Shoot is currently hibernated. @@ -175,6 +182,10 @@ type NginxIngress struct { // See https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md#configuration-options // +optional Config map[string]string `json:"config,omitempty"` + // ExternalTrafficPolicy controls the `.spec.externalTrafficPolicy` value of the load balancer `Service` + // exposing the nginx-ingress. Defaults to `Cluster`. + // +optional + ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"` } ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -189,8 +200,10 @@ type DNS struct { Domain *string `json:"domain,omitempty"` // Providers is a list of DNS providers that shall be enabled for this shoot cluster. Only relevant if // not a default domain is used. + // +patchMergeKey=type + // +patchStrategy=merge // +optional - Providers []DNSProvider `json:"providers,omitempty"` + Providers []DNSProvider `json:"providers,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // DNSProvider contains information about a DNS provider. @@ -244,7 +257,8 @@ type Extension struct { // Hibernation contains information whether the Shoot is suspended or not. type Hibernation struct { - // Enabled is true if the Shoot's desired state is hibernated, false otherwise. + // Enabled specifies whether the Shoot needs to be hibernated or not. If it is true, the Shoot's desired state is to be hibernated. + // If it is false or nil, the Shoot's desired state is to be awaken. // +optional Enabled *bool `json:"enabled,omitempty"` // Schedules determine the hibernation schedules. @@ -332,8 +346,10 @@ type KubeAPIServerConfig struct { KubernetesConfig `json:",inline"` // AdmissionPlugins contains the list of user-defined admission plugins (additional to those managed by Gardener), and, if desired, the corresponding // configuration. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - AdmissionPlugins []AdmissionPlugin `json:"admissionPlugins,omitempty"` + AdmissionPlugins []AdmissionPlugin `json:"admissionPlugins,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // APIAudiences are the identifiers of the API. The service account token authenticator will // validate that tokens used against the API are bound to at least one of these audiences. // If `serviceAccountConfig.issuer` is configured and this is not, this defaults to a single @@ -772,7 +788,9 @@ type Provider struct { // +optional InfrastructureConfig *ProviderConfig `json:"infrastructureConfig,omitempty"` // Workers is a list of worker groups. - Workers []Worker `json:"workers"` + // +patchMergeKey=name + // +patchStrategy=merge + Workers []Worker `json:"workers" patchStrategy:"merge" patchMergeKey:"name"` } // Worker is the base definition of a worker group. @@ -888,4 +906,6 @@ const ( ShootEveryNodeReady ConditionType = "EveryNodeReady" // ShootSystemComponentsHealthy is a constant for a condition type indicating the system components health. ShootSystemComponentsHealthy ConditionType = "SystemComponentsHealthy" + // ShootHibernationPossible is a constant for a condition type indicating whether the Shoot can be hibernated. + ShootHibernationPossible ConditionType = "HibernationPossible" ) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shootstate.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shootstate.go new file mode 100644 index 000000000..43c23212f --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/types_shootstate.go @@ -0,0 +1,77 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ShootState contains a snapshot of the Shoot's state required to migrate the Shoot's control plane to a new Seed. +type ShootState struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // Specification of the ShootState. + // +optional + Spec ShootStateSpec `json:"spec,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ShootStateList is a list of ShootState objects. +type ShootStateList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of ShootStates. + Items []ShootState `json:"items"` +} + +// ShootStateSpec is the specification of the ShootState. +type ShootStateSpec struct { + // Gardener holds the data required to generate resources deployed by the gardenlet + // +patchMergeKey=name + // +patchStrategy=merge + // +optional + Gardener []GardenerResourceData `json:"gardener,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + // Extensions holds the state of custom resources reconciled by extension controllers in the seed + // +optional + Extensions []ExtensionResourceState `json:"extensions,omitempty"` +} + +// GardenerResourceData holds the data which is used to generate resources, deployed in the Shoot's control plane. +type GardenerResourceData struct { + // Name of the object required to generate resources + Name string `json:"name"` + // Data contains the payload required to generate resources + Data map[string]string `json:"data"` +} + +// ExtensionResourceState contains the kind of the extension custom resource and its last observed state in the Shoot's +// namespace on the Seed cluster. +type ExtensionResourceState struct { + // Kind (type) of the extension custom resource + Kind string `json:"kind"` + // Purpose of the extension custom resource + // +optional + Purpose *string `json:"purpose,omitempty"` + // State of the extension resource + State ProviderConfig `json:"state"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.conversion.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.conversion.go new file mode 100644 index 000000000..635b0aa03 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,4459 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + unsafe "unsafe" + + core "github.com/gardener/gardener/pkg/apis/core" + garden "github.com/gardener/gardener/pkg/apis/garden" + v1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" + resource "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + intstr "k8s.io/apimachinery/pkg/util/intstr" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*Addon)(nil), (*garden.Addon)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Addon_To_garden_Addon(a.(*Addon), b.(*garden.Addon), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Addon)(nil), (*Addon)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Addon_To_v1alpha1_Addon(a.(*garden.Addon), b.(*Addon), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Addons)(nil), (*garden.Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Addons_To_garden_Addons(a.(*Addons), b.(*garden.Addons), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Addons)(nil), (*Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Addons_To_v1alpha1_Addons(a.(*garden.Addons), b.(*Addons), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AdmissionPlugin)(nil), (*garden.AdmissionPlugin)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_AdmissionPlugin_To_garden_AdmissionPlugin(a.(*AdmissionPlugin), b.(*garden.AdmissionPlugin), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AdmissionPlugin)(nil), (*AdmissionPlugin)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AdmissionPlugin_To_v1alpha1_AdmissionPlugin(a.(*garden.AdmissionPlugin), b.(*AdmissionPlugin), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Alerting)(nil), (*garden.Alerting)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Alerting_To_garden_Alerting(a.(*Alerting), b.(*garden.Alerting), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Alerting)(nil), (*Alerting)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Alerting_To_v1alpha1_Alerting(a.(*garden.Alerting), b.(*Alerting), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuditConfig)(nil), (*garden.AuditConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_AuditConfig_To_garden_AuditConfig(a.(*AuditConfig), b.(*garden.AuditConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AuditConfig)(nil), (*AuditConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AuditConfig_To_v1alpha1_AuditConfig(a.(*garden.AuditConfig), b.(*AuditConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuditPolicy)(nil), (*garden.AuditPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_AuditPolicy_To_garden_AuditPolicy(a.(*AuditPolicy), b.(*garden.AuditPolicy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AuditPolicy)(nil), (*AuditPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AuditPolicy_To_v1alpha1_AuditPolicy(a.(*garden.AuditPolicy), b.(*AuditPolicy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AvailabilityZone)(nil), (*garden.AvailabilityZone)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_AvailabilityZone_To_garden_AvailabilityZone(a.(*AvailabilityZone), b.(*garden.AvailabilityZone), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AvailabilityZone)(nil), (*AvailabilityZone)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AvailabilityZone_To_v1alpha1_AvailabilityZone(a.(*garden.AvailabilityZone), b.(*AvailabilityZone), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupBucket)(nil), (*core.BackupBucket)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupBucket_To_core_BackupBucket(a.(*BackupBucket), b.(*core.BackupBucket), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupBucket)(nil), (*BackupBucket)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucket_To_v1alpha1_BackupBucket(a.(*core.BackupBucket), b.(*BackupBucket), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupBucketList)(nil), (*core.BackupBucketList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupBucketList_To_core_BackupBucketList(a.(*BackupBucketList), b.(*core.BackupBucketList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupBucketList)(nil), (*BackupBucketList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucketList_To_v1alpha1_BackupBucketList(a.(*core.BackupBucketList), b.(*BackupBucketList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupBucketProvider)(nil), (*core.BackupBucketProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupBucketProvider_To_core_BackupBucketProvider(a.(*BackupBucketProvider), b.(*core.BackupBucketProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupBucketProvider)(nil), (*BackupBucketProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucketProvider_To_v1alpha1_BackupBucketProvider(a.(*core.BackupBucketProvider), b.(*BackupBucketProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupBucketSpec)(nil), (*core.BackupBucketSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupBucketSpec_To_core_BackupBucketSpec(a.(*BackupBucketSpec), b.(*core.BackupBucketSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupBucketSpec)(nil), (*BackupBucketSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucketSpec_To_v1alpha1_BackupBucketSpec(a.(*core.BackupBucketSpec), b.(*BackupBucketSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupBucketStatus)(nil), (*core.BackupBucketStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupBucketStatus_To_core_BackupBucketStatus(a.(*BackupBucketStatus), b.(*core.BackupBucketStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupBucketStatus)(nil), (*BackupBucketStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucketStatus_To_v1alpha1_BackupBucketStatus(a.(*core.BackupBucketStatus), b.(*BackupBucketStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupEntry)(nil), (*core.BackupEntry)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupEntry_To_core_BackupEntry(a.(*BackupEntry), b.(*core.BackupEntry), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupEntry)(nil), (*BackupEntry)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupEntry_To_v1alpha1_BackupEntry(a.(*core.BackupEntry), b.(*BackupEntry), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupEntryList)(nil), (*core.BackupEntryList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupEntryList_To_core_BackupEntryList(a.(*BackupEntryList), b.(*core.BackupEntryList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupEntryList)(nil), (*BackupEntryList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupEntryList_To_v1alpha1_BackupEntryList(a.(*core.BackupEntryList), b.(*BackupEntryList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupEntrySpec)(nil), (*core.BackupEntrySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupEntrySpec_To_core_BackupEntrySpec(a.(*BackupEntrySpec), b.(*core.BackupEntrySpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupEntrySpec)(nil), (*BackupEntrySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupEntrySpec_To_v1alpha1_BackupEntrySpec(a.(*core.BackupEntrySpec), b.(*BackupEntrySpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupEntryStatus)(nil), (*core.BackupEntryStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupEntryStatus_To_core_BackupEntryStatus(a.(*BackupEntryStatus), b.(*core.BackupEntryStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupEntryStatus)(nil), (*BackupEntryStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupEntryStatus_To_v1alpha1_BackupEntryStatus(a.(*core.BackupEntryStatus), b.(*BackupEntryStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudInfo)(nil), (*core.CloudInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CloudInfo_To_core_CloudInfo(a.(*CloudInfo), b.(*core.CloudInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.CloudInfo)(nil), (*CloudInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_CloudInfo_To_v1alpha1_CloudInfo(a.(*core.CloudInfo), b.(*CloudInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudProfile)(nil), (*garden.CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CloudProfile_To_garden_CloudProfile(a.(*CloudProfile), b.(*garden.CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.CloudProfile)(nil), (*CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfile_To_v1alpha1_CloudProfile(a.(*garden.CloudProfile), b.(*CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudProfileList)(nil), (*garden.CloudProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CloudProfileList_To_garden_CloudProfileList(a.(*CloudProfileList), b.(*garden.CloudProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.CloudProfileList)(nil), (*CloudProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfileList_To_v1alpha1_CloudProfileList(a.(*garden.CloudProfileList), b.(*CloudProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudProfileSpec)(nil), (*garden.CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CloudProfileSpec_To_garden_CloudProfileSpec(a.(*CloudProfileSpec), b.(*garden.CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.CloudProfileSpec)(nil), (*CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfileSpec_To_v1alpha1_CloudProfileSpec(a.(*garden.CloudProfileSpec), b.(*CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterAutoscaler)(nil), (*garden.ClusterAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ClusterAutoscaler_To_garden_ClusterAutoscaler(a.(*ClusterAutoscaler), b.(*garden.ClusterAutoscaler), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ClusterAutoscaler)(nil), (*ClusterAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ClusterAutoscaler_To_v1alpha1_ClusterAutoscaler(a.(*garden.ClusterAutoscaler), b.(*ClusterAutoscaler), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterInfo)(nil), (*core.ClusterInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ClusterInfo_To_core_ClusterInfo(a.(*ClusterInfo), b.(*core.ClusterInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ClusterInfo)(nil), (*ClusterInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ClusterInfo_To_v1alpha1_ClusterInfo(a.(*core.ClusterInfo), b.(*ClusterInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Condition)(nil), (*core.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Condition_To_core_Condition(a.(*Condition), b.(*core.Condition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.Condition)(nil), (*Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_Condition_To_v1alpha1_Condition(a.(*core.Condition), b.(*Condition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerDeployment)(nil), (*core.ControllerDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerDeployment_To_core_ControllerDeployment(a.(*ControllerDeployment), b.(*core.ControllerDeployment), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerDeployment)(nil), (*ControllerDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerDeployment_To_v1alpha1_ControllerDeployment(a.(*core.ControllerDeployment), b.(*ControllerDeployment), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallation)(nil), (*core.ControllerInstallation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerInstallation_To_core_ControllerInstallation(a.(*ControllerInstallation), b.(*core.ControllerInstallation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerInstallation)(nil), (*ControllerInstallation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerInstallation_To_v1alpha1_ControllerInstallation(a.(*core.ControllerInstallation), b.(*ControllerInstallation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallationList)(nil), (*core.ControllerInstallationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerInstallationList_To_core_ControllerInstallationList(a.(*ControllerInstallationList), b.(*core.ControllerInstallationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerInstallationList)(nil), (*ControllerInstallationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerInstallationList_To_v1alpha1_ControllerInstallationList(a.(*core.ControllerInstallationList), b.(*ControllerInstallationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallationSpec)(nil), (*core.ControllerInstallationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerInstallationSpec_To_core_ControllerInstallationSpec(a.(*ControllerInstallationSpec), b.(*core.ControllerInstallationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerInstallationSpec)(nil), (*ControllerInstallationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerInstallationSpec_To_v1alpha1_ControllerInstallationSpec(a.(*core.ControllerInstallationSpec), b.(*ControllerInstallationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallationStatus)(nil), (*core.ControllerInstallationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerInstallationStatus_To_core_ControllerInstallationStatus(a.(*ControllerInstallationStatus), b.(*core.ControllerInstallationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerInstallationStatus)(nil), (*ControllerInstallationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerInstallationStatus_To_v1alpha1_ControllerInstallationStatus(a.(*core.ControllerInstallationStatus), b.(*ControllerInstallationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerRegistration)(nil), (*core.ControllerRegistration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerRegistration_To_core_ControllerRegistration(a.(*ControllerRegistration), b.(*core.ControllerRegistration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerRegistration)(nil), (*ControllerRegistration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerRegistration_To_v1alpha1_ControllerRegistration(a.(*core.ControllerRegistration), b.(*ControllerRegistration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerRegistrationList)(nil), (*core.ControllerRegistrationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerRegistrationList_To_core_ControllerRegistrationList(a.(*ControllerRegistrationList), b.(*core.ControllerRegistrationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerRegistrationList)(nil), (*ControllerRegistrationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerRegistrationList_To_v1alpha1_ControllerRegistrationList(a.(*core.ControllerRegistrationList), b.(*ControllerRegistrationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerRegistrationSpec)(nil), (*core.ControllerRegistrationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec(a.(*ControllerRegistrationSpec), b.(*core.ControllerRegistrationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerRegistrationSpec)(nil), (*ControllerRegistrationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerRegistrationSpec_To_v1alpha1_ControllerRegistrationSpec(a.(*core.ControllerRegistrationSpec), b.(*ControllerRegistrationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerResource)(nil), (*core.ControllerResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ControllerResource_To_core_ControllerResource(a.(*ControllerResource), b.(*core.ControllerResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerResource)(nil), (*ControllerResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerResource_To_v1alpha1_ControllerResource(a.(*core.ControllerResource), b.(*ControllerResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNS)(nil), (*garden.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_DNS_To_garden_DNS(a.(*DNS), b.(*garden.DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_DNS_To_v1alpha1_DNS(a.(*garden.DNS), b.(*DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNSIncludeExclude)(nil), (*garden.DNSIncludeExclude)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_DNSIncludeExclude_To_garden_DNSIncludeExclude(a.(*DNSIncludeExclude), b.(*garden.DNSIncludeExclude), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.DNSIncludeExclude)(nil), (*DNSIncludeExclude)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_DNSIncludeExclude_To_v1alpha1_DNSIncludeExclude(a.(*garden.DNSIncludeExclude), b.(*DNSIncludeExclude), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNSProvider)(nil), (*garden.DNSProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_DNSProvider_To_garden_DNSProvider(a.(*DNSProvider), b.(*garden.DNSProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.DNSProvider)(nil), (*DNSProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_DNSProvider_To_v1alpha1_DNSProvider(a.(*garden.DNSProvider), b.(*DNSProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Endpoint)(nil), (*core.Endpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Endpoint_To_core_Endpoint(a.(*Endpoint), b.(*core.Endpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.Endpoint)(nil), (*Endpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_Endpoint_To_v1alpha1_Endpoint(a.(*core.Endpoint), b.(*Endpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExpirableVersion)(nil), (*garden.ExpirableVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExpirableVersion_To_garden_ExpirableVersion(a.(*ExpirableVersion), b.(*garden.ExpirableVersion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ExpirableVersion)(nil), (*ExpirableVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ExpirableVersion_To_v1alpha1_ExpirableVersion(a.(*garden.ExpirableVersion), b.(*ExpirableVersion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Extension)(nil), (*garden.Extension)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Extension_To_garden_Extension(a.(*Extension), b.(*garden.Extension), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Extension)(nil), (*Extension)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Extension_To_v1alpha1_Extension(a.(*garden.Extension), b.(*Extension), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExtensionResourceState)(nil), (*core.ExtensionResourceState)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExtensionResourceState_To_core_ExtensionResourceState(a.(*ExtensionResourceState), b.(*core.ExtensionResourceState), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ExtensionResourceState)(nil), (*ExtensionResourceState)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ExtensionResourceState_To_v1alpha1_ExtensionResourceState(a.(*core.ExtensionResourceState), b.(*ExtensionResourceState), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Gardener)(nil), (*garden.Gardener)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Gardener_To_garden_Gardener(a.(*Gardener), b.(*garden.Gardener), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Gardener)(nil), (*Gardener)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Gardener_To_v1alpha1_Gardener(a.(*garden.Gardener), b.(*Gardener), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GardenerResourceData)(nil), (*core.GardenerResourceData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_GardenerResourceData_To_core_GardenerResourceData(a.(*GardenerResourceData), b.(*core.GardenerResourceData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.GardenerResourceData)(nil), (*GardenerResourceData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_GardenerResourceData_To_v1alpha1_GardenerResourceData(a.(*core.GardenerResourceData), b.(*GardenerResourceData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Hibernation)(nil), (*garden.Hibernation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Hibernation_To_garden_Hibernation(a.(*Hibernation), b.(*garden.Hibernation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Hibernation)(nil), (*Hibernation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Hibernation_To_v1alpha1_Hibernation(a.(*garden.Hibernation), b.(*Hibernation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HibernationSchedule)(nil), (*garden.HibernationSchedule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_HibernationSchedule_To_garden_HibernationSchedule(a.(*HibernationSchedule), b.(*garden.HibernationSchedule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.HibernationSchedule)(nil), (*HibernationSchedule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_HibernationSchedule_To_v1alpha1_HibernationSchedule(a.(*garden.HibernationSchedule), b.(*HibernationSchedule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HorizontalPodAutoscalerConfig)(nil), (*garden.HorizontalPodAutoscalerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(a.(*HorizontalPodAutoscalerConfig), b.(*garden.HorizontalPodAutoscalerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.HorizontalPodAutoscalerConfig)(nil), (*HorizontalPodAutoscalerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_HorizontalPodAutoscalerConfig_To_v1alpha1_HorizontalPodAutoscalerConfig(a.(*garden.HorizontalPodAutoscalerConfig), b.(*HorizontalPodAutoscalerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeAPIServerConfig)(nil), (*garden.KubeAPIServerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(a.(*KubeAPIServerConfig), b.(*garden.KubeAPIServerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeAPIServerConfig)(nil), (*KubeAPIServerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeAPIServerConfig_To_v1alpha1_KubeAPIServerConfig(a.(*garden.KubeAPIServerConfig), b.(*KubeAPIServerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeControllerManagerConfig)(nil), (*garden.KubeControllerManagerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(a.(*KubeControllerManagerConfig), b.(*garden.KubeControllerManagerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeControllerManagerConfig)(nil), (*KubeControllerManagerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeControllerManagerConfig_To_v1alpha1_KubeControllerManagerConfig(a.(*garden.KubeControllerManagerConfig), b.(*KubeControllerManagerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeProxyConfig)(nil), (*garden.KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubeProxyConfig_To_garden_KubeProxyConfig(a.(*KubeProxyConfig), b.(*garden.KubeProxyConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeProxyConfig)(nil), (*KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeProxyConfig_To_v1alpha1_KubeProxyConfig(a.(*garden.KubeProxyConfig), b.(*KubeProxyConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeSchedulerConfig)(nil), (*garden.KubeSchedulerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(a.(*KubeSchedulerConfig), b.(*garden.KubeSchedulerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeSchedulerConfig)(nil), (*KubeSchedulerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeSchedulerConfig_To_v1alpha1_KubeSchedulerConfig(a.(*garden.KubeSchedulerConfig), b.(*KubeSchedulerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfig)(nil), (*garden.KubeletConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubeletConfig_To_garden_KubeletConfig(a.(*KubeletConfig), b.(*garden.KubeletConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfig)(nil), (*KubeletConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfig_To_v1alpha1_KubeletConfig(a.(*garden.KubeletConfig), b.(*KubeletConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfigEviction)(nil), (*garden.KubeletConfigEviction)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubeletConfigEviction_To_garden_KubeletConfigEviction(a.(*KubeletConfigEviction), b.(*garden.KubeletConfigEviction), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfigEviction)(nil), (*KubeletConfigEviction)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfigEviction_To_v1alpha1_KubeletConfigEviction(a.(*garden.KubeletConfigEviction), b.(*KubeletConfigEviction), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfigEvictionMinimumReclaim)(nil), (*garden.KubeletConfigEvictionMinimumReclaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(a.(*KubeletConfigEvictionMinimumReclaim), b.(*garden.KubeletConfigEvictionMinimumReclaim), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfigEvictionMinimumReclaim)(nil), (*KubeletConfigEvictionMinimumReclaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfigEvictionMinimumReclaim_To_v1alpha1_KubeletConfigEvictionMinimumReclaim(a.(*garden.KubeletConfigEvictionMinimumReclaim), b.(*KubeletConfigEvictionMinimumReclaim), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfigEvictionSoftGracePeriod)(nil), (*garden.KubeletConfigEvictionSoftGracePeriod)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(a.(*KubeletConfigEvictionSoftGracePeriod), b.(*garden.KubeletConfigEvictionSoftGracePeriod), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfigEvictionSoftGracePeriod)(nil), (*KubeletConfigEvictionSoftGracePeriod)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1alpha1_KubeletConfigEvictionSoftGracePeriod(a.(*garden.KubeletConfigEvictionSoftGracePeriod), b.(*KubeletConfigEvictionSoftGracePeriod), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Kubernetes)(nil), (*garden.Kubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Kubernetes_To_garden_Kubernetes(a.(*Kubernetes), b.(*garden.Kubernetes), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Kubernetes)(nil), (*Kubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Kubernetes_To_v1alpha1_Kubernetes(a.(*garden.Kubernetes), b.(*Kubernetes), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesConfig)(nil), (*garden.KubernetesConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubernetesConfig_To_garden_KubernetesConfig(a.(*KubernetesConfig), b.(*garden.KubernetesConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubernetesConfig)(nil), (*KubernetesConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesConfig_To_v1alpha1_KubernetesConfig(a.(*garden.KubernetesConfig), b.(*KubernetesConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesDashboard)(nil), (*garden.KubernetesDashboard)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubernetesDashboard_To_garden_KubernetesDashboard(a.(*KubernetesDashboard), b.(*garden.KubernetesDashboard), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubernetesDashboard)(nil), (*KubernetesDashboard)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesDashboard_To_v1alpha1_KubernetesDashboard(a.(*garden.KubernetesDashboard), b.(*KubernetesDashboard), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesInfo)(nil), (*core.KubernetesInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubernetesInfo_To_core_KubernetesInfo(a.(*KubernetesInfo), b.(*core.KubernetesInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.KubernetesInfo)(nil), (*KubernetesInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_KubernetesInfo_To_v1alpha1_KubernetesInfo(a.(*core.KubernetesInfo), b.(*KubernetesInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesSettings)(nil), (*garden.KubernetesSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_KubernetesSettings_To_garden_KubernetesSettings(a.(*KubernetesSettings), b.(*garden.KubernetesSettings), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubernetesSettings)(nil), (*KubernetesSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesSettings_To_v1alpha1_KubernetesSettings(a.(*garden.KubernetesSettings), b.(*KubernetesSettings), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LastError)(nil), (*core.LastError)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_LastError_To_core_LastError(a.(*LastError), b.(*core.LastError), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.LastError)(nil), (*LastError)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_LastError_To_v1alpha1_LastError(a.(*core.LastError), b.(*LastError), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LastOperation)(nil), (*core.LastOperation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_LastOperation_To_core_LastOperation(a.(*LastOperation), b.(*core.LastOperation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.LastOperation)(nil), (*LastOperation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_LastOperation_To_v1alpha1_LastOperation(a.(*core.LastOperation), b.(*LastOperation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Machine)(nil), (*garden.Machine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Machine_To_garden_Machine(a.(*Machine), b.(*garden.Machine), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Machine)(nil), (*Machine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Machine_To_v1alpha1_Machine(a.(*garden.Machine), b.(*Machine), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineImage)(nil), (*garden.MachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_MachineImage_To_garden_MachineImage(a.(*MachineImage), b.(*garden.MachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MachineImage)(nil), (*MachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineImage_To_v1alpha1_MachineImage(a.(*garden.MachineImage), b.(*MachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineType)(nil), (*garden.MachineType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_MachineType_To_garden_MachineType(a.(*MachineType), b.(*garden.MachineType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MachineType)(nil), (*MachineType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineType_To_v1alpha1_MachineType(a.(*garden.MachineType), b.(*MachineType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineTypeStorage)(nil), (*garden.MachineTypeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_MachineTypeStorage_To_garden_MachineTypeStorage(a.(*MachineTypeStorage), b.(*garden.MachineTypeStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MachineTypeStorage)(nil), (*MachineTypeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineTypeStorage_To_v1alpha1_MachineTypeStorage(a.(*garden.MachineTypeStorage), b.(*MachineTypeStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Maintenance)(nil), (*garden.Maintenance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Maintenance_To_garden_Maintenance(a.(*Maintenance), b.(*garden.Maintenance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Maintenance)(nil), (*Maintenance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Maintenance_To_v1alpha1_Maintenance(a.(*garden.Maintenance), b.(*Maintenance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MaintenanceAutoUpdate)(nil), (*garden.MaintenanceAutoUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(a.(*MaintenanceAutoUpdate), b.(*garden.MaintenanceAutoUpdate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MaintenanceAutoUpdate)(nil), (*MaintenanceAutoUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MaintenanceAutoUpdate_To_v1alpha1_MaintenanceAutoUpdate(a.(*garden.MaintenanceAutoUpdate), b.(*MaintenanceAutoUpdate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MaintenanceTimeWindow)(nil), (*garden.MaintenanceTimeWindow)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(a.(*MaintenanceTimeWindow), b.(*garden.MaintenanceTimeWindow), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MaintenanceTimeWindow)(nil), (*MaintenanceTimeWindow)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MaintenanceTimeWindow_To_v1alpha1_MaintenanceTimeWindow(a.(*garden.MaintenanceTimeWindow), b.(*MaintenanceTimeWindow), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Monitoring)(nil), (*garden.Monitoring)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Monitoring_To_garden_Monitoring(a.(*Monitoring), b.(*garden.Monitoring), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Monitoring)(nil), (*Monitoring)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Monitoring_To_v1alpha1_Monitoring(a.(*garden.Monitoring), b.(*Monitoring), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Networking)(nil), (*garden.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Networking_To_garden_Networking(a.(*Networking), b.(*garden.Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Networking_To_v1alpha1_Networking(a.(*garden.Networking), b.(*Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NginxIngress)(nil), (*garden.NginxIngress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_NginxIngress_To_garden_NginxIngress(a.(*NginxIngress), b.(*garden.NginxIngress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.NginxIngress)(nil), (*NginxIngress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_NginxIngress_To_v1alpha1_NginxIngress(a.(*garden.NginxIngress), b.(*NginxIngress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCConfig)(nil), (*garden.OIDCConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCConfig_To_garden_OIDCConfig(a.(*OIDCConfig), b.(*garden.OIDCConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OIDCConfig)(nil), (*OIDCConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OIDCConfig_To_v1alpha1_OIDCConfig(a.(*garden.OIDCConfig), b.(*OIDCConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenIDConnectClientAuthentication)(nil), (*garden.OpenIDConnectClientAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(a.(*OpenIDConnectClientAuthentication), b.(*garden.OpenIDConnectClientAuthentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenIDConnectClientAuthentication)(nil), (*OpenIDConnectClientAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication(a.(*garden.OpenIDConnectClientAuthentication), b.(*OpenIDConnectClientAuthentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Plant)(nil), (*core.Plant)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Plant_To_core_Plant(a.(*Plant), b.(*core.Plant), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.Plant)(nil), (*Plant)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_Plant_To_v1alpha1_Plant(a.(*core.Plant), b.(*Plant), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PlantList)(nil), (*core.PlantList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_PlantList_To_core_PlantList(a.(*PlantList), b.(*core.PlantList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.PlantList)(nil), (*PlantList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_PlantList_To_v1alpha1_PlantList(a.(*core.PlantList), b.(*PlantList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PlantSpec)(nil), (*core.PlantSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_PlantSpec_To_core_PlantSpec(a.(*PlantSpec), b.(*core.PlantSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.PlantSpec)(nil), (*PlantSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_PlantSpec_To_v1alpha1_PlantSpec(a.(*core.PlantSpec), b.(*PlantSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PlantStatus)(nil), (*core.PlantStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_PlantStatus_To_core_PlantStatus(a.(*PlantStatus), b.(*core.PlantStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.PlantStatus)(nil), (*PlantStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_PlantStatus_To_v1alpha1_PlantStatus(a.(*core.PlantStatus), b.(*PlantStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Project)(nil), (*garden.Project)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Project_To_garden_Project(a.(*Project), b.(*garden.Project), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Project)(nil), (*Project)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Project_To_v1alpha1_Project(a.(*garden.Project), b.(*Project), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectList)(nil), (*garden.ProjectList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ProjectList_To_garden_ProjectList(a.(*ProjectList), b.(*garden.ProjectList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectList)(nil), (*ProjectList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectList_To_v1alpha1_ProjectList(a.(*garden.ProjectList), b.(*ProjectList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMember)(nil), (*garden.ProjectMember)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ProjectMember_To_garden_ProjectMember(a.(*ProjectMember), b.(*garden.ProjectMember), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectMember)(nil), (*ProjectMember)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectMember_To_v1alpha1_ProjectMember(a.(*garden.ProjectMember), b.(*ProjectMember), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectSpec)(nil), (*garden.ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ProjectSpec_To_garden_ProjectSpec(a.(*ProjectSpec), b.(*garden.ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectSpec)(nil), (*ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectSpec_To_v1alpha1_ProjectSpec(a.(*garden.ProjectSpec), b.(*ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectStatus)(nil), (*garden.ProjectStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ProjectStatus_To_garden_ProjectStatus(a.(*ProjectStatus), b.(*garden.ProjectStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectStatus)(nil), (*ProjectStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectStatus_To_v1alpha1_ProjectStatus(a.(*garden.ProjectStatus), b.(*ProjectStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Provider)(nil), (*garden.Provider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Provider_To_garden_Provider(a.(*Provider), b.(*garden.Provider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Provider)(nil), (*Provider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Provider_To_v1alpha1_Provider(a.(*garden.Provider), b.(*Provider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProviderConfig)(nil), (*core.ProviderConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ProviderConfig_To_core_ProviderConfig(a.(*ProviderConfig), b.(*core.ProviderConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ProviderConfig)(nil), (*ProviderConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ProviderConfig_To_v1alpha1_ProviderConfig(a.(*core.ProviderConfig), b.(*ProviderConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Quota)(nil), (*garden.Quota)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Quota_To_garden_Quota(a.(*Quota), b.(*garden.Quota), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Quota)(nil), (*Quota)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Quota_To_v1alpha1_Quota(a.(*garden.Quota), b.(*Quota), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*QuotaList)(nil), (*garden.QuotaList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_QuotaList_To_garden_QuotaList(a.(*QuotaList), b.(*garden.QuotaList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.QuotaList)(nil), (*QuotaList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_QuotaList_To_v1alpha1_QuotaList(a.(*garden.QuotaList), b.(*QuotaList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*QuotaSpec)(nil), (*garden.QuotaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_QuotaSpec_To_garden_QuotaSpec(a.(*QuotaSpec), b.(*garden.QuotaSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.QuotaSpec)(nil), (*QuotaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_QuotaSpec_To_v1alpha1_QuotaSpec(a.(*garden.QuotaSpec), b.(*QuotaSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Region)(nil), (*garden.Region)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Region_To_garden_Region(a.(*Region), b.(*garden.Region), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Region)(nil), (*Region)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Region_To_v1alpha1_Region(a.(*garden.Region), b.(*Region), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecretBinding)(nil), (*garden.SecretBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SecretBinding_To_garden_SecretBinding(a.(*SecretBinding), b.(*garden.SecretBinding), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SecretBinding)(nil), (*SecretBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SecretBinding_To_v1alpha1_SecretBinding(a.(*garden.SecretBinding), b.(*SecretBinding), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecretBindingList)(nil), (*garden.SecretBindingList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SecretBindingList_To_garden_SecretBindingList(a.(*SecretBindingList), b.(*garden.SecretBindingList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SecretBindingList)(nil), (*SecretBindingList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SecretBindingList_To_v1alpha1_SecretBindingList(a.(*garden.SecretBindingList), b.(*SecretBindingList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Seed)(nil), (*garden.Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Seed_To_garden_Seed(a.(*Seed), b.(*garden.Seed), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Seed)(nil), (*Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Seed_To_v1alpha1_Seed(a.(*garden.Seed), b.(*Seed), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedBackup)(nil), (*garden.SeedBackup)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedBackup_To_garden_SeedBackup(a.(*SeedBackup), b.(*garden.SeedBackup), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedBackup)(nil), (*SeedBackup)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedBackup_To_v1alpha1_SeedBackup(a.(*garden.SeedBackup), b.(*SeedBackup), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedList)(nil), (*garden.SeedList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedList_To_garden_SeedList(a.(*SeedList), b.(*garden.SeedList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedList)(nil), (*SeedList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedList_To_v1alpha1_SeedList(a.(*garden.SeedList), b.(*SeedList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedNetworks)(nil), (*garden.SeedNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedNetworks_To_garden_SeedNetworks(a.(*SeedNetworks), b.(*garden.SeedNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedNetworks)(nil), (*SeedNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedNetworks_To_v1alpha1_SeedNetworks(a.(*garden.SeedNetworks), b.(*SeedNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedProvider)(nil), (*garden.SeedProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedProvider_To_garden_SeedProvider(a.(*SeedProvider), b.(*garden.SeedProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedProvider)(nil), (*SeedProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedProvider_To_v1alpha1_SeedProvider(a.(*garden.SeedProvider), b.(*SeedProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedSpec)(nil), (*garden.SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedSpec_To_garden_SeedSpec(a.(*SeedSpec), b.(*garden.SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedSpec)(nil), (*SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedSpec_To_v1alpha1_SeedSpec(a.(*garden.SeedSpec), b.(*SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedStatus)(nil), (*garden.SeedStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedStatus_To_garden_SeedStatus(a.(*SeedStatus), b.(*garden.SeedStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedStatus)(nil), (*SeedStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedStatus_To_v1alpha1_SeedStatus(a.(*garden.SeedStatus), b.(*SeedStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedTaint)(nil), (*garden.SeedTaint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedTaint_To_garden_SeedTaint(a.(*SeedTaint), b.(*garden.SeedTaint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedTaint)(nil), (*SeedTaint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedTaint_To_v1alpha1_SeedTaint(a.(*garden.SeedTaint), b.(*SeedTaint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedVolume)(nil), (*garden.SeedVolume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedVolume_To_garden_SeedVolume(a.(*SeedVolume), b.(*garden.SeedVolume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedVolume)(nil), (*SeedVolume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedVolume_To_v1alpha1_SeedVolume(a.(*garden.SeedVolume), b.(*SeedVolume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedVolumeProvider)(nil), (*garden.SeedVolumeProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedVolumeProvider_To_garden_SeedVolumeProvider(a.(*SeedVolumeProvider), b.(*garden.SeedVolumeProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedVolumeProvider)(nil), (*SeedVolumeProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedVolumeProvider_To_v1alpha1_SeedVolumeProvider(a.(*garden.SeedVolumeProvider), b.(*SeedVolumeProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ServiceAccountConfig)(nil), (*garden.ServiceAccountConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ServiceAccountConfig_To_garden_ServiceAccountConfig(a.(*ServiceAccountConfig), b.(*garden.ServiceAccountConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ServiceAccountConfig)(nil), (*ServiceAccountConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ServiceAccountConfig_To_v1alpha1_ServiceAccountConfig(a.(*garden.ServiceAccountConfig), b.(*ServiceAccountConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Shoot)(nil), (*garden.Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Shoot_To_garden_Shoot(a.(*Shoot), b.(*garden.Shoot), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Shoot)(nil), (*Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Shoot_To_v1alpha1_Shoot(a.(*garden.Shoot), b.(*Shoot), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootList)(nil), (*garden.ShootList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootList_To_garden_ShootList(a.(*ShootList), b.(*garden.ShootList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootList)(nil), (*ShootList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootList_To_v1alpha1_ShootList(a.(*garden.ShootList), b.(*ShootList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootMachineImage)(nil), (*garden.ShootMachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootMachineImage_To_garden_ShootMachineImage(a.(*ShootMachineImage), b.(*garden.ShootMachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootMachineImage)(nil), (*ShootMachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootMachineImage_To_v1alpha1_ShootMachineImage(a.(*garden.ShootMachineImage), b.(*ShootMachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootNetworks)(nil), (*garden.ShootNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootNetworks_To_garden_ShootNetworks(a.(*ShootNetworks), b.(*garden.ShootNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootNetworks)(nil), (*ShootNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootNetworks_To_v1alpha1_ShootNetworks(a.(*garden.ShootNetworks), b.(*ShootNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootSpec)(nil), (*garden.ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootSpec_To_garden_ShootSpec(a.(*ShootSpec), b.(*garden.ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootSpec)(nil), (*ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootSpec_To_v1alpha1_ShootSpec(a.(*garden.ShootSpec), b.(*ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootState)(nil), (*core.ShootState)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootState_To_core_ShootState(a.(*ShootState), b.(*core.ShootState), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ShootState)(nil), (*ShootState)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ShootState_To_v1alpha1_ShootState(a.(*core.ShootState), b.(*ShootState), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootStateList)(nil), (*core.ShootStateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootStateList_To_core_ShootStateList(a.(*ShootStateList), b.(*core.ShootStateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ShootStateList)(nil), (*ShootStateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ShootStateList_To_v1alpha1_ShootStateList(a.(*core.ShootStateList), b.(*ShootStateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootStateSpec)(nil), (*core.ShootStateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootStateSpec_To_core_ShootStateSpec(a.(*ShootStateSpec), b.(*core.ShootStateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ShootStateSpec)(nil), (*ShootStateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ShootStateSpec_To_v1alpha1_ShootStateSpec(a.(*core.ShootStateSpec), b.(*ShootStateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootStatus)(nil), (*garden.ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootStatus_To_garden_ShootStatus(a.(*ShootStatus), b.(*garden.ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootStatus)(nil), (*ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootStatus_To_v1alpha1_ShootStatus(a.(*garden.ShootStatus), b.(*ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Volume)(nil), (*garden.Volume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Volume_To_garden_Volume(a.(*Volume), b.(*garden.Volume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Volume)(nil), (*Volume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Volume_To_v1alpha1_Volume(a.(*garden.Volume), b.(*Volume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VolumeType)(nil), (*garden.VolumeType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_VolumeType_To_garden_VolumeType(a.(*VolumeType), b.(*garden.VolumeType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.VolumeType)(nil), (*VolumeType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_VolumeType_To_v1alpha1_VolumeType(a.(*garden.VolumeType), b.(*VolumeType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Worker)(nil), (*garden.Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Worker_To_garden_Worker(a.(*Worker), b.(*garden.Worker), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Worker)(nil), (*Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Worker_To_v1alpha1_Worker(a.(*garden.Worker), b.(*Worker), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*WorkerKubernetes)(nil), (*garden.WorkerKubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_WorkerKubernetes_To_garden_WorkerKubernetes(a.(*WorkerKubernetes), b.(*garden.WorkerKubernetes), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.WorkerKubernetes)(nil), (*WorkerKubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_WorkerKubernetes_To_v1alpha1_WorkerKubernetes(a.(*garden.WorkerKubernetes), b.(*WorkerKubernetes), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*core.BackupBucketSpec)(nil), (*BackupBucketSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucketSpec_To_v1alpha1_BackupBucketSpec(a.(*core.BackupBucketSpec), b.(*BackupBucketSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*core.BackupBucket)(nil), (*BackupBucket)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucket_To_v1alpha1_BackupBucket(a.(*core.BackupBucket), b.(*BackupBucket), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*core.BackupEntrySpec)(nil), (*BackupEntrySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupEntrySpec_To_v1alpha1_BackupEntrySpec(a.(*core.BackupEntrySpec), b.(*BackupEntrySpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*core.BackupEntry)(nil), (*BackupEntry)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupEntry_To_v1alpha1_BackupEntry(a.(*core.BackupEntry), b.(*BackupEntry), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Addons)(nil), (*Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Addons_To_v1alpha1_Addons(a.(*garden.Addons), b.(*Addons), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.CloudProfileSpec)(nil), (*CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfileSpec_To_v1alpha1_CloudProfileSpec(a.(*garden.CloudProfileSpec), b.(*CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.CloudProfile)(nil), (*CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfile_To_v1alpha1_CloudProfile(a.(*garden.CloudProfile), b.(*CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Kubernetes)(nil), (*Kubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Kubernetes_To_v1alpha1_Kubernetes(a.(*garden.Kubernetes), b.(*Kubernetes), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.ProjectSpec)(nil), (*ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectSpec_To_v1alpha1_ProjectSpec(a.(*garden.ProjectSpec), b.(*ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.SeedNetworks)(nil), (*SeedNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedNetworks_To_v1alpha1_SeedNetworks(a.(*garden.SeedNetworks), b.(*SeedNetworks), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.SeedSpec)(nil), (*SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedSpec_To_v1alpha1_SeedSpec(a.(*garden.SeedSpec), b.(*SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Seed)(nil), (*Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Seed_To_v1alpha1_Seed(a.(*garden.Seed), b.(*Seed), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.ShootSpec)(nil), (*ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootSpec_To_v1alpha1_ShootSpec(a.(*garden.ShootSpec), b.(*ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.ShootStatus)(nil), (*ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootStatus_To_v1alpha1_ShootStatus(a.(*garden.ShootStatus), b.(*ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Shoot)(nil), (*Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Shoot_To_v1alpha1_Shoot(a.(*garden.Shoot), b.(*Shoot), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Addons)(nil), (*garden.Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Addons_To_garden_Addons(a.(*Addons), b.(*garden.Addons), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*BackupBucketSpec)(nil), (*core.BackupBucketSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupBucketSpec_To_core_BackupBucketSpec(a.(*BackupBucketSpec), b.(*core.BackupBucketSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*BackupBucket)(nil), (*core.BackupBucket)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupBucket_To_core_BackupBucket(a.(*BackupBucket), b.(*core.BackupBucket), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*BackupEntrySpec)(nil), (*core.BackupEntrySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupEntrySpec_To_core_BackupEntrySpec(a.(*BackupEntrySpec), b.(*core.BackupEntrySpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*BackupEntry)(nil), (*core.BackupEntry)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_BackupEntry_To_core_BackupEntry(a.(*BackupEntry), b.(*core.BackupEntry), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*CloudProfileSpec)(nil), (*garden.CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CloudProfileSpec_To_garden_CloudProfileSpec(a.(*CloudProfileSpec), b.(*garden.CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*CloudProfile)(nil), (*garden.CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CloudProfile_To_garden_CloudProfile(a.(*CloudProfile), b.(*garden.CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Kubernetes)(nil), (*garden.Kubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Kubernetes_To_garden_Kubernetes(a.(*Kubernetes), b.(*garden.Kubernetes), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ProjectSpec)(nil), (*garden.ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ProjectSpec_To_garden_ProjectSpec(a.(*ProjectSpec), b.(*garden.ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*SeedNetworks)(nil), (*garden.SeedNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedNetworks_To_garden_SeedNetworks(a.(*SeedNetworks), b.(*garden.SeedNetworks), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*SeedSpec)(nil), (*garden.SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_SeedSpec_To_garden_SeedSpec(a.(*SeedSpec), b.(*garden.SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Seed)(nil), (*garden.Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Seed_To_garden_Seed(a.(*Seed), b.(*garden.Seed), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ShootSpec)(nil), (*garden.ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootSpec_To_garden_ShootSpec(a.(*ShootSpec), b.(*garden.ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ShootStatus)(nil), (*garden.ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ShootStatus_To_garden_ShootStatus(a.(*ShootStatus), b.(*garden.ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Shoot)(nil), (*garden.Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Shoot_To_garden_Shoot(a.(*Shoot), b.(*garden.Shoot), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_Addon_To_garden_Addon(in *Addon, out *garden.Addon, s conversion.Scope) error { + out.Enabled = in.Enabled + return nil +} + +// Convert_v1alpha1_Addon_To_garden_Addon is an autogenerated conversion function. +func Convert_v1alpha1_Addon_To_garden_Addon(in *Addon, out *garden.Addon, s conversion.Scope) error { + return autoConvert_v1alpha1_Addon_To_garden_Addon(in, out, s) +} + +func autoConvert_garden_Addon_To_v1alpha1_Addon(in *garden.Addon, out *Addon, s conversion.Scope) error { + out.Enabled = in.Enabled + return nil +} + +// Convert_garden_Addon_To_v1alpha1_Addon is an autogenerated conversion function. +func Convert_garden_Addon_To_v1alpha1_Addon(in *garden.Addon, out *Addon, s conversion.Scope) error { + return autoConvert_garden_Addon_To_v1alpha1_Addon(in, out, s) +} + +func autoConvert_v1alpha1_Addons_To_garden_Addons(in *Addons, out *garden.Addons, s conversion.Scope) error { + out.KubernetesDashboard = (*garden.KubernetesDashboard)(unsafe.Pointer(in.KubernetesDashboard)) + out.NginxIngress = (*garden.NginxIngress)(unsafe.Pointer(in.NginxIngress)) + return nil +} + +func autoConvert_garden_Addons_To_v1alpha1_Addons(in *garden.Addons, out *Addons, s conversion.Scope) error { + out.KubernetesDashboard = (*KubernetesDashboard)(unsafe.Pointer(in.KubernetesDashboard)) + out.NginxIngress = (*NginxIngress)(unsafe.Pointer(in.NginxIngress)) + // WARNING: in.ClusterAutoscaler requires manual conversion: does not exist in peer-type + // WARNING: in.Heapster requires manual conversion: does not exist in peer-type + // WARNING: in.Kube2IAM requires manual conversion: does not exist in peer-type + // WARNING: in.KubeLego requires manual conversion: does not exist in peer-type + // WARNING: in.Monocular requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha1_AdmissionPlugin_To_garden_AdmissionPlugin(in *AdmissionPlugin, out *garden.AdmissionPlugin, s conversion.Scope) error { + out.Name = in.Name + out.Config = (*garden.ProviderConfig)(unsafe.Pointer(in.Config)) + return nil +} + +// Convert_v1alpha1_AdmissionPlugin_To_garden_AdmissionPlugin is an autogenerated conversion function. +func Convert_v1alpha1_AdmissionPlugin_To_garden_AdmissionPlugin(in *AdmissionPlugin, out *garden.AdmissionPlugin, s conversion.Scope) error { + return autoConvert_v1alpha1_AdmissionPlugin_To_garden_AdmissionPlugin(in, out, s) +} + +func autoConvert_garden_AdmissionPlugin_To_v1alpha1_AdmissionPlugin(in *garden.AdmissionPlugin, out *AdmissionPlugin, s conversion.Scope) error { + out.Name = in.Name + out.Config = (*ProviderConfig)(unsafe.Pointer(in.Config)) + return nil +} + +// Convert_garden_AdmissionPlugin_To_v1alpha1_AdmissionPlugin is an autogenerated conversion function. +func Convert_garden_AdmissionPlugin_To_v1alpha1_AdmissionPlugin(in *garden.AdmissionPlugin, out *AdmissionPlugin, s conversion.Scope) error { + return autoConvert_garden_AdmissionPlugin_To_v1alpha1_AdmissionPlugin(in, out, s) +} + +func autoConvert_v1alpha1_Alerting_To_garden_Alerting(in *Alerting, out *garden.Alerting, s conversion.Scope) error { + out.EmailReceivers = *(*[]string)(unsafe.Pointer(&in.EmailReceivers)) + return nil +} + +// Convert_v1alpha1_Alerting_To_garden_Alerting is an autogenerated conversion function. +func Convert_v1alpha1_Alerting_To_garden_Alerting(in *Alerting, out *garden.Alerting, s conversion.Scope) error { + return autoConvert_v1alpha1_Alerting_To_garden_Alerting(in, out, s) +} + +func autoConvert_garden_Alerting_To_v1alpha1_Alerting(in *garden.Alerting, out *Alerting, s conversion.Scope) error { + out.EmailReceivers = *(*[]string)(unsafe.Pointer(&in.EmailReceivers)) + return nil +} + +// Convert_garden_Alerting_To_v1alpha1_Alerting is an autogenerated conversion function. +func Convert_garden_Alerting_To_v1alpha1_Alerting(in *garden.Alerting, out *Alerting, s conversion.Scope) error { + return autoConvert_garden_Alerting_To_v1alpha1_Alerting(in, out, s) +} + +func autoConvert_v1alpha1_AuditConfig_To_garden_AuditConfig(in *AuditConfig, out *garden.AuditConfig, s conversion.Scope) error { + out.AuditPolicy = (*garden.AuditPolicy)(unsafe.Pointer(in.AuditPolicy)) + return nil +} + +// Convert_v1alpha1_AuditConfig_To_garden_AuditConfig is an autogenerated conversion function. +func Convert_v1alpha1_AuditConfig_To_garden_AuditConfig(in *AuditConfig, out *garden.AuditConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_AuditConfig_To_garden_AuditConfig(in, out, s) +} + +func autoConvert_garden_AuditConfig_To_v1alpha1_AuditConfig(in *garden.AuditConfig, out *AuditConfig, s conversion.Scope) error { + out.AuditPolicy = (*AuditPolicy)(unsafe.Pointer(in.AuditPolicy)) + return nil +} + +// Convert_garden_AuditConfig_To_v1alpha1_AuditConfig is an autogenerated conversion function. +func Convert_garden_AuditConfig_To_v1alpha1_AuditConfig(in *garden.AuditConfig, out *AuditConfig, s conversion.Scope) error { + return autoConvert_garden_AuditConfig_To_v1alpha1_AuditConfig(in, out, s) +} + +func autoConvert_v1alpha1_AuditPolicy_To_garden_AuditPolicy(in *AuditPolicy, out *garden.AuditPolicy, s conversion.Scope) error { + out.ConfigMapRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigMapRef)) + return nil +} + +// Convert_v1alpha1_AuditPolicy_To_garden_AuditPolicy is an autogenerated conversion function. +func Convert_v1alpha1_AuditPolicy_To_garden_AuditPolicy(in *AuditPolicy, out *garden.AuditPolicy, s conversion.Scope) error { + return autoConvert_v1alpha1_AuditPolicy_To_garden_AuditPolicy(in, out, s) +} + +func autoConvert_garden_AuditPolicy_To_v1alpha1_AuditPolicy(in *garden.AuditPolicy, out *AuditPolicy, s conversion.Scope) error { + out.ConfigMapRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigMapRef)) + return nil +} + +// Convert_garden_AuditPolicy_To_v1alpha1_AuditPolicy is an autogenerated conversion function. +func Convert_garden_AuditPolicy_To_v1alpha1_AuditPolicy(in *garden.AuditPolicy, out *AuditPolicy, s conversion.Scope) error { + return autoConvert_garden_AuditPolicy_To_v1alpha1_AuditPolicy(in, out, s) +} + +func autoConvert_v1alpha1_AvailabilityZone_To_garden_AvailabilityZone(in *AvailabilityZone, out *garden.AvailabilityZone, s conversion.Scope) error { + out.Name = in.Name + out.UnavailableMachineTypes = *(*[]string)(unsafe.Pointer(&in.UnavailableMachineTypes)) + out.UnavailableVolumeTypes = *(*[]string)(unsafe.Pointer(&in.UnavailableVolumeTypes)) + return nil +} + +// Convert_v1alpha1_AvailabilityZone_To_garden_AvailabilityZone is an autogenerated conversion function. +func Convert_v1alpha1_AvailabilityZone_To_garden_AvailabilityZone(in *AvailabilityZone, out *garden.AvailabilityZone, s conversion.Scope) error { + return autoConvert_v1alpha1_AvailabilityZone_To_garden_AvailabilityZone(in, out, s) +} + +func autoConvert_garden_AvailabilityZone_To_v1alpha1_AvailabilityZone(in *garden.AvailabilityZone, out *AvailabilityZone, s conversion.Scope) error { + out.Name = in.Name + out.UnavailableMachineTypes = *(*[]string)(unsafe.Pointer(&in.UnavailableMachineTypes)) + out.UnavailableVolumeTypes = *(*[]string)(unsafe.Pointer(&in.UnavailableVolumeTypes)) + return nil +} + +// Convert_garden_AvailabilityZone_To_v1alpha1_AvailabilityZone is an autogenerated conversion function. +func Convert_garden_AvailabilityZone_To_v1alpha1_AvailabilityZone(in *garden.AvailabilityZone, out *AvailabilityZone, s conversion.Scope) error { + return autoConvert_garden_AvailabilityZone_To_v1alpha1_AvailabilityZone(in, out, s) +} + +func autoConvert_v1alpha1_BackupBucket_To_core_BackupBucket(in *BackupBucket, out *core.BackupBucket, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_BackupBucketSpec_To_core_BackupBucketSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_BackupBucketStatus_To_core_BackupBucketStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_core_BackupBucket_To_v1alpha1_BackupBucket(in *core.BackupBucket, out *BackupBucket, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_BackupBucketSpec_To_v1alpha1_BackupBucketSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_core_BackupBucketStatus_To_v1alpha1_BackupBucketStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_BackupBucketList_To_core_BackupBucketList(in *BackupBucketList, out *core.BackupBucketList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]core.BackupBucket, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_BackupBucket_To_core_BackupBucket(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha1_BackupBucketList_To_core_BackupBucketList is an autogenerated conversion function. +func Convert_v1alpha1_BackupBucketList_To_core_BackupBucketList(in *BackupBucketList, out *core.BackupBucketList, s conversion.Scope) error { + return autoConvert_v1alpha1_BackupBucketList_To_core_BackupBucketList(in, out, s) +} + +func autoConvert_core_BackupBucketList_To_v1alpha1_BackupBucketList(in *core.BackupBucketList, out *BackupBucketList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BackupBucket, len(*in)) + for i := range *in { + if err := Convert_core_BackupBucket_To_v1alpha1_BackupBucket(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_core_BackupBucketList_To_v1alpha1_BackupBucketList is an autogenerated conversion function. +func Convert_core_BackupBucketList_To_v1alpha1_BackupBucketList(in *core.BackupBucketList, out *BackupBucketList, s conversion.Scope) error { + return autoConvert_core_BackupBucketList_To_v1alpha1_BackupBucketList(in, out, s) +} + +func autoConvert_v1alpha1_BackupBucketProvider_To_core_BackupBucketProvider(in *BackupBucketProvider, out *core.BackupBucketProvider, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_v1alpha1_BackupBucketProvider_To_core_BackupBucketProvider is an autogenerated conversion function. +func Convert_v1alpha1_BackupBucketProvider_To_core_BackupBucketProvider(in *BackupBucketProvider, out *core.BackupBucketProvider, s conversion.Scope) error { + return autoConvert_v1alpha1_BackupBucketProvider_To_core_BackupBucketProvider(in, out, s) +} + +func autoConvert_core_BackupBucketProvider_To_v1alpha1_BackupBucketProvider(in *core.BackupBucketProvider, out *BackupBucketProvider, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_core_BackupBucketProvider_To_v1alpha1_BackupBucketProvider is an autogenerated conversion function. +func Convert_core_BackupBucketProvider_To_v1alpha1_BackupBucketProvider(in *core.BackupBucketProvider, out *BackupBucketProvider, s conversion.Scope) error { + return autoConvert_core_BackupBucketProvider_To_v1alpha1_BackupBucketProvider(in, out, s) +} + +func autoConvert_v1alpha1_BackupBucketSpec_To_core_BackupBucketSpec(in *BackupBucketSpec, out *core.BackupBucketSpec, s conversion.Scope) error { + if err := Convert_v1alpha1_BackupBucketProvider_To_core_BackupBucketProvider(&in.Provider, &out.Provider, s); err != nil { + return err + } + out.SecretRef = in.SecretRef + // WARNING: in.Seed requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_core_BackupBucketSpec_To_v1alpha1_BackupBucketSpec(in *core.BackupBucketSpec, out *BackupBucketSpec, s conversion.Scope) error { + if err := Convert_core_BackupBucketProvider_To_v1alpha1_BackupBucketProvider(&in.Provider, &out.Provider, s); err != nil { + return err + } + out.SecretRef = in.SecretRef + // WARNING: in.SeedName requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha1_BackupBucketStatus_To_core_BackupBucketStatus(in *BackupBucketStatus, out *core.BackupBucketStatus, s conversion.Scope) error { + out.LastOperation = (*core.LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastError = (*core.LastError)(unsafe.Pointer(in.LastError)) + out.ObservedGeneration = in.ObservedGeneration + out.GeneratedSecretRef = (*v1.SecretReference)(unsafe.Pointer(in.GeneratedSecretRef)) + return nil +} + +// Convert_v1alpha1_BackupBucketStatus_To_core_BackupBucketStatus is an autogenerated conversion function. +func Convert_v1alpha1_BackupBucketStatus_To_core_BackupBucketStatus(in *BackupBucketStatus, out *core.BackupBucketStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_BackupBucketStatus_To_core_BackupBucketStatus(in, out, s) +} + +func autoConvert_core_BackupBucketStatus_To_v1alpha1_BackupBucketStatus(in *core.BackupBucketStatus, out *BackupBucketStatus, s conversion.Scope) error { + out.LastOperation = (*LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastError = (*LastError)(unsafe.Pointer(in.LastError)) + out.ObservedGeneration = in.ObservedGeneration + out.GeneratedSecretRef = (*v1.SecretReference)(unsafe.Pointer(in.GeneratedSecretRef)) + return nil +} + +// Convert_core_BackupBucketStatus_To_v1alpha1_BackupBucketStatus is an autogenerated conversion function. +func Convert_core_BackupBucketStatus_To_v1alpha1_BackupBucketStatus(in *core.BackupBucketStatus, out *BackupBucketStatus, s conversion.Scope) error { + return autoConvert_core_BackupBucketStatus_To_v1alpha1_BackupBucketStatus(in, out, s) +} + +func autoConvert_v1alpha1_BackupEntry_To_core_BackupEntry(in *BackupEntry, out *core.BackupEntry, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_BackupEntrySpec_To_core_BackupEntrySpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_BackupEntryStatus_To_core_BackupEntryStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_core_BackupEntry_To_v1alpha1_BackupEntry(in *core.BackupEntry, out *BackupEntry, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_BackupEntrySpec_To_v1alpha1_BackupEntrySpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_core_BackupEntryStatus_To_v1alpha1_BackupEntryStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_BackupEntryList_To_core_BackupEntryList(in *BackupEntryList, out *core.BackupEntryList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]core.BackupEntry, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_BackupEntry_To_core_BackupEntry(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha1_BackupEntryList_To_core_BackupEntryList is an autogenerated conversion function. +func Convert_v1alpha1_BackupEntryList_To_core_BackupEntryList(in *BackupEntryList, out *core.BackupEntryList, s conversion.Scope) error { + return autoConvert_v1alpha1_BackupEntryList_To_core_BackupEntryList(in, out, s) +} + +func autoConvert_core_BackupEntryList_To_v1alpha1_BackupEntryList(in *core.BackupEntryList, out *BackupEntryList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BackupEntry, len(*in)) + for i := range *in { + if err := Convert_core_BackupEntry_To_v1alpha1_BackupEntry(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_core_BackupEntryList_To_v1alpha1_BackupEntryList is an autogenerated conversion function. +func Convert_core_BackupEntryList_To_v1alpha1_BackupEntryList(in *core.BackupEntryList, out *BackupEntryList, s conversion.Scope) error { + return autoConvert_core_BackupEntryList_To_v1alpha1_BackupEntryList(in, out, s) +} + +func autoConvert_v1alpha1_BackupEntrySpec_To_core_BackupEntrySpec(in *BackupEntrySpec, out *core.BackupEntrySpec, s conversion.Scope) error { + out.BucketName = in.BucketName + // WARNING: in.Seed requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_core_BackupEntrySpec_To_v1alpha1_BackupEntrySpec(in *core.BackupEntrySpec, out *BackupEntrySpec, s conversion.Scope) error { + out.BucketName = in.BucketName + // WARNING: in.SeedName requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha1_BackupEntryStatus_To_core_BackupEntryStatus(in *BackupEntryStatus, out *core.BackupEntryStatus, s conversion.Scope) error { + out.LastOperation = (*core.LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastError = (*core.LastError)(unsafe.Pointer(in.LastError)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_v1alpha1_BackupEntryStatus_To_core_BackupEntryStatus is an autogenerated conversion function. +func Convert_v1alpha1_BackupEntryStatus_To_core_BackupEntryStatus(in *BackupEntryStatus, out *core.BackupEntryStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_BackupEntryStatus_To_core_BackupEntryStatus(in, out, s) +} + +func autoConvert_core_BackupEntryStatus_To_v1alpha1_BackupEntryStatus(in *core.BackupEntryStatus, out *BackupEntryStatus, s conversion.Scope) error { + out.LastOperation = (*LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastError = (*LastError)(unsafe.Pointer(in.LastError)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_core_BackupEntryStatus_To_v1alpha1_BackupEntryStatus is an autogenerated conversion function. +func Convert_core_BackupEntryStatus_To_v1alpha1_BackupEntryStatus(in *core.BackupEntryStatus, out *BackupEntryStatus, s conversion.Scope) error { + return autoConvert_core_BackupEntryStatus_To_v1alpha1_BackupEntryStatus(in, out, s) +} + +func autoConvert_v1alpha1_CloudInfo_To_core_CloudInfo(in *CloudInfo, out *core.CloudInfo, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_v1alpha1_CloudInfo_To_core_CloudInfo is an autogenerated conversion function. +func Convert_v1alpha1_CloudInfo_To_core_CloudInfo(in *CloudInfo, out *core.CloudInfo, s conversion.Scope) error { + return autoConvert_v1alpha1_CloudInfo_To_core_CloudInfo(in, out, s) +} + +func autoConvert_core_CloudInfo_To_v1alpha1_CloudInfo(in *core.CloudInfo, out *CloudInfo, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_core_CloudInfo_To_v1alpha1_CloudInfo is an autogenerated conversion function. +func Convert_core_CloudInfo_To_v1alpha1_CloudInfo(in *core.CloudInfo, out *CloudInfo, s conversion.Scope) error { + return autoConvert_core_CloudInfo_To_v1alpha1_CloudInfo(in, out, s) +} + +func autoConvert_v1alpha1_CloudProfile_To_garden_CloudProfile(in *CloudProfile, out *garden.CloudProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_CloudProfileSpec_To_garden_CloudProfileSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func autoConvert_garden_CloudProfile_To_v1alpha1_CloudProfile(in *garden.CloudProfile, out *CloudProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_CloudProfileSpec_To_v1alpha1_CloudProfileSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_CloudProfileList_To_garden_CloudProfileList(in *CloudProfileList, out *garden.CloudProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.CloudProfile, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_CloudProfile_To_garden_CloudProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha1_CloudProfileList_To_garden_CloudProfileList is an autogenerated conversion function. +func Convert_v1alpha1_CloudProfileList_To_garden_CloudProfileList(in *CloudProfileList, out *garden.CloudProfileList, s conversion.Scope) error { + return autoConvert_v1alpha1_CloudProfileList_To_garden_CloudProfileList(in, out, s) +} + +func autoConvert_garden_CloudProfileList_To_v1alpha1_CloudProfileList(in *garden.CloudProfileList, out *CloudProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CloudProfile, len(*in)) + for i := range *in { + if err := Convert_garden_CloudProfile_To_v1alpha1_CloudProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_CloudProfileList_To_v1alpha1_CloudProfileList is an autogenerated conversion function. +func Convert_garden_CloudProfileList_To_v1alpha1_CloudProfileList(in *garden.CloudProfileList, out *CloudProfileList, s conversion.Scope) error { + return autoConvert_garden_CloudProfileList_To_v1alpha1_CloudProfileList(in, out, s) +} + +func autoConvert_v1alpha1_CloudProfileSpec_To_garden_CloudProfileSpec(in *CloudProfileSpec, out *garden.CloudProfileSpec, s conversion.Scope) error { + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + if err := Convert_v1alpha1_KubernetesSettings_To_garden_KubernetesSettings(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + out.MachineImages = *(*[]garden.CloudProfileMachineImage)(unsafe.Pointer(&in.MachineImages)) + if in.MachineTypes != nil { + in, out := &in.MachineTypes, &out.MachineTypes + *out = make([]garden.MachineType, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_MachineType_To_garden_MachineType(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineTypes = nil + } + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Regions = *(*[]garden.Region)(unsafe.Pointer(&in.Regions)) + out.SeedSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.SeedSelector)) + out.Type = in.Type + if in.VolumeTypes != nil { + in, out := &in.VolumeTypes, &out.VolumeTypes + *out = make([]garden.VolumeType, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_VolumeType_To_garden_VolumeType(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.VolumeTypes = nil + } + return nil +} + +func autoConvert_garden_CloudProfileSpec_To_v1alpha1_CloudProfileSpec(in *garden.CloudProfileSpec, out *CloudProfileSpec, s conversion.Scope) error { + // WARNING: in.AWS requires manual conversion: does not exist in peer-type + // WARNING: in.Azure requires manual conversion: does not exist in peer-type + // WARNING: in.GCP requires manual conversion: does not exist in peer-type + // WARNING: in.OpenStack requires manual conversion: does not exist in peer-type + // WARNING: in.Alicloud requires manual conversion: does not exist in peer-type + // WARNING: in.Packet requires manual conversion: does not exist in peer-type + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + if err := Convert_garden_KubernetesSettings_To_v1alpha1_KubernetesSettings(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + out.MachineImages = *(*[]MachineImage)(unsafe.Pointer(&in.MachineImages)) + if in.MachineTypes != nil { + in, out := &in.MachineTypes, &out.MachineTypes + *out = make([]MachineType, len(*in)) + for i := range *in { + if err := Convert_garden_MachineType_To_v1alpha1_MachineType(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineTypes = nil + } + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Regions = *(*[]Region)(unsafe.Pointer(&in.Regions)) + out.SeedSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.SeedSelector)) + out.Type = in.Type + if in.VolumeTypes != nil { + in, out := &in.VolumeTypes, &out.VolumeTypes + *out = make([]VolumeType, len(*in)) + for i := range *in { + if err := Convert_garden_VolumeType_To_v1alpha1_VolumeType(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.VolumeTypes = nil + } + return nil +} + +func autoConvert_v1alpha1_ClusterAutoscaler_To_garden_ClusterAutoscaler(in *ClusterAutoscaler, out *garden.ClusterAutoscaler, s conversion.Scope) error { + out.ScaleDownDelayAfterAdd = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterAdd)) + out.ScaleDownDelayAfterDelete = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterDelete)) + out.ScaleDownDelayAfterFailure = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterFailure)) + out.ScaleDownUnneededTime = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownUnneededTime)) + out.ScaleDownUtilizationThreshold = (*float64)(unsafe.Pointer(in.ScaleDownUtilizationThreshold)) + out.ScanInterval = (*metav1.Duration)(unsafe.Pointer(in.ScanInterval)) + return nil +} + +// Convert_v1alpha1_ClusterAutoscaler_To_garden_ClusterAutoscaler is an autogenerated conversion function. +func Convert_v1alpha1_ClusterAutoscaler_To_garden_ClusterAutoscaler(in *ClusterAutoscaler, out *garden.ClusterAutoscaler, s conversion.Scope) error { + return autoConvert_v1alpha1_ClusterAutoscaler_To_garden_ClusterAutoscaler(in, out, s) +} + +func autoConvert_garden_ClusterAutoscaler_To_v1alpha1_ClusterAutoscaler(in *garden.ClusterAutoscaler, out *ClusterAutoscaler, s conversion.Scope) error { + out.ScaleDownUtilizationThreshold = (*float64)(unsafe.Pointer(in.ScaleDownUtilizationThreshold)) + out.ScaleDownUnneededTime = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownUnneededTime)) + out.ScaleDownDelayAfterAdd = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterAdd)) + out.ScaleDownDelayAfterFailure = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterFailure)) + out.ScaleDownDelayAfterDelete = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterDelete)) + out.ScanInterval = (*metav1.Duration)(unsafe.Pointer(in.ScanInterval)) + return nil +} + +// Convert_garden_ClusterAutoscaler_To_v1alpha1_ClusterAutoscaler is an autogenerated conversion function. +func Convert_garden_ClusterAutoscaler_To_v1alpha1_ClusterAutoscaler(in *garden.ClusterAutoscaler, out *ClusterAutoscaler, s conversion.Scope) error { + return autoConvert_garden_ClusterAutoscaler_To_v1alpha1_ClusterAutoscaler(in, out, s) +} + +func autoConvert_v1alpha1_ClusterInfo_To_core_ClusterInfo(in *ClusterInfo, out *core.ClusterInfo, s conversion.Scope) error { + if err := Convert_v1alpha1_CloudInfo_To_core_CloudInfo(&in.Cloud, &out.Cloud, s); err != nil { + return err + } + if err := Convert_v1alpha1_KubernetesInfo_To_core_KubernetesInfo(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ClusterInfo_To_core_ClusterInfo is an autogenerated conversion function. +func Convert_v1alpha1_ClusterInfo_To_core_ClusterInfo(in *ClusterInfo, out *core.ClusterInfo, s conversion.Scope) error { + return autoConvert_v1alpha1_ClusterInfo_To_core_ClusterInfo(in, out, s) +} + +func autoConvert_core_ClusterInfo_To_v1alpha1_ClusterInfo(in *core.ClusterInfo, out *ClusterInfo, s conversion.Scope) error { + if err := Convert_core_CloudInfo_To_v1alpha1_CloudInfo(&in.Cloud, &out.Cloud, s); err != nil { + return err + } + if err := Convert_core_KubernetesInfo_To_v1alpha1_KubernetesInfo(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + return nil +} + +// Convert_core_ClusterInfo_To_v1alpha1_ClusterInfo is an autogenerated conversion function. +func Convert_core_ClusterInfo_To_v1alpha1_ClusterInfo(in *core.ClusterInfo, out *ClusterInfo, s conversion.Scope) error { + return autoConvert_core_ClusterInfo_To_v1alpha1_ClusterInfo(in, out, s) +} + +func autoConvert_v1alpha1_Condition_To_core_Condition(in *Condition, out *core.Condition, s conversion.Scope) error { + out.Type = core.ConditionType(in.Type) + out.Status = core.ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.LastUpdateTime = in.LastUpdateTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +// Convert_v1alpha1_Condition_To_core_Condition is an autogenerated conversion function. +func Convert_v1alpha1_Condition_To_core_Condition(in *Condition, out *core.Condition, s conversion.Scope) error { + return autoConvert_v1alpha1_Condition_To_core_Condition(in, out, s) +} + +func autoConvert_core_Condition_To_v1alpha1_Condition(in *core.Condition, out *Condition, s conversion.Scope) error { + out.Type = ConditionType(in.Type) + out.Status = ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.LastUpdateTime = in.LastUpdateTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +// Convert_core_Condition_To_v1alpha1_Condition is an autogenerated conversion function. +func Convert_core_Condition_To_v1alpha1_Condition(in *core.Condition, out *Condition, s conversion.Scope) error { + return autoConvert_core_Condition_To_v1alpha1_Condition(in, out, s) +} + +func autoConvert_v1alpha1_ControllerDeployment_To_core_ControllerDeployment(in *ControllerDeployment, out *core.ControllerDeployment, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*core.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_v1alpha1_ControllerDeployment_To_core_ControllerDeployment is an autogenerated conversion function. +func Convert_v1alpha1_ControllerDeployment_To_core_ControllerDeployment(in *ControllerDeployment, out *core.ControllerDeployment, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerDeployment_To_core_ControllerDeployment(in, out, s) +} + +func autoConvert_core_ControllerDeployment_To_v1alpha1_ControllerDeployment(in *core.ControllerDeployment, out *ControllerDeployment, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_core_ControllerDeployment_To_v1alpha1_ControllerDeployment is an autogenerated conversion function. +func Convert_core_ControllerDeployment_To_v1alpha1_ControllerDeployment(in *core.ControllerDeployment, out *ControllerDeployment, s conversion.Scope) error { + return autoConvert_core_ControllerDeployment_To_v1alpha1_ControllerDeployment(in, out, s) +} + +func autoConvert_v1alpha1_ControllerInstallation_To_core_ControllerInstallation(in *ControllerInstallation, out *core.ControllerInstallation, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_ControllerInstallationSpec_To_core_ControllerInstallationSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_ControllerInstallationStatus_To_core_ControllerInstallationStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ControllerInstallation_To_core_ControllerInstallation is an autogenerated conversion function. +func Convert_v1alpha1_ControllerInstallation_To_core_ControllerInstallation(in *ControllerInstallation, out *core.ControllerInstallation, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerInstallation_To_core_ControllerInstallation(in, out, s) +} + +func autoConvert_core_ControllerInstallation_To_v1alpha1_ControllerInstallation(in *core.ControllerInstallation, out *ControllerInstallation, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_ControllerInstallationSpec_To_v1alpha1_ControllerInstallationSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_core_ControllerInstallationStatus_To_v1alpha1_ControllerInstallationStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_core_ControllerInstallation_To_v1alpha1_ControllerInstallation is an autogenerated conversion function. +func Convert_core_ControllerInstallation_To_v1alpha1_ControllerInstallation(in *core.ControllerInstallation, out *ControllerInstallation, s conversion.Scope) error { + return autoConvert_core_ControllerInstallation_To_v1alpha1_ControllerInstallation(in, out, s) +} + +func autoConvert_v1alpha1_ControllerInstallationList_To_core_ControllerInstallationList(in *ControllerInstallationList, out *core.ControllerInstallationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]core.ControllerInstallation)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_ControllerInstallationList_To_core_ControllerInstallationList is an autogenerated conversion function. +func Convert_v1alpha1_ControllerInstallationList_To_core_ControllerInstallationList(in *ControllerInstallationList, out *core.ControllerInstallationList, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerInstallationList_To_core_ControllerInstallationList(in, out, s) +} + +func autoConvert_core_ControllerInstallationList_To_v1alpha1_ControllerInstallationList(in *core.ControllerInstallationList, out *ControllerInstallationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ControllerInstallation)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_core_ControllerInstallationList_To_v1alpha1_ControllerInstallationList is an autogenerated conversion function. +func Convert_core_ControllerInstallationList_To_v1alpha1_ControllerInstallationList(in *core.ControllerInstallationList, out *ControllerInstallationList, s conversion.Scope) error { + return autoConvert_core_ControllerInstallationList_To_v1alpha1_ControllerInstallationList(in, out, s) +} + +func autoConvert_v1alpha1_ControllerInstallationSpec_To_core_ControllerInstallationSpec(in *ControllerInstallationSpec, out *core.ControllerInstallationSpec, s conversion.Scope) error { + out.RegistrationRef = in.RegistrationRef + out.SeedRef = in.SeedRef + return nil +} + +// Convert_v1alpha1_ControllerInstallationSpec_To_core_ControllerInstallationSpec is an autogenerated conversion function. +func Convert_v1alpha1_ControllerInstallationSpec_To_core_ControllerInstallationSpec(in *ControllerInstallationSpec, out *core.ControllerInstallationSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerInstallationSpec_To_core_ControllerInstallationSpec(in, out, s) +} + +func autoConvert_core_ControllerInstallationSpec_To_v1alpha1_ControllerInstallationSpec(in *core.ControllerInstallationSpec, out *ControllerInstallationSpec, s conversion.Scope) error { + out.RegistrationRef = in.RegistrationRef + out.SeedRef = in.SeedRef + return nil +} + +// Convert_core_ControllerInstallationSpec_To_v1alpha1_ControllerInstallationSpec is an autogenerated conversion function. +func Convert_core_ControllerInstallationSpec_To_v1alpha1_ControllerInstallationSpec(in *core.ControllerInstallationSpec, out *ControllerInstallationSpec, s conversion.Scope) error { + return autoConvert_core_ControllerInstallationSpec_To_v1alpha1_ControllerInstallationSpec(in, out, s) +} + +func autoConvert_v1alpha1_ControllerInstallationStatus_To_core_ControllerInstallationStatus(in *ControllerInstallationStatus, out *core.ControllerInstallationStatus, s conversion.Scope) error { + out.Conditions = *(*[]core.Condition)(unsafe.Pointer(&in.Conditions)) + out.ProviderStatus = (*core.ProviderConfig)(unsafe.Pointer(in.ProviderStatus)) + return nil +} + +// Convert_v1alpha1_ControllerInstallationStatus_To_core_ControllerInstallationStatus is an autogenerated conversion function. +func Convert_v1alpha1_ControllerInstallationStatus_To_core_ControllerInstallationStatus(in *ControllerInstallationStatus, out *core.ControllerInstallationStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerInstallationStatus_To_core_ControllerInstallationStatus(in, out, s) +} + +func autoConvert_core_ControllerInstallationStatus_To_v1alpha1_ControllerInstallationStatus(in *core.ControllerInstallationStatus, out *ControllerInstallationStatus, s conversion.Scope) error { + out.Conditions = *(*[]Condition)(unsafe.Pointer(&in.Conditions)) + out.ProviderStatus = (*ProviderConfig)(unsafe.Pointer(in.ProviderStatus)) + return nil +} + +// Convert_core_ControllerInstallationStatus_To_v1alpha1_ControllerInstallationStatus is an autogenerated conversion function. +func Convert_core_ControllerInstallationStatus_To_v1alpha1_ControllerInstallationStatus(in *core.ControllerInstallationStatus, out *ControllerInstallationStatus, s conversion.Scope) error { + return autoConvert_core_ControllerInstallationStatus_To_v1alpha1_ControllerInstallationStatus(in, out, s) +} + +func autoConvert_v1alpha1_ControllerRegistration_To_core_ControllerRegistration(in *ControllerRegistration, out *core.ControllerRegistration, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ControllerRegistration_To_core_ControllerRegistration is an autogenerated conversion function. +func Convert_v1alpha1_ControllerRegistration_To_core_ControllerRegistration(in *ControllerRegistration, out *core.ControllerRegistration, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerRegistration_To_core_ControllerRegistration(in, out, s) +} + +func autoConvert_core_ControllerRegistration_To_v1alpha1_ControllerRegistration(in *core.ControllerRegistration, out *ControllerRegistration, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_ControllerRegistrationSpec_To_v1alpha1_ControllerRegistrationSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_core_ControllerRegistration_To_v1alpha1_ControllerRegistration is an autogenerated conversion function. +func Convert_core_ControllerRegistration_To_v1alpha1_ControllerRegistration(in *core.ControllerRegistration, out *ControllerRegistration, s conversion.Scope) error { + return autoConvert_core_ControllerRegistration_To_v1alpha1_ControllerRegistration(in, out, s) +} + +func autoConvert_v1alpha1_ControllerRegistrationList_To_core_ControllerRegistrationList(in *ControllerRegistrationList, out *core.ControllerRegistrationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]core.ControllerRegistration)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_ControllerRegistrationList_To_core_ControllerRegistrationList is an autogenerated conversion function. +func Convert_v1alpha1_ControllerRegistrationList_To_core_ControllerRegistrationList(in *ControllerRegistrationList, out *core.ControllerRegistrationList, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerRegistrationList_To_core_ControllerRegistrationList(in, out, s) +} + +func autoConvert_core_ControllerRegistrationList_To_v1alpha1_ControllerRegistrationList(in *core.ControllerRegistrationList, out *ControllerRegistrationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ControllerRegistration)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_core_ControllerRegistrationList_To_v1alpha1_ControllerRegistrationList is an autogenerated conversion function. +func Convert_core_ControllerRegistrationList_To_v1alpha1_ControllerRegistrationList(in *core.ControllerRegistrationList, out *ControllerRegistrationList, s conversion.Scope) error { + return autoConvert_core_ControllerRegistrationList_To_v1alpha1_ControllerRegistrationList(in, out, s) +} + +func autoConvert_v1alpha1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec(in *ControllerRegistrationSpec, out *core.ControllerRegistrationSpec, s conversion.Scope) error { + out.Resources = *(*[]core.ControllerResource)(unsafe.Pointer(&in.Resources)) + out.Deployment = (*core.ControllerDeployment)(unsafe.Pointer(in.Deployment)) + return nil +} + +// Convert_v1alpha1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec is an autogenerated conversion function. +func Convert_v1alpha1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec(in *ControllerRegistrationSpec, out *core.ControllerRegistrationSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec(in, out, s) +} + +func autoConvert_core_ControllerRegistrationSpec_To_v1alpha1_ControllerRegistrationSpec(in *core.ControllerRegistrationSpec, out *ControllerRegistrationSpec, s conversion.Scope) error { + out.Resources = *(*[]ControllerResource)(unsafe.Pointer(&in.Resources)) + out.Deployment = (*ControllerDeployment)(unsafe.Pointer(in.Deployment)) + return nil +} + +// Convert_core_ControllerRegistrationSpec_To_v1alpha1_ControllerRegistrationSpec is an autogenerated conversion function. +func Convert_core_ControllerRegistrationSpec_To_v1alpha1_ControllerRegistrationSpec(in *core.ControllerRegistrationSpec, out *ControllerRegistrationSpec, s conversion.Scope) error { + return autoConvert_core_ControllerRegistrationSpec_To_v1alpha1_ControllerRegistrationSpec(in, out, s) +} + +func autoConvert_v1alpha1_ControllerResource_To_core_ControllerResource(in *ControllerResource, out *core.ControllerResource, s conversion.Scope) error { + out.Kind = in.Kind + out.Type = in.Type + out.GloballyEnabled = (*bool)(unsafe.Pointer(in.GloballyEnabled)) + out.ReconcileTimeout = (*metav1.Duration)(unsafe.Pointer(in.ReconcileTimeout)) + return nil +} + +// Convert_v1alpha1_ControllerResource_To_core_ControllerResource is an autogenerated conversion function. +func Convert_v1alpha1_ControllerResource_To_core_ControllerResource(in *ControllerResource, out *core.ControllerResource, s conversion.Scope) error { + return autoConvert_v1alpha1_ControllerResource_To_core_ControllerResource(in, out, s) +} + +func autoConvert_core_ControllerResource_To_v1alpha1_ControllerResource(in *core.ControllerResource, out *ControllerResource, s conversion.Scope) error { + out.Kind = in.Kind + out.Type = in.Type + out.GloballyEnabled = (*bool)(unsafe.Pointer(in.GloballyEnabled)) + out.ReconcileTimeout = (*metav1.Duration)(unsafe.Pointer(in.ReconcileTimeout)) + return nil +} + +// Convert_core_ControllerResource_To_v1alpha1_ControllerResource is an autogenerated conversion function. +func Convert_core_ControllerResource_To_v1alpha1_ControllerResource(in *core.ControllerResource, out *ControllerResource, s conversion.Scope) error { + return autoConvert_core_ControllerResource_To_v1alpha1_ControllerResource(in, out, s) +} + +func autoConvert_v1alpha1_DNS_To_garden_DNS(in *DNS, out *garden.DNS, s conversion.Scope) error { + out.Domain = (*string)(unsafe.Pointer(in.Domain)) + out.Providers = *(*[]garden.DNSProvider)(unsafe.Pointer(&in.Providers)) + return nil +} + +// Convert_v1alpha1_DNS_To_garden_DNS is an autogenerated conversion function. +func Convert_v1alpha1_DNS_To_garden_DNS(in *DNS, out *garden.DNS, s conversion.Scope) error { + return autoConvert_v1alpha1_DNS_To_garden_DNS(in, out, s) +} + +func autoConvert_garden_DNS_To_v1alpha1_DNS(in *garden.DNS, out *DNS, s conversion.Scope) error { + out.Domain = (*string)(unsafe.Pointer(in.Domain)) + out.Providers = *(*[]DNSProvider)(unsafe.Pointer(&in.Providers)) + return nil +} + +// Convert_garden_DNS_To_v1alpha1_DNS is an autogenerated conversion function. +func Convert_garden_DNS_To_v1alpha1_DNS(in *garden.DNS, out *DNS, s conversion.Scope) error { + return autoConvert_garden_DNS_To_v1alpha1_DNS(in, out, s) +} + +func autoConvert_v1alpha1_DNSIncludeExclude_To_garden_DNSIncludeExclude(in *DNSIncludeExclude, out *garden.DNSIncludeExclude, s conversion.Scope) error { + out.Include = *(*[]string)(unsafe.Pointer(&in.Include)) + out.Exclude = *(*[]string)(unsafe.Pointer(&in.Exclude)) + return nil +} + +// Convert_v1alpha1_DNSIncludeExclude_To_garden_DNSIncludeExclude is an autogenerated conversion function. +func Convert_v1alpha1_DNSIncludeExclude_To_garden_DNSIncludeExclude(in *DNSIncludeExclude, out *garden.DNSIncludeExclude, s conversion.Scope) error { + return autoConvert_v1alpha1_DNSIncludeExclude_To_garden_DNSIncludeExclude(in, out, s) +} + +func autoConvert_garden_DNSIncludeExclude_To_v1alpha1_DNSIncludeExclude(in *garden.DNSIncludeExclude, out *DNSIncludeExclude, s conversion.Scope) error { + out.Include = *(*[]string)(unsafe.Pointer(&in.Include)) + out.Exclude = *(*[]string)(unsafe.Pointer(&in.Exclude)) + return nil +} + +// Convert_garden_DNSIncludeExclude_To_v1alpha1_DNSIncludeExclude is an autogenerated conversion function. +func Convert_garden_DNSIncludeExclude_To_v1alpha1_DNSIncludeExclude(in *garden.DNSIncludeExclude, out *DNSIncludeExclude, s conversion.Scope) error { + return autoConvert_garden_DNSIncludeExclude_To_v1alpha1_DNSIncludeExclude(in, out, s) +} + +func autoConvert_v1alpha1_DNSProvider_To_garden_DNSProvider(in *DNSProvider, out *garden.DNSProvider, s conversion.Scope) error { + out.Domains = (*garden.DNSIncludeExclude)(unsafe.Pointer(in.Domains)) + out.SecretName = (*string)(unsafe.Pointer(in.SecretName)) + out.Type = (*string)(unsafe.Pointer(in.Type)) + out.Zones = (*garden.DNSIncludeExclude)(unsafe.Pointer(in.Zones)) + return nil +} + +// Convert_v1alpha1_DNSProvider_To_garden_DNSProvider is an autogenerated conversion function. +func Convert_v1alpha1_DNSProvider_To_garden_DNSProvider(in *DNSProvider, out *garden.DNSProvider, s conversion.Scope) error { + return autoConvert_v1alpha1_DNSProvider_To_garden_DNSProvider(in, out, s) +} + +func autoConvert_garden_DNSProvider_To_v1alpha1_DNSProvider(in *garden.DNSProvider, out *DNSProvider, s conversion.Scope) error { + out.Domains = (*DNSIncludeExclude)(unsafe.Pointer(in.Domains)) + out.SecretName = (*string)(unsafe.Pointer(in.SecretName)) + out.Type = (*string)(unsafe.Pointer(in.Type)) + out.Zones = (*DNSIncludeExclude)(unsafe.Pointer(in.Zones)) + return nil +} + +// Convert_garden_DNSProvider_To_v1alpha1_DNSProvider is an autogenerated conversion function. +func Convert_garden_DNSProvider_To_v1alpha1_DNSProvider(in *garden.DNSProvider, out *DNSProvider, s conversion.Scope) error { + return autoConvert_garden_DNSProvider_To_v1alpha1_DNSProvider(in, out, s) +} + +func autoConvert_v1alpha1_Endpoint_To_core_Endpoint(in *Endpoint, out *core.Endpoint, s conversion.Scope) error { + out.Name = in.Name + out.URL = in.URL + out.Purpose = in.Purpose + return nil +} + +// Convert_v1alpha1_Endpoint_To_core_Endpoint is an autogenerated conversion function. +func Convert_v1alpha1_Endpoint_To_core_Endpoint(in *Endpoint, out *core.Endpoint, s conversion.Scope) error { + return autoConvert_v1alpha1_Endpoint_To_core_Endpoint(in, out, s) +} + +func autoConvert_core_Endpoint_To_v1alpha1_Endpoint(in *core.Endpoint, out *Endpoint, s conversion.Scope) error { + out.Name = in.Name + out.URL = in.URL + out.Purpose = in.Purpose + return nil +} + +// Convert_core_Endpoint_To_v1alpha1_Endpoint is an autogenerated conversion function. +func Convert_core_Endpoint_To_v1alpha1_Endpoint(in *core.Endpoint, out *Endpoint, s conversion.Scope) error { + return autoConvert_core_Endpoint_To_v1alpha1_Endpoint(in, out, s) +} + +func autoConvert_v1alpha1_ExpirableVersion_To_garden_ExpirableVersion(in *ExpirableVersion, out *garden.ExpirableVersion, s conversion.Scope) error { + out.Version = in.Version + out.ExpirationDate = (*metav1.Time)(unsafe.Pointer(in.ExpirationDate)) + return nil +} + +// Convert_v1alpha1_ExpirableVersion_To_garden_ExpirableVersion is an autogenerated conversion function. +func Convert_v1alpha1_ExpirableVersion_To_garden_ExpirableVersion(in *ExpirableVersion, out *garden.ExpirableVersion, s conversion.Scope) error { + return autoConvert_v1alpha1_ExpirableVersion_To_garden_ExpirableVersion(in, out, s) +} + +func autoConvert_garden_ExpirableVersion_To_v1alpha1_ExpirableVersion(in *garden.ExpirableVersion, out *ExpirableVersion, s conversion.Scope) error { + out.Version = in.Version + out.ExpirationDate = (*metav1.Time)(unsafe.Pointer(in.ExpirationDate)) + return nil +} + +// Convert_garden_ExpirableVersion_To_v1alpha1_ExpirableVersion is an autogenerated conversion function. +func Convert_garden_ExpirableVersion_To_v1alpha1_ExpirableVersion(in *garden.ExpirableVersion, out *ExpirableVersion, s conversion.Scope) error { + return autoConvert_garden_ExpirableVersion_To_v1alpha1_ExpirableVersion(in, out, s) +} + +func autoConvert_v1alpha1_Extension_To_garden_Extension(in *Extension, out *garden.Extension, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_v1alpha1_Extension_To_garden_Extension is an autogenerated conversion function. +func Convert_v1alpha1_Extension_To_garden_Extension(in *Extension, out *garden.Extension, s conversion.Scope) error { + return autoConvert_v1alpha1_Extension_To_garden_Extension(in, out, s) +} + +func autoConvert_garden_Extension_To_v1alpha1_Extension(in *garden.Extension, out *Extension, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_garden_Extension_To_v1alpha1_Extension is an autogenerated conversion function. +func Convert_garden_Extension_To_v1alpha1_Extension(in *garden.Extension, out *Extension, s conversion.Scope) error { + return autoConvert_garden_Extension_To_v1alpha1_Extension(in, out, s) +} + +func autoConvert_v1alpha1_ExtensionResourceState_To_core_ExtensionResourceState(in *ExtensionResourceState, out *core.ExtensionResourceState, s conversion.Scope) error { + out.Kind = in.Kind + out.Purpose = (*string)(unsafe.Pointer(in.Purpose)) + if err := Convert_v1alpha1_ProviderConfig_To_core_ProviderConfig(&in.State, &out.State, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ExtensionResourceState_To_core_ExtensionResourceState is an autogenerated conversion function. +func Convert_v1alpha1_ExtensionResourceState_To_core_ExtensionResourceState(in *ExtensionResourceState, out *core.ExtensionResourceState, s conversion.Scope) error { + return autoConvert_v1alpha1_ExtensionResourceState_To_core_ExtensionResourceState(in, out, s) +} + +func autoConvert_core_ExtensionResourceState_To_v1alpha1_ExtensionResourceState(in *core.ExtensionResourceState, out *ExtensionResourceState, s conversion.Scope) error { + out.Kind = in.Kind + out.Purpose = (*string)(unsafe.Pointer(in.Purpose)) + if err := Convert_core_ProviderConfig_To_v1alpha1_ProviderConfig(&in.State, &out.State, s); err != nil { + return err + } + return nil +} + +// Convert_core_ExtensionResourceState_To_v1alpha1_ExtensionResourceState is an autogenerated conversion function. +func Convert_core_ExtensionResourceState_To_v1alpha1_ExtensionResourceState(in *core.ExtensionResourceState, out *ExtensionResourceState, s conversion.Scope) error { + return autoConvert_core_ExtensionResourceState_To_v1alpha1_ExtensionResourceState(in, out, s) +} + +func autoConvert_v1alpha1_Gardener_To_garden_Gardener(in *Gardener, out *garden.Gardener, s conversion.Scope) error { + out.ID = in.ID + out.Name = in.Name + out.Version = in.Version + return nil +} + +// Convert_v1alpha1_Gardener_To_garden_Gardener is an autogenerated conversion function. +func Convert_v1alpha1_Gardener_To_garden_Gardener(in *Gardener, out *garden.Gardener, s conversion.Scope) error { + return autoConvert_v1alpha1_Gardener_To_garden_Gardener(in, out, s) +} + +func autoConvert_garden_Gardener_To_v1alpha1_Gardener(in *garden.Gardener, out *Gardener, s conversion.Scope) error { + out.ID = in.ID + out.Name = in.Name + out.Version = in.Version + return nil +} + +// Convert_garden_Gardener_To_v1alpha1_Gardener is an autogenerated conversion function. +func Convert_garden_Gardener_To_v1alpha1_Gardener(in *garden.Gardener, out *Gardener, s conversion.Scope) error { + return autoConvert_garden_Gardener_To_v1alpha1_Gardener(in, out, s) +} + +func autoConvert_v1alpha1_GardenerResourceData_To_core_GardenerResourceData(in *GardenerResourceData, out *core.GardenerResourceData, s conversion.Scope) error { + out.Name = in.Name + out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data)) + return nil +} + +// Convert_v1alpha1_GardenerResourceData_To_core_GardenerResourceData is an autogenerated conversion function. +func Convert_v1alpha1_GardenerResourceData_To_core_GardenerResourceData(in *GardenerResourceData, out *core.GardenerResourceData, s conversion.Scope) error { + return autoConvert_v1alpha1_GardenerResourceData_To_core_GardenerResourceData(in, out, s) +} + +func autoConvert_core_GardenerResourceData_To_v1alpha1_GardenerResourceData(in *core.GardenerResourceData, out *GardenerResourceData, s conversion.Scope) error { + out.Name = in.Name + out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data)) + return nil +} + +// Convert_core_GardenerResourceData_To_v1alpha1_GardenerResourceData is an autogenerated conversion function. +func Convert_core_GardenerResourceData_To_v1alpha1_GardenerResourceData(in *core.GardenerResourceData, out *GardenerResourceData, s conversion.Scope) error { + return autoConvert_core_GardenerResourceData_To_v1alpha1_GardenerResourceData(in, out, s) +} + +func autoConvert_v1alpha1_Hibernation_To_garden_Hibernation(in *Hibernation, out *garden.Hibernation, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + out.Schedules = *(*[]garden.HibernationSchedule)(unsafe.Pointer(&in.Schedules)) + return nil +} + +// Convert_v1alpha1_Hibernation_To_garden_Hibernation is an autogenerated conversion function. +func Convert_v1alpha1_Hibernation_To_garden_Hibernation(in *Hibernation, out *garden.Hibernation, s conversion.Scope) error { + return autoConvert_v1alpha1_Hibernation_To_garden_Hibernation(in, out, s) +} + +func autoConvert_garden_Hibernation_To_v1alpha1_Hibernation(in *garden.Hibernation, out *Hibernation, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + out.Schedules = *(*[]HibernationSchedule)(unsafe.Pointer(&in.Schedules)) + return nil +} + +// Convert_garden_Hibernation_To_v1alpha1_Hibernation is an autogenerated conversion function. +func Convert_garden_Hibernation_To_v1alpha1_Hibernation(in *garden.Hibernation, out *Hibernation, s conversion.Scope) error { + return autoConvert_garden_Hibernation_To_v1alpha1_Hibernation(in, out, s) +} + +func autoConvert_v1alpha1_HibernationSchedule_To_garden_HibernationSchedule(in *HibernationSchedule, out *garden.HibernationSchedule, s conversion.Scope) error { + out.Start = (*string)(unsafe.Pointer(in.Start)) + out.End = (*string)(unsafe.Pointer(in.End)) + out.Location = (*string)(unsafe.Pointer(in.Location)) + return nil +} + +// Convert_v1alpha1_HibernationSchedule_To_garden_HibernationSchedule is an autogenerated conversion function. +func Convert_v1alpha1_HibernationSchedule_To_garden_HibernationSchedule(in *HibernationSchedule, out *garden.HibernationSchedule, s conversion.Scope) error { + return autoConvert_v1alpha1_HibernationSchedule_To_garden_HibernationSchedule(in, out, s) +} + +func autoConvert_garden_HibernationSchedule_To_v1alpha1_HibernationSchedule(in *garden.HibernationSchedule, out *HibernationSchedule, s conversion.Scope) error { + out.Start = (*string)(unsafe.Pointer(in.Start)) + out.End = (*string)(unsafe.Pointer(in.End)) + out.Location = (*string)(unsafe.Pointer(in.Location)) + return nil +} + +// Convert_garden_HibernationSchedule_To_v1alpha1_HibernationSchedule is an autogenerated conversion function. +func Convert_garden_HibernationSchedule_To_v1alpha1_HibernationSchedule(in *garden.HibernationSchedule, out *HibernationSchedule, s conversion.Scope) error { + return autoConvert_garden_HibernationSchedule_To_v1alpha1_HibernationSchedule(in, out, s) +} + +func autoConvert_v1alpha1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(in *HorizontalPodAutoscalerConfig, out *garden.HorizontalPodAutoscalerConfig, s conversion.Scope) error { + out.CPUInitializationPeriod = (*metav1.Duration)(unsafe.Pointer(in.CPUInitializationPeriod)) + out.DownscaleDelay = (*metav1.Duration)(unsafe.Pointer(in.DownscaleDelay)) + out.DownscaleStabilization = (*metav1.Duration)(unsafe.Pointer(in.DownscaleStabilization)) + out.InitialReadinessDelay = (*metav1.Duration)(unsafe.Pointer(in.InitialReadinessDelay)) + out.SyncPeriod = (*metav1.Duration)(unsafe.Pointer(in.SyncPeriod)) + out.Tolerance = (*float64)(unsafe.Pointer(in.Tolerance)) + out.UpscaleDelay = (*metav1.Duration)(unsafe.Pointer(in.UpscaleDelay)) + return nil +} + +// Convert_v1alpha1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig is an autogenerated conversion function. +func Convert_v1alpha1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(in *HorizontalPodAutoscalerConfig, out *garden.HorizontalPodAutoscalerConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(in, out, s) +} + +func autoConvert_garden_HorizontalPodAutoscalerConfig_To_v1alpha1_HorizontalPodAutoscalerConfig(in *garden.HorizontalPodAutoscalerConfig, out *HorizontalPodAutoscalerConfig, s conversion.Scope) error { + out.DownscaleDelay = (*GardenerDuration)(unsafe.Pointer(in.DownscaleDelay)) + out.SyncPeriod = (*GardenerDuration)(unsafe.Pointer(in.SyncPeriod)) + out.Tolerance = (*float64)(unsafe.Pointer(in.Tolerance)) + out.UpscaleDelay = (*GardenerDuration)(unsafe.Pointer(in.UpscaleDelay)) + out.DownscaleStabilization = (*GardenerDuration)(unsafe.Pointer(in.DownscaleStabilization)) + out.InitialReadinessDelay = (*GardenerDuration)(unsafe.Pointer(in.InitialReadinessDelay)) + out.CPUInitializationPeriod = (*GardenerDuration)(unsafe.Pointer(in.CPUInitializationPeriod)) + return nil +} + +// Convert_garden_HorizontalPodAutoscalerConfig_To_v1alpha1_HorizontalPodAutoscalerConfig is an autogenerated conversion function. +func Convert_garden_HorizontalPodAutoscalerConfig_To_v1alpha1_HorizontalPodAutoscalerConfig(in *garden.HorizontalPodAutoscalerConfig, out *HorizontalPodAutoscalerConfig, s conversion.Scope) error { + return autoConvert_garden_HorizontalPodAutoscalerConfig_To_v1alpha1_HorizontalPodAutoscalerConfig(in, out, s) +} + +func autoConvert_v1alpha1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(in *KubeAPIServerConfig, out *garden.KubeAPIServerConfig, s conversion.Scope) error { + if err := Convert_v1alpha1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.AdmissionPlugins = *(*[]garden.AdmissionPlugin)(unsafe.Pointer(&in.AdmissionPlugins)) + out.APIAudiences = *(*[]string)(unsafe.Pointer(&in.APIAudiences)) + out.AuditConfig = (*garden.AuditConfig)(unsafe.Pointer(in.AuditConfig)) + out.EnableBasicAuthentication = (*bool)(unsafe.Pointer(in.EnableBasicAuthentication)) + if in.OIDCConfig != nil { + in, out := &in.OIDCConfig, &out.OIDCConfig + *out = new(garden.OIDCConfig) + if err := Convert_v1alpha1_OIDCConfig_To_garden_OIDCConfig(*in, *out, s); err != nil { + return err + } + } else { + out.OIDCConfig = nil + } + out.RuntimeConfig = *(*map[string]bool)(unsafe.Pointer(&in.RuntimeConfig)) + out.ServiceAccountConfig = (*garden.ServiceAccountConfig)(unsafe.Pointer(in.ServiceAccountConfig)) + return nil +} + +// Convert_v1alpha1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig is an autogenerated conversion function. +func Convert_v1alpha1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(in *KubeAPIServerConfig, out *garden.KubeAPIServerConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(in, out, s) +} + +func autoConvert_garden_KubeAPIServerConfig_To_v1alpha1_KubeAPIServerConfig(in *garden.KubeAPIServerConfig, out *KubeAPIServerConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1alpha1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.AdmissionPlugins = *(*[]AdmissionPlugin)(unsafe.Pointer(&in.AdmissionPlugins)) + out.APIAudiences = *(*[]string)(unsafe.Pointer(&in.APIAudiences)) + out.AuditConfig = (*AuditConfig)(unsafe.Pointer(in.AuditConfig)) + out.EnableBasicAuthentication = (*bool)(unsafe.Pointer(in.EnableBasicAuthentication)) + if in.OIDCConfig != nil { + in, out := &in.OIDCConfig, &out.OIDCConfig + *out = new(OIDCConfig) + if err := Convert_garden_OIDCConfig_To_v1alpha1_OIDCConfig(*in, *out, s); err != nil { + return err + } + } else { + out.OIDCConfig = nil + } + out.RuntimeConfig = *(*map[string]bool)(unsafe.Pointer(&in.RuntimeConfig)) + out.ServiceAccountConfig = (*ServiceAccountConfig)(unsafe.Pointer(in.ServiceAccountConfig)) + return nil +} + +// Convert_garden_KubeAPIServerConfig_To_v1alpha1_KubeAPIServerConfig is an autogenerated conversion function. +func Convert_garden_KubeAPIServerConfig_To_v1alpha1_KubeAPIServerConfig(in *garden.KubeAPIServerConfig, out *KubeAPIServerConfig, s conversion.Scope) error { + return autoConvert_garden_KubeAPIServerConfig_To_v1alpha1_KubeAPIServerConfig(in, out, s) +} + +func autoConvert_v1alpha1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(in *KubeControllerManagerConfig, out *garden.KubeControllerManagerConfig, s conversion.Scope) error { + if err := Convert_v1alpha1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + if in.HorizontalPodAutoscalerConfig != nil { + in, out := &in.HorizontalPodAutoscalerConfig, &out.HorizontalPodAutoscalerConfig + *out = new(garden.HorizontalPodAutoscalerConfig) + if err := Convert_v1alpha1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.HorizontalPodAutoscalerConfig = nil + } + if in.NodeCIDRMaskSize != nil { + in, out := &in.NodeCIDRMaskSize, &out.NodeCIDRMaskSize + *out = new(int) + **out = int(**in) + } else { + out.NodeCIDRMaskSize = nil + } + return nil +} + +// Convert_v1alpha1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig is an autogenerated conversion function. +func Convert_v1alpha1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(in *KubeControllerManagerConfig, out *garden.KubeControllerManagerConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(in, out, s) +} + +func autoConvert_garden_KubeControllerManagerConfig_To_v1alpha1_KubeControllerManagerConfig(in *garden.KubeControllerManagerConfig, out *KubeControllerManagerConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1alpha1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + if in.HorizontalPodAutoscalerConfig != nil { + in, out := &in.HorizontalPodAutoscalerConfig, &out.HorizontalPodAutoscalerConfig + *out = new(HorizontalPodAutoscalerConfig) + if err := Convert_garden_HorizontalPodAutoscalerConfig_To_v1alpha1_HorizontalPodAutoscalerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.HorizontalPodAutoscalerConfig = nil + } + if in.NodeCIDRMaskSize != nil { + in, out := &in.NodeCIDRMaskSize, &out.NodeCIDRMaskSize + *out = new(int32) + **out = int32(**in) + } else { + out.NodeCIDRMaskSize = nil + } + return nil +} + +// Convert_garden_KubeControllerManagerConfig_To_v1alpha1_KubeControllerManagerConfig is an autogenerated conversion function. +func Convert_garden_KubeControllerManagerConfig_To_v1alpha1_KubeControllerManagerConfig(in *garden.KubeControllerManagerConfig, out *KubeControllerManagerConfig, s conversion.Scope) error { + return autoConvert_garden_KubeControllerManagerConfig_To_v1alpha1_KubeControllerManagerConfig(in, out, s) +} + +func autoConvert_v1alpha1_KubeProxyConfig_To_garden_KubeProxyConfig(in *KubeProxyConfig, out *garden.KubeProxyConfig, s conversion.Scope) error { + if err := Convert_v1alpha1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.Mode = (*garden.ProxyMode)(unsafe.Pointer(in.Mode)) + return nil +} + +// Convert_v1alpha1_KubeProxyConfig_To_garden_KubeProxyConfig is an autogenerated conversion function. +func Convert_v1alpha1_KubeProxyConfig_To_garden_KubeProxyConfig(in *KubeProxyConfig, out *garden.KubeProxyConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_KubeProxyConfig_To_garden_KubeProxyConfig(in, out, s) +} + +func autoConvert_garden_KubeProxyConfig_To_v1alpha1_KubeProxyConfig(in *garden.KubeProxyConfig, out *KubeProxyConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1alpha1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.Mode = (*ProxyMode)(unsafe.Pointer(in.Mode)) + return nil +} + +// Convert_garden_KubeProxyConfig_To_v1alpha1_KubeProxyConfig is an autogenerated conversion function. +func Convert_garden_KubeProxyConfig_To_v1alpha1_KubeProxyConfig(in *garden.KubeProxyConfig, out *KubeProxyConfig, s conversion.Scope) error { + return autoConvert_garden_KubeProxyConfig_To_v1alpha1_KubeProxyConfig(in, out, s) +} + +func autoConvert_v1alpha1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(in *KubeSchedulerConfig, out *garden.KubeSchedulerConfig, s conversion.Scope) error { + if err := Convert_v1alpha1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig is an autogenerated conversion function. +func Convert_v1alpha1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(in *KubeSchedulerConfig, out *garden.KubeSchedulerConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(in, out, s) +} + +func autoConvert_garden_KubeSchedulerConfig_To_v1alpha1_KubeSchedulerConfig(in *garden.KubeSchedulerConfig, out *KubeSchedulerConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1alpha1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + return nil +} + +// Convert_garden_KubeSchedulerConfig_To_v1alpha1_KubeSchedulerConfig is an autogenerated conversion function. +func Convert_garden_KubeSchedulerConfig_To_v1alpha1_KubeSchedulerConfig(in *garden.KubeSchedulerConfig, out *KubeSchedulerConfig, s conversion.Scope) error { + return autoConvert_garden_KubeSchedulerConfig_To_v1alpha1_KubeSchedulerConfig(in, out, s) +} + +func autoConvert_v1alpha1_KubeletConfig_To_garden_KubeletConfig(in *KubeletConfig, out *garden.KubeletConfig, s conversion.Scope) error { + if err := Convert_v1alpha1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.CPUCFSQuota = (*bool)(unsafe.Pointer(in.CPUCFSQuota)) + out.CPUManagerPolicy = (*string)(unsafe.Pointer(in.CPUManagerPolicy)) + out.EvictionHard = (*garden.KubeletConfigEviction)(unsafe.Pointer(in.EvictionHard)) + out.EvictionMaxPodGracePeriod = (*int32)(unsafe.Pointer(in.EvictionMaxPodGracePeriod)) + out.EvictionMinimumReclaim = (*garden.KubeletConfigEvictionMinimumReclaim)(unsafe.Pointer(in.EvictionMinimumReclaim)) + out.EvictionPressureTransitionPeriod = (*metav1.Duration)(unsafe.Pointer(in.EvictionPressureTransitionPeriod)) + out.EvictionSoft = (*garden.KubeletConfigEviction)(unsafe.Pointer(in.EvictionSoft)) + out.EvictionSoftGracePeriod = (*garden.KubeletConfigEvictionSoftGracePeriod)(unsafe.Pointer(in.EvictionSoftGracePeriod)) + out.MaxPods = (*int32)(unsafe.Pointer(in.MaxPods)) + out.PodPIDsLimit = (*int64)(unsafe.Pointer(in.PodPIDsLimit)) + return nil +} + +// Convert_v1alpha1_KubeletConfig_To_garden_KubeletConfig is an autogenerated conversion function. +func Convert_v1alpha1_KubeletConfig_To_garden_KubeletConfig(in *KubeletConfig, out *garden.KubeletConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_KubeletConfig_To_garden_KubeletConfig(in, out, s) +} + +func autoConvert_garden_KubeletConfig_To_v1alpha1_KubeletConfig(in *garden.KubeletConfig, out *KubeletConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1alpha1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.PodPIDsLimit = (*int64)(unsafe.Pointer(in.PodPIDsLimit)) + out.CPUCFSQuota = (*bool)(unsafe.Pointer(in.CPUCFSQuota)) + out.CPUManagerPolicy = (*string)(unsafe.Pointer(in.CPUManagerPolicy)) + out.MaxPods = (*int32)(unsafe.Pointer(in.MaxPods)) + out.EvictionHard = (*KubeletConfigEviction)(unsafe.Pointer(in.EvictionHard)) + out.EvictionSoft = (*KubeletConfigEviction)(unsafe.Pointer(in.EvictionSoft)) + out.EvictionSoftGracePeriod = (*KubeletConfigEvictionSoftGracePeriod)(unsafe.Pointer(in.EvictionSoftGracePeriod)) + out.EvictionMinimumReclaim = (*KubeletConfigEvictionMinimumReclaim)(unsafe.Pointer(in.EvictionMinimumReclaim)) + out.EvictionPressureTransitionPeriod = (*metav1.Duration)(unsafe.Pointer(in.EvictionPressureTransitionPeriod)) + out.EvictionMaxPodGracePeriod = (*int32)(unsafe.Pointer(in.EvictionMaxPodGracePeriod)) + return nil +} + +// Convert_garden_KubeletConfig_To_v1alpha1_KubeletConfig is an autogenerated conversion function. +func Convert_garden_KubeletConfig_To_v1alpha1_KubeletConfig(in *garden.KubeletConfig, out *KubeletConfig, s conversion.Scope) error { + return autoConvert_garden_KubeletConfig_To_v1alpha1_KubeletConfig(in, out, s) +} + +func autoConvert_v1alpha1_KubeletConfigEviction_To_garden_KubeletConfigEviction(in *KubeletConfigEviction, out *garden.KubeletConfigEviction, s conversion.Scope) error { + out.MemoryAvailable = (*string)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*string)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*string)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*string)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*string)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_v1alpha1_KubeletConfigEviction_To_garden_KubeletConfigEviction is an autogenerated conversion function. +func Convert_v1alpha1_KubeletConfigEviction_To_garden_KubeletConfigEviction(in *KubeletConfigEviction, out *garden.KubeletConfigEviction, s conversion.Scope) error { + return autoConvert_v1alpha1_KubeletConfigEviction_To_garden_KubeletConfigEviction(in, out, s) +} + +func autoConvert_garden_KubeletConfigEviction_To_v1alpha1_KubeletConfigEviction(in *garden.KubeletConfigEviction, out *KubeletConfigEviction, s conversion.Scope) error { + out.MemoryAvailable = (*string)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*string)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*string)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*string)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*string)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_garden_KubeletConfigEviction_To_v1alpha1_KubeletConfigEviction is an autogenerated conversion function. +func Convert_garden_KubeletConfigEviction_To_v1alpha1_KubeletConfigEviction(in *garden.KubeletConfigEviction, out *KubeletConfigEviction, s conversion.Scope) error { + return autoConvert_garden_KubeletConfigEviction_To_v1alpha1_KubeletConfigEviction(in, out, s) +} + +func autoConvert_v1alpha1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(in *KubeletConfigEvictionMinimumReclaim, out *garden.KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + out.MemoryAvailable = (*resource.Quantity)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_v1alpha1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim is an autogenerated conversion function. +func Convert_v1alpha1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(in *KubeletConfigEvictionMinimumReclaim, out *garden.KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + return autoConvert_v1alpha1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(in, out, s) +} + +func autoConvert_garden_KubeletConfigEvictionMinimumReclaim_To_v1alpha1_KubeletConfigEvictionMinimumReclaim(in *garden.KubeletConfigEvictionMinimumReclaim, out *KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + out.MemoryAvailable = (*resource.Quantity)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_garden_KubeletConfigEvictionMinimumReclaim_To_v1alpha1_KubeletConfigEvictionMinimumReclaim is an autogenerated conversion function. +func Convert_garden_KubeletConfigEvictionMinimumReclaim_To_v1alpha1_KubeletConfigEvictionMinimumReclaim(in *garden.KubeletConfigEvictionMinimumReclaim, out *KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + return autoConvert_garden_KubeletConfigEvictionMinimumReclaim_To_v1alpha1_KubeletConfigEvictionMinimumReclaim(in, out, s) +} + +func autoConvert_v1alpha1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(in *KubeletConfigEvictionSoftGracePeriod, out *garden.KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + out.MemoryAvailable = (*metav1.Duration)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_v1alpha1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod is an autogenerated conversion function. +func Convert_v1alpha1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(in *KubeletConfigEvictionSoftGracePeriod, out *garden.KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + return autoConvert_v1alpha1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(in, out, s) +} + +func autoConvert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1alpha1_KubeletConfigEvictionSoftGracePeriod(in *garden.KubeletConfigEvictionSoftGracePeriod, out *KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + out.MemoryAvailable = (*metav1.Duration)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1alpha1_KubeletConfigEvictionSoftGracePeriod is an autogenerated conversion function. +func Convert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1alpha1_KubeletConfigEvictionSoftGracePeriod(in *garden.KubeletConfigEvictionSoftGracePeriod, out *KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + return autoConvert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1alpha1_KubeletConfigEvictionSoftGracePeriod(in, out, s) +} + +func autoConvert_v1alpha1_Kubernetes_To_garden_Kubernetes(in *Kubernetes, out *garden.Kubernetes, s conversion.Scope) error { + out.AllowPrivilegedContainers = (*bool)(unsafe.Pointer(in.AllowPrivilegedContainers)) + if in.ClusterAutoscaler != nil { + in, out := &in.ClusterAutoscaler, &out.ClusterAutoscaler + *out = new(garden.ClusterAutoscaler) + if err := Convert_v1alpha1_ClusterAutoscaler_To_garden_ClusterAutoscaler(*in, *out, s); err != nil { + return err + } + } else { + out.ClusterAutoscaler = nil + } + if in.KubeAPIServer != nil { + in, out := &in.KubeAPIServer, &out.KubeAPIServer + *out = new(garden.KubeAPIServerConfig) + if err := Convert_v1alpha1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.KubeAPIServer = nil + } + if in.KubeControllerManager != nil { + in, out := &in.KubeControllerManager, &out.KubeControllerManager + *out = new(garden.KubeControllerManagerConfig) + if err := Convert_v1alpha1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.KubeControllerManager = nil + } + out.KubeScheduler = (*garden.KubeSchedulerConfig)(unsafe.Pointer(in.KubeScheduler)) + out.KubeProxy = (*garden.KubeProxyConfig)(unsafe.Pointer(in.KubeProxy)) + if in.Kubelet != nil { + in, out := &in.Kubelet, &out.Kubelet + *out = new(garden.KubeletConfig) + if err := Convert_v1alpha1_KubeletConfig_To_garden_KubeletConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Kubelet = nil + } + out.Version = in.Version + return nil +} + +func autoConvert_garden_Kubernetes_To_v1alpha1_Kubernetes(in *garden.Kubernetes, out *Kubernetes, s conversion.Scope) error { + out.AllowPrivilegedContainers = (*bool)(unsafe.Pointer(in.AllowPrivilegedContainers)) + if in.KubeAPIServer != nil { + in, out := &in.KubeAPIServer, &out.KubeAPIServer + *out = new(KubeAPIServerConfig) + if err := Convert_garden_KubeAPIServerConfig_To_v1alpha1_KubeAPIServerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.KubeAPIServer = nil + } + // WARNING: in.CloudControllerManager requires manual conversion: does not exist in peer-type + if in.KubeControllerManager != nil { + in, out := &in.KubeControllerManager, &out.KubeControllerManager + *out = new(KubeControllerManagerConfig) + if err := Convert_garden_KubeControllerManagerConfig_To_v1alpha1_KubeControllerManagerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.KubeControllerManager = nil + } + out.KubeScheduler = (*KubeSchedulerConfig)(unsafe.Pointer(in.KubeScheduler)) + out.KubeProxy = (*KubeProxyConfig)(unsafe.Pointer(in.KubeProxy)) + if in.Kubelet != nil { + in, out := &in.Kubelet, &out.Kubelet + *out = new(KubeletConfig) + if err := Convert_garden_KubeletConfig_To_v1alpha1_KubeletConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Kubelet = nil + } + out.Version = in.Version + if in.ClusterAutoscaler != nil { + in, out := &in.ClusterAutoscaler, &out.ClusterAutoscaler + *out = new(ClusterAutoscaler) + if err := Convert_garden_ClusterAutoscaler_To_v1alpha1_ClusterAutoscaler(*in, *out, s); err != nil { + return err + } + } else { + out.ClusterAutoscaler = nil + } + return nil +} + +func autoConvert_v1alpha1_KubernetesConfig_To_garden_KubernetesConfig(in *KubernetesConfig, out *garden.KubernetesConfig, s conversion.Scope) error { + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + return nil +} + +// Convert_v1alpha1_KubernetesConfig_To_garden_KubernetesConfig is an autogenerated conversion function. +func Convert_v1alpha1_KubernetesConfig_To_garden_KubernetesConfig(in *KubernetesConfig, out *garden.KubernetesConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_KubernetesConfig_To_garden_KubernetesConfig(in, out, s) +} + +func autoConvert_garden_KubernetesConfig_To_v1alpha1_KubernetesConfig(in *garden.KubernetesConfig, out *KubernetesConfig, s conversion.Scope) error { + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + return nil +} + +// Convert_garden_KubernetesConfig_To_v1alpha1_KubernetesConfig is an autogenerated conversion function. +func Convert_garden_KubernetesConfig_To_v1alpha1_KubernetesConfig(in *garden.KubernetesConfig, out *KubernetesConfig, s conversion.Scope) error { + return autoConvert_garden_KubernetesConfig_To_v1alpha1_KubernetesConfig(in, out, s) +} + +func autoConvert_v1alpha1_KubernetesDashboard_To_garden_KubernetesDashboard(in *KubernetesDashboard, out *garden.KubernetesDashboard, s conversion.Scope) error { + if err := Convert_v1alpha1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.AuthenticationMode = (*string)(unsafe.Pointer(in.AuthenticationMode)) + return nil +} + +// Convert_v1alpha1_KubernetesDashboard_To_garden_KubernetesDashboard is an autogenerated conversion function. +func Convert_v1alpha1_KubernetesDashboard_To_garden_KubernetesDashboard(in *KubernetesDashboard, out *garden.KubernetesDashboard, s conversion.Scope) error { + return autoConvert_v1alpha1_KubernetesDashboard_To_garden_KubernetesDashboard(in, out, s) +} + +func autoConvert_garden_KubernetesDashboard_To_v1alpha1_KubernetesDashboard(in *garden.KubernetesDashboard, out *KubernetesDashboard, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1alpha1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.AuthenticationMode = (*string)(unsafe.Pointer(in.AuthenticationMode)) + return nil +} + +// Convert_garden_KubernetesDashboard_To_v1alpha1_KubernetesDashboard is an autogenerated conversion function. +func Convert_garden_KubernetesDashboard_To_v1alpha1_KubernetesDashboard(in *garden.KubernetesDashboard, out *KubernetesDashboard, s conversion.Scope) error { + return autoConvert_garden_KubernetesDashboard_To_v1alpha1_KubernetesDashboard(in, out, s) +} + +func autoConvert_v1alpha1_KubernetesInfo_To_core_KubernetesInfo(in *KubernetesInfo, out *core.KubernetesInfo, s conversion.Scope) error { + out.Version = in.Version + return nil +} + +// Convert_v1alpha1_KubernetesInfo_To_core_KubernetesInfo is an autogenerated conversion function. +func Convert_v1alpha1_KubernetesInfo_To_core_KubernetesInfo(in *KubernetesInfo, out *core.KubernetesInfo, s conversion.Scope) error { + return autoConvert_v1alpha1_KubernetesInfo_To_core_KubernetesInfo(in, out, s) +} + +func autoConvert_core_KubernetesInfo_To_v1alpha1_KubernetesInfo(in *core.KubernetesInfo, out *KubernetesInfo, s conversion.Scope) error { + out.Version = in.Version + return nil +} + +// Convert_core_KubernetesInfo_To_v1alpha1_KubernetesInfo is an autogenerated conversion function. +func Convert_core_KubernetesInfo_To_v1alpha1_KubernetesInfo(in *core.KubernetesInfo, out *KubernetesInfo, s conversion.Scope) error { + return autoConvert_core_KubernetesInfo_To_v1alpha1_KubernetesInfo(in, out, s) +} + +func autoConvert_v1alpha1_KubernetesSettings_To_garden_KubernetesSettings(in *KubernetesSettings, out *garden.KubernetesSettings, s conversion.Scope) error { + out.Versions = *(*[]garden.ExpirableVersion)(unsafe.Pointer(&in.Versions)) + return nil +} + +// Convert_v1alpha1_KubernetesSettings_To_garden_KubernetesSettings is an autogenerated conversion function. +func Convert_v1alpha1_KubernetesSettings_To_garden_KubernetesSettings(in *KubernetesSettings, out *garden.KubernetesSettings, s conversion.Scope) error { + return autoConvert_v1alpha1_KubernetesSettings_To_garden_KubernetesSettings(in, out, s) +} + +func autoConvert_garden_KubernetesSettings_To_v1alpha1_KubernetesSettings(in *garden.KubernetesSettings, out *KubernetesSettings, s conversion.Scope) error { + out.Versions = *(*[]ExpirableVersion)(unsafe.Pointer(&in.Versions)) + return nil +} + +// Convert_garden_KubernetesSettings_To_v1alpha1_KubernetesSettings is an autogenerated conversion function. +func Convert_garden_KubernetesSettings_To_v1alpha1_KubernetesSettings(in *garden.KubernetesSettings, out *KubernetesSettings, s conversion.Scope) error { + return autoConvert_garden_KubernetesSettings_To_v1alpha1_KubernetesSettings(in, out, s) +} + +func autoConvert_v1alpha1_LastError_To_core_LastError(in *LastError, out *core.LastError, s conversion.Scope) error { + out.Description = in.Description + out.TaskID = (*string)(unsafe.Pointer(in.TaskID)) + out.Codes = *(*[]core.ErrorCode)(unsafe.Pointer(&in.Codes)) + out.LastUpdateTime = (*metav1.Time)(unsafe.Pointer(in.LastUpdateTime)) + return nil +} + +// Convert_v1alpha1_LastError_To_core_LastError is an autogenerated conversion function. +func Convert_v1alpha1_LastError_To_core_LastError(in *LastError, out *core.LastError, s conversion.Scope) error { + return autoConvert_v1alpha1_LastError_To_core_LastError(in, out, s) +} + +func autoConvert_core_LastError_To_v1alpha1_LastError(in *core.LastError, out *LastError, s conversion.Scope) error { + out.Description = in.Description + out.TaskID = (*string)(unsafe.Pointer(in.TaskID)) + out.Codes = *(*[]ErrorCode)(unsafe.Pointer(&in.Codes)) + out.LastUpdateTime = (*metav1.Time)(unsafe.Pointer(in.LastUpdateTime)) + return nil +} + +// Convert_core_LastError_To_v1alpha1_LastError is an autogenerated conversion function. +func Convert_core_LastError_To_v1alpha1_LastError(in *core.LastError, out *LastError, s conversion.Scope) error { + return autoConvert_core_LastError_To_v1alpha1_LastError(in, out, s) +} + +func autoConvert_v1alpha1_LastOperation_To_core_LastOperation(in *LastOperation, out *core.LastOperation, s conversion.Scope) error { + out.Description = in.Description + out.LastUpdateTime = in.LastUpdateTime + out.Progress = in.Progress + out.State = core.LastOperationState(in.State) + out.Type = core.LastOperationType(in.Type) + return nil +} + +// Convert_v1alpha1_LastOperation_To_core_LastOperation is an autogenerated conversion function. +func Convert_v1alpha1_LastOperation_To_core_LastOperation(in *LastOperation, out *core.LastOperation, s conversion.Scope) error { + return autoConvert_v1alpha1_LastOperation_To_core_LastOperation(in, out, s) +} + +func autoConvert_core_LastOperation_To_v1alpha1_LastOperation(in *core.LastOperation, out *LastOperation, s conversion.Scope) error { + out.Description = in.Description + out.LastUpdateTime = in.LastUpdateTime + out.Progress = in.Progress + out.State = LastOperationState(in.State) + out.Type = LastOperationType(in.Type) + return nil +} + +// Convert_core_LastOperation_To_v1alpha1_LastOperation is an autogenerated conversion function. +func Convert_core_LastOperation_To_v1alpha1_LastOperation(in *core.LastOperation, out *LastOperation, s conversion.Scope) error { + return autoConvert_core_LastOperation_To_v1alpha1_LastOperation(in, out, s) +} + +func autoConvert_v1alpha1_Machine_To_garden_Machine(in *Machine, out *garden.Machine, s conversion.Scope) error { + out.Type = in.Type + out.Image = (*garden.ShootMachineImage)(unsafe.Pointer(in.Image)) + return nil +} + +// Convert_v1alpha1_Machine_To_garden_Machine is an autogenerated conversion function. +func Convert_v1alpha1_Machine_To_garden_Machine(in *Machine, out *garden.Machine, s conversion.Scope) error { + return autoConvert_v1alpha1_Machine_To_garden_Machine(in, out, s) +} + +func autoConvert_garden_Machine_To_v1alpha1_Machine(in *garden.Machine, out *Machine, s conversion.Scope) error { + out.Type = in.Type + out.Image = (*ShootMachineImage)(unsafe.Pointer(in.Image)) + return nil +} + +// Convert_garden_Machine_To_v1alpha1_Machine is an autogenerated conversion function. +func Convert_garden_Machine_To_v1alpha1_Machine(in *garden.Machine, out *Machine, s conversion.Scope) error { + return autoConvert_garden_Machine_To_v1alpha1_Machine(in, out, s) +} + +func autoConvert_v1alpha1_MachineImage_To_garden_MachineImage(in *MachineImage, out *garden.MachineImage, s conversion.Scope) error { + out.Name = in.Name + out.Versions = *(*[]garden.MachineImageVersion)(unsafe.Pointer(&in.Versions)) + return nil +} + +// Convert_v1alpha1_MachineImage_To_garden_MachineImage is an autogenerated conversion function. +func Convert_v1alpha1_MachineImage_To_garden_MachineImage(in *MachineImage, out *garden.MachineImage, s conversion.Scope) error { + return autoConvert_v1alpha1_MachineImage_To_garden_MachineImage(in, out, s) +} + +func autoConvert_garden_MachineImage_To_v1alpha1_MachineImage(in *garden.MachineImage, out *MachineImage, s conversion.Scope) error { + out.Name = in.Name + out.Versions = *(*[]ExpirableVersion)(unsafe.Pointer(&in.Versions)) + return nil +} + +// Convert_garden_MachineImage_To_v1alpha1_MachineImage is an autogenerated conversion function. +func Convert_garden_MachineImage_To_v1alpha1_MachineImage(in *garden.MachineImage, out *MachineImage, s conversion.Scope) error { + return autoConvert_garden_MachineImage_To_v1alpha1_MachineImage(in, out, s) +} + +func autoConvert_v1alpha1_MachineType_To_garden_MachineType(in *MachineType, out *garden.MachineType, s conversion.Scope) error { + out.CPU = in.CPU + out.GPU = in.GPU + out.Memory = in.Memory + out.Name = in.Name + out.Storage = (*garden.MachineTypeStorage)(unsafe.Pointer(in.Storage)) + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + return nil +} + +// Convert_v1alpha1_MachineType_To_garden_MachineType is an autogenerated conversion function. +func Convert_v1alpha1_MachineType_To_garden_MachineType(in *MachineType, out *garden.MachineType, s conversion.Scope) error { + return autoConvert_v1alpha1_MachineType_To_garden_MachineType(in, out, s) +} + +func autoConvert_garden_MachineType_To_v1alpha1_MachineType(in *garden.MachineType, out *MachineType, s conversion.Scope) error { + out.Name = in.Name + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + out.CPU = in.CPU + out.GPU = in.GPU + out.Storage = (*MachineTypeStorage)(unsafe.Pointer(in.Storage)) + out.Memory = in.Memory + return nil +} + +// Convert_garden_MachineType_To_v1alpha1_MachineType is an autogenerated conversion function. +func Convert_garden_MachineType_To_v1alpha1_MachineType(in *garden.MachineType, out *MachineType, s conversion.Scope) error { + return autoConvert_garden_MachineType_To_v1alpha1_MachineType(in, out, s) +} + +func autoConvert_v1alpha1_MachineTypeStorage_To_garden_MachineTypeStorage(in *MachineTypeStorage, out *garden.MachineTypeStorage, s conversion.Scope) error { + out.Class = in.Class + out.Size = in.Size + out.Type = in.Type + return nil +} + +// Convert_v1alpha1_MachineTypeStorage_To_garden_MachineTypeStorage is an autogenerated conversion function. +func Convert_v1alpha1_MachineTypeStorage_To_garden_MachineTypeStorage(in *MachineTypeStorage, out *garden.MachineTypeStorage, s conversion.Scope) error { + return autoConvert_v1alpha1_MachineTypeStorage_To_garden_MachineTypeStorage(in, out, s) +} + +func autoConvert_garden_MachineTypeStorage_To_v1alpha1_MachineTypeStorage(in *garden.MachineTypeStorage, out *MachineTypeStorage, s conversion.Scope) error { + out.Class = in.Class + out.Size = in.Size + out.Type = in.Type + return nil +} + +// Convert_garden_MachineTypeStorage_To_v1alpha1_MachineTypeStorage is an autogenerated conversion function. +func Convert_garden_MachineTypeStorage_To_v1alpha1_MachineTypeStorage(in *garden.MachineTypeStorage, out *MachineTypeStorage, s conversion.Scope) error { + return autoConvert_garden_MachineTypeStorage_To_v1alpha1_MachineTypeStorage(in, out, s) +} + +func autoConvert_v1alpha1_Maintenance_To_garden_Maintenance(in *Maintenance, out *garden.Maintenance, s conversion.Scope) error { + if in.AutoUpdate != nil { + in, out := &in.AutoUpdate, &out.AutoUpdate + *out = new(garden.MaintenanceAutoUpdate) + if err := Convert_v1alpha1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(*in, *out, s); err != nil { + return err + } + } else { + out.AutoUpdate = nil + } + out.TimeWindow = (*garden.MaintenanceTimeWindow)(unsafe.Pointer(in.TimeWindow)) + return nil +} + +// Convert_v1alpha1_Maintenance_To_garden_Maintenance is an autogenerated conversion function. +func Convert_v1alpha1_Maintenance_To_garden_Maintenance(in *Maintenance, out *garden.Maintenance, s conversion.Scope) error { + return autoConvert_v1alpha1_Maintenance_To_garden_Maintenance(in, out, s) +} + +func autoConvert_garden_Maintenance_To_v1alpha1_Maintenance(in *garden.Maintenance, out *Maintenance, s conversion.Scope) error { + if in.AutoUpdate != nil { + in, out := &in.AutoUpdate, &out.AutoUpdate + *out = new(MaintenanceAutoUpdate) + if err := Convert_garden_MaintenanceAutoUpdate_To_v1alpha1_MaintenanceAutoUpdate(*in, *out, s); err != nil { + return err + } + } else { + out.AutoUpdate = nil + } + out.TimeWindow = (*MaintenanceTimeWindow)(unsafe.Pointer(in.TimeWindow)) + return nil +} + +// Convert_garden_Maintenance_To_v1alpha1_Maintenance is an autogenerated conversion function. +func Convert_garden_Maintenance_To_v1alpha1_Maintenance(in *garden.Maintenance, out *Maintenance, s conversion.Scope) error { + return autoConvert_garden_Maintenance_To_v1alpha1_Maintenance(in, out, s) +} + +func autoConvert_v1alpha1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(in *MaintenanceAutoUpdate, out *garden.MaintenanceAutoUpdate, s conversion.Scope) error { + out.KubernetesVersion = in.KubernetesVersion + if err := metav1.Convert_bool_To_Pointer_bool(&in.MachineImageVersion, &out.MachineImageVersion, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate is an autogenerated conversion function. +func Convert_v1alpha1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(in *MaintenanceAutoUpdate, out *garden.MaintenanceAutoUpdate, s conversion.Scope) error { + return autoConvert_v1alpha1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(in, out, s) +} + +func autoConvert_garden_MaintenanceAutoUpdate_To_v1alpha1_MaintenanceAutoUpdate(in *garden.MaintenanceAutoUpdate, out *MaintenanceAutoUpdate, s conversion.Scope) error { + out.KubernetesVersion = in.KubernetesVersion + if err := metav1.Convert_Pointer_bool_To_bool(&in.MachineImageVersion, &out.MachineImageVersion, s); err != nil { + return err + } + return nil +} + +// Convert_garden_MaintenanceAutoUpdate_To_v1alpha1_MaintenanceAutoUpdate is an autogenerated conversion function. +func Convert_garden_MaintenanceAutoUpdate_To_v1alpha1_MaintenanceAutoUpdate(in *garden.MaintenanceAutoUpdate, out *MaintenanceAutoUpdate, s conversion.Scope) error { + return autoConvert_garden_MaintenanceAutoUpdate_To_v1alpha1_MaintenanceAutoUpdate(in, out, s) +} + +func autoConvert_v1alpha1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(in *MaintenanceTimeWindow, out *garden.MaintenanceTimeWindow, s conversion.Scope) error { + out.Begin = in.Begin + out.End = in.End + return nil +} + +// Convert_v1alpha1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow is an autogenerated conversion function. +func Convert_v1alpha1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(in *MaintenanceTimeWindow, out *garden.MaintenanceTimeWindow, s conversion.Scope) error { + return autoConvert_v1alpha1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(in, out, s) +} + +func autoConvert_garden_MaintenanceTimeWindow_To_v1alpha1_MaintenanceTimeWindow(in *garden.MaintenanceTimeWindow, out *MaintenanceTimeWindow, s conversion.Scope) error { + out.Begin = in.Begin + out.End = in.End + return nil +} + +// Convert_garden_MaintenanceTimeWindow_To_v1alpha1_MaintenanceTimeWindow is an autogenerated conversion function. +func Convert_garden_MaintenanceTimeWindow_To_v1alpha1_MaintenanceTimeWindow(in *garden.MaintenanceTimeWindow, out *MaintenanceTimeWindow, s conversion.Scope) error { + return autoConvert_garden_MaintenanceTimeWindow_To_v1alpha1_MaintenanceTimeWindow(in, out, s) +} + +func autoConvert_v1alpha1_Monitoring_To_garden_Monitoring(in *Monitoring, out *garden.Monitoring, s conversion.Scope) error { + out.Alerting = (*garden.Alerting)(unsafe.Pointer(in.Alerting)) + return nil +} + +// Convert_v1alpha1_Monitoring_To_garden_Monitoring is an autogenerated conversion function. +func Convert_v1alpha1_Monitoring_To_garden_Monitoring(in *Monitoring, out *garden.Monitoring, s conversion.Scope) error { + return autoConvert_v1alpha1_Monitoring_To_garden_Monitoring(in, out, s) +} + +func autoConvert_garden_Monitoring_To_v1alpha1_Monitoring(in *garden.Monitoring, out *Monitoring, s conversion.Scope) error { + out.Alerting = (*Alerting)(unsafe.Pointer(in.Alerting)) + return nil +} + +// Convert_garden_Monitoring_To_v1alpha1_Monitoring is an autogenerated conversion function. +func Convert_garden_Monitoring_To_v1alpha1_Monitoring(in *garden.Monitoring, out *Monitoring, s conversion.Scope) error { + return autoConvert_garden_Monitoring_To_v1alpha1_Monitoring(in, out, s) +} + +func autoConvert_v1alpha1_Networking_To_garden_Networking(in *Networking, out *garden.Networking, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Nodes = in.Nodes + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_v1alpha1_Networking_To_garden_Networking is an autogenerated conversion function. +func Convert_v1alpha1_Networking_To_garden_Networking(in *Networking, out *garden.Networking, s conversion.Scope) error { + return autoConvert_v1alpha1_Networking_To_garden_Networking(in, out, s) +} + +func autoConvert_garden_Networking_To_v1alpha1_Networking(in *garden.Networking, out *Networking, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Nodes = in.Nodes + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_garden_Networking_To_v1alpha1_Networking is an autogenerated conversion function. +func Convert_garden_Networking_To_v1alpha1_Networking(in *garden.Networking, out *Networking, s conversion.Scope) error { + return autoConvert_garden_Networking_To_v1alpha1_Networking(in, out, s) +} + +func autoConvert_v1alpha1_NginxIngress_To_garden_NginxIngress(in *NginxIngress, out *garden.NginxIngress, s conversion.Scope) error { + if err := Convert_v1alpha1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges)) + out.Config = *(*map[string]string)(unsafe.Pointer(&in.Config)) + out.ExternalTrafficPolicy = (*v1.ServiceExternalTrafficPolicyType)(unsafe.Pointer(in.ExternalTrafficPolicy)) + return nil +} + +// Convert_v1alpha1_NginxIngress_To_garden_NginxIngress is an autogenerated conversion function. +func Convert_v1alpha1_NginxIngress_To_garden_NginxIngress(in *NginxIngress, out *garden.NginxIngress, s conversion.Scope) error { + return autoConvert_v1alpha1_NginxIngress_To_garden_NginxIngress(in, out, s) +} + +func autoConvert_garden_NginxIngress_To_v1alpha1_NginxIngress(in *garden.NginxIngress, out *NginxIngress, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1alpha1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges)) + out.Config = *(*map[string]string)(unsafe.Pointer(&in.Config)) + out.ExternalTrafficPolicy = (*v1.ServiceExternalTrafficPolicyType)(unsafe.Pointer(in.ExternalTrafficPolicy)) + return nil +} + +// Convert_garden_NginxIngress_To_v1alpha1_NginxIngress is an autogenerated conversion function. +func Convert_garden_NginxIngress_To_v1alpha1_NginxIngress(in *garden.NginxIngress, out *NginxIngress, s conversion.Scope) error { + return autoConvert_garden_NginxIngress_To_v1alpha1_NginxIngress(in, out, s) +} + +func autoConvert_v1alpha1_OIDCConfig_To_garden_OIDCConfig(in *OIDCConfig, out *garden.OIDCConfig, s conversion.Scope) error { + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + if in.ClientAuthentication != nil { + in, out := &in.ClientAuthentication, &out.ClientAuthentication + *out = new(garden.OpenIDConnectClientAuthentication) + if err := Convert_v1alpha1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(*in, *out, s); err != nil { + return err + } + } else { + out.ClientAuthentication = nil + } + out.ClientID = (*string)(unsafe.Pointer(in.ClientID)) + out.GroupsClaim = (*string)(unsafe.Pointer(in.GroupsClaim)) + out.GroupsPrefix = (*string)(unsafe.Pointer(in.GroupsPrefix)) + out.IssuerURL = (*string)(unsafe.Pointer(in.IssuerURL)) + out.RequiredClaims = *(*map[string]string)(unsafe.Pointer(&in.RequiredClaims)) + out.SigningAlgs = *(*[]string)(unsafe.Pointer(&in.SigningAlgs)) + out.UsernameClaim = (*string)(unsafe.Pointer(in.UsernameClaim)) + out.UsernamePrefix = (*string)(unsafe.Pointer(in.UsernamePrefix)) + return nil +} + +// Convert_v1alpha1_OIDCConfig_To_garden_OIDCConfig is an autogenerated conversion function. +func Convert_v1alpha1_OIDCConfig_To_garden_OIDCConfig(in *OIDCConfig, out *garden.OIDCConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCConfig_To_garden_OIDCConfig(in, out, s) +} + +func autoConvert_garden_OIDCConfig_To_v1alpha1_OIDCConfig(in *garden.OIDCConfig, out *OIDCConfig, s conversion.Scope) error { + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + out.ClientID = (*string)(unsafe.Pointer(in.ClientID)) + out.GroupsClaim = (*string)(unsafe.Pointer(in.GroupsClaim)) + out.GroupsPrefix = (*string)(unsafe.Pointer(in.GroupsPrefix)) + out.IssuerURL = (*string)(unsafe.Pointer(in.IssuerURL)) + out.RequiredClaims = *(*map[string]string)(unsafe.Pointer(&in.RequiredClaims)) + out.SigningAlgs = *(*[]string)(unsafe.Pointer(&in.SigningAlgs)) + out.UsernameClaim = (*string)(unsafe.Pointer(in.UsernameClaim)) + out.UsernamePrefix = (*string)(unsafe.Pointer(in.UsernamePrefix)) + if in.ClientAuthentication != nil { + in, out := &in.ClientAuthentication, &out.ClientAuthentication + *out = new(OpenIDConnectClientAuthentication) + if err := Convert_garden_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication(*in, *out, s); err != nil { + return err + } + } else { + out.ClientAuthentication = nil + } + return nil +} + +// Convert_garden_OIDCConfig_To_v1alpha1_OIDCConfig is an autogenerated conversion function. +func Convert_garden_OIDCConfig_To_v1alpha1_OIDCConfig(in *garden.OIDCConfig, out *OIDCConfig, s conversion.Scope) error { + return autoConvert_garden_OIDCConfig_To_v1alpha1_OIDCConfig(in, out, s) +} + +func autoConvert_v1alpha1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(in *OpenIDConnectClientAuthentication, out *garden.OpenIDConnectClientAuthentication, s conversion.Scope) error { + out.ExtraConfig = *(*map[string]string)(unsafe.Pointer(&in.ExtraConfig)) + out.Secret = (*string)(unsafe.Pointer(in.Secret)) + return nil +} + +// Convert_v1alpha1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication is an autogenerated conversion function. +func Convert_v1alpha1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(in *OpenIDConnectClientAuthentication, out *garden.OpenIDConnectClientAuthentication, s conversion.Scope) error { + return autoConvert_v1alpha1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(in, out, s) +} + +func autoConvert_garden_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication(in *garden.OpenIDConnectClientAuthentication, out *OpenIDConnectClientAuthentication, s conversion.Scope) error { + out.Secret = (*string)(unsafe.Pointer(in.Secret)) + out.ExtraConfig = *(*map[string]string)(unsafe.Pointer(&in.ExtraConfig)) + return nil +} + +// Convert_garden_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication is an autogenerated conversion function. +func Convert_garden_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication(in *garden.OpenIDConnectClientAuthentication, out *OpenIDConnectClientAuthentication, s conversion.Scope) error { + return autoConvert_garden_OpenIDConnectClientAuthentication_To_v1alpha1_OpenIDConnectClientAuthentication(in, out, s) +} + +func autoConvert_v1alpha1_Plant_To_core_Plant(in *Plant, out *core.Plant, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_PlantSpec_To_core_PlantSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_PlantStatus_To_core_PlantStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_Plant_To_core_Plant is an autogenerated conversion function. +func Convert_v1alpha1_Plant_To_core_Plant(in *Plant, out *core.Plant, s conversion.Scope) error { + return autoConvert_v1alpha1_Plant_To_core_Plant(in, out, s) +} + +func autoConvert_core_Plant_To_v1alpha1_Plant(in *core.Plant, out *Plant, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_PlantSpec_To_v1alpha1_PlantSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_core_PlantStatus_To_v1alpha1_PlantStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_core_Plant_To_v1alpha1_Plant is an autogenerated conversion function. +func Convert_core_Plant_To_v1alpha1_Plant(in *core.Plant, out *Plant, s conversion.Scope) error { + return autoConvert_core_Plant_To_v1alpha1_Plant(in, out, s) +} + +func autoConvert_v1alpha1_PlantList_To_core_PlantList(in *PlantList, out *core.PlantList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]core.Plant)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_PlantList_To_core_PlantList is an autogenerated conversion function. +func Convert_v1alpha1_PlantList_To_core_PlantList(in *PlantList, out *core.PlantList, s conversion.Scope) error { + return autoConvert_v1alpha1_PlantList_To_core_PlantList(in, out, s) +} + +func autoConvert_core_PlantList_To_v1alpha1_PlantList(in *core.PlantList, out *PlantList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Plant)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_core_PlantList_To_v1alpha1_PlantList is an autogenerated conversion function. +func Convert_core_PlantList_To_v1alpha1_PlantList(in *core.PlantList, out *PlantList, s conversion.Scope) error { + return autoConvert_core_PlantList_To_v1alpha1_PlantList(in, out, s) +} + +func autoConvert_v1alpha1_PlantSpec_To_core_PlantSpec(in *PlantSpec, out *core.PlantSpec, s conversion.Scope) error { + out.SecretRef = in.SecretRef + out.Endpoints = *(*[]core.Endpoint)(unsafe.Pointer(&in.Endpoints)) + return nil +} + +// Convert_v1alpha1_PlantSpec_To_core_PlantSpec is an autogenerated conversion function. +func Convert_v1alpha1_PlantSpec_To_core_PlantSpec(in *PlantSpec, out *core.PlantSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_PlantSpec_To_core_PlantSpec(in, out, s) +} + +func autoConvert_core_PlantSpec_To_v1alpha1_PlantSpec(in *core.PlantSpec, out *PlantSpec, s conversion.Scope) error { + out.SecretRef = in.SecretRef + out.Endpoints = *(*[]Endpoint)(unsafe.Pointer(&in.Endpoints)) + return nil +} + +// Convert_core_PlantSpec_To_v1alpha1_PlantSpec is an autogenerated conversion function. +func Convert_core_PlantSpec_To_v1alpha1_PlantSpec(in *core.PlantSpec, out *PlantSpec, s conversion.Scope) error { + return autoConvert_core_PlantSpec_To_v1alpha1_PlantSpec(in, out, s) +} + +func autoConvert_v1alpha1_PlantStatus_To_core_PlantStatus(in *PlantStatus, out *core.PlantStatus, s conversion.Scope) error { + out.Conditions = *(*[]core.Condition)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) + out.ClusterInfo = (*core.ClusterInfo)(unsafe.Pointer(in.ClusterInfo)) + return nil +} + +// Convert_v1alpha1_PlantStatus_To_core_PlantStatus is an autogenerated conversion function. +func Convert_v1alpha1_PlantStatus_To_core_PlantStatus(in *PlantStatus, out *core.PlantStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_PlantStatus_To_core_PlantStatus(in, out, s) +} + +func autoConvert_core_PlantStatus_To_v1alpha1_PlantStatus(in *core.PlantStatus, out *PlantStatus, s conversion.Scope) error { + out.Conditions = *(*[]Condition)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) + out.ClusterInfo = (*ClusterInfo)(unsafe.Pointer(in.ClusterInfo)) + return nil +} + +// Convert_core_PlantStatus_To_v1alpha1_PlantStatus is an autogenerated conversion function. +func Convert_core_PlantStatus_To_v1alpha1_PlantStatus(in *core.PlantStatus, out *PlantStatus, s conversion.Scope) error { + return autoConvert_core_PlantStatus_To_v1alpha1_PlantStatus(in, out, s) +} + +func autoConvert_v1alpha1_Project_To_garden_Project(in *Project, out *garden.Project, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_ProjectSpec_To_garden_ProjectSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_ProjectStatus_To_garden_ProjectStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_Project_To_garden_Project is an autogenerated conversion function. +func Convert_v1alpha1_Project_To_garden_Project(in *Project, out *garden.Project, s conversion.Scope) error { + return autoConvert_v1alpha1_Project_To_garden_Project(in, out, s) +} + +func autoConvert_garden_Project_To_v1alpha1_Project(in *garden.Project, out *Project, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_ProjectSpec_To_v1alpha1_ProjectSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_garden_ProjectStatus_To_v1alpha1_ProjectStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_garden_Project_To_v1alpha1_Project is an autogenerated conversion function. +func Convert_garden_Project_To_v1alpha1_Project(in *garden.Project, out *Project, s conversion.Scope) error { + return autoConvert_garden_Project_To_v1alpha1_Project(in, out, s) +} + +func autoConvert_v1alpha1_ProjectList_To_garden_ProjectList(in *ProjectList, out *garden.ProjectList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.Project, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_Project_To_garden_Project(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha1_ProjectList_To_garden_ProjectList is an autogenerated conversion function. +func Convert_v1alpha1_ProjectList_To_garden_ProjectList(in *ProjectList, out *garden.ProjectList, s conversion.Scope) error { + return autoConvert_v1alpha1_ProjectList_To_garden_ProjectList(in, out, s) +} + +func autoConvert_garden_ProjectList_To_v1alpha1_ProjectList(in *garden.ProjectList, out *ProjectList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Project, len(*in)) + for i := range *in { + if err := Convert_garden_Project_To_v1alpha1_Project(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_ProjectList_To_v1alpha1_ProjectList is an autogenerated conversion function. +func Convert_garden_ProjectList_To_v1alpha1_ProjectList(in *garden.ProjectList, out *ProjectList, s conversion.Scope) error { + return autoConvert_garden_ProjectList_To_v1alpha1_ProjectList(in, out, s) +} + +func autoConvert_v1alpha1_ProjectMember_To_garden_ProjectMember(in *ProjectMember, out *garden.ProjectMember, s conversion.Scope) error { + out.Subject = in.Subject + out.Role = in.Role + return nil +} + +// Convert_v1alpha1_ProjectMember_To_garden_ProjectMember is an autogenerated conversion function. +func Convert_v1alpha1_ProjectMember_To_garden_ProjectMember(in *ProjectMember, out *garden.ProjectMember, s conversion.Scope) error { + return autoConvert_v1alpha1_ProjectMember_To_garden_ProjectMember(in, out, s) +} + +func autoConvert_garden_ProjectMember_To_v1alpha1_ProjectMember(in *garden.ProjectMember, out *ProjectMember, s conversion.Scope) error { + out.Subject = in.Subject + out.Role = in.Role + return nil +} + +// Convert_garden_ProjectMember_To_v1alpha1_ProjectMember is an autogenerated conversion function. +func Convert_garden_ProjectMember_To_v1alpha1_ProjectMember(in *garden.ProjectMember, out *ProjectMember, s conversion.Scope) error { + return autoConvert_garden_ProjectMember_To_v1alpha1_ProjectMember(in, out, s) +} + +func autoConvert_v1alpha1_ProjectSpec_To_garden_ProjectSpec(in *ProjectSpec, out *garden.ProjectSpec, s conversion.Scope) error { + out.CreatedBy = (*rbacv1.Subject)(unsafe.Pointer(in.CreatedBy)) + out.Description = (*string)(unsafe.Pointer(in.Description)) + out.Owner = (*rbacv1.Subject)(unsafe.Pointer(in.Owner)) + out.Purpose = (*string)(unsafe.Pointer(in.Purpose)) + // WARNING: in.Members requires manual conversion: does not exist in peer-type + out.Namespace = (*string)(unsafe.Pointer(in.Namespace)) + return nil +} + +func autoConvert_garden_ProjectSpec_To_v1alpha1_ProjectSpec(in *garden.ProjectSpec, out *ProjectSpec, s conversion.Scope) error { + out.CreatedBy = (*rbacv1.Subject)(unsafe.Pointer(in.CreatedBy)) + out.Description = (*string)(unsafe.Pointer(in.Description)) + out.Owner = (*rbacv1.Subject)(unsafe.Pointer(in.Owner)) + out.Purpose = (*string)(unsafe.Pointer(in.Purpose)) + // WARNING: in.ProjectMembers requires manual conversion: does not exist in peer-type + out.Namespace = (*string)(unsafe.Pointer(in.Namespace)) + return nil +} + +func autoConvert_v1alpha1_ProjectStatus_To_garden_ProjectStatus(in *ProjectStatus, out *garden.ProjectStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.Phase = garden.ProjectPhase(in.Phase) + return nil +} + +// Convert_v1alpha1_ProjectStatus_To_garden_ProjectStatus is an autogenerated conversion function. +func Convert_v1alpha1_ProjectStatus_To_garden_ProjectStatus(in *ProjectStatus, out *garden.ProjectStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_ProjectStatus_To_garden_ProjectStatus(in, out, s) +} + +func autoConvert_garden_ProjectStatus_To_v1alpha1_ProjectStatus(in *garden.ProjectStatus, out *ProjectStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.Phase = ProjectPhase(in.Phase) + return nil +} + +// Convert_garden_ProjectStatus_To_v1alpha1_ProjectStatus is an autogenerated conversion function. +func Convert_garden_ProjectStatus_To_v1alpha1_ProjectStatus(in *garden.ProjectStatus, out *ProjectStatus, s conversion.Scope) error { + return autoConvert_garden_ProjectStatus_To_v1alpha1_ProjectStatus(in, out, s) +} + +func autoConvert_v1alpha1_Provider_To_garden_Provider(in *Provider, out *garden.Provider, s conversion.Scope) error { + out.Type = in.Type + out.ControlPlaneConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ControlPlaneConfig)) + out.InfrastructureConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.InfrastructureConfig)) + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]garden.Worker, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_Worker_To_garden_Worker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + return nil +} + +// Convert_v1alpha1_Provider_To_garden_Provider is an autogenerated conversion function. +func Convert_v1alpha1_Provider_To_garden_Provider(in *Provider, out *garden.Provider, s conversion.Scope) error { + return autoConvert_v1alpha1_Provider_To_garden_Provider(in, out, s) +} + +func autoConvert_garden_Provider_To_v1alpha1_Provider(in *garden.Provider, out *Provider, s conversion.Scope) error { + out.Type = in.Type + out.ControlPlaneConfig = (*ProviderConfig)(unsafe.Pointer(in.ControlPlaneConfig)) + out.InfrastructureConfig = (*ProviderConfig)(unsafe.Pointer(in.InfrastructureConfig)) + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]Worker, len(*in)) + for i := range *in { + if err := Convert_garden_Worker_To_v1alpha1_Worker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + return nil +} + +// Convert_garden_Provider_To_v1alpha1_Provider is an autogenerated conversion function. +func Convert_garden_Provider_To_v1alpha1_Provider(in *garden.Provider, out *Provider, s conversion.Scope) error { + return autoConvert_garden_Provider_To_v1alpha1_Provider(in, out, s) +} + +func autoConvert_v1alpha1_ProviderConfig_To_core_ProviderConfig(in *ProviderConfig, out *core.ProviderConfig, s conversion.Scope) error { + out.RawExtension = in.RawExtension + return nil +} + +// Convert_v1alpha1_ProviderConfig_To_core_ProviderConfig is an autogenerated conversion function. +func Convert_v1alpha1_ProviderConfig_To_core_ProviderConfig(in *ProviderConfig, out *core.ProviderConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_ProviderConfig_To_core_ProviderConfig(in, out, s) +} + +func autoConvert_core_ProviderConfig_To_v1alpha1_ProviderConfig(in *core.ProviderConfig, out *ProviderConfig, s conversion.Scope) error { + out.RawExtension = in.RawExtension + return nil +} + +// Convert_core_ProviderConfig_To_v1alpha1_ProviderConfig is an autogenerated conversion function. +func Convert_core_ProviderConfig_To_v1alpha1_ProviderConfig(in *core.ProviderConfig, out *ProviderConfig, s conversion.Scope) error { + return autoConvert_core_ProviderConfig_To_v1alpha1_ProviderConfig(in, out, s) +} + +func autoConvert_v1alpha1_Quota_To_garden_Quota(in *Quota, out *garden.Quota, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_QuotaSpec_To_garden_QuotaSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_Quota_To_garden_Quota is an autogenerated conversion function. +func Convert_v1alpha1_Quota_To_garden_Quota(in *Quota, out *garden.Quota, s conversion.Scope) error { + return autoConvert_v1alpha1_Quota_To_garden_Quota(in, out, s) +} + +func autoConvert_garden_Quota_To_v1alpha1_Quota(in *garden.Quota, out *Quota, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_QuotaSpec_To_v1alpha1_QuotaSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_garden_Quota_To_v1alpha1_Quota is an autogenerated conversion function. +func Convert_garden_Quota_To_v1alpha1_Quota(in *garden.Quota, out *Quota, s conversion.Scope) error { + return autoConvert_garden_Quota_To_v1alpha1_Quota(in, out, s) +} + +func autoConvert_v1alpha1_QuotaList_To_garden_QuotaList(in *QuotaList, out *garden.QuotaList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]garden.Quota)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_QuotaList_To_garden_QuotaList is an autogenerated conversion function. +func Convert_v1alpha1_QuotaList_To_garden_QuotaList(in *QuotaList, out *garden.QuotaList, s conversion.Scope) error { + return autoConvert_v1alpha1_QuotaList_To_garden_QuotaList(in, out, s) +} + +func autoConvert_garden_QuotaList_To_v1alpha1_QuotaList(in *garden.QuotaList, out *QuotaList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Quota)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_garden_QuotaList_To_v1alpha1_QuotaList is an autogenerated conversion function. +func Convert_garden_QuotaList_To_v1alpha1_QuotaList(in *garden.QuotaList, out *QuotaList, s conversion.Scope) error { + return autoConvert_garden_QuotaList_To_v1alpha1_QuotaList(in, out, s) +} + +func autoConvert_v1alpha1_QuotaSpec_To_garden_QuotaSpec(in *QuotaSpec, out *garden.QuotaSpec, s conversion.Scope) error { + out.ClusterLifetimeDays = (*int)(unsafe.Pointer(in.ClusterLifetimeDays)) + out.Metrics = *(*v1.ResourceList)(unsafe.Pointer(&in.Metrics)) + out.Scope = in.Scope + return nil +} + +// Convert_v1alpha1_QuotaSpec_To_garden_QuotaSpec is an autogenerated conversion function. +func Convert_v1alpha1_QuotaSpec_To_garden_QuotaSpec(in *QuotaSpec, out *garden.QuotaSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_QuotaSpec_To_garden_QuotaSpec(in, out, s) +} + +func autoConvert_garden_QuotaSpec_To_v1alpha1_QuotaSpec(in *garden.QuotaSpec, out *QuotaSpec, s conversion.Scope) error { + out.ClusterLifetimeDays = (*int)(unsafe.Pointer(in.ClusterLifetimeDays)) + out.Metrics = *(*v1.ResourceList)(unsafe.Pointer(&in.Metrics)) + out.Scope = in.Scope + return nil +} + +// Convert_garden_QuotaSpec_To_v1alpha1_QuotaSpec is an autogenerated conversion function. +func Convert_garden_QuotaSpec_To_v1alpha1_QuotaSpec(in *garden.QuotaSpec, out *QuotaSpec, s conversion.Scope) error { + return autoConvert_garden_QuotaSpec_To_v1alpha1_QuotaSpec(in, out, s) +} + +func autoConvert_v1alpha1_Region_To_garden_Region(in *Region, out *garden.Region, s conversion.Scope) error { + out.Name = in.Name + out.Zones = *(*[]garden.AvailabilityZone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1alpha1_Region_To_garden_Region is an autogenerated conversion function. +func Convert_v1alpha1_Region_To_garden_Region(in *Region, out *garden.Region, s conversion.Scope) error { + return autoConvert_v1alpha1_Region_To_garden_Region(in, out, s) +} + +func autoConvert_garden_Region_To_v1alpha1_Region(in *garden.Region, out *Region, s conversion.Scope) error { + out.Name = in.Name + out.Zones = *(*[]AvailabilityZone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_Region_To_v1alpha1_Region is an autogenerated conversion function. +func Convert_garden_Region_To_v1alpha1_Region(in *garden.Region, out *Region, s conversion.Scope) error { + return autoConvert_garden_Region_To_v1alpha1_Region(in, out, s) +} + +func autoConvert_v1alpha1_SecretBinding_To_garden_SecretBinding(in *SecretBinding, out *garden.SecretBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.SecretRef = in.SecretRef + out.Quotas = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.Quotas)) + return nil +} + +// Convert_v1alpha1_SecretBinding_To_garden_SecretBinding is an autogenerated conversion function. +func Convert_v1alpha1_SecretBinding_To_garden_SecretBinding(in *SecretBinding, out *garden.SecretBinding, s conversion.Scope) error { + return autoConvert_v1alpha1_SecretBinding_To_garden_SecretBinding(in, out, s) +} + +func autoConvert_garden_SecretBinding_To_v1alpha1_SecretBinding(in *garden.SecretBinding, out *SecretBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.SecretRef = in.SecretRef + out.Quotas = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.Quotas)) + return nil +} + +// Convert_garden_SecretBinding_To_v1alpha1_SecretBinding is an autogenerated conversion function. +func Convert_garden_SecretBinding_To_v1alpha1_SecretBinding(in *garden.SecretBinding, out *SecretBinding, s conversion.Scope) error { + return autoConvert_garden_SecretBinding_To_v1alpha1_SecretBinding(in, out, s) +} + +func autoConvert_v1alpha1_SecretBindingList_To_garden_SecretBindingList(in *SecretBindingList, out *garden.SecretBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]garden.SecretBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_SecretBindingList_To_garden_SecretBindingList is an autogenerated conversion function. +func Convert_v1alpha1_SecretBindingList_To_garden_SecretBindingList(in *SecretBindingList, out *garden.SecretBindingList, s conversion.Scope) error { + return autoConvert_v1alpha1_SecretBindingList_To_garden_SecretBindingList(in, out, s) +} + +func autoConvert_garden_SecretBindingList_To_v1alpha1_SecretBindingList(in *garden.SecretBindingList, out *SecretBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SecretBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_garden_SecretBindingList_To_v1alpha1_SecretBindingList is an autogenerated conversion function. +func Convert_garden_SecretBindingList_To_v1alpha1_SecretBindingList(in *garden.SecretBindingList, out *SecretBindingList, s conversion.Scope) error { + return autoConvert_garden_SecretBindingList_To_v1alpha1_SecretBindingList(in, out, s) +} + +func autoConvert_v1alpha1_Seed_To_garden_Seed(in *Seed, out *garden.Seed, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_SeedSpec_To_garden_SeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_SeedStatus_To_garden_SeedStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_garden_Seed_To_v1alpha1_Seed(in *garden.Seed, out *Seed, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_SeedSpec_To_v1alpha1_SeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_garden_SeedStatus_To_v1alpha1_SeedStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_SeedBackup_To_garden_SeedBackup(in *SeedBackup, out *garden.SeedBackup, s conversion.Scope) error { + out.Provider = garden.CloudProvider(in.Provider) + out.Region = (*string)(unsafe.Pointer(in.Region)) + out.SecretRef = in.SecretRef + return nil +} + +// Convert_v1alpha1_SeedBackup_To_garden_SeedBackup is an autogenerated conversion function. +func Convert_v1alpha1_SeedBackup_To_garden_SeedBackup(in *SeedBackup, out *garden.SeedBackup, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedBackup_To_garden_SeedBackup(in, out, s) +} + +func autoConvert_garden_SeedBackup_To_v1alpha1_SeedBackup(in *garden.SeedBackup, out *SeedBackup, s conversion.Scope) error { + out.Provider = string(in.Provider) + out.Region = (*string)(unsafe.Pointer(in.Region)) + out.SecretRef = in.SecretRef + return nil +} + +// Convert_garden_SeedBackup_To_v1alpha1_SeedBackup is an autogenerated conversion function. +func Convert_garden_SeedBackup_To_v1alpha1_SeedBackup(in *garden.SeedBackup, out *SeedBackup, s conversion.Scope) error { + return autoConvert_garden_SeedBackup_To_v1alpha1_SeedBackup(in, out, s) +} + +func autoConvert_v1alpha1_SeedList_To_garden_SeedList(in *SeedList, out *garden.SeedList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.Seed, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_Seed_To_garden_Seed(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha1_SeedList_To_garden_SeedList is an autogenerated conversion function. +func Convert_v1alpha1_SeedList_To_garden_SeedList(in *SeedList, out *garden.SeedList, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedList_To_garden_SeedList(in, out, s) +} + +func autoConvert_garden_SeedList_To_v1alpha1_SeedList(in *garden.SeedList, out *SeedList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Seed, len(*in)) + for i := range *in { + if err := Convert_garden_Seed_To_v1alpha1_Seed(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_SeedList_To_v1alpha1_SeedList is an autogenerated conversion function. +func Convert_garden_SeedList_To_v1alpha1_SeedList(in *garden.SeedList, out *SeedList, s conversion.Scope) error { + return autoConvert_garden_SeedList_To_v1alpha1_SeedList(in, out, s) +} + +func autoConvert_v1alpha1_SeedNetworks_To_garden_SeedNetworks(in *SeedNetworks, out *garden.SeedNetworks, s conversion.Scope) error { + out.Nodes = in.Nodes + out.Pods = in.Pods + out.Services = in.Services + out.ShootDefaults = (*garden.ShootNetworks)(unsafe.Pointer(in.ShootDefaults)) + return nil +} + +func autoConvert_garden_SeedNetworks_To_v1alpha1_SeedNetworks(in *garden.SeedNetworks, out *SeedNetworks, s conversion.Scope) error { + out.Nodes = in.Nodes + out.Pods = in.Pods + out.Services = in.Services + out.ShootDefaults = (*ShootNetworks)(unsafe.Pointer(in.ShootDefaults)) + // WARNING: in.BlockCIDRs requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha1_SeedProvider_To_garden_SeedProvider(in *SeedProvider, out *garden.SeedProvider, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_v1alpha1_SeedProvider_To_garden_SeedProvider is an autogenerated conversion function. +func Convert_v1alpha1_SeedProvider_To_garden_SeedProvider(in *SeedProvider, out *garden.SeedProvider, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedProvider_To_garden_SeedProvider(in, out, s) +} + +func autoConvert_garden_SeedProvider_To_v1alpha1_SeedProvider(in *garden.SeedProvider, out *SeedProvider, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_garden_SeedProvider_To_v1alpha1_SeedProvider is an autogenerated conversion function. +func Convert_garden_SeedProvider_To_v1alpha1_SeedProvider(in *garden.SeedProvider, out *SeedProvider, s conversion.Scope) error { + return autoConvert_garden_SeedProvider_To_v1alpha1_SeedProvider(in, out, s) +} + +func autoConvert_v1alpha1_SeedSpec_To_garden_SeedSpec(in *SeedSpec, out *garden.SeedSpec, s conversion.Scope) error { + out.Backup = (*garden.SeedBackup)(unsafe.Pointer(in.Backup)) + // WARNING: in.BlockCIDRs requires manual conversion: does not exist in peer-type + // WARNING: in.DNS requires manual conversion: does not exist in peer-type + if err := Convert_v1alpha1_SeedNetworks_To_garden_SeedNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if err := Convert_v1alpha1_SeedProvider_To_garden_SeedProvider(&in.Provider, &out.Provider, s); err != nil { + return err + } + out.SecretRef = (*v1.SecretReference)(unsafe.Pointer(in.SecretRef)) + out.Taints = *(*[]garden.SeedTaint)(unsafe.Pointer(&in.Taints)) + out.Volume = (*garden.SeedVolume)(unsafe.Pointer(in.Volume)) + return nil +} + +func autoConvert_garden_SeedSpec_To_v1alpha1_SeedSpec(in *garden.SeedSpec, out *SeedSpec, s conversion.Scope) error { + // WARNING: in.Cloud requires manual conversion: does not exist in peer-type + if err := Convert_garden_SeedProvider_To_v1alpha1_SeedProvider(&in.Provider, &out.Provider, s); err != nil { + return err + } + // WARNING: in.IngressDomain requires manual conversion: does not exist in peer-type + out.SecretRef = (*v1.SecretReference)(unsafe.Pointer(in.SecretRef)) + if err := Convert_garden_SeedNetworks_To_v1alpha1_SeedNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + out.Taints = *(*[]SeedTaint)(unsafe.Pointer(&in.Taints)) + out.Backup = (*SeedBackup)(unsafe.Pointer(in.Backup)) + out.Volume = (*SeedVolume)(unsafe.Pointer(in.Volume)) + return nil +} + +func autoConvert_v1alpha1_SeedStatus_To_garden_SeedStatus(in *SeedStatus, out *garden.SeedStatus, s conversion.Scope) error { + out.Conditions = *(*[]garden.Condition)(unsafe.Pointer(&in.Conditions)) + out.Gardener = (*garden.Gardener)(unsafe.Pointer(in.Gardener)) + out.KubernetesVersion = (*string)(unsafe.Pointer(in.KubernetesVersion)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_v1alpha1_SeedStatus_To_garden_SeedStatus is an autogenerated conversion function. +func Convert_v1alpha1_SeedStatus_To_garden_SeedStatus(in *SeedStatus, out *garden.SeedStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedStatus_To_garden_SeedStatus(in, out, s) +} + +func autoConvert_garden_SeedStatus_To_v1alpha1_SeedStatus(in *garden.SeedStatus, out *SeedStatus, s conversion.Scope) error { + out.Conditions = *(*[]Condition)(unsafe.Pointer(&in.Conditions)) + out.Gardener = (*Gardener)(unsafe.Pointer(in.Gardener)) + out.KubernetesVersion = (*string)(unsafe.Pointer(in.KubernetesVersion)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_garden_SeedStatus_To_v1alpha1_SeedStatus is an autogenerated conversion function. +func Convert_garden_SeedStatus_To_v1alpha1_SeedStatus(in *garden.SeedStatus, out *SeedStatus, s conversion.Scope) error { + return autoConvert_garden_SeedStatus_To_v1alpha1_SeedStatus(in, out, s) +} + +func autoConvert_v1alpha1_SeedTaint_To_garden_SeedTaint(in *SeedTaint, out *garden.SeedTaint, s conversion.Scope) error { + out.Key = in.Key + out.Value = (*string)(unsafe.Pointer(in.Value)) + return nil +} + +// Convert_v1alpha1_SeedTaint_To_garden_SeedTaint is an autogenerated conversion function. +func Convert_v1alpha1_SeedTaint_To_garden_SeedTaint(in *SeedTaint, out *garden.SeedTaint, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedTaint_To_garden_SeedTaint(in, out, s) +} + +func autoConvert_garden_SeedTaint_To_v1alpha1_SeedTaint(in *garden.SeedTaint, out *SeedTaint, s conversion.Scope) error { + out.Key = in.Key + out.Value = (*string)(unsafe.Pointer(in.Value)) + return nil +} + +// Convert_garden_SeedTaint_To_v1alpha1_SeedTaint is an autogenerated conversion function. +func Convert_garden_SeedTaint_To_v1alpha1_SeedTaint(in *garden.SeedTaint, out *SeedTaint, s conversion.Scope) error { + return autoConvert_garden_SeedTaint_To_v1alpha1_SeedTaint(in, out, s) +} + +func autoConvert_v1alpha1_SeedVolume_To_garden_SeedVolume(in *SeedVolume, out *garden.SeedVolume, s conversion.Scope) error { + out.MinimumSize = (*resource.Quantity)(unsafe.Pointer(in.MinimumSize)) + out.Providers = *(*[]garden.SeedVolumeProvider)(unsafe.Pointer(&in.Providers)) + return nil +} + +// Convert_v1alpha1_SeedVolume_To_garden_SeedVolume is an autogenerated conversion function. +func Convert_v1alpha1_SeedVolume_To_garden_SeedVolume(in *SeedVolume, out *garden.SeedVolume, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedVolume_To_garden_SeedVolume(in, out, s) +} + +func autoConvert_garden_SeedVolume_To_v1alpha1_SeedVolume(in *garden.SeedVolume, out *SeedVolume, s conversion.Scope) error { + out.MinimumSize = (*resource.Quantity)(unsafe.Pointer(in.MinimumSize)) + out.Providers = *(*[]SeedVolumeProvider)(unsafe.Pointer(&in.Providers)) + return nil +} + +// Convert_garden_SeedVolume_To_v1alpha1_SeedVolume is an autogenerated conversion function. +func Convert_garden_SeedVolume_To_v1alpha1_SeedVolume(in *garden.SeedVolume, out *SeedVolume, s conversion.Scope) error { + return autoConvert_garden_SeedVolume_To_v1alpha1_SeedVolume(in, out, s) +} + +func autoConvert_v1alpha1_SeedVolumeProvider_To_garden_SeedVolumeProvider(in *SeedVolumeProvider, out *garden.SeedVolumeProvider, s conversion.Scope) error { + out.Purpose = in.Purpose + out.Name = in.Name + return nil +} + +// Convert_v1alpha1_SeedVolumeProvider_To_garden_SeedVolumeProvider is an autogenerated conversion function. +func Convert_v1alpha1_SeedVolumeProvider_To_garden_SeedVolumeProvider(in *SeedVolumeProvider, out *garden.SeedVolumeProvider, s conversion.Scope) error { + return autoConvert_v1alpha1_SeedVolumeProvider_To_garden_SeedVolumeProvider(in, out, s) +} + +func autoConvert_garden_SeedVolumeProvider_To_v1alpha1_SeedVolumeProvider(in *garden.SeedVolumeProvider, out *SeedVolumeProvider, s conversion.Scope) error { + out.Purpose = in.Purpose + out.Name = in.Name + return nil +} + +// Convert_garden_SeedVolumeProvider_To_v1alpha1_SeedVolumeProvider is an autogenerated conversion function. +func Convert_garden_SeedVolumeProvider_To_v1alpha1_SeedVolumeProvider(in *garden.SeedVolumeProvider, out *SeedVolumeProvider, s conversion.Scope) error { + return autoConvert_garden_SeedVolumeProvider_To_v1alpha1_SeedVolumeProvider(in, out, s) +} + +func autoConvert_v1alpha1_ServiceAccountConfig_To_garden_ServiceAccountConfig(in *ServiceAccountConfig, out *garden.ServiceAccountConfig, s conversion.Scope) error { + out.Issuer = (*string)(unsafe.Pointer(in.Issuer)) + out.SigningKeySecret = (*v1.LocalObjectReference)(unsafe.Pointer(in.SigningKeySecret)) + return nil +} + +// Convert_v1alpha1_ServiceAccountConfig_To_garden_ServiceAccountConfig is an autogenerated conversion function. +func Convert_v1alpha1_ServiceAccountConfig_To_garden_ServiceAccountConfig(in *ServiceAccountConfig, out *garden.ServiceAccountConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_ServiceAccountConfig_To_garden_ServiceAccountConfig(in, out, s) +} + +func autoConvert_garden_ServiceAccountConfig_To_v1alpha1_ServiceAccountConfig(in *garden.ServiceAccountConfig, out *ServiceAccountConfig, s conversion.Scope) error { + out.Issuer = (*string)(unsafe.Pointer(in.Issuer)) + out.SigningKeySecret = (*v1.LocalObjectReference)(unsafe.Pointer(in.SigningKeySecret)) + return nil +} + +// Convert_garden_ServiceAccountConfig_To_v1alpha1_ServiceAccountConfig is an autogenerated conversion function. +func Convert_garden_ServiceAccountConfig_To_v1alpha1_ServiceAccountConfig(in *garden.ServiceAccountConfig, out *ServiceAccountConfig, s conversion.Scope) error { + return autoConvert_garden_ServiceAccountConfig_To_v1alpha1_ServiceAccountConfig(in, out, s) +} + +func autoConvert_v1alpha1_Shoot_To_garden_Shoot(in *Shoot, out *garden.Shoot, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_ShootSpec_To_garden_ShootSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_ShootStatus_To_garden_ShootStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_garden_Shoot_To_v1alpha1_Shoot(in *garden.Shoot, out *Shoot, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_ShootSpec_To_v1alpha1_ShootSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_garden_ShootStatus_To_v1alpha1_ShootStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_ShootList_To_garden_ShootList(in *ShootList, out *garden.ShootList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.Shoot, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_Shoot_To_garden_Shoot(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha1_ShootList_To_garden_ShootList is an autogenerated conversion function. +func Convert_v1alpha1_ShootList_To_garden_ShootList(in *ShootList, out *garden.ShootList, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootList_To_garden_ShootList(in, out, s) +} + +func autoConvert_garden_ShootList_To_v1alpha1_ShootList(in *garden.ShootList, out *ShootList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Shoot, len(*in)) + for i := range *in { + if err := Convert_garden_Shoot_To_v1alpha1_Shoot(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_ShootList_To_v1alpha1_ShootList is an autogenerated conversion function. +func Convert_garden_ShootList_To_v1alpha1_ShootList(in *garden.ShootList, out *ShootList, s conversion.Scope) error { + return autoConvert_garden_ShootList_To_v1alpha1_ShootList(in, out, s) +} + +func autoConvert_v1alpha1_ShootMachineImage_To_garden_ShootMachineImage(in *ShootMachineImage, out *garden.ShootMachineImage, s conversion.Scope) error { + out.Name = in.Name + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Version = in.Version + return nil +} + +// Convert_v1alpha1_ShootMachineImage_To_garden_ShootMachineImage is an autogenerated conversion function. +func Convert_v1alpha1_ShootMachineImage_To_garden_ShootMachineImage(in *ShootMachineImage, out *garden.ShootMachineImage, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootMachineImage_To_garden_ShootMachineImage(in, out, s) +} + +func autoConvert_garden_ShootMachineImage_To_v1alpha1_ShootMachineImage(in *garden.ShootMachineImage, out *ShootMachineImage, s conversion.Scope) error { + out.Name = in.Name + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Version = in.Version + return nil +} + +// Convert_garden_ShootMachineImage_To_v1alpha1_ShootMachineImage is an autogenerated conversion function. +func Convert_garden_ShootMachineImage_To_v1alpha1_ShootMachineImage(in *garden.ShootMachineImage, out *ShootMachineImage, s conversion.Scope) error { + return autoConvert_garden_ShootMachineImage_To_v1alpha1_ShootMachineImage(in, out, s) +} + +func autoConvert_v1alpha1_ShootNetworks_To_garden_ShootNetworks(in *ShootNetworks, out *garden.ShootNetworks, s conversion.Scope) error { + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_v1alpha1_ShootNetworks_To_garden_ShootNetworks is an autogenerated conversion function. +func Convert_v1alpha1_ShootNetworks_To_garden_ShootNetworks(in *ShootNetworks, out *garden.ShootNetworks, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootNetworks_To_garden_ShootNetworks(in, out, s) +} + +func autoConvert_garden_ShootNetworks_To_v1alpha1_ShootNetworks(in *garden.ShootNetworks, out *ShootNetworks, s conversion.Scope) error { + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_garden_ShootNetworks_To_v1alpha1_ShootNetworks is an autogenerated conversion function. +func Convert_garden_ShootNetworks_To_v1alpha1_ShootNetworks(in *garden.ShootNetworks, out *ShootNetworks, s conversion.Scope) error { + return autoConvert_garden_ShootNetworks_To_v1alpha1_ShootNetworks(in, out, s) +} + +func autoConvert_v1alpha1_ShootSpec_To_garden_ShootSpec(in *ShootSpec, out *garden.ShootSpec, s conversion.Scope) error { + if in.Addons != nil { + in, out := &in.Addons, &out.Addons + *out = new(garden.Addons) + if err := Convert_v1alpha1_Addons_To_garden_Addons(*in, *out, s); err != nil { + return err + } + } else { + out.Addons = nil + } + out.CloudProfileName = in.CloudProfileName + out.DNS = (*garden.DNS)(unsafe.Pointer(in.DNS)) + out.Extensions = *(*[]garden.Extension)(unsafe.Pointer(&in.Extensions)) + out.Hibernation = (*garden.Hibernation)(unsafe.Pointer(in.Hibernation)) + if err := Convert_v1alpha1_Kubernetes_To_garden_Kubernetes(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if err := Convert_v1alpha1_Networking_To_garden_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + if in.Maintenance != nil { + in, out := &in.Maintenance, &out.Maintenance + *out = new(garden.Maintenance) + if err := Convert_v1alpha1_Maintenance_To_garden_Maintenance(*in, *out, s); err != nil { + return err + } + } else { + out.Maintenance = nil + } + out.Monitoring = (*garden.Monitoring)(unsafe.Pointer(in.Monitoring)) + if err := Convert_v1alpha1_Provider_To_garden_Provider(&in.Provider, &out.Provider, s); err != nil { + return err + } + out.Region = in.Region + out.SecretBindingName = in.SecretBindingName + out.SeedName = (*string)(unsafe.Pointer(in.SeedName)) + return nil +} + +func autoConvert_garden_ShootSpec_To_v1alpha1_ShootSpec(in *garden.ShootSpec, out *ShootSpec, s conversion.Scope) error { + if in.Addons != nil { + in, out := &in.Addons, &out.Addons + *out = new(Addons) + if err := Convert_garden_Addons_To_v1alpha1_Addons(*in, *out, s); err != nil { + return err + } + } else { + out.Addons = nil + } + // WARNING: in.Cloud requires manual conversion: does not exist in peer-type + out.CloudProfileName = in.CloudProfileName + out.DNS = (*DNS)(unsafe.Pointer(in.DNS)) + out.Extensions = *(*[]Extension)(unsafe.Pointer(&in.Extensions)) + out.Hibernation = (*Hibernation)(unsafe.Pointer(in.Hibernation)) + if err := Convert_garden_Kubernetes_To_v1alpha1_Kubernetes(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if err := Convert_garden_Networking_To_v1alpha1_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + if in.Maintenance != nil { + in, out := &in.Maintenance, &out.Maintenance + *out = new(Maintenance) + if err := Convert_garden_Maintenance_To_v1alpha1_Maintenance(*in, *out, s); err != nil { + return err + } + } else { + out.Maintenance = nil + } + out.Monitoring = (*Monitoring)(unsafe.Pointer(in.Monitoring)) + if err := Convert_garden_Provider_To_v1alpha1_Provider(&in.Provider, &out.Provider, s); err != nil { + return err + } + out.Region = in.Region + out.SecretBindingName = in.SecretBindingName + out.SeedName = (*string)(unsafe.Pointer(in.SeedName)) + return nil +} + +func autoConvert_v1alpha1_ShootState_To_core_ShootState(in *ShootState, out *core.ShootState, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_ShootStateSpec_To_core_ShootStateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ShootState_To_core_ShootState is an autogenerated conversion function. +func Convert_v1alpha1_ShootState_To_core_ShootState(in *ShootState, out *core.ShootState, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootState_To_core_ShootState(in, out, s) +} + +func autoConvert_core_ShootState_To_v1alpha1_ShootState(in *core.ShootState, out *ShootState, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_ShootStateSpec_To_v1alpha1_ShootStateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_core_ShootState_To_v1alpha1_ShootState is an autogenerated conversion function. +func Convert_core_ShootState_To_v1alpha1_ShootState(in *core.ShootState, out *ShootState, s conversion.Scope) error { + return autoConvert_core_ShootState_To_v1alpha1_ShootState(in, out, s) +} + +func autoConvert_v1alpha1_ShootStateList_To_core_ShootStateList(in *ShootStateList, out *core.ShootStateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]core.ShootState)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_ShootStateList_To_core_ShootStateList is an autogenerated conversion function. +func Convert_v1alpha1_ShootStateList_To_core_ShootStateList(in *ShootStateList, out *core.ShootStateList, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootStateList_To_core_ShootStateList(in, out, s) +} + +func autoConvert_core_ShootStateList_To_v1alpha1_ShootStateList(in *core.ShootStateList, out *ShootStateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ShootState)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_core_ShootStateList_To_v1alpha1_ShootStateList is an autogenerated conversion function. +func Convert_core_ShootStateList_To_v1alpha1_ShootStateList(in *core.ShootStateList, out *ShootStateList, s conversion.Scope) error { + return autoConvert_core_ShootStateList_To_v1alpha1_ShootStateList(in, out, s) +} + +func autoConvert_v1alpha1_ShootStateSpec_To_core_ShootStateSpec(in *ShootStateSpec, out *core.ShootStateSpec, s conversion.Scope) error { + out.Gardener = *(*[]core.GardenerResourceData)(unsafe.Pointer(&in.Gardener)) + out.Extensions = *(*[]core.ExtensionResourceState)(unsafe.Pointer(&in.Extensions)) + return nil +} + +// Convert_v1alpha1_ShootStateSpec_To_core_ShootStateSpec is an autogenerated conversion function. +func Convert_v1alpha1_ShootStateSpec_To_core_ShootStateSpec(in *ShootStateSpec, out *core.ShootStateSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_ShootStateSpec_To_core_ShootStateSpec(in, out, s) +} + +func autoConvert_core_ShootStateSpec_To_v1alpha1_ShootStateSpec(in *core.ShootStateSpec, out *ShootStateSpec, s conversion.Scope) error { + out.Gardener = *(*[]GardenerResourceData)(unsafe.Pointer(&in.Gardener)) + out.Extensions = *(*[]ExtensionResourceState)(unsafe.Pointer(&in.Extensions)) + return nil +} + +// Convert_core_ShootStateSpec_To_v1alpha1_ShootStateSpec is an autogenerated conversion function. +func Convert_core_ShootStateSpec_To_v1alpha1_ShootStateSpec(in *core.ShootStateSpec, out *ShootStateSpec, s conversion.Scope) error { + return autoConvert_core_ShootStateSpec_To_v1alpha1_ShootStateSpec(in, out, s) +} + +func autoConvert_v1alpha1_ShootStatus_To_garden_ShootStatus(in *ShootStatus, out *garden.ShootStatus, s conversion.Scope) error { + out.Conditions = *(*[]garden.Condition)(unsafe.Pointer(&in.Conditions)) + out.Constraints = *(*[]garden.Condition)(unsafe.Pointer(&in.Constraints)) + if err := Convert_v1alpha1_Gardener_To_garden_Gardener(&in.Gardener, &out.Gardener, s); err != nil { + return err + } + if err := metav1.Convert_bool_To_Pointer_bool(&in.IsHibernated, &out.IsHibernated, s); err != nil { + return err + } + out.LastOperation = (*garden.LastOperation)(unsafe.Pointer(in.LastOperation)) + // WARNING: in.LastError requires manual conversion: does not exist in peer-type + out.LastErrors = *(*[]garden.LastError)(unsafe.Pointer(&in.LastErrors)) + out.ObservedGeneration = in.ObservedGeneration + out.RetryCycleStartTime = (*metav1.Time)(unsafe.Pointer(in.RetryCycleStartTime)) + // WARNING: in.Seed requires manual conversion: does not exist in peer-type + out.TechnicalID = in.TechnicalID + out.UID = types.UID(in.UID) + return nil +} + +func autoConvert_garden_ShootStatus_To_v1alpha1_ShootStatus(in *garden.ShootStatus, out *ShootStatus, s conversion.Scope) error { + out.Conditions = *(*[]Condition)(unsafe.Pointer(&in.Conditions)) + out.Constraints = *(*[]Condition)(unsafe.Pointer(&in.Constraints)) + if err := Convert_garden_Gardener_To_v1alpha1_Gardener(&in.Gardener, &out.Gardener, s); err != nil { + return err + } + out.LastOperation = (*LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastErrors = *(*[]LastError)(unsafe.Pointer(&in.LastErrors)) + out.ObservedGeneration = in.ObservedGeneration + out.RetryCycleStartTime = (*metav1.Time)(unsafe.Pointer(in.RetryCycleStartTime)) + // WARNING: in.SeedName requires manual conversion: does not exist in peer-type + if err := metav1.Convert_Pointer_bool_To_bool(&in.IsHibernated, &out.IsHibernated, s); err != nil { + return err + } + out.TechnicalID = in.TechnicalID + out.UID = types.UID(in.UID) + return nil +} + +func autoConvert_v1alpha1_Volume_To_garden_Volume(in *Volume, out *garden.Volume, s conversion.Scope) error { + out.Type = (*string)(unsafe.Pointer(in.Type)) + out.Size = in.Size + return nil +} + +// Convert_v1alpha1_Volume_To_garden_Volume is an autogenerated conversion function. +func Convert_v1alpha1_Volume_To_garden_Volume(in *Volume, out *garden.Volume, s conversion.Scope) error { + return autoConvert_v1alpha1_Volume_To_garden_Volume(in, out, s) +} + +func autoConvert_garden_Volume_To_v1alpha1_Volume(in *garden.Volume, out *Volume, s conversion.Scope) error { + out.Type = (*string)(unsafe.Pointer(in.Type)) + out.Size = in.Size + return nil +} + +// Convert_garden_Volume_To_v1alpha1_Volume is an autogenerated conversion function. +func Convert_garden_Volume_To_v1alpha1_Volume(in *garden.Volume, out *Volume, s conversion.Scope) error { + return autoConvert_garden_Volume_To_v1alpha1_Volume(in, out, s) +} + +func autoConvert_v1alpha1_VolumeType_To_garden_VolumeType(in *VolumeType, out *garden.VolumeType, s conversion.Scope) error { + out.Class = in.Class + out.Name = in.Name + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + return nil +} + +// Convert_v1alpha1_VolumeType_To_garden_VolumeType is an autogenerated conversion function. +func Convert_v1alpha1_VolumeType_To_garden_VolumeType(in *VolumeType, out *garden.VolumeType, s conversion.Scope) error { + return autoConvert_v1alpha1_VolumeType_To_garden_VolumeType(in, out, s) +} + +func autoConvert_garden_VolumeType_To_v1alpha1_VolumeType(in *garden.VolumeType, out *VolumeType, s conversion.Scope) error { + out.Name = in.Name + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + out.Class = in.Class + return nil +} + +// Convert_garden_VolumeType_To_v1alpha1_VolumeType is an autogenerated conversion function. +func Convert_garden_VolumeType_To_v1alpha1_VolumeType(in *garden.VolumeType, out *VolumeType, s conversion.Scope) error { + return autoConvert_garden_VolumeType_To_v1alpha1_VolumeType(in, out, s) +} + +func autoConvert_v1alpha1_Worker_To_garden_Worker(in *Worker, out *garden.Worker, s conversion.Scope) error { + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + if in.Kubernetes != nil { + in, out := &in.Kubernetes, &out.Kubernetes + *out = new(garden.WorkerKubernetes) + if err := Convert_v1alpha1_WorkerKubernetes_To_garden_WorkerKubernetes(*in, *out, s); err != nil { + return err + } + } else { + out.Kubernetes = nil + } + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Name = in.Name + if err := Convert_v1alpha1_Machine_To_garden_Machine(&in.Machine, &out.Machine, s); err != nil { + return err + } + out.Maximum = int(in.Maximum) + out.Minimum = int(in.Minimum) + out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) + out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) + out.Volume = (*garden.Volume)(unsafe.Pointer(in.Volume)) + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1alpha1_Worker_To_garden_Worker is an autogenerated conversion function. +func Convert_v1alpha1_Worker_To_garden_Worker(in *Worker, out *garden.Worker, s conversion.Scope) error { + return autoConvert_v1alpha1_Worker_To_garden_Worker(in, out, s) +} + +func autoConvert_garden_Worker_To_v1alpha1_Worker(in *garden.Worker, out *Worker, s conversion.Scope) error { + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + if in.Kubernetes != nil { + in, out := &in.Kubernetes, &out.Kubernetes + *out = new(WorkerKubernetes) + if err := Convert_garden_WorkerKubernetes_To_v1alpha1_WorkerKubernetes(*in, *out, s); err != nil { + return err + } + } else { + out.Kubernetes = nil + } + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Name = in.Name + if err := Convert_garden_Machine_To_v1alpha1_Machine(&in.Machine, &out.Machine, s); err != nil { + return err + } + out.Maximum = int32(in.Maximum) + out.Minimum = int32(in.Minimum) + out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) + out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) + out.Volume = (*Volume)(unsafe.Pointer(in.Volume)) + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_Worker_To_v1alpha1_Worker is an autogenerated conversion function. +func Convert_garden_Worker_To_v1alpha1_Worker(in *garden.Worker, out *Worker, s conversion.Scope) error { + return autoConvert_garden_Worker_To_v1alpha1_Worker(in, out, s) +} + +func autoConvert_v1alpha1_WorkerKubernetes_To_garden_WorkerKubernetes(in *WorkerKubernetes, out *garden.WorkerKubernetes, s conversion.Scope) error { + if in.Kubelet != nil { + in, out := &in.Kubelet, &out.Kubelet + *out = new(garden.KubeletConfig) + if err := Convert_v1alpha1_KubeletConfig_To_garden_KubeletConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Kubelet = nil + } + return nil +} + +// Convert_v1alpha1_WorkerKubernetes_To_garden_WorkerKubernetes is an autogenerated conversion function. +func Convert_v1alpha1_WorkerKubernetes_To_garden_WorkerKubernetes(in *WorkerKubernetes, out *garden.WorkerKubernetes, s conversion.Scope) error { + return autoConvert_v1alpha1_WorkerKubernetes_To_garden_WorkerKubernetes(in, out, s) +} + +func autoConvert_garden_WorkerKubernetes_To_v1alpha1_WorkerKubernetes(in *garden.WorkerKubernetes, out *WorkerKubernetes, s conversion.Scope) error { + if in.Kubelet != nil { + in, out := &in.Kubelet, &out.Kubelet + *out = new(KubeletConfig) + if err := Convert_garden_KubeletConfig_To_v1alpha1_KubeletConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Kubelet = nil + } + return nil +} + +// Convert_garden_WorkerKubernetes_To_v1alpha1_WorkerKubernetes is an autogenerated conversion function. +func Convert_garden_WorkerKubernetes_To_v1alpha1_WorkerKubernetes(in *garden.WorkerKubernetes, out *WorkerKubernetes, s conversion.Scope) error { + return autoConvert_garden_WorkerKubernetes_To_v1alpha1_WorkerKubernetes(in, out, s) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.deepcopy.go index b3a974e85..796a8a573 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.deepcopy.go @@ -1026,6 +1026,28 @@ func (in *Extension) DeepCopy() *Extension { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtensionResourceState) DeepCopyInto(out *ExtensionResourceState) { + *out = *in + if in.Purpose != nil { + in, out := &in.Purpose, &out.Purpose + *out = new(string) + **out = **in + } + in.State.DeepCopyInto(&out.State) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionResourceState. +func (in *ExtensionResourceState) DeepCopy() *ExtensionResourceState { + if in == nil { + return nil + } + out := new(ExtensionResourceState) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Gardener) DeepCopyInto(out *Gardener) { *out = *in @@ -1058,6 +1080,29 @@ func (in *GardenerDuration) DeepCopy() *GardenerDuration { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenerResourceData) DeepCopyInto(out *GardenerResourceData) { + *out = *in + if in.Data != nil { + in, out := &in.Data, &out.Data + *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 GardenerResourceData. +func (in *GardenerResourceData) DeepCopy() *GardenerResourceData { + if in == nil { + return nil + } + out := new(GardenerResourceData) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Hibernation) DeepCopyInto(out *Hibernation) { *out = *in @@ -1878,6 +1923,11 @@ func (in *NginxIngress) DeepCopyInto(out *NginxIngress) { (*out)[key] = val } } + if in.ExternalTrafficPolicy != nil { + in, out := &in.ExternalTrafficPolicy, &out.ExternalTrafficPolicy + *out = new(v1.ServiceExternalTrafficPolicyType) + **out = **in + } return } @@ -2622,7 +2672,11 @@ func (in *SeedSpec) DeepCopyInto(out *SeedSpec) { out.DNS = in.DNS in.Networks.DeepCopyInto(&out.Networks) out.Provider = in.Provider - out.SecretRef = in.SecretRef + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(v1.SecretReference) + **out = **in + } if in.Taints != nil { in, out := &in.Taints, &out.Taints *out = make([]SeedTaint, len(*in)) @@ -2651,7 +2705,6 @@ func (in *SeedSpec) DeepCopy() *SeedSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SeedStatus) DeepCopyInto(out *SeedStatus) { *out = *in - out.Gardener = in.Gardener if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]Condition, len(*in)) @@ -2659,6 +2712,16 @@ func (in *SeedStatus) DeepCopyInto(out *SeedStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Gardener != nil { + in, out := &in.Gardener, &out.Gardener + *out = new(Gardener) + **out = **in + } + if in.KubernetesVersion != nil { + in, out := &in.KubernetesVersion, &out.KubernetesVersion + *out = new(string) + **out = **in + } return } @@ -2925,6 +2988,96 @@ func (in *ShootSpec) DeepCopy() *ShootSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootState) DeepCopyInto(out *ShootState) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootState. +func (in *ShootState) DeepCopy() *ShootState { + if in == nil { + return nil + } + out := new(ShootState) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ShootState) 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 *ShootStateList) DeepCopyInto(out *ShootStateList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ShootState, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootStateList. +func (in *ShootStateList) DeepCopy() *ShootStateList { + if in == nil { + return nil + } + out := new(ShootStateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ShootStateList) 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 *ShootStateSpec) DeepCopyInto(out *ShootStateSpec) { + *out = *in + if in.Gardener != nil { + in, out := &in.Gardener, &out.Gardener + *out = make([]GardenerResourceData, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make([]ExtensionResourceState, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootStateSpec. +func (in *ShootStateSpec) DeepCopy() *ShootStateSpec { + if in == nil { + return nil + } + out := new(ShootStateSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ShootStatus) DeepCopyInto(out *ShootStatus) { *out = *in @@ -2935,6 +3088,13 @@ func (in *ShootStatus) DeepCopyInto(out *ShootStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Constraints != nil { + in, out := &in.Constraints, &out.Constraints + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } out.Gardener = in.Gardener if in.LastOperation != nil { in, out := &in.LastOperation, &out.LastOperation diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.defaults.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.defaults.go index 3c89258d6..a650cdd97 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.defaults.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1alpha1/zz_generated.defaults.go @@ -65,6 +65,11 @@ func SetObjectDefaults_SecretBindingList(in *SecretBindingList) { func SetObjectDefaults_Shoot(in *Shoot) { SetDefaults_Shoot(in) + if in.Spec.Addons != nil { + if in.Spec.Addons.NginxIngress != nil { + SetDefaults_NginxIngress(in.Spec.Addons.NginxIngress) + } + } if in.Spec.Maintenance != nil { SetDefaults_Maintenance(in.Spec.Maintenance) } diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/constants/types_constants.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/constants/types_constants.go new file mode 100644 index 000000000..26aa30010 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/constants/types_constants.go @@ -0,0 +1,257 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 constants + +const ( + // SecretNameCACluster is a constant for the name of a Kubernetes secret object that contains the CA + // certificate of a shoot cluster. + SecretNameCACluster = "ca" + // SecretNameCAETCD is a constant for the name of a Kubernetes secret object that contains the CA + // certificate of the etcd of a shoot cluster. + SecretNameCAETCD = "ca-etcd" + // SecretNameCAFrontProxy is a constant for the name of a Kubernetes secret object that contains the CA + // certificate of the kube-aggregator a shoot cluster. + SecretNameCAFrontProxy = "ca-front-proxy" + // SecretNameCAKubelet is a constant for the name of a Kubernetes secret object that contains the CA + // certificate of the kubelet of a shoot cluster. + SecretNameCAKubelet = "ca-kubelet" + // SecretNameCAMetricsServer is a constant for the name of a Kubernetes secret object that contains the CA + // certificate of the metrics-server of a shoot cluster. + SecretNameCAMetricsServer = "ca-metrics-server" + // SecretNameCloudProvider is a constant for the name of a Kubernetes secret object that contains the provider + // specific credentials that shall be used to create/delete the shoot. + SecretNameCloudProvider = "cloudprovider" + // SecretNameSSHKeyPair is a constant for the name of a Kubernetes secret object that contains the SSH key pair + // (public and private key) that can be used to SSH into the shoot nodes. + SecretNameSSHKeyPair = "ssh-keypair" + + // SecretNameGardener is a constant for the name of a Kubernetes secret object that contains the client + // certificate and a kubeconfig for a shoot cluster. It is used by Gardener and can be used by extension + // controllers in order to communicate with the shoot's API server. The client certificate has administrator + // privileges. + SecretNameGardener = "gardener" + + // DeploymentNameClusterAutoscaler is a constant for the name of a Kubernetes deployment object that contains + // the cluster-autoscaler pod. + DeploymentNameClusterAutoscaler = "cluster-autoscaler" + // DeploymentNameDependencyWatchdog is a constant for the name of a Kubernetes deployment object that contains + // the dependency-watchdog pod. + DeploymentNameDependencyWatchdog = "dependency-watchdog" + // DeploymentNameKubeAPIServer is a constant for the name of a Kubernetes deployment object that contains + // the kube-apiserver pod. + DeploymentNameKubeAPIServer = "kube-apiserver" + // DeploymentNameKubeControllerManager is a constant for the name of a Kubernetes deployment object that contains + // the kube-controller-manager pod. + DeploymentNameKubeControllerManager = "kube-controller-manager" + + // DeploymentNameKubeScheduler is a constant for the name of a Kubernetes deployment object that contains + // the kube-scheduler pod. + DeploymentNameKubeScheduler = "kube-scheduler" + // DeploymentNameGardenerResourceManager is a constant for the name of a Kubernetes deployment object that contains + // the gardener-resource-manager pod. + DeploymentNameGardenerResourceManager = "gardener-resource-manager" + // DeploymentNameGrafanaOperators is a constant for the name of a Kubernetes deployment object that contains + // the grafana-operators pod. + DeploymentNameGrafanaOperators = "grafana-operators" + // DeploymentNameGrafanaUsers is a constant for the name of a Kubernetes deployment object that contains + // the grafana-users pod. + DeploymentNameGrafanaUsers = "grafana-users" + // DeploymentNameKubeStateMetricsShoot is a constant for the name of a Kubernetes deployment object that contains + // the kube-state-metrics pod. + DeploymentNameKubeStateMetricsShoot = "kube-state-metrics" + // DeploymentNameKubeStateMetricsSeed is a constant for the name of a Kubernetes deployment object that contains + // the kube-state-metrics-seed pod. + DeploymentNameKubeStateMetricsSeed = "kube-state-metrics-seed" + // DeploymentNameKibana is a constant for the name of a Kubernetes deployment object that contains + // the kibana-logging pod. + DeploymentNameKibana = "kibana-logging" + + // StatefulSetNameAlertManager is a constant for the name of a Kubernetes stateful set object that contains + // the alertmanager pod. + StatefulSetNameAlertManager = "alertmanager" + // StatefulSetNameETCDMain is a constant for the name of a Kubernetes stateful set object that contains + // the etcd-main pod. + StatefulSetNameETCDMain = "etcd-main" + // StatefulSetNameETCDEvents is a constant for the name of a Kubernetes stateful set object that contains + // the etcd-events pod. + StatefulSetNameETCDEvents = "etcd-events" + // StatefulSetNameElasticSearch is a constant for the name of a Kubernetes stateful set object that contains + // the elasticsearch-logging pod. + StatefulSetNameElasticSearch = "elasticsearch-logging" + // StatefulSetNamePrometheus is a constant for the name of a Kubernetes stateful set object that contains + // the prometheus pod. + StatefulSetNamePrometheus = "prometheus" + + // GardenPurpose is a constant for the key in a label describing the purpose of the respective object. + GardenPurpose = "garden.sapcloud.io/purpose" + // GardenerPurpose is a constant for the key in a label describing the purpose of the respective object. + GardenerPurpose = "gardener.cloud/purpose" + // GardenPurposeMachineClass is a constant for the 'machineclass' value in a label. + GardenPurposeMachineClass = "machineclass" + + // GardenerOperation is a constant for an annotation on a resource that describes a desired operation. + GardenerOperation = "gardener.cloud/operation" + // GardenerOperationReconcile is a constant for the value of the operation annotation describing a reconcile + // operation. + GardenerOperationReconcile = "reconcile" + // GardenerOperationMigrate is a constant for the value of the operation annotation describing a migration + // operation. + GardenerOperationMigrate = "migrate" + + // DeprecatedGardenRole is the key for an annotation on a Kubernetes object indicating what it is used for. + // +deprecated + DeprecatedGardenRole = "garden.sapcloud.io/role" + // GardenRole is a constant for a label that describes a role. + GardenRole = "gardener.cloud/role" + // GardenRoleExtension is a constant for a label that describes the 'extensions' role. + GardenRoleExtension = "extension" + // GardenRoleSeed is the value of the GardenRole key indicating type 'seed'. + GardenRoleSeed = "seed" + // GardenRoleShoot is the value of the GardenRole key indicating type 'shoot'. + GardenRoleShoot = "shoot" + // GardenRoleLogging is the value of the GardenRole key indicating type 'logging'. + GardenRoleLogging = "logging" + // GardenRoleProject is the value of GardenRole key indicating type 'project'. + GardenRoleProject = "project" + // GardenRoleControlPlane is the value of the GardenRole key indicating type 'controlplane'. + GardenRoleControlPlane = "controlplane" + // GardenRoleSystemComponent is the value of the GardenRole key indicating type 'system-component'. + GardenRoleSystemComponent = "system-component" + // GardenRoleMonitoring is the value of the GardenRole key indicating type 'monitoring'. + GardenRoleMonitoring = "monitoring" + // GardenRoleOptionalAddon is the value of the GardenRole key indicating type 'optional-addon'. + GardenRoleOptionalAddon = "optional-addon" + + // DeprecatedShootHibernated is a constant for a label on the Shoot namespace in the Seed indicating the Shoot's hibernation status. + // +deprecated: Use `Cluster` resource instead. + DeprecatedShootHibernated = "shoot.garden.sapcloud.io/hibernated" + // DeprecatedShootUID is an annotation key for the shoot namespace in the seed cluster, + // which value will be the value of `shoot.status.uid` + // +deprecated: Use `Cluster` resource instead. + DeprecatedShootUID = "shoot.garden.sapcloud.io/uid" + // DeprecatedGardenRoleBackup is the value of GardenRole key indicating type 'backup'. + // +deprecated + DeprecatedGardenRoleBackup = "backup" + + // SeedResourceManagerClass is the resource-class managed by the Gardener-Resource-Manager + // instance in the garden namespace on the seeds. + SeedResourceManagerClass = "seed" + // LabelBackupProvider is used to identify the backup provider. + LabelBackupProvider = "backup.gardener.cloud/provider" + // LabelSeedProvider is used to identify the seed provider. + LabelSeedProvider = "seed.gardener.cloud/provider" + // LabelShootProvider is used to identify the shoot provider. + LabelShootProvider = "shoot.gardener.cloud/provider" + // LabelNetworkingProvider is used to identify the networking provider for the cni plugin. + LabelNetworkingProvider = "networking.shoot.gardener.cloud/provider" + // LabelExtensionConfiguration is used to identify the provider's configuration which will be added to Gardener configuration + LabelExtensionConfiguration = "extensions.gardener.cloud/configuration" + // LabelLogging is a constant for a label for logging stack configurations + LabelLogging = "logging" + // LabelMonitoring is a constant for a label for monitoring stack configurations + LabelMonitoring = "monitoring" + + // LabelNetworkPolicyToBlockedCIDRs allows Egress from pods labeled with 'networking.gardener.cloud/to-blocked-cidrs=allowed'. + LabelNetworkPolicyToBlockedCIDRs = "networking.gardener.cloud/to-blocked-cidrs" + // LabelNetworkPolicyToDNS allows Egress from pods labeled with 'networking.gardener.cloud/to-dns=allowed' to DNS running in 'kube-system'. + // In practice, most of the Pods which require network Egress need this label. + LabelNetworkPolicyToDNS = "networking.gardener.cloud/to-dns" + // LabelNetworkPolicyToPrivateNetworks allows Egress from pods labeled with 'networking.gardener.cloud/to-private-networks=allowed' to the + // private networks (RFC1918), Carrier-grade NAT (RFC6598) except for cloudProvider's specific metadata service IP, seed networks, + // shoot networks. + LabelNetworkPolicyToPrivateNetworks = "networking.gardener.cloud/to-private-networks" + // LabelNetworkPolicyToPublicNetworks allows Egress from pods labeled with 'networking.gardener.cloud/to-public-networks=allowed' to all public + // network IPs, except for private networks (RFC1918), carrier-grade NAT (RFC6598), cloudProvider's specific metadata service IP. + // In practice, this blocks Egress traffic to all networks in the Seed cluster and only traffic to public IPv4 addresses. + LabelNetworkPolicyToPublicNetworks = "networking.gardener.cloud/to-public-networks" + // LabelNetworkPolicyToSeedAPIServer allows Egress from pods labeled with 'networking.gardener.cloud/to-seed-apiserver=allowed' to Seed's Kubernetes + // API Server. + LabelNetworkPolicyToSeedAPIServer = "networking.gardener.cloud/to-seed-apiserver" + // LabelNetworkPolicyToShootAPIServer allows Egress from pods labeled with 'networking.gardener.cloud/to-shoot-apiserver=allowed' to talk to Shoot's + // Kubernetes API Server. + LabelNetworkPolicyToShootAPIServer = "networking.gardener.cloud/to-shoot-apiserver" + // LabelNetworkPolicyToAll disables all Ingress and Egress traffic into/from this namespace when set to "disallowed". + LabelNetworkPolicyToAll = "networking.gardener.cloud/to-all" + // LabelNetworkPolicyToElasticSearch allows Ingress to the ElasticSearch API pods labeled with 'networking.gardener.cloud/to-elasticsearch=allowed', + // and fluentd in 'garden' namespace. + LabelNetworkPolicyToElasticSearch = "networking.gardener.cloud/to-elasticsearch" + // LabelNetworkPolicyFromPrometheus allows Ingress from Prometheus to pods labeled with 'networking.gardener.cloud/from-prometheus=allowed' and ports + // named 'metrics' in the PodSpecification. + LabelNetworkPolicyFromPrometheus = "networking.gardener.cloud/from-prometheus" + // LabelNetworkPolicyAllowed is a constant for allowing a network policy. + LabelNetworkPolicyAllowed = "allowed" + // LabelNetworkPolicyDisallowed is a constant for disallowing a network policy. + LabelNetworkPolicyDisallowed = "disallowed" + + // LabelApp is a constant for a label key. + LabelApp = "app" + // LabelRole is a constant for a label key. + LabelRole = "role" + // LabelKubernetes is a constant for a label for Kubernetes workload. + LabelKubernetes = "kubernetes" + // LabelAPIServer is a constant for a label for the kube-apiserver. + LabelAPIServer = "apiserver" + // LabelControllerManager is a constant for a label for the kube-controller-manager. + LabelControllerManager = "controller-manager" + // LabelScheduler is a constant for a label for the kube-scheduler. + LabelScheduler = "scheduler" + + // GardenNamespace is the namespace in which the configuration and secrets for + // the Gardener controller manager will be stored (e.g., secrets for the Seed clusters). + // It is also used by the gardener-apiserver. + GardenNamespace = "garden" + + // AnnotationShootUseAsSeed is a constant for an annotation on a Shoot resource indicating that the Shoot shall be registered as Seed in the + // Garden cluster once successfully created. + AnnotationShootUseAsSeed = "shoot.garden.sapcloud.io/use-as-seed" + // AnnotationShootIgnoreAlerts is the key for an annotation of a Shoot cluster whose value indicates + // if alerts for this cluster should be ignored + AnnotationShootIgnoreAlerts = "shoot.garden.sapcloud.io/ignore-alerts" + // AnnotationShootOperatedBy is the key for an annotation of a Shoot cluster whose value must be a valid email address and + // is used to send alerts to. + AnnotationShootOperatedBy = "garden.sapcloud.io/operatedBy" + // AnnotationShootCustom is such a prefix so that the shoot namespace in the seed cluster + // will be annotated with the annotations of the shoot resource starting with it. + // For example, if the shoot is annotated with key=value, + // then the namespace in the seed will be annotated with key=value, as well. + AnnotationShootCustom = "custom.shoot.sapcloud.io/" + + // OperatingSystemConfigUnitNameKubeletService is a constant for a unit in the operating system config that contains the kubelet service. + OperatingSystemConfigUnitNameKubeletService = "kubelet.service" + // OperatingSystemConfigFilePathKernelSettings is a constant for a path to a file in the operating system config that contains some general kernel settings. + OperatingSystemConfigFilePathKernelSettings = "/etc/sysctl.d/99-k8s-general.conf" + // OperatingSystemConfigFilePathKubeletConfig is a constant for a path to a file in the operating system config that contains the kubelet configuration. + OperatingSystemConfigFilePathKubeletConfig = "/var/lib/kubelet/config/kubelet" + + // FluentBitConfigMapKubernetesFilter is a constant for the Fluent Bit ConfigMap's section regarding Kubernetes filters + FluentBitConfigMapKubernetesFilter = "filter-kubernetes.conf" + // FluentBitConfigMapParser is a constant for the Fluent Bit ConfigMap's section regarding Parsers for common container types + FluentBitConfigMapParser = "parsers.conf" + // PrometheusConfigMapAlertingRules is a constant for the Prometheus alerting rules tag in provider-specific monitoring configuration + PrometheusConfigMapAlertingRules = "alerting_rules" + // PrometheusConfigMapScrapeConfig is a constant for the Prometheus scrape config tag in provider-specific monitoring configuration + PrometheusConfigMapScrapeConfig = "scrape_config" + // GrafanaConfigMapUserDashboard is a constant for the Grafana user dashboard tag in provider-specific monitoring configuration + GrafanaConfigMapUserDashboard = "dashboard_users" + // GrafanaConfigMapOperatorDashboard is a constant for the Grafana operator dashboard tag in provider-specific monitoring configuration + GrafanaConfigMapOperatorDashboard = "dashboard_operators" + + // LabelControllerRegistrationName is the key of a label on extension namespaces that indicates the controller registration name. + LabelControllerRegistrationName = "controllerregistration.core.gardener.cloud/name" + + // EventResourceReferenced indicates that the resource deletion is in waiting mode because the resource is still + // being referenced by at least one other resource (e.g. a SecretBinding is still referenced by a Shoot) + EventResourceReferenced = "ResourceReferenced" +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/conversions.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/conversions.go new file mode 100644 index 000000000..3bf44e7e0 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/conversions.go @@ -0,0 +1,1723 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + "encoding/json" + "fmt" + "strings" + + "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" + "github.com/gardener/gardener/pkg/apis/garden" + "github.com/gardener/gardener/pkg/utils" + + alicloudinstall "github.com/gardener/gardener-extensions/controllers/provider-alicloud/pkg/apis/alicloud/install" + alicloudv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-alicloud/pkg/apis/alicloud/v1alpha1" + awsinstall "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws/install" + awsv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws/v1alpha1" + azureinstall "github.com/gardener/gardener-extensions/controllers/provider-azure/pkg/apis/azure/install" + azurev1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-azure/pkg/apis/azure/v1alpha1" + gcpinstall "github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/apis/gcp/install" + gcpv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/apis/gcp/v1alpha1" + openstackinstall "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack/install" + openstackv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/klog" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + if err := scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("Shoot"), + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", "metadata.namespace", garden.ShootSeedName, garden.ShootCloudProfileName: + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ); err != nil { + return err + } + + // Add non-generated conversion functions + return scheme.AddConversionFuncs( + Convert_v1beta1_Seed_To_garden_Seed, + Convert_garden_Seed_To_v1beta1_Seed, + Convert_v1beta1_CloudProfile_To_garden_CloudProfile, + Convert_garden_CloudProfile_To_v1beta1_CloudProfile, + ) +} + +func Convert_v1beta1_Seed_To_garden_Seed(in *Seed, out *garden.Seed, s conversion.Scope) error { + if err := autoConvert_v1beta1_Seed_To_garden_Seed(in, out, s); err != nil { + return err + } + + if a := in.Annotations; a != nil { + if v, ok := a[garden.MigrationSeedCloudProfile]; ok { + out.Spec.Cloud.Profile = v + } + + if v, ok := a[garden.MigrationSeedCloudRegion]; ok { + out.Spec.Cloud.Region = v + } + } + + out.Spec.IngressDomain = in.Spec.DNS.IngressDomain + out.Spec.Cloud.Region = in.Spec.Provider.Region + + return nil +} + +func Convert_garden_Seed_To_v1beta1_Seed(in *garden.Seed, out *Seed, s conversion.Scope) error { + if err := autoConvert_garden_Seed_To_v1beta1_Seed(in, out, s); err != nil { + return err + } + + if len(in.Spec.Cloud.Profile) > 0 || len(in.Spec.Cloud.Region) > 0 || in.Spec.Volume != nil { + old := out.Annotations + out.Annotations = make(map[string]string, len(old)+2) + for k, v := range old { + if k != "persistentvolume.garden.sapcloud.io/provider" && k != "persistentvolume.garden.sapcloud.io/minimumSize" { + out.Annotations[k] = v + } + } + } + + if len(in.Spec.Cloud.Profile) > 0 { + out.Annotations[garden.MigrationSeedCloudProfile] = in.Spec.Cloud.Profile + } + + if len(in.Spec.Cloud.Region) > 0 { + out.Annotations[garden.MigrationSeedCloudRegion] = in.Spec.Cloud.Region + } + + if len(in.Spec.IngressDomain) > 0 { + out.Spec.DNS = SeedDNS{ + IngressDomain: in.Spec.IngressDomain, + } + } + + return nil +} + +func Convert_garden_SeedSpec_To_v1beta1_SeedSpec(in *garden.SeedSpec, out *SeedSpec, s conversion.Scope) error { + return autoConvert_garden_SeedSpec_To_v1beta1_SeedSpec(in, out, s) +} + +func Convert_v1beta1_SeedSpec_To_garden_SeedSpec(in *SeedSpec, out *garden.SeedSpec, s conversion.Scope) error { + return autoConvert_v1beta1_SeedSpec_To_garden_SeedSpec(in, out, s) +} + +func Convert_v1beta1_ProjectSpec_To_garden_ProjectSpec(in *ProjectSpec, out *garden.ProjectSpec, s conversion.Scope) error { + if err := autoConvert_v1beta1_ProjectSpec_To_garden_ProjectSpec(in, out, s); err != nil { + return err + } + + for _, member := range in.Members { + out.ProjectMembers = append(out.ProjectMembers, garden.ProjectMember{ + Subject: member.Subject, + Role: member.Role, + }) + } + + return nil +} + +func Convert_garden_ProjectSpec_To_v1beta1_ProjectSpec(in *garden.ProjectSpec, out *ProjectSpec, s conversion.Scope) error { + if err := autoConvert_garden_ProjectSpec_To_v1beta1_ProjectSpec(in, out, s); err != nil { + return err + } + + for _, member := range in.ProjectMembers { + out.Members = append(out.Members, ProjectMember{ + Subject: member.Subject, + Role: member.Role, + }) + } + + return nil +} + +func Convert_v1beta1_CloudProfile_To_garden_CloudProfile(in *CloudProfile, out *garden.CloudProfile, s conversion.Scope) error { + if err := autoConvert_v1beta1_CloudProfile_To_garden_CloudProfile(in, out, s); err != nil { + return err + } + + if out.Annotations == nil { + out.Annotations = make(map[string]string) + } + + switch in.Spec.Type { + case "aws": + if out.Spec.AWS == nil { + out.Spec.AWS = &garden.AWSProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.AWS.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.AWS.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.AWS.Constraints.Kubernetes.OfferedVersions = append(out.Spec.AWS.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.AWS.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.AWS.Constraints.MachineImages = append(out.Spec.AWS.Constraints.MachineImages, m) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !machineTypesHaveName(out.Spec.AWS.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := autoConvert_v1beta1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.AWS.Constraints.MachineTypes = append(out.Spec.AWS.Constraints.MachineTypes, o) + } + } + + for _, volumeType := range in.Spec.VolumeTypes { + if !volumeTypesHaveName(out.Spec.AWS.Constraints.VolumeTypes, volumeType.Name) { + var o garden.VolumeType + if err := autoConvert_v1beta1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.AWS.Constraints.VolumeTypes = append(out.Spec.AWS.Constraints.VolumeTypes, o) + } + } + + for _, region := range in.Spec.Regions { + if !zonesHaveName(out.Spec.AWS.Constraints.Zones, region.Name) { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + } + out.Spec.AWS.Constraints.Zones = append(out.Spec.AWS.Constraints.Zones, z) + } + } + + case "azure": + if out.Spec.Azure == nil { + out.Spec.Azure = &garden.AzureProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.Azure.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.Azure.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.Azure.Constraints.Kubernetes.OfferedVersions = append(out.Spec.Azure.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.Azure.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.Azure.Constraints.MachineImages = append(out.Spec.Azure.Constraints.MachineImages, m) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !machineTypesHaveName(out.Spec.Azure.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := autoConvert_v1beta1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.Azure.Constraints.MachineTypes = append(out.Spec.Azure.Constraints.MachineTypes, o) + } + } + + for _, volumeType := range in.Spec.VolumeTypes { + if !volumeTypesHaveName(out.Spec.Azure.Constraints.VolumeTypes, volumeType.Name) { + var o garden.VolumeType + if err := autoConvert_v1beta1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.Azure.Constraints.VolumeTypes = append(out.Spec.Azure.Constraints.VolumeTypes, o) + } + } + + for _, region := range in.Spec.Regions { + if !zonesHaveName(out.Spec.Azure.Constraints.Zones, region.Name) { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + } + out.Spec.Azure.Constraints.Zones = append(out.Spec.Azure.Constraints.Zones, z) + } + } + cloudProfileConfig := &azurev1alpha1.CloudProfileConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: azurev1alpha1.SchemeGroupVersion.String(), + Kind: "CloudProfileConfig", + }, + } + if in.Spec.ProviderConfig != nil { + extensionsScheme := runtime.NewScheme() + if err := azureinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + switch { + case in.Spec.ProviderConfig.Object != nil: + var ok bool + cloudProfileConfig, ok = in.Spec.ProviderConfig.Object.(*azurev1alpha1.CloudProfileConfig) + if !ok { + klog.Errorf("Cannot cast providerConfig of core.gardener.cloud/v1beta1.CloudProfile %s", in.Name) + } + case in.Spec.ProviderConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.ProviderConfig.Raw, nil, cloudProfileConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode providerConfig of core.gardener.cloud/v1beta1.CloudProfile %s", in.Name) + } + } + } + for _, c := range cloudProfileConfig.CountFaultDomains { + if !domainCountsHaveRegion(out.Spec.Azure.CountFaultDomains, c.Region) { + out.Spec.Azure.CountFaultDomains = append(out.Spec.Azure.CountFaultDomains, garden.AzureDomainCount{ + Region: c.Region, + Count: c.Count, + }) + } + } + for _, c := range cloudProfileConfig.CountUpdateDomains { + if !domainCountsHaveRegion(out.Spec.Azure.CountUpdateDomains, c.Region) { + out.Spec.Azure.CountUpdateDomains = append(out.Spec.Azure.CountUpdateDomains, garden.AzureDomainCount{ + Region: c.Region, + Count: c.Count, + }) + } + } + + case "gcp": + if out.Spec.GCP == nil { + out.Spec.GCP = &garden.GCPProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.GCP.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.GCP.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.GCP.Constraints.Kubernetes.OfferedVersions = append(out.Spec.GCP.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.GCP.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.GCP.Constraints.MachineImages = append(out.Spec.GCP.Constraints.MachineImages, m) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !machineTypesHaveName(out.Spec.GCP.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := autoConvert_v1beta1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.GCP.Constraints.MachineTypes = append(out.Spec.GCP.Constraints.MachineTypes, o) + } + } + + for _, volumeType := range in.Spec.VolumeTypes { + if !volumeTypesHaveName(out.Spec.GCP.Constraints.VolumeTypes, volumeType.Name) { + var o garden.VolumeType + if err := autoConvert_v1beta1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.GCP.Constraints.VolumeTypes = append(out.Spec.GCP.Constraints.VolumeTypes, o) + } + } + + for _, region := range in.Spec.Regions { + if !zonesHaveName(out.Spec.GCP.Constraints.Zones, region.Name) { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + } + out.Spec.GCP.Constraints.Zones = append(out.Spec.GCP.Constraints.Zones, z) + } + } + + case "openstack": + if out.Spec.OpenStack == nil { + out.Spec.OpenStack = &garden.OpenStackProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.OpenStack.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.OpenStack.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.OpenStack.Constraints.Kubernetes.OfferedVersions = append(out.Spec.OpenStack.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.OpenStack.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.OpenStack.Constraints.MachineImages = append(out.Spec.OpenStack.Constraints.MachineImages, m) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !openStackMachineTypesHaveName(out.Spec.OpenStack.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := Convert_v1beta1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + t := garden.OpenStackMachineType{MachineType: o} + if machineType.Storage != nil { + t.Storage = &garden.MachineTypeStorage{ + Class: machineType.Storage.Class, + Size: machineType.Storage.Size, + Type: machineType.Storage.Type, + } + t.VolumeSize = machineType.Storage.Size + t.VolumeType = machineType.Storage.Type + } + out.Spec.OpenStack.Constraints.MachineTypes = append(out.Spec.OpenStack.Constraints.MachineTypes, t) + } + } + + for _, region := range in.Spec.Regions { + if !zonesHaveName(out.Spec.OpenStack.Constraints.Zones, region.Name) { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + } + out.Spec.OpenStack.Constraints.Zones = append(out.Spec.OpenStack.Constraints.Zones, z) + } + } + + cloudProfileConfig := &openstackv1alpha1.CloudProfileConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: openstackv1alpha1.SchemeGroupVersion.String(), + Kind: "CloudProfileConfig", + }, + } + if in.Spec.ProviderConfig != nil { + extensionsScheme := runtime.NewScheme() + if err := openstackinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + switch { + case in.Spec.ProviderConfig.Object != nil: + var ok bool + cloudProfileConfig, ok = in.Spec.ProviderConfig.Object.(*openstackv1alpha1.CloudProfileConfig) + if !ok { + klog.Errorf("Cannot cast providerConfig of core.gardener.cloud/v1beta1.CloudProfile %s", in.Name) + } + case in.Spec.ProviderConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.ProviderConfig.Raw, nil, cloudProfileConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode providerConfig of core.gardener.cloud/v1beta1.CloudProfile %s", in.Name) + } + } + } + for _, p := range cloudProfileConfig.Constraints.LoadBalancerProviders { + if !loadBalancerProvidersHaveName(out.Spec.OpenStack.Constraints.LoadBalancerProviders, p.Name) { + out.Spec.OpenStack.Constraints.LoadBalancerProviders = append(out.Spec.OpenStack.Constraints.LoadBalancerProviders, garden.OpenStackLoadBalancerProvider{ + Name: p.Name, + }) + } + } + for _, p := range cloudProfileConfig.Constraints.FloatingPools { + if !floatingPoolsHavePool(out.Spec.OpenStack.Constraints.FloatingPools, p.Name) { + f := garden.OpenStackFloatingPool{ + Name: p.Name, + } + for _, c := range p.LoadBalancerClasses { + f.LoadBalancerClasses = append(f.LoadBalancerClasses, garden.OpenStackLoadBalancerClass{ + Name: c.Name, + FloatingSubnetID: c.FloatingSubnetID, + FloatingNetworkID: c.FloatingNetworkID, + SubnetID: c.SubnetID, + }) + } + out.Spec.OpenStack.Constraints.FloatingPools = append(out.Spec.OpenStack.Constraints.FloatingPools, f) + } + } + out.Spec.OpenStack.DNSServers = cloudProfileConfig.DNSServers + out.Spec.OpenStack.DHCPDomain = cloudProfileConfig.DHCPDomain + out.Spec.OpenStack.KeyStoneURL = cloudProfileConfig.KeyStoneURL + out.Spec.OpenStack.RequestTimeout = cloudProfileConfig.RequestTimeout + + case "alicloud": + if out.Spec.Alicloud == nil { + out.Spec.Alicloud = &garden.AlicloudProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.Alicloud.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.Alicloud.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.Alicloud.Constraints.Kubernetes.OfferedVersions = append(out.Spec.Alicloud.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.Alicloud.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.Alicloud.Constraints.MachineImages = append(out.Spec.Alicloud.Constraints.MachineImages, m) + } + } + + allZones := sets.NewString() + unavailableMachineTypesPerZone := map[string][]string{} + unavailableVolumeTypesPerZone := map[string][]string{} + for _, region := range in.Spec.Regions { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + allZones.Insert(zones.Name) + for _, t := range zones.UnavailableMachineTypes { + unavailableMachineTypesPerZone[zones.Name] = append(unavailableMachineTypesPerZone[zones.Name], t) + } + for _, t := range zones.UnavailableVolumeTypes { + unavailableVolumeTypesPerZone[zones.Name] = append(unavailableVolumeTypesPerZone[zones.Name], t) + } + } + if !zonesHaveName(out.Spec.Alicloud.Constraints.Zones, region.Name) { + out.Spec.Alicloud.Constraints.Zones = append(out.Spec.Alicloud.Constraints.Zones, z) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !alicloudMachineTypesHaveName(out.Spec.Alicloud.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := Convert_v1beta1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + var zones []string + for _, zone := range allZones.List() { + if !zoneHaveAlicloudType(unavailableMachineTypesPerZone, zone, machineType.Name) { + zones = append(zones, zone) + } + } + out.Spec.Alicloud.Constraints.MachineTypes = append(out.Spec.Alicloud.Constraints.MachineTypes, garden.AlicloudMachineType{ + MachineType: o, + Zones: zones, + }) + } + } + + for _, volumeType := range in.Spec.VolumeTypes { + if !alicloudVolumeTypesHaveName(out.Spec.Alicloud.Constraints.VolumeTypes, volumeType.Name) { + var o garden.VolumeType + if err := Convert_v1beta1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + var zones []string + for _, zone := range allZones.List() { + if !zoneHaveAlicloudType(unavailableVolumeTypesPerZone, zone, volumeType.Name) { + zones = append(zones, zone) + } + } + out.Spec.Alicloud.Constraints.VolumeTypes = append(out.Spec.Alicloud.Constraints.VolumeTypes, garden.AlicloudVolumeType{ + VolumeType: o, + Zones: zones, + }) + } + } + + case "packet": + if out.Spec.Packet == nil { + out.Spec.Packet = &garden.PacketProfile{} + } + + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + out.Spec.Packet.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + for _, version := range in.Spec.Kubernetes.Versions { + if !offeredVersionsHaveVersion(out.Spec.Packet.Constraints.Kubernetes.OfferedVersions, version.Version) { + out.Spec.Packet.Constraints.Kubernetes.OfferedVersions = append(out.Spec.Packet.Constraints.Kubernetes.OfferedVersions, garden.KubernetesVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + + for _, machineImage := range in.Spec.MachineImages { + if !machineImagesHaveImage(out.Spec.Packet.Constraints.MachineImages, machineImage.Name) { + m := garden.MachineImage{Name: machineImage.Name} + for _, version := range machineImage.Versions { + m.Versions = append(m.Versions, garden.MachineImageVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + out.Spec.Packet.Constraints.MachineImages = append(out.Spec.Packet.Constraints.MachineImages, m) + } + } + + for _, machineType := range in.Spec.MachineTypes { + if !machineTypesHaveName(out.Spec.Packet.Constraints.MachineTypes, machineType.Name) { + var o garden.MachineType + if err := autoConvert_v1beta1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.Packet.Constraints.MachineTypes = append(out.Spec.Packet.Constraints.MachineTypes, o) + } + } + + for _, volumeType := range in.Spec.VolumeTypes { + if !volumeTypesHaveName(out.Spec.Packet.Constraints.VolumeTypes, volumeType.Name) { + var o garden.VolumeType + if err := autoConvert_v1beta1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.Packet.Constraints.VolumeTypes = append(out.Spec.Packet.Constraints.VolumeTypes, o) + } + } + + for _, region := range in.Spec.Regions { + if !zonesHaveName(out.Spec.Packet.Constraints.Zones, region.Name) { + z := garden.Zone{Region: region.Name} + for _, zones := range region.Zones { + z.Names = append(z.Names, zones.Name) + } + out.Spec.Packet.Constraints.Zones = append(out.Spec.Packet.Constraints.Zones, z) + } + } + + default: + out.Annotations[garden.MigrationCloudProfileType] = in.Spec.Type + } + + if in.Spec.ProviderConfig != nil { + data, err := json.Marshal(in.Spec.ProviderConfig) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileProviderConfig] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileProviderConfig) + } + + if in.Spec.SeedSelector != nil { + data, err := json.Marshal(in.Spec.SeedSelector) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileSeedSelector] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileSeedSelector) + } + + return nil +} + +func Convert_garden_CloudProfile_To_v1beta1_CloudProfile(in *garden.CloudProfile, out *CloudProfile, s conversion.Scope) error { + if err := autoConvert_garden_CloudProfile_To_v1beta1_CloudProfile(in, out, s); err != nil { + return err + } + + switch { + case in.Spec.AWS != nil: + out.Spec.Type = "aws" + + if len(in.Spec.AWS.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.AWS.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + + case in.Spec.Azure != nil: + out.Spec.Type = "azure" + + if len(in.Spec.Azure.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.Azure.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + + case in.Spec.GCP != nil: + out.Spec.Type = "gcp" + + if len(in.Spec.GCP.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.GCP.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + + case in.Spec.OpenStack != nil: + out.Spec.Type = "openstack" + + if len(in.Spec.OpenStack.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.OpenStack.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + out.Spec.VolumeTypes = nil + + case in.Spec.Alicloud != nil: + out.Spec.Type = "alicloud" + + if len(in.Spec.Alicloud.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.Alicloud.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + + case in.Spec.Packet != nil: + out.Spec.Type = "packet" + + if len(in.Spec.Packet.Constraints.DNSProviders) > 0 { + out.Annotations[garden.MigrationCloudProfileDNSProviders] = strings.Join(dnsProviderConstraintToStringSlice(in.Spec.Packet.Constraints.DNSProviders), ",") + } else { + delete(out.Annotations, garden.MigrationCloudProfileDNSProviders) + } + } + + return nil +} + +func Convert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(in *CloudProfileSpec, out *garden.CloudProfileSpec, s conversion.Scope) error { + return autoConvert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(in, out, s) +} + +func Convert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(in *garden.CloudProfileSpec, out *CloudProfileSpec, s conversion.Scope) error { + return autoConvert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(in, out, s) +} + +func dnsProviderConstraintToStringSlice(dnsConstraints []garden.DNSProviderConstraint) []string { + out := make([]string, 0, len(dnsConstraints)) + for _, d := range dnsConstraints { + out = append(out, d.Name) + } + return out +} + +func stringSliceToDNSProviderConstraint(slice []string) []garden.DNSProviderConstraint { + dnsConstraints := make([]garden.DNSProviderConstraint, 0, len(slice)) + for _, s := range slice { + dnsConstraints = append(dnsConstraints, garden.DNSProviderConstraint{Name: s}) + } + return dnsConstraints +} + +func offeredVersionsHaveVersion(offeredVersions []garden.KubernetesVersion, version string) bool { + for _, v := range offeredVersions { + if v.Version == version { + return true + } + } + return false +} + +func machineImagesHaveImage(machineImages []garden.MachineImage, name string) bool { + for _, i := range machineImages { + if i.Name == name { + return true + } + } + return false +} + +func machineTypesHaveName(machineTypes []garden.MachineType, name string) bool { + for _, i := range machineTypes { + if i.Name == name { + return true + } + } + return false +} + +func volumeTypesHaveName(volumeTypes []garden.VolumeType, name string) bool { + for _, i := range volumeTypes { + if i.Name == name { + return true + } + } + return false +} + +func alicloudMachineTypesHaveName(machineTypes []garden.AlicloudMachineType, name string) bool { + for _, i := range machineTypes { + if i.Name == name { + return true + } + } + return false +} + +func alicloudVolumeTypesHaveName(volumeTypes []garden.AlicloudVolumeType, name string) bool { + for _, i := range volumeTypes { + if i.Name == name { + return true + } + } + return false +} + +func openStackMachineTypesHaveName(machineTypes []garden.OpenStackMachineType, name string) bool { + for _, i := range machineTypes { + if i.Name == name { + return true + } + } + return false +} + +func zonesHaveName(zones []garden.Zone, name string) bool { + for _, z := range zones { + if z.Region == name { + return true + } + } + return false +} + +func zoneHaveAlicloudType(typesPerZone map[string][]string, name, typeName string) bool { + types, ok := typesPerZone[name] + if !ok { + return false + } + + for _, t := range types { + if t == typeName { + return true + } + } + return false +} + +func domainCountsHaveRegion(domainCount []garden.AzureDomainCount, regionName string) bool { + for _, d := range domainCount { + if d.Region == regionName { + return true + } + } + return false +} + +func loadBalancerProvidersHaveName(providers []garden.OpenStackLoadBalancerProvider, providerName string) bool { + for _, d := range providers { + if d.Name == providerName { + return true + } + } + return false +} + +func floatingPoolsHavePool(pools []garden.OpenStackFloatingPool, poolName string) bool { + for _, d := range pools { + if d.Name == poolName { + return true + } + } + return false +} + +func Convert_v1beta1_Shoot_To_garden_Shoot(in *Shoot, out *garden.Shoot, s conversion.Scope) error { + if err := autoConvert_v1beta1_Shoot_To_garden_Shoot(in, out, s); err != nil { + return err + } + + var addonClusterAutoScaler *garden.AddonClusterAutoscaler + if data, ok := in.Annotations[garden.MigrationShootAddonsClusterAutoscaler]; ok { + addonClusterAutoScaler = &garden.AddonClusterAutoscaler{} + if err := json.Unmarshal([]byte(data), addonClusterAutoScaler); err != nil { + return err + } + } + out.Spec.Addons.ClusterAutoscaler = addonClusterAutoScaler + + var addonHeapster *garden.Heapster + if data, ok := in.Annotations[garden.MigrationShootAddonsHeapster]; ok { + addonHeapster = &garden.Heapster{} + if err := json.Unmarshal([]byte(data), addonHeapster); err != nil { + return err + } + } + out.Spec.Addons.Heapster = addonHeapster + + var addonKubeLego *garden.KubeLego + if data, ok := in.Annotations[garden.MigrationShootAddonsKubeLego]; ok { + addonKubeLego = &garden.KubeLego{} + if err := json.Unmarshal([]byte(data), addonKubeLego); err != nil { + return err + } + } + out.Spec.Addons.KubeLego = addonKubeLego + + var addonKube2IAM *garden.Kube2IAM + if data, ok := in.Annotations[garden.MigrationShootAddonsKube2IAM]; ok { + addonKube2IAM = &garden.Kube2IAM{} + if err := json.Unmarshal([]byte(data), addonKube2IAM); err != nil { + return err + } + } + out.Spec.Addons.Kube2IAM = addonKube2IAM + + var addonMonocular *garden.Monocular + if data, ok := in.Annotations[garden.MigrationShootAddonsMonocular]; ok { + addonMonocular = &garden.Monocular{} + if err := json.Unmarshal([]byte(data), addonMonocular); err != nil { + return err + } + } + out.Spec.Addons.Monocular = addonMonocular + + switch in.Spec.Provider.Type { + case "aws": + if out.Spec.Cloud.AWS == nil { + out.Spec.Cloud.AWS = &garden.AWSCloud{} + } + + extensionsScheme := runtime.NewScheme() + if err := awsinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + + infrastructureConfig := &awsv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: awsv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + if in.Spec.Provider.InfrastructureConfig != nil { + switch { + case in.Spec.Provider.InfrastructureConfig.Object != nil: + var ok bool + infrastructureConfig, ok = in.Spec.Provider.InfrastructureConfig.Object.(*awsv1alpha1.InfrastructureConfig) + if !ok { + klog.Errorf("Cannot cast infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + case in.Spec.Provider.InfrastructureConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.InfrastructureConfig.Raw, nil, infrastructureConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + } + } + + out.Spec.Cloud.AWS.Zones = nil + out.Spec.Cloud.AWS.Networks.Internal = nil + out.Spec.Cloud.AWS.Networks.Public = nil + out.Spec.Cloud.AWS.Networks.Workers = nil + for _, zone := range infrastructureConfig.Networks.Zones { + out.Spec.Cloud.AWS.Zones = append(out.Spec.Cloud.AWS.Zones, zone.Name) + out.Spec.Cloud.AWS.Networks.Internal = append(out.Spec.Cloud.AWS.Networks.Internal, zone.Internal) + out.Spec.Cloud.AWS.Networks.Public = append(out.Spec.Cloud.AWS.Networks.Public, zone.Public) + out.Spec.Cloud.AWS.Networks.Workers = append(out.Spec.Cloud.AWS.Networks.Workers, zone.Workers) + } + out.Spec.Cloud.AWS.Networks.VPC.CIDR = infrastructureConfig.Networks.VPC.CIDR + out.Spec.Cloud.AWS.Networks.VPC.ID = infrastructureConfig.Networks.VPC.ID + out.Spec.Cloud.AWS.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.AWS.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.AWS.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.AWS.MachineImage = &machineImage + } else { + out.Spec.Cloud.AWS.MachineImage = nil + } + + controlPlaneConfig := &awsv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: awsv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + if in.Spec.Provider.ControlPlaneConfig != nil { + switch { + case in.Spec.Provider.ControlPlaneConfig.Object != nil: + var ok bool + controlPlaneConfig, ok = in.Spec.Provider.ControlPlaneConfig.Object.(*awsv1alpha1.ControlPlaneConfig) + if !ok { + klog.Errorf("Cannot cast controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + case in.Spec.Provider.ControlPlaneConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.ControlPlaneConfig.Raw, nil, controlPlaneConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + } + } + + if controlPlaneConfig.CloudControllerManager == nil { + out.Spec.Kubernetes.CloudControllerManager = nil + } else { + out.Spec.Kubernetes.CloudControllerManager = &garden.CloudControllerManagerConfig{ + KubernetesConfig: garden.KubernetesConfig{ + FeatureGates: controlPlaneConfig.CloudControllerManager.FeatureGates, + }, + } + } + + out.Spec.Cloud.AWS.Workers = nil + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1beta1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.AWS.Workers = append(out.Spec.Cloud.AWS.Workers, o) + } + + case "azure": + if out.Spec.Cloud.Azure == nil { + out.Spec.Cloud.Azure = &garden.AzureCloud{} + } + + extensionsScheme := runtime.NewScheme() + if err := azureinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + + infrastructureConfig := &azurev1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: azurev1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + if in.Spec.Provider.InfrastructureConfig != nil { + switch { + case in.Spec.Provider.InfrastructureConfig.Object != nil: + var ok bool + infrastructureConfig, ok = in.Spec.Provider.InfrastructureConfig.Object.(*azurev1alpha1.InfrastructureConfig) + if !ok { + klog.Errorf("Cannot cast infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + case in.Spec.Provider.InfrastructureConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.InfrastructureConfig.Raw, nil, infrastructureConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + } + } + + out.Spec.Cloud.Azure.ResourceGroup = nil + if infrastructureConfig.ResourceGroup != nil { + out.Spec.Cloud.Azure.ResourceGroup = &garden.AzureResourceGroup{ + Name: infrastructureConfig.ResourceGroup.Name, + } + } + + out.Spec.Cloud.Azure.Networks.Workers = infrastructureConfig.Networks.Workers + out.Spec.Cloud.Azure.Networks.VNet.CIDR = infrastructureConfig.Networks.VNet.CIDR + out.Spec.Cloud.Azure.Networks.VNet.Name = infrastructureConfig.Networks.VNet.Name + out.Spec.Cloud.Azure.Networks.VNet.ResourceGroup = infrastructureConfig.Networks.VNet.ResourceGroup + out.Spec.Cloud.Azure.Networks.ServiceEndpoints = infrastructureConfig.Networks.ServiceEndpoints + out.Spec.Cloud.Azure.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.Azure.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.Azure.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.Azure.MachineImage = &machineImage + } else { + out.Spec.Cloud.Azure.MachineImage = nil + } + + controlPlaneConfig := &azurev1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: azurev1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + if in.Spec.Provider.ControlPlaneConfig != nil { + switch { + case in.Spec.Provider.ControlPlaneConfig.Object != nil: + var ok bool + controlPlaneConfig, ok = in.Spec.Provider.ControlPlaneConfig.Object.(*azurev1alpha1.ControlPlaneConfig) + if !ok { + klog.Errorf("Cannot cast controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + case in.Spec.Provider.ControlPlaneConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.ControlPlaneConfig.Raw, nil, controlPlaneConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + } + } + + if controlPlaneConfig.CloudControllerManager == nil { + out.Spec.Kubernetes.CloudControllerManager = nil + } else { + out.Spec.Kubernetes.CloudControllerManager = &garden.CloudControllerManagerConfig{ + KubernetesConfig: garden.KubernetesConfig{ + FeatureGates: controlPlaneConfig.CloudControllerManager.FeatureGates, + }, + } + } + + out.Spec.Cloud.Azure.Zones = nil + out.Spec.Cloud.Azure.Workers = nil + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1beta1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.Azure.Workers = append(out.Spec.Cloud.Azure.Workers, o) + out.Spec.Cloud.Azure.Zones = o.Zones + } + + case "gcp": + if out.Spec.Cloud.GCP == nil { + out.Spec.Cloud.GCP = &garden.GCPCloud{} + } + + extensionsScheme := runtime.NewScheme() + if err := gcpinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + + infrastructureConfig := &gcpv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: gcpv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + if in.Spec.Provider.InfrastructureConfig != nil { + switch { + case in.Spec.Provider.InfrastructureConfig.Object != nil: + var ok bool + infrastructureConfig, ok = in.Spec.Provider.InfrastructureConfig.Object.(*gcpv1alpha1.InfrastructureConfig) + if !ok { + klog.Errorf("Cannot cast infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + case in.Spec.Provider.InfrastructureConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.InfrastructureConfig.Raw, nil, infrastructureConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + } + } + + if infrastructureConfig.Networks.VPC != nil { + out.Spec.Cloud.GCP.Networks.VPC = &garden.GCPVPC{ + Name: infrastructureConfig.Networks.VPC.Name, + } + } + + out.Spec.Cloud.GCP.Networks.Internal = infrastructureConfig.Networks.Internal + out.Spec.Cloud.GCP.Networks.Workers = []string{infrastructureConfig.Networks.Worker} + out.Spec.Cloud.GCP.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.GCP.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.GCP.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.GCP.MachineImage = &machineImage + } else { + out.Spec.Cloud.GCP.MachineImage = nil + } + + controlPlaneConfig := &gcpv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: gcpv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + if in.Spec.Provider.ControlPlaneConfig != nil { + switch { + case in.Spec.Provider.ControlPlaneConfig.Object != nil: + var ok bool + controlPlaneConfig, ok = in.Spec.Provider.ControlPlaneConfig.Object.(*gcpv1alpha1.ControlPlaneConfig) + if !ok { + klog.Errorf("Cannot cast controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + case in.Spec.Provider.ControlPlaneConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.ControlPlaneConfig.Raw, nil, controlPlaneConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + } + } + + if controlPlaneConfig.CloudControllerManager == nil { + out.Spec.Kubernetes.CloudControllerManager = nil + } else { + out.Spec.Kubernetes.CloudControllerManager = &garden.CloudControllerManagerConfig{ + KubernetesConfig: garden.KubernetesConfig{ + FeatureGates: controlPlaneConfig.CloudControllerManager.FeatureGates, + }, + } + } + + out.Spec.Cloud.GCP.Workers = nil + zones := sets.NewString() + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1beta1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.GCP.Workers = append(out.Spec.Cloud.GCP.Workers, o) + zones.Insert(o.Zones...) + } + out.Spec.Cloud.GCP.Zones = zones.List() + + case "openstack": + if out.Spec.Cloud.OpenStack == nil { + out.Spec.Cloud.OpenStack = &garden.OpenStackCloud{} + } + + extensionsScheme := runtime.NewScheme() + if err := openstackinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + + infrastructureConfig := &openstackv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: openstackv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + if in.Spec.Provider.InfrastructureConfig != nil { + switch { + case in.Spec.Provider.InfrastructureConfig.Object != nil: + var ok bool + infrastructureConfig, ok = in.Spec.Provider.InfrastructureConfig.Object.(*openstackv1alpha1.InfrastructureConfig) + if !ok { + klog.Errorf("Cannot cast infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + case in.Spec.Provider.InfrastructureConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.InfrastructureConfig.Raw, nil, infrastructureConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + } + } + + if infrastructureConfig.Networks.Router != nil { + out.Spec.Cloud.OpenStack.Networks.Router = &garden.OpenStackRouter{ + ID: infrastructureConfig.Networks.Router.ID, + } + } + out.Spec.Cloud.OpenStack.FloatingPoolName = infrastructureConfig.FloatingPoolName + out.Spec.Cloud.OpenStack.Networks.Workers = []string{infrastructureConfig.Networks.Worker} + out.Spec.Cloud.OpenStack.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.OpenStack.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.OpenStack.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.OpenStack.MachineImage = &machineImage + } else { + out.Spec.Cloud.OpenStack.MachineImage = nil + } + + controlPlaneConfig := &openstackv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: openstackv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + if in.Spec.Provider.ControlPlaneConfig != nil { + switch { + case in.Spec.Provider.ControlPlaneConfig.Object != nil: + var ok bool + controlPlaneConfig, ok = in.Spec.Provider.ControlPlaneConfig.Object.(*openstackv1alpha1.ControlPlaneConfig) + if !ok { + klog.Errorf("Cannot cast controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + case in.Spec.Provider.ControlPlaneConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.ControlPlaneConfig.Raw, nil, controlPlaneConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + } + } + + if controlPlaneConfig.CloudControllerManager == nil { + out.Spec.Kubernetes.CloudControllerManager = nil + } else { + out.Spec.Kubernetes.CloudControllerManager = &garden.CloudControllerManagerConfig{ + KubernetesConfig: garden.KubernetesConfig{ + FeatureGates: controlPlaneConfig.CloudControllerManager.FeatureGates, + }, + } + } + + var loadBalancerClasses = make([]garden.OpenStackLoadBalancerClass, 0, len(controlPlaneConfig.LoadBalancerClasses)) + for _, loadBalancerClass := range controlPlaneConfig.LoadBalancerClasses { + loadBalancerClasses = append(loadBalancerClasses, garden.OpenStackLoadBalancerClass{ + Name: loadBalancerClass.Name, + FloatingSubnetID: loadBalancerClass.FloatingSubnetID, + FloatingNetworkID: loadBalancerClass.FloatingNetworkID, + SubnetID: loadBalancerClass.SubnetID, + }) + } + out.Spec.Cloud.OpenStack.LoadBalancerClasses = loadBalancerClasses + out.Spec.Cloud.OpenStack.LoadBalancerProvider = controlPlaneConfig.LoadBalancerProvider + + out.Spec.Cloud.OpenStack.Workers = nil + zones := sets.NewString() + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1beta1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.OpenStack.Workers = append(out.Spec.Cloud.OpenStack.Workers, o) + zones.Insert(o.Zones...) + } + out.Spec.Cloud.OpenStack.Zones = zones.List() + + case "alicloud": + if out.Spec.Cloud.Alicloud == nil { + out.Spec.Cloud.Alicloud = &garden.Alicloud{} + } + + extensionsScheme := runtime.NewScheme() + if err := alicloudinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + + infrastructureConfig := &alicloudv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: alicloudv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + if in.Spec.Provider.InfrastructureConfig != nil { + switch { + case in.Spec.Provider.InfrastructureConfig.Object != nil: + var ok bool + infrastructureConfig, ok = in.Spec.Provider.InfrastructureConfig.Object.(*alicloudv1alpha1.InfrastructureConfig) + if !ok { + klog.Errorf("Cannot cast infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + case in.Spec.Provider.InfrastructureConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.InfrastructureConfig.Raw, nil, infrastructureConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode infrastructureConfig of core.gardener.cloud.Shoot %s", in.Name) + } + } + } + + out.Spec.Cloud.Alicloud.Zones = nil + out.Spec.Cloud.Alicloud.Networks.Workers = nil + for _, zone := range infrastructureConfig.Networks.Zones { + out.Spec.Cloud.Alicloud.Zones = append(out.Spec.Cloud.Alicloud.Zones, zone.Name) + out.Spec.Cloud.Alicloud.Networks.Workers = append(out.Spec.Cloud.Alicloud.Networks.Workers, zone.Worker) + } + out.Spec.Cloud.Alicloud.Networks.VPC.CIDR = infrastructureConfig.Networks.VPC.CIDR + out.Spec.Cloud.Alicloud.Networks.VPC.ID = infrastructureConfig.Networks.VPC.ID + out.Spec.Cloud.Alicloud.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.Alicloud.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.Alicloud.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.Alicloud.MachineImage = &machineImage + } else { + out.Spec.Cloud.Alicloud.MachineImage = nil + } + + controlPlaneConfig := &alicloudv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: alicloudv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + if in.Spec.Provider.ControlPlaneConfig != nil { + switch { + case in.Spec.Provider.ControlPlaneConfig.Object != nil: + var ok bool + controlPlaneConfig, ok = in.Spec.Provider.ControlPlaneConfig.Object.(*alicloudv1alpha1.ControlPlaneConfig) + if !ok { + klog.Errorf("Cannot cast controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + case in.Spec.Provider.ControlPlaneConfig.Raw != nil: + if _, _, err := decoder.Decode(in.Spec.Provider.ControlPlaneConfig.Raw, nil, controlPlaneConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode controlPlaneConfig of garden.sapcloud.io.Shoot %s", in.Name) + } + } + } + + if controlPlaneConfig.CloudControllerManager == nil { + out.Spec.Kubernetes.CloudControllerManager = nil + } else { + out.Spec.Kubernetes.CloudControllerManager = &garden.CloudControllerManagerConfig{ + KubernetesConfig: garden.KubernetesConfig{ + FeatureGates: controlPlaneConfig.CloudControllerManager.FeatureGates, + }, + } + } + + out.Spec.Cloud.Alicloud.Workers = nil + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1beta1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.Alicloud.Workers = append(out.Spec.Cloud.Alicloud.Workers, o) + } + + case "packet": + if out.Spec.Cloud.Packet == nil { + out.Spec.Cloud.Packet = &garden.PacketCloud{} + } + + out.Spec.Cloud.Packet.Zones = nil + out.Spec.Cloud.Packet.Networks.Pods = in.Spec.Networking.Pods + out.Spec.Cloud.Packet.Networks.Services = in.Spec.Networking.Services + out.Spec.Cloud.Packet.Networks.Nodes = &in.Spec.Networking.Nodes + + if data, ok := in.Annotations[garden.MigrationShootGlobalMachineImage]; ok { + var machineImage garden.ShootMachineImage + if err := json.Unmarshal([]byte(data), &machineImage); err != nil { + return err + } + out.Spec.Cloud.Packet.MachineImage = &machineImage + } else { + out.Spec.Cloud.Packet.MachineImage = nil + } + + out.Spec.Cloud.Packet.Workers = nil + zones := sets.NewString() + for _, worker := range in.Spec.Provider.Workers { + var o garden.Worker + if err := autoConvert_v1beta1_Worker_To_garden_Worker(&worker, &o, s); err != nil { + return err + } + out.Spec.Cloud.Packet.Workers = append(out.Spec.Cloud.Packet.Workers, o) + zones.Insert(o.Zones...) + } + out.Spec.Cloud.Packet.Zones = zones.List() + + var cloudControllerManager *garden.CloudControllerManagerConfig + if data, ok := in.Annotations[garden.MigrationShootCloudControllerManager]; ok { + cloudControllerManager = &garden.CloudControllerManagerConfig{} + if err := json.Unmarshal([]byte(data), cloudControllerManager); err != nil { + return err + } + } + out.Spec.Kubernetes.CloudControllerManager = cloudControllerManager + } + + out.Spec.Cloud.Profile = in.Spec.CloudProfileName + out.Spec.Cloud.Region = in.Spec.Region + out.Spec.Cloud.SecretBindingRef.Name = in.Spec.SecretBindingName + out.Spec.Cloud.Seed = in.Spec.SeedName + + return nil +} + +func Convert_garden_Shoot_To_v1beta1_Shoot(in *garden.Shoot, out *Shoot, s conversion.Scope) error { + if err := autoConvert_garden_Shoot_To_v1beta1_Shoot(in, out, s); err != nil { + return err + } + + var addons *Addons + if in.Spec.Addons != nil { + addons = &Addons{} + if err := autoConvert_garden_Addons_To_v1beta1_Addons(in.Spec.Addons, addons, s); err != nil { + return err + } + + if in.Spec.Addons.ClusterAutoscaler != nil { + data, err := json.Marshal(in.Spec.Addons.ClusterAutoscaler) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootAddonsClusterAutoscaler, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootAddonsClusterAutoscaler) + } + if in.Spec.Addons.Heapster != nil { + data, err := json.Marshal(in.Spec.Addons.Heapster) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootAddonsHeapster, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootAddonsHeapster) + } + if in.Spec.Addons.Kube2IAM != nil { + data, err := json.Marshal(in.Spec.Addons.Kube2IAM) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootAddonsKube2IAM, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootAddonsKube2IAM) + } + if in.Spec.Addons.KubeLego != nil { + data, err := json.Marshal(in.Spec.Addons.KubeLego) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootAddonsKubeLego, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootAddonsKubeLego) + } + if in.Spec.Addons.Monocular != nil { + data, err := json.Marshal(in.Spec.Addons.Monocular) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootAddonsMonocular, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootAddonsMonocular) + } + } + + out.Spec.CloudProfileName = in.Spec.Cloud.Profile + out.Spec.Region = in.Spec.Cloud.Region + out.Spec.SecretBindingName = in.Spec.Cloud.SecretBindingRef.Name + out.Spec.SeedName = in.Spec.Cloud.Seed + + if email, ok := in.Annotations[constants.AnnotationShootOperatedBy]; ok && utils.TestEmail(email) { + exists := false + if in.Spec.Monitoring == nil { + out.Spec.Monitoring = &Monitoring{ + Alerting: &Alerting{}, + } + } + if in.Spec.Monitoring != nil && in.Spec.Monitoring.Alerting == nil { + out.Spec.Monitoring.Alerting = &Alerting{} + } + if in.Spec.Monitoring != nil && in.Spec.Monitoring.Alerting != nil { + for _, receiver := range in.Spec.Monitoring.Alerting.EmailReceivers { + if receiver == email { + exists = true + break + } + } + } + if !exists { + out.Spec.Monitoring.Alerting.EmailReceivers = append(out.Spec.Monitoring.Alerting.EmailReceivers, email) + } + // Always delete annotation (Either email gets appended to emailReceivers or email already exists). + delete(out.Annotations, constants.AnnotationShootOperatedBy) + } + + switch in.Spec.Provider.Type { + case "aws": + if in.Spec.Cloud.AWS != nil && in.Spec.Cloud.AWS.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.AWS.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + case "azure": + if in.Spec.Cloud.Azure != nil && in.Spec.Cloud.Azure.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.Azure.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + case "gcp": + if in.Spec.Cloud.GCP != nil && in.Spec.Cloud.GCP.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.GCP.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + case "openstack": + if in.Spec.Cloud.OpenStack != nil && in.Spec.Cloud.OpenStack.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.OpenStack.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + case "alicloud": + if in.Spec.Cloud.Alicloud != nil && in.Spec.Cloud.Alicloud.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.Alicloud.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + case "packet": + if in.Spec.Cloud.Packet != nil && in.Spec.Cloud.Packet.MachineImage != nil { + data, err := json.Marshal(in.Spec.Cloud.Packet.MachineImage) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootGlobalMachineImage, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootGlobalMachineImage) + } + + if in.Spec.Kubernetes.CloudControllerManager != nil { + data, err := json.Marshal(in.Spec.Kubernetes.CloudControllerManager) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootCloudControllerManager, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootCloudControllerManager) + } + } + + return nil +} + +func Convert_garden_ShootSpec_To_v1beta1_ShootSpec(in *garden.ShootSpec, out *ShootSpec, s conversion.Scope) error { + return autoConvert_garden_ShootSpec_To_v1beta1_ShootSpec(in, out, s) +} + +func Convert_v1beta1_ShootSpec_To_garden_ShootSpec(in *ShootSpec, out *garden.ShootSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ShootSpec_To_garden_ShootSpec(in, out, s) +} + +func Convert_garden_ShootStatus_To_v1beta1_ShootStatus(in *garden.ShootStatus, out *ShootStatus, s conversion.Scope) error { + if err := autoConvert_garden_ShootStatus_To_v1beta1_ShootStatus(in, out, s); err != nil { + return err + } + + if in.IsHibernated == nil { + out.IsHibernated = false + } else { + out.IsHibernated = *in.IsHibernated + } + + return nil +} + +func Convert_v1beta1_ShootStatus_To_garden_ShootStatus(in *ShootStatus, out *garden.ShootStatus, s conversion.Scope) error { + if err := autoConvert_v1beta1_ShootStatus_To_garden_ShootStatus(in, out, s); err != nil { + return err + } + + out.IsHibernated = &in.IsHibernated + + return nil +} + +func Convert_garden_Addons_To_v1beta1_Addons(in *garden.Addons, out *Addons, s conversion.Scope) error { + return autoConvert_garden_Addons_To_v1beta1_Addons(in, out, s) +} + +func Convert_v1beta1_Addons_To_garden_Addons(in *Addons, out *garden.Addons, s conversion.Scope) error { + return autoConvert_v1beta1_Addons_To_garden_Addons(in, out, s) +} + +func Convert_garden_Kubernetes_To_v1beta1_Kubernetes(in *garden.Kubernetes, out *Kubernetes, s conversion.Scope) error { + return autoConvert_garden_Kubernetes_To_v1beta1_Kubernetes(in, out, s) +} + +func Convert_v1beta1_Kubernetes_To_garden_Kubernetes(in *Kubernetes, out *garden.Kubernetes, s conversion.Scope) error { + return autoConvert_v1beta1_Kubernetes_To_garden_Kubernetes(in, out, s) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/defaults.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/defaults.go new file mode 100644 index 000000000..375f5c3aa --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/defaults.go @@ -0,0 +1,188 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + "math" + + "github.com/gardener/gardener/pkg/utils" + + corev1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} + +// SetDefaults_SecretBinding sets default values for SecretBinding objects. +func SetDefaults_SecretBinding(obj *SecretBinding) { + if len(obj.SecretRef.Namespace) == 0 { + obj.SecretRef.Namespace = obj.Namespace + } + + for i, quota := range obj.Quotas { + if len(quota.Namespace) == 0 { + obj.Quotas[i].Namespace = obj.Namespace + } + } +} + +// SetDefaults_Project sets default values for Project objects. +func SetDefaults_Project(obj *Project) { + if obj.Spec.Owner != nil && len(obj.Spec.Owner.APIGroup) == 0 { + switch obj.Spec.Owner.Kind { + case rbacv1.ServiceAccountKind: + obj.Spec.Owner.APIGroup = "" + case rbacv1.UserKind: + obj.Spec.Owner.APIGroup = rbacv1.GroupName + case rbacv1.GroupKind: + obj.Spec.Owner.APIGroup = rbacv1.GroupName + } + } +} + +// SetDefaults_MachineType sets default values for MachineType objects. +func SetDefaults_MachineType(obj *MachineType) { + if obj.Usable == nil { + trueVar := true + obj.Usable = &trueVar + } +} + +// SetDefaults_VolumeType sets default values for VolumeType objects. +func SetDefaults_VolumeType(obj *VolumeType) { + if obj.Usable == nil { + trueVar := true + obj.Usable = &trueVar + } +} + +// SetDefaults_Shoot sets default values for Shoot objects. +func SetDefaults_Shoot(obj *Shoot) { + k8sVersionLessThan116, _ := utils.CompareVersions(obj.Spec.Kubernetes.Version, "<", "1.16") + // Error is ignored here because we cannot do anything meaningful with it. + // k8sVersionLessThan116 will default to `false`. + + trueVar := true + falseVar := false + + if obj.Spec.Kubernetes.AllowPrivilegedContainers == nil { + obj.Spec.Kubernetes.AllowPrivilegedContainers = &trueVar + } + + if obj.Spec.Kubernetes.KubeAPIServer == nil { + obj.Spec.Kubernetes.KubeAPIServer = &KubeAPIServerConfig{} + } + if obj.Spec.Kubernetes.KubeAPIServer.EnableBasicAuthentication == nil { + if k8sVersionLessThan116 { + obj.Spec.Kubernetes.KubeAPIServer.EnableBasicAuthentication = &trueVar + } else { + obj.Spec.Kubernetes.KubeAPIServer.EnableBasicAuthentication = &falseVar + } + } + + if obj.Spec.Kubernetes.KubeControllerManager == nil { + obj.Spec.Kubernetes.KubeControllerManager = &KubeControllerManagerConfig{} + } + if obj.Spec.Kubernetes.KubeControllerManager.NodeCIDRMaskSize == nil { + obj.Spec.Kubernetes.KubeControllerManager.NodeCIDRMaskSize = calculateDefaultNodeCIDRMaskSize(obj.Spec.Kubernetes.Kubelet, obj.Spec.Provider.Workers) + } + + if obj.Spec.Kubernetes.KubeProxy == nil { + obj.Spec.Kubernetes.KubeProxy = &KubeProxyConfig{} + } + if obj.Spec.Kubernetes.KubeProxy.Mode == nil { + defaultProxyMode := ProxyModeIPTables + obj.Spec.Kubernetes.KubeProxy.Mode = &defaultProxyMode + } + + if obj.Spec.Addons == nil { + obj.Spec.Addons = &Addons{} + } + if obj.Spec.Addons.KubernetesDashboard == nil { + obj.Spec.Addons.KubernetesDashboard = &KubernetesDashboard{} + } + if obj.Spec.Addons.KubernetesDashboard.AuthenticationMode == nil { + var defaultAuthMode string + if k8sVersionLessThan116 { + defaultAuthMode = KubernetesDashboardAuthModeBasic + } else { + defaultAuthMode = KubernetesDashboardAuthModeToken + } + obj.Spec.Addons.KubernetesDashboard.AuthenticationMode = &defaultAuthMode + } +} + +// SetDefaults_Maintenance sets default values for Maintenance objects. +func SetDefaults_Maintenance(obj *Maintenance) { + if obj == nil { + obj = &Maintenance{} + } + + if obj.AutoUpdate == nil { + obj.AutoUpdate = &MaintenanceAutoUpdate{ + KubernetesVersion: true, + MachineImageVersion: true, + } + } + + if obj.TimeWindow == nil { + mt := utils.RandomMaintenanceTimeWindow() + obj.TimeWindow = &MaintenanceTimeWindow{ + Begin: mt.Begin().Formatted(), + End: mt.End().Formatted(), + } + } +} + +// SetDefaults_Worker sets default values for Worker objects. +func SetDefaults_Worker(obj *Worker) { + if obj.MaxSurge == nil { + obj.MaxSurge = &DefaultWorkerMaxSurge + } + if obj.MaxUnavailable == nil { + obj.MaxUnavailable = &DefaultWorkerMaxUnavailable + } +} + +// SetDefaults_NginxIngress sets default values for NginxIngress objects. +func SetDefaults_NginxIngress(obj *NginxIngress) { + if obj.ExternalTrafficPolicy == nil { + v := corev1.ServiceExternalTrafficPolicyTypeCluster + obj.ExternalTrafficPolicy = &v + } +} + +// Helper functions + +func calculateDefaultNodeCIDRMaskSize(kubelet *KubeletConfig, workers []Worker) *int32 { + var maxPods int32 = 110 // default maxPods setting on kubelet + + if kubelet != nil && kubelet.MaxPods != nil { + maxPods = *kubelet.MaxPods + } + + for _, worker := range workers { + if worker.Kubernetes != nil && worker.Kubernetes.Kubelet != nil && worker.Kubernetes.Kubelet.MaxPods != nil && *worker.Kubernetes.Kubelet.MaxPods > maxPods { + maxPods = *worker.Kubernetes.Kubelet.MaxPods + } + } + + // by having approximately twice as many available IP addresses as possible Pods, Kubernetes is able to mitigate IP address reuse as Pods are added to and removed from a node. + nodeCidrRange := int32(32 - int(math.Ceil(math.Log2(float64(maxPods*2))))) + return &nodeCidrRange +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/doc.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/doc.go new file mode 100644 index 000000000..e7ed9f6f1 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/doc.go @@ -0,0 +1,24 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package v1beta1 is the v1beta1 version of the API. +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/gardener/gardener/pkg/apis/core +// +k8s:openapi-gen=true +// +k8s:defaulter-gen=TypeMeta +//go:generate gen-crd-api-reference-docs -api-dir . -config ../../../../hack/api-reference/core-config.json -template-dir ../../../../hack/api-reference/template -out-file ../../../../hack/api-reference/core.md + +// Package v1beta1 is a version of the API. +// +groupName=core.gardener.cloud +package v1beta1 diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/errors.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/errors.go new file mode 100644 index 000000000..43df45275 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/errors.go @@ -0,0 +1,150 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 helper + +import ( + "errors" + "regexp" + "strings" + "time" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "github.com/gardener/gardener/pkg/utils" + utilerrors "github.com/gardener/gardener/pkg/utils/errors" + + errors2 "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type errorWithCode struct { + code gardencorev1beta1.ErrorCode + message string +} + +// NewErrorWithCode creates a new error that additionally exposes the given code via the Coder interface. +func NewErrorWithCode(code gardencorev1beta1.ErrorCode, message string) error { + return &errorWithCode{code, message} +} + +func (e *errorWithCode) Code() gardencorev1beta1.ErrorCode { + return e.code +} + +func (e *errorWithCode) Error() string { + return e.message +} + +var ( + unauthorizedRegexp = regexp.MustCompile(`(?i)(Unauthorized|InvalidClientTokenId|SignatureDoesNotMatch|Authentication failed|AuthFailure|AuthorizationFailed|invalid character|invalid_grant|invalid_client|Authorization Profile was not found|cannot fetch token|no active subscriptions|InvalidAccessKeyId|InvalidSecretAccessKey)`) + quotaExceededRegexp = regexp.MustCompile(`(?i)(LimitExceeded|Quota)`) + insufficientPrivilegesRegexp = regexp.MustCompile(`(?i)(AccessDenied|Forbidden|deny|denied)`) + dependenciesRegexp = regexp.MustCompile(`(?i)(PendingVerification|Access Not Configured|accessNotConfigured|DependencyViolation|OptInRequired|DeleteConflict|Conflict|inactive billing state|ReadOnlyDisabledSubscription|is already being used|not available in the current hardware cluster)`) +) + +// DetermineError determines the Garden error code for the given error message. +func DetermineError(message string) error { + code := determineErrorCode(message) + if code == "" { + return errors.New(message) + } + return &errorWithCode{code, message} +} + +func determineErrorCode(message string) gardencorev1beta1.ErrorCode { + switch { + case unauthorizedRegexp.MatchString(message): + return gardencorev1beta1.ErrorInfraUnauthorized + case quotaExceededRegexp.MatchString(message): + return gardencorev1beta1.ErrorInfraQuotaExceeded + case insufficientPrivilegesRegexp.MatchString(message): + return gardencorev1beta1.ErrorInfraInsufficientPrivileges + case dependenciesRegexp.MatchString(message): + return gardencorev1beta1.ErrorInfraDependencies + default: + return "" + } +} + +// Coder is an error that may produce an ErrorCode visible to the outside. +type Coder interface { + error + Code() gardencorev1beta1.ErrorCode +} + +// ExtractErrorCodes extracts all error codes from the given error by using utils.Errors +func ExtractErrorCodes(err error) []gardencorev1beta1.ErrorCode { + var codes []gardencorev1beta1.ErrorCode + for _, err := range utils.Errors(err) { + if coder, ok := err.(Coder); ok { + codes = append(codes, coder.Code()) + } + } + return codes +} + +// FormatLastErrDescription formats the error message string for the last occurred error. +func FormatLastErrDescription(err error) string { + errString := err.Error() + if len(errString) > 0 { + errString = strings.ToUpper(string(errString[0])) + errString[1:] + } + return errString +} + +// WrappedLastErrors is a structure which contains the general description of the lastErrors which occurred and an array of all lastErrors +type WrappedLastErrors struct { + Description string + LastErrors []gardencorev1beta1.LastError +} + +// NewWrappedLastErrors returns an error +func NewWrappedLastErrors(description string, err error) *WrappedLastErrors { + var lastErrors []gardencorev1beta1.LastError + + for _, partError := range utils.Errors(err) { + lastErrors = append(lastErrors, *LastErrorWithTaskID( + partError.Error(), + utilerrors.GetID(partError), + ExtractErrorCodes(errors2.Cause(partError))...)) + } + + return &WrappedLastErrors{ + Description: description, + LastErrors: lastErrors, + } +} + +// LastError creates a new LastError with the given description, optional codes and sets timestamp when the error is lastly observed. +func LastError(description string, codes ...gardencorev1beta1.ErrorCode) *gardencorev1beta1.LastError { + return &gardencorev1beta1.LastError{ + Description: description, + Codes: codes, + LastUpdateTime: &metav1.Time{ + Time: time.Now(), + }, + } +} + +// LastErrorWithTaskID creates a new LastError with the given description, the ID of the task when the error occurred, optional codes and sets timestamp when the error is lastly observed. +func LastErrorWithTaskID(description string, taskID string, codes ...gardencorev1beta1.ErrorCode) *gardencorev1beta1.LastError { + return &gardencorev1beta1.LastError{ + Description: description, + Codes: codes, + TaskID: &taskID, + LastUpdateTime: &metav1.Time{ + Time: time.Now(), + }, + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/helper.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/helper.go new file mode 100644 index 000000000..9ea409b90 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/helper/helper.go @@ -0,0 +1,708 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 helper + +import ( + "fmt" + "sort" + "strconv" + "strings" + + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" + "github.com/gardener/gardener/pkg/logger" + "github.com/gardener/gardener/pkg/utils" + + "github.com/Masterminds/semver" + errors "github.com/pkg/errors" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +// Now determines the current metav1.Time. +var Now = metav1.Now + +// InitCondition initializes a new Condition with an Unknown status. +func InitCondition(conditionType gardencorev1beta1.ConditionType) gardencorev1beta1.Condition { + return gardencorev1beta1.Condition{ + Type: conditionType, + Status: gardencorev1beta1.ConditionUnknown, + Reason: "ConditionInitialized", + Message: "The condition has been initialized but its semantic check has not been performed yet.", + LastTransitionTime: Now(), + } +} + +// NewConditions initializes the provided conditions based on an existing list. If a condition type does not exist +// in the list yet, it will be set to default values. +func NewConditions(conditions []gardencorev1beta1.Condition, conditionTypes ...gardencorev1beta1.ConditionType) []*gardencorev1beta1.Condition { + newConditions := []*gardencorev1beta1.Condition{} + + // We retrieve the current conditions in order to update them appropriately. + for _, conditionType := range conditionTypes { + if c := GetCondition(conditions, conditionType); c != nil { + newConditions = append(newConditions, c) + continue + } + initializedCondition := InitCondition(conditionType) + newConditions = append(newConditions, &initializedCondition) + } + + return newConditions +} + +// GetCondition returns the condition with the given out of the list of . +// In case the required type could not be found, it returns nil. +func GetCondition(conditions []gardencorev1beta1.Condition, conditionType gardencorev1beta1.ConditionType) *gardencorev1beta1.Condition { + for _, condition := range conditions { + if condition.Type == conditionType { + c := condition + return &c + } + } + return nil +} + +// GetOrInitCondition tries to retrieve the condition with the given condition type from the given conditions. +// If the condition could not be found, it returns an initialized condition of the given type. +func GetOrInitCondition(conditions []gardencorev1beta1.Condition, conditionType gardencorev1beta1.ConditionType) gardencorev1beta1.Condition { + if condition := GetCondition(conditions, conditionType); condition != nil { + return *condition + } + return InitCondition(conditionType) +} + +// UpdatedCondition updates the properties of one specific condition. +func UpdatedCondition(condition gardencorev1beta1.Condition, status gardencorev1beta1.ConditionStatus, reason, message string) gardencorev1beta1.Condition { + newCondition := gardencorev1beta1.Condition{ + Type: condition.Type, + Status: status, + Reason: reason, + Message: message, + LastTransitionTime: condition.LastTransitionTime, + LastUpdateTime: Now(), + } + + if condition.Status != status { + newCondition.LastTransitionTime = Now() + } + return newCondition +} + +func UpdatedConditionUnknownError(condition gardencorev1beta1.Condition, err error) gardencorev1beta1.Condition { + return UpdatedConditionUnknownErrorMessage(condition, err.Error()) +} + +func UpdatedConditionUnknownErrorMessage(condition gardencorev1beta1.Condition, message string) gardencorev1beta1.Condition { + return UpdatedCondition(condition, gardencorev1beta1.ConditionUnknown, gardencorev1beta1.ConditionCheckError, message) +} + +// MergeConditions merges the given with the . Existing conditions are superseded by +// the (depending on the condition type). +func MergeConditions(oldConditions []gardencorev1beta1.Condition, newConditions ...gardencorev1beta1.Condition) []gardencorev1beta1.Condition { + var ( + out = make([]gardencorev1beta1.Condition, 0, len(oldConditions)) + typeToIndex = make(map[gardencorev1beta1.ConditionType]int, len(oldConditions)) + ) + + for i, condition := range oldConditions { + out = append(out, condition) + typeToIndex[condition.Type] = i + } + + for _, condition := range newConditions { + if index, ok := typeToIndex[condition.Type]; ok { + out[index] = condition + continue + } + out = append(out, condition) + } + + return out +} + +// ConditionsNeedUpdate returns true if the must be updated based on . +func ConditionsNeedUpdate(existingConditions, newConditions []gardencorev1beta1.Condition) bool { + return existingConditions == nil || !apiequality.Semantic.DeepEqual(newConditions, existingConditions) +} + +// IsResourceSupported returns true if a given combination of kind/type is part of a controller resources list. +func IsResourceSupported(resources []gardencorev1beta1.ControllerResource, resourceKind, resourceType string) bool { + for _, resource := range resources { + if resource.Kind == resourceKind && strings.ToLower(resource.Type) == strings.ToLower(resourceType) { + return true + } + } + + return false +} + +// IsControllerInstallationSuccessful returns true if a ControllerInstallation has been marked as "successfully" +// installed. +func IsControllerInstallationSuccessful(controllerInstallation gardencorev1beta1.ControllerInstallation) bool { + for _, condition := range controllerInstallation.Status.Conditions { + if condition.Type == gardencorev1beta1.ControllerInstallationInstalled && condition.Status == gardencorev1beta1.ConditionTrue { + return true + } + } + + return false +} + +// ComputeOperationType checksthe and determines whether is it is Create operation or reconcile operation +func ComputeOperationType(meta metav1.ObjectMeta, lastOperation *gardencorev1beta1.LastOperation) gardencorev1beta1.LastOperationType { + switch { + case meta.DeletionTimestamp != nil: + return gardencorev1beta1.LastOperationTypeDelete + case lastOperation == nil: + return gardencorev1beta1.LastOperationTypeCreate + case (lastOperation.Type == gardencorev1beta1.LastOperationTypeCreate && lastOperation.State != gardencorev1beta1.LastOperationStateSucceeded): + return gardencorev1beta1.LastOperationTypeCreate + } + return gardencorev1beta1.LastOperationTypeReconcile +} + +// TaintsHave returns true if the given key is part of the taints list. +func TaintsHave(taints []gardencorev1beta1.SeedTaint, key string) bool { + for _, taint := range taints { + if taint.Key == key { + return true + } + } + return false +} + +type ShootedSeed struct { + Protected *bool + Visible *bool + MinimumVolumeSize *string + APIServer *ShootedSeedAPIServer + BlockCIDRs []string + ShootDefaults *gardencorev1beta1.ShootNetworks + Backup *gardencorev1beta1.SeedBackup +} + +type ShootedSeedAPIServer struct { + Replicas *int32 + Autoscaler *ShootedSeedAPIServerAutoscaler +} + +type ShootedSeedAPIServerAutoscaler struct { + MinReplicas *int32 + MaxReplicas int32 +} + +func parseInt32(s string) (int32, error) { + i64, err := strconv.ParseInt(s, 10, 32) + if err != nil { + return 0, err + } + return int32(i64), nil +} + +func parseShootedSeed(annotation string) (*ShootedSeed, error) { + var ( + flags = make(map[string]struct{}) + settings = make(map[string]string) + + trueVar = true + falseVar = false + + shootedSeed ShootedSeed + ) + + for _, fragment := range strings.Split(annotation, ",") { + parts := strings.SplitN(fragment, "=", 2) + if len(parts) == 1 { + flags[fragment] = struct{}{} + continue + } + + settings[parts[0]] = parts[1] + } + + if _, ok := flags["true"]; !ok { + return nil, nil + } + + apiServer, err := parseShootedSeedAPIServer(settings) + if err != nil { + return nil, err + } + shootedSeed.APIServer = apiServer + + blockCIDRs, err := parseShootedSeedBlockCIDRs(settings) + if err != nil { + return nil, err + } + shootedSeed.BlockCIDRs = blockCIDRs + + shootDefaults, err := parseShootedSeedShootDefaults(settings) + if err != nil { + return nil, err + } + shootedSeed.ShootDefaults = shootDefaults + + backup, err := parseShootedSeedBackup(settings) + if err != nil { + return nil, err + } + shootedSeed.Backup = backup + + if size, ok := settings["minimumVolumeSize"]; ok { + shootedSeed.MinimumVolumeSize = &size + } + + if _, ok := flags["protected"]; ok { + shootedSeed.Protected = &trueVar + } + if _, ok := flags["unprotected"]; ok { + shootedSeed.Protected = &falseVar + } + if _, ok := flags["visible"]; ok { + shootedSeed.Visible = &trueVar + } + if _, ok := flags["invisible"]; ok { + shootedSeed.Visible = &falseVar + } + + return &shootedSeed, nil +} + +func parseShootedSeedBlockCIDRs(settings map[string]string) ([]string, error) { + cidrs, ok := settings["blockCIDRs"] + if !ok { + return nil, nil + } + + var addresses []string + for _, addr := range strings.Split(cidrs, ";") { + addresses = append(addresses, addr) + } + + return addresses, nil +} + +func parseShootedSeedShootDefaults(settings map[string]string) (*gardencorev1beta1.ShootNetworks, error) { + var ( + podCIDR, ok1 = settings["shootDefaults.pods"] + serviceCIDR, ok2 = settings["shootDefaults.services"] + ) + + if !ok1 && !ok2 { + return nil, nil + } + + shootNetworks := &gardencorev1beta1.ShootNetworks{} + + if ok1 { + shootNetworks.Pods = &podCIDR + } + + if ok2 { + shootNetworks.Services = &serviceCIDR + } + + return shootNetworks, nil +} + +func parseShootedSeedBackup(settings map[string]string) (*gardencorev1beta1.SeedBackup, error) { + var ( + provider, ok1 = settings["backup.provider"] + region, ok2 = settings["backup.region"] + secretRefName, ok3 = settings["backup.secretRef.name"] + secretRefNamespace, ok4 = settings["backup.secretRef.namespace"] + ) + + if ok1 && provider == "none" { + return nil, nil + } + + backup := &gardencorev1beta1.SeedBackup{} + + if ok1 { + backup.Provider = provider + } + if ok2 { + backup.Region = ®ion + } + if ok3 { + backup.SecretRef.Name = secretRefName + } + if ok4 { + backup.SecretRef.Namespace = secretRefNamespace + } + + return backup, nil +} + +func parseShootedSeedAPIServer(settings map[string]string) (*ShootedSeedAPIServer, error) { + apiServerAutoscaler, err := parseShootedSeedAPIServerAutoscaler(settings) + if err != nil { + return nil, err + } + + replicasString, ok := settings["apiServer.replicas"] + if !ok && apiServerAutoscaler == nil { + return nil, nil + } + + var apiServer ShootedSeedAPIServer + + apiServer.Autoscaler = apiServerAutoscaler + + if ok { + replicas, err := parseInt32(replicasString) + if err != nil { + return nil, err + } + + apiServer.Replicas = &replicas + } + + return &apiServer, nil +} + +func parseShootedSeedAPIServerAutoscaler(settings map[string]string) (*ShootedSeedAPIServerAutoscaler, error) { + minReplicasString, ok1 := settings["apiServer.autoscaler.minReplicas"] + maxReplicasString, ok2 := settings["apiServer.autoscaler.maxReplicas"] + if !ok1 && !ok2 { + return nil, nil + } + if !ok2 { + return nil, fmt.Errorf("apiSrvMaxReplicas has to be specified for shooted seed API server autoscaler") + } + + var apiServerAutoscaler ShootedSeedAPIServerAutoscaler + + if ok1 { + minReplicas, err := parseInt32(minReplicasString) + if err != nil { + return nil, err + } + apiServerAutoscaler.MinReplicas = &minReplicas + } + + maxReplicas, err := parseInt32(maxReplicasString) + if err != nil { + return nil, err + } + apiServerAutoscaler.MaxReplicas = maxReplicas + + return &apiServerAutoscaler, nil +} + +func validateShootedSeed(shootedSeed *ShootedSeed, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + if shootedSeed.APIServer != nil { + allErrs = append(validateShootedSeedAPIServer(shootedSeed.APIServer, fldPath.Child("apiServer"))) + } + + return allErrs +} + +func validateShootedSeedAPIServer(apiServer *ShootedSeedAPIServer, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + if apiServer.Replicas != nil && *apiServer.Replicas < 1 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("replicas"), *apiServer.Replicas, "must be greater than 0")) + } + if apiServer.Autoscaler != nil { + allErrs = append(allErrs, validateShootedSeedAPIServerAutoscaler(apiServer.Autoscaler, fldPath.Child("autoscaler"))...) + } + + return allErrs +} + +func validateShootedSeedAPIServerAutoscaler(autoscaler *ShootedSeedAPIServerAutoscaler, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + if autoscaler.MinReplicas != nil && *autoscaler.MinReplicas < 1 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("minReplicas"), *autoscaler.MinReplicas, "must be greater than 0")) + } + if autoscaler.MaxReplicas < 1 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("maxReplicas"), autoscaler.MaxReplicas, "must be greater than 0")) + } + if autoscaler.MinReplicas != nil && autoscaler.MaxReplicas < *autoscaler.MinReplicas { + allErrs = append(allErrs, field.Invalid(fldPath.Child("maxReplicas"), autoscaler.MaxReplicas, "must be greater than or equal to `minReplicas`")) + } + + return allErrs +} + +func setDefaults_ShootedSeed(shootedSeed *ShootedSeed) { + if shootedSeed.APIServer == nil { + shootedSeed.APIServer = &ShootedSeedAPIServer{} + } + setDefaults_ShootedSeedAPIServer(shootedSeed.APIServer) +} + +func setDefaults_ShootedSeedAPIServer(apiServer *ShootedSeedAPIServer) { + if apiServer.Replicas == nil { + three := int32(3) + apiServer.Replicas = &three + } + if apiServer.Autoscaler == nil { + apiServer.Autoscaler = &ShootedSeedAPIServerAutoscaler{ + MaxReplicas: 3, + } + } + setDefaults_ShootedSeedAPIServerAutoscaler(apiServer.Autoscaler) +} + +func minInt32(a int32, b int32) int32 { + if a < b { + return a + } + return b +} + +func setDefaults_ShootedSeedAPIServerAutoscaler(autoscaler *ShootedSeedAPIServerAutoscaler) { + if autoscaler.MinReplicas == nil { + minReplicas := minInt32(3, autoscaler.MaxReplicas) + autoscaler.MinReplicas = &minReplicas + } +} + +// ReadShootedSeed determines whether the Shoot has been marked to be registered automatically as a Seed cluster. +func ReadShootedSeed(shoot *gardencorev1beta1.Shoot) (*ShootedSeed, error) { + if shoot.Namespace != v1beta1constants.GardenNamespace || shoot.Annotations == nil { + return nil, nil + } + + val, ok := shoot.Annotations[v1beta1constants.AnnotationShootUseAsSeed] + if !ok { + return nil, nil + } + + shootedSeed, err := parseShootedSeed(val) + if err != nil { + return nil, err + } + + if shootedSeed == nil { + return nil, nil + } + + setDefaults_ShootedSeed(shootedSeed) + + if errs := validateShootedSeed(shootedSeed, nil); len(errs) > 0 { + return nil, errs.ToAggregate() + } + + return shootedSeed, nil +} + +// HibernationIsEnabled checks if the given shoot's desired state is hibernated. +func HibernationIsEnabled(shoot *gardencorev1beta1.Shoot) bool { + return shoot.Spec.Hibernation != nil && shoot.Spec.Hibernation.Enabled != nil && *shoot.Spec.Hibernation.Enabled +} + +// ShootWantsClusterAutoscaler checks if the given Shoot needs a cluster autoscaler. +// This is determined by checking whether one of the Shoot workers has a different +// Maximum than Minimum. +func ShootWantsClusterAutoscaler(shoot *gardencorev1beta1.Shoot) (bool, error) { + for _, worker := range shoot.Spec.Provider.Workers { + if worker.Maximum > worker.Minimum { + return true, nil + } + } + return false, nil +} + +// ShootIgnoresAlerts checks if the alerts for the annotated shoot cluster should be ignored. +func ShootIgnoresAlerts(shoot *gardencorev1beta1.Shoot) bool { + ignore := false + if value, ok := shoot.Annotations[v1beta1constants.AnnotationShootIgnoreAlerts]; ok { + ignore, _ = strconv.ParseBool(value) + } + return ignore +} + +// ShootWantsBasicAuthentication returns true if basic authentication is not configured or +// if it is set explicitly to 'true'. +func ShootWantsBasicAuthentication(shoot *gardencorev1beta1.Shoot) bool { + kubeAPIServerConfig := shoot.Spec.Kubernetes.KubeAPIServer + if kubeAPIServerConfig == nil { + return true + } + if kubeAPIServerConfig.EnableBasicAuthentication == nil { + return true + } + return *kubeAPIServerConfig.EnableBasicAuthentication +} + +// DetermineMachineImageForName finds the cloud specific machine images in the for the given and +// region. In case it does not find the machine image with the , it returns false. Otherwise, true and the +// cloud-specific machine image will be returned. +func DetermineMachineImageForName(cloudProfile *gardencorev1beta1.CloudProfile, name string) (bool, gardencorev1beta1.MachineImage, error) { + for _, image := range cloudProfile.Spec.MachineImages { + if strings.ToLower(image.Name) == strings.ToLower(name) { + return true, image, nil + } + } + return false, gardencorev1beta1.MachineImage{}, nil +} + +// ShootMachineImageVersionExists checks if the shoot machine image (name, version) exists in the machine image constraint and returns true if yes and the index in the versions slice +func ShootMachineImageVersionExists(constraint gardencorev1beta1.MachineImage, image gardencorev1beta1.ShootMachineImage) (bool, int) { + if constraint.Name != image.Name { + return false, 0 + } + + for index, v := range constraint.Versions { + if v.Version == image.Version { + return true, index + } + } + + return false, 0 +} + +// DetermineLatestMachineImageVersion determines the latest MachineImageVersion from a MachineImage +func DetermineLatestMachineImageVersion(image gardencorev1beta1.MachineImage) (*semver.Version, gardencorev1beta1.ExpirableVersion, error) { + var ( + latestSemVerVersion *semver.Version + latestMachineImageVersion gardencorev1beta1.ExpirableVersion + ) + + for _, imageVersion := range image.Versions { + v, err := semver.NewVersion(imageVersion.Version) + if err != nil { + return nil, gardencorev1beta1.ExpirableVersion{}, fmt.Errorf("error while parsing machine image version '%s' of machine image '%s': version not valid: %s", imageVersion.Version, image.Name, err.Error()) + } + if latestSemVerVersion == nil || v.GreaterThan(latestSemVerVersion) { + latestSemVerVersion = v + latestMachineImageVersion = imageVersion + } + } + return latestSemVerVersion, latestMachineImageVersion, nil +} + +// GetShootMachineImageFromLatestMachineImageVersion determines the latest version in a machine image and returns that as a ShootMachineImage +func GetShootMachineImageFromLatestMachineImageVersion(image gardencorev1beta1.MachineImage) (*semver.Version, gardencorev1beta1.ShootMachineImage, error) { + latestSemVerVersion, latestImage, err := DetermineLatestMachineImageVersion(image) + if err != nil { + return nil, gardencorev1beta1.ShootMachineImage{}, err + } + return latestSemVerVersion, gardencorev1beta1.ShootMachineImage{Name: image.Name, Version: latestImage.Version}, nil +} + +// UpdateMachineImages updates the machine images in place. +func UpdateMachineImages(workers []gardencorev1beta1.Worker, machineImages []*gardencorev1beta1.ShootMachineImage) { + for _, machineImage := range machineImages { + for idx, worker := range workers { + if worker.Machine.Image != nil && machineImage.Name == worker.Machine.Image.Name { + logger.Logger.Infof("Updating worker images of worker '%s' from version %s to version %s", worker.Name, worker.Machine.Image.Version, machineImage.Version) + workers[idx].Machine.Image = machineImage + } + } + } +} + +// KubernetesVersionExistsInCloudProfile checks if the given Kubernetes version exists in the CloudProfile +func KubernetesVersionExistsInCloudProfile(cloudProfile *gardencorev1beta1.CloudProfile, currentVersion string) (bool, gardencorev1beta1.ExpirableVersion, error) { + for _, version := range cloudProfile.Spec.Kubernetes.Versions { + ok, err := utils.CompareVersions(version.Version, "=", currentVersion) + if err != nil { + return false, gardencorev1beta1.ExpirableVersion{}, err + } + if ok { + return true, version, nil + } + } + return false, gardencorev1beta1.ExpirableVersion{}, nil +} + +// DetermineLatestKubernetesPatchVersion finds the latest Kubernetes patch version in the compared +// to the given . In case it does not find a newer patch version, it returns false. Otherwise, +// true and the found version will be returned. +func DetermineLatestKubernetesPatchVersion(cloudProfile *gardencorev1beta1.CloudProfile, currentVersion string) (bool, string, error) { + ok, newerVersions, _, err := determineNextKubernetesVersions(cloudProfile, currentVersion, "~") + if err != nil || !ok { + return ok, "", err + } + sort.Strings(newerVersions) + return true, newerVersions[len(newerVersions)-1], nil +} + +// DetermineNextKubernetesMinorVersion finds the next available Kubernetes minor version in the compared +// to the given . In case it does not find a newer minor version, it returns false. Otherwise, +// true and the found version will be returned. +func DetermineNextKubernetesMinorVersion(cloudProfile *gardencorev1beta1.CloudProfile, currentVersion string) (bool, string, error) { + ok, newerVersions, _, err := determineNextKubernetesVersions(cloudProfile, currentVersion, "^") + if err != nil || !ok { + return ok, "", err + } + sort.Strings(newerVersions) + return true, newerVersions[0], nil +} + +// determineKubernetesVersions finds newer Kubernetes versions in the compared +// with the to the given . The has to be a github.com/Masterminds/semver +// range comparison symbol. In case it does not find a newer version, it returns false. Otherwise, +// true and the found version will be returned. +func determineNextKubernetesVersions(cloudProfile *gardencorev1beta1.CloudProfile, currentVersion, operator string) (bool, []string, []gardencorev1beta1.ExpirableVersion, error) { + var ( + newerVersions = []gardencorev1beta1.ExpirableVersion{} + newerVersionsString = []string{} + ) + + for _, version := range cloudProfile.Spec.Kubernetes.Versions { + ok, err := utils.CompareVersions(version.Version, operator, currentVersion) + if err != nil { + return false, []string{}, []gardencorev1beta1.ExpirableVersion{}, err + } + if version.Version != currentVersion && ok { + newerVersions = append(newerVersions, version) + newerVersionsString = append(newerVersionsString, version.Version) + } + } + + if len(newerVersions) == 0 { + return false, []string{}, []gardencorev1beta1.ExpirableVersion{}, nil + } + + return true, newerVersionsString, newerVersions, nil +} + +// SetMachineImageVersionsToMachineImage sets imageVersions to the matching imageName in the machineImages. +func SetMachineImageVersionsToMachineImage(machineImages []gardencorev1beta1.MachineImage, imageName string, imageVersions []gardencorev1beta1.ExpirableVersion) ([]gardencorev1beta1.MachineImage, error) { + for index, image := range machineImages { + if strings.ToLower(image.Name) == strings.ToLower(imageName) { + machineImages[index].Versions = imageVersions + return machineImages, nil + } + } + return nil, fmt.Errorf("machine image with name '%s' could not be found", imageName) +} + +// GetDefaultMachineImageFromCloudProfile gets the first MachineImage from the CloudProfile +func GetDefaultMachineImageFromCloudProfile(profile gardencorev1beta1.CloudProfile) *gardencorev1beta1.MachineImage { + if len(profile.Spec.MachineImages) == 0 { + return nil + } + return &profile.Spec.MachineImages[0] +} + +// WrapWithLastError is wrapper function for gardencorev1beta1.LastError +func WrapWithLastError(err error, lastError *gardencorev1beta1.LastError) error { + if err == nil || lastError == nil { + return err + } + return errors.Wrapf(err, "last error: %s", lastError.Description) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/register.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/register.go new file mode 100644 index 000000000..1692e76d7 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/register.go @@ -0,0 +1,75 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the name of the core API group. +const GroupName = "core.gardener.cloud" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder is a new Scheme Builder which registers our API. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) + localSchemeBuilder = &SchemeBuilder + // AddToScheme is a reference to the Scheme Builder's AddToScheme function. + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &BackupBucket{}, + &BackupBucketList{}, + &BackupEntry{}, + &BackupEntryList{}, + &CloudProfile{}, + &CloudProfileList{}, + &ControllerRegistration{}, + &ControllerRegistrationList{}, + &ControllerInstallation{}, + &ControllerInstallationList{}, + &Plant{}, + &PlantList{}, + &Project{}, + &ProjectList{}, + &Quota{}, + &QuotaList{}, + &SecretBinding{}, + &SecretBindingList{}, + &Seed{}, + &SeedList{}, + &Shoot{}, + &ShootList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_backupbucket.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_backupbucket.go new file mode 100644 index 000000000..c13e82ade --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_backupbucket.go @@ -0,0 +1,84 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// BackupBucket holds details about backup bucket +type BackupBucket struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + metav1.ObjectMeta `json:"metadata"` + // Specification of the Backup Bucket. + Spec BackupBucketSpec `json:"spec"` + // Most recently observed status of the Backup Bucket. + Status BackupBucketStatus `json:"status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// BackupBucketList is a list of BackupBucket objects. +type BackupBucketList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of BackupBucket. + Items []BackupBucket `json:"items"` +} + +// BackupBucketSpec is the specification of a Backup Bucket. +type BackupBucketSpec struct { + // Provider hold the details of cloud provider of the object store. + Provider BackupBucketProvider `json:"provider"` + // SecretRef is a reference to a secret that contains the credentials to access object store. + SecretRef corev1.SecretReference `json:"secretRef"` + // SeedName holds the name of the seed allocated to BackupBucket for running controller. + // +optional + SeedName *string `json:"seedName,omitempty"` +} + +// BackupBucketStatus holds the most recently observed status of the Backup Bucket. +type BackupBucketStatus struct { + // LastOperation holds information about the last operation on the BackupBucket. + // +optional + LastOperation *LastOperation `json:"lastOperation,omitempty"` + // LastError holds information about the last occurred error during an operation. + // +optional + LastError *LastError `json:"lastError,omitempty"` + // ObservedGeneration is the most recent generation observed for this BackupBucket. It corresponds to the + // BackupBucket's generation, which is updated on mutation by the API Server. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // GeneratedSecretRef is reference to the secret generated by backup bucket, which + // will have object store specific credentials. + // +optional + GeneratedSecretRef *corev1.SecretReference `json:"generatedSecretRef,omitempty"` +} + +// BackupBucketProvider holds the details of cloud provider of the object store. +type BackupBucketProvider struct { + // Type is the type of provider. + Type string `json:"type"` + // Region is the region of the bucket. + Region string `json:"region"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_backupentry.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_backupentry.go new file mode 100644 index 000000000..4ad89087f --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_backupentry.go @@ -0,0 +1,75 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + // BackupEntryForceDeletion is a constant for an annotation on a BackupEntry indicating that it should be force deleted. + BackupEntryForceDeletion = "backupentry.core.gardener.cloud/force-deletion" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// BackupEntry holds details about shoot backup. +type BackupEntry struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + metav1.ObjectMeta `json:"metadata"` + // Spec contains the specification of the Backup Entry. + // +optional + Spec BackupEntrySpec `json:"spec,omitempty"` + // Status contains the most recently observed status of the Backup Entry. + // +optional + Status BackupEntryStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// BackupEntryList is a list of BackupEntry objects. +type BackupEntryList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of BackupEntry. + Items []BackupEntry `json:"items"` +} + +// BackupEntrySpec is the specification of a Backup Entry. +type BackupEntrySpec struct { + // BucketName is the name of backup bucket for this Backup Entry. + BucketName string `json:"bucketName"` + // SeedName holds the name of the seed allocated to BackupEntry for running controller. + // +optional + SeedName *string `json:"seedName,omitempty"` +} + +// BackupEntryStatus holds the most recently observed status of the Backup Entry. +type BackupEntryStatus struct { + // LastOperation holds information about the last operation on the BackupEntry. + // +optional + LastOperation *LastOperation `json:"lastOperation,omitempty"` + // LastError holds information about the last occurred error during an operation. + // +optional + LastError *LastError `json:"lastError,omitempty"` + // ObservedGeneration is the most recent generation observed for this BackupEntry. It corresponds to the + // BackupEntry's generation, which is updated on mutation by the API Server. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_cloudprofile.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_cloudprofile.go new file mode 100644 index 000000000..331f2220d --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_cloudprofile.go @@ -0,0 +1,174 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CloudProfile represents certain properties about a provider environment. +type CloudProfile struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // Spec defines the provider environment properties. + // +optional + Spec CloudProfileSpec `json:"spec,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CloudProfileList is a collection of CloudProfiles. +type CloudProfileList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of CloudProfiles. + Items []CloudProfile `json:"items"` +} + +// CloudProfileSpec is the specification of a CloudProfile. +// It must contain exactly one of its defined keys. +type CloudProfileSpec struct { + // CABundle is a certificate bundle which will be installed onto every host machine of shoot cluster targetting this profile. + // +optional + CABundle *string `json:"caBundle,omitempty"` + // Kubernetes contains constraints regarding allowed values of the 'kubernetes' block in the Shoot specification. + Kubernetes KubernetesSettings `json:"kubernetes"` + // MachineImages contains constraints regarding allowed values for machine images in the Shoot specification. + // +patchMergeKey=name + // +patchStrategy=merge + MachineImages []MachineImage `json:"machineImages" patchStrategy:"merge" patchMergeKey:"name"` + // MachineTypes contains constraints regarding allowed values for machine types in the 'workers' block in the Shoot specification. + // +patchMergeKey=name + // +patchStrategy=merge + MachineTypes []MachineType `json:"machineTypes" patchStrategy:"merge" patchMergeKey:"name"` + // ProviderConfig contains provider-specific configuration for the profile. + // +optional + ProviderConfig *ProviderConfig `json:"providerConfig,omitempty"` + // Regions contains constraints regarding allowed values for regions and zones. + // +patchMergeKey=name + // +patchStrategy=merge + Regions []Region `json:"regions" patchStrategy:"merge" patchMergeKey:"name"` + // SeedSelector contains an optional list of labels on `Seed` resources that marks those seeds whose shoots may use this provider profile. + // An empty list means that all seeds of the same provider type are supported. + // This is useful for environments that are of the same type (like openstack) but may have different "instances"/landscapes. + // +optional + SeedSelector *metav1.LabelSelector `json:"seedSelector,omitempty"` + // Type is the name of the provider. + Type string `json:"type"` + // VolumeTypes contains constraints regarding allowed values for volume types in the 'workers' block in the Shoot specification. + // +patchMergeKey=name + // +patchStrategy=merge + // +optional + VolumeTypes []VolumeType `json:"volumeTypes,omitempty" patchStrategy:"merge" patchMergeKey:"name"` +} + +// KubernetesSettings contains constraints regarding allowed values of the 'kubernetes' block in the Shoot specification. +type KubernetesSettings struct { + // Versions is the list of allowed Kubernetes versions with optional expiration dates for Shoot clusters. + // +patchMergeKey=version + // +patchStrategy=merge + // +optional + Versions []ExpirableVersion `json:"versions,omitempty" patchStrategy:"merge" patchMergeKey:"version"` +} + +// MachineImage defines the name and multiple versions of the machine image in any environment. +type MachineImage struct { + // Name is the name of the image. + Name string `json:"name"` + // Versions contains versions and expiration dates of the machine image + // +patchMergeKey=version + // +patchStrategy=merge + Versions []ExpirableVersion `json:"versions" patchStrategy:"merge" patchMergeKey:"version"` +} + +// ExpirableVersion contains a version and an expiration date. +type ExpirableVersion struct { + // Version is the version identifier. + Version string `json:"version"` + // ExpirationDate defines the time at which this version expires. + // +optional + ExpirationDate *metav1.Time `json:"expirationDate,omitempty"` +} + +// MachineType contains certain properties of a machine type. +type MachineType struct { + // CPU is the number of CPUs for this machine type. + CPU resource.Quantity `json:"cpu"` + // GPU is the number of GPUs for this machine type. + GPU resource.Quantity `json:"gpu"` + // Memory is the amount of memory for this machine type. + Memory resource.Quantity `json:"memory"` + // Name is the name of the machine type. + Name string `json:"name"` + // Storage is the amount of storage associated with the root volume of this machine type. + // +optional + Storage *MachineTypeStorage `json:"storage,omitempty"` + // Usable defines if the machine type can be used for shoot clusters. + // +optional + Usable *bool `json:"usable,omitempty"` +} + +// MachineTypeStorage is the amount of storage associated with the root volume of this machine type. +type MachineTypeStorage struct { + // Class is the class of the storage type. + Class string `json:"class"` + // Size is the storage size. + Size resource.Quantity `json:"size"` + // Type is the type of the storage. + Type string `json:"type"` +} + +// Region contains certain properties of a region. +type Region struct { + // Name is a region name. + Name string `json:"name"` + // Zones is a list of availability zones in this region. + // +patchMergeKey=name + // +patchStrategy=merge + // +optional + Zones []AvailabilityZone `json:"zones,omitempty" patchStrategy:"merge" patchMergeKey:"name"` +} + +// AvailabilityZone is an availability zone. +type AvailabilityZone struct { + // Name is an an availability zone name. + Name string `json:"name"` + // UnavailableMachineTypes is a list of machine type names that are not availability in this zone. + // +optional + UnavailableMachineTypes []string `json:"unavailableMachineTypes,omitempty"` + // UnavailableVolumeTypes is a list of volume type names that are not availability in this zone. + // +optional + UnavailableVolumeTypes []string `json:"unavailableVolumeTypes,omitempty"` +} + +// VolumeType contains certain properties of a volume type. +type VolumeType struct { + // Class is the class of the volume type. + Class string `json:"class"` + // Name is the name of the volume type. + Name string `json:"name"` + // Usable defines if the volume type can be used for shoot clusters. + // +optional + Usable *bool `json:"usable,omitempty"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_common.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_common.go new file mode 100644 index 000000000..4409a3a47 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_common.go @@ -0,0 +1,172 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ErrorCode is a string alias. +type ErrorCode string + +const ( + // ErrorInfraUnauthorized indicates that the last error occurred due to invalid cloud provider credentials. + ErrorInfraUnauthorized ErrorCode = "ERR_INFRA_UNAUTHORIZED" + // ErrorInfraInsufficientPrivileges indicates that the last error occurred due to insufficient cloud provider privileges. + ErrorInfraInsufficientPrivileges ErrorCode = "ERR_INFRA_INSUFFICIENT_PRIVILEGES" + // ErrorInfraQuotaExceeded indicates that the last error occurred due to cloud provider quota limits. + ErrorInfraQuotaExceeded ErrorCode = "ERR_INFRA_QUOTA_EXCEEDED" + // ErrorInfraDependencies indicates that the last error occurred due to dependent objects on the cloud provider level. + ErrorInfraDependencies ErrorCode = "ERR_INFRA_DEPENDENCIES" +) + +// LastError indicates the last occurred error for an operation on a resource. +type LastError struct { + // A human readable message indicating details about the last error. + Description string `json:"description"` + // ID of the task which caused this last error + // +optional + TaskID *string `json:"taskID,omitempty"` + // Well-defined error codes of the last error(s). + // +optional + Codes []ErrorCode `json:"codes,omitempty"` + // Last time the error was reported + // +optional + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` +} + +// GetDescription implements LastError. +func (l *LastError) GetDescription() string { + return l.Description +} + +// GetTaskID implements LastError +func (l *LastError) GetTaskID() *string { + return l.TaskID +} + +// GetCodes implements LastError. +func (l *LastError) GetCodes() []ErrorCode { + return l.Codes +} + +// GetLastUpdateTime implements LastError. +func (l *LastError) GetLastUpdateTime() *metav1.Time { + return l.LastUpdateTime +} + +// LastOperationType is a string alias. +type LastOperationType string + +const ( + // LastOperationTypeCreate indicates a 'create' operation. + LastOperationTypeCreate LastOperationType = "Create" + // LastOperationTypeReconcile indicates a 'reconcile' operation. + LastOperationTypeReconcile LastOperationType = "Reconcile" + // LastOperationTypeDelete indicates a 'delete' operation. + LastOperationTypeDelete LastOperationType = "Delete" +) + +// LastOperationState is a string alias. +type LastOperationState string + +const ( + // LastOperationStateProcessing indicates that an operation is ongoing. + LastOperationStateProcessing LastOperationState = "Processing" + // LastOperationStateSucceeded indicates that an operation has completed successfully. + LastOperationStateSucceeded LastOperationState = "Succeeded" + // LastOperationStateError indicates that an operation is completed with errors and will be retried. + LastOperationStateError LastOperationState = "Error" + // LastOperationStateFailed indicates that an operation is completed with errors and won't be retried. + LastOperationStateFailed LastOperationState = "Failed" + // LastOperationStatePending indicates that an operation cannot be done now, but will be tried in future. + LastOperationStatePending LastOperationState = "Pending" + // LastOperationStateAborted indicates that an operation has been aborted. + LastOperationStateAborted LastOperationState = "Aborted" +) + +// LastOperation indicates the type and the state of the last operation, along with a description +// message and a progress indicator. +type LastOperation struct { + // A human readable message indicating details about the last operation. + Description string `json:"description"` + // Last time the operation state transitioned from one to another. + LastUpdateTime metav1.Time `json:"lastUpdateTime"` + // The progress in percentage (0-100) of the last operation. + Progress int `json:"progress"` + // Status of the last operation, one of Aborted, Processing, Succeeded, Error, Failed. + State LastOperationState `json:"state"` + // Type of the last operation, one of Create, Reconcile, Delete. + Type LastOperationType `json:"type"` +} + +// GetDescription implements LastOperation. +func (l *LastOperation) GetDescription() string { + return l.Description +} + +// GetLastUpdateTime implements LastOperation. +func (l *LastOperation) GetLastUpdateTime() metav1.Time { + return l.LastUpdateTime +} + +// GetProgress implements LastOperation. +func (l *LastOperation) GetProgress() int { + return l.Progress +} + +// GetState implements LastOperation. +func (l *LastOperation) GetState() LastOperationState { + return l.State +} + +// GetType implements LastOperation. +func (l *LastOperation) GetType() LastOperationType { + return l.Type +} + +// Gardener holds the information about the Gardener version that operated a resource. +type Gardener struct { + // ID is the Docker container id of the Gardener which last acted on a resource. + ID string `json:"id"` + // Name is the hostname (pod name) of the Gardener which last acted on a resource. + Name string `json:"name"` + // Version is the version of the Gardener which last acted on a resource. + Version string `json:"version"` +} + +const ( + // GardenerName is the value in a Garden resource's `.metadata.finalizers[]` array on which the Gardener will react + // when performing a delete request on a resource. + GardenerName = "gardener" + // ExternalGardenerName is the value in a Kubernetes core resources `.metadata.finalizers[]` array on which the + // Gardener will react when performing a delete request on a resource. + ExternalGardenerName = "garden.sapcloud.io/gardener" +) + +const ( + // EventReconciling indicates that the a Reconcile operation started. + EventReconciling = "Reconciling" + // EventReconciled indicates that the a Reconcile operation was successful. + EventReconciled = "Reconciled" + // EventReconcileError indicates that the a Reconcile operation failed. + EventReconcileError = "ReconcileError" + // EventDeleting indicates that the a Delete operation started. + EventDeleting = "Deleting" + // EventDeleted indicates that the a Delete operation was successful. + EventDeleted = "Deleted" + // EventDeleteError indicates that the a Delete operation failed. + EventDeleteError = "DeleteError" + // EventOperationPending + EventOperationPending = "OperationPending" +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_controllerinstallation.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_controllerinstallation.go new file mode 100644 index 000000000..c85b8ad84 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_controllerinstallation.go @@ -0,0 +1,75 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ControllerInstallation represents an installation request for an external controller. +type ControllerInstallation struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + // Spec contains the specification of this installation. + Spec ControllerInstallationSpec `json:"spec,omitempty"` + // Status contains the status of this installation. + Status ControllerInstallationStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ControllerInstallationList is a collection of ControllerInstallations. +type ControllerInstallationList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of ControllerInstallations. + Items []ControllerInstallation `json:"items"` +} + +// ControllerInstallationSpec is the specification of a ControllerInstallation. +type ControllerInstallationSpec struct { + // RegistrationRef is used to reference a ControllerRegistration resources. + RegistrationRef corev1.ObjectReference `json:"registrationRef"` + // SeedRef is used to reference a Seed resources. + SeedRef corev1.ObjectReference `json:"seedRef"` +} + +// ControllerInstallationStatus is the status of a ControllerInstallation. +type ControllerInstallationStatus struct { + // Conditions represents the latest available observations of a ControllerInstallations's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // ProviderStatus contains type-specific status. + // +optional + ProviderStatus *ProviderConfig `json:"providerStatus,omitempty"` +} + +const ( + // ControllerInstallationValid is a condition type for indicating whether the installation request is valid. + ControllerInstallationValid ConditionType = "Valid" + + // ControllerInstallationInstalled is a condition type for indicating whether the controller has been installed. + ControllerInstallationInstalled ConditionType = "Installed" +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_controllerregistration.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_controllerregistration.go new file mode 100644 index 000000000..9f88dd5a7 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_controllerregistration.go @@ -0,0 +1,78 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ControllerRegistration represents a registration of an external controller. +type ControllerRegistration struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + // Spec contains the specification of this registration. + Spec ControllerRegistrationSpec `json:"spec,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ControllerRegistrationList is a collection of ControllerRegistrations. +type ControllerRegistrationList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of ControllerRegistrations. + Items []ControllerRegistration `json:"items"` +} + +// ControllerRegistrationSpec is the specification of a ControllerRegistration. +type ControllerRegistrationSpec struct { + // Resources is a list of combinations of kinds (DNSProvider, Infrastructure, Generic, ...) and their actual types + // (aws-route53, gcp, auditlog, ...). + Resources []ControllerResource `json:"resources"` + // Deployment contains information for how this controller is deployed. + // +optional + Deployment *ControllerDeployment `json:"deployment,omitempty"` +} + +// ControllerResource is a combination of a kind (DNSProvider, Infrastructure, Generic, ...) and the actual type for this +// kind (aws-route53, gcp, auditlog, ...). +type ControllerResource struct { + // Kind is the resource kind, for example "OperatingSystemConfig". + Kind string `json:"kind"` + // Type is the resource type, for example "coreos" or "ubuntu". + Type string `json:"type"` + // GloballyEnabled determines if this ControllerResource is required by all Shoot clusters. + // +optional + GloballyEnabled *bool `json:"globallyEnabled,omitempty"` + // ReconcileTimeout defines how long Gardener should wait for the resource reconciliation. + // +optional + ReconcileTimeout *metav1.Duration `json:"reconcileTimeout,omitempty"` +} + +// ControllerDeployment contains information for how this controller is deployed. +type ControllerDeployment struct { + // Type is the deployment type. + Type string `json:"type"` + // ProviderConfig contains type-specific configuration. + // +optional + ProviderConfig *ProviderConfig `json:"providerConfig,omitempty"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_plant.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_plant.go new file mode 100644 index 000000000..073b29e2f --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_plant.go @@ -0,0 +1,112 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Plant struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // Spec contains the specification of this Plant. + Spec PlantSpec `json:"spec,omitempty"` + // Status contains the status of this Plant. + Status PlantStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PlantList is a collection of Plants. +type PlantList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of Plants. + Items []Plant `json:"items"` +} + +const ( + // PlantEveryNodeReady is a constant for a condition type indicating the node health. + PlantEveryNodeReady ConditionType = "EveryNodeReady" + // PlantAPIServerAvailable is a constant for a condition type indicating that the Plant cluster API server is available. + PlantAPIServerAvailable ConditionType = "APIServerAvailable" +) + +// PlantSpec is the specification of a Plant. +type PlantSpec struct { + // SecretRef is a reference to a Secret object containing the Kubeconfig of the external kubernetes + // clusters to be added to Gardener. + SecretRef corev1.LocalObjectReference `json:"secretRef"` + // Endpoints is the configuration plant endpoints + // +patchMergeKey=name + // +patchStrategy=merge + // +optional + Endpoints []Endpoint `json:"endpoints,omitempty" patchStrategy:"merge" patchMergeKey:"name"` +} + +// PlantStatus is the status of a Plant. +type PlantStatus struct { + // Conditions represents the latest available observations of a Plant's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // ObservedGeneration is the most recent generation observed for this Plant. It corresponds to the + // Plant's generation, which is updated on mutation by the API Server. + // +optional + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // ClusterInfo is additional computed information about the newly added cluster (Plant) + ClusterInfo *ClusterInfo `json:"clusterInfo,omitempty"` +} + +// Endpoint is an endpoint for monitoring, logging and other services around the plant. +type Endpoint struct { + // Name is the name of the endpoint + Name string `json:"name"` + // URL is the url of the endpoint + URL string `json:"url"` + // Purpose is the purpose of the endpoint + Purpose string `json:"purpose"` +} + +// ClusterInfo contains information about the Plant cluster +type ClusterInfo struct { + // Cloud describes the cloud information + Cloud CloudInfo `json:"cloud"` + // Kubernetes describes kubernetes meta information (e.g., version) + Kubernetes KubernetesInfo `json:"kubernetes"` +} + +// CloudInfo contains information about the cloud +type CloudInfo struct { + // Type is the cloud type + Type string `json:"type"` + // Region is the cloud region + Region string `json:"region"` +} + +// KubernetesInfo contains the version and configuration variables for the Plant cluster. +type KubernetesInfo struct { + // Version is the semantic Kubernetes version to use for the Plant cluster. + Version string `json:"version"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_project.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_project.go new file mode 100644 index 000000000..b3f923957 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_project.go @@ -0,0 +1,124 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Project holds certain properties about a Gardener project. +type Project struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // Spec defines the project properties. + // +optional + Spec ProjectSpec `json:"spec,omitempty"` + // Most recently observed status of the Project. + // +optional + Status ProjectStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ProjectList is a collection of Projects. +type ProjectList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of Projects. + Items []Project `json:"items"` +} + +// ProjectSpec is the specification of a Project. +type ProjectSpec struct { + // CreatedBy is a subject representing a user name, an email address, or any other identifier of a user + // who created the project. + // +optional + CreatedBy *rbacv1.Subject `json:"createdBy,omitempty"` + // Description is a human-readable description of what the project is used for. + // +optional + Description *string `json:"description,omitempty"` + // Owner is a subject representing a user name, an email address, or any other identifier of a user owning + // the project. + // +optional + Owner *rbacv1.Subject `json:"owner,omitempty"` + // Purpose is a human-readable explanation of the project's purpose. + // +optional + Purpose *string `json:"purpose,omitempty"` + // Members is a list of subjects representing a user name, an email address, or any other identifier of a user, + // group, or service account that has a certain role. + // +optional + Members []ProjectMember `json:"members,omitempty"` + // Namespace is the name of the namespace that has been created for the Project object. + // A nil value means that Gardener will determine the name of the namespace. + // +optional + Namespace *string `json:"namespace,omitempty"` +} + +// ProjectStatus holds the most recently observed status of the project. +type ProjectStatus struct { + // ObservedGeneration is the most recent generation observed for this project. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // Phase is the current phase of the project. + Phase ProjectPhase `json:"phase,omitempty"` +} + +// ProjectMember is a member of a project. +type ProjectMember struct { + // Subject is representing a user name, an email address, or any other identifier of a user, group, or service + // account that has a certain role. + rbacv1.Subject `json:",inline"` + // Role represents the role of this member. + Role string `json:"role"` +} + +const ( + // ProjectMemberAdmin is a const for a role that provides full admin access. + ProjectMemberAdmin = "admin" + // ProjectMemberViewer is a const for a role that provides limited permissions to only view some resources. + ProjectMemberViewer = "viewer" +) + +// ProjectPhase is a label for the condition of a project at the current time. +type ProjectPhase string + +const ( + // ProjectPending indicates that the project reconciliation is pending. + ProjectPending ProjectPhase = "Pending" + // ProjectReady indicates that the project reconciliation was successful. + ProjectReady ProjectPhase = "Ready" + // ProjectFailed indicates that the project reconciliation failed. + ProjectFailed ProjectPhase = "Failed" + // ProjectTerminating indicates that the project is in termination process. + ProjectTerminating ProjectPhase = "Terminating" + + // ProjectEventNamespaceReconcileFailed indicates that the namespace reconciliation has failed. + ProjectEventNamespaceReconcileFailed = "NamespaceReconcileFailed" + // ProjectEventNamespaceReconcileSuccessful indicates that the namespace reconciliation has succeeded. + ProjectEventNamespaceReconcileSuccessful = "NamespaceReconcileSuccessful" + // ProjectEventNamespaceDeletionFailed indicates that the namespace deletion failed. + ProjectEventNamespaceDeletionFailed = "NamespaceDeletionFailed" + // ProjectEventNamespaceMarkedForDeletion indicates that the namespace has been successfully marked for deletion. + ProjectEventNamespaceMarkedForDeletion = "NamespaceMarkedForDeletion" +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_quota.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_quota.go new file mode 100644 index 000000000..cda5b1040 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_quota.go @@ -0,0 +1,56 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Quota struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // Spec defines the Quota constraints. + // +optional + Spec QuotaSpec `json:"spec,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// QuotaList is a collection of Quotas. +type QuotaList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of Quotas. + Items []Quota `json:"items"` +} + +// QuotaSpec is the specification of a Quota. +type QuotaSpec struct { + // ClusterLifetimeDays is the lifetime of a Shoot cluster in days before it will be terminated automatically. + // +optional + ClusterLifetimeDays *int `json:"clusterLifetimeDays,omitempty"` + // Metrics is a list of resources which will be put under constraints. + Metrics corev1.ResourceList `json:"metrics"` + // Scope is the scope of the Quota object, either 'project' or 'secret'. + Scope corev1.ObjectReference `json:"scope"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_secretbinding.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_secretbinding.go new file mode 100644 index 000000000..a726a66d5 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_secretbinding.go @@ -0,0 +1,47 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SecretBinding struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // SecretRef is a reference to a secret object in the same or another namespace. + SecretRef corev1.SecretReference `json:"secretRef"` + // Quotas is a list of references to Quota objects in the same or another namespace. + // +optional + Quotas []corev1.ObjectReference `json:"quotas,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SecretBindingList is a collection of SecretBindings. +type SecretBindingList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of SecretBindings. + Items []SecretBinding `json:"items"` +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_seed.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_seed.go new file mode 100644 index 000000000..76046ff6d --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_seed.go @@ -0,0 +1,191 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Seed represents an installation request for an external controller. +type Seed struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + // Spec contains the specification of this installation. + Spec SeedSpec `json:"spec,omitempty"` + // Status contains the status of this installation. + Status SeedStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SeedList is a collection of Seeds. +type SeedList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of Seeds. + Items []Seed `json:"items"` +} + +// SeedSpec is the specification of a Seed. +type SeedSpec struct { + // Backup holds the object store configuration for the backups of shoot (currently only etcd). + // If it is not specified, then there won't be any backups taken for shoots associated with this seed. + // If backup field is present in seed, then backups of the etcd from shoot control plane will be stored + // under the configured object store. + // +optional + Backup *SeedBackup `json:"backup,omitempty"` + // DNS contains DNS-relevant information about this seed cluster. + DNS SeedDNS `json:"dns"` + // Networks defines the pod, service and worker network of the Seed cluster. + Networks SeedNetworks `json:"networks"` + // Provider defines the provider type and region for this Seed cluster. + Provider SeedProvider `json:"provider"` + // SecretRef is a reference to a Secret object containing the Kubeconfig and the cloud provider credentials for + // the account the Seed cluster has been deployed to. + // +optional + SecretRef *corev1.SecretReference `json:"secretRef,omitempty"` + // Taints describes taints on the seed. + // +optional + Taints []SeedTaint `json:"taints,omitempty"` + // Volume contains settings for persistentvolumes created in the seed cluster. + // +optional + Volume *SeedVolume `json:"volume,omitempty"` +} + +// SeedStatus is the status of a Seed. +type SeedStatus struct { + // Gardener holds information about the Gardener which last acted on the Shoot. + // +optional + Gardener *Gardener `json:"gardener,omitempty"` + // KubernetesVersion is the Kubernetes version of the seed cluster. + // +optional + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // Conditions represents the latest available observations of a Seed's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // ObservedGeneration is the most recent generation observed for this Seed. It corresponds to the + // Seed's generation, which is updated on mutation by the API Server. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` +} + +// SeedBackup contains the object store configuration for backups for shoot (currently only etcd). +type SeedBackup struct { + // Provider is a provider name. + Provider string `json:"provider"` + // Region is a region name. + // +optional + Region *string `json:"region,omitempty"` + // SecretRef is a reference to a Secret object containing the cloud provider credentials for + // the object store where backups should be stored. It should have enough privileges to manipulate + // the objects as well as buckets. + SecretRef corev1.SecretReference `json:"secretRef"` +} + +// SeedDNS contains DNS-relevant information about this seed cluster. +type SeedDNS struct { + // IngressDomain is the domain of the Seed cluster pointing to the ingress controller endpoint. It will be used + // to construct ingress URLs for system applications running in Shoot clusters. + IngressDomain string `json:"ingressDomain"` +} + +// SeedNetworks contains CIDRs for the pod, service and node networks of a Kubernetes cluster. +type SeedNetworks struct { + // Nodes is the CIDR of the node network. + Nodes string `json:"nodes"` + // Pods is the CIDR of the pod network. + Pods string `json:"pods"` + // Services is the CIDR of the service network. + Services string `json:"services"` + // ShootDefaults contains the default networks CIDRs for shoots. + // +optional + ShootDefaults *ShootNetworks `json:"shootDefaults,omitempty"` + // BlockCIDRs is a list of network addresses that should be blocked for shoot control plane components running + // in the seed cluster. + // +optional + BlockCIDRs []string `json:"blockCIDRs,omitempty"` +} + +// ShootNetworks contains the default networks CIDRs for shoots. +type ShootNetworks struct { + // Pods is the CIDR of the pod network. + // +optional + Pods *string `json:"pods,omitempty"` + // Services is the CIDR of the service network. + // +optional + Services *string `json:"services,omitempty"` +} + +// SeedProvider defines the provider type and region for this Seed cluster. +type SeedProvider struct { + // Type is the name of the provider. + Type string `json:"type"` + // Region is a name of a region. + Region string `json:"region"` +} + +// SeedTaint describes a taint on a seed. +type SeedTaint struct { + // Key is the taint key to be applied to a seed. + Key string `json:"key"` + // Value is the taint value corresponding to the taint key. + // +optional + Value *string `json:"value,omitempty"` +} + +const ( + // SeedTaintProtected is a constant for a taint key on a seed that marks it as protected. Protected seeds + // may only be used by shoots in the `garden` namespace. + SeedTaintProtected = "seed.gardener.cloud/protected" + // SeedTaintInvisible is a constant for a taint key on a seed that marks it as invisible. Invisible seeds + // are not considered by the gardener-scheduler. + SeedTaintInvisible = "seed.gardener.cloud/invisible" +) + +// SeedVolume contains settings for persistentvolumes created in the seed cluster. +type SeedVolume struct { + // MinimumSize defines the minimum size that should be used for PVCs in the seed. + // +optional + MinimumSize *resource.Quantity `json:"minimumSize,omitempty"` + // Providers is a list of storage class provisioner types for the seed. + // +patchMergeKey=name + // +patchStrategy=merge + // +optional + Providers []SeedVolumeProvider `json:"providers,omitempty" patchStrategy:"merge" patchMergeKey:"name"` +} + +// SeedVolumeProvider is a storage class provisioner type. +type SeedVolumeProvider struct { + // Purpose is the purpose of this provider. + Purpose string `json:"purpose"` + // Name is the name of the storage class provisioner type. + Name string `json:"name"` +} + +const ( + // SeedAvailable is a constant for a condition type indicating the Seed cluster availability. + SeedAvailable ConditionType = "Available" +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_shoot.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_shoot.go new file mode 100644 index 000000000..c440e0907 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_shoot.go @@ -0,0 +1,908 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + "encoding/json" + "time" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Shoot struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // Specification of the Shoot cluster. + // +optional + Spec ShootSpec `json:"spec,omitempty"` + // Most recently observed status of the Shoot cluster. + // +optional + Status ShootStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ShootList is a list of Shoot objects. +type ShootList struct { + metav1.TypeMeta `json:",inline"` + // Standard list object metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // Items is the list of Shoots. + Items []Shoot `json:"items"` +} + +// ShootSpec is the specification of a Shoot. +type ShootSpec struct { + // Addons contains information about enabled/disabled addons and their configuration. + // +optional + Addons *Addons `json:"addons,omitempty"` + // CloudProfileName is a name of a CloudProfile object. + CloudProfileName string `json:"cloudProfileName"` + // DNS contains information about the DNS settings of the Shoot. + // +optional + DNS *DNS `json:"dns,omitempty"` + // Extensions contain type and provider information for Shoot extensions. + // +optional + Extensions []Extension `json:"extensions,omitempty"` + // Hibernation contains information whether the Shoot is suspended or not. + // +optional + Hibernation *Hibernation `json:"hibernation,omitempty"` + // Kubernetes contains the version and configuration settings of the control plane components. + Kubernetes Kubernetes `json:"kubernetes"` + // Networking contains information about cluster networking such as CNI Plugin type, CIDRs, ...etc. + Networking Networking `json:"networking"` + // Maintenance contains information about the time window for maintenance operations and which + // operations should be performed. + // +optional + Maintenance *Maintenance `json:"maintenance,omitempty"` + // Monitoring contains information about custom monitoring configurations for the shoot. + // +optional + Monitoring *Monitoring `json:"monitoring,omitempty"` + // Provider contains all provider-specific and provider-relevant information. + Provider Provider `json:"provider"` + // Region is a name of a region. + Region string `json:"region"` + // SecretBindingName is the name of the a SecretBinding that has a reference to the provider secret. + // The credentials inside the provider secret will be used to create the shoot in the respective account. + SecretBindingName string `json:"secretBindingName"` + // SeedName is the name of the seed cluster that runs the control plane of the Shoot. + // +optional + SeedName *string `json:"seedName,omitempty"` +} + +// ShootStatus holds the most recently observed status of the Shoot cluster. +type ShootStatus struct { + // Conditions represents the latest available observations of a Shoots's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // Constraints represents conditions of a Shoot's current state that constraint some operations on it. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Constraints []Condition `json:"constraints,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // Gardener holds information about the Gardener which last acted on the Shoot. + Gardener Gardener `json:"gardener"` + // IsHibernated indicates whether the Shoot is currently hibernated. + IsHibernated bool `json:"hibernated"` + // LastOperation holds information about the last operation on the Shoot. + // +optional + LastOperation *LastOperation `json:"lastOperation,omitempty"` + // LastErrors holds information about the last occurred error(s) during an operation. + // +optional + LastErrors []LastError `json:"lastErrors,omitempty"` + // ObservedGeneration is the most recent generation observed for this Shoot. It corresponds to the + // Shoot's generation, which is updated on mutation by the API Server. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // RetryCycleStartTime is the start time of the last retry cycle (used to determine how often an operation + // must be retried until we give up). + // +optional + RetryCycleStartTime *metav1.Time `json:"retryCycleStartTime,omitempty"` + // SeedName is the name of the seed cluster that runs the control plane of the Shoot. This value is only written + // after a successful create/reconcile operation. It will be used when control planes are moved between Seeds. + // +optional + SeedName *string `json:"seedName,omitempty"` + // TechnicalID is the name that is used for creating the Seed namespace, the infrastructure resources, and + // basically everything that is related to this particular Shoot. + TechnicalID string `json:"technicalID"` + // UID is a unique identifier for the Shoot cluster to avoid portability between Kubernetes clusters. + // It is used to compute unique hashes. + UID types.UID `json:"uid"` +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// Addons relevant types // +////////////////////////////////////////////////////////////////////////////////////////////////// + +// Addons is a collection of configuration for specific addons which are managed by the Gardener. +type Addons struct { + // KubernetesDashboard holds configuration settings for the kubernetes dashboard addon. + // +optional + KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` + // NginxIngress holds configuration settings for the nginx-ingress addon. + // +optional + NginxIngress *NginxIngress `json:"nginxIngress,omitempty"` +} + +// Addon also enabling or disabling a specific addon and is used to derive from. +type Addon struct { + // Enabled indicates whether the addon is enabled or not. + Enabled bool `json:"enabled"` +} + +// KubernetesDashboard describes configuration values for the kubernetes-dashboard addon. +type KubernetesDashboard struct { + Addon `json:",inline"` + // AuthenticationMode defines the authentication mode for the kubernetes-dashboard. + // +optional + AuthenticationMode *string `json:"authenticationMode,omitempty"` +} + +const ( + // KubernetesDashboardAuthModeBasic uses basic authentication mode for auth. + KubernetesDashboardAuthModeBasic = "basic" + // KubernetesDashboardAuthModeToken uses token-based mode for auth. + KubernetesDashboardAuthModeToken = "token" +) + +// NginxIngress describes configuration values for the nginx-ingress addon. +type NginxIngress struct { + Addon `json:",inline"` + // LoadBalancerSourceRanges is list of whitelist IP sources for NginxIngress + // +optional + LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"` + // Config contains custom configuration for the nginx-ingress-controller configuration. + // See https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md#configuration-options + // +optional + Config map[string]string `json:"config,omitempty"` + // ExternalTrafficPolicy controls the `.spec.externalTrafficPolicy` value of the load balancer `Service` + // exposing the nginx-ingress. Defaults to `Cluster`. + // +optional + ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"` +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// DNS relevant types // +////////////////////////////////////////////////////////////////////////////////////////////////// + +// DNS holds information about the provider, the hosted zone id and the domain. +type DNS struct { + // Domain is the external available domain of the Shoot cluster. This domain will be written into the + // kubeconfig that is handed out to end-users. + // +optional + Domain *string `json:"domain,omitempty"` + // Providers is a list of DNS providers that shall be enabled for this shoot cluster. Only relevant if + // not a default domain is used. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Providers []DNSProvider `json:"providers,omitempty" patchStrategy:"merge" patchMergeKey:"type"` +} + +// DNSProvider contains information about a DNS provider. +type DNSProvider struct { + // Domains contains information about which domains shall be included/excluded for this provider. + // +optional + Domains *DNSIncludeExclude `json:"domains,omitempty"` + // SecretName is a name of a secret containing credentials for the stated domain and the + // provider. When not specified, the Gardener will use the cloud provider credentials referenced + // by the Shoot and try to find respective credentials there. Specifying this field may override + // this behavior, i.e. forcing the Gardener to only look into the given secret. + // +optional + SecretName *string `json:"secretName,omitempty"` + // Type is the DNS provider type for the Shoot. Only relevant if not the default domain is used for + // this shoot. + // +optional + Type *string `json:"type,omitempty"` + // Zones contains information about which hosted zones shall be included/excluded for this provider. + // +optional + Zones *DNSIncludeExclude `json:"zones,omitempty"` +} + +type DNSIncludeExclude struct { + // Include is a list of resources that shall be included. + // +optional + Include []string `json:"include,omitempty"` + // Exclude is a list of resources that shall be excluded. + // +optional + Exclude []string `json:"exclude,omitempty"` +} + +// DefaultDomain is the default value in the Shoot's '.spec.dns.domain' when '.spec.dns.provider' is 'unmanaged' +const DefaultDomain = "cluster.local" + +////////////////////////////////////////////////////////////////////////////////////////////////// +// Extension relevant types // +////////////////////////////////////////////////////////////////////////////////////////////////// + +// Extension contains type and provider information for Shoot extensions. +type Extension struct { + // Type is the type of the extension resource. + Type string `json:"type"` + // ProviderConfig is the configuration passed to extension resource. + // +optional + ProviderConfig *ProviderConfig `json:"providerConfig,omitempty"` +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// Hibernation relevant types // +////////////////////////////////////////////////////////////////////////////////////////////////// + +// Hibernation contains information whether the Shoot is suspended or not. +type Hibernation struct { + // Enabled specifies whether the Shoot needs to be hibernated or not. If it is true, the Shoot's desired state is to be hibernated. + // If it is false or nil, the Shoot's desired state is to be awaken. + // +optional + Enabled *bool `json:"enabled,omitempty"` + // Schedules determine the hibernation schedules. + // +optional + Schedules []HibernationSchedule `json:"schedules,omitempty"` +} + +// HibernationSchedule determines the hibernation schedule of a Shoot. +// A Shoot will be regularly hibernated at each start time and will be woken up at each end time. +// Start or End can be omitted, though at least one of each has to be specified. +type HibernationSchedule struct { + // Start is a Cron spec at which time a Shoot will be hibernated. + // +optional + Start *string `json:"start,omitempty"` + // End is a Cron spec at which time a Shoot will be woken up. + // +optional + End *string `json:"end,omitempty"` + // Location is the time location in which both start and and shall be evaluated. + // +optional + Location *string `json:"location,omitempty"` +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// Kubernetes relevant types // +////////////////////////////////////////////////////////////////////////////////////////////////// + +// Kubernetes contains the version and configuration variables for the Shoot control plane. +type Kubernetes struct { + // AllowPrivilegedContainers indicates whether privileged containers are allowed in the Shoot (default: true). + // +optional + AllowPrivilegedContainers *bool `json:"allowPrivilegedContainers,omitempty"` + // ClusterAutoscaler contains the configration flags for the Kubernetes cluster autoscaler. + // +optional + ClusterAutoscaler *ClusterAutoscaler `json:"clusterAutoscaler,omitempty"` + // KubeAPIServer contains configuration settings for the kube-apiserver. + // +optional + KubeAPIServer *KubeAPIServerConfig `json:"kubeAPIServer,omitempty"` + // KubeControllerManager contains configuration settings for the kube-controller-manager. + // +optional + KubeControllerManager *KubeControllerManagerConfig `json:"kubeControllerManager,omitempty"` + // KubeScheduler contains configuration settings for the kube-scheduler. + // +optional + KubeScheduler *KubeSchedulerConfig `json:"kubeScheduler,omitempty"` + // KubeProxy contains configuration settings for the kube-proxy. + // +optional + KubeProxy *KubeProxyConfig `json:"kubeProxy,omitempty"` + // Kubelet contains configuration settings for the kubelet. + // +optional + Kubelet *KubeletConfig `json:"kubelet,omitempty"` + // Version is the semantic Kubernetes version to use for the Shoot cluster. + Version string `json:"version"` +} + +// ClusterAutoscaler contains the configration flags for the Kubernetes cluster autoscaler. +type ClusterAutoscaler struct { + // ScaleDownDelayAfterAdd defines how long after scale up that scale down evaluation resumes (default: 10 mins). + // +optional + ScaleDownDelayAfterAdd *metav1.Duration `json:"scaleDownDelayAfterAdd,omitempty"` + // ScaleDownDelayAfterDelete how long after node deletion that scale down evaluation resumes, defaults to scanInterval (defaults to ScanInterval). + // +optional + ScaleDownDelayAfterDelete *metav1.Duration `json:"scaleDownDelayAfterDelete,omitempty"` + // ScaleDownDelayAfterFailure how long after scale down failure that scale down evaluation resumes (default: 3 mins). + // +optional + ScaleDownDelayAfterFailure *metav1.Duration `json:"scaleDownDelayAfterFailure,omitempty"` + // ScaleDownUnneededTime defines how long a node should be unneeded before it is eligible for scale down (default: 10 mins). + // +optional + ScaleDownUnneededTime *metav1.Duration `json:"scaleDownUnneededTime,omitempty"` + // ScaleDownUtilizationThreshold defines the threshold in % under which a node is being removed + // +optional + ScaleDownUtilizationThreshold *float64 `json:"scaleDownUtilizationThreshold,omitempty"` + // ScanInterval how often cluster is reevaluated for scale up or down (default: 10 secs). + // +optional + ScanInterval *metav1.Duration `json:"scanInterval,omitempty"` +} + +// KubernetesConfig contains common configuration fields for the control plane components. +type KubernetesConfig struct { + // FeatureGates contains information about enabled feature gates. + // +optional + FeatureGates map[string]bool `json:"featureGates,omitempty"` +} + +// KubeAPIServerConfig contains configuration settings for the kube-apiserver. +type KubeAPIServerConfig struct { + KubernetesConfig `json:",inline"` + // AdmissionPlugins contains the list of user-defined admission plugins (additional to those managed by Gardener), and, if desired, the corresponding + // configuration. + // +patchMergeKey=name + // +patchStrategy=merge + // +optional + AdmissionPlugins []AdmissionPlugin `json:"admissionPlugins,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + // APIAudiences are the identifiers of the API. The service account token authenticator will + // validate that tokens used against the API are bound to at least one of these audiences. + // If `serviceAccountConfig.issuer` is configured and this is not, this defaults to a single + // element list containing the issuer URL. + // +optional + APIAudiences []string `json:"apiAudiences,omitempty"` + // AuditConfig contains configuration settings for the audit of the kube-apiserver. + // +optional + AuditConfig *AuditConfig `json:"auditConfig,omitempty"` + // EnableBasicAuthentication defines whether basic authentication should be enabled for this cluster or not. + // +optional + EnableBasicAuthentication *bool `json:"enableBasicAuthentication,omitempty"` + // OIDCConfig contains configuration settings for the OIDC provider. + // +optional + OIDCConfig *OIDCConfig `json:"oidcConfig,omitempty"` + // RuntimeConfig contains information about enabled or disabled APIs. + // +optional + RuntimeConfig map[string]bool `json:"runtimeConfig,omitempty"` + // ServiceAccountConfig contains configuration settings for the service account handling + // of the kube-apiserver. + // +optional + ServiceAccountConfig *ServiceAccountConfig `json:"serviceAccountConfig,omitempty"` +} + +// ServiceAccountConfig is the kube-apiserver configuration for service accounts. +type ServiceAccountConfig struct { + // Issuer is the identifier of the service account token issuer. The issuer will assert this + // identifier in "iss" claim of issued tokens. This value is a string or URI. + // +optional + Issuer *string `json:"issuer,omitempty"` + // SigningKeySecret is a reference to a secret that contains the current private key of the + // service account token issuer. The issuer will sign issued ID tokens with this private key. + // (Requires the 'TokenRequest' feature gate.) + // +optional + SigningKeySecret *corev1.LocalObjectReference `json:"signingKeySecretName,omitempty"` +} + +// AuditConfig contains settings for audit of the api server +type AuditConfig struct { + // AuditPolicy contains configuration settings for audit policy of the kube-apiserver. + // +optional + AuditPolicy *AuditPolicy `json:"auditPolicy,omitempty"` +} + +// AuditPolicy contains audit policy for kube-apiserver +type AuditPolicy struct { + // ConfigMapRef is a reference to a ConfigMap object in the same namespace, + // which contains the audit policy for the kube-apiserver. + // +optional + ConfigMapRef *corev1.ObjectReference `json:"configMapRef,omitempty"` +} + +// OIDCConfig contains configuration settings for the OIDC provider. +// Note: Descriptions were taken from the Kubernetes documentation. +type OIDCConfig struct { + // If set, the OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file, otherwise the host's root CA set will be used. + // +optional + CABundle *string `json:"caBundle,omitempty"` + // ClientAuthentication can optionally contain client configuration used for kubeconfig generation. + // +optional + ClientAuthentication *OpenIDConnectClientAuthentication `json:"clientAuthentication,omitempty"` + // The client ID for the OpenID Connect client, must be set if oidc-issuer-url is set. + // +optional + ClientID *string `json:"clientID,omitempty"` + // If provided, the name of a custom OpenID Connect claim for specifying user groups. The claim value is expected to be a string or array of strings. This flag is experimental, please see the authentication documentation for further details. + // +optional + GroupsClaim *string `json:"groupsClaim,omitempty"` + // If provided, all groups will be prefixed with this value to prevent conflicts with other authentication strategies. + // +optional + GroupsPrefix *string `json:"groupsPrefix,omitempty"` + // The URL of the OpenID issuer, only HTTPS scheme will be accepted. If set, it will be used to verify the OIDC JSON Web Token (JWT). + // +optional + IssuerURL *string `json:"issuerURL,omitempty"` + // ATTENTION: Only meaningful for Kubernetes >= 1.11 + // key=value pairs that describes a required claim in the ID Token. If set, the claim is verified to be present in the ID Token with a matching value. + // +optional + RequiredClaims map[string]string `json:"requiredClaims,omitempty"` + // List of allowed JOSE asymmetric signing algorithms. JWTs with a 'alg' header value not in this list will be rejected. Values are defined by RFC 7518 https://tools.ietf.org/html/rfc7518#section-3.1 + // +optional + SigningAlgs []string `json:"signingAlgs,omitempty"` + // The OpenID claim to use as the user name. Note that claims other than the default ('sub') is not guaranteed to be unique and immutable. This flag is experimental, please see the authentication documentation for further details. (default "sub") + // +optional + UsernameClaim *string `json:"usernameClaim,omitempty"` + // If provided, all usernames will be prefixed with this value. If not provided, username claims other than 'email' are prefixed by the issuer URL to avoid clashes. To skip any prefixing, provide the value '-'. + // +optional + UsernamePrefix *string `json:"usernamePrefix,omitempty"` +} + +// OpenIDConnectClientAuthentication contains configuration for OIDC clients. +type OpenIDConnectClientAuthentication struct { + // Extra configuration added to kubeconfig's auth-provider. + // Must not be any of idp-issuer-url, client-id, client-secret, idp-certificate-authority, idp-certificate-authority-data, id-token or refresh-token + // +optional + ExtraConfig map[string]string `json:"extraConfig,omitempty"` + // The client Secret for the OpenID Connect client. + // +optional + Secret *string `json:"secret,omitempty"` +} + +// AdmissionPlugin contains information about a specific admission plugin and its corresponding configuration. +type AdmissionPlugin struct { + // Name is the name of the plugin. + Name string `json:"name"` + // Config is the configuration of the plugin. + // +optional + Config *ProviderConfig `json:"config,omitempty"` +} + +// KubeControllerManagerConfig contains configuration settings for the kube-controller-manager. +type KubeControllerManagerConfig struct { + KubernetesConfig `json:",inline"` + // HorizontalPodAutoscalerConfig contains horizontal pod autoscaler configuration settings for the kube-controller-manager. + // +optional + HorizontalPodAutoscalerConfig *HorizontalPodAutoscalerConfig `json:"horizontalPodAutoscaler,omitempty"` + // NodeCIDRMaskSize defines the mask size for node cidr in cluster (default is 24) + // +optional + NodeCIDRMaskSize *int32 `json:"nodeCIDRMaskSize,omitempty"` +} + +// GardenerDuration is a workaround for missing OpenAPI functions on metav1.Duration struct. +type GardenerDuration struct { + time.Duration `protobuf:"varint,1,opt,name=duration,casttype=time.Duration"` +} + +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (GardenerDuration) OpenAPISchemaType() []string { return []string{"string"} } + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (GardenerDuration) OpenAPISchemaFormat() string { return "date-time" } + +// UnmarshalJSON implements the json.Unmarshaller interface. +func (d *GardenerDuration) UnmarshalJSON(b []byte) error { + var str string + if err := json.Unmarshal(b, &str); err != nil { + return err + } + + pd, err := time.ParseDuration(str) + if err != nil { + return err + } + d.Duration = pd + + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (d *GardenerDuration) MarshalJSON() ([]byte, error) { + return json.Marshal(d.Duration.String()) +} + +// HorizontalPodAutoscalerConfig contains horizontal pod autoscaler configuration settings for the kube-controller-manager. +// Note: Descriptions were taken from the Kubernetes documentation. +type HorizontalPodAutoscalerConfig struct { + // The period after which a ready pod transition is considered to be the first. + // +optional + CPUInitializationPeriod *GardenerDuration `json:"cpuInitializationPeriod,omitempty"` + // The period since last downscale, before another downscale can be performed in horizontal pod autoscaler. + // +optional + DownscaleDelay *GardenerDuration `json:"downscaleDelay,omitempty"` + // The configurable window at which the controller will choose the highest recommendation for autoscaling. + // +optional + DownscaleStabilization *GardenerDuration `json:"downscaleStabilization,omitempty"` + // The configurable period at which the horizontal pod autoscaler considers a Pod “not yet ready” given that it’s unready and it has transitioned to unready during that time. + // +optional + InitialReadinessDelay *GardenerDuration `json:"initialReadinessDelay,omitempty"` + // The period for syncing the number of pods in horizontal pod autoscaler. + // +optional + SyncPeriod *GardenerDuration `json:"syncPeriod,omitempty"` + // The minimum change (from 1.0) in the desired-to-actual metrics ratio for the horizontal pod autoscaler to consider scaling. + // +optional + Tolerance *float64 `json:"tolerance,omitempty"` + // The period since last upscale, before another upscale can be performed in horizontal pod autoscaler. + // +optional + UpscaleDelay *GardenerDuration `json:"upscaleDelay,omitempty"` +} + +const ( + // DefaultHPADownscaleDelay is a constant for the default HPA downscale delay for a Shoot cluster. + DefaultHPADownscaleDelay = 15 * time.Minute + // DefaultHPASyncPeriod is a constant for the default HPA sync period for a Shoot cluster. + DefaultHPASyncPeriod = 30 * time.Second + // DefaultHPATolerance is a constant for the default HPA tolerance for a Shoot cluster. + DefaultHPATolerance = 0.1 + // DefaultHPAUpscaleDelay is for the default HPA upscale delay for a Shoot cluster. + DefaultHPAUpscaleDelay = 1 * time.Minute + // DefaultDownscaleStabilization is the default HPA downscale stabilization window for a Shoot cluster + DefaultDownscaleStabilization = 5 * time.Minute + // DefaultInitialReadinessDelay is for the default HPA ReadinessDelay value in the Shoot cluster + DefaultInitialReadinessDelay = 30 * time.Second + // DefaultCPUInitializationPeriod is the for the default value of the CPUInitializationPeriod in the Shoot cluster + DefaultCPUInitializationPeriod = 5 * time.Minute +) + +// KubeSchedulerConfig contains configuration settings for the kube-scheduler. +type KubeSchedulerConfig struct { + KubernetesConfig `json:",inline"` +} + +// KubeProxyConfig contains configuration settings for the kube-proxy. +type KubeProxyConfig struct { + KubernetesConfig `json:",inline"` + // Mode specifies which proxy mode to use. + // defaults to IPTables. + // +optional + Mode *ProxyMode `json:"mode,omitempty"` +} + +// ProxyMode available in Linux platform: 'userspace' (older, going to be EOL), 'iptables' +// (newer, faster), 'ipvs' (newest, better in performance and scalability). +// As of now only 'iptables' and 'ipvs' is supported by Gardener. +// In Linux platform, if the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are +// insufficient, this always falls back to the userspace proxy. IPVS mode will be enabled when proxy mode is set to 'ipvs', +// and the fall back path is firstly iptables and then userspace. +type ProxyMode string + +const ( + // ProxyModeIPTables uses iptables as proxy implementation. + ProxyModeIPTables ProxyMode = "IPTables" + // ProxyModeIPVS uses ipvs as proxy implementation. + ProxyModeIPVS ProxyMode = "IPVS" +) + +// KubeletConfig contains configuration settings for the kubelet. +type KubeletConfig struct { + KubernetesConfig `json:",inline"` + // CPUCFSQuota allows you to disable/enable CPU throttling for Pods. + // +optional + CPUCFSQuota *bool `json:"cpuCFSQuota,omitempty"` + // CPUManagerPolicy allows to set alternative CPU management policies (default: none). + // +optional + CPUManagerPolicy *string `json:"cpuManagerPolicy,omitempty"` + // EvictionHard describes a set of eviction thresholds (e.g. memory.available<1Gi) that if met would trigger a Pod eviction. + // +optional + // Default: + // memory.available: "100Mi/1Gi/5%" + // nodefs.available: "5%" + // nodefs.inodesFree: "5%" + // imagefs.available: "5%" + // imagefs.inodesFree: "5%" + EvictionHard *KubeletConfigEviction `json:"evictionHard,omitempty"` + // EvictionMaxPodGracePeriod describes the maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met. + // +optional + // Default: 90 + EvictionMaxPodGracePeriod *int32 `json:"evictionMaxPodGracePeriod,omitempty"` + // EvictionMinimumReclaim configures the amount of resources below the configured eviction threshold that the kubelet attempts to reclaim whenever the kubelet observes resource pressure. + // +optional + // Default: 0 for each resource + EvictionMinimumReclaim *KubeletConfigEvictionMinimumReclaim `json:"evictionMinimumReclaim,omitempty"` + // EvictionPressureTransitionPeriod is the duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. + // +optional + // Default: 4m0s + EvictionPressureTransitionPeriod *metav1.Duration `json:"evictionPressureTransitionPeriod,omitempty"` + // EvictionSoft describes a set of eviction thresholds (e.g. memory.available<1.5Gi) that if met over a corresponding grace period would trigger a Pod eviction. + // +optional + // Default: + // memory.available: "200Mi/1.5Gi/10%" + // nodefs.available: "10%" + // nodefs.inodesFree: "10%" + // imagefs.available: "10%" + // imagefs.inodesFree: "10%" + EvictionSoft *KubeletConfigEviction `json:"evictionSoft,omitempty"` + // EvictionSoftGracePeriod describes a set of eviction grace periods (e.g. memory.available=1m30s) that correspond to how long a soft eviction threshold must hold before triggering a Pod eviction. + // +optional + // Default: + // memory.available: 1m30s + // nodefs.available: 1m30s + // nodefs.inodesFree: 1m30s + // imagefs.available: 1m30s + // imagefs.inodesFree: 1m30s + EvictionSoftGracePeriod *KubeletConfigEvictionSoftGracePeriod `json:"evictionSoftGracePeriod,omitempty"` + // MaxPods is the maximum number of Pods that are allowed by the Kubelet. + // +optional + // Default: 110 + MaxPods *int32 `json:"maxPods,omitempty"` + // PodPIDsLimit is the maximum number of process IDs per pod allowed by the kubelet. + // +optional + PodPIDsLimit *int64 `json:"podPidsLimit,omitempty"` +} + +// KubeletConfigEviction contains kubelet eviction thresholds supporting either a resource.Quantity or a percentage based value. +type KubeletConfigEviction struct { + // MemoryAvailable is the threshold for the free memory on the host server. + // +optional + MemoryAvailable *string `json:"memoryAvailable,omitempty"` + // ImageFSAvailable is the threshold for the free disk space in the imagefs filesystem (docker images and container writable layers). + // +optional + ImageFSAvailable *string `json:"imageFSAvailable,omitempty"` + // ImageFSInodesFree is the threshold for the available inodes in the imagefs filesystem. + // +optional + ImageFSInodesFree *string `json:"imageFSInodesFree,omitempty"` + // NodeFSAvailable is the threshold for the free disk space in the nodefs filesystem (docker volumes, logs, etc). + // +optional + NodeFSAvailable *string `json:"nodeFSAvailable,omitempty"` + // NodeFSInodesFree is the threshold for the available inodes in the nodefs filesystem. + // +optional + NodeFSInodesFree *string `json:"nodeFSInodesFree,omitempty"` +} + +// KubeletConfigEviction contains configuration for the kubelet eviction minimum reclaim. +type KubeletConfigEvictionMinimumReclaim struct { + // MemoryAvailable is the threshold for the memory reclaim on the host server. + // +optional + MemoryAvailable *resource.Quantity `json:"memoryAvailable,omitempty"` + // ImageFSAvailable is the threshold for the disk space reclaim in the imagefs filesystem (docker images and container writable layers). + // +optional + ImageFSAvailable *resource.Quantity `json:"imageFSAvailable,omitempty"` + // ImageFSInodesFree is the threshold for the inodes reclaim in the imagefs filesystem. + // +optional + ImageFSInodesFree *resource.Quantity `json:"imageFSInodesFree,omitempty"` + // NodeFSAvailable is the threshold for the disk space reclaim in the nodefs filesystem (docker volumes, logs, etc). + // +optional + NodeFSAvailable *resource.Quantity `json:"nodeFSAvailable,omitempty"` + // NodeFSInodesFree is the threshold for the inodes reclaim in the nodefs filesystem. + // +optional + NodeFSInodesFree *resource.Quantity `json:"nodeFSInodesFree,omitempty"` +} + +// KubeletConfigEvictionSoftGracePeriod contains grace periods for kubelet eviction thresholds. +type KubeletConfigEvictionSoftGracePeriod struct { + // MemoryAvailable is the grace period for the MemoryAvailable eviction threshold. + // +optional + MemoryAvailable *metav1.Duration `json:"memoryAvailable,omitempty"` + // ImageFSAvailable is the grace period for the ImageFSAvailable eviction threshold. + // +optional + ImageFSAvailable *metav1.Duration `json:"imageFSAvailable,omitempty"` + // ImageFSInodesFree is the grace period for the ImageFSInodesFree eviction threshold. + // +optional + ImageFSInodesFree *metav1.Duration `json:"imageFSInodesFree,omitempty"` + // NodeFSAvailable is the grace period for the NodeFSAvailable eviction threshold. + // +optional + NodeFSAvailable *metav1.Duration `json:"nodeFSAvailable,omitempty"` + // NodeFSInodesFree is the grace period for the NodeFSInodesFree eviction threshold. + // +optional + NodeFSInodesFree *metav1.Duration `json:"nodeFSInodesFree,omitempty"` +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// Networking relevant types // +////////////////////////////////////////////////////////////////////////////////////////////////// + +// Networking defines networking parameters for the shoot cluster. +type Networking struct { + // Type identifies the type of the networking plugin. + Type string `json:"type"` + // ProviderConfig is the configuration passed to network resource. + // +optional + ProviderConfig *ProviderConfig `json:"providerConfig,omitempty"` + // Pods is the CIDR of the pod network. + // +optional + Pods *string `json:"pods,omitempty"` + // Nodes is the CIDR of the entire node network. + Nodes string `json:"nodes"` + // Services is the CIDR of the service network. + // +optional + Services *string `json:"services,omitempty"` +} + +const ( + // DefaultPodNetworkCIDR is a constant for the default pod network CIDR of a Shoot cluster. + DefaultPodNetworkCIDR = "100.96.0.0/11" + // DefaultServiceNetworkCIDR is a constant for the default service network CIDR of a Shoot cluster. + DefaultServiceNetworkCIDR = "100.64.0.0/13" +) + +////////////////////////////////////////////////////////////////////////////////////////////////// +// Maintenance relevant types // +////////////////////////////////////////////////////////////////////////////////////////////////// + +// Maintenance contains information about the time window for maintenance operations and which +// operations should be performed. +type Maintenance struct { + // AutoUpdate contains information about which constraints should be automatically updated. + // +optional + AutoUpdate *MaintenanceAutoUpdate `json:"autoUpdate,omitempty"` + // TimeWindow contains information about the time window for maintenance operations. + // +optional + TimeWindow *MaintenanceTimeWindow `json:"timeWindow,omitempty"` +} + +// MaintenanceAutoUpdate contains information about which constraints should be automatically updated. +type MaintenanceAutoUpdate struct { + // KubernetesVersion indicates whether the patch Kubernetes version may be automatically updated (default: true). + KubernetesVersion bool `json:"kubernetesVersion"` + // MachineImageVersion indicates whether the machine image version may be automatically updated (default: true). + MachineImageVersion bool `json:"machineImageVersion"` +} + +// MaintenanceTimeWindow contains information about the time window for maintenance operations. +type MaintenanceTimeWindow struct { + // Begin is the beginning of the time window in the format HHMMSS+ZONE, e.g. "220000+0100". + // If not present, a random value will be computed. + Begin string `json:"begin"` + // End is the end of the time window in the format HHMMSS+ZONE, e.g. "220000+0100". + // If not present, the value will be computed based on the "Begin" value. + End string `json:"end"` +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// Monitoring relevant types // +////////////////////////////////////////////////////////////////////////////////////////////////// + +// Monitoring contains information about the monitoring configuration for the shoot. +type Monitoring struct { + // Alerting contains information about the alerting configuration for the shoot cluster. + // +optional + Alerting *Alerting `json:"alerting,omitempty"` +} + +// Alerting contains information about how alerting will be done (i.e. who will receive alerts and how). +type Alerting struct { + // MonitoringEmailReceivers is a list of recipients for alerts + // +optional + EmailReceivers []string `json:"emailReceivers,omitempty"` +} + +////////////////////////////////////////////////////////////////////////////////////////////////// +// Provider relevant types // +////////////////////////////////////////////////////////////////////////////////////////////////// + +// Provider contains provider-specific information that are handed-over to the provider-specific +// extension controller. +type Provider struct { + // Type is the type of the provider. + Type string `json:"type"` + // ControlPlaneConfig contains the provider-specific control plane config blob. Please look up the concrete + // definition in the documentation of your provider extension. + // +optional + ControlPlaneConfig *ProviderConfig `json:"controlPlaneConfig,omitempty"` + // InfrastructureConfig contains the provider-specific infrastructure config blob. Please look up the concrete + // definition in the documentation of your provider extension. + // +optional + InfrastructureConfig *ProviderConfig `json:"infrastructureConfig,omitempty"` + // Workers is a list of worker groups. + // +patchMergeKey=name + // +patchStrategy=merge + Workers []Worker `json:"workers" patchStrategy:"merge" patchMergeKey:"name"` +} + +// Worker is the base definition of a worker group. +type Worker struct { + // Annotations is a map of key/value pairs for annotations for all the `Node` objects in this worker pool. + // +optional + Annotations map[string]string `json:"annotations,omitempty"` + // CABundle is a certificate bundle which will be installed onto every machine of this worker pool. + // +optional + CABundle *string `json:"caBundle,omitempty"` + // Kubernetes contains configuration for Kubernetes components related to this worker pool. + // +optional + Kubernetes *WorkerKubernetes `json:"kubernetes,omitempty"` + // Labels is a map of key/value pairs for labels for all the `Node` objects in this worker pool. + // +optional + Labels map[string]string `json:"labels,omitempty"` + // Name is the name of the worker group. + Name string `json:"name"` + // Machine contains information about the machine type and image. + Machine Machine `json:"machine"` + // Maximum is the maximum number of VMs to create. + Maximum int32 `json:"maximum"` + // Minimum is the minimum number of VMs to create. + Minimum int32 `json:"minimum"` + // MaxSurge is maximum number of VMs that are created during an update. + // +optional + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` + // MaxUnavailable is the maximum number of VMs that can be unavailable during an update. + // +optional + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + // ProviderConfig is the provider-specific configuration for this worker pool. + // +optional + ProviderConfig *ProviderConfig `json:"providerConfig,omitempty"` + // Taints is a list of taints for all the `Node` objects in this worker pool. + // +optional + Taints []corev1.Taint `json:"taints,omitempty"` + // Volume contains information about the volume type and size. + // +optional + Volume *Volume `json:"volume,omitempty"` + // Zones is a list of availability zones that are used to evenly distribute this worker pool. Optional + // as not every provider may support availability zones. + // +optional + Zones []string `json:"zones,omitempty"` +} + +// WorkerKubernetes contains configuration for Kubernetes components related to this worker pool. +type WorkerKubernetes struct { + // Kubelet contains configuration settings for all kubelets of this worker pool. + // +optional + Kubelet *KubeletConfig `json:"kubelet,omitempty"` +} + +// Machine contains information about the machine type and image. +type Machine struct { + // Type is the machine type of the worker group. + Type string `json:"type"` + // Image holds information about the machine image to use for all nodes of this pool. It will default to the + // latest version of the first image stated in the referenced CloudProfile if no value has been provided. + // +optional + Image *ShootMachineImage `json:"image,omitempty"` +} + +// ShootMachineImage defines the name and the version of the shoot's machine image in any environment. Has to be +// defined in the respective CloudProfile. +type ShootMachineImage struct { + // Name is the name of the image. + Name string `json:"name"` + // ProviderConfig is the shoot's individual configuration passed to an extension resource. + // +optional + ProviderConfig *ProviderConfig `json:"providerConfig,omitempty"` + // Version is the version of the shoot's image. + Version string `json:"version"` +} + +// Volume contains information about the volume type and size. +type Volume struct { + // Type is the machine type of the worker group. + // +optional + Type *string `json:"type,omitempty"` + // Size is the size of the root volume. + Size string `json:"size"` +} + +var ( + // DefaultWorkerMaxSurge is the default value for Worker MaxSurge. + DefaultWorkerMaxSurge = intstr.FromInt(1) + // DefaultWorkerMaxUnavailable is the default value for Worker MaxUnavailable. + DefaultWorkerMaxUnavailable = intstr.FromInt(0) +) + +////////////////////////////////////////////////////////////////////////////////////////////////// +// Other/miscellaneous constants and types // +////////////////////////////////////////////////////////////////////////////////////////////////// + +const ( + // ShootEventMaintenanceDone indicates that a maintenance operation has been performed. + ShootEventMaintenanceDone = "MaintenanceDone" + // ShootEventMaintenanceError indicates that a maintenance operation has failed. + ShootEventMaintenanceError = "MaintenanceError" + + // ShootEventSchedulingSuccessful indicates that a scheduling decision was taken successfully. + ShootEventSchedulingSuccessful = "SchedulingSuccessful" + // ShootEventSchedulingFailed indicates that a scheduling decision failed. + ShootEventSchedulingFailed = "SchedulingFailed" +) + +const ( + // ShootAPIServerAvailable is a constant for a condition type indicating that the Shoot cluster's API server is available. + ShootAPIServerAvailable ConditionType = "APIServerAvailable" + // ShootControlPlaneHealthy is a constant for a condition type indicating the control plane health. + ShootControlPlaneHealthy ConditionType = "ControlPlaneHealthy" + // ShootEveryNodeReady is a constant for a condition type indicating the node health. + ShootEveryNodeReady ConditionType = "EveryNodeReady" + // ShootSystemComponentsHealthy is a constant for a condition type indicating the system components health. + ShootSystemComponentsHealthy ConditionType = "SystemComponentsHealthy" + // ShootHibernationPossible is a constant for a condition type indicating whether the Shoot can be hibernated. + ShootHibernationPossible ConditionType = "HibernationPossible" +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_utils.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_utils.go new file mode 100644 index 000000000..b5e4e0b71 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/types_utils.go @@ -0,0 +1,80 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +const ( + // EventSchedulingSuccessful is an event reason for successful scheduling. + EventSchedulingSuccessful = "SchedulingSuccessful" + // EventSchedulingFailed is an event reason for failed scheduling. + EventSchedulingFailed = "SchedulingFailed" +) + +// ProviderConfig is a workaround for missing OpenAPI functions on runtime.RawExtension struct. +// https://github.com/kubernetes/kubernetes/issues/55890 +// https://github.com/kubernetes-sigs/cluster-api/issues/137 +type ProviderConfig struct { + runtime.RawExtension `json:",inline"` +} + +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (ProviderConfig) OpenAPISchemaType() []string { return []string{"object"} } + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (ProviderConfig) OpenAPISchemaFormat() string { return "" } + +// ConditionStatus is the status of a condition. +type ConditionStatus string + +// ConditionType is a string alias. +type ConditionType string + +// Condition holds the information about the state of a resource. +type Condition struct { + // Type of the Shoot condition. + Type ConditionType `json:"type"` + // Status of the condition, one of True, False, Unknown. + Status ConditionStatus `json:"status"` + // Last time the condition transitioned from one status to another. + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + // Last time the condition was updated. + LastUpdateTime metav1.Time `json:"lastUpdateTime"` + // The reason for the condition's last transition. + Reason string `json:"reason"` + // A human readable message indicating details about the transition. + Message string `json:"message"` +} + +const ( + // ConditionTrue means a resource is in the condition. + ConditionTrue ConditionStatus = "True" + // ConditionFalse means a resource is not in the condition. + ConditionFalse ConditionStatus = "False" + // ConditionUnknown means Gardener can't decide if a resource is in the condition or not. + ConditionUnknown ConditionStatus = "Unknown" + // ConditionProgressing means the condition was seen true, failed but stayed within a predefined failure threshold. + // In the future, we could add other intermediate conditions, e.g. ConditionDegraded. + ConditionProgressing ConditionStatus = "Progressing" + + // ConditionCheckError is a constant for a reason in condition. + ConditionCheckError = "ConditionCheckError" +) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.conversion.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.conversion.go new file mode 100644 index 000000000..64c87c221 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.conversion.go @@ -0,0 +1,4248 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 conversion-gen. DO NOT EDIT. + +package v1beta1 + +import ( + unsafe "unsafe" + + core "github.com/gardener/gardener/pkg/apis/core" + garden "github.com/gardener/gardener/pkg/apis/garden" + v1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" + resource "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + intstr "k8s.io/apimachinery/pkg/util/intstr" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*Addon)(nil), (*garden.Addon)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Addon_To_garden_Addon(a.(*Addon), b.(*garden.Addon), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Addon)(nil), (*Addon)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Addon_To_v1beta1_Addon(a.(*garden.Addon), b.(*Addon), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Addons)(nil), (*garden.Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Addons_To_garden_Addons(a.(*Addons), b.(*garden.Addons), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Addons)(nil), (*Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Addons_To_v1beta1_Addons(a.(*garden.Addons), b.(*Addons), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AdmissionPlugin)(nil), (*garden.AdmissionPlugin)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AdmissionPlugin_To_garden_AdmissionPlugin(a.(*AdmissionPlugin), b.(*garden.AdmissionPlugin), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AdmissionPlugin)(nil), (*AdmissionPlugin)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AdmissionPlugin_To_v1beta1_AdmissionPlugin(a.(*garden.AdmissionPlugin), b.(*AdmissionPlugin), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Alerting)(nil), (*garden.Alerting)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Alerting_To_garden_Alerting(a.(*Alerting), b.(*garden.Alerting), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Alerting)(nil), (*Alerting)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Alerting_To_v1beta1_Alerting(a.(*garden.Alerting), b.(*Alerting), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuditConfig)(nil), (*garden.AuditConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AuditConfig_To_garden_AuditConfig(a.(*AuditConfig), b.(*garden.AuditConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AuditConfig)(nil), (*AuditConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AuditConfig_To_v1beta1_AuditConfig(a.(*garden.AuditConfig), b.(*AuditConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuditPolicy)(nil), (*garden.AuditPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AuditPolicy_To_garden_AuditPolicy(a.(*AuditPolicy), b.(*garden.AuditPolicy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AuditPolicy)(nil), (*AuditPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AuditPolicy_To_v1beta1_AuditPolicy(a.(*garden.AuditPolicy), b.(*AuditPolicy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AvailabilityZone)(nil), (*garden.AvailabilityZone)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AvailabilityZone_To_garden_AvailabilityZone(a.(*AvailabilityZone), b.(*garden.AvailabilityZone), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AvailabilityZone)(nil), (*AvailabilityZone)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AvailabilityZone_To_v1beta1_AvailabilityZone(a.(*garden.AvailabilityZone), b.(*AvailabilityZone), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupBucket)(nil), (*core.BackupBucket)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BackupBucket_To_core_BackupBucket(a.(*BackupBucket), b.(*core.BackupBucket), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupBucket)(nil), (*BackupBucket)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucket_To_v1beta1_BackupBucket(a.(*core.BackupBucket), b.(*BackupBucket), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupBucketList)(nil), (*core.BackupBucketList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BackupBucketList_To_core_BackupBucketList(a.(*BackupBucketList), b.(*core.BackupBucketList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupBucketList)(nil), (*BackupBucketList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucketList_To_v1beta1_BackupBucketList(a.(*core.BackupBucketList), b.(*BackupBucketList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupBucketProvider)(nil), (*core.BackupBucketProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BackupBucketProvider_To_core_BackupBucketProvider(a.(*BackupBucketProvider), b.(*core.BackupBucketProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupBucketProvider)(nil), (*BackupBucketProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucketProvider_To_v1beta1_BackupBucketProvider(a.(*core.BackupBucketProvider), b.(*BackupBucketProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupBucketSpec)(nil), (*core.BackupBucketSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BackupBucketSpec_To_core_BackupBucketSpec(a.(*BackupBucketSpec), b.(*core.BackupBucketSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupBucketSpec)(nil), (*BackupBucketSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucketSpec_To_v1beta1_BackupBucketSpec(a.(*core.BackupBucketSpec), b.(*BackupBucketSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupBucketStatus)(nil), (*core.BackupBucketStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BackupBucketStatus_To_core_BackupBucketStatus(a.(*BackupBucketStatus), b.(*core.BackupBucketStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupBucketStatus)(nil), (*BackupBucketStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupBucketStatus_To_v1beta1_BackupBucketStatus(a.(*core.BackupBucketStatus), b.(*BackupBucketStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupEntry)(nil), (*core.BackupEntry)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BackupEntry_To_core_BackupEntry(a.(*BackupEntry), b.(*core.BackupEntry), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupEntry)(nil), (*BackupEntry)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupEntry_To_v1beta1_BackupEntry(a.(*core.BackupEntry), b.(*BackupEntry), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupEntryList)(nil), (*core.BackupEntryList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BackupEntryList_To_core_BackupEntryList(a.(*BackupEntryList), b.(*core.BackupEntryList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupEntryList)(nil), (*BackupEntryList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupEntryList_To_v1beta1_BackupEntryList(a.(*core.BackupEntryList), b.(*BackupEntryList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupEntrySpec)(nil), (*core.BackupEntrySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BackupEntrySpec_To_core_BackupEntrySpec(a.(*BackupEntrySpec), b.(*core.BackupEntrySpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupEntrySpec)(nil), (*BackupEntrySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupEntrySpec_To_v1beta1_BackupEntrySpec(a.(*core.BackupEntrySpec), b.(*BackupEntrySpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BackupEntryStatus)(nil), (*core.BackupEntryStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BackupEntryStatus_To_core_BackupEntryStatus(a.(*BackupEntryStatus), b.(*core.BackupEntryStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.BackupEntryStatus)(nil), (*BackupEntryStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_BackupEntryStatus_To_v1beta1_BackupEntryStatus(a.(*core.BackupEntryStatus), b.(*BackupEntryStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudInfo)(nil), (*core.CloudInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudInfo_To_core_CloudInfo(a.(*CloudInfo), b.(*core.CloudInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.CloudInfo)(nil), (*CloudInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_CloudInfo_To_v1beta1_CloudInfo(a.(*core.CloudInfo), b.(*CloudInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudProfile)(nil), (*garden.CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProfile_To_garden_CloudProfile(a.(*CloudProfile), b.(*garden.CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.CloudProfile)(nil), (*CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfile_To_v1beta1_CloudProfile(a.(*garden.CloudProfile), b.(*CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudProfileList)(nil), (*garden.CloudProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProfileList_To_garden_CloudProfileList(a.(*CloudProfileList), b.(*garden.CloudProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.CloudProfileList)(nil), (*CloudProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfileList_To_v1beta1_CloudProfileList(a.(*garden.CloudProfileList), b.(*CloudProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudProfileSpec)(nil), (*garden.CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(a.(*CloudProfileSpec), b.(*garden.CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.CloudProfileSpec)(nil), (*CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(a.(*garden.CloudProfileSpec), b.(*CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterAutoscaler)(nil), (*garden.ClusterAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler(a.(*ClusterAutoscaler), b.(*garden.ClusterAutoscaler), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ClusterAutoscaler)(nil), (*ClusterAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler(a.(*garden.ClusterAutoscaler), b.(*ClusterAutoscaler), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterInfo)(nil), (*core.ClusterInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterInfo_To_core_ClusterInfo(a.(*ClusterInfo), b.(*core.ClusterInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ClusterInfo)(nil), (*ClusterInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ClusterInfo_To_v1beta1_ClusterInfo(a.(*core.ClusterInfo), b.(*ClusterInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Condition)(nil), (*core.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Condition_To_core_Condition(a.(*Condition), b.(*core.Condition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.Condition)(nil), (*Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_Condition_To_v1beta1_Condition(a.(*core.Condition), b.(*Condition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerDeployment)(nil), (*core.ControllerDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControllerDeployment_To_core_ControllerDeployment(a.(*ControllerDeployment), b.(*core.ControllerDeployment), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerDeployment)(nil), (*ControllerDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerDeployment_To_v1beta1_ControllerDeployment(a.(*core.ControllerDeployment), b.(*ControllerDeployment), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallation)(nil), (*core.ControllerInstallation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControllerInstallation_To_core_ControllerInstallation(a.(*ControllerInstallation), b.(*core.ControllerInstallation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerInstallation)(nil), (*ControllerInstallation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerInstallation_To_v1beta1_ControllerInstallation(a.(*core.ControllerInstallation), b.(*ControllerInstallation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallationList)(nil), (*core.ControllerInstallationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControllerInstallationList_To_core_ControllerInstallationList(a.(*ControllerInstallationList), b.(*core.ControllerInstallationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerInstallationList)(nil), (*ControllerInstallationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerInstallationList_To_v1beta1_ControllerInstallationList(a.(*core.ControllerInstallationList), b.(*ControllerInstallationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallationSpec)(nil), (*core.ControllerInstallationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControllerInstallationSpec_To_core_ControllerInstallationSpec(a.(*ControllerInstallationSpec), b.(*core.ControllerInstallationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerInstallationSpec)(nil), (*ControllerInstallationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerInstallationSpec_To_v1beta1_ControllerInstallationSpec(a.(*core.ControllerInstallationSpec), b.(*ControllerInstallationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerInstallationStatus)(nil), (*core.ControllerInstallationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControllerInstallationStatus_To_core_ControllerInstallationStatus(a.(*ControllerInstallationStatus), b.(*core.ControllerInstallationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerInstallationStatus)(nil), (*ControllerInstallationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerInstallationStatus_To_v1beta1_ControllerInstallationStatus(a.(*core.ControllerInstallationStatus), b.(*ControllerInstallationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerRegistration)(nil), (*core.ControllerRegistration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControllerRegistration_To_core_ControllerRegistration(a.(*ControllerRegistration), b.(*core.ControllerRegistration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerRegistration)(nil), (*ControllerRegistration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerRegistration_To_v1beta1_ControllerRegistration(a.(*core.ControllerRegistration), b.(*ControllerRegistration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerRegistrationList)(nil), (*core.ControllerRegistrationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControllerRegistrationList_To_core_ControllerRegistrationList(a.(*ControllerRegistrationList), b.(*core.ControllerRegistrationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerRegistrationList)(nil), (*ControllerRegistrationList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerRegistrationList_To_v1beta1_ControllerRegistrationList(a.(*core.ControllerRegistrationList), b.(*ControllerRegistrationList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerRegistrationSpec)(nil), (*core.ControllerRegistrationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec(a.(*ControllerRegistrationSpec), b.(*core.ControllerRegistrationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerRegistrationSpec)(nil), (*ControllerRegistrationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerRegistrationSpec_To_v1beta1_ControllerRegistrationSpec(a.(*core.ControllerRegistrationSpec), b.(*ControllerRegistrationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControllerResource)(nil), (*core.ControllerResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControllerResource_To_core_ControllerResource(a.(*ControllerResource), b.(*core.ControllerResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ControllerResource)(nil), (*ControllerResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ControllerResource_To_v1beta1_ControllerResource(a.(*core.ControllerResource), b.(*ControllerResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNS)(nil), (*garden.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNS_To_garden_DNS(a.(*DNS), b.(*garden.DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_DNS_To_v1beta1_DNS(a.(*garden.DNS), b.(*DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNSIncludeExclude)(nil), (*garden.DNSIncludeExclude)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNSIncludeExclude_To_garden_DNSIncludeExclude(a.(*DNSIncludeExclude), b.(*garden.DNSIncludeExclude), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.DNSIncludeExclude)(nil), (*DNSIncludeExclude)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_DNSIncludeExclude_To_v1beta1_DNSIncludeExclude(a.(*garden.DNSIncludeExclude), b.(*DNSIncludeExclude), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNSProvider)(nil), (*garden.DNSProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNSProvider_To_garden_DNSProvider(a.(*DNSProvider), b.(*garden.DNSProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.DNSProvider)(nil), (*DNSProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_DNSProvider_To_v1beta1_DNSProvider(a.(*garden.DNSProvider), b.(*DNSProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Endpoint)(nil), (*core.Endpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Endpoint_To_core_Endpoint(a.(*Endpoint), b.(*core.Endpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.Endpoint)(nil), (*Endpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_Endpoint_To_v1beta1_Endpoint(a.(*core.Endpoint), b.(*Endpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExpirableVersion)(nil), (*garden.ExpirableVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExpirableVersion_To_garden_ExpirableVersion(a.(*ExpirableVersion), b.(*garden.ExpirableVersion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ExpirableVersion)(nil), (*ExpirableVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ExpirableVersion_To_v1beta1_ExpirableVersion(a.(*garden.ExpirableVersion), b.(*ExpirableVersion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Extension)(nil), (*garden.Extension)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Extension_To_garden_Extension(a.(*Extension), b.(*garden.Extension), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Extension)(nil), (*Extension)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Extension_To_v1beta1_Extension(a.(*garden.Extension), b.(*Extension), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Gardener)(nil), (*garden.Gardener)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Gardener_To_garden_Gardener(a.(*Gardener), b.(*garden.Gardener), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Gardener)(nil), (*Gardener)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Gardener_To_v1beta1_Gardener(a.(*garden.Gardener), b.(*Gardener), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Hibernation)(nil), (*garden.Hibernation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Hibernation_To_garden_Hibernation(a.(*Hibernation), b.(*garden.Hibernation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Hibernation)(nil), (*Hibernation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Hibernation_To_v1beta1_Hibernation(a.(*garden.Hibernation), b.(*Hibernation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HibernationSchedule)(nil), (*garden.HibernationSchedule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HibernationSchedule_To_garden_HibernationSchedule(a.(*HibernationSchedule), b.(*garden.HibernationSchedule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.HibernationSchedule)(nil), (*HibernationSchedule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_HibernationSchedule_To_v1beta1_HibernationSchedule(a.(*garden.HibernationSchedule), b.(*HibernationSchedule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HorizontalPodAutoscalerConfig)(nil), (*garden.HorizontalPodAutoscalerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(a.(*HorizontalPodAutoscalerConfig), b.(*garden.HorizontalPodAutoscalerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.HorizontalPodAutoscalerConfig)(nil), (*HorizontalPodAutoscalerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig(a.(*garden.HorizontalPodAutoscalerConfig), b.(*HorizontalPodAutoscalerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeAPIServerConfig)(nil), (*garden.KubeAPIServerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(a.(*KubeAPIServerConfig), b.(*garden.KubeAPIServerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeAPIServerConfig)(nil), (*KubeAPIServerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig(a.(*garden.KubeAPIServerConfig), b.(*KubeAPIServerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeControllerManagerConfig)(nil), (*garden.KubeControllerManagerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(a.(*KubeControllerManagerConfig), b.(*garden.KubeControllerManagerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeControllerManagerConfig)(nil), (*KubeControllerManagerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig(a.(*garden.KubeControllerManagerConfig), b.(*KubeControllerManagerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeProxyConfig)(nil), (*garden.KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeProxyConfig_To_garden_KubeProxyConfig(a.(*KubeProxyConfig), b.(*garden.KubeProxyConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeProxyConfig)(nil), (*KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeProxyConfig_To_v1beta1_KubeProxyConfig(a.(*garden.KubeProxyConfig), b.(*KubeProxyConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeSchedulerConfig)(nil), (*garden.KubeSchedulerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(a.(*KubeSchedulerConfig), b.(*garden.KubeSchedulerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeSchedulerConfig)(nil), (*KubeSchedulerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeSchedulerConfig_To_v1beta1_KubeSchedulerConfig(a.(*garden.KubeSchedulerConfig), b.(*KubeSchedulerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfig)(nil), (*garden.KubeletConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeletConfig_To_garden_KubeletConfig(a.(*KubeletConfig), b.(*garden.KubeletConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfig)(nil), (*KubeletConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfig_To_v1beta1_KubeletConfig(a.(*garden.KubeletConfig), b.(*KubeletConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfigEviction)(nil), (*garden.KubeletConfigEviction)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeletConfigEviction_To_garden_KubeletConfigEviction(a.(*KubeletConfigEviction), b.(*garden.KubeletConfigEviction), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfigEviction)(nil), (*KubeletConfigEviction)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfigEviction_To_v1beta1_KubeletConfigEviction(a.(*garden.KubeletConfigEviction), b.(*KubeletConfigEviction), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfigEvictionMinimumReclaim)(nil), (*garden.KubeletConfigEvictionMinimumReclaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(a.(*KubeletConfigEvictionMinimumReclaim), b.(*garden.KubeletConfigEvictionMinimumReclaim), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfigEvictionMinimumReclaim)(nil), (*KubeletConfigEvictionMinimumReclaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfigEvictionMinimumReclaim_To_v1beta1_KubeletConfigEvictionMinimumReclaim(a.(*garden.KubeletConfigEvictionMinimumReclaim), b.(*KubeletConfigEvictionMinimumReclaim), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfigEvictionSoftGracePeriod)(nil), (*garden.KubeletConfigEvictionSoftGracePeriod)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(a.(*KubeletConfigEvictionSoftGracePeriod), b.(*garden.KubeletConfigEvictionSoftGracePeriod), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfigEvictionSoftGracePeriod)(nil), (*KubeletConfigEvictionSoftGracePeriod)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1beta1_KubeletConfigEvictionSoftGracePeriod(a.(*garden.KubeletConfigEvictionSoftGracePeriod), b.(*KubeletConfigEvictionSoftGracePeriod), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Kubernetes)(nil), (*garden.Kubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Kubernetes_To_garden_Kubernetes(a.(*Kubernetes), b.(*garden.Kubernetes), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Kubernetes)(nil), (*Kubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Kubernetes_To_v1beta1_Kubernetes(a.(*garden.Kubernetes), b.(*Kubernetes), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesConfig)(nil), (*garden.KubernetesConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(a.(*KubernetesConfig), b.(*garden.KubernetesConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubernetesConfig)(nil), (*KubernetesConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(a.(*garden.KubernetesConfig), b.(*KubernetesConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesDashboard)(nil), (*garden.KubernetesDashboard)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubernetesDashboard_To_garden_KubernetesDashboard(a.(*KubernetesDashboard), b.(*garden.KubernetesDashboard), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubernetesDashboard)(nil), (*KubernetesDashboard)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesDashboard_To_v1beta1_KubernetesDashboard(a.(*garden.KubernetesDashboard), b.(*KubernetesDashboard), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesInfo)(nil), (*core.KubernetesInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubernetesInfo_To_core_KubernetesInfo(a.(*KubernetesInfo), b.(*core.KubernetesInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.KubernetesInfo)(nil), (*KubernetesInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_KubernetesInfo_To_v1beta1_KubernetesInfo(a.(*core.KubernetesInfo), b.(*KubernetesInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesSettings)(nil), (*garden.KubernetesSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubernetesSettings_To_garden_KubernetesSettings(a.(*KubernetesSettings), b.(*garden.KubernetesSettings), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubernetesSettings)(nil), (*KubernetesSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesSettings_To_v1beta1_KubernetesSettings(a.(*garden.KubernetesSettings), b.(*KubernetesSettings), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LastError)(nil), (*core.LastError)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_LastError_To_core_LastError(a.(*LastError), b.(*core.LastError), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.LastError)(nil), (*LastError)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_LastError_To_v1beta1_LastError(a.(*core.LastError), b.(*LastError), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LastOperation)(nil), (*core.LastOperation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_LastOperation_To_core_LastOperation(a.(*LastOperation), b.(*core.LastOperation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.LastOperation)(nil), (*LastOperation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_LastOperation_To_v1beta1_LastOperation(a.(*core.LastOperation), b.(*LastOperation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Machine)(nil), (*garden.Machine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Machine_To_garden_Machine(a.(*Machine), b.(*garden.Machine), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Machine)(nil), (*Machine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Machine_To_v1beta1_Machine(a.(*garden.Machine), b.(*Machine), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineImage)(nil), (*garden.MachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineImage_To_garden_MachineImage(a.(*MachineImage), b.(*garden.MachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MachineImage)(nil), (*MachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineImage_To_v1beta1_MachineImage(a.(*garden.MachineImage), b.(*MachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineType)(nil), (*garden.MachineType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineType_To_garden_MachineType(a.(*MachineType), b.(*garden.MachineType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MachineType)(nil), (*MachineType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineType_To_v1beta1_MachineType(a.(*garden.MachineType), b.(*MachineType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineTypeStorage)(nil), (*garden.MachineTypeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineTypeStorage_To_garden_MachineTypeStorage(a.(*MachineTypeStorage), b.(*garden.MachineTypeStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MachineTypeStorage)(nil), (*MachineTypeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineTypeStorage_To_v1beta1_MachineTypeStorage(a.(*garden.MachineTypeStorage), b.(*MachineTypeStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Maintenance)(nil), (*garden.Maintenance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Maintenance_To_garden_Maintenance(a.(*Maintenance), b.(*garden.Maintenance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Maintenance)(nil), (*Maintenance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Maintenance_To_v1beta1_Maintenance(a.(*garden.Maintenance), b.(*Maintenance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MaintenanceAutoUpdate)(nil), (*garden.MaintenanceAutoUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(a.(*MaintenanceAutoUpdate), b.(*garden.MaintenanceAutoUpdate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MaintenanceAutoUpdate)(nil), (*MaintenanceAutoUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate(a.(*garden.MaintenanceAutoUpdate), b.(*MaintenanceAutoUpdate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MaintenanceTimeWindow)(nil), (*garden.MaintenanceTimeWindow)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(a.(*MaintenanceTimeWindow), b.(*garden.MaintenanceTimeWindow), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MaintenanceTimeWindow)(nil), (*MaintenanceTimeWindow)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MaintenanceTimeWindow_To_v1beta1_MaintenanceTimeWindow(a.(*garden.MaintenanceTimeWindow), b.(*MaintenanceTimeWindow), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Monitoring)(nil), (*garden.Monitoring)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Monitoring_To_garden_Monitoring(a.(*Monitoring), b.(*garden.Monitoring), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Monitoring)(nil), (*Monitoring)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Monitoring_To_v1beta1_Monitoring(a.(*garden.Monitoring), b.(*Monitoring), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Networking)(nil), (*garden.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Networking_To_garden_Networking(a.(*Networking), b.(*garden.Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Networking_To_v1beta1_Networking(a.(*garden.Networking), b.(*Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NginxIngress)(nil), (*garden.NginxIngress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NginxIngress_To_garden_NginxIngress(a.(*NginxIngress), b.(*garden.NginxIngress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.NginxIngress)(nil), (*NginxIngress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_NginxIngress_To_v1beta1_NginxIngress(a.(*garden.NginxIngress), b.(*NginxIngress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCConfig)(nil), (*garden.OIDCConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OIDCConfig_To_garden_OIDCConfig(a.(*OIDCConfig), b.(*garden.OIDCConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OIDCConfig)(nil), (*OIDCConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OIDCConfig_To_v1beta1_OIDCConfig(a.(*garden.OIDCConfig), b.(*OIDCConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenIDConnectClientAuthentication)(nil), (*garden.OpenIDConnectClientAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(a.(*OpenIDConnectClientAuthentication), b.(*garden.OpenIDConnectClientAuthentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenIDConnectClientAuthentication)(nil), (*OpenIDConnectClientAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication(a.(*garden.OpenIDConnectClientAuthentication), b.(*OpenIDConnectClientAuthentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Plant)(nil), (*core.Plant)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Plant_To_core_Plant(a.(*Plant), b.(*core.Plant), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.Plant)(nil), (*Plant)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_Plant_To_v1beta1_Plant(a.(*core.Plant), b.(*Plant), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PlantList)(nil), (*core.PlantList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PlantList_To_core_PlantList(a.(*PlantList), b.(*core.PlantList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.PlantList)(nil), (*PlantList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_PlantList_To_v1beta1_PlantList(a.(*core.PlantList), b.(*PlantList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PlantSpec)(nil), (*core.PlantSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PlantSpec_To_core_PlantSpec(a.(*PlantSpec), b.(*core.PlantSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.PlantSpec)(nil), (*PlantSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_PlantSpec_To_v1beta1_PlantSpec(a.(*core.PlantSpec), b.(*PlantSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PlantStatus)(nil), (*core.PlantStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PlantStatus_To_core_PlantStatus(a.(*PlantStatus), b.(*core.PlantStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.PlantStatus)(nil), (*PlantStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_PlantStatus_To_v1beta1_PlantStatus(a.(*core.PlantStatus), b.(*PlantStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Project)(nil), (*garden.Project)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Project_To_garden_Project(a.(*Project), b.(*garden.Project), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Project)(nil), (*Project)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Project_To_v1beta1_Project(a.(*garden.Project), b.(*Project), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectList)(nil), (*garden.ProjectList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProjectList_To_garden_ProjectList(a.(*ProjectList), b.(*garden.ProjectList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectList)(nil), (*ProjectList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectList_To_v1beta1_ProjectList(a.(*garden.ProjectList), b.(*ProjectList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectMember)(nil), (*garden.ProjectMember)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProjectMember_To_garden_ProjectMember(a.(*ProjectMember), b.(*garden.ProjectMember), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectMember)(nil), (*ProjectMember)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectMember_To_v1beta1_ProjectMember(a.(*garden.ProjectMember), b.(*ProjectMember), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectSpec)(nil), (*garden.ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProjectSpec_To_garden_ProjectSpec(a.(*ProjectSpec), b.(*garden.ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectSpec)(nil), (*ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectSpec_To_v1beta1_ProjectSpec(a.(*garden.ProjectSpec), b.(*ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectStatus)(nil), (*garden.ProjectStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProjectStatus_To_garden_ProjectStatus(a.(*ProjectStatus), b.(*garden.ProjectStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectStatus)(nil), (*ProjectStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectStatus_To_v1beta1_ProjectStatus(a.(*garden.ProjectStatus), b.(*ProjectStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Provider)(nil), (*garden.Provider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Provider_To_garden_Provider(a.(*Provider), b.(*garden.Provider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Provider)(nil), (*Provider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Provider_To_v1beta1_Provider(a.(*garden.Provider), b.(*Provider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProviderConfig)(nil), (*core.ProviderConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProviderConfig_To_core_ProviderConfig(a.(*ProviderConfig), b.(*core.ProviderConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.ProviderConfig)(nil), (*ProviderConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_ProviderConfig_To_v1beta1_ProviderConfig(a.(*core.ProviderConfig), b.(*ProviderConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Quota)(nil), (*garden.Quota)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Quota_To_garden_Quota(a.(*Quota), b.(*garden.Quota), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Quota)(nil), (*Quota)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Quota_To_v1beta1_Quota(a.(*garden.Quota), b.(*Quota), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*QuotaList)(nil), (*garden.QuotaList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_QuotaList_To_garden_QuotaList(a.(*QuotaList), b.(*garden.QuotaList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.QuotaList)(nil), (*QuotaList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_QuotaList_To_v1beta1_QuotaList(a.(*garden.QuotaList), b.(*QuotaList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*QuotaSpec)(nil), (*garden.QuotaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_QuotaSpec_To_garden_QuotaSpec(a.(*QuotaSpec), b.(*garden.QuotaSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.QuotaSpec)(nil), (*QuotaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_QuotaSpec_To_v1beta1_QuotaSpec(a.(*garden.QuotaSpec), b.(*QuotaSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Region)(nil), (*garden.Region)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Region_To_garden_Region(a.(*Region), b.(*garden.Region), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Region)(nil), (*Region)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Region_To_v1beta1_Region(a.(*garden.Region), b.(*Region), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecretBinding)(nil), (*garden.SecretBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SecretBinding_To_garden_SecretBinding(a.(*SecretBinding), b.(*garden.SecretBinding), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SecretBinding)(nil), (*SecretBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SecretBinding_To_v1beta1_SecretBinding(a.(*garden.SecretBinding), b.(*SecretBinding), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecretBindingList)(nil), (*garden.SecretBindingList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SecretBindingList_To_garden_SecretBindingList(a.(*SecretBindingList), b.(*garden.SecretBindingList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SecretBindingList)(nil), (*SecretBindingList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SecretBindingList_To_v1beta1_SecretBindingList(a.(*garden.SecretBindingList), b.(*SecretBindingList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Seed)(nil), (*garden.Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Seed_To_garden_Seed(a.(*Seed), b.(*garden.Seed), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Seed)(nil), (*Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Seed_To_v1beta1_Seed(a.(*garden.Seed), b.(*Seed), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedBackup)(nil), (*garden.SeedBackup)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedBackup_To_garden_SeedBackup(a.(*SeedBackup), b.(*garden.SeedBackup), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedBackup)(nil), (*SeedBackup)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedBackup_To_v1beta1_SeedBackup(a.(*garden.SeedBackup), b.(*SeedBackup), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedList)(nil), (*garden.SeedList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedList_To_garden_SeedList(a.(*SeedList), b.(*garden.SeedList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedList)(nil), (*SeedList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedList_To_v1beta1_SeedList(a.(*garden.SeedList), b.(*SeedList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedNetworks)(nil), (*garden.SeedNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedNetworks_To_garden_SeedNetworks(a.(*SeedNetworks), b.(*garden.SeedNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedNetworks)(nil), (*SeedNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedNetworks_To_v1beta1_SeedNetworks(a.(*garden.SeedNetworks), b.(*SeedNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedProvider)(nil), (*garden.SeedProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedProvider_To_garden_SeedProvider(a.(*SeedProvider), b.(*garden.SeedProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedProvider)(nil), (*SeedProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedProvider_To_v1beta1_SeedProvider(a.(*garden.SeedProvider), b.(*SeedProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedSpec)(nil), (*garden.SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedSpec_To_garden_SeedSpec(a.(*SeedSpec), b.(*garden.SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedSpec)(nil), (*SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedSpec_To_v1beta1_SeedSpec(a.(*garden.SeedSpec), b.(*SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedStatus)(nil), (*garden.SeedStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedStatus_To_garden_SeedStatus(a.(*SeedStatus), b.(*garden.SeedStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedStatus)(nil), (*SeedStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedStatus_To_v1beta1_SeedStatus(a.(*garden.SeedStatus), b.(*SeedStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedTaint)(nil), (*garden.SeedTaint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedTaint_To_garden_SeedTaint(a.(*SeedTaint), b.(*garden.SeedTaint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedTaint)(nil), (*SeedTaint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedTaint_To_v1beta1_SeedTaint(a.(*garden.SeedTaint), b.(*SeedTaint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedVolume)(nil), (*garden.SeedVolume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedVolume_To_garden_SeedVolume(a.(*SeedVolume), b.(*garden.SeedVolume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedVolume)(nil), (*SeedVolume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedVolume_To_v1beta1_SeedVolume(a.(*garden.SeedVolume), b.(*SeedVolume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedVolumeProvider)(nil), (*garden.SeedVolumeProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedVolumeProvider_To_garden_SeedVolumeProvider(a.(*SeedVolumeProvider), b.(*garden.SeedVolumeProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedVolumeProvider)(nil), (*SeedVolumeProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedVolumeProvider_To_v1beta1_SeedVolumeProvider(a.(*garden.SeedVolumeProvider), b.(*SeedVolumeProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ServiceAccountConfig)(nil), (*garden.ServiceAccountConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ServiceAccountConfig_To_garden_ServiceAccountConfig(a.(*ServiceAccountConfig), b.(*garden.ServiceAccountConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ServiceAccountConfig)(nil), (*ServiceAccountConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ServiceAccountConfig_To_v1beta1_ServiceAccountConfig(a.(*garden.ServiceAccountConfig), b.(*ServiceAccountConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Shoot)(nil), (*garden.Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Shoot_To_garden_Shoot(a.(*Shoot), b.(*garden.Shoot), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Shoot)(nil), (*Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Shoot_To_v1beta1_Shoot(a.(*garden.Shoot), b.(*Shoot), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootList)(nil), (*garden.ShootList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootList_To_garden_ShootList(a.(*ShootList), b.(*garden.ShootList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootList)(nil), (*ShootList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootList_To_v1beta1_ShootList(a.(*garden.ShootList), b.(*ShootList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootMachineImage)(nil), (*garden.ShootMachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(a.(*ShootMachineImage), b.(*garden.ShootMachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootMachineImage)(nil), (*ShootMachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(a.(*garden.ShootMachineImage), b.(*ShootMachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootNetworks)(nil), (*garden.ShootNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootNetworks_To_garden_ShootNetworks(a.(*ShootNetworks), b.(*garden.ShootNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootNetworks)(nil), (*ShootNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootNetworks_To_v1beta1_ShootNetworks(a.(*garden.ShootNetworks), b.(*ShootNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootSpec)(nil), (*garden.ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootSpec_To_garden_ShootSpec(a.(*ShootSpec), b.(*garden.ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootSpec)(nil), (*ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootSpec_To_v1beta1_ShootSpec(a.(*garden.ShootSpec), b.(*ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootStatus)(nil), (*garden.ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootStatus_To_garden_ShootStatus(a.(*ShootStatus), b.(*garden.ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootStatus)(nil), (*ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootStatus_To_v1beta1_ShootStatus(a.(*garden.ShootStatus), b.(*ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Volume)(nil), (*garden.Volume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Volume_To_garden_Volume(a.(*Volume), b.(*garden.Volume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Volume)(nil), (*Volume)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Volume_To_v1beta1_Volume(a.(*garden.Volume), b.(*Volume), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VolumeType)(nil), (*garden.VolumeType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_VolumeType_To_garden_VolumeType(a.(*VolumeType), b.(*garden.VolumeType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.VolumeType)(nil), (*VolumeType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_VolumeType_To_v1beta1_VolumeType(a.(*garden.VolumeType), b.(*VolumeType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Worker)(nil), (*garden.Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Worker_To_garden_Worker(a.(*Worker), b.(*garden.Worker), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Worker)(nil), (*Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Worker_To_v1beta1_Worker(a.(*garden.Worker), b.(*Worker), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*WorkerKubernetes)(nil), (*garden.WorkerKubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_WorkerKubernetes_To_garden_WorkerKubernetes(a.(*WorkerKubernetes), b.(*garden.WorkerKubernetes), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.WorkerKubernetes)(nil), (*WorkerKubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_WorkerKubernetes_To_v1beta1_WorkerKubernetes(a.(*garden.WorkerKubernetes), b.(*WorkerKubernetes), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Addons)(nil), (*Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Addons_To_v1beta1_Addons(a.(*garden.Addons), b.(*Addons), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.CloudProfileSpec)(nil), (*CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(a.(*garden.CloudProfileSpec), b.(*CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.CloudProfile)(nil), (*CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfile_To_v1beta1_CloudProfile(a.(*garden.CloudProfile), b.(*CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Kubernetes)(nil), (*Kubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Kubernetes_To_v1beta1_Kubernetes(a.(*garden.Kubernetes), b.(*Kubernetes), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.ProjectSpec)(nil), (*ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectSpec_To_v1beta1_ProjectSpec(a.(*garden.ProjectSpec), b.(*ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.SeedSpec)(nil), (*SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedSpec_To_v1beta1_SeedSpec(a.(*garden.SeedSpec), b.(*SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Seed)(nil), (*Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Seed_To_v1beta1_Seed(a.(*garden.Seed), b.(*Seed), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.ShootSpec)(nil), (*ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootSpec_To_v1beta1_ShootSpec(a.(*garden.ShootSpec), b.(*ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.ShootStatus)(nil), (*ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootStatus_To_v1beta1_ShootStatus(a.(*garden.ShootStatus), b.(*ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Shoot)(nil), (*Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Shoot_To_v1beta1_Shoot(a.(*garden.Shoot), b.(*Shoot), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Addons)(nil), (*garden.Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Addons_To_garden_Addons(a.(*Addons), b.(*garden.Addons), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*CloudProfileSpec)(nil), (*garden.CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(a.(*CloudProfileSpec), b.(*garden.CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*CloudProfile)(nil), (*garden.CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProfile_To_garden_CloudProfile(a.(*CloudProfile), b.(*garden.CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Kubernetes)(nil), (*garden.Kubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Kubernetes_To_garden_Kubernetes(a.(*Kubernetes), b.(*garden.Kubernetes), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ProjectSpec)(nil), (*garden.ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProjectSpec_To_garden_ProjectSpec(a.(*ProjectSpec), b.(*garden.ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*SeedSpec)(nil), (*garden.SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedSpec_To_garden_SeedSpec(a.(*SeedSpec), b.(*garden.SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Seed)(nil), (*garden.Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Seed_To_garden_Seed(a.(*Seed), b.(*garden.Seed), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ShootSpec)(nil), (*garden.ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootSpec_To_garden_ShootSpec(a.(*ShootSpec), b.(*garden.ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ShootStatus)(nil), (*garden.ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootStatus_To_garden_ShootStatus(a.(*ShootStatus), b.(*garden.ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Shoot)(nil), (*garden.Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Shoot_To_garden_Shoot(a.(*Shoot), b.(*garden.Shoot), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_Addon_To_garden_Addon(in *Addon, out *garden.Addon, s conversion.Scope) error { + out.Enabled = in.Enabled + return nil +} + +// Convert_v1beta1_Addon_To_garden_Addon is an autogenerated conversion function. +func Convert_v1beta1_Addon_To_garden_Addon(in *Addon, out *garden.Addon, s conversion.Scope) error { + return autoConvert_v1beta1_Addon_To_garden_Addon(in, out, s) +} + +func autoConvert_garden_Addon_To_v1beta1_Addon(in *garden.Addon, out *Addon, s conversion.Scope) error { + out.Enabled = in.Enabled + return nil +} + +// Convert_garden_Addon_To_v1beta1_Addon is an autogenerated conversion function. +func Convert_garden_Addon_To_v1beta1_Addon(in *garden.Addon, out *Addon, s conversion.Scope) error { + return autoConvert_garden_Addon_To_v1beta1_Addon(in, out, s) +} + +func autoConvert_v1beta1_Addons_To_garden_Addons(in *Addons, out *garden.Addons, s conversion.Scope) error { + out.KubernetesDashboard = (*garden.KubernetesDashboard)(unsafe.Pointer(in.KubernetesDashboard)) + out.NginxIngress = (*garden.NginxIngress)(unsafe.Pointer(in.NginxIngress)) + return nil +} + +func autoConvert_garden_Addons_To_v1beta1_Addons(in *garden.Addons, out *Addons, s conversion.Scope) error { + out.KubernetesDashboard = (*KubernetesDashboard)(unsafe.Pointer(in.KubernetesDashboard)) + out.NginxIngress = (*NginxIngress)(unsafe.Pointer(in.NginxIngress)) + // WARNING: in.ClusterAutoscaler requires manual conversion: does not exist in peer-type + // WARNING: in.Heapster requires manual conversion: does not exist in peer-type + // WARNING: in.Kube2IAM requires manual conversion: does not exist in peer-type + // WARNING: in.KubeLego requires manual conversion: does not exist in peer-type + // WARNING: in.Monocular requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_AdmissionPlugin_To_garden_AdmissionPlugin(in *AdmissionPlugin, out *garden.AdmissionPlugin, s conversion.Scope) error { + out.Name = in.Name + out.Config = (*garden.ProviderConfig)(unsafe.Pointer(in.Config)) + return nil +} + +// Convert_v1beta1_AdmissionPlugin_To_garden_AdmissionPlugin is an autogenerated conversion function. +func Convert_v1beta1_AdmissionPlugin_To_garden_AdmissionPlugin(in *AdmissionPlugin, out *garden.AdmissionPlugin, s conversion.Scope) error { + return autoConvert_v1beta1_AdmissionPlugin_To_garden_AdmissionPlugin(in, out, s) +} + +func autoConvert_garden_AdmissionPlugin_To_v1beta1_AdmissionPlugin(in *garden.AdmissionPlugin, out *AdmissionPlugin, s conversion.Scope) error { + out.Name = in.Name + out.Config = (*ProviderConfig)(unsafe.Pointer(in.Config)) + return nil +} + +// Convert_garden_AdmissionPlugin_To_v1beta1_AdmissionPlugin is an autogenerated conversion function. +func Convert_garden_AdmissionPlugin_To_v1beta1_AdmissionPlugin(in *garden.AdmissionPlugin, out *AdmissionPlugin, s conversion.Scope) error { + return autoConvert_garden_AdmissionPlugin_To_v1beta1_AdmissionPlugin(in, out, s) +} + +func autoConvert_v1beta1_Alerting_To_garden_Alerting(in *Alerting, out *garden.Alerting, s conversion.Scope) error { + out.EmailReceivers = *(*[]string)(unsafe.Pointer(&in.EmailReceivers)) + return nil +} + +// Convert_v1beta1_Alerting_To_garden_Alerting is an autogenerated conversion function. +func Convert_v1beta1_Alerting_To_garden_Alerting(in *Alerting, out *garden.Alerting, s conversion.Scope) error { + return autoConvert_v1beta1_Alerting_To_garden_Alerting(in, out, s) +} + +func autoConvert_garden_Alerting_To_v1beta1_Alerting(in *garden.Alerting, out *Alerting, s conversion.Scope) error { + out.EmailReceivers = *(*[]string)(unsafe.Pointer(&in.EmailReceivers)) + return nil +} + +// Convert_garden_Alerting_To_v1beta1_Alerting is an autogenerated conversion function. +func Convert_garden_Alerting_To_v1beta1_Alerting(in *garden.Alerting, out *Alerting, s conversion.Scope) error { + return autoConvert_garden_Alerting_To_v1beta1_Alerting(in, out, s) +} + +func autoConvert_v1beta1_AuditConfig_To_garden_AuditConfig(in *AuditConfig, out *garden.AuditConfig, s conversion.Scope) error { + out.AuditPolicy = (*garden.AuditPolicy)(unsafe.Pointer(in.AuditPolicy)) + return nil +} + +// Convert_v1beta1_AuditConfig_To_garden_AuditConfig is an autogenerated conversion function. +func Convert_v1beta1_AuditConfig_To_garden_AuditConfig(in *AuditConfig, out *garden.AuditConfig, s conversion.Scope) error { + return autoConvert_v1beta1_AuditConfig_To_garden_AuditConfig(in, out, s) +} + +func autoConvert_garden_AuditConfig_To_v1beta1_AuditConfig(in *garden.AuditConfig, out *AuditConfig, s conversion.Scope) error { + out.AuditPolicy = (*AuditPolicy)(unsafe.Pointer(in.AuditPolicy)) + return nil +} + +// Convert_garden_AuditConfig_To_v1beta1_AuditConfig is an autogenerated conversion function. +func Convert_garden_AuditConfig_To_v1beta1_AuditConfig(in *garden.AuditConfig, out *AuditConfig, s conversion.Scope) error { + return autoConvert_garden_AuditConfig_To_v1beta1_AuditConfig(in, out, s) +} + +func autoConvert_v1beta1_AuditPolicy_To_garden_AuditPolicy(in *AuditPolicy, out *garden.AuditPolicy, s conversion.Scope) error { + out.ConfigMapRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigMapRef)) + return nil +} + +// Convert_v1beta1_AuditPolicy_To_garden_AuditPolicy is an autogenerated conversion function. +func Convert_v1beta1_AuditPolicy_To_garden_AuditPolicy(in *AuditPolicy, out *garden.AuditPolicy, s conversion.Scope) error { + return autoConvert_v1beta1_AuditPolicy_To_garden_AuditPolicy(in, out, s) +} + +func autoConvert_garden_AuditPolicy_To_v1beta1_AuditPolicy(in *garden.AuditPolicy, out *AuditPolicy, s conversion.Scope) error { + out.ConfigMapRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigMapRef)) + return nil +} + +// Convert_garden_AuditPolicy_To_v1beta1_AuditPolicy is an autogenerated conversion function. +func Convert_garden_AuditPolicy_To_v1beta1_AuditPolicy(in *garden.AuditPolicy, out *AuditPolicy, s conversion.Scope) error { + return autoConvert_garden_AuditPolicy_To_v1beta1_AuditPolicy(in, out, s) +} + +func autoConvert_v1beta1_AvailabilityZone_To_garden_AvailabilityZone(in *AvailabilityZone, out *garden.AvailabilityZone, s conversion.Scope) error { + out.Name = in.Name + out.UnavailableMachineTypes = *(*[]string)(unsafe.Pointer(&in.UnavailableMachineTypes)) + out.UnavailableVolumeTypes = *(*[]string)(unsafe.Pointer(&in.UnavailableVolumeTypes)) + return nil +} + +// Convert_v1beta1_AvailabilityZone_To_garden_AvailabilityZone is an autogenerated conversion function. +func Convert_v1beta1_AvailabilityZone_To_garden_AvailabilityZone(in *AvailabilityZone, out *garden.AvailabilityZone, s conversion.Scope) error { + return autoConvert_v1beta1_AvailabilityZone_To_garden_AvailabilityZone(in, out, s) +} + +func autoConvert_garden_AvailabilityZone_To_v1beta1_AvailabilityZone(in *garden.AvailabilityZone, out *AvailabilityZone, s conversion.Scope) error { + out.Name = in.Name + out.UnavailableMachineTypes = *(*[]string)(unsafe.Pointer(&in.UnavailableMachineTypes)) + out.UnavailableVolumeTypes = *(*[]string)(unsafe.Pointer(&in.UnavailableVolumeTypes)) + return nil +} + +// Convert_garden_AvailabilityZone_To_v1beta1_AvailabilityZone is an autogenerated conversion function. +func Convert_garden_AvailabilityZone_To_v1beta1_AvailabilityZone(in *garden.AvailabilityZone, out *AvailabilityZone, s conversion.Scope) error { + return autoConvert_garden_AvailabilityZone_To_v1beta1_AvailabilityZone(in, out, s) +} + +func autoConvert_v1beta1_BackupBucket_To_core_BackupBucket(in *BackupBucket, out *core.BackupBucket, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_BackupBucketSpec_To_core_BackupBucketSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_BackupBucketStatus_To_core_BackupBucketStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_BackupBucket_To_core_BackupBucket is an autogenerated conversion function. +func Convert_v1beta1_BackupBucket_To_core_BackupBucket(in *BackupBucket, out *core.BackupBucket, s conversion.Scope) error { + return autoConvert_v1beta1_BackupBucket_To_core_BackupBucket(in, out, s) +} + +func autoConvert_core_BackupBucket_To_v1beta1_BackupBucket(in *core.BackupBucket, out *BackupBucket, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_BackupBucketSpec_To_v1beta1_BackupBucketSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_core_BackupBucketStatus_To_v1beta1_BackupBucketStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_core_BackupBucket_To_v1beta1_BackupBucket is an autogenerated conversion function. +func Convert_core_BackupBucket_To_v1beta1_BackupBucket(in *core.BackupBucket, out *BackupBucket, s conversion.Scope) error { + return autoConvert_core_BackupBucket_To_v1beta1_BackupBucket(in, out, s) +} + +func autoConvert_v1beta1_BackupBucketList_To_core_BackupBucketList(in *BackupBucketList, out *core.BackupBucketList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]core.BackupBucket)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_BackupBucketList_To_core_BackupBucketList is an autogenerated conversion function. +func Convert_v1beta1_BackupBucketList_To_core_BackupBucketList(in *BackupBucketList, out *core.BackupBucketList, s conversion.Scope) error { + return autoConvert_v1beta1_BackupBucketList_To_core_BackupBucketList(in, out, s) +} + +func autoConvert_core_BackupBucketList_To_v1beta1_BackupBucketList(in *core.BackupBucketList, out *BackupBucketList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]BackupBucket)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_core_BackupBucketList_To_v1beta1_BackupBucketList is an autogenerated conversion function. +func Convert_core_BackupBucketList_To_v1beta1_BackupBucketList(in *core.BackupBucketList, out *BackupBucketList, s conversion.Scope) error { + return autoConvert_core_BackupBucketList_To_v1beta1_BackupBucketList(in, out, s) +} + +func autoConvert_v1beta1_BackupBucketProvider_To_core_BackupBucketProvider(in *BackupBucketProvider, out *core.BackupBucketProvider, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_v1beta1_BackupBucketProvider_To_core_BackupBucketProvider is an autogenerated conversion function. +func Convert_v1beta1_BackupBucketProvider_To_core_BackupBucketProvider(in *BackupBucketProvider, out *core.BackupBucketProvider, s conversion.Scope) error { + return autoConvert_v1beta1_BackupBucketProvider_To_core_BackupBucketProvider(in, out, s) +} + +func autoConvert_core_BackupBucketProvider_To_v1beta1_BackupBucketProvider(in *core.BackupBucketProvider, out *BackupBucketProvider, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_core_BackupBucketProvider_To_v1beta1_BackupBucketProvider is an autogenerated conversion function. +func Convert_core_BackupBucketProvider_To_v1beta1_BackupBucketProvider(in *core.BackupBucketProvider, out *BackupBucketProvider, s conversion.Scope) error { + return autoConvert_core_BackupBucketProvider_To_v1beta1_BackupBucketProvider(in, out, s) +} + +func autoConvert_v1beta1_BackupBucketSpec_To_core_BackupBucketSpec(in *BackupBucketSpec, out *core.BackupBucketSpec, s conversion.Scope) error { + if err := Convert_v1beta1_BackupBucketProvider_To_core_BackupBucketProvider(&in.Provider, &out.Provider, s); err != nil { + return err + } + out.SecretRef = in.SecretRef + out.SeedName = (*string)(unsafe.Pointer(in.SeedName)) + return nil +} + +// Convert_v1beta1_BackupBucketSpec_To_core_BackupBucketSpec is an autogenerated conversion function. +func Convert_v1beta1_BackupBucketSpec_To_core_BackupBucketSpec(in *BackupBucketSpec, out *core.BackupBucketSpec, s conversion.Scope) error { + return autoConvert_v1beta1_BackupBucketSpec_To_core_BackupBucketSpec(in, out, s) +} + +func autoConvert_core_BackupBucketSpec_To_v1beta1_BackupBucketSpec(in *core.BackupBucketSpec, out *BackupBucketSpec, s conversion.Scope) error { + if err := Convert_core_BackupBucketProvider_To_v1beta1_BackupBucketProvider(&in.Provider, &out.Provider, s); err != nil { + return err + } + out.SecretRef = in.SecretRef + out.SeedName = (*string)(unsafe.Pointer(in.SeedName)) + return nil +} + +// Convert_core_BackupBucketSpec_To_v1beta1_BackupBucketSpec is an autogenerated conversion function. +func Convert_core_BackupBucketSpec_To_v1beta1_BackupBucketSpec(in *core.BackupBucketSpec, out *BackupBucketSpec, s conversion.Scope) error { + return autoConvert_core_BackupBucketSpec_To_v1beta1_BackupBucketSpec(in, out, s) +} + +func autoConvert_v1beta1_BackupBucketStatus_To_core_BackupBucketStatus(in *BackupBucketStatus, out *core.BackupBucketStatus, s conversion.Scope) error { + out.LastOperation = (*core.LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastError = (*core.LastError)(unsafe.Pointer(in.LastError)) + out.ObservedGeneration = in.ObservedGeneration + out.GeneratedSecretRef = (*v1.SecretReference)(unsafe.Pointer(in.GeneratedSecretRef)) + return nil +} + +// Convert_v1beta1_BackupBucketStatus_To_core_BackupBucketStatus is an autogenerated conversion function. +func Convert_v1beta1_BackupBucketStatus_To_core_BackupBucketStatus(in *BackupBucketStatus, out *core.BackupBucketStatus, s conversion.Scope) error { + return autoConvert_v1beta1_BackupBucketStatus_To_core_BackupBucketStatus(in, out, s) +} + +func autoConvert_core_BackupBucketStatus_To_v1beta1_BackupBucketStatus(in *core.BackupBucketStatus, out *BackupBucketStatus, s conversion.Scope) error { + out.LastOperation = (*LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastError = (*LastError)(unsafe.Pointer(in.LastError)) + out.ObservedGeneration = in.ObservedGeneration + out.GeneratedSecretRef = (*v1.SecretReference)(unsafe.Pointer(in.GeneratedSecretRef)) + return nil +} + +// Convert_core_BackupBucketStatus_To_v1beta1_BackupBucketStatus is an autogenerated conversion function. +func Convert_core_BackupBucketStatus_To_v1beta1_BackupBucketStatus(in *core.BackupBucketStatus, out *BackupBucketStatus, s conversion.Scope) error { + return autoConvert_core_BackupBucketStatus_To_v1beta1_BackupBucketStatus(in, out, s) +} + +func autoConvert_v1beta1_BackupEntry_To_core_BackupEntry(in *BackupEntry, out *core.BackupEntry, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_BackupEntrySpec_To_core_BackupEntrySpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_BackupEntryStatus_To_core_BackupEntryStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_BackupEntry_To_core_BackupEntry is an autogenerated conversion function. +func Convert_v1beta1_BackupEntry_To_core_BackupEntry(in *BackupEntry, out *core.BackupEntry, s conversion.Scope) error { + return autoConvert_v1beta1_BackupEntry_To_core_BackupEntry(in, out, s) +} + +func autoConvert_core_BackupEntry_To_v1beta1_BackupEntry(in *core.BackupEntry, out *BackupEntry, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_BackupEntrySpec_To_v1beta1_BackupEntrySpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_core_BackupEntryStatus_To_v1beta1_BackupEntryStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_core_BackupEntry_To_v1beta1_BackupEntry is an autogenerated conversion function. +func Convert_core_BackupEntry_To_v1beta1_BackupEntry(in *core.BackupEntry, out *BackupEntry, s conversion.Scope) error { + return autoConvert_core_BackupEntry_To_v1beta1_BackupEntry(in, out, s) +} + +func autoConvert_v1beta1_BackupEntryList_To_core_BackupEntryList(in *BackupEntryList, out *core.BackupEntryList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]core.BackupEntry)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_BackupEntryList_To_core_BackupEntryList is an autogenerated conversion function. +func Convert_v1beta1_BackupEntryList_To_core_BackupEntryList(in *BackupEntryList, out *core.BackupEntryList, s conversion.Scope) error { + return autoConvert_v1beta1_BackupEntryList_To_core_BackupEntryList(in, out, s) +} + +func autoConvert_core_BackupEntryList_To_v1beta1_BackupEntryList(in *core.BackupEntryList, out *BackupEntryList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]BackupEntry)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_core_BackupEntryList_To_v1beta1_BackupEntryList is an autogenerated conversion function. +func Convert_core_BackupEntryList_To_v1beta1_BackupEntryList(in *core.BackupEntryList, out *BackupEntryList, s conversion.Scope) error { + return autoConvert_core_BackupEntryList_To_v1beta1_BackupEntryList(in, out, s) +} + +func autoConvert_v1beta1_BackupEntrySpec_To_core_BackupEntrySpec(in *BackupEntrySpec, out *core.BackupEntrySpec, s conversion.Scope) error { + out.BucketName = in.BucketName + out.SeedName = (*string)(unsafe.Pointer(in.SeedName)) + return nil +} + +// Convert_v1beta1_BackupEntrySpec_To_core_BackupEntrySpec is an autogenerated conversion function. +func Convert_v1beta1_BackupEntrySpec_To_core_BackupEntrySpec(in *BackupEntrySpec, out *core.BackupEntrySpec, s conversion.Scope) error { + return autoConvert_v1beta1_BackupEntrySpec_To_core_BackupEntrySpec(in, out, s) +} + +func autoConvert_core_BackupEntrySpec_To_v1beta1_BackupEntrySpec(in *core.BackupEntrySpec, out *BackupEntrySpec, s conversion.Scope) error { + out.BucketName = in.BucketName + out.SeedName = (*string)(unsafe.Pointer(in.SeedName)) + return nil +} + +// Convert_core_BackupEntrySpec_To_v1beta1_BackupEntrySpec is an autogenerated conversion function. +func Convert_core_BackupEntrySpec_To_v1beta1_BackupEntrySpec(in *core.BackupEntrySpec, out *BackupEntrySpec, s conversion.Scope) error { + return autoConvert_core_BackupEntrySpec_To_v1beta1_BackupEntrySpec(in, out, s) +} + +func autoConvert_v1beta1_BackupEntryStatus_To_core_BackupEntryStatus(in *BackupEntryStatus, out *core.BackupEntryStatus, s conversion.Scope) error { + out.LastOperation = (*core.LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastError = (*core.LastError)(unsafe.Pointer(in.LastError)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_v1beta1_BackupEntryStatus_To_core_BackupEntryStatus is an autogenerated conversion function. +func Convert_v1beta1_BackupEntryStatus_To_core_BackupEntryStatus(in *BackupEntryStatus, out *core.BackupEntryStatus, s conversion.Scope) error { + return autoConvert_v1beta1_BackupEntryStatus_To_core_BackupEntryStatus(in, out, s) +} + +func autoConvert_core_BackupEntryStatus_To_v1beta1_BackupEntryStatus(in *core.BackupEntryStatus, out *BackupEntryStatus, s conversion.Scope) error { + out.LastOperation = (*LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastError = (*LastError)(unsafe.Pointer(in.LastError)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_core_BackupEntryStatus_To_v1beta1_BackupEntryStatus is an autogenerated conversion function. +func Convert_core_BackupEntryStatus_To_v1beta1_BackupEntryStatus(in *core.BackupEntryStatus, out *BackupEntryStatus, s conversion.Scope) error { + return autoConvert_core_BackupEntryStatus_To_v1beta1_BackupEntryStatus(in, out, s) +} + +func autoConvert_v1beta1_CloudInfo_To_core_CloudInfo(in *CloudInfo, out *core.CloudInfo, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_v1beta1_CloudInfo_To_core_CloudInfo is an autogenerated conversion function. +func Convert_v1beta1_CloudInfo_To_core_CloudInfo(in *CloudInfo, out *core.CloudInfo, s conversion.Scope) error { + return autoConvert_v1beta1_CloudInfo_To_core_CloudInfo(in, out, s) +} + +func autoConvert_core_CloudInfo_To_v1beta1_CloudInfo(in *core.CloudInfo, out *CloudInfo, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_core_CloudInfo_To_v1beta1_CloudInfo is an autogenerated conversion function. +func Convert_core_CloudInfo_To_v1beta1_CloudInfo(in *core.CloudInfo, out *CloudInfo, s conversion.Scope) error { + return autoConvert_core_CloudInfo_To_v1beta1_CloudInfo(in, out, s) +} + +func autoConvert_v1beta1_CloudProfile_To_garden_CloudProfile(in *CloudProfile, out *garden.CloudProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func autoConvert_garden_CloudProfile_To_v1beta1_CloudProfile(in *garden.CloudProfile, out *CloudProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_CloudProfileList_To_garden_CloudProfileList(in *CloudProfileList, out *garden.CloudProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.CloudProfile, len(*in)) + for i := range *in { + if err := Convert_v1beta1_CloudProfile_To_garden_CloudProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_CloudProfileList_To_garden_CloudProfileList is an autogenerated conversion function. +func Convert_v1beta1_CloudProfileList_To_garden_CloudProfileList(in *CloudProfileList, out *garden.CloudProfileList, s conversion.Scope) error { + return autoConvert_v1beta1_CloudProfileList_To_garden_CloudProfileList(in, out, s) +} + +func autoConvert_garden_CloudProfileList_To_v1beta1_CloudProfileList(in *garden.CloudProfileList, out *CloudProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CloudProfile, len(*in)) + for i := range *in { + if err := Convert_garden_CloudProfile_To_v1beta1_CloudProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_CloudProfileList_To_v1beta1_CloudProfileList is an autogenerated conversion function. +func Convert_garden_CloudProfileList_To_v1beta1_CloudProfileList(in *garden.CloudProfileList, out *CloudProfileList, s conversion.Scope) error { + return autoConvert_garden_CloudProfileList_To_v1beta1_CloudProfileList(in, out, s) +} + +func autoConvert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(in *CloudProfileSpec, out *garden.CloudProfileSpec, s conversion.Scope) error { + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + if err := Convert_v1beta1_KubernetesSettings_To_garden_KubernetesSettings(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + out.MachineImages = *(*[]garden.CloudProfileMachineImage)(unsafe.Pointer(&in.MachineImages)) + if in.MachineTypes != nil { + in, out := &in.MachineTypes, &out.MachineTypes + *out = make([]garden.MachineType, len(*in)) + for i := range *in { + if err := Convert_v1beta1_MachineType_To_garden_MachineType(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineTypes = nil + } + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Regions = *(*[]garden.Region)(unsafe.Pointer(&in.Regions)) + out.SeedSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.SeedSelector)) + out.Type = in.Type + if in.VolumeTypes != nil { + in, out := &in.VolumeTypes, &out.VolumeTypes + *out = make([]garden.VolumeType, len(*in)) + for i := range *in { + if err := Convert_v1beta1_VolumeType_To_garden_VolumeType(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.VolumeTypes = nil + } + return nil +} + +func autoConvert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(in *garden.CloudProfileSpec, out *CloudProfileSpec, s conversion.Scope) error { + // WARNING: in.AWS requires manual conversion: does not exist in peer-type + // WARNING: in.Azure requires manual conversion: does not exist in peer-type + // WARNING: in.GCP requires manual conversion: does not exist in peer-type + // WARNING: in.OpenStack requires manual conversion: does not exist in peer-type + // WARNING: in.Alicloud requires manual conversion: does not exist in peer-type + // WARNING: in.Packet requires manual conversion: does not exist in peer-type + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + if err := Convert_garden_KubernetesSettings_To_v1beta1_KubernetesSettings(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + out.MachineImages = *(*[]MachineImage)(unsafe.Pointer(&in.MachineImages)) + if in.MachineTypes != nil { + in, out := &in.MachineTypes, &out.MachineTypes + *out = make([]MachineType, len(*in)) + for i := range *in { + if err := Convert_garden_MachineType_To_v1beta1_MachineType(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineTypes = nil + } + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Regions = *(*[]Region)(unsafe.Pointer(&in.Regions)) + out.SeedSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.SeedSelector)) + out.Type = in.Type + if in.VolumeTypes != nil { + in, out := &in.VolumeTypes, &out.VolumeTypes + *out = make([]VolumeType, len(*in)) + for i := range *in { + if err := Convert_garden_VolumeType_To_v1beta1_VolumeType(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.VolumeTypes = nil + } + return nil +} + +func autoConvert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler(in *ClusterAutoscaler, out *garden.ClusterAutoscaler, s conversion.Scope) error { + out.ScaleDownDelayAfterAdd = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterAdd)) + out.ScaleDownDelayAfterDelete = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterDelete)) + out.ScaleDownDelayAfterFailure = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterFailure)) + out.ScaleDownUnneededTime = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownUnneededTime)) + out.ScaleDownUtilizationThreshold = (*float64)(unsafe.Pointer(in.ScaleDownUtilizationThreshold)) + out.ScanInterval = (*metav1.Duration)(unsafe.Pointer(in.ScanInterval)) + return nil +} + +// Convert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler is an autogenerated conversion function. +func Convert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler(in *ClusterAutoscaler, out *garden.ClusterAutoscaler, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler(in, out, s) +} + +func autoConvert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler(in *garden.ClusterAutoscaler, out *ClusterAutoscaler, s conversion.Scope) error { + out.ScaleDownUtilizationThreshold = (*float64)(unsafe.Pointer(in.ScaleDownUtilizationThreshold)) + out.ScaleDownUnneededTime = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownUnneededTime)) + out.ScaleDownDelayAfterAdd = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterAdd)) + out.ScaleDownDelayAfterFailure = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterFailure)) + out.ScaleDownDelayAfterDelete = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterDelete)) + out.ScanInterval = (*metav1.Duration)(unsafe.Pointer(in.ScanInterval)) + return nil +} + +// Convert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler is an autogenerated conversion function. +func Convert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler(in *garden.ClusterAutoscaler, out *ClusterAutoscaler, s conversion.Scope) error { + return autoConvert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler(in, out, s) +} + +func autoConvert_v1beta1_ClusterInfo_To_core_ClusterInfo(in *ClusterInfo, out *core.ClusterInfo, s conversion.Scope) error { + if err := Convert_v1beta1_CloudInfo_To_core_CloudInfo(&in.Cloud, &out.Cloud, s); err != nil { + return err + } + if err := Convert_v1beta1_KubernetesInfo_To_core_KubernetesInfo(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_ClusterInfo_To_core_ClusterInfo is an autogenerated conversion function. +func Convert_v1beta1_ClusterInfo_To_core_ClusterInfo(in *ClusterInfo, out *core.ClusterInfo, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterInfo_To_core_ClusterInfo(in, out, s) +} + +func autoConvert_core_ClusterInfo_To_v1beta1_ClusterInfo(in *core.ClusterInfo, out *ClusterInfo, s conversion.Scope) error { + if err := Convert_core_CloudInfo_To_v1beta1_CloudInfo(&in.Cloud, &out.Cloud, s); err != nil { + return err + } + if err := Convert_core_KubernetesInfo_To_v1beta1_KubernetesInfo(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + return nil +} + +// Convert_core_ClusterInfo_To_v1beta1_ClusterInfo is an autogenerated conversion function. +func Convert_core_ClusterInfo_To_v1beta1_ClusterInfo(in *core.ClusterInfo, out *ClusterInfo, s conversion.Scope) error { + return autoConvert_core_ClusterInfo_To_v1beta1_ClusterInfo(in, out, s) +} + +func autoConvert_v1beta1_Condition_To_core_Condition(in *Condition, out *core.Condition, s conversion.Scope) error { + out.Type = core.ConditionType(in.Type) + out.Status = core.ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.LastUpdateTime = in.LastUpdateTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +// Convert_v1beta1_Condition_To_core_Condition is an autogenerated conversion function. +func Convert_v1beta1_Condition_To_core_Condition(in *Condition, out *core.Condition, s conversion.Scope) error { + return autoConvert_v1beta1_Condition_To_core_Condition(in, out, s) +} + +func autoConvert_core_Condition_To_v1beta1_Condition(in *core.Condition, out *Condition, s conversion.Scope) error { + out.Type = ConditionType(in.Type) + out.Status = ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.LastUpdateTime = in.LastUpdateTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +// Convert_core_Condition_To_v1beta1_Condition is an autogenerated conversion function. +func Convert_core_Condition_To_v1beta1_Condition(in *core.Condition, out *Condition, s conversion.Scope) error { + return autoConvert_core_Condition_To_v1beta1_Condition(in, out, s) +} + +func autoConvert_v1beta1_ControllerDeployment_To_core_ControllerDeployment(in *ControllerDeployment, out *core.ControllerDeployment, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*core.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_v1beta1_ControllerDeployment_To_core_ControllerDeployment is an autogenerated conversion function. +func Convert_v1beta1_ControllerDeployment_To_core_ControllerDeployment(in *ControllerDeployment, out *core.ControllerDeployment, s conversion.Scope) error { + return autoConvert_v1beta1_ControllerDeployment_To_core_ControllerDeployment(in, out, s) +} + +func autoConvert_core_ControllerDeployment_To_v1beta1_ControllerDeployment(in *core.ControllerDeployment, out *ControllerDeployment, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_core_ControllerDeployment_To_v1beta1_ControllerDeployment is an autogenerated conversion function. +func Convert_core_ControllerDeployment_To_v1beta1_ControllerDeployment(in *core.ControllerDeployment, out *ControllerDeployment, s conversion.Scope) error { + return autoConvert_core_ControllerDeployment_To_v1beta1_ControllerDeployment(in, out, s) +} + +func autoConvert_v1beta1_ControllerInstallation_To_core_ControllerInstallation(in *ControllerInstallation, out *core.ControllerInstallation, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_ControllerInstallationSpec_To_core_ControllerInstallationSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_ControllerInstallationStatus_To_core_ControllerInstallationStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_ControllerInstallation_To_core_ControllerInstallation is an autogenerated conversion function. +func Convert_v1beta1_ControllerInstallation_To_core_ControllerInstallation(in *ControllerInstallation, out *core.ControllerInstallation, s conversion.Scope) error { + return autoConvert_v1beta1_ControllerInstallation_To_core_ControllerInstallation(in, out, s) +} + +func autoConvert_core_ControllerInstallation_To_v1beta1_ControllerInstallation(in *core.ControllerInstallation, out *ControllerInstallation, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_ControllerInstallationSpec_To_v1beta1_ControllerInstallationSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_core_ControllerInstallationStatus_To_v1beta1_ControllerInstallationStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_core_ControllerInstallation_To_v1beta1_ControllerInstallation is an autogenerated conversion function. +func Convert_core_ControllerInstallation_To_v1beta1_ControllerInstallation(in *core.ControllerInstallation, out *ControllerInstallation, s conversion.Scope) error { + return autoConvert_core_ControllerInstallation_To_v1beta1_ControllerInstallation(in, out, s) +} + +func autoConvert_v1beta1_ControllerInstallationList_To_core_ControllerInstallationList(in *ControllerInstallationList, out *core.ControllerInstallationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]core.ControllerInstallation)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_ControllerInstallationList_To_core_ControllerInstallationList is an autogenerated conversion function. +func Convert_v1beta1_ControllerInstallationList_To_core_ControllerInstallationList(in *ControllerInstallationList, out *core.ControllerInstallationList, s conversion.Scope) error { + return autoConvert_v1beta1_ControllerInstallationList_To_core_ControllerInstallationList(in, out, s) +} + +func autoConvert_core_ControllerInstallationList_To_v1beta1_ControllerInstallationList(in *core.ControllerInstallationList, out *ControllerInstallationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ControllerInstallation)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_core_ControllerInstallationList_To_v1beta1_ControllerInstallationList is an autogenerated conversion function. +func Convert_core_ControllerInstallationList_To_v1beta1_ControllerInstallationList(in *core.ControllerInstallationList, out *ControllerInstallationList, s conversion.Scope) error { + return autoConvert_core_ControllerInstallationList_To_v1beta1_ControllerInstallationList(in, out, s) +} + +func autoConvert_v1beta1_ControllerInstallationSpec_To_core_ControllerInstallationSpec(in *ControllerInstallationSpec, out *core.ControllerInstallationSpec, s conversion.Scope) error { + out.RegistrationRef = in.RegistrationRef + out.SeedRef = in.SeedRef + return nil +} + +// Convert_v1beta1_ControllerInstallationSpec_To_core_ControllerInstallationSpec is an autogenerated conversion function. +func Convert_v1beta1_ControllerInstallationSpec_To_core_ControllerInstallationSpec(in *ControllerInstallationSpec, out *core.ControllerInstallationSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ControllerInstallationSpec_To_core_ControllerInstallationSpec(in, out, s) +} + +func autoConvert_core_ControllerInstallationSpec_To_v1beta1_ControllerInstallationSpec(in *core.ControllerInstallationSpec, out *ControllerInstallationSpec, s conversion.Scope) error { + out.RegistrationRef = in.RegistrationRef + out.SeedRef = in.SeedRef + return nil +} + +// Convert_core_ControllerInstallationSpec_To_v1beta1_ControllerInstallationSpec is an autogenerated conversion function. +func Convert_core_ControllerInstallationSpec_To_v1beta1_ControllerInstallationSpec(in *core.ControllerInstallationSpec, out *ControllerInstallationSpec, s conversion.Scope) error { + return autoConvert_core_ControllerInstallationSpec_To_v1beta1_ControllerInstallationSpec(in, out, s) +} + +func autoConvert_v1beta1_ControllerInstallationStatus_To_core_ControllerInstallationStatus(in *ControllerInstallationStatus, out *core.ControllerInstallationStatus, s conversion.Scope) error { + out.Conditions = *(*[]core.Condition)(unsafe.Pointer(&in.Conditions)) + out.ProviderStatus = (*core.ProviderConfig)(unsafe.Pointer(in.ProviderStatus)) + return nil +} + +// Convert_v1beta1_ControllerInstallationStatus_To_core_ControllerInstallationStatus is an autogenerated conversion function. +func Convert_v1beta1_ControllerInstallationStatus_To_core_ControllerInstallationStatus(in *ControllerInstallationStatus, out *core.ControllerInstallationStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ControllerInstallationStatus_To_core_ControllerInstallationStatus(in, out, s) +} + +func autoConvert_core_ControllerInstallationStatus_To_v1beta1_ControllerInstallationStatus(in *core.ControllerInstallationStatus, out *ControllerInstallationStatus, s conversion.Scope) error { + out.Conditions = *(*[]Condition)(unsafe.Pointer(&in.Conditions)) + out.ProviderStatus = (*ProviderConfig)(unsafe.Pointer(in.ProviderStatus)) + return nil +} + +// Convert_core_ControllerInstallationStatus_To_v1beta1_ControllerInstallationStatus is an autogenerated conversion function. +func Convert_core_ControllerInstallationStatus_To_v1beta1_ControllerInstallationStatus(in *core.ControllerInstallationStatus, out *ControllerInstallationStatus, s conversion.Scope) error { + return autoConvert_core_ControllerInstallationStatus_To_v1beta1_ControllerInstallationStatus(in, out, s) +} + +func autoConvert_v1beta1_ControllerRegistration_To_core_ControllerRegistration(in *ControllerRegistration, out *core.ControllerRegistration, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_ControllerRegistration_To_core_ControllerRegistration is an autogenerated conversion function. +func Convert_v1beta1_ControllerRegistration_To_core_ControllerRegistration(in *ControllerRegistration, out *core.ControllerRegistration, s conversion.Scope) error { + return autoConvert_v1beta1_ControllerRegistration_To_core_ControllerRegistration(in, out, s) +} + +func autoConvert_core_ControllerRegistration_To_v1beta1_ControllerRegistration(in *core.ControllerRegistration, out *ControllerRegistration, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_ControllerRegistrationSpec_To_v1beta1_ControllerRegistrationSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_core_ControllerRegistration_To_v1beta1_ControllerRegistration is an autogenerated conversion function. +func Convert_core_ControllerRegistration_To_v1beta1_ControllerRegistration(in *core.ControllerRegistration, out *ControllerRegistration, s conversion.Scope) error { + return autoConvert_core_ControllerRegistration_To_v1beta1_ControllerRegistration(in, out, s) +} + +func autoConvert_v1beta1_ControllerRegistrationList_To_core_ControllerRegistrationList(in *ControllerRegistrationList, out *core.ControllerRegistrationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]core.ControllerRegistration)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_ControllerRegistrationList_To_core_ControllerRegistrationList is an autogenerated conversion function. +func Convert_v1beta1_ControllerRegistrationList_To_core_ControllerRegistrationList(in *ControllerRegistrationList, out *core.ControllerRegistrationList, s conversion.Scope) error { + return autoConvert_v1beta1_ControllerRegistrationList_To_core_ControllerRegistrationList(in, out, s) +} + +func autoConvert_core_ControllerRegistrationList_To_v1beta1_ControllerRegistrationList(in *core.ControllerRegistrationList, out *ControllerRegistrationList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ControllerRegistration)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_core_ControllerRegistrationList_To_v1beta1_ControllerRegistrationList is an autogenerated conversion function. +func Convert_core_ControllerRegistrationList_To_v1beta1_ControllerRegistrationList(in *core.ControllerRegistrationList, out *ControllerRegistrationList, s conversion.Scope) error { + return autoConvert_core_ControllerRegistrationList_To_v1beta1_ControllerRegistrationList(in, out, s) +} + +func autoConvert_v1beta1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec(in *ControllerRegistrationSpec, out *core.ControllerRegistrationSpec, s conversion.Scope) error { + out.Resources = *(*[]core.ControllerResource)(unsafe.Pointer(&in.Resources)) + out.Deployment = (*core.ControllerDeployment)(unsafe.Pointer(in.Deployment)) + return nil +} + +// Convert_v1beta1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec is an autogenerated conversion function. +func Convert_v1beta1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec(in *ControllerRegistrationSpec, out *core.ControllerRegistrationSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ControllerRegistrationSpec_To_core_ControllerRegistrationSpec(in, out, s) +} + +func autoConvert_core_ControllerRegistrationSpec_To_v1beta1_ControllerRegistrationSpec(in *core.ControllerRegistrationSpec, out *ControllerRegistrationSpec, s conversion.Scope) error { + out.Resources = *(*[]ControllerResource)(unsafe.Pointer(&in.Resources)) + out.Deployment = (*ControllerDeployment)(unsafe.Pointer(in.Deployment)) + return nil +} + +// Convert_core_ControllerRegistrationSpec_To_v1beta1_ControllerRegistrationSpec is an autogenerated conversion function. +func Convert_core_ControllerRegistrationSpec_To_v1beta1_ControllerRegistrationSpec(in *core.ControllerRegistrationSpec, out *ControllerRegistrationSpec, s conversion.Scope) error { + return autoConvert_core_ControllerRegistrationSpec_To_v1beta1_ControllerRegistrationSpec(in, out, s) +} + +func autoConvert_v1beta1_ControllerResource_To_core_ControllerResource(in *ControllerResource, out *core.ControllerResource, s conversion.Scope) error { + out.Kind = in.Kind + out.Type = in.Type + out.GloballyEnabled = (*bool)(unsafe.Pointer(in.GloballyEnabled)) + out.ReconcileTimeout = (*metav1.Duration)(unsafe.Pointer(in.ReconcileTimeout)) + return nil +} + +// Convert_v1beta1_ControllerResource_To_core_ControllerResource is an autogenerated conversion function. +func Convert_v1beta1_ControllerResource_To_core_ControllerResource(in *ControllerResource, out *core.ControllerResource, s conversion.Scope) error { + return autoConvert_v1beta1_ControllerResource_To_core_ControllerResource(in, out, s) +} + +func autoConvert_core_ControllerResource_To_v1beta1_ControllerResource(in *core.ControllerResource, out *ControllerResource, s conversion.Scope) error { + out.Kind = in.Kind + out.Type = in.Type + out.GloballyEnabled = (*bool)(unsafe.Pointer(in.GloballyEnabled)) + out.ReconcileTimeout = (*metav1.Duration)(unsafe.Pointer(in.ReconcileTimeout)) + return nil +} + +// Convert_core_ControllerResource_To_v1beta1_ControllerResource is an autogenerated conversion function. +func Convert_core_ControllerResource_To_v1beta1_ControllerResource(in *core.ControllerResource, out *ControllerResource, s conversion.Scope) error { + return autoConvert_core_ControllerResource_To_v1beta1_ControllerResource(in, out, s) +} + +func autoConvert_v1beta1_DNS_To_garden_DNS(in *DNS, out *garden.DNS, s conversion.Scope) error { + out.Domain = (*string)(unsafe.Pointer(in.Domain)) + out.Providers = *(*[]garden.DNSProvider)(unsafe.Pointer(&in.Providers)) + return nil +} + +// Convert_v1beta1_DNS_To_garden_DNS is an autogenerated conversion function. +func Convert_v1beta1_DNS_To_garden_DNS(in *DNS, out *garden.DNS, s conversion.Scope) error { + return autoConvert_v1beta1_DNS_To_garden_DNS(in, out, s) +} + +func autoConvert_garden_DNS_To_v1beta1_DNS(in *garden.DNS, out *DNS, s conversion.Scope) error { + out.Domain = (*string)(unsafe.Pointer(in.Domain)) + out.Providers = *(*[]DNSProvider)(unsafe.Pointer(&in.Providers)) + return nil +} + +// Convert_garden_DNS_To_v1beta1_DNS is an autogenerated conversion function. +func Convert_garden_DNS_To_v1beta1_DNS(in *garden.DNS, out *DNS, s conversion.Scope) error { + return autoConvert_garden_DNS_To_v1beta1_DNS(in, out, s) +} + +func autoConvert_v1beta1_DNSIncludeExclude_To_garden_DNSIncludeExclude(in *DNSIncludeExclude, out *garden.DNSIncludeExclude, s conversion.Scope) error { + out.Include = *(*[]string)(unsafe.Pointer(&in.Include)) + out.Exclude = *(*[]string)(unsafe.Pointer(&in.Exclude)) + return nil +} + +// Convert_v1beta1_DNSIncludeExclude_To_garden_DNSIncludeExclude is an autogenerated conversion function. +func Convert_v1beta1_DNSIncludeExclude_To_garden_DNSIncludeExclude(in *DNSIncludeExclude, out *garden.DNSIncludeExclude, s conversion.Scope) error { + return autoConvert_v1beta1_DNSIncludeExclude_To_garden_DNSIncludeExclude(in, out, s) +} + +func autoConvert_garden_DNSIncludeExclude_To_v1beta1_DNSIncludeExclude(in *garden.DNSIncludeExclude, out *DNSIncludeExclude, s conversion.Scope) error { + out.Include = *(*[]string)(unsafe.Pointer(&in.Include)) + out.Exclude = *(*[]string)(unsafe.Pointer(&in.Exclude)) + return nil +} + +// Convert_garden_DNSIncludeExclude_To_v1beta1_DNSIncludeExclude is an autogenerated conversion function. +func Convert_garden_DNSIncludeExclude_To_v1beta1_DNSIncludeExclude(in *garden.DNSIncludeExclude, out *DNSIncludeExclude, s conversion.Scope) error { + return autoConvert_garden_DNSIncludeExclude_To_v1beta1_DNSIncludeExclude(in, out, s) +} + +func autoConvert_v1beta1_DNSProvider_To_garden_DNSProvider(in *DNSProvider, out *garden.DNSProvider, s conversion.Scope) error { + out.Domains = (*garden.DNSIncludeExclude)(unsafe.Pointer(in.Domains)) + out.SecretName = (*string)(unsafe.Pointer(in.SecretName)) + out.Type = (*string)(unsafe.Pointer(in.Type)) + out.Zones = (*garden.DNSIncludeExclude)(unsafe.Pointer(in.Zones)) + return nil +} + +// Convert_v1beta1_DNSProvider_To_garden_DNSProvider is an autogenerated conversion function. +func Convert_v1beta1_DNSProvider_To_garden_DNSProvider(in *DNSProvider, out *garden.DNSProvider, s conversion.Scope) error { + return autoConvert_v1beta1_DNSProvider_To_garden_DNSProvider(in, out, s) +} + +func autoConvert_garden_DNSProvider_To_v1beta1_DNSProvider(in *garden.DNSProvider, out *DNSProvider, s conversion.Scope) error { + out.Domains = (*DNSIncludeExclude)(unsafe.Pointer(in.Domains)) + out.SecretName = (*string)(unsafe.Pointer(in.SecretName)) + out.Type = (*string)(unsafe.Pointer(in.Type)) + out.Zones = (*DNSIncludeExclude)(unsafe.Pointer(in.Zones)) + return nil +} + +// Convert_garden_DNSProvider_To_v1beta1_DNSProvider is an autogenerated conversion function. +func Convert_garden_DNSProvider_To_v1beta1_DNSProvider(in *garden.DNSProvider, out *DNSProvider, s conversion.Scope) error { + return autoConvert_garden_DNSProvider_To_v1beta1_DNSProvider(in, out, s) +} + +func autoConvert_v1beta1_Endpoint_To_core_Endpoint(in *Endpoint, out *core.Endpoint, s conversion.Scope) error { + out.Name = in.Name + out.URL = in.URL + out.Purpose = in.Purpose + return nil +} + +// Convert_v1beta1_Endpoint_To_core_Endpoint is an autogenerated conversion function. +func Convert_v1beta1_Endpoint_To_core_Endpoint(in *Endpoint, out *core.Endpoint, s conversion.Scope) error { + return autoConvert_v1beta1_Endpoint_To_core_Endpoint(in, out, s) +} + +func autoConvert_core_Endpoint_To_v1beta1_Endpoint(in *core.Endpoint, out *Endpoint, s conversion.Scope) error { + out.Name = in.Name + out.URL = in.URL + out.Purpose = in.Purpose + return nil +} + +// Convert_core_Endpoint_To_v1beta1_Endpoint is an autogenerated conversion function. +func Convert_core_Endpoint_To_v1beta1_Endpoint(in *core.Endpoint, out *Endpoint, s conversion.Scope) error { + return autoConvert_core_Endpoint_To_v1beta1_Endpoint(in, out, s) +} + +func autoConvert_v1beta1_ExpirableVersion_To_garden_ExpirableVersion(in *ExpirableVersion, out *garden.ExpirableVersion, s conversion.Scope) error { + out.Version = in.Version + out.ExpirationDate = (*metav1.Time)(unsafe.Pointer(in.ExpirationDate)) + return nil +} + +// Convert_v1beta1_ExpirableVersion_To_garden_ExpirableVersion is an autogenerated conversion function. +func Convert_v1beta1_ExpirableVersion_To_garden_ExpirableVersion(in *ExpirableVersion, out *garden.ExpirableVersion, s conversion.Scope) error { + return autoConvert_v1beta1_ExpirableVersion_To_garden_ExpirableVersion(in, out, s) +} + +func autoConvert_garden_ExpirableVersion_To_v1beta1_ExpirableVersion(in *garden.ExpirableVersion, out *ExpirableVersion, s conversion.Scope) error { + out.Version = in.Version + out.ExpirationDate = (*metav1.Time)(unsafe.Pointer(in.ExpirationDate)) + return nil +} + +// Convert_garden_ExpirableVersion_To_v1beta1_ExpirableVersion is an autogenerated conversion function. +func Convert_garden_ExpirableVersion_To_v1beta1_ExpirableVersion(in *garden.ExpirableVersion, out *ExpirableVersion, s conversion.Scope) error { + return autoConvert_garden_ExpirableVersion_To_v1beta1_ExpirableVersion(in, out, s) +} + +func autoConvert_v1beta1_Extension_To_garden_Extension(in *Extension, out *garden.Extension, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_v1beta1_Extension_To_garden_Extension is an autogenerated conversion function. +func Convert_v1beta1_Extension_To_garden_Extension(in *Extension, out *garden.Extension, s conversion.Scope) error { + return autoConvert_v1beta1_Extension_To_garden_Extension(in, out, s) +} + +func autoConvert_garden_Extension_To_v1beta1_Extension(in *garden.Extension, out *Extension, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_garden_Extension_To_v1beta1_Extension is an autogenerated conversion function. +func Convert_garden_Extension_To_v1beta1_Extension(in *garden.Extension, out *Extension, s conversion.Scope) error { + return autoConvert_garden_Extension_To_v1beta1_Extension(in, out, s) +} + +func autoConvert_v1beta1_Gardener_To_garden_Gardener(in *Gardener, out *garden.Gardener, s conversion.Scope) error { + out.ID = in.ID + out.Name = in.Name + out.Version = in.Version + return nil +} + +// Convert_v1beta1_Gardener_To_garden_Gardener is an autogenerated conversion function. +func Convert_v1beta1_Gardener_To_garden_Gardener(in *Gardener, out *garden.Gardener, s conversion.Scope) error { + return autoConvert_v1beta1_Gardener_To_garden_Gardener(in, out, s) +} + +func autoConvert_garden_Gardener_To_v1beta1_Gardener(in *garden.Gardener, out *Gardener, s conversion.Scope) error { + out.ID = in.ID + out.Name = in.Name + out.Version = in.Version + return nil +} + +// Convert_garden_Gardener_To_v1beta1_Gardener is an autogenerated conversion function. +func Convert_garden_Gardener_To_v1beta1_Gardener(in *garden.Gardener, out *Gardener, s conversion.Scope) error { + return autoConvert_garden_Gardener_To_v1beta1_Gardener(in, out, s) +} + +func autoConvert_v1beta1_Hibernation_To_garden_Hibernation(in *Hibernation, out *garden.Hibernation, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + out.Schedules = *(*[]garden.HibernationSchedule)(unsafe.Pointer(&in.Schedules)) + return nil +} + +// Convert_v1beta1_Hibernation_To_garden_Hibernation is an autogenerated conversion function. +func Convert_v1beta1_Hibernation_To_garden_Hibernation(in *Hibernation, out *garden.Hibernation, s conversion.Scope) error { + return autoConvert_v1beta1_Hibernation_To_garden_Hibernation(in, out, s) +} + +func autoConvert_garden_Hibernation_To_v1beta1_Hibernation(in *garden.Hibernation, out *Hibernation, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + out.Schedules = *(*[]HibernationSchedule)(unsafe.Pointer(&in.Schedules)) + return nil +} + +// Convert_garden_Hibernation_To_v1beta1_Hibernation is an autogenerated conversion function. +func Convert_garden_Hibernation_To_v1beta1_Hibernation(in *garden.Hibernation, out *Hibernation, s conversion.Scope) error { + return autoConvert_garden_Hibernation_To_v1beta1_Hibernation(in, out, s) +} + +func autoConvert_v1beta1_HibernationSchedule_To_garden_HibernationSchedule(in *HibernationSchedule, out *garden.HibernationSchedule, s conversion.Scope) error { + out.Start = (*string)(unsafe.Pointer(in.Start)) + out.End = (*string)(unsafe.Pointer(in.End)) + out.Location = (*string)(unsafe.Pointer(in.Location)) + return nil +} + +// Convert_v1beta1_HibernationSchedule_To_garden_HibernationSchedule is an autogenerated conversion function. +func Convert_v1beta1_HibernationSchedule_To_garden_HibernationSchedule(in *HibernationSchedule, out *garden.HibernationSchedule, s conversion.Scope) error { + return autoConvert_v1beta1_HibernationSchedule_To_garden_HibernationSchedule(in, out, s) +} + +func autoConvert_garden_HibernationSchedule_To_v1beta1_HibernationSchedule(in *garden.HibernationSchedule, out *HibernationSchedule, s conversion.Scope) error { + out.Start = (*string)(unsafe.Pointer(in.Start)) + out.End = (*string)(unsafe.Pointer(in.End)) + out.Location = (*string)(unsafe.Pointer(in.Location)) + return nil +} + +// Convert_garden_HibernationSchedule_To_v1beta1_HibernationSchedule is an autogenerated conversion function. +func Convert_garden_HibernationSchedule_To_v1beta1_HibernationSchedule(in *garden.HibernationSchedule, out *HibernationSchedule, s conversion.Scope) error { + return autoConvert_garden_HibernationSchedule_To_v1beta1_HibernationSchedule(in, out, s) +} + +func autoConvert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(in *HorizontalPodAutoscalerConfig, out *garden.HorizontalPodAutoscalerConfig, s conversion.Scope) error { + out.CPUInitializationPeriod = (*metav1.Duration)(unsafe.Pointer(in.CPUInitializationPeriod)) + out.DownscaleDelay = (*metav1.Duration)(unsafe.Pointer(in.DownscaleDelay)) + out.DownscaleStabilization = (*metav1.Duration)(unsafe.Pointer(in.DownscaleStabilization)) + out.InitialReadinessDelay = (*metav1.Duration)(unsafe.Pointer(in.InitialReadinessDelay)) + out.SyncPeriod = (*metav1.Duration)(unsafe.Pointer(in.SyncPeriod)) + out.Tolerance = (*float64)(unsafe.Pointer(in.Tolerance)) + out.UpscaleDelay = (*metav1.Duration)(unsafe.Pointer(in.UpscaleDelay)) + return nil +} + +// Convert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig is an autogenerated conversion function. +func Convert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(in *HorizontalPodAutoscalerConfig, out *garden.HorizontalPodAutoscalerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(in, out, s) +} + +func autoConvert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig(in *garden.HorizontalPodAutoscalerConfig, out *HorizontalPodAutoscalerConfig, s conversion.Scope) error { + out.DownscaleDelay = (*GardenerDuration)(unsafe.Pointer(in.DownscaleDelay)) + out.SyncPeriod = (*GardenerDuration)(unsafe.Pointer(in.SyncPeriod)) + out.Tolerance = (*float64)(unsafe.Pointer(in.Tolerance)) + out.UpscaleDelay = (*GardenerDuration)(unsafe.Pointer(in.UpscaleDelay)) + out.DownscaleStabilization = (*GardenerDuration)(unsafe.Pointer(in.DownscaleStabilization)) + out.InitialReadinessDelay = (*GardenerDuration)(unsafe.Pointer(in.InitialReadinessDelay)) + out.CPUInitializationPeriod = (*GardenerDuration)(unsafe.Pointer(in.CPUInitializationPeriod)) + return nil +} + +// Convert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig is an autogenerated conversion function. +func Convert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig(in *garden.HorizontalPodAutoscalerConfig, out *HorizontalPodAutoscalerConfig, s conversion.Scope) error { + return autoConvert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(in *KubeAPIServerConfig, out *garden.KubeAPIServerConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.AdmissionPlugins = *(*[]garden.AdmissionPlugin)(unsafe.Pointer(&in.AdmissionPlugins)) + out.APIAudiences = *(*[]string)(unsafe.Pointer(&in.APIAudiences)) + out.AuditConfig = (*garden.AuditConfig)(unsafe.Pointer(in.AuditConfig)) + out.EnableBasicAuthentication = (*bool)(unsafe.Pointer(in.EnableBasicAuthentication)) + if in.OIDCConfig != nil { + in, out := &in.OIDCConfig, &out.OIDCConfig + *out = new(garden.OIDCConfig) + if err := Convert_v1beta1_OIDCConfig_To_garden_OIDCConfig(*in, *out, s); err != nil { + return err + } + } else { + out.OIDCConfig = nil + } + out.RuntimeConfig = *(*map[string]bool)(unsafe.Pointer(&in.RuntimeConfig)) + out.ServiceAccountConfig = (*garden.ServiceAccountConfig)(unsafe.Pointer(in.ServiceAccountConfig)) + return nil +} + +// Convert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(in *KubeAPIServerConfig, out *garden.KubeAPIServerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(in, out, s) +} + +func autoConvert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig(in *garden.KubeAPIServerConfig, out *KubeAPIServerConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.AdmissionPlugins = *(*[]AdmissionPlugin)(unsafe.Pointer(&in.AdmissionPlugins)) + out.APIAudiences = *(*[]string)(unsafe.Pointer(&in.APIAudiences)) + out.AuditConfig = (*AuditConfig)(unsafe.Pointer(in.AuditConfig)) + out.EnableBasicAuthentication = (*bool)(unsafe.Pointer(in.EnableBasicAuthentication)) + if in.OIDCConfig != nil { + in, out := &in.OIDCConfig, &out.OIDCConfig + *out = new(OIDCConfig) + if err := Convert_garden_OIDCConfig_To_v1beta1_OIDCConfig(*in, *out, s); err != nil { + return err + } + } else { + out.OIDCConfig = nil + } + out.RuntimeConfig = *(*map[string]bool)(unsafe.Pointer(&in.RuntimeConfig)) + out.ServiceAccountConfig = (*ServiceAccountConfig)(unsafe.Pointer(in.ServiceAccountConfig)) + return nil +} + +// Convert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig is an autogenerated conversion function. +func Convert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig(in *garden.KubeAPIServerConfig, out *KubeAPIServerConfig, s conversion.Scope) error { + return autoConvert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(in *KubeControllerManagerConfig, out *garden.KubeControllerManagerConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + if in.HorizontalPodAutoscalerConfig != nil { + in, out := &in.HorizontalPodAutoscalerConfig, &out.HorizontalPodAutoscalerConfig + *out = new(garden.HorizontalPodAutoscalerConfig) + if err := Convert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.HorizontalPodAutoscalerConfig = nil + } + if in.NodeCIDRMaskSize != nil { + in, out := &in.NodeCIDRMaskSize, &out.NodeCIDRMaskSize + *out = new(int) + **out = int(**in) + } else { + out.NodeCIDRMaskSize = nil + } + return nil +} + +// Convert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(in *KubeControllerManagerConfig, out *garden.KubeControllerManagerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(in, out, s) +} + +func autoConvert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig(in *garden.KubeControllerManagerConfig, out *KubeControllerManagerConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + if in.HorizontalPodAutoscalerConfig != nil { + in, out := &in.HorizontalPodAutoscalerConfig, &out.HorizontalPodAutoscalerConfig + *out = new(HorizontalPodAutoscalerConfig) + if err := Convert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.HorizontalPodAutoscalerConfig = nil + } + if in.NodeCIDRMaskSize != nil { + in, out := &in.NodeCIDRMaskSize, &out.NodeCIDRMaskSize + *out = new(int32) + **out = int32(**in) + } else { + out.NodeCIDRMaskSize = nil + } + return nil +} + +// Convert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig is an autogenerated conversion function. +func Convert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig(in *garden.KubeControllerManagerConfig, out *KubeControllerManagerConfig, s conversion.Scope) error { + return autoConvert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeProxyConfig_To_garden_KubeProxyConfig(in *KubeProxyConfig, out *garden.KubeProxyConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.Mode = (*garden.ProxyMode)(unsafe.Pointer(in.Mode)) + return nil +} + +// Convert_v1beta1_KubeProxyConfig_To_garden_KubeProxyConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeProxyConfig_To_garden_KubeProxyConfig(in *KubeProxyConfig, out *garden.KubeProxyConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeProxyConfig_To_garden_KubeProxyConfig(in, out, s) +} + +func autoConvert_garden_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *garden.KubeProxyConfig, out *KubeProxyConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.Mode = (*ProxyMode)(unsafe.Pointer(in.Mode)) + return nil +} + +// Convert_garden_KubeProxyConfig_To_v1beta1_KubeProxyConfig is an autogenerated conversion function. +func Convert_garden_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *garden.KubeProxyConfig, out *KubeProxyConfig, s conversion.Scope) error { + return autoConvert_garden_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(in *KubeSchedulerConfig, out *garden.KubeSchedulerConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(in *KubeSchedulerConfig, out *garden.KubeSchedulerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(in, out, s) +} + +func autoConvert_garden_KubeSchedulerConfig_To_v1beta1_KubeSchedulerConfig(in *garden.KubeSchedulerConfig, out *KubeSchedulerConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + return nil +} + +// Convert_garden_KubeSchedulerConfig_To_v1beta1_KubeSchedulerConfig is an autogenerated conversion function. +func Convert_garden_KubeSchedulerConfig_To_v1beta1_KubeSchedulerConfig(in *garden.KubeSchedulerConfig, out *KubeSchedulerConfig, s conversion.Scope) error { + return autoConvert_garden_KubeSchedulerConfig_To_v1beta1_KubeSchedulerConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeletConfig_To_garden_KubeletConfig(in *KubeletConfig, out *garden.KubeletConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.CPUCFSQuota = (*bool)(unsafe.Pointer(in.CPUCFSQuota)) + out.CPUManagerPolicy = (*string)(unsafe.Pointer(in.CPUManagerPolicy)) + out.EvictionHard = (*garden.KubeletConfigEviction)(unsafe.Pointer(in.EvictionHard)) + out.EvictionMaxPodGracePeriod = (*int32)(unsafe.Pointer(in.EvictionMaxPodGracePeriod)) + out.EvictionMinimumReclaim = (*garden.KubeletConfigEvictionMinimumReclaim)(unsafe.Pointer(in.EvictionMinimumReclaim)) + out.EvictionPressureTransitionPeriod = (*metav1.Duration)(unsafe.Pointer(in.EvictionPressureTransitionPeriod)) + out.EvictionSoft = (*garden.KubeletConfigEviction)(unsafe.Pointer(in.EvictionSoft)) + out.EvictionSoftGracePeriod = (*garden.KubeletConfigEvictionSoftGracePeriod)(unsafe.Pointer(in.EvictionSoftGracePeriod)) + out.MaxPods = (*int32)(unsafe.Pointer(in.MaxPods)) + out.PodPIDsLimit = (*int64)(unsafe.Pointer(in.PodPIDsLimit)) + return nil +} + +// Convert_v1beta1_KubeletConfig_To_garden_KubeletConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeletConfig_To_garden_KubeletConfig(in *KubeletConfig, out *garden.KubeletConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeletConfig_To_garden_KubeletConfig(in, out, s) +} + +func autoConvert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in *garden.KubeletConfig, out *KubeletConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.PodPIDsLimit = (*int64)(unsafe.Pointer(in.PodPIDsLimit)) + out.CPUCFSQuota = (*bool)(unsafe.Pointer(in.CPUCFSQuota)) + out.CPUManagerPolicy = (*string)(unsafe.Pointer(in.CPUManagerPolicy)) + out.MaxPods = (*int32)(unsafe.Pointer(in.MaxPods)) + out.EvictionHard = (*KubeletConfigEviction)(unsafe.Pointer(in.EvictionHard)) + out.EvictionSoft = (*KubeletConfigEviction)(unsafe.Pointer(in.EvictionSoft)) + out.EvictionSoftGracePeriod = (*KubeletConfigEvictionSoftGracePeriod)(unsafe.Pointer(in.EvictionSoftGracePeriod)) + out.EvictionMinimumReclaim = (*KubeletConfigEvictionMinimumReclaim)(unsafe.Pointer(in.EvictionMinimumReclaim)) + out.EvictionPressureTransitionPeriod = (*metav1.Duration)(unsafe.Pointer(in.EvictionPressureTransitionPeriod)) + out.EvictionMaxPodGracePeriod = (*int32)(unsafe.Pointer(in.EvictionMaxPodGracePeriod)) + return nil +} + +// Convert_garden_KubeletConfig_To_v1beta1_KubeletConfig is an autogenerated conversion function. +func Convert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in *garden.KubeletConfig, out *KubeletConfig, s conversion.Scope) error { + return autoConvert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeletConfigEviction_To_garden_KubeletConfigEviction(in *KubeletConfigEviction, out *garden.KubeletConfigEviction, s conversion.Scope) error { + out.MemoryAvailable = (*string)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*string)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*string)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*string)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*string)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_v1beta1_KubeletConfigEviction_To_garden_KubeletConfigEviction is an autogenerated conversion function. +func Convert_v1beta1_KubeletConfigEviction_To_garden_KubeletConfigEviction(in *KubeletConfigEviction, out *garden.KubeletConfigEviction, s conversion.Scope) error { + return autoConvert_v1beta1_KubeletConfigEviction_To_garden_KubeletConfigEviction(in, out, s) +} + +func autoConvert_garden_KubeletConfigEviction_To_v1beta1_KubeletConfigEviction(in *garden.KubeletConfigEviction, out *KubeletConfigEviction, s conversion.Scope) error { + out.MemoryAvailable = (*string)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*string)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*string)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*string)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*string)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_garden_KubeletConfigEviction_To_v1beta1_KubeletConfigEviction is an autogenerated conversion function. +func Convert_garden_KubeletConfigEviction_To_v1beta1_KubeletConfigEviction(in *garden.KubeletConfigEviction, out *KubeletConfigEviction, s conversion.Scope) error { + return autoConvert_garden_KubeletConfigEviction_To_v1beta1_KubeletConfigEviction(in, out, s) +} + +func autoConvert_v1beta1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(in *KubeletConfigEvictionMinimumReclaim, out *garden.KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + out.MemoryAvailable = (*resource.Quantity)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_v1beta1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim is an autogenerated conversion function. +func Convert_v1beta1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(in *KubeletConfigEvictionMinimumReclaim, out *garden.KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + return autoConvert_v1beta1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(in, out, s) +} + +func autoConvert_garden_KubeletConfigEvictionMinimumReclaim_To_v1beta1_KubeletConfigEvictionMinimumReclaim(in *garden.KubeletConfigEvictionMinimumReclaim, out *KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + out.MemoryAvailable = (*resource.Quantity)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_garden_KubeletConfigEvictionMinimumReclaim_To_v1beta1_KubeletConfigEvictionMinimumReclaim is an autogenerated conversion function. +func Convert_garden_KubeletConfigEvictionMinimumReclaim_To_v1beta1_KubeletConfigEvictionMinimumReclaim(in *garden.KubeletConfigEvictionMinimumReclaim, out *KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + return autoConvert_garden_KubeletConfigEvictionMinimumReclaim_To_v1beta1_KubeletConfigEvictionMinimumReclaim(in, out, s) +} + +func autoConvert_v1beta1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(in *KubeletConfigEvictionSoftGracePeriod, out *garden.KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + out.MemoryAvailable = (*metav1.Duration)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_v1beta1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod is an autogenerated conversion function. +func Convert_v1beta1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(in *KubeletConfigEvictionSoftGracePeriod, out *garden.KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + return autoConvert_v1beta1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(in, out, s) +} + +func autoConvert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1beta1_KubeletConfigEvictionSoftGracePeriod(in *garden.KubeletConfigEvictionSoftGracePeriod, out *KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + out.MemoryAvailable = (*metav1.Duration)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1beta1_KubeletConfigEvictionSoftGracePeriod is an autogenerated conversion function. +func Convert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1beta1_KubeletConfigEvictionSoftGracePeriod(in *garden.KubeletConfigEvictionSoftGracePeriod, out *KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + return autoConvert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1beta1_KubeletConfigEvictionSoftGracePeriod(in, out, s) +} + +func autoConvert_v1beta1_Kubernetes_To_garden_Kubernetes(in *Kubernetes, out *garden.Kubernetes, s conversion.Scope) error { + out.AllowPrivilegedContainers = (*bool)(unsafe.Pointer(in.AllowPrivilegedContainers)) + if in.ClusterAutoscaler != nil { + in, out := &in.ClusterAutoscaler, &out.ClusterAutoscaler + *out = new(garden.ClusterAutoscaler) + if err := Convert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler(*in, *out, s); err != nil { + return err + } + } else { + out.ClusterAutoscaler = nil + } + if in.KubeAPIServer != nil { + in, out := &in.KubeAPIServer, &out.KubeAPIServer + *out = new(garden.KubeAPIServerConfig) + if err := Convert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.KubeAPIServer = nil + } + if in.KubeControllerManager != nil { + in, out := &in.KubeControllerManager, &out.KubeControllerManager + *out = new(garden.KubeControllerManagerConfig) + if err := Convert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.KubeControllerManager = nil + } + out.KubeScheduler = (*garden.KubeSchedulerConfig)(unsafe.Pointer(in.KubeScheduler)) + out.KubeProxy = (*garden.KubeProxyConfig)(unsafe.Pointer(in.KubeProxy)) + if in.Kubelet != nil { + in, out := &in.Kubelet, &out.Kubelet + *out = new(garden.KubeletConfig) + if err := Convert_v1beta1_KubeletConfig_To_garden_KubeletConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Kubelet = nil + } + out.Version = in.Version + return nil +} + +func autoConvert_garden_Kubernetes_To_v1beta1_Kubernetes(in *garden.Kubernetes, out *Kubernetes, s conversion.Scope) error { + out.AllowPrivilegedContainers = (*bool)(unsafe.Pointer(in.AllowPrivilegedContainers)) + if in.KubeAPIServer != nil { + in, out := &in.KubeAPIServer, &out.KubeAPIServer + *out = new(KubeAPIServerConfig) + if err := Convert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.KubeAPIServer = nil + } + // WARNING: in.CloudControllerManager requires manual conversion: does not exist in peer-type + if in.KubeControllerManager != nil { + in, out := &in.KubeControllerManager, &out.KubeControllerManager + *out = new(KubeControllerManagerConfig) + if err := Convert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig(*in, *out, s); err != nil { + return err + } + } else { + out.KubeControllerManager = nil + } + out.KubeScheduler = (*KubeSchedulerConfig)(unsafe.Pointer(in.KubeScheduler)) + out.KubeProxy = (*KubeProxyConfig)(unsafe.Pointer(in.KubeProxy)) + if in.Kubelet != nil { + in, out := &in.Kubelet, &out.Kubelet + *out = new(KubeletConfig) + if err := Convert_garden_KubeletConfig_To_v1beta1_KubeletConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Kubelet = nil + } + out.Version = in.Version + if in.ClusterAutoscaler != nil { + in, out := &in.ClusterAutoscaler, &out.ClusterAutoscaler + *out = new(ClusterAutoscaler) + if err := Convert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler(*in, *out, s); err != nil { + return err + } + } else { + out.ClusterAutoscaler = nil + } + return nil +} + +func autoConvert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(in *KubernetesConfig, out *garden.KubernetesConfig, s conversion.Scope) error { + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + return nil +} + +// Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig is an autogenerated conversion function. +func Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(in *KubernetesConfig, out *garden.KubernetesConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(in, out, s) +} + +func autoConvert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(in *garden.KubernetesConfig, out *KubernetesConfig, s conversion.Scope) error { + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + return nil +} + +// Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig is an autogenerated conversion function. +func Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(in *garden.KubernetesConfig, out *KubernetesConfig, s conversion.Scope) error { + return autoConvert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(in, out, s) +} + +func autoConvert_v1beta1_KubernetesDashboard_To_garden_KubernetesDashboard(in *KubernetesDashboard, out *garden.KubernetesDashboard, s conversion.Scope) error { + if err := Convert_v1beta1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.AuthenticationMode = (*string)(unsafe.Pointer(in.AuthenticationMode)) + return nil +} + +// Convert_v1beta1_KubernetesDashboard_To_garden_KubernetesDashboard is an autogenerated conversion function. +func Convert_v1beta1_KubernetesDashboard_To_garden_KubernetesDashboard(in *KubernetesDashboard, out *garden.KubernetesDashboard, s conversion.Scope) error { + return autoConvert_v1beta1_KubernetesDashboard_To_garden_KubernetesDashboard(in, out, s) +} + +func autoConvert_garden_KubernetesDashboard_To_v1beta1_KubernetesDashboard(in *garden.KubernetesDashboard, out *KubernetesDashboard, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1beta1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.AuthenticationMode = (*string)(unsafe.Pointer(in.AuthenticationMode)) + return nil +} + +// Convert_garden_KubernetesDashboard_To_v1beta1_KubernetesDashboard is an autogenerated conversion function. +func Convert_garden_KubernetesDashboard_To_v1beta1_KubernetesDashboard(in *garden.KubernetesDashboard, out *KubernetesDashboard, s conversion.Scope) error { + return autoConvert_garden_KubernetesDashboard_To_v1beta1_KubernetesDashboard(in, out, s) +} + +func autoConvert_v1beta1_KubernetesInfo_To_core_KubernetesInfo(in *KubernetesInfo, out *core.KubernetesInfo, s conversion.Scope) error { + out.Version = in.Version + return nil +} + +// Convert_v1beta1_KubernetesInfo_To_core_KubernetesInfo is an autogenerated conversion function. +func Convert_v1beta1_KubernetesInfo_To_core_KubernetesInfo(in *KubernetesInfo, out *core.KubernetesInfo, s conversion.Scope) error { + return autoConvert_v1beta1_KubernetesInfo_To_core_KubernetesInfo(in, out, s) +} + +func autoConvert_core_KubernetesInfo_To_v1beta1_KubernetesInfo(in *core.KubernetesInfo, out *KubernetesInfo, s conversion.Scope) error { + out.Version = in.Version + return nil +} + +// Convert_core_KubernetesInfo_To_v1beta1_KubernetesInfo is an autogenerated conversion function. +func Convert_core_KubernetesInfo_To_v1beta1_KubernetesInfo(in *core.KubernetesInfo, out *KubernetesInfo, s conversion.Scope) error { + return autoConvert_core_KubernetesInfo_To_v1beta1_KubernetesInfo(in, out, s) +} + +func autoConvert_v1beta1_KubernetesSettings_To_garden_KubernetesSettings(in *KubernetesSettings, out *garden.KubernetesSettings, s conversion.Scope) error { + out.Versions = *(*[]garden.ExpirableVersion)(unsafe.Pointer(&in.Versions)) + return nil +} + +// Convert_v1beta1_KubernetesSettings_To_garden_KubernetesSettings is an autogenerated conversion function. +func Convert_v1beta1_KubernetesSettings_To_garden_KubernetesSettings(in *KubernetesSettings, out *garden.KubernetesSettings, s conversion.Scope) error { + return autoConvert_v1beta1_KubernetesSettings_To_garden_KubernetesSettings(in, out, s) +} + +func autoConvert_garden_KubernetesSettings_To_v1beta1_KubernetesSettings(in *garden.KubernetesSettings, out *KubernetesSettings, s conversion.Scope) error { + out.Versions = *(*[]ExpirableVersion)(unsafe.Pointer(&in.Versions)) + return nil +} + +// Convert_garden_KubernetesSettings_To_v1beta1_KubernetesSettings is an autogenerated conversion function. +func Convert_garden_KubernetesSettings_To_v1beta1_KubernetesSettings(in *garden.KubernetesSettings, out *KubernetesSettings, s conversion.Scope) error { + return autoConvert_garden_KubernetesSettings_To_v1beta1_KubernetesSettings(in, out, s) +} + +func autoConvert_v1beta1_LastError_To_core_LastError(in *LastError, out *core.LastError, s conversion.Scope) error { + out.Description = in.Description + out.TaskID = (*string)(unsafe.Pointer(in.TaskID)) + out.Codes = *(*[]core.ErrorCode)(unsafe.Pointer(&in.Codes)) + out.LastUpdateTime = (*metav1.Time)(unsafe.Pointer(in.LastUpdateTime)) + return nil +} + +// Convert_v1beta1_LastError_To_core_LastError is an autogenerated conversion function. +func Convert_v1beta1_LastError_To_core_LastError(in *LastError, out *core.LastError, s conversion.Scope) error { + return autoConvert_v1beta1_LastError_To_core_LastError(in, out, s) +} + +func autoConvert_core_LastError_To_v1beta1_LastError(in *core.LastError, out *LastError, s conversion.Scope) error { + out.Description = in.Description + out.TaskID = (*string)(unsafe.Pointer(in.TaskID)) + out.Codes = *(*[]ErrorCode)(unsafe.Pointer(&in.Codes)) + out.LastUpdateTime = (*metav1.Time)(unsafe.Pointer(in.LastUpdateTime)) + return nil +} + +// Convert_core_LastError_To_v1beta1_LastError is an autogenerated conversion function. +func Convert_core_LastError_To_v1beta1_LastError(in *core.LastError, out *LastError, s conversion.Scope) error { + return autoConvert_core_LastError_To_v1beta1_LastError(in, out, s) +} + +func autoConvert_v1beta1_LastOperation_To_core_LastOperation(in *LastOperation, out *core.LastOperation, s conversion.Scope) error { + out.Description = in.Description + out.LastUpdateTime = in.LastUpdateTime + out.Progress = in.Progress + out.State = core.LastOperationState(in.State) + out.Type = core.LastOperationType(in.Type) + return nil +} + +// Convert_v1beta1_LastOperation_To_core_LastOperation is an autogenerated conversion function. +func Convert_v1beta1_LastOperation_To_core_LastOperation(in *LastOperation, out *core.LastOperation, s conversion.Scope) error { + return autoConvert_v1beta1_LastOperation_To_core_LastOperation(in, out, s) +} + +func autoConvert_core_LastOperation_To_v1beta1_LastOperation(in *core.LastOperation, out *LastOperation, s conversion.Scope) error { + out.Description = in.Description + out.LastUpdateTime = in.LastUpdateTime + out.Progress = in.Progress + out.State = LastOperationState(in.State) + out.Type = LastOperationType(in.Type) + return nil +} + +// Convert_core_LastOperation_To_v1beta1_LastOperation is an autogenerated conversion function. +func Convert_core_LastOperation_To_v1beta1_LastOperation(in *core.LastOperation, out *LastOperation, s conversion.Scope) error { + return autoConvert_core_LastOperation_To_v1beta1_LastOperation(in, out, s) +} + +func autoConvert_v1beta1_Machine_To_garden_Machine(in *Machine, out *garden.Machine, s conversion.Scope) error { + out.Type = in.Type + out.Image = (*garden.ShootMachineImage)(unsafe.Pointer(in.Image)) + return nil +} + +// Convert_v1beta1_Machine_To_garden_Machine is an autogenerated conversion function. +func Convert_v1beta1_Machine_To_garden_Machine(in *Machine, out *garden.Machine, s conversion.Scope) error { + return autoConvert_v1beta1_Machine_To_garden_Machine(in, out, s) +} + +func autoConvert_garden_Machine_To_v1beta1_Machine(in *garden.Machine, out *Machine, s conversion.Scope) error { + out.Type = in.Type + out.Image = (*ShootMachineImage)(unsafe.Pointer(in.Image)) + return nil +} + +// Convert_garden_Machine_To_v1beta1_Machine is an autogenerated conversion function. +func Convert_garden_Machine_To_v1beta1_Machine(in *garden.Machine, out *Machine, s conversion.Scope) error { + return autoConvert_garden_Machine_To_v1beta1_Machine(in, out, s) +} + +func autoConvert_v1beta1_MachineImage_To_garden_MachineImage(in *MachineImage, out *garden.MachineImage, s conversion.Scope) error { + out.Name = in.Name + out.Versions = *(*[]garden.MachineImageVersion)(unsafe.Pointer(&in.Versions)) + return nil +} + +// Convert_v1beta1_MachineImage_To_garden_MachineImage is an autogenerated conversion function. +func Convert_v1beta1_MachineImage_To_garden_MachineImage(in *MachineImage, out *garden.MachineImage, s conversion.Scope) error { + return autoConvert_v1beta1_MachineImage_To_garden_MachineImage(in, out, s) +} + +func autoConvert_garden_MachineImage_To_v1beta1_MachineImage(in *garden.MachineImage, out *MachineImage, s conversion.Scope) error { + out.Name = in.Name + out.Versions = *(*[]ExpirableVersion)(unsafe.Pointer(&in.Versions)) + return nil +} + +// Convert_garden_MachineImage_To_v1beta1_MachineImage is an autogenerated conversion function. +func Convert_garden_MachineImage_To_v1beta1_MachineImage(in *garden.MachineImage, out *MachineImage, s conversion.Scope) error { + return autoConvert_garden_MachineImage_To_v1beta1_MachineImage(in, out, s) +} + +func autoConvert_v1beta1_MachineType_To_garden_MachineType(in *MachineType, out *garden.MachineType, s conversion.Scope) error { + out.CPU = in.CPU + out.GPU = in.GPU + out.Memory = in.Memory + out.Name = in.Name + out.Storage = (*garden.MachineTypeStorage)(unsafe.Pointer(in.Storage)) + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + return nil +} + +// Convert_v1beta1_MachineType_To_garden_MachineType is an autogenerated conversion function. +func Convert_v1beta1_MachineType_To_garden_MachineType(in *MachineType, out *garden.MachineType, s conversion.Scope) error { + return autoConvert_v1beta1_MachineType_To_garden_MachineType(in, out, s) +} + +func autoConvert_garden_MachineType_To_v1beta1_MachineType(in *garden.MachineType, out *MachineType, s conversion.Scope) error { + out.Name = in.Name + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + out.CPU = in.CPU + out.GPU = in.GPU + out.Storage = (*MachineTypeStorage)(unsafe.Pointer(in.Storage)) + out.Memory = in.Memory + return nil +} + +// Convert_garden_MachineType_To_v1beta1_MachineType is an autogenerated conversion function. +func Convert_garden_MachineType_To_v1beta1_MachineType(in *garden.MachineType, out *MachineType, s conversion.Scope) error { + return autoConvert_garden_MachineType_To_v1beta1_MachineType(in, out, s) +} + +func autoConvert_v1beta1_MachineTypeStorage_To_garden_MachineTypeStorage(in *MachineTypeStorage, out *garden.MachineTypeStorage, s conversion.Scope) error { + out.Class = in.Class + out.Size = in.Size + out.Type = in.Type + return nil +} + +// Convert_v1beta1_MachineTypeStorage_To_garden_MachineTypeStorage is an autogenerated conversion function. +func Convert_v1beta1_MachineTypeStorage_To_garden_MachineTypeStorage(in *MachineTypeStorage, out *garden.MachineTypeStorage, s conversion.Scope) error { + return autoConvert_v1beta1_MachineTypeStorage_To_garden_MachineTypeStorage(in, out, s) +} + +func autoConvert_garden_MachineTypeStorage_To_v1beta1_MachineTypeStorage(in *garden.MachineTypeStorage, out *MachineTypeStorage, s conversion.Scope) error { + out.Class = in.Class + out.Size = in.Size + out.Type = in.Type + return nil +} + +// Convert_garden_MachineTypeStorage_To_v1beta1_MachineTypeStorage is an autogenerated conversion function. +func Convert_garden_MachineTypeStorage_To_v1beta1_MachineTypeStorage(in *garden.MachineTypeStorage, out *MachineTypeStorage, s conversion.Scope) error { + return autoConvert_garden_MachineTypeStorage_To_v1beta1_MachineTypeStorage(in, out, s) +} + +func autoConvert_v1beta1_Maintenance_To_garden_Maintenance(in *Maintenance, out *garden.Maintenance, s conversion.Scope) error { + if in.AutoUpdate != nil { + in, out := &in.AutoUpdate, &out.AutoUpdate + *out = new(garden.MaintenanceAutoUpdate) + if err := Convert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(*in, *out, s); err != nil { + return err + } + } else { + out.AutoUpdate = nil + } + out.TimeWindow = (*garden.MaintenanceTimeWindow)(unsafe.Pointer(in.TimeWindow)) + return nil +} + +// Convert_v1beta1_Maintenance_To_garden_Maintenance is an autogenerated conversion function. +func Convert_v1beta1_Maintenance_To_garden_Maintenance(in *Maintenance, out *garden.Maintenance, s conversion.Scope) error { + return autoConvert_v1beta1_Maintenance_To_garden_Maintenance(in, out, s) +} + +func autoConvert_garden_Maintenance_To_v1beta1_Maintenance(in *garden.Maintenance, out *Maintenance, s conversion.Scope) error { + if in.AutoUpdate != nil { + in, out := &in.AutoUpdate, &out.AutoUpdate + *out = new(MaintenanceAutoUpdate) + if err := Convert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate(*in, *out, s); err != nil { + return err + } + } else { + out.AutoUpdate = nil + } + out.TimeWindow = (*MaintenanceTimeWindow)(unsafe.Pointer(in.TimeWindow)) + return nil +} + +// Convert_garden_Maintenance_To_v1beta1_Maintenance is an autogenerated conversion function. +func Convert_garden_Maintenance_To_v1beta1_Maintenance(in *garden.Maintenance, out *Maintenance, s conversion.Scope) error { + return autoConvert_garden_Maintenance_To_v1beta1_Maintenance(in, out, s) +} + +func autoConvert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(in *MaintenanceAutoUpdate, out *garden.MaintenanceAutoUpdate, s conversion.Scope) error { + out.KubernetesVersion = in.KubernetesVersion + if err := metav1.Convert_bool_To_Pointer_bool(&in.MachineImageVersion, &out.MachineImageVersion, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate is an autogenerated conversion function. +func Convert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(in *MaintenanceAutoUpdate, out *garden.MaintenanceAutoUpdate, s conversion.Scope) error { + return autoConvert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(in, out, s) +} + +func autoConvert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate(in *garden.MaintenanceAutoUpdate, out *MaintenanceAutoUpdate, s conversion.Scope) error { + out.KubernetesVersion = in.KubernetesVersion + if err := metav1.Convert_Pointer_bool_To_bool(&in.MachineImageVersion, &out.MachineImageVersion, s); err != nil { + return err + } + return nil +} + +// Convert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate is an autogenerated conversion function. +func Convert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate(in *garden.MaintenanceAutoUpdate, out *MaintenanceAutoUpdate, s conversion.Scope) error { + return autoConvert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate(in, out, s) +} + +func autoConvert_v1beta1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(in *MaintenanceTimeWindow, out *garden.MaintenanceTimeWindow, s conversion.Scope) error { + out.Begin = in.Begin + out.End = in.End + return nil +} + +// Convert_v1beta1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow is an autogenerated conversion function. +func Convert_v1beta1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(in *MaintenanceTimeWindow, out *garden.MaintenanceTimeWindow, s conversion.Scope) error { + return autoConvert_v1beta1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(in, out, s) +} + +func autoConvert_garden_MaintenanceTimeWindow_To_v1beta1_MaintenanceTimeWindow(in *garden.MaintenanceTimeWindow, out *MaintenanceTimeWindow, s conversion.Scope) error { + out.Begin = in.Begin + out.End = in.End + return nil +} + +// Convert_garden_MaintenanceTimeWindow_To_v1beta1_MaintenanceTimeWindow is an autogenerated conversion function. +func Convert_garden_MaintenanceTimeWindow_To_v1beta1_MaintenanceTimeWindow(in *garden.MaintenanceTimeWindow, out *MaintenanceTimeWindow, s conversion.Scope) error { + return autoConvert_garden_MaintenanceTimeWindow_To_v1beta1_MaintenanceTimeWindow(in, out, s) +} + +func autoConvert_v1beta1_Monitoring_To_garden_Monitoring(in *Monitoring, out *garden.Monitoring, s conversion.Scope) error { + out.Alerting = (*garden.Alerting)(unsafe.Pointer(in.Alerting)) + return nil +} + +// Convert_v1beta1_Monitoring_To_garden_Monitoring is an autogenerated conversion function. +func Convert_v1beta1_Monitoring_To_garden_Monitoring(in *Monitoring, out *garden.Monitoring, s conversion.Scope) error { + return autoConvert_v1beta1_Monitoring_To_garden_Monitoring(in, out, s) +} + +func autoConvert_garden_Monitoring_To_v1beta1_Monitoring(in *garden.Monitoring, out *Monitoring, s conversion.Scope) error { + out.Alerting = (*Alerting)(unsafe.Pointer(in.Alerting)) + return nil +} + +// Convert_garden_Monitoring_To_v1beta1_Monitoring is an autogenerated conversion function. +func Convert_garden_Monitoring_To_v1beta1_Monitoring(in *garden.Monitoring, out *Monitoring, s conversion.Scope) error { + return autoConvert_garden_Monitoring_To_v1beta1_Monitoring(in, out, s) +} + +func autoConvert_v1beta1_Networking_To_garden_Networking(in *Networking, out *garden.Networking, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Nodes = in.Nodes + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_v1beta1_Networking_To_garden_Networking is an autogenerated conversion function. +func Convert_v1beta1_Networking_To_garden_Networking(in *Networking, out *garden.Networking, s conversion.Scope) error { + return autoConvert_v1beta1_Networking_To_garden_Networking(in, out, s) +} + +func autoConvert_garden_Networking_To_v1beta1_Networking(in *garden.Networking, out *Networking, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Nodes = in.Nodes + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_garden_Networking_To_v1beta1_Networking is an autogenerated conversion function. +func Convert_garden_Networking_To_v1beta1_Networking(in *garden.Networking, out *Networking, s conversion.Scope) error { + return autoConvert_garden_Networking_To_v1beta1_Networking(in, out, s) +} + +func autoConvert_v1beta1_NginxIngress_To_garden_NginxIngress(in *NginxIngress, out *garden.NginxIngress, s conversion.Scope) error { + if err := Convert_v1beta1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges)) + out.Config = *(*map[string]string)(unsafe.Pointer(&in.Config)) + out.ExternalTrafficPolicy = (*v1.ServiceExternalTrafficPolicyType)(unsafe.Pointer(in.ExternalTrafficPolicy)) + return nil +} + +// Convert_v1beta1_NginxIngress_To_garden_NginxIngress is an autogenerated conversion function. +func Convert_v1beta1_NginxIngress_To_garden_NginxIngress(in *NginxIngress, out *garden.NginxIngress, s conversion.Scope) error { + return autoConvert_v1beta1_NginxIngress_To_garden_NginxIngress(in, out, s) +} + +func autoConvert_garden_NginxIngress_To_v1beta1_NginxIngress(in *garden.NginxIngress, out *NginxIngress, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1beta1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges)) + out.Config = *(*map[string]string)(unsafe.Pointer(&in.Config)) + out.ExternalTrafficPolicy = (*v1.ServiceExternalTrafficPolicyType)(unsafe.Pointer(in.ExternalTrafficPolicy)) + return nil +} + +// Convert_garden_NginxIngress_To_v1beta1_NginxIngress is an autogenerated conversion function. +func Convert_garden_NginxIngress_To_v1beta1_NginxIngress(in *garden.NginxIngress, out *NginxIngress, s conversion.Scope) error { + return autoConvert_garden_NginxIngress_To_v1beta1_NginxIngress(in, out, s) +} + +func autoConvert_v1beta1_OIDCConfig_To_garden_OIDCConfig(in *OIDCConfig, out *garden.OIDCConfig, s conversion.Scope) error { + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + if in.ClientAuthentication != nil { + in, out := &in.ClientAuthentication, &out.ClientAuthentication + *out = new(garden.OpenIDConnectClientAuthentication) + if err := Convert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(*in, *out, s); err != nil { + return err + } + } else { + out.ClientAuthentication = nil + } + out.ClientID = (*string)(unsafe.Pointer(in.ClientID)) + out.GroupsClaim = (*string)(unsafe.Pointer(in.GroupsClaim)) + out.GroupsPrefix = (*string)(unsafe.Pointer(in.GroupsPrefix)) + out.IssuerURL = (*string)(unsafe.Pointer(in.IssuerURL)) + out.RequiredClaims = *(*map[string]string)(unsafe.Pointer(&in.RequiredClaims)) + out.SigningAlgs = *(*[]string)(unsafe.Pointer(&in.SigningAlgs)) + out.UsernameClaim = (*string)(unsafe.Pointer(in.UsernameClaim)) + out.UsernamePrefix = (*string)(unsafe.Pointer(in.UsernamePrefix)) + return nil +} + +// Convert_v1beta1_OIDCConfig_To_garden_OIDCConfig is an autogenerated conversion function. +func Convert_v1beta1_OIDCConfig_To_garden_OIDCConfig(in *OIDCConfig, out *garden.OIDCConfig, s conversion.Scope) error { + return autoConvert_v1beta1_OIDCConfig_To_garden_OIDCConfig(in, out, s) +} + +func autoConvert_garden_OIDCConfig_To_v1beta1_OIDCConfig(in *garden.OIDCConfig, out *OIDCConfig, s conversion.Scope) error { + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + out.ClientID = (*string)(unsafe.Pointer(in.ClientID)) + out.GroupsClaim = (*string)(unsafe.Pointer(in.GroupsClaim)) + out.GroupsPrefix = (*string)(unsafe.Pointer(in.GroupsPrefix)) + out.IssuerURL = (*string)(unsafe.Pointer(in.IssuerURL)) + out.RequiredClaims = *(*map[string]string)(unsafe.Pointer(&in.RequiredClaims)) + out.SigningAlgs = *(*[]string)(unsafe.Pointer(&in.SigningAlgs)) + out.UsernameClaim = (*string)(unsafe.Pointer(in.UsernameClaim)) + out.UsernamePrefix = (*string)(unsafe.Pointer(in.UsernamePrefix)) + if in.ClientAuthentication != nil { + in, out := &in.ClientAuthentication, &out.ClientAuthentication + *out = new(OpenIDConnectClientAuthentication) + if err := Convert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication(*in, *out, s); err != nil { + return err + } + } else { + out.ClientAuthentication = nil + } + return nil +} + +// Convert_garden_OIDCConfig_To_v1beta1_OIDCConfig is an autogenerated conversion function. +func Convert_garden_OIDCConfig_To_v1beta1_OIDCConfig(in *garden.OIDCConfig, out *OIDCConfig, s conversion.Scope) error { + return autoConvert_garden_OIDCConfig_To_v1beta1_OIDCConfig(in, out, s) +} + +func autoConvert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(in *OpenIDConnectClientAuthentication, out *garden.OpenIDConnectClientAuthentication, s conversion.Scope) error { + out.ExtraConfig = *(*map[string]string)(unsafe.Pointer(&in.ExtraConfig)) + out.Secret = (*string)(unsafe.Pointer(in.Secret)) + return nil +} + +// Convert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication is an autogenerated conversion function. +func Convert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(in *OpenIDConnectClientAuthentication, out *garden.OpenIDConnectClientAuthentication, s conversion.Scope) error { + return autoConvert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(in, out, s) +} + +func autoConvert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication(in *garden.OpenIDConnectClientAuthentication, out *OpenIDConnectClientAuthentication, s conversion.Scope) error { + out.Secret = (*string)(unsafe.Pointer(in.Secret)) + out.ExtraConfig = *(*map[string]string)(unsafe.Pointer(&in.ExtraConfig)) + return nil +} + +// Convert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication is an autogenerated conversion function. +func Convert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication(in *garden.OpenIDConnectClientAuthentication, out *OpenIDConnectClientAuthentication, s conversion.Scope) error { + return autoConvert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication(in, out, s) +} + +func autoConvert_v1beta1_Plant_To_core_Plant(in *Plant, out *core.Plant, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_PlantSpec_To_core_PlantSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_PlantStatus_To_core_PlantStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_Plant_To_core_Plant is an autogenerated conversion function. +func Convert_v1beta1_Plant_To_core_Plant(in *Plant, out *core.Plant, s conversion.Scope) error { + return autoConvert_v1beta1_Plant_To_core_Plant(in, out, s) +} + +func autoConvert_core_Plant_To_v1beta1_Plant(in *core.Plant, out *Plant, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_PlantSpec_To_v1beta1_PlantSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_core_PlantStatus_To_v1beta1_PlantStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_core_Plant_To_v1beta1_Plant is an autogenerated conversion function. +func Convert_core_Plant_To_v1beta1_Plant(in *core.Plant, out *Plant, s conversion.Scope) error { + return autoConvert_core_Plant_To_v1beta1_Plant(in, out, s) +} + +func autoConvert_v1beta1_PlantList_To_core_PlantList(in *PlantList, out *core.PlantList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]core.Plant)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_PlantList_To_core_PlantList is an autogenerated conversion function. +func Convert_v1beta1_PlantList_To_core_PlantList(in *PlantList, out *core.PlantList, s conversion.Scope) error { + return autoConvert_v1beta1_PlantList_To_core_PlantList(in, out, s) +} + +func autoConvert_core_PlantList_To_v1beta1_PlantList(in *core.PlantList, out *PlantList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Plant)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_core_PlantList_To_v1beta1_PlantList is an autogenerated conversion function. +func Convert_core_PlantList_To_v1beta1_PlantList(in *core.PlantList, out *PlantList, s conversion.Scope) error { + return autoConvert_core_PlantList_To_v1beta1_PlantList(in, out, s) +} + +func autoConvert_v1beta1_PlantSpec_To_core_PlantSpec(in *PlantSpec, out *core.PlantSpec, s conversion.Scope) error { + out.SecretRef = in.SecretRef + out.Endpoints = *(*[]core.Endpoint)(unsafe.Pointer(&in.Endpoints)) + return nil +} + +// Convert_v1beta1_PlantSpec_To_core_PlantSpec is an autogenerated conversion function. +func Convert_v1beta1_PlantSpec_To_core_PlantSpec(in *PlantSpec, out *core.PlantSpec, s conversion.Scope) error { + return autoConvert_v1beta1_PlantSpec_To_core_PlantSpec(in, out, s) +} + +func autoConvert_core_PlantSpec_To_v1beta1_PlantSpec(in *core.PlantSpec, out *PlantSpec, s conversion.Scope) error { + out.SecretRef = in.SecretRef + out.Endpoints = *(*[]Endpoint)(unsafe.Pointer(&in.Endpoints)) + return nil +} + +// Convert_core_PlantSpec_To_v1beta1_PlantSpec is an autogenerated conversion function. +func Convert_core_PlantSpec_To_v1beta1_PlantSpec(in *core.PlantSpec, out *PlantSpec, s conversion.Scope) error { + return autoConvert_core_PlantSpec_To_v1beta1_PlantSpec(in, out, s) +} + +func autoConvert_v1beta1_PlantStatus_To_core_PlantStatus(in *PlantStatus, out *core.PlantStatus, s conversion.Scope) error { + out.Conditions = *(*[]core.Condition)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) + out.ClusterInfo = (*core.ClusterInfo)(unsafe.Pointer(in.ClusterInfo)) + return nil +} + +// Convert_v1beta1_PlantStatus_To_core_PlantStatus is an autogenerated conversion function. +func Convert_v1beta1_PlantStatus_To_core_PlantStatus(in *PlantStatus, out *core.PlantStatus, s conversion.Scope) error { + return autoConvert_v1beta1_PlantStatus_To_core_PlantStatus(in, out, s) +} + +func autoConvert_core_PlantStatus_To_v1beta1_PlantStatus(in *core.PlantStatus, out *PlantStatus, s conversion.Scope) error { + out.Conditions = *(*[]Condition)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) + out.ClusterInfo = (*ClusterInfo)(unsafe.Pointer(in.ClusterInfo)) + return nil +} + +// Convert_core_PlantStatus_To_v1beta1_PlantStatus is an autogenerated conversion function. +func Convert_core_PlantStatus_To_v1beta1_PlantStatus(in *core.PlantStatus, out *PlantStatus, s conversion.Scope) error { + return autoConvert_core_PlantStatus_To_v1beta1_PlantStatus(in, out, s) +} + +func autoConvert_v1beta1_Project_To_garden_Project(in *Project, out *garden.Project, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_ProjectSpec_To_garden_ProjectSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_ProjectStatus_To_garden_ProjectStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_Project_To_garden_Project is an autogenerated conversion function. +func Convert_v1beta1_Project_To_garden_Project(in *Project, out *garden.Project, s conversion.Scope) error { + return autoConvert_v1beta1_Project_To_garden_Project(in, out, s) +} + +func autoConvert_garden_Project_To_v1beta1_Project(in *garden.Project, out *Project, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_ProjectSpec_To_v1beta1_ProjectSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_garden_ProjectStatus_To_v1beta1_ProjectStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_garden_Project_To_v1beta1_Project is an autogenerated conversion function. +func Convert_garden_Project_To_v1beta1_Project(in *garden.Project, out *Project, s conversion.Scope) error { + return autoConvert_garden_Project_To_v1beta1_Project(in, out, s) +} + +func autoConvert_v1beta1_ProjectList_To_garden_ProjectList(in *ProjectList, out *garden.ProjectList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.Project, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Project_To_garden_Project(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_ProjectList_To_garden_ProjectList is an autogenerated conversion function. +func Convert_v1beta1_ProjectList_To_garden_ProjectList(in *ProjectList, out *garden.ProjectList, s conversion.Scope) error { + return autoConvert_v1beta1_ProjectList_To_garden_ProjectList(in, out, s) +} + +func autoConvert_garden_ProjectList_To_v1beta1_ProjectList(in *garden.ProjectList, out *ProjectList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Project, len(*in)) + for i := range *in { + if err := Convert_garden_Project_To_v1beta1_Project(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_ProjectList_To_v1beta1_ProjectList is an autogenerated conversion function. +func Convert_garden_ProjectList_To_v1beta1_ProjectList(in *garden.ProjectList, out *ProjectList, s conversion.Scope) error { + return autoConvert_garden_ProjectList_To_v1beta1_ProjectList(in, out, s) +} + +func autoConvert_v1beta1_ProjectMember_To_garden_ProjectMember(in *ProjectMember, out *garden.ProjectMember, s conversion.Scope) error { + out.Subject = in.Subject + out.Role = in.Role + return nil +} + +// Convert_v1beta1_ProjectMember_To_garden_ProjectMember is an autogenerated conversion function. +func Convert_v1beta1_ProjectMember_To_garden_ProjectMember(in *ProjectMember, out *garden.ProjectMember, s conversion.Scope) error { + return autoConvert_v1beta1_ProjectMember_To_garden_ProjectMember(in, out, s) +} + +func autoConvert_garden_ProjectMember_To_v1beta1_ProjectMember(in *garden.ProjectMember, out *ProjectMember, s conversion.Scope) error { + out.Subject = in.Subject + out.Role = in.Role + return nil +} + +// Convert_garden_ProjectMember_To_v1beta1_ProjectMember is an autogenerated conversion function. +func Convert_garden_ProjectMember_To_v1beta1_ProjectMember(in *garden.ProjectMember, out *ProjectMember, s conversion.Scope) error { + return autoConvert_garden_ProjectMember_To_v1beta1_ProjectMember(in, out, s) +} + +func autoConvert_v1beta1_ProjectSpec_To_garden_ProjectSpec(in *ProjectSpec, out *garden.ProjectSpec, s conversion.Scope) error { + out.CreatedBy = (*rbacv1.Subject)(unsafe.Pointer(in.CreatedBy)) + out.Description = (*string)(unsafe.Pointer(in.Description)) + out.Owner = (*rbacv1.Subject)(unsafe.Pointer(in.Owner)) + out.Purpose = (*string)(unsafe.Pointer(in.Purpose)) + // WARNING: in.Members requires manual conversion: does not exist in peer-type + out.Namespace = (*string)(unsafe.Pointer(in.Namespace)) + return nil +} + +func autoConvert_garden_ProjectSpec_To_v1beta1_ProjectSpec(in *garden.ProjectSpec, out *ProjectSpec, s conversion.Scope) error { + out.CreatedBy = (*rbacv1.Subject)(unsafe.Pointer(in.CreatedBy)) + out.Description = (*string)(unsafe.Pointer(in.Description)) + out.Owner = (*rbacv1.Subject)(unsafe.Pointer(in.Owner)) + out.Purpose = (*string)(unsafe.Pointer(in.Purpose)) + // WARNING: in.ProjectMembers requires manual conversion: does not exist in peer-type + out.Namespace = (*string)(unsafe.Pointer(in.Namespace)) + return nil +} + +func autoConvert_v1beta1_ProjectStatus_To_garden_ProjectStatus(in *ProjectStatus, out *garden.ProjectStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.Phase = garden.ProjectPhase(in.Phase) + return nil +} + +// Convert_v1beta1_ProjectStatus_To_garden_ProjectStatus is an autogenerated conversion function. +func Convert_v1beta1_ProjectStatus_To_garden_ProjectStatus(in *ProjectStatus, out *garden.ProjectStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ProjectStatus_To_garden_ProjectStatus(in, out, s) +} + +func autoConvert_garden_ProjectStatus_To_v1beta1_ProjectStatus(in *garden.ProjectStatus, out *ProjectStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.Phase = ProjectPhase(in.Phase) + return nil +} + +// Convert_garden_ProjectStatus_To_v1beta1_ProjectStatus is an autogenerated conversion function. +func Convert_garden_ProjectStatus_To_v1beta1_ProjectStatus(in *garden.ProjectStatus, out *ProjectStatus, s conversion.Scope) error { + return autoConvert_garden_ProjectStatus_To_v1beta1_ProjectStatus(in, out, s) +} + +func autoConvert_v1beta1_Provider_To_garden_Provider(in *Provider, out *garden.Provider, s conversion.Scope) error { + out.Type = in.Type + out.ControlPlaneConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ControlPlaneConfig)) + out.InfrastructureConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.InfrastructureConfig)) + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]garden.Worker, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Worker_To_garden_Worker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + return nil +} + +// Convert_v1beta1_Provider_To_garden_Provider is an autogenerated conversion function. +func Convert_v1beta1_Provider_To_garden_Provider(in *Provider, out *garden.Provider, s conversion.Scope) error { + return autoConvert_v1beta1_Provider_To_garden_Provider(in, out, s) +} + +func autoConvert_garden_Provider_To_v1beta1_Provider(in *garden.Provider, out *Provider, s conversion.Scope) error { + out.Type = in.Type + out.ControlPlaneConfig = (*ProviderConfig)(unsafe.Pointer(in.ControlPlaneConfig)) + out.InfrastructureConfig = (*ProviderConfig)(unsafe.Pointer(in.InfrastructureConfig)) + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]Worker, len(*in)) + for i := range *in { + if err := Convert_garden_Worker_To_v1beta1_Worker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + return nil +} + +// Convert_garden_Provider_To_v1beta1_Provider is an autogenerated conversion function. +func Convert_garden_Provider_To_v1beta1_Provider(in *garden.Provider, out *Provider, s conversion.Scope) error { + return autoConvert_garden_Provider_To_v1beta1_Provider(in, out, s) +} + +func autoConvert_v1beta1_ProviderConfig_To_core_ProviderConfig(in *ProviderConfig, out *core.ProviderConfig, s conversion.Scope) error { + out.RawExtension = in.RawExtension + return nil +} + +// Convert_v1beta1_ProviderConfig_To_core_ProviderConfig is an autogenerated conversion function. +func Convert_v1beta1_ProviderConfig_To_core_ProviderConfig(in *ProviderConfig, out *core.ProviderConfig, s conversion.Scope) error { + return autoConvert_v1beta1_ProviderConfig_To_core_ProviderConfig(in, out, s) +} + +func autoConvert_core_ProviderConfig_To_v1beta1_ProviderConfig(in *core.ProviderConfig, out *ProviderConfig, s conversion.Scope) error { + out.RawExtension = in.RawExtension + return nil +} + +// Convert_core_ProviderConfig_To_v1beta1_ProviderConfig is an autogenerated conversion function. +func Convert_core_ProviderConfig_To_v1beta1_ProviderConfig(in *core.ProviderConfig, out *ProviderConfig, s conversion.Scope) error { + return autoConvert_core_ProviderConfig_To_v1beta1_ProviderConfig(in, out, s) +} + +func autoConvert_v1beta1_Quota_To_garden_Quota(in *Quota, out *garden.Quota, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_QuotaSpec_To_garden_QuotaSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_Quota_To_garden_Quota is an autogenerated conversion function. +func Convert_v1beta1_Quota_To_garden_Quota(in *Quota, out *garden.Quota, s conversion.Scope) error { + return autoConvert_v1beta1_Quota_To_garden_Quota(in, out, s) +} + +func autoConvert_garden_Quota_To_v1beta1_Quota(in *garden.Quota, out *Quota, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_QuotaSpec_To_v1beta1_QuotaSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_garden_Quota_To_v1beta1_Quota is an autogenerated conversion function. +func Convert_garden_Quota_To_v1beta1_Quota(in *garden.Quota, out *Quota, s conversion.Scope) error { + return autoConvert_garden_Quota_To_v1beta1_Quota(in, out, s) +} + +func autoConvert_v1beta1_QuotaList_To_garden_QuotaList(in *QuotaList, out *garden.QuotaList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]garden.Quota)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_QuotaList_To_garden_QuotaList is an autogenerated conversion function. +func Convert_v1beta1_QuotaList_To_garden_QuotaList(in *QuotaList, out *garden.QuotaList, s conversion.Scope) error { + return autoConvert_v1beta1_QuotaList_To_garden_QuotaList(in, out, s) +} + +func autoConvert_garden_QuotaList_To_v1beta1_QuotaList(in *garden.QuotaList, out *QuotaList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Quota)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_garden_QuotaList_To_v1beta1_QuotaList is an autogenerated conversion function. +func Convert_garden_QuotaList_To_v1beta1_QuotaList(in *garden.QuotaList, out *QuotaList, s conversion.Scope) error { + return autoConvert_garden_QuotaList_To_v1beta1_QuotaList(in, out, s) +} + +func autoConvert_v1beta1_QuotaSpec_To_garden_QuotaSpec(in *QuotaSpec, out *garden.QuotaSpec, s conversion.Scope) error { + out.ClusterLifetimeDays = (*int)(unsafe.Pointer(in.ClusterLifetimeDays)) + out.Metrics = *(*v1.ResourceList)(unsafe.Pointer(&in.Metrics)) + out.Scope = in.Scope + return nil +} + +// Convert_v1beta1_QuotaSpec_To_garden_QuotaSpec is an autogenerated conversion function. +func Convert_v1beta1_QuotaSpec_To_garden_QuotaSpec(in *QuotaSpec, out *garden.QuotaSpec, s conversion.Scope) error { + return autoConvert_v1beta1_QuotaSpec_To_garden_QuotaSpec(in, out, s) +} + +func autoConvert_garden_QuotaSpec_To_v1beta1_QuotaSpec(in *garden.QuotaSpec, out *QuotaSpec, s conversion.Scope) error { + out.ClusterLifetimeDays = (*int)(unsafe.Pointer(in.ClusterLifetimeDays)) + out.Metrics = *(*v1.ResourceList)(unsafe.Pointer(&in.Metrics)) + out.Scope = in.Scope + return nil +} + +// Convert_garden_QuotaSpec_To_v1beta1_QuotaSpec is an autogenerated conversion function. +func Convert_garden_QuotaSpec_To_v1beta1_QuotaSpec(in *garden.QuotaSpec, out *QuotaSpec, s conversion.Scope) error { + return autoConvert_garden_QuotaSpec_To_v1beta1_QuotaSpec(in, out, s) +} + +func autoConvert_v1beta1_Region_To_garden_Region(in *Region, out *garden.Region, s conversion.Scope) error { + out.Name = in.Name + out.Zones = *(*[]garden.AvailabilityZone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_Region_To_garden_Region is an autogenerated conversion function. +func Convert_v1beta1_Region_To_garden_Region(in *Region, out *garden.Region, s conversion.Scope) error { + return autoConvert_v1beta1_Region_To_garden_Region(in, out, s) +} + +func autoConvert_garden_Region_To_v1beta1_Region(in *garden.Region, out *Region, s conversion.Scope) error { + out.Name = in.Name + out.Zones = *(*[]AvailabilityZone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_Region_To_v1beta1_Region is an autogenerated conversion function. +func Convert_garden_Region_To_v1beta1_Region(in *garden.Region, out *Region, s conversion.Scope) error { + return autoConvert_garden_Region_To_v1beta1_Region(in, out, s) +} + +func autoConvert_v1beta1_SecretBinding_To_garden_SecretBinding(in *SecretBinding, out *garden.SecretBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.SecretRef = in.SecretRef + out.Quotas = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.Quotas)) + return nil +} + +// Convert_v1beta1_SecretBinding_To_garden_SecretBinding is an autogenerated conversion function. +func Convert_v1beta1_SecretBinding_To_garden_SecretBinding(in *SecretBinding, out *garden.SecretBinding, s conversion.Scope) error { + return autoConvert_v1beta1_SecretBinding_To_garden_SecretBinding(in, out, s) +} + +func autoConvert_garden_SecretBinding_To_v1beta1_SecretBinding(in *garden.SecretBinding, out *SecretBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.SecretRef = in.SecretRef + out.Quotas = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.Quotas)) + return nil +} + +// Convert_garden_SecretBinding_To_v1beta1_SecretBinding is an autogenerated conversion function. +func Convert_garden_SecretBinding_To_v1beta1_SecretBinding(in *garden.SecretBinding, out *SecretBinding, s conversion.Scope) error { + return autoConvert_garden_SecretBinding_To_v1beta1_SecretBinding(in, out, s) +} + +func autoConvert_v1beta1_SecretBindingList_To_garden_SecretBindingList(in *SecretBindingList, out *garden.SecretBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]garden.SecretBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_SecretBindingList_To_garden_SecretBindingList is an autogenerated conversion function. +func Convert_v1beta1_SecretBindingList_To_garden_SecretBindingList(in *SecretBindingList, out *garden.SecretBindingList, s conversion.Scope) error { + return autoConvert_v1beta1_SecretBindingList_To_garden_SecretBindingList(in, out, s) +} + +func autoConvert_garden_SecretBindingList_To_v1beta1_SecretBindingList(in *garden.SecretBindingList, out *SecretBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SecretBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_garden_SecretBindingList_To_v1beta1_SecretBindingList is an autogenerated conversion function. +func Convert_garden_SecretBindingList_To_v1beta1_SecretBindingList(in *garden.SecretBindingList, out *SecretBindingList, s conversion.Scope) error { + return autoConvert_garden_SecretBindingList_To_v1beta1_SecretBindingList(in, out, s) +} + +func autoConvert_v1beta1_Seed_To_garden_Seed(in *Seed, out *garden.Seed, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_SeedSpec_To_garden_SeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_SeedStatus_To_garden_SeedStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_garden_Seed_To_v1beta1_Seed(in *garden.Seed, out *Seed, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_SeedSpec_To_v1beta1_SeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_garden_SeedStatus_To_v1beta1_SeedStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_SeedBackup_To_garden_SeedBackup(in *SeedBackup, out *garden.SeedBackup, s conversion.Scope) error { + out.Provider = garden.CloudProvider(in.Provider) + out.Region = (*string)(unsafe.Pointer(in.Region)) + out.SecretRef = in.SecretRef + return nil +} + +// Convert_v1beta1_SeedBackup_To_garden_SeedBackup is an autogenerated conversion function. +func Convert_v1beta1_SeedBackup_To_garden_SeedBackup(in *SeedBackup, out *garden.SeedBackup, s conversion.Scope) error { + return autoConvert_v1beta1_SeedBackup_To_garden_SeedBackup(in, out, s) +} + +func autoConvert_garden_SeedBackup_To_v1beta1_SeedBackup(in *garden.SeedBackup, out *SeedBackup, s conversion.Scope) error { + out.Provider = string(in.Provider) + out.Region = (*string)(unsafe.Pointer(in.Region)) + out.SecretRef = in.SecretRef + return nil +} + +// Convert_garden_SeedBackup_To_v1beta1_SeedBackup is an autogenerated conversion function. +func Convert_garden_SeedBackup_To_v1beta1_SeedBackup(in *garden.SeedBackup, out *SeedBackup, s conversion.Scope) error { + return autoConvert_garden_SeedBackup_To_v1beta1_SeedBackup(in, out, s) +} + +func autoConvert_v1beta1_SeedList_To_garden_SeedList(in *SeedList, out *garden.SeedList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.Seed, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Seed_To_garden_Seed(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_SeedList_To_garden_SeedList is an autogenerated conversion function. +func Convert_v1beta1_SeedList_To_garden_SeedList(in *SeedList, out *garden.SeedList, s conversion.Scope) error { + return autoConvert_v1beta1_SeedList_To_garden_SeedList(in, out, s) +} + +func autoConvert_garden_SeedList_To_v1beta1_SeedList(in *garden.SeedList, out *SeedList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Seed, len(*in)) + for i := range *in { + if err := Convert_garden_Seed_To_v1beta1_Seed(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_SeedList_To_v1beta1_SeedList is an autogenerated conversion function. +func Convert_garden_SeedList_To_v1beta1_SeedList(in *garden.SeedList, out *SeedList, s conversion.Scope) error { + return autoConvert_garden_SeedList_To_v1beta1_SeedList(in, out, s) +} + +func autoConvert_v1beta1_SeedNetworks_To_garden_SeedNetworks(in *SeedNetworks, out *garden.SeedNetworks, s conversion.Scope) error { + out.Nodes = in.Nodes + out.Pods = in.Pods + out.Services = in.Services + out.ShootDefaults = (*garden.ShootNetworks)(unsafe.Pointer(in.ShootDefaults)) + out.BlockCIDRs = *(*[]string)(unsafe.Pointer(&in.BlockCIDRs)) + return nil +} + +// Convert_v1beta1_SeedNetworks_To_garden_SeedNetworks is an autogenerated conversion function. +func Convert_v1beta1_SeedNetworks_To_garden_SeedNetworks(in *SeedNetworks, out *garden.SeedNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_SeedNetworks_To_garden_SeedNetworks(in, out, s) +} + +func autoConvert_garden_SeedNetworks_To_v1beta1_SeedNetworks(in *garden.SeedNetworks, out *SeedNetworks, s conversion.Scope) error { + out.Nodes = in.Nodes + out.Pods = in.Pods + out.Services = in.Services + out.ShootDefaults = (*ShootNetworks)(unsafe.Pointer(in.ShootDefaults)) + out.BlockCIDRs = *(*[]string)(unsafe.Pointer(&in.BlockCIDRs)) + return nil +} + +// Convert_garden_SeedNetworks_To_v1beta1_SeedNetworks is an autogenerated conversion function. +func Convert_garden_SeedNetworks_To_v1beta1_SeedNetworks(in *garden.SeedNetworks, out *SeedNetworks, s conversion.Scope) error { + return autoConvert_garden_SeedNetworks_To_v1beta1_SeedNetworks(in, out, s) +} + +func autoConvert_v1beta1_SeedProvider_To_garden_SeedProvider(in *SeedProvider, out *garden.SeedProvider, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_v1beta1_SeedProvider_To_garden_SeedProvider is an autogenerated conversion function. +func Convert_v1beta1_SeedProvider_To_garden_SeedProvider(in *SeedProvider, out *garden.SeedProvider, s conversion.Scope) error { + return autoConvert_v1beta1_SeedProvider_To_garden_SeedProvider(in, out, s) +} + +func autoConvert_garden_SeedProvider_To_v1beta1_SeedProvider(in *garden.SeedProvider, out *SeedProvider, s conversion.Scope) error { + out.Type = in.Type + out.Region = in.Region + return nil +} + +// Convert_garden_SeedProvider_To_v1beta1_SeedProvider is an autogenerated conversion function. +func Convert_garden_SeedProvider_To_v1beta1_SeedProvider(in *garden.SeedProvider, out *SeedProvider, s conversion.Scope) error { + return autoConvert_garden_SeedProvider_To_v1beta1_SeedProvider(in, out, s) +} + +func autoConvert_v1beta1_SeedSpec_To_garden_SeedSpec(in *SeedSpec, out *garden.SeedSpec, s conversion.Scope) error { + out.Backup = (*garden.SeedBackup)(unsafe.Pointer(in.Backup)) + // WARNING: in.DNS requires manual conversion: does not exist in peer-type + if err := Convert_v1beta1_SeedNetworks_To_garden_SeedNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if err := Convert_v1beta1_SeedProvider_To_garden_SeedProvider(&in.Provider, &out.Provider, s); err != nil { + return err + } + out.SecretRef = (*v1.SecretReference)(unsafe.Pointer(in.SecretRef)) + out.Taints = *(*[]garden.SeedTaint)(unsafe.Pointer(&in.Taints)) + out.Volume = (*garden.SeedVolume)(unsafe.Pointer(in.Volume)) + return nil +} + +func autoConvert_garden_SeedSpec_To_v1beta1_SeedSpec(in *garden.SeedSpec, out *SeedSpec, s conversion.Scope) error { + // WARNING: in.Cloud requires manual conversion: does not exist in peer-type + if err := Convert_garden_SeedProvider_To_v1beta1_SeedProvider(&in.Provider, &out.Provider, s); err != nil { + return err + } + // WARNING: in.IngressDomain requires manual conversion: does not exist in peer-type + out.SecretRef = (*v1.SecretReference)(unsafe.Pointer(in.SecretRef)) + if err := Convert_garden_SeedNetworks_To_v1beta1_SeedNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + out.Taints = *(*[]SeedTaint)(unsafe.Pointer(&in.Taints)) + out.Backup = (*SeedBackup)(unsafe.Pointer(in.Backup)) + out.Volume = (*SeedVolume)(unsafe.Pointer(in.Volume)) + return nil +} + +func autoConvert_v1beta1_SeedStatus_To_garden_SeedStatus(in *SeedStatus, out *garden.SeedStatus, s conversion.Scope) error { + out.Gardener = (*garden.Gardener)(unsafe.Pointer(in.Gardener)) + out.KubernetesVersion = (*string)(unsafe.Pointer(in.KubernetesVersion)) + out.Conditions = *(*[]garden.Condition)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_v1beta1_SeedStatus_To_garden_SeedStatus is an autogenerated conversion function. +func Convert_v1beta1_SeedStatus_To_garden_SeedStatus(in *SeedStatus, out *garden.SeedStatus, s conversion.Scope) error { + return autoConvert_v1beta1_SeedStatus_To_garden_SeedStatus(in, out, s) +} + +func autoConvert_garden_SeedStatus_To_v1beta1_SeedStatus(in *garden.SeedStatus, out *SeedStatus, s conversion.Scope) error { + out.Conditions = *(*[]Condition)(unsafe.Pointer(&in.Conditions)) + out.Gardener = (*Gardener)(unsafe.Pointer(in.Gardener)) + out.KubernetesVersion = (*string)(unsafe.Pointer(in.KubernetesVersion)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_garden_SeedStatus_To_v1beta1_SeedStatus is an autogenerated conversion function. +func Convert_garden_SeedStatus_To_v1beta1_SeedStatus(in *garden.SeedStatus, out *SeedStatus, s conversion.Scope) error { + return autoConvert_garden_SeedStatus_To_v1beta1_SeedStatus(in, out, s) +} + +func autoConvert_v1beta1_SeedTaint_To_garden_SeedTaint(in *SeedTaint, out *garden.SeedTaint, s conversion.Scope) error { + out.Key = in.Key + out.Value = (*string)(unsafe.Pointer(in.Value)) + return nil +} + +// Convert_v1beta1_SeedTaint_To_garden_SeedTaint is an autogenerated conversion function. +func Convert_v1beta1_SeedTaint_To_garden_SeedTaint(in *SeedTaint, out *garden.SeedTaint, s conversion.Scope) error { + return autoConvert_v1beta1_SeedTaint_To_garden_SeedTaint(in, out, s) +} + +func autoConvert_garden_SeedTaint_To_v1beta1_SeedTaint(in *garden.SeedTaint, out *SeedTaint, s conversion.Scope) error { + out.Key = in.Key + out.Value = (*string)(unsafe.Pointer(in.Value)) + return nil +} + +// Convert_garden_SeedTaint_To_v1beta1_SeedTaint is an autogenerated conversion function. +func Convert_garden_SeedTaint_To_v1beta1_SeedTaint(in *garden.SeedTaint, out *SeedTaint, s conversion.Scope) error { + return autoConvert_garden_SeedTaint_To_v1beta1_SeedTaint(in, out, s) +} + +func autoConvert_v1beta1_SeedVolume_To_garden_SeedVolume(in *SeedVolume, out *garden.SeedVolume, s conversion.Scope) error { + out.MinimumSize = (*resource.Quantity)(unsafe.Pointer(in.MinimumSize)) + out.Providers = *(*[]garden.SeedVolumeProvider)(unsafe.Pointer(&in.Providers)) + return nil +} + +// Convert_v1beta1_SeedVolume_To_garden_SeedVolume is an autogenerated conversion function. +func Convert_v1beta1_SeedVolume_To_garden_SeedVolume(in *SeedVolume, out *garden.SeedVolume, s conversion.Scope) error { + return autoConvert_v1beta1_SeedVolume_To_garden_SeedVolume(in, out, s) +} + +func autoConvert_garden_SeedVolume_To_v1beta1_SeedVolume(in *garden.SeedVolume, out *SeedVolume, s conversion.Scope) error { + out.MinimumSize = (*resource.Quantity)(unsafe.Pointer(in.MinimumSize)) + out.Providers = *(*[]SeedVolumeProvider)(unsafe.Pointer(&in.Providers)) + return nil +} + +// Convert_garden_SeedVolume_To_v1beta1_SeedVolume is an autogenerated conversion function. +func Convert_garden_SeedVolume_To_v1beta1_SeedVolume(in *garden.SeedVolume, out *SeedVolume, s conversion.Scope) error { + return autoConvert_garden_SeedVolume_To_v1beta1_SeedVolume(in, out, s) +} + +func autoConvert_v1beta1_SeedVolumeProvider_To_garden_SeedVolumeProvider(in *SeedVolumeProvider, out *garden.SeedVolumeProvider, s conversion.Scope) error { + out.Purpose = in.Purpose + out.Name = in.Name + return nil +} + +// Convert_v1beta1_SeedVolumeProvider_To_garden_SeedVolumeProvider is an autogenerated conversion function. +func Convert_v1beta1_SeedVolumeProvider_To_garden_SeedVolumeProvider(in *SeedVolumeProvider, out *garden.SeedVolumeProvider, s conversion.Scope) error { + return autoConvert_v1beta1_SeedVolumeProvider_To_garden_SeedVolumeProvider(in, out, s) +} + +func autoConvert_garden_SeedVolumeProvider_To_v1beta1_SeedVolumeProvider(in *garden.SeedVolumeProvider, out *SeedVolumeProvider, s conversion.Scope) error { + out.Purpose = in.Purpose + out.Name = in.Name + return nil +} + +// Convert_garden_SeedVolumeProvider_To_v1beta1_SeedVolumeProvider is an autogenerated conversion function. +func Convert_garden_SeedVolumeProvider_To_v1beta1_SeedVolumeProvider(in *garden.SeedVolumeProvider, out *SeedVolumeProvider, s conversion.Scope) error { + return autoConvert_garden_SeedVolumeProvider_To_v1beta1_SeedVolumeProvider(in, out, s) +} + +func autoConvert_v1beta1_ServiceAccountConfig_To_garden_ServiceAccountConfig(in *ServiceAccountConfig, out *garden.ServiceAccountConfig, s conversion.Scope) error { + out.Issuer = (*string)(unsafe.Pointer(in.Issuer)) + out.SigningKeySecret = (*v1.LocalObjectReference)(unsafe.Pointer(in.SigningKeySecret)) + return nil +} + +// Convert_v1beta1_ServiceAccountConfig_To_garden_ServiceAccountConfig is an autogenerated conversion function. +func Convert_v1beta1_ServiceAccountConfig_To_garden_ServiceAccountConfig(in *ServiceAccountConfig, out *garden.ServiceAccountConfig, s conversion.Scope) error { + return autoConvert_v1beta1_ServiceAccountConfig_To_garden_ServiceAccountConfig(in, out, s) +} + +func autoConvert_garden_ServiceAccountConfig_To_v1beta1_ServiceAccountConfig(in *garden.ServiceAccountConfig, out *ServiceAccountConfig, s conversion.Scope) error { + out.Issuer = (*string)(unsafe.Pointer(in.Issuer)) + out.SigningKeySecret = (*v1.LocalObjectReference)(unsafe.Pointer(in.SigningKeySecret)) + return nil +} + +// Convert_garden_ServiceAccountConfig_To_v1beta1_ServiceAccountConfig is an autogenerated conversion function. +func Convert_garden_ServiceAccountConfig_To_v1beta1_ServiceAccountConfig(in *garden.ServiceAccountConfig, out *ServiceAccountConfig, s conversion.Scope) error { + return autoConvert_garden_ServiceAccountConfig_To_v1beta1_ServiceAccountConfig(in, out, s) +} + +func autoConvert_v1beta1_Shoot_To_garden_Shoot(in *Shoot, out *garden.Shoot, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_ShootSpec_To_garden_ShootSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_ShootStatus_To_garden_ShootStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_garden_Shoot_To_v1beta1_Shoot(in *garden.Shoot, out *Shoot, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_ShootSpec_To_v1beta1_ShootSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_garden_ShootStatus_To_v1beta1_ShootStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_ShootList_To_garden_ShootList(in *ShootList, out *garden.ShootList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.Shoot, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Shoot_To_garden_Shoot(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_ShootList_To_garden_ShootList is an autogenerated conversion function. +func Convert_v1beta1_ShootList_To_garden_ShootList(in *ShootList, out *garden.ShootList, s conversion.Scope) error { + return autoConvert_v1beta1_ShootList_To_garden_ShootList(in, out, s) +} + +func autoConvert_garden_ShootList_To_v1beta1_ShootList(in *garden.ShootList, out *ShootList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Shoot, len(*in)) + for i := range *in { + if err := Convert_garden_Shoot_To_v1beta1_Shoot(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_ShootList_To_v1beta1_ShootList is an autogenerated conversion function. +func Convert_garden_ShootList_To_v1beta1_ShootList(in *garden.ShootList, out *ShootList, s conversion.Scope) error { + return autoConvert_garden_ShootList_To_v1beta1_ShootList(in, out, s) +} + +func autoConvert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(in *ShootMachineImage, out *garden.ShootMachineImage, s conversion.Scope) error { + out.Name = in.Name + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Version = in.Version + return nil +} + +// Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage is an autogenerated conversion function. +func Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(in *ShootMachineImage, out *garden.ShootMachineImage, s conversion.Scope) error { + return autoConvert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(in, out, s) +} + +func autoConvert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in *garden.ShootMachineImage, out *ShootMachineImage, s conversion.Scope) error { + out.Name = in.Name + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Version = in.Version + return nil +} + +// Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage is an autogenerated conversion function. +func Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in *garden.ShootMachineImage, out *ShootMachineImage, s conversion.Scope) error { + return autoConvert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in, out, s) +} + +func autoConvert_v1beta1_ShootNetworks_To_garden_ShootNetworks(in *ShootNetworks, out *garden.ShootNetworks, s conversion.Scope) error { + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_v1beta1_ShootNetworks_To_garden_ShootNetworks is an autogenerated conversion function. +func Convert_v1beta1_ShootNetworks_To_garden_ShootNetworks(in *ShootNetworks, out *garden.ShootNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_ShootNetworks_To_garden_ShootNetworks(in, out, s) +} + +func autoConvert_garden_ShootNetworks_To_v1beta1_ShootNetworks(in *garden.ShootNetworks, out *ShootNetworks, s conversion.Scope) error { + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_garden_ShootNetworks_To_v1beta1_ShootNetworks is an autogenerated conversion function. +func Convert_garden_ShootNetworks_To_v1beta1_ShootNetworks(in *garden.ShootNetworks, out *ShootNetworks, s conversion.Scope) error { + return autoConvert_garden_ShootNetworks_To_v1beta1_ShootNetworks(in, out, s) +} + +func autoConvert_v1beta1_ShootSpec_To_garden_ShootSpec(in *ShootSpec, out *garden.ShootSpec, s conversion.Scope) error { + if in.Addons != nil { + in, out := &in.Addons, &out.Addons + *out = new(garden.Addons) + if err := Convert_v1beta1_Addons_To_garden_Addons(*in, *out, s); err != nil { + return err + } + } else { + out.Addons = nil + } + out.CloudProfileName = in.CloudProfileName + out.DNS = (*garden.DNS)(unsafe.Pointer(in.DNS)) + out.Extensions = *(*[]garden.Extension)(unsafe.Pointer(&in.Extensions)) + out.Hibernation = (*garden.Hibernation)(unsafe.Pointer(in.Hibernation)) + if err := Convert_v1beta1_Kubernetes_To_garden_Kubernetes(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if err := Convert_v1beta1_Networking_To_garden_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + if in.Maintenance != nil { + in, out := &in.Maintenance, &out.Maintenance + *out = new(garden.Maintenance) + if err := Convert_v1beta1_Maintenance_To_garden_Maintenance(*in, *out, s); err != nil { + return err + } + } else { + out.Maintenance = nil + } + out.Monitoring = (*garden.Monitoring)(unsafe.Pointer(in.Monitoring)) + if err := Convert_v1beta1_Provider_To_garden_Provider(&in.Provider, &out.Provider, s); err != nil { + return err + } + out.Region = in.Region + out.SecretBindingName = in.SecretBindingName + out.SeedName = (*string)(unsafe.Pointer(in.SeedName)) + return nil +} + +func autoConvert_garden_ShootSpec_To_v1beta1_ShootSpec(in *garden.ShootSpec, out *ShootSpec, s conversion.Scope) error { + if in.Addons != nil { + in, out := &in.Addons, &out.Addons + *out = new(Addons) + if err := Convert_garden_Addons_To_v1beta1_Addons(*in, *out, s); err != nil { + return err + } + } else { + out.Addons = nil + } + // WARNING: in.Cloud requires manual conversion: does not exist in peer-type + out.CloudProfileName = in.CloudProfileName + out.DNS = (*DNS)(unsafe.Pointer(in.DNS)) + out.Extensions = *(*[]Extension)(unsafe.Pointer(&in.Extensions)) + out.Hibernation = (*Hibernation)(unsafe.Pointer(in.Hibernation)) + if err := Convert_garden_Kubernetes_To_v1beta1_Kubernetes(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if err := Convert_garden_Networking_To_v1beta1_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + if in.Maintenance != nil { + in, out := &in.Maintenance, &out.Maintenance + *out = new(Maintenance) + if err := Convert_garden_Maintenance_To_v1beta1_Maintenance(*in, *out, s); err != nil { + return err + } + } else { + out.Maintenance = nil + } + out.Monitoring = (*Monitoring)(unsafe.Pointer(in.Monitoring)) + if err := Convert_garden_Provider_To_v1beta1_Provider(&in.Provider, &out.Provider, s); err != nil { + return err + } + out.Region = in.Region + out.SecretBindingName = in.SecretBindingName + out.SeedName = (*string)(unsafe.Pointer(in.SeedName)) + return nil +} + +func autoConvert_v1beta1_ShootStatus_To_garden_ShootStatus(in *ShootStatus, out *garden.ShootStatus, s conversion.Scope) error { + out.Conditions = *(*[]garden.Condition)(unsafe.Pointer(&in.Conditions)) + out.Constraints = *(*[]garden.Condition)(unsafe.Pointer(&in.Constraints)) + if err := Convert_v1beta1_Gardener_To_garden_Gardener(&in.Gardener, &out.Gardener, s); err != nil { + return err + } + if err := metav1.Convert_bool_To_Pointer_bool(&in.IsHibernated, &out.IsHibernated, s); err != nil { + return err + } + out.LastOperation = (*garden.LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastErrors = *(*[]garden.LastError)(unsafe.Pointer(&in.LastErrors)) + out.ObservedGeneration = in.ObservedGeneration + out.RetryCycleStartTime = (*metav1.Time)(unsafe.Pointer(in.RetryCycleStartTime)) + out.SeedName = (*string)(unsafe.Pointer(in.SeedName)) + out.TechnicalID = in.TechnicalID + out.UID = types.UID(in.UID) + return nil +} + +func autoConvert_garden_ShootStatus_To_v1beta1_ShootStatus(in *garden.ShootStatus, out *ShootStatus, s conversion.Scope) error { + out.Conditions = *(*[]Condition)(unsafe.Pointer(&in.Conditions)) + out.Constraints = *(*[]Condition)(unsafe.Pointer(&in.Constraints)) + if err := Convert_garden_Gardener_To_v1beta1_Gardener(&in.Gardener, &out.Gardener, s); err != nil { + return err + } + out.LastOperation = (*LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastErrors = *(*[]LastError)(unsafe.Pointer(&in.LastErrors)) + out.ObservedGeneration = in.ObservedGeneration + out.RetryCycleStartTime = (*metav1.Time)(unsafe.Pointer(in.RetryCycleStartTime)) + out.SeedName = (*string)(unsafe.Pointer(in.SeedName)) + if err := metav1.Convert_Pointer_bool_To_bool(&in.IsHibernated, &out.IsHibernated, s); err != nil { + return err + } + out.TechnicalID = in.TechnicalID + out.UID = types.UID(in.UID) + return nil +} + +func autoConvert_v1beta1_Volume_To_garden_Volume(in *Volume, out *garden.Volume, s conversion.Scope) error { + out.Type = (*string)(unsafe.Pointer(in.Type)) + out.Size = in.Size + return nil +} + +// Convert_v1beta1_Volume_To_garden_Volume is an autogenerated conversion function. +func Convert_v1beta1_Volume_To_garden_Volume(in *Volume, out *garden.Volume, s conversion.Scope) error { + return autoConvert_v1beta1_Volume_To_garden_Volume(in, out, s) +} + +func autoConvert_garden_Volume_To_v1beta1_Volume(in *garden.Volume, out *Volume, s conversion.Scope) error { + out.Type = (*string)(unsafe.Pointer(in.Type)) + out.Size = in.Size + return nil +} + +// Convert_garden_Volume_To_v1beta1_Volume is an autogenerated conversion function. +func Convert_garden_Volume_To_v1beta1_Volume(in *garden.Volume, out *Volume, s conversion.Scope) error { + return autoConvert_garden_Volume_To_v1beta1_Volume(in, out, s) +} + +func autoConvert_v1beta1_VolumeType_To_garden_VolumeType(in *VolumeType, out *garden.VolumeType, s conversion.Scope) error { + out.Class = in.Class + out.Name = in.Name + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + return nil +} + +// Convert_v1beta1_VolumeType_To_garden_VolumeType is an autogenerated conversion function. +func Convert_v1beta1_VolumeType_To_garden_VolumeType(in *VolumeType, out *garden.VolumeType, s conversion.Scope) error { + return autoConvert_v1beta1_VolumeType_To_garden_VolumeType(in, out, s) +} + +func autoConvert_garden_VolumeType_To_v1beta1_VolumeType(in *garden.VolumeType, out *VolumeType, s conversion.Scope) error { + out.Name = in.Name + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + out.Class = in.Class + return nil +} + +// Convert_garden_VolumeType_To_v1beta1_VolumeType is an autogenerated conversion function. +func Convert_garden_VolumeType_To_v1beta1_VolumeType(in *garden.VolumeType, out *VolumeType, s conversion.Scope) error { + return autoConvert_garden_VolumeType_To_v1beta1_VolumeType(in, out, s) +} + +func autoConvert_v1beta1_Worker_To_garden_Worker(in *Worker, out *garden.Worker, s conversion.Scope) error { + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + if in.Kubernetes != nil { + in, out := &in.Kubernetes, &out.Kubernetes + *out = new(garden.WorkerKubernetes) + if err := Convert_v1beta1_WorkerKubernetes_To_garden_WorkerKubernetes(*in, *out, s); err != nil { + return err + } + } else { + out.Kubernetes = nil + } + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Name = in.Name + if err := Convert_v1beta1_Machine_To_garden_Machine(&in.Machine, &out.Machine, s); err != nil { + return err + } + out.Maximum = int(in.Maximum) + out.Minimum = int(in.Minimum) + out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) + out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) + out.Volume = (*garden.Volume)(unsafe.Pointer(in.Volume)) + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_Worker_To_garden_Worker is an autogenerated conversion function. +func Convert_v1beta1_Worker_To_garden_Worker(in *Worker, out *garden.Worker, s conversion.Scope) error { + return autoConvert_v1beta1_Worker_To_garden_Worker(in, out, s) +} + +func autoConvert_garden_Worker_To_v1beta1_Worker(in *garden.Worker, out *Worker, s conversion.Scope) error { + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + if in.Kubernetes != nil { + in, out := &in.Kubernetes, &out.Kubernetes + *out = new(WorkerKubernetes) + if err := Convert_garden_WorkerKubernetes_To_v1beta1_WorkerKubernetes(*in, *out, s); err != nil { + return err + } + } else { + out.Kubernetes = nil + } + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Name = in.Name + if err := Convert_garden_Machine_To_v1beta1_Machine(&in.Machine, &out.Machine, s); err != nil { + return err + } + out.Maximum = int32(in.Maximum) + out.Minimum = int32(in.Minimum) + out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) + out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) + out.ProviderConfig = (*ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) + out.Volume = (*Volume)(unsafe.Pointer(in.Volume)) + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_Worker_To_v1beta1_Worker is an autogenerated conversion function. +func Convert_garden_Worker_To_v1beta1_Worker(in *garden.Worker, out *Worker, s conversion.Scope) error { + return autoConvert_garden_Worker_To_v1beta1_Worker(in, out, s) +} + +func autoConvert_v1beta1_WorkerKubernetes_To_garden_WorkerKubernetes(in *WorkerKubernetes, out *garden.WorkerKubernetes, s conversion.Scope) error { + if in.Kubelet != nil { + in, out := &in.Kubelet, &out.Kubelet + *out = new(garden.KubeletConfig) + if err := Convert_v1beta1_KubeletConfig_To_garden_KubeletConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Kubelet = nil + } + return nil +} + +// Convert_v1beta1_WorkerKubernetes_To_garden_WorkerKubernetes is an autogenerated conversion function. +func Convert_v1beta1_WorkerKubernetes_To_garden_WorkerKubernetes(in *WorkerKubernetes, out *garden.WorkerKubernetes, s conversion.Scope) error { + return autoConvert_v1beta1_WorkerKubernetes_To_garden_WorkerKubernetes(in, out, s) +} + +func autoConvert_garden_WorkerKubernetes_To_v1beta1_WorkerKubernetes(in *garden.WorkerKubernetes, out *WorkerKubernetes, s conversion.Scope) error { + if in.Kubelet != nil { + in, out := &in.Kubelet, &out.Kubelet + *out = new(KubeletConfig) + if err := Convert_garden_KubeletConfig_To_v1beta1_KubeletConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Kubelet = nil + } + return nil +} + +// Convert_garden_WorkerKubernetes_To_v1beta1_WorkerKubernetes is an autogenerated conversion function. +func Convert_garden_WorkerKubernetes_To_v1beta1_WorkerKubernetes(in *garden.WorkerKubernetes, out *WorkerKubernetes, s conversion.Scope) error { + return autoConvert_garden_WorkerKubernetes_To_v1beta1_WorkerKubernetes(in, out, s) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..c83420f37 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,3132 @@ +// +build !ignore_autogenerated + +/* +Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 v1beta1 + +import ( + v1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + intstr "k8s.io/apimachinery/pkg/util/intstr" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Addon) DeepCopyInto(out *Addon) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Addon. +func (in *Addon) DeepCopy() *Addon { + if in == nil { + return nil + } + out := new(Addon) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Addons) DeepCopyInto(out *Addons) { + *out = *in + if in.KubernetesDashboard != nil { + in, out := &in.KubernetesDashboard, &out.KubernetesDashboard + *out = new(KubernetesDashboard) + (*in).DeepCopyInto(*out) + } + if in.NginxIngress != nil { + in, out := &in.NginxIngress, &out.NginxIngress + *out = new(NginxIngress) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Addons. +func (in *Addons) DeepCopy() *Addons { + if in == nil { + return nil + } + out := new(Addons) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AdmissionPlugin) DeepCopyInto(out *AdmissionPlugin) { + *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = new(ProviderConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionPlugin. +func (in *AdmissionPlugin) DeepCopy() *AdmissionPlugin { + if in == nil { + return nil + } + out := new(AdmissionPlugin) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Alerting) DeepCopyInto(out *Alerting) { + *out = *in + if in.EmailReceivers != nil { + in, out := &in.EmailReceivers, &out.EmailReceivers + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alerting. +func (in *Alerting) DeepCopy() *Alerting { + if in == nil { + return nil + } + out := new(Alerting) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuditConfig) DeepCopyInto(out *AuditConfig) { + *out = *in + if in.AuditPolicy != nil { + in, out := &in.AuditPolicy, &out.AuditPolicy + *out = new(AuditPolicy) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditConfig. +func (in *AuditConfig) DeepCopy() *AuditConfig { + if in == nil { + return nil + } + out := new(AuditConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuditPolicy) DeepCopyInto(out *AuditPolicy) { + *out = *in + if in.ConfigMapRef != nil { + in, out := &in.ConfigMapRef, &out.ConfigMapRef + *out = new(v1.ObjectReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditPolicy. +func (in *AuditPolicy) DeepCopy() *AuditPolicy { + if in == nil { + return nil + } + out := new(AuditPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AvailabilityZone) DeepCopyInto(out *AvailabilityZone) { + *out = *in + if in.UnavailableMachineTypes != nil { + in, out := &in.UnavailableMachineTypes, &out.UnavailableMachineTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.UnavailableVolumeTypes != nil { + in, out := &in.UnavailableVolumeTypes, &out.UnavailableVolumeTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AvailabilityZone. +func (in *AvailabilityZone) DeepCopy() *AvailabilityZone { + if in == nil { + return nil + } + out := new(AvailabilityZone) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupBucket) DeepCopyInto(out *BackupBucket) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupBucket. +func (in *BackupBucket) DeepCopy() *BackupBucket { + if in == nil { + return nil + } + out := new(BackupBucket) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BackupBucket) 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 *BackupBucketList) DeepCopyInto(out *BackupBucketList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BackupBucket, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupBucketList. +func (in *BackupBucketList) DeepCopy() *BackupBucketList { + if in == nil { + return nil + } + out := new(BackupBucketList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BackupBucketList) 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 *BackupBucketProvider) DeepCopyInto(out *BackupBucketProvider) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupBucketProvider. +func (in *BackupBucketProvider) DeepCopy() *BackupBucketProvider { + if in == nil { + return nil + } + out := new(BackupBucketProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupBucketSpec) DeepCopyInto(out *BackupBucketSpec) { + *out = *in + out.Provider = in.Provider + out.SecretRef = in.SecretRef + if in.SeedName != nil { + in, out := &in.SeedName, &out.SeedName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupBucketSpec. +func (in *BackupBucketSpec) DeepCopy() *BackupBucketSpec { + if in == nil { + return nil + } + out := new(BackupBucketSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupBucketStatus) DeepCopyInto(out *BackupBucketStatus) { + *out = *in + if in.LastOperation != nil { + in, out := &in.LastOperation, &out.LastOperation + *out = new(LastOperation) + (*in).DeepCopyInto(*out) + } + if in.LastError != nil { + in, out := &in.LastError, &out.LastError + *out = new(LastError) + (*in).DeepCopyInto(*out) + } + if in.GeneratedSecretRef != nil { + in, out := &in.GeneratedSecretRef, &out.GeneratedSecretRef + *out = new(v1.SecretReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupBucketStatus. +func (in *BackupBucketStatus) DeepCopy() *BackupBucketStatus { + if in == nil { + return nil + } + out := new(BackupBucketStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupEntry) DeepCopyInto(out *BackupEntry) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupEntry. +func (in *BackupEntry) DeepCopy() *BackupEntry { + if in == nil { + return nil + } + out := new(BackupEntry) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BackupEntry) 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 *BackupEntryList) DeepCopyInto(out *BackupEntryList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BackupEntry, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupEntryList. +func (in *BackupEntryList) DeepCopy() *BackupEntryList { + if in == nil { + return nil + } + out := new(BackupEntryList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BackupEntryList) 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 *BackupEntrySpec) DeepCopyInto(out *BackupEntrySpec) { + *out = *in + if in.SeedName != nil { + in, out := &in.SeedName, &out.SeedName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupEntrySpec. +func (in *BackupEntrySpec) DeepCopy() *BackupEntrySpec { + if in == nil { + return nil + } + out := new(BackupEntrySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupEntryStatus) DeepCopyInto(out *BackupEntryStatus) { + *out = *in + if in.LastOperation != nil { + in, out := &in.LastOperation, &out.LastOperation + *out = new(LastOperation) + (*in).DeepCopyInto(*out) + } + if in.LastError != nil { + in, out := &in.LastError, &out.LastError + *out = new(LastError) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupEntryStatus. +func (in *BackupEntryStatus) DeepCopy() *BackupEntryStatus { + if in == nil { + return nil + } + out := new(BackupEntryStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CloudInfo) DeepCopyInto(out *CloudInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudInfo. +func (in *CloudInfo) DeepCopy() *CloudInfo { + if in == nil { + return nil + } + out := new(CloudInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CloudProfile) DeepCopyInto(out *CloudProfile) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudProfile. +func (in *CloudProfile) DeepCopy() *CloudProfile { + if in == nil { + return nil + } + out := new(CloudProfile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CloudProfile) 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 *CloudProfileList) DeepCopyInto(out *CloudProfileList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CloudProfile, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudProfileList. +func (in *CloudProfileList) DeepCopy() *CloudProfileList { + if in == nil { + return nil + } + out := new(CloudProfileList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CloudProfileList) 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 *CloudProfileSpec) DeepCopyInto(out *CloudProfileSpec) { + *out = *in + if in.CABundle != nil { + in, out := &in.CABundle, &out.CABundle + *out = new(string) + **out = **in + } + in.Kubernetes.DeepCopyInto(&out.Kubernetes) + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]MachineImage, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MachineTypes != nil { + in, out := &in.MachineTypes, &out.MachineTypes + *out = make([]MachineType, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ProviderConfig != nil { + in, out := &in.ProviderConfig, &out.ProviderConfig + *out = new(ProviderConfig) + (*in).DeepCopyInto(*out) + } + if in.Regions != nil { + in, out := &in.Regions, &out.Regions + *out = make([]Region, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SeedSelector != nil { + in, out := &in.SeedSelector, &out.SeedSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.VolumeTypes != nil { + in, out := &in.VolumeTypes, &out.VolumeTypes + *out = make([]VolumeType, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudProfileSpec. +func (in *CloudProfileSpec) DeepCopy() *CloudProfileSpec { + if in == nil { + return nil + } + out := new(CloudProfileSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterAutoscaler) DeepCopyInto(out *ClusterAutoscaler) { + *out = *in + if in.ScaleDownDelayAfterAdd != nil { + in, out := &in.ScaleDownDelayAfterAdd, &out.ScaleDownDelayAfterAdd + *out = new(metav1.Duration) + **out = **in + } + if in.ScaleDownDelayAfterDelete != nil { + in, out := &in.ScaleDownDelayAfterDelete, &out.ScaleDownDelayAfterDelete + *out = new(metav1.Duration) + **out = **in + } + if in.ScaleDownDelayAfterFailure != nil { + in, out := &in.ScaleDownDelayAfterFailure, &out.ScaleDownDelayAfterFailure + *out = new(metav1.Duration) + **out = **in + } + if in.ScaleDownUnneededTime != nil { + in, out := &in.ScaleDownUnneededTime, &out.ScaleDownUnneededTime + *out = new(metav1.Duration) + **out = **in + } + if in.ScaleDownUtilizationThreshold != nil { + in, out := &in.ScaleDownUtilizationThreshold, &out.ScaleDownUtilizationThreshold + *out = new(float64) + **out = **in + } + if in.ScanInterval != nil { + in, out := &in.ScanInterval, &out.ScanInterval + *out = new(metav1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAutoscaler. +func (in *ClusterAutoscaler) DeepCopy() *ClusterAutoscaler { + if in == nil { + return nil + } + out := new(ClusterAutoscaler) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInfo) DeepCopyInto(out *ClusterInfo) { + *out = *in + out.Cloud = in.Cloud + out.Kubernetes = in.Kubernetes + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInfo. +func (in *ClusterInfo) DeepCopy() *ClusterInfo { + if in == nil { + return nil + } + out := new(ClusterInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerDeployment) DeepCopyInto(out *ControllerDeployment) { + *out = *in + if in.ProviderConfig != nil { + in, out := &in.ProviderConfig, &out.ProviderConfig + *out = new(ProviderConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerDeployment. +func (in *ControllerDeployment) DeepCopy() *ControllerDeployment { + if in == nil { + return nil + } + out := new(ControllerDeployment) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerInstallation) DeepCopyInto(out *ControllerInstallation) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerInstallation. +func (in *ControllerInstallation) DeepCopy() *ControllerInstallation { + if in == nil { + return nil + } + out := new(ControllerInstallation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControllerInstallation) 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 *ControllerInstallationList) DeepCopyInto(out *ControllerInstallationList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ControllerInstallation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerInstallationList. +func (in *ControllerInstallationList) DeepCopy() *ControllerInstallationList { + if in == nil { + return nil + } + out := new(ControllerInstallationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControllerInstallationList) 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 *ControllerInstallationSpec) DeepCopyInto(out *ControllerInstallationSpec) { + *out = *in + out.RegistrationRef = in.RegistrationRef + out.SeedRef = in.SeedRef + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerInstallationSpec. +func (in *ControllerInstallationSpec) DeepCopy() *ControllerInstallationSpec { + if in == nil { + return nil + } + out := new(ControllerInstallationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerInstallationStatus) DeepCopyInto(out *ControllerInstallationStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ProviderStatus != nil { + in, out := &in.ProviderStatus, &out.ProviderStatus + *out = new(ProviderConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerInstallationStatus. +func (in *ControllerInstallationStatus) DeepCopy() *ControllerInstallationStatus { + if in == nil { + return nil + } + out := new(ControllerInstallationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerRegistration) DeepCopyInto(out *ControllerRegistration) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRegistration. +func (in *ControllerRegistration) DeepCopy() *ControllerRegistration { + if in == nil { + return nil + } + out := new(ControllerRegistration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControllerRegistration) 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 *ControllerRegistrationList) DeepCopyInto(out *ControllerRegistrationList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ControllerRegistration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRegistrationList. +func (in *ControllerRegistrationList) DeepCopy() *ControllerRegistrationList { + if in == nil { + return nil + } + out := new(ControllerRegistrationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControllerRegistrationList) 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 *ControllerRegistrationSpec) DeepCopyInto(out *ControllerRegistrationSpec) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ControllerResource, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Deployment != nil { + in, out := &in.Deployment, &out.Deployment + *out = new(ControllerDeployment) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRegistrationSpec. +func (in *ControllerRegistrationSpec) DeepCopy() *ControllerRegistrationSpec { + if in == nil { + return nil + } + out := new(ControllerRegistrationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerResource) DeepCopyInto(out *ControllerResource) { + *out = *in + if in.GloballyEnabled != nil { + in, out := &in.GloballyEnabled, &out.GloballyEnabled + *out = new(bool) + **out = **in + } + if in.ReconcileTimeout != nil { + in, out := &in.ReconcileTimeout, &out.ReconcileTimeout + *out = new(metav1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerResource. +func (in *ControllerResource) DeepCopy() *ControllerResource { + if in == nil { + return nil + } + out := new(ControllerResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DNS) DeepCopyInto(out *DNS) { + *out = *in + if in.Domain != nil { + in, out := &in.Domain, &out.Domain + *out = new(string) + **out = **in + } + if in.Providers != nil { + in, out := &in.Providers, &out.Providers + *out = make([]DNSProvider, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNS. +func (in *DNS) DeepCopy() *DNS { + if in == nil { + return nil + } + out := new(DNS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DNSIncludeExclude) DeepCopyInto(out *DNSIncludeExclude) { + *out = *in + if in.Include != nil { + in, out := &in.Include, &out.Include + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Exclude != nil { + in, out := &in.Exclude, &out.Exclude + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSIncludeExclude. +func (in *DNSIncludeExclude) DeepCopy() *DNSIncludeExclude { + if in == nil { + return nil + } + out := new(DNSIncludeExclude) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DNSProvider) DeepCopyInto(out *DNSProvider) { + *out = *in + if in.Domains != nil { + in, out := &in.Domains, &out.Domains + *out = new(DNSIncludeExclude) + (*in).DeepCopyInto(*out) + } + if in.SecretName != nil { + in, out := &in.SecretName, &out.SecretName + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.Zones != nil { + in, out := &in.Zones, &out.Zones + *out = new(DNSIncludeExclude) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSProvider. +func (in *DNSProvider) DeepCopy() *DNSProvider { + if in == nil { + return nil + } + out := new(DNSProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Endpoint) DeepCopyInto(out *Endpoint) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. +func (in *Endpoint) DeepCopy() *Endpoint { + if in == nil { + return nil + } + out := new(Endpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExpirableVersion) DeepCopyInto(out *ExpirableVersion) { + *out = *in + if in.ExpirationDate != nil { + in, out := &in.ExpirationDate, &out.ExpirationDate + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExpirableVersion. +func (in *ExpirableVersion) DeepCopy() *ExpirableVersion { + if in == nil { + return nil + } + out := new(ExpirableVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Extension) DeepCopyInto(out *Extension) { + *out = *in + if in.ProviderConfig != nil { + in, out := &in.ProviderConfig, &out.ProviderConfig + *out = new(ProviderConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Extension. +func (in *Extension) DeepCopy() *Extension { + if in == nil { + return nil + } + out := new(Extension) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Gardener) DeepCopyInto(out *Gardener) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gardener. +func (in *Gardener) DeepCopy() *Gardener { + if in == nil { + return nil + } + out := new(Gardener) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenerDuration) DeepCopyInto(out *GardenerDuration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GardenerDuration. +func (in *GardenerDuration) DeepCopy() *GardenerDuration { + if in == nil { + return nil + } + out := new(GardenerDuration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Hibernation) DeepCopyInto(out *Hibernation) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Schedules != nil { + in, out := &in.Schedules, &out.Schedules + *out = make([]HibernationSchedule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Hibernation. +func (in *Hibernation) DeepCopy() *Hibernation { + if in == nil { + return nil + } + out := new(Hibernation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HibernationSchedule) DeepCopyInto(out *HibernationSchedule) { + *out = *in + if in.Start != nil { + in, out := &in.Start, &out.Start + *out = new(string) + **out = **in + } + if in.End != nil { + in, out := &in.End, &out.End + *out = new(string) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HibernationSchedule. +func (in *HibernationSchedule) DeepCopy() *HibernationSchedule { + if in == nil { + return nil + } + out := new(HibernationSchedule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HorizontalPodAutoscalerConfig) DeepCopyInto(out *HorizontalPodAutoscalerConfig) { + *out = *in + if in.CPUInitializationPeriod != nil { + in, out := &in.CPUInitializationPeriod, &out.CPUInitializationPeriod + *out = new(GardenerDuration) + **out = **in + } + if in.DownscaleDelay != nil { + in, out := &in.DownscaleDelay, &out.DownscaleDelay + *out = new(GardenerDuration) + **out = **in + } + if in.DownscaleStabilization != nil { + in, out := &in.DownscaleStabilization, &out.DownscaleStabilization + *out = new(GardenerDuration) + **out = **in + } + if in.InitialReadinessDelay != nil { + in, out := &in.InitialReadinessDelay, &out.InitialReadinessDelay + *out = new(GardenerDuration) + **out = **in + } + if in.SyncPeriod != nil { + in, out := &in.SyncPeriod, &out.SyncPeriod + *out = new(GardenerDuration) + **out = **in + } + if in.Tolerance != nil { + in, out := &in.Tolerance, &out.Tolerance + *out = new(float64) + **out = **in + } + if in.UpscaleDelay != nil { + in, out := &in.UpscaleDelay, &out.UpscaleDelay + *out = new(GardenerDuration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerConfig. +func (in *HorizontalPodAutoscalerConfig) DeepCopy() *HorizontalPodAutoscalerConfig { + if in == nil { + return nil + } + out := new(HorizontalPodAutoscalerConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeAPIServerConfig) DeepCopyInto(out *KubeAPIServerConfig) { + *out = *in + in.KubernetesConfig.DeepCopyInto(&out.KubernetesConfig) + if in.AdmissionPlugins != nil { + in, out := &in.AdmissionPlugins, &out.AdmissionPlugins + *out = make([]AdmissionPlugin, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.APIAudiences != nil { + in, out := &in.APIAudiences, &out.APIAudiences + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AuditConfig != nil { + in, out := &in.AuditConfig, &out.AuditConfig + *out = new(AuditConfig) + (*in).DeepCopyInto(*out) + } + if in.EnableBasicAuthentication != nil { + in, out := &in.EnableBasicAuthentication, &out.EnableBasicAuthentication + *out = new(bool) + **out = **in + } + if in.OIDCConfig != nil { + in, out := &in.OIDCConfig, &out.OIDCConfig + *out = new(OIDCConfig) + (*in).DeepCopyInto(*out) + } + if in.RuntimeConfig != nil { + in, out := &in.RuntimeConfig, &out.RuntimeConfig + *out = make(map[string]bool, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ServiceAccountConfig != nil { + in, out := &in.ServiceAccountConfig, &out.ServiceAccountConfig + *out = new(ServiceAccountConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIServerConfig. +func (in *KubeAPIServerConfig) DeepCopy() *KubeAPIServerConfig { + if in == nil { + return nil + } + out := new(KubeAPIServerConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerConfig) { + *out = *in + in.KubernetesConfig.DeepCopyInto(&out.KubernetesConfig) + if in.HorizontalPodAutoscalerConfig != nil { + in, out := &in.HorizontalPodAutoscalerConfig, &out.HorizontalPodAutoscalerConfig + *out = new(HorizontalPodAutoscalerConfig) + (*in).DeepCopyInto(*out) + } + if in.NodeCIDRMaskSize != nil { + in, out := &in.NodeCIDRMaskSize, &out.NodeCIDRMaskSize + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllerManagerConfig. +func (in *KubeControllerManagerConfig) DeepCopy() *KubeControllerManagerConfig { + if in == nil { + return nil + } + out := new(KubeControllerManagerConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeProxyConfig) DeepCopyInto(out *KubeProxyConfig) { + *out = *in + in.KubernetesConfig.DeepCopyInto(&out.KubernetesConfig) + if in.Mode != nil { + in, out := &in.Mode, &out.Mode + *out = new(ProxyMode) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeProxyConfig. +func (in *KubeProxyConfig) DeepCopy() *KubeProxyConfig { + if in == nil { + return nil + } + out := new(KubeProxyConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeSchedulerConfig) DeepCopyInto(out *KubeSchedulerConfig) { + *out = *in + in.KubernetesConfig.DeepCopyInto(&out.KubernetesConfig) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerConfig. +func (in *KubeSchedulerConfig) DeepCopy() *KubeSchedulerConfig { + if in == nil { + return nil + } + out := new(KubeSchedulerConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfig) DeepCopyInto(out *KubeletConfig) { + *out = *in + in.KubernetesConfig.DeepCopyInto(&out.KubernetesConfig) + if in.CPUCFSQuota != nil { + in, out := &in.CPUCFSQuota, &out.CPUCFSQuota + *out = new(bool) + **out = **in + } + if in.CPUManagerPolicy != nil { + in, out := &in.CPUManagerPolicy, &out.CPUManagerPolicy + *out = new(string) + **out = **in + } + if in.EvictionHard != nil { + in, out := &in.EvictionHard, &out.EvictionHard + *out = new(KubeletConfigEviction) + (*in).DeepCopyInto(*out) + } + if in.EvictionMaxPodGracePeriod != nil { + in, out := &in.EvictionMaxPodGracePeriod, &out.EvictionMaxPodGracePeriod + *out = new(int32) + **out = **in + } + if in.EvictionMinimumReclaim != nil { + in, out := &in.EvictionMinimumReclaim, &out.EvictionMinimumReclaim + *out = new(KubeletConfigEvictionMinimumReclaim) + (*in).DeepCopyInto(*out) + } + if in.EvictionPressureTransitionPeriod != nil { + in, out := &in.EvictionPressureTransitionPeriod, &out.EvictionPressureTransitionPeriod + *out = new(metav1.Duration) + **out = **in + } + if in.EvictionSoft != nil { + in, out := &in.EvictionSoft, &out.EvictionSoft + *out = new(KubeletConfigEviction) + (*in).DeepCopyInto(*out) + } + if in.EvictionSoftGracePeriod != nil { + in, out := &in.EvictionSoftGracePeriod, &out.EvictionSoftGracePeriod + *out = new(KubeletConfigEvictionSoftGracePeriod) + (*in).DeepCopyInto(*out) + } + if in.MaxPods != nil { + in, out := &in.MaxPods, &out.MaxPods + *out = new(int32) + **out = **in + } + if in.PodPIDsLimit != nil { + in, out := &in.PodPIDsLimit, &out.PodPIDsLimit + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfig. +func (in *KubeletConfig) DeepCopy() *KubeletConfig { + if in == nil { + return nil + } + out := new(KubeletConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfigEviction) DeepCopyInto(out *KubeletConfigEviction) { + *out = *in + if in.MemoryAvailable != nil { + in, out := &in.MemoryAvailable, &out.MemoryAvailable + *out = new(string) + **out = **in + } + if in.ImageFSAvailable != nil { + in, out := &in.ImageFSAvailable, &out.ImageFSAvailable + *out = new(string) + **out = **in + } + if in.ImageFSInodesFree != nil { + in, out := &in.ImageFSInodesFree, &out.ImageFSInodesFree + *out = new(string) + **out = **in + } + if in.NodeFSAvailable != nil { + in, out := &in.NodeFSAvailable, &out.NodeFSAvailable + *out = new(string) + **out = **in + } + if in.NodeFSInodesFree != nil { + in, out := &in.NodeFSInodesFree, &out.NodeFSInodesFree + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfigEviction. +func (in *KubeletConfigEviction) DeepCopy() *KubeletConfigEviction { + if in == nil { + return nil + } + out := new(KubeletConfigEviction) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfigEvictionMinimumReclaim) DeepCopyInto(out *KubeletConfigEvictionMinimumReclaim) { + *out = *in + if in.MemoryAvailable != nil { + in, out := &in.MemoryAvailable, &out.MemoryAvailable + x := (*in).DeepCopy() + *out = &x + } + if in.ImageFSAvailable != nil { + in, out := &in.ImageFSAvailable, &out.ImageFSAvailable + x := (*in).DeepCopy() + *out = &x + } + if in.ImageFSInodesFree != nil { + in, out := &in.ImageFSInodesFree, &out.ImageFSInodesFree + x := (*in).DeepCopy() + *out = &x + } + if in.NodeFSAvailable != nil { + in, out := &in.NodeFSAvailable, &out.NodeFSAvailable + x := (*in).DeepCopy() + *out = &x + } + if in.NodeFSInodesFree != nil { + in, out := &in.NodeFSInodesFree, &out.NodeFSInodesFree + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfigEvictionMinimumReclaim. +func (in *KubeletConfigEvictionMinimumReclaim) DeepCopy() *KubeletConfigEvictionMinimumReclaim { + if in == nil { + return nil + } + out := new(KubeletConfigEvictionMinimumReclaim) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeletConfigEvictionSoftGracePeriod) DeepCopyInto(out *KubeletConfigEvictionSoftGracePeriod) { + *out = *in + if in.MemoryAvailable != nil { + in, out := &in.MemoryAvailable, &out.MemoryAvailable + *out = new(metav1.Duration) + **out = **in + } + if in.ImageFSAvailable != nil { + in, out := &in.ImageFSAvailable, &out.ImageFSAvailable + *out = new(metav1.Duration) + **out = **in + } + if in.ImageFSInodesFree != nil { + in, out := &in.ImageFSInodesFree, &out.ImageFSInodesFree + *out = new(metav1.Duration) + **out = **in + } + if in.NodeFSAvailable != nil { + in, out := &in.NodeFSAvailable, &out.NodeFSAvailable + *out = new(metav1.Duration) + **out = **in + } + if in.NodeFSInodesFree != nil { + in, out := &in.NodeFSInodesFree, &out.NodeFSInodesFree + *out = new(metav1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConfigEvictionSoftGracePeriod. +func (in *KubeletConfigEvictionSoftGracePeriod) DeepCopy() *KubeletConfigEvictionSoftGracePeriod { + if in == nil { + return nil + } + out := new(KubeletConfigEvictionSoftGracePeriod) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Kubernetes) DeepCopyInto(out *Kubernetes) { + *out = *in + if in.AllowPrivilegedContainers != nil { + in, out := &in.AllowPrivilegedContainers, &out.AllowPrivilegedContainers + *out = new(bool) + **out = **in + } + if in.ClusterAutoscaler != nil { + in, out := &in.ClusterAutoscaler, &out.ClusterAutoscaler + *out = new(ClusterAutoscaler) + (*in).DeepCopyInto(*out) + } + if in.KubeAPIServer != nil { + in, out := &in.KubeAPIServer, &out.KubeAPIServer + *out = new(KubeAPIServerConfig) + (*in).DeepCopyInto(*out) + } + if in.KubeControllerManager != nil { + in, out := &in.KubeControllerManager, &out.KubeControllerManager + *out = new(KubeControllerManagerConfig) + (*in).DeepCopyInto(*out) + } + if in.KubeScheduler != nil { + in, out := &in.KubeScheduler, &out.KubeScheduler + *out = new(KubeSchedulerConfig) + (*in).DeepCopyInto(*out) + } + if in.KubeProxy != nil { + in, out := &in.KubeProxy, &out.KubeProxy + *out = new(KubeProxyConfig) + (*in).DeepCopyInto(*out) + } + if in.Kubelet != nil { + in, out := &in.Kubelet, &out.Kubelet + *out = new(KubeletConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kubernetes. +func (in *Kubernetes) DeepCopy() *Kubernetes { + if in == nil { + return nil + } + out := new(Kubernetes) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesConfig) DeepCopyInto(out *KubernetesConfig) { + *out = *in + if in.FeatureGates != nil { + in, out := &in.FeatureGates, &out.FeatureGates + *out = make(map[string]bool, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesConfig. +func (in *KubernetesConfig) DeepCopy() *KubernetesConfig { + if in == nil { + return nil + } + out := new(KubernetesConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesDashboard) DeepCopyInto(out *KubernetesDashboard) { + *out = *in + out.Addon = in.Addon + if in.AuthenticationMode != nil { + in, out := &in.AuthenticationMode, &out.AuthenticationMode + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesDashboard. +func (in *KubernetesDashboard) DeepCopy() *KubernetesDashboard { + if in == nil { + return nil + } + out := new(KubernetesDashboard) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesInfo) DeepCopyInto(out *KubernetesInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesInfo. +func (in *KubernetesInfo) DeepCopy() *KubernetesInfo { + if in == nil { + return nil + } + out := new(KubernetesInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesSettings) DeepCopyInto(out *KubernetesSettings) { + *out = *in + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]ExpirableVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesSettings. +func (in *KubernetesSettings) DeepCopy() *KubernetesSettings { + if in == nil { + return nil + } + out := new(KubernetesSettings) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastError) DeepCopyInto(out *LastError) { + *out = *in + if in.TaskID != nil { + in, out := &in.TaskID, &out.TaskID + *out = new(string) + **out = **in + } + if in.Codes != nil { + in, out := &in.Codes, &out.Codes + *out = make([]ErrorCode, len(*in)) + copy(*out, *in) + } + if in.LastUpdateTime != nil { + in, out := &in.LastUpdateTime, &out.LastUpdateTime + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastError. +func (in *LastError) DeepCopy() *LastError { + if in == nil { + return nil + } + out := new(LastError) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastOperation) DeepCopyInto(out *LastOperation) { + *out = *in + in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastOperation. +func (in *LastOperation) DeepCopy() *LastOperation { + if in == nil { + return nil + } + out := new(LastOperation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Machine) DeepCopyInto(out *Machine) { + *out = *in + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(ShootMachineImage) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Machine. +func (in *Machine) DeepCopy() *Machine { + if in == nil { + return nil + } + out := new(Machine) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineImage) DeepCopyInto(out *MachineImage) { + *out = *in + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]ExpirableVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineImage. +func (in *MachineImage) DeepCopy() *MachineImage { + if in == nil { + return nil + } + out := new(MachineImage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineType) DeepCopyInto(out *MachineType) { + *out = *in + out.CPU = in.CPU.DeepCopy() + out.GPU = in.GPU.DeepCopy() + out.Memory = in.Memory.DeepCopy() + if in.Storage != nil { + in, out := &in.Storage, &out.Storage + *out = new(MachineTypeStorage) + (*in).DeepCopyInto(*out) + } + if in.Usable != nil { + in, out := &in.Usable, &out.Usable + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineType. +func (in *MachineType) DeepCopy() *MachineType { + if in == nil { + return nil + } + out := new(MachineType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineTypeStorage) DeepCopyInto(out *MachineTypeStorage) { + *out = *in + out.Size = in.Size.DeepCopy() + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineTypeStorage. +func (in *MachineTypeStorage) DeepCopy() *MachineTypeStorage { + if in == nil { + return nil + } + out := new(MachineTypeStorage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Maintenance) DeepCopyInto(out *Maintenance) { + *out = *in + if in.AutoUpdate != nil { + in, out := &in.AutoUpdate, &out.AutoUpdate + *out = new(MaintenanceAutoUpdate) + **out = **in + } + if in.TimeWindow != nil { + in, out := &in.TimeWindow, &out.TimeWindow + *out = new(MaintenanceTimeWindow) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Maintenance. +func (in *Maintenance) DeepCopy() *Maintenance { + if in == nil { + return nil + } + out := new(Maintenance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MaintenanceAutoUpdate) DeepCopyInto(out *MaintenanceAutoUpdate) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceAutoUpdate. +func (in *MaintenanceAutoUpdate) DeepCopy() *MaintenanceAutoUpdate { + if in == nil { + return nil + } + out := new(MaintenanceAutoUpdate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MaintenanceTimeWindow) DeepCopyInto(out *MaintenanceTimeWindow) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceTimeWindow. +func (in *MaintenanceTimeWindow) DeepCopy() *MaintenanceTimeWindow { + if in == nil { + return nil + } + out := new(MaintenanceTimeWindow) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Monitoring) DeepCopyInto(out *Monitoring) { + *out = *in + if in.Alerting != nil { + in, out := &in.Alerting, &out.Alerting + *out = new(Alerting) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Monitoring. +func (in *Monitoring) DeepCopy() *Monitoring { + if in == nil { + return nil + } + out := new(Monitoring) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Networking) DeepCopyInto(out *Networking) { + *out = *in + if in.ProviderConfig != nil { + in, out := &in.ProviderConfig, &out.ProviderConfig + *out = new(ProviderConfig) + (*in).DeepCopyInto(*out) + } + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = new(string) + **out = **in + } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Networking. +func (in *Networking) DeepCopy() *Networking { + if in == nil { + return nil + } + out := new(Networking) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NginxIngress) DeepCopyInto(out *NginxIngress) { + *out = *in + out.Addon = in.Addon + if in.LoadBalancerSourceRanges != nil { + in, out := &in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ExternalTrafficPolicy != nil { + in, out := &in.ExternalTrafficPolicy, &out.ExternalTrafficPolicy + *out = new(v1.ServiceExternalTrafficPolicyType) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxIngress. +func (in *NginxIngress) DeepCopy() *NginxIngress { + if in == nil { + return nil + } + out := new(NginxIngress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCConfig) DeepCopyInto(out *OIDCConfig) { + *out = *in + if in.CABundle != nil { + in, out := &in.CABundle, &out.CABundle + *out = new(string) + **out = **in + } + if in.ClientAuthentication != nil { + in, out := &in.ClientAuthentication, &out.ClientAuthentication + *out = new(OpenIDConnectClientAuthentication) + (*in).DeepCopyInto(*out) + } + if in.ClientID != nil { + in, out := &in.ClientID, &out.ClientID + *out = new(string) + **out = **in + } + if in.GroupsClaim != nil { + in, out := &in.GroupsClaim, &out.GroupsClaim + *out = new(string) + **out = **in + } + if in.GroupsPrefix != nil { + in, out := &in.GroupsPrefix, &out.GroupsPrefix + *out = new(string) + **out = **in + } + if in.IssuerURL != nil { + in, out := &in.IssuerURL, &out.IssuerURL + *out = new(string) + **out = **in + } + if in.RequiredClaims != nil { + in, out := &in.RequiredClaims, &out.RequiredClaims + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SigningAlgs != nil { + in, out := &in.SigningAlgs, &out.SigningAlgs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.UsernameClaim != nil { + in, out := &in.UsernameClaim, &out.UsernameClaim + *out = new(string) + **out = **in + } + if in.UsernamePrefix != nil { + in, out := &in.UsernamePrefix, &out.UsernamePrefix + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCConfig. +func (in *OIDCConfig) DeepCopy() *OIDCConfig { + if in == nil { + return nil + } + out := new(OIDCConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenIDConnectClientAuthentication) DeepCopyInto(out *OpenIDConnectClientAuthentication) { + *out = *in + if in.ExtraConfig != nil { + in, out := &in.ExtraConfig, &out.ExtraConfig + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDConnectClientAuthentication. +func (in *OpenIDConnectClientAuthentication) DeepCopy() *OpenIDConnectClientAuthentication { + if in == nil { + return nil + } + out := new(OpenIDConnectClientAuthentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Plant) DeepCopyInto(out *Plant) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plant. +func (in *Plant) DeepCopy() *Plant { + if in == nil { + return nil + } + out := new(Plant) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Plant) 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 *PlantList) DeepCopyInto(out *PlantList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Plant, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlantList. +func (in *PlantList) DeepCopy() *PlantList { + if in == nil { + return nil + } + out := new(PlantList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PlantList) 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 *PlantSpec) DeepCopyInto(out *PlantSpec) { + *out = *in + out.SecretRef = in.SecretRef + if in.Endpoints != nil { + in, out := &in.Endpoints, &out.Endpoints + *out = make([]Endpoint, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlantSpec. +func (in *PlantSpec) DeepCopy() *PlantSpec { + if in == nil { + return nil + } + out := new(PlantSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlantStatus) DeepCopyInto(out *PlantStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.ClusterInfo != nil { + in, out := &in.ClusterInfo, &out.ClusterInfo + *out = new(ClusterInfo) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlantStatus. +func (in *PlantStatus) DeepCopy() *PlantStatus { + if in == nil { + return nil + } + out := new(PlantStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Project) DeepCopyInto(out *Project) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. +func (in *Project) DeepCopy() *Project { + if in == nil { + return nil + } + out := new(Project) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Project) 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 *ProjectList) DeepCopyInto(out *ProjectList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. +func (in *ProjectList) DeepCopy() *ProjectList { + if in == nil { + return nil + } + out := new(ProjectList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectList) 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 *ProjectMember) DeepCopyInto(out *ProjectMember) { + *out = *in + out.Subject = in.Subject + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMember. +func (in *ProjectMember) DeepCopy() *ProjectMember { + if in == nil { + return nil + } + out := new(ProjectMember) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { + *out = *in + if in.CreatedBy != nil { + in, out := &in.CreatedBy, &out.CreatedBy + *out = new(rbacv1.Subject) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(rbacv1.Subject) + **out = **in + } + if in.Purpose != nil { + in, out := &in.Purpose, &out.Purpose + *out = new(string) + **out = **in + } + if in.Members != nil { + in, out := &in.Members, &out.Members + *out = make([]ProjectMember, len(*in)) + copy(*out, *in) + } + if in.Namespace != nil { + in, out := &in.Namespace, &out.Namespace + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. +func (in *ProjectSpec) DeepCopy() *ProjectSpec { + if in == nil { + return nil + } + out := new(ProjectSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. +func (in *ProjectStatus) DeepCopy() *ProjectStatus { + if in == nil { + return nil + } + out := new(ProjectStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Provider) DeepCopyInto(out *Provider) { + *out = *in + if in.ControlPlaneConfig != nil { + in, out := &in.ControlPlaneConfig, &out.ControlPlaneConfig + *out = new(ProviderConfig) + (*in).DeepCopyInto(*out) + } + if in.InfrastructureConfig != nil { + in, out := &in.InfrastructureConfig, &out.InfrastructureConfig + *out = new(ProviderConfig) + (*in).DeepCopyInto(*out) + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]Worker, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Provider. +func (in *Provider) DeepCopy() *Provider { + if in == nil { + return nil + } + out := new(Provider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProviderConfig) DeepCopyInto(out *ProviderConfig) { + *out = *in + in.RawExtension.DeepCopyInto(&out.RawExtension) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderConfig. +func (in *ProviderConfig) DeepCopy() *ProviderConfig { + if in == nil { + return nil + } + out := new(ProviderConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Quota) DeepCopyInto(out *Quota) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Quota. +func (in *Quota) DeepCopy() *Quota { + if in == nil { + return nil + } + out := new(Quota) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Quota) 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 *QuotaList) DeepCopyInto(out *QuotaList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Quota, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaList. +func (in *QuotaList) DeepCopy() *QuotaList { + if in == nil { + return nil + } + out := new(QuotaList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *QuotaList) 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 *QuotaSpec) DeepCopyInto(out *QuotaSpec) { + *out = *in + if in.ClusterLifetimeDays != nil { + in, out := &in.ClusterLifetimeDays, &out.ClusterLifetimeDays + *out = new(int) + **out = **in + } + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = make(v1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + out.Scope = in.Scope + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaSpec. +func (in *QuotaSpec) DeepCopy() *QuotaSpec { + if in == nil { + return nil + } + out := new(QuotaSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Region) DeepCopyInto(out *Region) { + *out = *in + if in.Zones != nil { + in, out := &in.Zones, &out.Zones + *out = make([]AvailabilityZone, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Region. +func (in *Region) DeepCopy() *Region { + if in == nil { + return nil + } + out := new(Region) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretBinding) DeepCopyInto(out *SecretBinding) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SecretRef = in.SecretRef + if in.Quotas != nil { + in, out := &in.Quotas, &out.Quotas + *out = make([]v1.ObjectReference, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretBinding. +func (in *SecretBinding) DeepCopy() *SecretBinding { + if in == nil { + return nil + } + out := new(SecretBinding) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SecretBinding) 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 *SecretBindingList) DeepCopyInto(out *SecretBindingList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SecretBinding, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretBindingList. +func (in *SecretBindingList) DeepCopy() *SecretBindingList { + if in == nil { + return nil + } + out := new(SecretBindingList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SecretBindingList) 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 *Seed) DeepCopyInto(out *Seed) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Seed. +func (in *Seed) DeepCopy() *Seed { + if in == nil { + return nil + } + out := new(Seed) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Seed) 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 *SeedBackup) DeepCopyInto(out *SeedBackup) { + *out = *in + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + out.SecretRef = in.SecretRef + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedBackup. +func (in *SeedBackup) DeepCopy() *SeedBackup { + if in == nil { + return nil + } + out := new(SeedBackup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedDNS) DeepCopyInto(out *SeedDNS) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedDNS. +func (in *SeedDNS) DeepCopy() *SeedDNS { + if in == nil { + return nil + } + out := new(SeedDNS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedList) DeepCopyInto(out *SeedList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Seed, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedList. +func (in *SeedList) DeepCopy() *SeedList { + if in == nil { + return nil + } + out := new(SeedList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SeedList) 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 *SeedNetworks) DeepCopyInto(out *SeedNetworks) { + *out = *in + if in.ShootDefaults != nil { + in, out := &in.ShootDefaults, &out.ShootDefaults + *out = new(ShootNetworks) + (*in).DeepCopyInto(*out) + } + if in.BlockCIDRs != nil { + in, out := &in.BlockCIDRs, &out.BlockCIDRs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedNetworks. +func (in *SeedNetworks) DeepCopy() *SeedNetworks { + if in == nil { + return nil + } + out := new(SeedNetworks) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedProvider) DeepCopyInto(out *SeedProvider) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedProvider. +func (in *SeedProvider) DeepCopy() *SeedProvider { + if in == nil { + return nil + } + out := new(SeedProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedSpec) DeepCopyInto(out *SeedSpec) { + *out = *in + if in.Backup != nil { + in, out := &in.Backup, &out.Backup + *out = new(SeedBackup) + (*in).DeepCopyInto(*out) + } + out.DNS = in.DNS + in.Networks.DeepCopyInto(&out.Networks) + out.Provider = in.Provider + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(v1.SecretReference) + **out = **in + } + if in.Taints != nil { + in, out := &in.Taints, &out.Taints + *out = make([]SeedTaint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Volume != nil { + in, out := &in.Volume, &out.Volume + *out = new(SeedVolume) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedSpec. +func (in *SeedSpec) DeepCopy() *SeedSpec { + if in == nil { + return nil + } + out := new(SeedSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedStatus) DeepCopyInto(out *SeedStatus) { + *out = *in + if in.Gardener != nil { + in, out := &in.Gardener, &out.Gardener + *out = new(Gardener) + **out = **in + } + if in.KubernetesVersion != nil { + in, out := &in.KubernetesVersion, &out.KubernetesVersion + *out = new(string) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedStatus. +func (in *SeedStatus) DeepCopy() *SeedStatus { + if in == nil { + return nil + } + out := new(SeedStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedTaint) DeepCopyInto(out *SeedTaint) { + *out = *in + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedTaint. +func (in *SeedTaint) DeepCopy() *SeedTaint { + if in == nil { + return nil + } + out := new(SeedTaint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedVolume) DeepCopyInto(out *SeedVolume) { + *out = *in + if in.MinimumSize != nil { + in, out := &in.MinimumSize, &out.MinimumSize + x := (*in).DeepCopy() + *out = &x + } + if in.Providers != nil { + in, out := &in.Providers, &out.Providers + *out = make([]SeedVolumeProvider, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedVolume. +func (in *SeedVolume) DeepCopy() *SeedVolume { + if in == nil { + return nil + } + out := new(SeedVolume) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeedVolumeProvider) DeepCopyInto(out *SeedVolumeProvider) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeedVolumeProvider. +func (in *SeedVolumeProvider) DeepCopy() *SeedVolumeProvider { + if in == nil { + return nil + } + out := new(SeedVolumeProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceAccountConfig) DeepCopyInto(out *ServiceAccountConfig) { + *out = *in + if in.Issuer != nil { + in, out := &in.Issuer, &out.Issuer + *out = new(string) + **out = **in + } + if in.SigningKeySecret != nil { + in, out := &in.SigningKeySecret, &out.SigningKeySecret + *out = new(v1.LocalObjectReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountConfig. +func (in *ServiceAccountConfig) DeepCopy() *ServiceAccountConfig { + if in == nil { + return nil + } + out := new(ServiceAccountConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Shoot) DeepCopyInto(out *Shoot) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Shoot. +func (in *Shoot) DeepCopy() *Shoot { + if in == nil { + return nil + } + out := new(Shoot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Shoot) 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 *ShootList) DeepCopyInto(out *ShootList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Shoot, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootList. +func (in *ShootList) DeepCopy() *ShootList { + if in == nil { + return nil + } + out := new(ShootList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ShootList) 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 *ShootMachineImage) DeepCopyInto(out *ShootMachineImage) { + *out = *in + if in.ProviderConfig != nil { + in, out := &in.ProviderConfig, &out.ProviderConfig + *out = new(ProviderConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootMachineImage. +func (in *ShootMachineImage) DeepCopy() *ShootMachineImage { + if in == nil { + return nil + } + out := new(ShootMachineImage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootNetworks) DeepCopyInto(out *ShootNetworks) { + *out = *in + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = new(string) + **out = **in + } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootNetworks. +func (in *ShootNetworks) DeepCopy() *ShootNetworks { + if in == nil { + return nil + } + out := new(ShootNetworks) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootSpec) DeepCopyInto(out *ShootSpec) { + *out = *in + if in.Addons != nil { + in, out := &in.Addons, &out.Addons + *out = new(Addons) + (*in).DeepCopyInto(*out) + } + if in.DNS != nil { + in, out := &in.DNS, &out.DNS + *out = new(DNS) + (*in).DeepCopyInto(*out) + } + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make([]Extension, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Hibernation != nil { + in, out := &in.Hibernation, &out.Hibernation + *out = new(Hibernation) + (*in).DeepCopyInto(*out) + } + in.Kubernetes.DeepCopyInto(&out.Kubernetes) + in.Networking.DeepCopyInto(&out.Networking) + if in.Maintenance != nil { + in, out := &in.Maintenance, &out.Maintenance + *out = new(Maintenance) + (*in).DeepCopyInto(*out) + } + if in.Monitoring != nil { + in, out := &in.Monitoring, &out.Monitoring + *out = new(Monitoring) + (*in).DeepCopyInto(*out) + } + in.Provider.DeepCopyInto(&out.Provider) + if in.SeedName != nil { + in, out := &in.SeedName, &out.SeedName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootSpec. +func (in *ShootSpec) DeepCopy() *ShootSpec { + if in == nil { + return nil + } + out := new(ShootSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootStatus) DeepCopyInto(out *ShootStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Constraints != nil { + in, out := &in.Constraints, &out.Constraints + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + out.Gardener = in.Gardener + if in.LastOperation != nil { + in, out := &in.LastOperation, &out.LastOperation + *out = new(LastOperation) + (*in).DeepCopyInto(*out) + } + if in.LastErrors != nil { + in, out := &in.LastErrors, &out.LastErrors + *out = make([]LastError, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RetryCycleStartTime != nil { + in, out := &in.RetryCycleStartTime, &out.RetryCycleStartTime + *out = (*in).DeepCopy() + } + if in.SeedName != nil { + in, out := &in.SeedName, &out.SeedName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootStatus. +func (in *ShootStatus) DeepCopy() *ShootStatus { + if in == nil { + return nil + } + out := new(ShootStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Volume) DeepCopyInto(out *Volume) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume. +func (in *Volume) DeepCopy() *Volume { + if in == nil { + return nil + } + out := new(Volume) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeType) DeepCopyInto(out *VolumeType) { + *out = *in + if in.Usable != nil { + in, out := &in.Usable, &out.Usable + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeType. +func (in *VolumeType) DeepCopy() *VolumeType { + if in == nil { + return nil + } + out := new(VolumeType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Worker) DeepCopyInto(out *Worker) { + *out = *in + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.CABundle != nil { + in, out := &in.CABundle, &out.CABundle + *out = new(string) + **out = **in + } + if in.Kubernetes != nil { + in, out := &in.Kubernetes, &out.Kubernetes + *out = new(WorkerKubernetes) + (*in).DeepCopyInto(*out) + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + in.Machine.DeepCopyInto(&out.Machine) + if in.MaxSurge != nil { + in, out := &in.MaxSurge, &out.MaxSurge + *out = new(intstr.IntOrString) + **out = **in + } + if in.MaxUnavailable != nil { + in, out := &in.MaxUnavailable, &out.MaxUnavailable + *out = new(intstr.IntOrString) + **out = **in + } + if in.ProviderConfig != nil { + in, out := &in.ProviderConfig, &out.ProviderConfig + *out = new(ProviderConfig) + (*in).DeepCopyInto(*out) + } + if in.Taints != nil { + in, out := &in.Taints, &out.Taints + *out = make([]v1.Taint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Volume != nil { + in, out := &in.Volume, &out.Volume + *out = new(Volume) + (*in).DeepCopyInto(*out) + } + if in.Zones != nil { + in, out := &in.Zones, &out.Zones + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Worker. +func (in *Worker) DeepCopy() *Worker { + if in == nil { + return nil + } + out := new(Worker) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkerKubernetes) DeepCopyInto(out *WorkerKubernetes) { + *out = *in + if in.Kubelet != nil { + in, out := &in.Kubelet, &out.Kubelet + *out = new(KubeletConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerKubernetes. +func (in *WorkerKubernetes) DeepCopy() *WorkerKubernetes { + if in == nil { + return nil + } + out := new(WorkerKubernetes) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.defaults.go b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.defaults.go new file mode 100644 index 000000000..9a352b86a --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/v1beta1/zz_generated.defaults.go @@ -0,0 +1,87 @@ +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&CloudProfile{}, func(obj interface{}) { SetObjectDefaults_CloudProfile(obj.(*CloudProfile)) }) + scheme.AddTypeDefaultingFunc(&CloudProfileList{}, func(obj interface{}) { SetObjectDefaults_CloudProfileList(obj.(*CloudProfileList)) }) + scheme.AddTypeDefaultingFunc(&Project{}, func(obj interface{}) { SetObjectDefaults_Project(obj.(*Project)) }) + scheme.AddTypeDefaultingFunc(&ProjectList{}, func(obj interface{}) { SetObjectDefaults_ProjectList(obj.(*ProjectList)) }) + scheme.AddTypeDefaultingFunc(&SecretBinding{}, func(obj interface{}) { SetObjectDefaults_SecretBinding(obj.(*SecretBinding)) }) + scheme.AddTypeDefaultingFunc(&SecretBindingList{}, func(obj interface{}) { SetObjectDefaults_SecretBindingList(obj.(*SecretBindingList)) }) + scheme.AddTypeDefaultingFunc(&Shoot{}, func(obj interface{}) { SetObjectDefaults_Shoot(obj.(*Shoot)) }) + scheme.AddTypeDefaultingFunc(&ShootList{}, func(obj interface{}) { SetObjectDefaults_ShootList(obj.(*ShootList)) }) + return nil +} + +func SetObjectDefaults_CloudProfile(in *CloudProfile) { + for i := range in.Spec.MachineTypes { + a := &in.Spec.MachineTypes[i] + SetDefaults_MachineType(a) + } + for i := range in.Spec.VolumeTypes { + a := &in.Spec.VolumeTypes[i] + SetDefaults_VolumeType(a) + } +} + +func SetObjectDefaults_CloudProfileList(in *CloudProfileList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_CloudProfile(a) + } +} + +func SetObjectDefaults_Project(in *Project) { + SetDefaults_Project(in) +} + +func SetObjectDefaults_ProjectList(in *ProjectList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Project(a) + } +} + +func SetObjectDefaults_SecretBinding(in *SecretBinding) { + SetDefaults_SecretBinding(in) +} + +func SetObjectDefaults_SecretBindingList(in *SecretBindingList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_SecretBinding(a) + } +} + +func SetObjectDefaults_Shoot(in *Shoot) { + SetDefaults_Shoot(in) + if in.Spec.Addons != nil { + if in.Spec.Addons.NginxIngress != nil { + SetDefaults_NginxIngress(in.Spec.Addons.NginxIngress) + } + } + if in.Spec.Maintenance != nil { + SetDefaults_Maintenance(in.Spec.Maintenance) + } + for i := range in.Spec.Provider.Workers { + a := &in.Spec.Provider.Workers[i] + SetDefaults_Worker(a) + } +} + +func SetObjectDefaults_ShootList(in *ShootList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Shoot(a) + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/core/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/core/zz_generated.deepcopy.go index 52b8bfcab..4f4df2b77 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/core/zz_generated.deepcopy.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/core/zz_generated.deepcopy.go @@ -108,8 +108,8 @@ func (in *BackupBucketSpec) DeepCopyInto(out *BackupBucketSpec) { *out = *in out.Provider = in.Provider out.SecretRef = in.SecretRef - if in.Seed != nil { - in, out := &in.Seed, &out.Seed + if in.SeedName != nil { + in, out := &in.SeedName, &out.SeedName *out = new(string) **out = **in } @@ -221,8 +221,8 @@ func (in *BackupEntryList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BackupEntrySpec) DeepCopyInto(out *BackupEntrySpec) { *out = *in - if in.Seed != nil { - in, out := &in.Seed, &out.Seed + if in.SeedName != nil { + in, out := &in.SeedName, &out.SeedName *out = new(string) **out = **in } @@ -575,6 +575,51 @@ func (in *Endpoint) DeepCopy() *Endpoint { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtensionResourceState) DeepCopyInto(out *ExtensionResourceState) { + *out = *in + if in.Purpose != nil { + in, out := &in.Purpose, &out.Purpose + *out = new(string) + **out = **in + } + in.State.DeepCopyInto(&out.State) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionResourceState. +func (in *ExtensionResourceState) DeepCopy() *ExtensionResourceState { + if in == nil { + return nil + } + out := new(ExtensionResourceState) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GardenerResourceData) DeepCopyInto(out *GardenerResourceData) { + *out = *in + if in.Data != nil { + in, out := &in.Data, &out.Data + *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 GardenerResourceData. +func (in *GardenerResourceData) DeepCopy() *GardenerResourceData { + if in == nil { + return nil + } + out := new(GardenerResourceData) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubernetesInfo) DeepCopyInto(out *KubernetesInfo) { *out = *in @@ -770,3 +815,93 @@ func (in *ProviderConfig) DeepCopy() *ProviderConfig { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ShootState) DeepCopyInto(out *ShootState) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootState. +func (in *ShootState) DeepCopy() *ShootState { + if in == nil { + return nil + } + out := new(ShootState) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ShootState) 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 *ShootStateList) DeepCopyInto(out *ShootStateList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ShootState, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootStateList. +func (in *ShootStateList) DeepCopy() *ShootStateList { + if in == nil { + return nil + } + out := new(ShootStateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ShootStateList) 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 *ShootStateSpec) DeepCopyInto(out *ShootStateSpec) { + *out = *in + if in.Gardener != nil { + in, out := &in.Gardener, &out.Gardener + *out = make([]GardenerResourceData, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make([]ExtensionResourceState, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShootStateSpec. +func (in *ShootStateSpec) DeepCopy() *ShootStateSpec { + if in == nil { + return nil + } + out := new(ShootStateSpec) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types.go b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types.go index 987864f97..a9ae0ad71 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types.go @@ -15,7 +15,7 @@ package v1alpha1 import ( - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -23,9 +23,9 @@ import ( type Status interface { // GetConditions retrieves the Conditions of a status. // Conditions may be nil. - GetConditions() []gardencorev1alpha1.Condition + GetConditions() []gardencorev1beta1.Condition // SetConditions sets the Conditions of a status. - SetConditions([]gardencorev1alpha1.Condition) + SetConditions([]gardencorev1beta1.Condition) // GetLastOperation retrieves the LastOperation of a status. // LastOperation may be nil. GetLastOperation() LastOperation @@ -45,9 +45,9 @@ type LastOperation interface { // GetProgress returns progress of the last operation. GetProgress() int // GetState returns the LastOperationState of the last operation. - GetState() gardencorev1alpha1.LastOperationState + GetState() gardencorev1beta1.LastOperationState // GetType returns the LastOperationType of the last operation. - GetType() gardencorev1alpha1.LastOperationType + GetType() gardencorev1beta1.LastOperationType } // LastError is the last error on an object. @@ -57,7 +57,7 @@ type LastError interface { // GetTaskID gets the task ID of the last error. GetTaskID() *string // GetCodes gets the error codes of the last error. - GetCodes() []gardencorev1alpha1.ErrorCode + GetCodes() []gardencorev1beta1.ErrorCode // GetLastUpdateTime retrieves the last time the error was updated. GetLastUpdateTime() *metav1.Time } diff --git a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_defaults.go b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_defaults.go index 399fed2a2..f31408399 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_defaults.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_defaults.go @@ -15,7 +15,7 @@ package v1alpha1 import ( - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -34,13 +34,13 @@ func (d *DefaultSpec) GetExtensionType() string { type DefaultStatus struct { // Conditions represents the latest available observations of a Seed's current state. // +optional - Conditions []gardencorev1alpha1.Condition `json:"conditions,omitempty"` + Conditions []gardencorev1beta1.Condition `json:"conditions,omitempty"` // LastError holds information about the last occurred error during an operation. // +optional - LastError *gardencorev1alpha1.LastError `json:"lastError,omitempty"` + LastError *gardencorev1beta1.LastError `json:"lastError,omitempty"` // LastOperation holds information about the last operation on the resource. // +optional - LastOperation *gardencorev1alpha1.LastOperation `json:"lastOperation,omitempty"` + LastOperation *gardencorev1beta1.LastOperation `json:"lastOperation,omitempty"` // ObservedGeneration is the most recent generation observed for this resource. ObservedGeneration int64 `json:"observedGeneration,omitempty"` // State can be filled by the operating controller with what ever data it needs. @@ -49,12 +49,12 @@ type DefaultStatus struct { } // GetConditions implements Status. -func (d *DefaultStatus) GetConditions() []gardencorev1alpha1.Condition { +func (d *DefaultStatus) GetConditions() []gardencorev1beta1.Condition { return d.Conditions } // SetConditions implements Status. -func (d *DefaultStatus) SetConditions(c []gardencorev1alpha1.Condition) { +func (d *DefaultStatus) SetConditions(c []gardencorev1beta1.Condition) { d.Conditions = c } diff --git a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_operatingsystemconfig.go b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_operatingsystemconfig.go index 26fb91648..0e3ac9202 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_operatingsystemconfig.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_operatingsystemconfig.go @@ -79,10 +79,12 @@ type OperatingSystemConfigSpec struct { // +patchMergeKey=name // +patchStrategy=merge // +optional - Units []Unit `json:"units,omitempty"` + Units []Unit `json:"units,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // Files is a list of files that should get written to the host's file system. + // +patchMergeKey=path + // +patchStrategy=merge // +optional - Files []File `json:"files,omitempty"` + Files []File `json:"files,omitempty" patchStrategy:"merge" patchMergeKey:"path"` // ProviderConfig is the configuration passed to extension resource. // +optional ProviderConfig *runtime.RawExtension `json:"providerConfig,omitempty"` @@ -105,7 +107,7 @@ type Unit struct { // +patchMergeKey=name // +patchStrategy=merge // +optional - DropIns []DropIn `json:"dropIns,omitempty"` + DropIns []DropIn `json:"dropIns,omitempty" patchStrategy:"merge" patchMergeKey:"name"` } // DropIn is a drop-in configuration for a systemd unit. diff --git a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_worker.go b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_worker.go index e5998d285..e975e2aa0 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_worker.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/types_worker.go @@ -78,7 +78,9 @@ type WorkerSpec struct { // +optional SSHPublicKey []byte `json:"sshPublicKey,omitempty"` // Pools is a list of worker pools. - Pools []WorkerPool `json:"pools"` + // +patchMergeKey=name + // +patchStrategy=merge + Pools []WorkerPool `json:"pools" patchStrategy:"merge" patchMergeKey:"name"` } // WorkerPool is the definition of a specific worker pool. @@ -148,7 +150,9 @@ type WorkerStatus struct { // MachineDeployments is a list of created machine deployments. It will be used to e.g. configure // the cluster-autoscaler properly. - MachineDeployments []MachineDeployment `json:"machineDeployments,omitempty"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineDeployments []MachineDeployment `json:"machineDeployments,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // ProviderStatus contains provider-specific output for this worker. // +optional ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"` diff --git a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/zz_generated.deepcopy.go index 6a79058a5..dff3653ae 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/zz_generated.deepcopy.go @@ -21,7 +21,7 @@ limitations under the License. package v1alpha1 import ( - corev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" v1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -456,19 +456,19 @@ func (in *DefaultStatus) DeepCopyInto(out *DefaultStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]corev1alpha1.Condition, len(*in)) + *out = make([]v1beta1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.LastError != nil { in, out := &in.LastError, &out.LastError - *out = new(corev1alpha1.LastError) + *out = new(v1beta1.LastError) (*in).DeepCopyInto(*out) } if in.LastOperation != nil { in, out := &in.LastOperation, &out.LastOperation - *out = new(corev1alpha1.LastOperation) + *out = new(v1beta1.LastOperation) (*in).DeepCopyInto(*out) } if in.State != nil { diff --git a/vendor/github.com/gardener/gardener/pkg/apis/garden/field_constants.go b/vendor/github.com/gardener/gardener/pkg/apis/garden/field_constants.go index 7f616c721..30b5bbdff 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/garden/field_constants.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/garden/field_constants.go @@ -24,10 +24,10 @@ const ( ShootSeedNameDeprecated = "spec.cloud.seed" // ShootSeedName is the field selector path for finding - // the Seed cluster of a core.gardener.cloud/v1alpha1 Shoot. + // the Seed cluster of a core.gardener.cloud/{v1alpha1,v1beta1} Shoot. ShootSeedName = "spec.seedName" // ShootCloudProfileName is the field selector path for finding - // the CloudProfile name of a core.gardener.cloud/v1alpha1 Shoot. + // the CloudProfile name of a core.gardener.cloud/{v1alpha1,v1beta1} Shoot. ShootCloudProfileName = "spec.cloudProfileName" ) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/garden/helper/helpers.go b/vendor/github.com/gardener/gardener/pkg/apis/garden/helper/helpers.go index f40aabe0a..4022fdf56 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/garden/helper/helpers.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/garden/helper/helpers.go @@ -23,6 +23,7 @@ import ( "github.com/Masterminds/semver" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime/schema" ) // DetermineCloudProviderInProfile takes a CloudProfile specification and returns the cloud provider this profile is used for. @@ -223,6 +224,11 @@ func ShootWantsBasicAuthentication(kubeAPIServerConfig *garden.KubeAPIServerConf return *kubeAPIServerConfig.EnableBasicAuthentication } +// ShootUsesUnmanagedDNS returns true if the shoot's DNS section is marked as 'unmanaged'. +func ShootUsesUnmanagedDNS(shoot *garden.Shoot) bool { + return shoot.Spec.DNS != nil && len(shoot.Spec.DNS.Providers) > 0 && shoot.Spec.DNS.Providers[0].Type != nil && *shoot.Spec.DNS.Providers[0].Type == garden.DNSUnmanaged +} + // GetConditionIndex returns the index of the condition with the given out of the list of . // In case the required type could not be found, it returns -1. func GetConditionIndex(conditions []garden.Condition, conditionType garden.ConditionType) int { @@ -255,7 +261,7 @@ func TaintsHave(taints []garden.SeedTaint, key string) bool { // QuotaScope returns the scope of a quota scope reference. func QuotaScope(scopeRef corev1.ObjectReference) (string, error) { - if scopeRef.APIVersion == "core.gardener.cloud/v1alpha1" && scopeRef.Kind == "Project" { + if gvk := schema.FromAPIVersionAndKind(scopeRef.APIVersion, scopeRef.Kind); gvk.Group == "core.gardener.cloud" && gvk.Kind == "Project" { return "project", nil } if scopeRef.APIVersion == "v1" && scopeRef.Kind == "Secret" { diff --git a/vendor/github.com/gardener/gardener/pkg/apis/garden/types.go b/vendor/github.com/gardener/gardener/pkg/apis/garden/types.go index bd0dea348..71d20e90c 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/garden/types.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/garden/types.go @@ -550,12 +550,9 @@ type SeedSpec struct { IngressDomain string // SecretRef is a reference to a Secret object containing the Kubeconfig and the cloud provider credentials for // the account the Seed cluster has been deployed to. - SecretRef corev1.SecretReference + SecretRef *corev1.SecretReference // Networks defines the pod, service and worker network of the Seed cluster. Networks SeedNetworks - // BlockCIDRs is a list of network addresses tha should be blocked for shoot control plane components running - // in the seed cluster. - BlockCIDRs []string // Taints describes taints on the seed. Taints []SeedTaint // Backup holds the object store configuration for the backups of shoot(currently only etcd). @@ -592,7 +589,9 @@ type SeedStatus struct { // Conditions represents the latest available observations of a Seed's current state. Conditions []Condition // Gardener holds information about the Gardener which last acted on the Seed. - Gardener Gardener + Gardener *Gardener + // KubernetesVersion is the Kubernetes version of the seed cluster. + KubernetesVersion *string // ObservedGeneration is the most recent generation observed for this Seed. It corresponds to the // Seed's generation, which is updated on mutation by the API Server. ObservedGeneration int64 @@ -643,6 +642,9 @@ type SeedNetworks struct { Services string // ShootDefaults contains the default networks CIDRs for shoots. ShootDefaults *ShootNetworks + // BlockCIDRs is a list of network addresses that should be blocked for shoot control plane components running + // in the seed cluster. + BlockCIDRs []string } // ShootNetworks contains the default networks CIDRs for shoots. @@ -662,6 +664,10 @@ type SeedTaint struct { } const ( + // SeedTaintDisableDNS is a constant for a taint key on a seed that marks it for disabling DNS. All shoots + // using this seed won't get any DNS providers, DNS records, and no DNS extension controller is required to + // be installed here. This is useful for environment where DNS is not required. + SeedTaintDisableDNS = "seed.gardener.cloud/disable-dns" // SeedTaintProtected is a constant for a taint key on a seed that marks it as protected. Protected seeds // may only be used by shoots in the `garden` namespace. SeedTaintProtected = "seed.gardener.cloud/protected" @@ -839,10 +845,12 @@ const ( type ShootStatus struct { // Conditions represents the latest available observations of a Shoots's current state. Conditions []Condition + // Constraints represents conditions of a Shoot's current state that constraint some operations on it. + // +optional + Constraints []Condition // Gardener holds information about the Gardener which last acted on the Shoot. Gardener Gardener // LastOperation holds information about the last operation on the Shoot. - // +optional LastOperation *LastOperation // LastErrors holds information about the last occurred error(s) during an operation. LastErrors []LastError @@ -852,9 +860,9 @@ type ShootStatus struct { // RetryCycleStartTime is the start time of the last retry cycle (used to determine how often an operation // must be retried until we give up). RetryCycleStartTime *metav1.Time - // Seed is the name of the seed cluster that runs the control plane of the Shoot. This value is only written + // SeedName is the name of the seed cluster that runs the control plane of the Shoot. This value is only written // after a successful create/reconcile operation. It will be used when control planes are moved between Seeds. - Seed *string + SeedName *string // IsHibernated indicates whether the Shoot is currently hibernated. IsHibernated *bool // TechnicalID is the name that is used for creating the Seed namespace, the infrastructure resources, and @@ -1194,6 +1202,9 @@ type NginxIngress struct { // Config contains custom configuration for the nginx-ingress-controller configuration. // See https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md#configuration-options Config map[string]string + // ExternalTrafficPolicy controls the `.spec.externalTrafficPolicy` value of the load balancer `Service` + // exposing the nginx-ingress. Defaults to `Cluster`. + ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType } // Monocular describes configuration values for the monocular addon. @@ -1280,7 +1291,8 @@ const ( // Hibernation contains information whether the Shoot is suspended or not. type Hibernation struct { - // Enabled is true if the Shoot's desired state is hibernated, false otherwise. + // Enabled specifies whether the Shoot needs to be hibernated or not. If it is true, the Shoot's desired state is to be hibernated. + // If it is false or nil, the Shoot's desired state is to be awaken. Enabled *bool // Schedules determines the hibernation schedules. Schedules []HibernationSchedule @@ -1777,8 +1789,11 @@ const ( ) const ( - // SeedAvailable is a constant for a condition type indicating the Seed cluster availability. - SeedAvailable ConditionType = "Available" + // SeedGardenletReady is a constant for a condition type indicating that the Gardenlet is ready. + SeedGardenletReady ConditionType = "GardenletReady" + // SeedBootstrapped is a constant for a condition type indicating that the seed cluster has been + // bootstrapped. + SeedBootstrapped ConditionType = "Bootstrapped" // ShootControlPlaneHealthy is a constant for a condition type indicating the control plane health. ShootControlPlaneHealthy ConditionType = "ControlPlaneHealthy" @@ -1788,4 +1803,6 @@ const ( ShootSystemComponentsHealthy ConditionType = "SystemComponentsHealthy" // ShootAPIServerAvailable is a constant for a condition type indicating the api server is available. ShootAPIServerAvailable ConditionType = "APIServerAvailable" + // ShootHibernationPossible is a constant for a condition type indicating whether the Shoot can be hibernated. + ShootHibernationPossible ConditionType = "HibernationPossible" ) diff --git a/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/conversions.go b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/conversions.go new file mode 100644 index 000000000..bbfb1fc17 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/conversions.go @@ -0,0 +1,2612 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + "encoding/json" + "fmt" + "strings" + "unsafe" + + gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "github.com/gardener/gardener/pkg/apis/garden" + "github.com/gardener/gardener/pkg/apis/garden/helper" + "github.com/gardener/gardener/pkg/utils" + + alicloudv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-alicloud/pkg/apis/alicloud/v1alpha1" + awsv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-aws/pkg/apis/aws/v1alpha1" + azureinstall "github.com/gardener/gardener-extensions/controllers/provider-azure/pkg/apis/azure/install" + azurev1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-azure/pkg/apis/azure/v1alpha1" + gcpv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/apis/gcp/v1alpha1" + openstackinstall "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack/install" + openstackv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/apis/openstack/v1alpha1" + packetv1alpha1 "github.com/gardener/gardener-extensions/controllers/provider-packet/pkg/apis/packet/v1alpha1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/klog" +) + +func init() { + localSchemeBuilder.Register(addConversionFuncs) +} + +// Convert_v1beta1_MachineVersion_To_garden_MachineVersion +func Convert_v1beta1_MachineImage_To_garden_MachineImage(in *MachineImage, out *garden.MachineImage, s conversion.Scope) error { + if err := autoConvert_v1beta1_MachineImage_To_garden_MachineImage(in, out, s); err != nil { + return err + } + + if len(in.Version) > 0 { + out.Versions = make([]garden.MachineImageVersion, len(in.Versions)+1) + out.Versions[0] = garden.MachineImageVersion{ + Version: in.Version, + } + } else { + out.Versions = make([]garden.MachineImageVersion, len(in.Versions)) + } + + for index, externalVersion := range in.Versions { + internalVersion := &garden.MachineImageVersion{} + if err := autoConvert_v1beta1_MachineImageVersion_To_garden_MachineImageVersion(&externalVersion, internalVersion, s); err != nil { + return err + } + if len(in.Version) > 0 { + out.Versions[index+1] = *internalVersion + } else { + out.Versions[index] = *internalVersion + } + } + + return nil +} + +// Convert_garden_MachineImage_To_v1beta1_MachineImage +func Convert_garden_MachineImage_To_v1beta1_MachineImage(in *garden.MachineImage, out *MachineImage, s conversion.Scope) error { + if err := autoConvert_garden_MachineImage_To_v1beta1_MachineImage(in, out, s); err != nil { + return err + } + + out.Versions = make([]MachineImageVersion, len(in.Versions)) + for index, internalVersion := range in.Versions { + externalVersion := &MachineImageVersion{} + if err := autoConvert_garden_MachineImageVersion_To_v1beta1_MachineImageVersion(&internalVersion, externalVersion, s); err != nil { + return err + } + out.Versions[index] = *externalVersion + } + + return nil +} + +func Convert_v1beta1_KubernetesConstraints_To_garden_KubernetesConstraints(in *KubernetesConstraints, out *garden.KubernetesConstraints, s conversion.Scope) error { + out.OfferedVersions = []garden.KubernetesVersion{} + duplicates := map[string]int{} + index := 0 + for _, externalVersion := range in.Versions { + internalVersion := &garden.KubernetesVersion{Version: externalVersion} + if _, exists := duplicates[externalVersion]; exists { + continue + } + out.OfferedVersions = append(out.OfferedVersions, *internalVersion) + duplicates[externalVersion] = index + index++ + } + for _, externalVersion := range in.OfferedVersions { + internalVersion := &garden.KubernetesVersion{} + if err := Convert_v1beta1_KubernetesVersion_To_garden_KubernetesVersion(&externalVersion, internalVersion, s); err != nil { + return err + } + if _, exists := duplicates[externalVersion.Version]; exists { + if externalVersion.ExpirationDate == nil { + continue + } + out.OfferedVersions[duplicates[externalVersion.Version]].ExpirationDate = externalVersion.ExpirationDate + continue + } + out.OfferedVersions = append(out.OfferedVersions, *internalVersion) + } + return nil +} + +func Convert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(in *garden.KubernetesConstraints, out *KubernetesConstraints, s conversion.Scope) error { + if err := autoConvert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(in, out, s); err != nil { + return err + } + + for _, version := range in.OfferedVersions { + out.Versions = append(out.Versions, version.Version) + } + + return nil +} + +func addConversionFuncs(scheme *runtime.Scheme) error { + return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("Shoot"), + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", "metadata.namespace", garden.ShootSeedNameDeprecated: + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) +} + +func Convert_v1beta1_Seed_To_garden_Seed(in *Seed, out *garden.Seed, s conversion.Scope) error { + if err := autoConvert_v1beta1_Seed_To_garden_Seed(in, out, s); err != nil { + return err + } + + if a := in.Annotations; a != nil { + if v, ok := a[garden.MigrationSeedProviderType]; ok { + out.Spec.Provider.Type = v + } + if v, ok := a[garden.MigrationSeedProviderRegion]; ok { + out.Spec.Provider.Region = v + } + + if v, ok := a[garden.MigrationSeedTaints]; ok { + for _, key := range strings.Split(v, ",") { + out.Spec.Taints = append(out.Spec.Taints, garden.SeedTaint{ + Key: key, + }) + } + } + + volumeMinimumSize, ok := a[garden.MigrationSeedVolumeMinimumSize] + volumeProviders, ok2 := a[garden.MigrationSeedVolumeProviders] + legacyVolumeMinimumSizeAnnotationValue, ok3 := a["persistentvolume.garden.sapcloud.io/minimumSize"] + legacyVolumeProviderAnnotationValue, ok4 := a["persistentvolume.garden.sapcloud.io/provider"] + + if ok || ok2 || ok3 || ok4 { + out.Spec.Volume = &garden.SeedVolume{} + } + + if ok { + quantity, err := resource.ParseQuantity(volumeMinimumSize) + if err != nil { + return err + } + out.Spec.Volume.MinimumSize = &quantity + } + if ok3 { + quantity, err := resource.ParseQuantity(legacyVolumeMinimumSizeAnnotationValue) + if err != nil { + return err + } + out.Spec.Volume.MinimumSize = &quantity + } + + if ok4 { + out.Spec.Volume.Providers = append(out.Spec.Volume.Providers, garden.SeedVolumeProvider{ + Purpose: garden.SeedVolumeProviderPurposeEtcdMain, + Name: legacyVolumeProviderAnnotationValue, + }) + } + if ok2 { + var obj []garden.SeedVolumeProvider + if err := json.Unmarshal([]byte(volumeProviders), &obj); err != nil { + return err + } + + out.Spec.Volume.Providers = append(out.Spec.Volume.Providers, obj...) + } + } + + out.Spec.Provider.Region = in.Spec.Cloud.Region + + if p := in.Spec.Protected; p != nil && *p && !helper.TaintsHave(out.Spec.Taints, garden.SeedTaintProtected) { + out.Spec.Taints = append(out.Spec.Taints, garden.SeedTaint{ + Key: garden.SeedTaintProtected, + }) + } + + if v := in.Spec.Visible; v != nil && !*v && !helper.TaintsHave(out.Spec.Taints, garden.SeedTaintInvisible) { + out.Spec.Taints = append(out.Spec.Taints, garden.SeedTaint{ + Key: garden.SeedTaintInvisible, + }) + } + + out.Spec.Networks.BlockCIDRs = in.Spec.BlockCIDRs + + return nil +} + +func Convert_garden_Seed_To_v1beta1_Seed(in *garden.Seed, out *Seed, s conversion.Scope) error { + if err := autoConvert_garden_Seed_To_v1beta1_Seed(in, out, s); err != nil { + return err + } + + if len(in.Spec.Provider.Type) > 0 || len(in.Spec.Provider.Region) > 0 || in.Spec.Volume != nil { + old := out.Annotations + out.Annotations = make(map[string]string, len(old)+3) + for k, v := range old { + out.Annotations[k] = v + } + } + + if len(in.Spec.Provider.Type) > 0 { + out.Annotations[garden.MigrationSeedProviderType] = in.Spec.Provider.Type + } + + if len(in.Spec.Provider.Region) > 0 { + out.Annotations[garden.MigrationSeedProviderRegion] = in.Spec.Provider.Region + } + + if v := in.Spec.Volume; v != nil { + if v.MinimumSize != nil { + out.Annotations[garden.MigrationSeedVolumeMinimumSize] = v.MinimumSize.String() + out.Annotations["persistentvolume.garden.sapcloud.io/minimumSize"] = v.MinimumSize.String() + } + + var volumeProviders []garden.SeedVolumeProvider + for _, provider := range in.Spec.Volume.Providers { + if provider.Purpose == garden.SeedVolumeProviderPurposeEtcdMain { + out.Annotations["persistentvolume.garden.sapcloud.io/provider"] = provider.Name + } else { + volumeProviders = append(volumeProviders, provider) + } + } + + if len(volumeProviders) > 0 { + data, err := json.Marshal(volumeProviders) + if err != nil { + return err + } + out.Annotations[garden.MigrationSeedVolumeProviders] = string(data) + } else { + delete(out.Annotations, garden.MigrationSeedVolumeProviders) + } + } + + var ( + trueVar = true + falseVar = false + taintKeys []string + ) + + for _, taint := range in.Spec.Taints { + taintKeys = append(taintKeys, taint.Key) + + switch taint.Key { + case garden.SeedTaintProtected: + out.Spec.Protected = &trueVar + case garden.SeedTaintInvisible: + out.Spec.Visible = &falseVar + } + } + + if len(taintKeys) > 0 { + out.Annotations[garden.MigrationSeedTaints] = strings.Join(taintKeys, ",") + } else { + delete(out.Annotations, garden.MigrationSeedTaints) + } + + if out.Spec.Visible == nil { + out.Spec.Visible = &trueVar + } + if out.Spec.Protected == nil { + out.Spec.Protected = &falseVar + } + + var ( + defaultPodCIDR = DefaultPodNetworkCIDR + defaultServiceCIDR = DefaultServiceNetworkCIDR + defaultPodCIDRAlicloud = DefaultPodNetworkCIDRAlicloud + defaultServiceCIDRAlicloud = DefaultServiceNetworkCIDRAlicloud + ) + + if out.Spec.Networks.ShootDefaults == nil { + out.Spec.Networks.ShootDefaults = &ShootNetworks{} + } + + if v, ok := out.Annotations[garden.MigrationSeedProviderType]; ok && v == "alicloud" { + if out.Spec.Networks.ShootDefaults.Pods == nil && !utils.NetworksIntersect(out.Spec.Networks.Pods, defaultPodCIDRAlicloud) { + out.Spec.Networks.ShootDefaults.Pods = &defaultPodCIDRAlicloud + } + if out.Spec.Networks.ShootDefaults.Services == nil && !utils.NetworksIntersect(out.Spec.Networks.Services, defaultServiceCIDRAlicloud) { + out.Spec.Networks.ShootDefaults.Services = &defaultServiceCIDRAlicloud + } + } else { + if out.Spec.Networks.ShootDefaults.Pods == nil && !utils.NetworksIntersect(out.Spec.Networks.Pods, defaultPodCIDR) { + out.Spec.Networks.ShootDefaults.Pods = &defaultPodCIDR + } + if out.Spec.Networks.ShootDefaults.Services == nil && !utils.NetworksIntersect(out.Spec.Networks.Services, defaultServiceCIDR) { + out.Spec.Networks.ShootDefaults.Services = &defaultServiceCIDR + } + } + + out.Spec.BlockCIDRs = in.Spec.Networks.BlockCIDRs + + return nil +} + +func Convert_garden_SeedSpec_To_v1beta1_SeedSpec(in *garden.SeedSpec, out *SeedSpec, s conversion.Scope) error { + return autoConvert_garden_SeedSpec_To_v1beta1_SeedSpec(in, out, s) +} + +func Convert_v1beta1_SeedSpec_To_garden_SeedSpec(in *SeedSpec, out *garden.SeedSpec, s conversion.Scope) error { + return autoConvert_v1beta1_SeedSpec_To_garden_SeedSpec(in, out, s) +} + +func Convert_garden_SeedNetworks_To_v1beta1_SeedNetworks(in *garden.SeedNetworks, out *SeedNetworks, s conversion.Scope) error { + return autoConvert_garden_SeedNetworks_To_v1beta1_SeedNetworks(in, out, s) +} + +func Convert_v1beta1_SeedNetworks_To_garden_SeedNetworks(in *SeedNetworks, out *garden.SeedNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_SeedNetworks_To_garden_SeedNetworks(in, out, s) +} + +func Convert_v1beta1_ProjectSpec_To_garden_ProjectSpec(in *ProjectSpec, out *garden.ProjectSpec, s conversion.Scope) error { + if err := autoConvert_v1beta1_ProjectSpec_To_garden_ProjectSpec(in, out, s); err != nil { + return err + } + + for _, member := range in.Members { + out.ProjectMembers = append(out.ProjectMembers, garden.ProjectMember{ + Subject: member, + Role: garden.ProjectMemberAdmin, + }) + } + + for _, viewer := range in.Viewers { + out.ProjectMembers = append(out.ProjectMembers, garden.ProjectMember{ + Subject: viewer, + Role: garden.ProjectMemberViewer, + }) + } + + return nil +} + +func Convert_garden_ProjectSpec_To_v1beta1_ProjectSpec(in *garden.ProjectSpec, out *ProjectSpec, s conversion.Scope) error { + if err := autoConvert_garden_ProjectSpec_To_v1beta1_ProjectSpec(in, out, s); err != nil { + return err + } + + for _, member := range in.ProjectMembers { + if member.Role == garden.ProjectMemberAdmin { + out.Members = append(out.Members, member.Subject) + } + if member.Role == garden.ProjectMemberViewer { + out.Viewers = append(out.Viewers, member.Subject) + } + } + + return nil +} + +func Convert_v1beta1_QuotaSpec_To_garden_QuotaSpec(in *QuotaSpec, out *garden.QuotaSpec, s conversion.Scope) error { + if err := autoConvert_v1beta1_QuotaSpec_To_garden_QuotaSpec(in, out, s); err != nil { + return err + } + + switch in.Scope { + case QuotaScopeProject: + out.Scope = corev1.ObjectReference{ + APIVersion: "core.gardener.cloud/v1beta1", + Kind: "Project", + } + case QuotaScopeSecret: + out.Scope = corev1.ObjectReference{ + APIVersion: "v1", + Kind: "Secret", + } + } + + return nil +} + +func Convert_garden_QuotaSpec_To_v1beta1_QuotaSpec(in *garden.QuotaSpec, out *QuotaSpec, s conversion.Scope) error { + if err := autoConvert_garden_QuotaSpec_To_v1beta1_QuotaSpec(in, out, s); err != nil { + return err + } + + if gvk := schema.FromAPIVersionAndKind(in.Scope.APIVersion, in.Scope.Kind); gvk.Group == "core.gardener.cloud" && gvk.Kind == "Project" { + out.Scope = QuotaScopeProject + } + if in.Scope.APIVersion == "v1" && in.Scope.Kind == "Secret" { + out.Scope = QuotaScopeSecret + } + + return nil +} + +func Convert_v1beta1_CloudProfile_To_garden_CloudProfile(in *CloudProfile, out *garden.CloudProfile, s conversion.Scope) error { + if err := autoConvert_v1beta1_CloudProfile_To_garden_CloudProfile(in, out, s); err != nil { + return err + } + + if out.Annotations == nil { + out.Annotations = make(map[string]string) + } + + switch { + case in.Spec.AWS != nil: + out.Spec.Type = "aws" + + versions := map[string]struct{}{} + for _, version := range in.Spec.AWS.Constraints.Kubernetes.OfferedVersions { + versions[version.Version] = struct{}{} + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + for _, version := range in.Spec.AWS.Constraints.Kubernetes.Versions { + if _, ok := versions[version]; !ok { + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version, + }) + } + } + + for _, image := range in.Spec.AWS.Constraints.MachineImages { + i := garden.CloudProfileMachineImage{Name: image.Name} + if len(image.Version) > 0 { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: image.Version, + }) + } + for _, version := range image.Versions { + if version.Version != image.Version { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + out.Spec.MachineImages = append(out.Spec.MachineImages, i) + } + + for _, machineType := range in.Spec.AWS.Constraints.MachineTypes { + var o garden.MachineType + if err := autoConvert_v1beta1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.MachineTypes = append(out.Spec.MachineTypes, o) + } + + for _, volumeType := range in.Spec.AWS.Constraints.VolumeTypes { + var o garden.VolumeType + if err := autoConvert_v1beta1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.VolumeTypes = append(out.Spec.VolumeTypes, o) + } + + for _, zone := range in.Spec.AWS.Constraints.Zones { + r := garden.Region{Name: zone.Region} + for _, name := range zone.Names { + r.Zones = append(r.Zones, garden.AvailabilityZone{ + Name: name, + }) + } + out.Spec.Regions = append(out.Spec.Regions, r) + } + + case in.Spec.Azure != nil: + out.Spec.Type = "azure" + + versions := map[string]struct{}{} + for _, version := range in.Spec.Azure.Constraints.Kubernetes.OfferedVersions { + versions[version.Version] = struct{}{} + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + for _, version := range in.Spec.Azure.Constraints.Kubernetes.Versions { + if _, ok := versions[version]; !ok { + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version, + }) + } + } + + for _, image := range in.Spec.Azure.Constraints.MachineImages { + i := garden.CloudProfileMachineImage{Name: image.Name} + if len(image.Version) > 0 { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: image.Version, + }) + } + for _, version := range image.Versions { + if version.Version != image.Version { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + out.Spec.MachineImages = append(out.Spec.MachineImages, i) + } + + for _, machineType := range in.Spec.Azure.Constraints.MachineTypes { + var o garden.MachineType + if err := autoConvert_v1beta1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.MachineTypes = append(out.Spec.MachineTypes, o) + } + + for _, volumeType := range in.Spec.Azure.Constraints.VolumeTypes { + var o garden.VolumeType + if err := autoConvert_v1beta1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.VolumeTypes = append(out.Spec.VolumeTypes, o) + } + + for _, zone := range in.Spec.Azure.Constraints.Zones { + r := garden.Region{Name: zone.Region} + for _, name := range zone.Names { + r.Zones = append(r.Zones, garden.AvailabilityZone{ + Name: name, + }) + } + out.Spec.Regions = append(out.Spec.Regions, r) + } + + if regionsJSON, ok := in.Annotations[garden.MigrationCloudProfileRegions]; ok { + var regions []garden.Region + if err := json.Unmarshal([]byte(regionsJSON), ®ions); err != nil { + return err + } + out.Spec.Regions = regions + } + + providerConfig := &garden.ProviderConfig{} + if pc, ok := in.Annotations[garden.MigrationCloudProfileProviderConfig]; ok { + if err := json.Unmarshal([]byte(pc), providerConfig); err != nil { + return err + } + } + cloudProfileConfig := &azurev1alpha1.CloudProfileConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: azurev1alpha1.SchemeGroupVersion.String(), + Kind: "CloudProfileConfig", + }, + } + if providerConfig != nil { + extensionsScheme := runtime.NewScheme() + if err := azureinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + switch { + case providerConfig.Object != nil: + var ok bool + cloudProfileConfig = providerConfig.Object.(*azurev1alpha1.CloudProfileConfig) + if !ok { + klog.Errorf("Cannot cast providerConfig of core.gardener.cloud.CloudProfile %s", in.Name) + } + case providerConfig.Raw != nil: + if _, _, err := decoder.Decode(providerConfig.Raw, nil, cloudProfileConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode providerConfig of core.gardener.cloud.CloudProfile %s", in.Name) + } + } + } + if len(cloudProfileConfig.MachineImages) == 0 { + cloudProfileConfig.MachineImages = []azurev1alpha1.MachineImages{} + } + cloudProfileConfig.CountFaultDomains = nil + for _, c := range in.Spec.Azure.CountFaultDomains { + if !azureV1alpha1DomainCountsHaveRegion(cloudProfileConfig.CountFaultDomains, c.Region) { + cloudProfileConfig.CountFaultDomains = append(cloudProfileConfig.CountFaultDomains, azurev1alpha1.DomainCount{ + Region: c.Region, + Count: c.Count, + }) + } + } + cloudProfileConfig.CountUpdateDomains = nil + for _, c := range in.Spec.Azure.CountUpdateDomains { + if !azureV1alpha1DomainCountsHaveRegion(cloudProfileConfig.CountUpdateDomains, c.Region) { + cloudProfileConfig.CountUpdateDomains = append(cloudProfileConfig.CountUpdateDomains, azurev1alpha1.DomainCount{ + Region: c.Region, + Count: c.Count, + }) + } + } + + data, err := json.Marshal(cloudProfileConfig) + if err != nil { + return err + } + out.Spec.ProviderConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + case in.Spec.GCP != nil: + out.Spec.Type = "gcp" + + versions := map[string]struct{}{} + for _, version := range in.Spec.GCP.Constraints.Kubernetes.OfferedVersions { + versions[version.Version] = struct{}{} + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + for _, version := range in.Spec.GCP.Constraints.Kubernetes.Versions { + if _, ok := versions[version]; !ok { + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version, + }) + } + } + + for _, image := range in.Spec.GCP.Constraints.MachineImages { + i := garden.CloudProfileMachineImage{Name: image.Name} + if len(image.Version) > 0 { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: image.Version, + }) + } + for _, version := range image.Versions { + if version.Version != image.Version { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + out.Spec.MachineImages = append(out.Spec.MachineImages, i) + } + + for _, machineType := range in.Spec.GCP.Constraints.MachineTypes { + var o garden.MachineType + if err := autoConvert_v1beta1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.MachineTypes = append(out.Spec.MachineTypes, o) + } + + for _, volumeType := range in.Spec.GCP.Constraints.VolumeTypes { + var o garden.VolumeType + if err := autoConvert_v1beta1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.VolumeTypes = append(out.Spec.VolumeTypes, o) + } + + for _, zone := range in.Spec.GCP.Constraints.Zones { + r := garden.Region{Name: zone.Region} + for _, name := range zone.Names { + r.Zones = append(r.Zones, garden.AvailabilityZone{ + Name: name, + }) + } + out.Spec.Regions = append(out.Spec.Regions, r) + } + + case in.Spec.OpenStack != nil: + out.Spec.Type = "openstack" + + versions := map[string]struct{}{} + for _, version := range in.Spec.OpenStack.Constraints.Kubernetes.OfferedVersions { + versions[version.Version] = struct{}{} + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + for _, version := range in.Spec.OpenStack.Constraints.Kubernetes.Versions { + if _, ok := versions[version]; !ok { + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version, + }) + } + } + + for _, image := range in.Spec.OpenStack.Constraints.MachineImages { + i := garden.CloudProfileMachineImage{Name: image.Name} + if len(image.Version) > 0 { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: image.Version, + }) + } + for _, version := range image.Versions { + if version.Version != image.Version { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + out.Spec.MachineImages = append(out.Spec.MachineImages, i) + } + + if volumeTypesJSON, ok := in.Annotations[garden.MigrationCloudProfileVolumeTypes]; ok { + var volumeTypes []garden.VolumeType + if err := json.Unmarshal([]byte(volumeTypesJSON), &volumeTypes); err != nil { + return err + } + out.Spec.VolumeTypes = volumeTypes + } else { + out.Spec.VolumeTypes = nil + } + + for _, machineType := range in.Spec.OpenStack.Constraints.MachineTypes { + var o garden.MachineType + if err := autoConvert_v1beta1_MachineType_To_garden_MachineType(&machineType.MachineType, &o, s); err != nil { + return err + } + if o.Storage == nil { + o.Storage = &garden.MachineTypeStorage{} + } + o.Storage.Size = machineType.VolumeSize + o.Storage.Type = machineType.VolumeType + out.Spec.MachineTypes = append(out.Spec.MachineTypes, o) + } + + for _, zone := range in.Spec.OpenStack.Constraints.Zones { + r := garden.Region{Name: zone.Region} + for _, name := range zone.Names { + r.Zones = append(r.Zones, garden.AvailabilityZone{ + Name: name, + }) + } + out.Spec.Regions = append(out.Spec.Regions, r) + } + + providerConfig := &garden.ProviderConfig{} + if pc, ok := in.Annotations[garden.MigrationCloudProfileProviderConfig]; ok { + if err := json.Unmarshal([]byte(pc), providerConfig); err != nil { + return err + } + } + cloudProfileConfig := &openstackv1alpha1.CloudProfileConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: openstackv1alpha1.SchemeGroupVersion.String(), + Kind: "CloudProfileConfig", + }, + } + if providerConfig != nil { + extensionsScheme := runtime.NewScheme() + if err := openstackinstall.AddToScheme(extensionsScheme); err != nil { + return err + } + decoder := serializer.NewCodecFactory(extensionsScheme).UniversalDecoder() + switch { + case providerConfig.Object != nil: + var ok bool + cloudProfileConfig = providerConfig.Object.(*openstackv1alpha1.CloudProfileConfig) + if !ok { + klog.Errorf("Cannot cast providerConfig of core.gardener.cloud.CloudProfile %s", in.Name) + } + case providerConfig.Raw != nil: + if _, _, err := decoder.Decode(providerConfig.Raw, nil, cloudProfileConfig); err != nil { + // If an error occurs then the provider config information contains invalid syntax, and in this + // case we don't want to fail here. We rather don't try to migrate. + klog.Errorf("Cannot decode providerConfig of core.gardener.cloud.CloudProfile %s", in.Name) + } + } + } + if len(cloudProfileConfig.MachineImages) == 0 { + cloudProfileConfig.MachineImages = []openstackv1alpha1.MachineImages{} + } + cloudProfileConfig.Constraints.LoadBalancerProviders = nil + for _, p := range in.Spec.OpenStack.Constraints.LoadBalancerProviders { + if !openstackV1alpha1LoadBalancerProvidersHaveProvider(cloudProfileConfig.Constraints.LoadBalancerProviders, p.Name) { + cloudProfileConfig.Constraints.LoadBalancerProviders = append(cloudProfileConfig.Constraints.LoadBalancerProviders, openstackv1alpha1.LoadBalancerProvider{ + Name: p.Name, + }) + } + } + cloudProfileConfig.Constraints.FloatingPools = nil + for _, p := range in.Spec.OpenStack.Constraints.FloatingPools { + if !openstackV1alpha1FloatingPoolsHavePool(cloudProfileConfig.Constraints.FloatingPools, p.Name) { + var loadBalancerClasses []openstackv1alpha1.LoadBalancerClass + for _, c := range p.LoadBalancerClasses { + loadBalancerClasses = append(loadBalancerClasses, openstackv1alpha1.LoadBalancerClass{ + Name: c.Name, + FloatingSubnetID: c.FloatingSubnetID, + FloatingNetworkID: c.FloatingNetworkID, + SubnetID: c.SubnetID, + }) + } + cloudProfileConfig.Constraints.FloatingPools = append(cloudProfileConfig.Constraints.FloatingPools, openstackv1alpha1.FloatingPool{ + Name: p.Name, + LoadBalancerClasses: loadBalancerClasses, + }) + } + } + cloudProfileConfig.DNSServers = in.Spec.OpenStack.DNSServers + cloudProfileConfig.DHCPDomain = in.Spec.OpenStack.DHCPDomain + cloudProfileConfig.KeyStoneURL = in.Spec.OpenStack.KeyStoneURL + cloudProfileConfig.RequestTimeout = in.Spec.OpenStack.RequestTimeout + + data, err := json.Marshal(cloudProfileConfig) + if err != nil { + return err + } + out.Spec.ProviderConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + case in.Spec.Alicloud != nil: + out.Spec.Type = "alicloud" + + versions := map[string]struct{}{} + for _, version := range in.Spec.Alicloud.Constraints.Kubernetes.OfferedVersions { + versions[version.Version] = struct{}{} + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + for _, version := range in.Spec.Alicloud.Constraints.Kubernetes.Versions { + if _, ok := versions[version]; !ok { + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version, + }) + } + } + + for _, image := range in.Spec.Alicloud.Constraints.MachineImages { + i := garden.CloudProfileMachineImage{Name: image.Name} + if len(image.Version) > 0 { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: image.Version, + }) + } + for _, version := range image.Versions { + if version.Version != image.Version { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + out.Spec.MachineImages = append(out.Spec.MachineImages, i) + } + + availableMachineTypesPerZone := map[string][]string{} + for _, machineType := range in.Spec.Alicloud.Constraints.MachineTypes { + var o garden.AlicloudMachineType + if err := autoConvert_v1beta1_AlicloudMachineType_To_garden_AlicloudMachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.MachineTypes = append(out.Spec.MachineTypes, o.MachineType) + for _, zone := range machineType.Zones { + availableMachineTypesPerZone[zone] = append(availableMachineTypesPerZone[zone], machineType.Name) + } + } + + availableVolumeTypesPerZone := map[string][]string{} + for _, volumeType := range in.Spec.Alicloud.Constraints.VolumeTypes { + var o garden.AlicloudVolumeType + if err := autoConvert_v1beta1_AlicloudVolumeType_To_garden_AlicloudVolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.VolumeTypes = append(out.Spec.VolumeTypes, o.VolumeType) + for _, zone := range volumeType.Zones { + availableVolumeTypesPerZone[zone] = append(availableVolumeTypesPerZone[zone], volumeType.Name) + } + } + + for _, zone := range in.Spec.Alicloud.Constraints.Zones { + r := garden.Region{Name: zone.Region} + for _, name := range zone.Names { + var unavailableMachineTypes []string + for _, machineType := range in.Spec.Alicloud.Constraints.MachineTypes { + if !zoneHasAlicloudType(availableMachineTypesPerZone, name, machineType.Name) { + unavailableMachineTypes = append(unavailableMachineTypes, machineType.Name) + } + } + var unavailableVolumeTypes []string + for _, volumeType := range in.Spec.Alicloud.Constraints.VolumeTypes { + if !zoneHasAlicloudType(availableVolumeTypesPerZone, name, volumeType.Name) { + unavailableVolumeTypes = append(unavailableVolumeTypes, volumeType.Name) + } + } + r.Zones = append(r.Zones, garden.AvailabilityZone{ + Name: name, + UnavailableMachineTypes: unavailableMachineTypes, + UnavailableVolumeTypes: unavailableVolumeTypes, + }) + } + out.Spec.Regions = append(out.Spec.Regions, r) + } + + case in.Spec.Packet != nil: + out.Spec.Type = "packet" + + versions := map[string]struct{}{} + for _, version := range in.Spec.Packet.Constraints.Kubernetes.OfferedVersions { + versions[version.Version] = struct{}{} + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + for _, version := range in.Spec.Packet.Constraints.Kubernetes.Versions { + if _, ok := versions[version]; !ok { + out.Spec.Kubernetes.Versions = append(out.Spec.Kubernetes.Versions, garden.ExpirableVersion{ + Version: version, + }) + } + } + + for _, image := range in.Spec.Packet.Constraints.MachineImages { + i := garden.CloudProfileMachineImage{Name: image.Name} + if len(image.Version) > 0 { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: image.Version, + }) + } + for _, version := range image.Versions { + if version.Version != image.Version { + i.Versions = append(i.Versions, garden.ExpirableVersion{ + Version: version.Version, + ExpirationDate: version.ExpirationDate, + }) + } + } + out.Spec.MachineImages = append(out.Spec.MachineImages, i) + } + + for _, machineType := range in.Spec.Packet.Constraints.MachineTypes { + var o garden.MachineType + if err := autoConvert_v1beta1_MachineType_To_garden_MachineType(&machineType, &o, s); err != nil { + return err + } + out.Spec.MachineTypes = append(out.Spec.MachineTypes, o) + } + + for _, volumeType := range in.Spec.Packet.Constraints.VolumeTypes { + var o garden.VolumeType + if err := autoConvert_v1beta1_VolumeType_To_garden_VolumeType(&volumeType, &o, s); err != nil { + return err + } + out.Spec.VolumeTypes = append(out.Spec.VolumeTypes, o) + } + + for _, zone := range in.Spec.Packet.Constraints.Zones { + r := garden.Region{Name: zone.Region} + for _, name := range zone.Names { + r.Zones = append(r.Zones, garden.AvailabilityZone{ + Name: name, + }) + } + out.Spec.Regions = append(out.Spec.Regions, r) + } + + default: + if providerType, ok := in.Annotations[garden.MigrationCloudProfileType]; ok { + out.Spec.Type = providerType + } else { + out.Spec.Type = "" + } + + if kubernetesJSON, ok := in.Annotations[garden.MigrationCloudProfileKubernetes]; ok { + var kubernetes garden.KubernetesSettings + if err := json.Unmarshal([]byte(kubernetesJSON), &kubernetes); err != nil { + return err + } + out.Spec.Kubernetes = kubernetes + } else { + out.Spec.Kubernetes = garden.KubernetesSettings{} + } + + if machineTypesJSON, ok := in.Annotations[garden.MigrationCloudProfileMachineTypes]; ok { + var machineTypes []garden.MachineType + if err := json.Unmarshal([]byte(machineTypesJSON), &machineTypes); err != nil { + return err + } + out.Spec.MachineTypes = machineTypes + } else { + out.Spec.MachineTypes = nil + } + + if machineImagesJSON, ok := in.Annotations[garden.MigrationCloudProfileMachineImages]; ok { + var machineImages []garden.CloudProfileMachineImage + if err := json.Unmarshal([]byte(machineImagesJSON), &machineImages); err != nil { + return err + } + out.Spec.MachineImages = machineImages + } else { + out.Spec.MachineImages = nil + } + + if regionsJSON, ok := in.Annotations[garden.MigrationCloudProfileRegions]; ok { + var regions []garden.Region + if err := json.Unmarshal([]byte(regionsJSON), ®ions); err != nil { + return err + } + out.Spec.Regions = regions + } else { + out.Spec.Regions = nil + } + + if volumeTypesJSON, ok := in.Annotations[garden.MigrationCloudProfileVolumeTypes]; ok { + var volumeTypes []garden.VolumeType + if err := json.Unmarshal([]byte(volumeTypesJSON), &volumeTypes); err != nil { + return err + } + out.Spec.VolumeTypes = volumeTypes + } else { + out.Spec.VolumeTypes = nil + } + } + + if out.Spec.Regions == nil { + out.Spec.Regions = []garden.Region{} + } + + if seedSelectorJSON, ok := in.Annotations[garden.MigrationCloudProfileSeedSelector]; ok { + var seedSelector metav1.LabelSelector + if err := json.Unmarshal([]byte(seedSelectorJSON), &seedSelector); err != nil { + return err + } + out.Spec.SeedSelector = &seedSelector + } else { + out.Spec.SeedSelector = nil + } + + if out.Spec.ProviderConfig == nil { + if providerConfigJSON, ok := in.Annotations[garden.MigrationCloudProfileProviderConfig]; ok { + providerConfig := &garden.ProviderConfig{} + if err := json.Unmarshal([]byte(providerConfigJSON), providerConfig); err != nil { + return err + } + out.Spec.ProviderConfig = providerConfig + } + } + + return nil +} + +func Convert_garden_CloudProfile_To_v1beta1_CloudProfile(in *garden.CloudProfile, out *CloudProfile, s conversion.Scope) error { + if err := autoConvert_garden_CloudProfile_To_v1beta1_CloudProfile(in, out, s); err != nil { + return err + } + + if out.Annotations == nil { + out.Annotations = make(map[string]string) + } + + switch in.Spec.Type { + case "aws": + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + if out.Spec.AWS == nil { + out.Spec.AWS = &AWSProfile{} + } + out.Spec.AWS.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + case "azure": + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + if out.Spec.Azure == nil { + out.Spec.Azure = &AzureProfile{} + } + out.Spec.Azure.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + case "gcp": + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + if out.Spec.GCP == nil { + out.Spec.GCP = &GCPProfile{} + } + out.Spec.GCP.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + case "openstack": + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + if out.Spec.OpenStack == nil { + out.Spec.OpenStack = &OpenStackProfile{} + } + out.Spec.OpenStack.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + if len(in.Spec.VolumeTypes) > 0 { + data, err := json.Marshal(in.Spec.VolumeTypes) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileVolumeTypes] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileVolumeTypes) + } + + case "alicloud": + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + if out.Spec.Alicloud == nil { + out.Spec.Alicloud = &AlicloudProfile{} + } + out.Spec.Alicloud.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + case "packet": + if dnsProviders, ok := in.Annotations[garden.MigrationCloudProfileDNSProviders]; ok { + if out.Spec.Packet == nil { + out.Spec.Packet = &PacketProfile{} + } + out.Spec.Packet.Constraints.DNSProviders = stringSliceToDNSProviderConstraint(strings.Split(dnsProviders, ",")) + } + + default: + out.Annotations[garden.MigrationCloudProfileType] = in.Spec.Type + + data, err := json.Marshal(in.Spec.Kubernetes) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileKubernetes] = string(data) + + if len(in.Spec.MachineImages) > 0 { + data, err := json.Marshal(in.Spec.MachineImages) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileMachineImages] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileMachineImages) + } + + if len(in.Spec.MachineTypes) > 0 { + data, err := json.Marshal(in.Spec.MachineTypes) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileMachineTypes] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileMachineTypes) + } + + if len(in.Spec.Regions) > 0 { + data, err := json.Marshal(in.Spec.Regions) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileRegions] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileRegions) + } + + if len(in.Spec.VolumeTypes) > 0 { + data, err := json.Marshal(in.Spec.VolumeTypes) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileVolumeTypes] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileVolumeTypes) + } + } + + if in.Spec.ProviderConfig != nil { + data, err := json.Marshal(in.Spec.ProviderConfig) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileProviderConfig] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileProviderConfig) + } + + if in.Spec.SeedSelector != nil { + data, err := json.Marshal(in.Spec.SeedSelector) + if err != nil { + return err + } + out.Annotations[garden.MigrationCloudProfileSeedSelector] = string(data) + } else { + delete(out.Annotations, garden.MigrationCloudProfileSeedSelector) + } + + return nil +} + +func Convert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(in *garden.CloudProfileSpec, out *CloudProfileSpec, s conversion.Scope) error { + return autoConvert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(in, out, s) +} + +func Convert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(in *CloudProfileSpec, out *garden.CloudProfileSpec, s conversion.Scope) error { + return autoConvert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(in, out, s) +} + +func stringSliceToDNSProviderConstraint(slice []string) []DNSProviderConstraint { + dnsConstraints := make([]DNSProviderConstraint, 0, len(slice)) + for _, s := range slice { + dnsConstraints = append(dnsConstraints, DNSProviderConstraint{s}) + } + return dnsConstraints +} + +func zoneHasAlicloudType(typesPerZone map[string][]string, name, typeName string) bool { + types, ok := typesPerZone[name] + if !ok { + return false + } + + for _, t := range types { + if t == typeName { + return true + } + } + return false +} + +func azureV1alpha1DomainCountsHaveRegion(domainCount []azurev1alpha1.DomainCount, regionName string) bool { + for _, d := range domainCount { + if d.Region == regionName { + return true + } + } + return false +} + +func openstackV1alpha1LoadBalancerProvidersHaveProvider(providers []openstackv1alpha1.LoadBalancerProvider, providerName string) bool { + for _, p := range providers { + if p.Name == providerName { + return true + } + } + return false +} + +func openstackV1alpha1FloatingPoolsHavePool(pools []openstackv1alpha1.FloatingPool, poolName string) bool { + for _, p := range pools { + if p.Name == poolName { + return true + } + } + return false +} + +func volumeTypesHaveName(volumeTypes []garden.VolumeType, name string) bool { + for _, v := range volumeTypes { + if v.Name == name { + return true + } + } + return false +} + +func Convert_v1beta1_Shoot_To_garden_Shoot(in *Shoot, out *garden.Shoot, s conversion.Scope) error { + if err := autoConvert_v1beta1_Shoot_To_garden_Shoot(in, out, s); err != nil { + return err + } + + var networking garden.Networking + if in.Spec.Networking != nil { + if err := Convert_v1beta1_Networking_To_garden_Networking(in.Spec.Networking, &networking, s); err != nil { + return err + } + } + out.Spec.Networking = networking + + if in.Spec.DNS != nil { + var dns garden.DNS + if err := autoConvert_v1beta1_DNS_To_garden_DNS(in.Spec.DNS, &dns, s); err != nil { + return err + } + + var provider garden.DNSProvider + if in.Spec.DNS != nil && (in.Spec.DNS.ExcludeDomains != nil || in.Spec.DNS.ExcludeZones != nil || in.Spec.DNS.IncludeDomains != nil || in.Spec.DNS.IncludeZones != nil || in.Spec.DNS.Provider != nil || in.Spec.DNS.SecretName != nil) { + provider.SecretName = in.Spec.DNS.SecretName + provider.Type = in.Spec.DNS.Provider + + var domains *garden.DNSIncludeExclude + if in.Spec.DNS.IncludeDomains != nil || in.Spec.DNS.ExcludeDomains != nil { + domains = &garden.DNSIncludeExclude{} + for _, val := range in.Spec.DNS.IncludeDomains { + domains.Include = append(domains.Include, val) + } + for _, val := range in.Spec.DNS.ExcludeDomains { + domains.Exclude = append(domains.Exclude, val) + } + } + provider.Domains = domains + + var zones *garden.DNSIncludeExclude + if in.Spec.DNS.IncludeZones != nil || in.Spec.DNS.ExcludeZones != nil { + zones = &garden.DNSIncludeExclude{} + for _, val := range in.Spec.DNS.IncludeZones { + zones.Include = append(zones.Include, val) + } + for _, val := range in.Spec.DNS.ExcludeZones { + zones.Exclude = append(zones.Exclude, val) + } + } + provider.Zones = zones + + dns.Providers = append(dns.Providers, provider) + } + + if additionalProviders, ok := in.Annotations[garden.MigrationShootDNSProviders]; ok { + var providers []garden.DNSProvider + if err := json.Unmarshal([]byte(additionalProviders), &providers); err != nil { + return err + } + dns.Providers = append(dns.Providers, providers...) + } + out.Spec.DNS = &dns + } + + var workerMigrationInfo garden.WorkerMigrationInfo + if data, ok := in.Annotations[garden.MigrationShootWorkers]; ok { + if err := json.Unmarshal([]byte(data), &workerMigrationInfo); err != nil { + return err + } + } + + switch { + case in.Spec.Cloud.AWS != nil: + out.Spec.Provider.Type = "aws" + + infrastructureConfig := &awsv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: awsv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + + if len(in.Spec.Cloud.AWS.Networks.Internal) != len(in.Spec.Cloud.AWS.Zones) { + return fmt.Errorf("aws internal networks must have same number of entries like zones") + } + if len(in.Spec.Cloud.AWS.Networks.Public) != len(in.Spec.Cloud.AWS.Zones) { + return fmt.Errorf("aws public networks must have same number of entries like zones") + } + if len(in.Spec.Cloud.AWS.Networks.Workers) != len(in.Spec.Cloud.AWS.Zones) { + return fmt.Errorf("aws workers networks must have same number of entries like zones") + } + + zones := make([]awsv1alpha1.Zone, 0, len(in.Spec.Cloud.AWS.Zones)) + for i, zone := range in.Spec.Cloud.AWS.Zones { + zones = append(zones, awsv1alpha1.Zone{ + Name: zone, + Internal: in.Spec.Cloud.AWS.Networks.Internal[i], + Public: in.Spec.Cloud.AWS.Networks.Public[i], + Workers: in.Spec.Cloud.AWS.Networks.Workers[i], + }) + } + + var vpcCIDR *string + if c := in.Spec.Cloud.AWS.Networks.VPC.CIDR; c != nil { + cidr := *c + vpcCIDR = &cidr + } + + infrastructureConfig.Networks = awsv1alpha1.Networks{ + VPC: awsv1alpha1.VPC{ + ID: in.Spec.Cloud.AWS.Networks.VPC.ID, + CIDR: vpcCIDR, + }, + Zones: zones, + } + + data, err := json.Marshal(infrastructureConfig) + if err != nil { + return err + } + out.Spec.Provider.InfrastructureConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + controlPlaneConfig := &awsv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: awsv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + + var cloudControllerManager *awsv1alpha1.CloudControllerManagerConfig + if in.Spec.Kubernetes.CloudControllerManager != nil { + cloudControllerManager = &awsv1alpha1.CloudControllerManagerConfig{ + FeatureGates: in.Spec.Kubernetes.CloudControllerManager.FeatureGates, + } + } + controlPlaneConfig.CloudControllerManager = cloudControllerManager + + data, err = json.Marshal(controlPlaneConfig) + if err != nil { + return err + } + out.Spec.Provider.ControlPlaneConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + var workers []garden.Worker + out.Spec.Provider.Workers = nil + + for _, worker := range in.Spec.Cloud.AWS.Workers { + volumeType := worker.VolumeType + w := garden.Worker{ + Annotations: worker.Annotations, + CABundle: worker.CABundle, + Labels: worker.Labels, + Name: worker.Name, + Machine: garden.Machine{ + Type: worker.MachineType, + }, + Maximum: worker.AutoScalerMax, + Minimum: worker.AutoScalerMin, + MaxSurge: worker.MaxSurge, + MaxUnavailable: worker.MaxUnavailable, + Taints: worker.Taints, + Volume: &garden.Volume{ + Size: worker.VolumeSize, + Type: &volumeType, + }, + } + + var machineImage *garden.ShootMachineImage + if worker.MachineImage != nil { + machineImage = &garden.ShootMachineImage{} + if err := autoConvert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(worker.MachineImage, machineImage, s); err != nil { + return err + } + } + w.Machine.Image = machineImage + + if worker.Kubelet != nil { + kubeletConfig := &garden.KubeletConfig{} + if err := autoConvert_v1beta1_KubeletConfig_To_garden_KubeletConfig(worker.Kubelet, kubeletConfig, s); err != nil { + return err + } + w.Kubernetes = &garden.WorkerKubernetes{Kubelet: kubeletConfig} + } + + if data, ok := workerMigrationInfo[worker.Name]; ok { + w.ProviderConfig = data.ProviderConfig + w.Zones = data.Zones + } + + if w.Zones == nil { + w.Zones = in.Spec.Cloud.AWS.Zones + } + + out.Spec.Provider.Workers = append(out.Spec.Provider.Workers, w) + workers = append(workers, w) + } + out.Spec.Cloud.AWS.Workers = workers + + if in.Spec.Cloud.AWS.Networks.Nodes != nil { + out.Spec.Networking.Nodes = *in.Spec.Cloud.AWS.Networks.Nodes + } + if in.Spec.Cloud.AWS.Networks.Pods != nil { + out.Spec.Networking.Pods = in.Spec.Cloud.AWS.Networks.Pods + } + if in.Spec.Cloud.AWS.Networks.Services != nil { + out.Spec.Networking.Services = in.Spec.Cloud.AWS.Networks.Services + } + + case in.Spec.Cloud.Azure != nil: + out.Spec.Provider.Type = "azure" + + var zoned bool + if len(in.Spec.Cloud.Azure.Zones) > 0 { + zoned = true + } + + infrastructureConfig := &azurev1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: azurev1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + Zoned: zoned, + } + + var resourceGroup *azurev1alpha1.ResourceGroup + if in.Spec.Cloud.Azure.ResourceGroup != nil { + resourceGroup = &azurev1alpha1.ResourceGroup{ + Name: in.Spec.Cloud.Azure.ResourceGroup.Name, + } + } + + var vnet azurev1alpha1.VNet + if in.Spec.Cloud.Azure.Networks.VNet.CIDR != nil { + cidr := string(*in.Spec.Cloud.Azure.Networks.VNet.CIDR) + vnet.CIDR = &cidr + } + if in.Spec.Cloud.Azure.Networks.VNet.Name != nil { + vnet.Name = in.Spec.Cloud.Azure.Networks.VNet.Name + } + if in.Spec.Cloud.Azure.Networks.VNet.ResourceGroup != nil { + vnet.ResourceGroup = in.Spec.Cloud.Azure.Networks.VNet.ResourceGroup + } + + infrastructureConfig.ResourceGroup = resourceGroup + infrastructureConfig.Networks = azurev1alpha1.NetworkConfig{ + VNet: vnet, + Workers: in.Spec.Cloud.Azure.Networks.Workers, + ServiceEndpoints: in.Spec.Cloud.Azure.Networks.ServiceEndpoints, + } + + data, err := json.Marshal(infrastructureConfig) + if err != nil { + return err + } + out.Spec.Provider.InfrastructureConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + controlPlaneConfig := &azurev1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: azurev1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + + var cloudControllerManager *azurev1alpha1.CloudControllerManagerConfig + if in.Spec.Kubernetes.CloudControllerManager != nil { + cloudControllerManager = &azurev1alpha1.CloudControllerManagerConfig{ + FeatureGates: in.Spec.Kubernetes.CloudControllerManager.FeatureGates, + } + } + controlPlaneConfig.CloudControllerManager = cloudControllerManager + + data, err = json.Marshal(controlPlaneConfig) + if err != nil { + return err + } + out.Spec.Provider.ControlPlaneConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + var workers []garden.Worker + out.Spec.Provider.Workers = nil + + for _, worker := range in.Spec.Cloud.Azure.Workers { + volumeType := worker.VolumeType + w := garden.Worker{ + Annotations: worker.Annotations, + CABundle: worker.CABundle, + Labels: worker.Labels, + Name: worker.Name, + Machine: garden.Machine{ + Type: worker.MachineType, + }, + Maximum: worker.AutoScalerMax, + Minimum: worker.AutoScalerMin, + MaxSurge: worker.MaxSurge, + MaxUnavailable: worker.MaxUnavailable, + Taints: worker.Taints, + Volume: &garden.Volume{ + Size: worker.VolumeSize, + Type: &volumeType, + }, + } + + var machineImage *garden.ShootMachineImage + if worker.MachineImage != nil { + machineImage = &garden.ShootMachineImage{} + if err := autoConvert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(worker.MachineImage, machineImage, s); err != nil { + return err + } + } + w.Machine.Image = machineImage + + if worker.Kubelet != nil { + kubeletConfig := &garden.KubeletConfig{} + if err := autoConvert_v1beta1_KubeletConfig_To_garden_KubeletConfig(worker.Kubelet, kubeletConfig, s); err != nil { + return err + } + w.Kubernetes = &garden.WorkerKubernetes{Kubelet: kubeletConfig} + } + + if data, ok := workerMigrationInfo[worker.Name]; ok { + w.ProviderConfig = data.ProviderConfig + w.Zones = data.Zones + } + if w.Zones == nil && zoned { + w.Zones = in.Spec.Cloud.Azure.Zones + } + + out.Spec.Provider.Workers = append(out.Spec.Provider.Workers, w) + workers = append(workers, w) + } + out.Spec.Cloud.Azure.Workers = workers + + if in.Spec.Cloud.Azure.Networks.Nodes != nil { + out.Spec.Networking.Nodes = *in.Spec.Cloud.Azure.Networks.Nodes + } + if in.Spec.Cloud.Azure.Networks.Pods != nil { + out.Spec.Networking.Pods = in.Spec.Cloud.Azure.Networks.Pods + } + if in.Spec.Cloud.Azure.Networks.Services != nil { + out.Spec.Networking.Services = in.Spec.Cloud.Azure.Networks.Services + } + + case in.Spec.Cloud.GCP != nil: + out.Spec.Provider.Type = "gcp" + + infrastructureConfig := &gcpv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: gcpv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + + if len(in.Spec.Cloud.GCP.Networks.Workers) != 1 { + return fmt.Errorf("gcp worker networks must only have exactly one entry") + } + if len(in.Spec.Cloud.GCP.Zones) == 0 { + return fmt.Errorf("gcp zones must have at least one entry") + } + + var vpc *gcpv1alpha1.VPC + if in.Spec.Cloud.GCP.Networks.VPC != nil { + vpc = &gcpv1alpha1.VPC{ + Name: in.Spec.Cloud.GCP.Networks.VPC.Name, + } + } + + var internalCIDR *string + if c := in.Spec.Cloud.GCP.Networks.Internal; c != nil { + cidr := *c + internalCIDR = &cidr + } + + infrastructureConfig.Networks = gcpv1alpha1.NetworkConfig{ + VPC: vpc, + Worker: in.Spec.Cloud.GCP.Networks.Workers[0], + Internal: internalCIDR, + } + + data, err := json.Marshal(infrastructureConfig) + if err != nil { + return err + } + out.Spec.Provider.InfrastructureConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + controlPlaneConfig := &gcpv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: gcpv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + + var cloudControllerManager *gcpv1alpha1.CloudControllerManagerConfig + if in.Spec.Kubernetes.CloudControllerManager != nil { + cloudControllerManager = &gcpv1alpha1.CloudControllerManagerConfig{ + FeatureGates: in.Spec.Kubernetes.CloudControllerManager.FeatureGates, + } + } + controlPlaneConfig.CloudControllerManager = cloudControllerManager + controlPlaneConfig.Zone = in.Spec.Cloud.GCP.Zones[0] + + data, err = json.Marshal(controlPlaneConfig) + if err != nil { + return err + } + out.Spec.Provider.ControlPlaneConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + var workers []garden.Worker + out.Spec.Provider.Workers = nil + + for _, worker := range in.Spec.Cloud.GCP.Workers { + volumeType := worker.VolumeType + w := garden.Worker{ + Annotations: worker.Annotations, + CABundle: worker.CABundle, + Labels: worker.Labels, + Name: worker.Name, + Machine: garden.Machine{ + Type: worker.MachineType, + }, + Maximum: worker.AutoScalerMax, + Minimum: worker.AutoScalerMin, + MaxSurge: worker.MaxSurge, + MaxUnavailable: worker.MaxUnavailable, + Taints: worker.Taints, + Volume: &garden.Volume{ + Size: worker.VolumeSize, + Type: &volumeType, + }, + } + + var machineImage *garden.ShootMachineImage + if worker.MachineImage != nil { + machineImage = &garden.ShootMachineImage{} + if err := autoConvert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(worker.MachineImage, machineImage, s); err != nil { + return err + } + } + w.Machine.Image = machineImage + + if worker.Kubelet != nil { + kubeletConfig := &garden.KubeletConfig{} + if err := autoConvert_v1beta1_KubeletConfig_To_garden_KubeletConfig(worker.Kubelet, kubeletConfig, s); err != nil { + return err + } + w.Kubernetes = &garden.WorkerKubernetes{Kubelet: kubeletConfig} + } + + if data, ok := workerMigrationInfo[worker.Name]; ok { + w.ProviderConfig = data.ProviderConfig + w.Zones = data.Zones + } + + if w.Zones == nil { + w.Zones = in.Spec.Cloud.GCP.Zones + } + + out.Spec.Provider.Workers = append(out.Spec.Provider.Workers, w) + workers = append(workers, w) + } + out.Spec.Cloud.GCP.Workers = workers + + if in.Spec.Cloud.GCP.Networks.Nodes != nil { + out.Spec.Networking.Nodes = *in.Spec.Cloud.GCP.Networks.Nodes + } + if in.Spec.Cloud.GCP.Networks.Pods != nil { + out.Spec.Networking.Pods = in.Spec.Cloud.GCP.Networks.Pods + } + if in.Spec.Cloud.GCP.Networks.Services != nil { + out.Spec.Networking.Services = in.Spec.Cloud.GCP.Networks.Services + } + + case in.Spec.Cloud.OpenStack != nil: + out.Spec.Provider.Type = "openstack" + + infrastructureConfig := &openstackv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: openstackv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + + if len(in.Spec.Cloud.OpenStack.Networks.Workers) != 1 { + return fmt.Errorf("openstack worker networks must only have exactly one entry") + } + + var router *openstackv1alpha1.Router + if in.Spec.Cloud.OpenStack.Networks.Router != nil { + router = &openstackv1alpha1.Router{ + ID: in.Spec.Cloud.OpenStack.Networks.Router.ID, + } + } + + infrastructureConfig.FloatingPoolName = in.Spec.Cloud.OpenStack.FloatingPoolName + infrastructureConfig.Networks = openstackv1alpha1.Networks{ + Router: router, + Worker: in.Spec.Cloud.OpenStack.Networks.Workers[0], + } + + data, err := json.Marshal(infrastructureConfig) + if err != nil { + return err + } + out.Spec.Provider.InfrastructureConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + controlPlaneConfig := &openstackv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: openstackv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + + var cloudControllerManager *openstackv1alpha1.CloudControllerManagerConfig + if in.Spec.Kubernetes.CloudControllerManager != nil { + cloudControllerManager = &openstackv1alpha1.CloudControllerManagerConfig{ + FeatureGates: in.Spec.Kubernetes.CloudControllerManager.FeatureGates, + } + } + + var loadBalancerClasses = make([]openstackv1alpha1.LoadBalancerClass, 0, len(in.Spec.Cloud.OpenStack.LoadBalancerClasses)) + for _, loadBalancerClass := range in.Spec.Cloud.OpenStack.LoadBalancerClasses { + loadBalancerClasses = append(loadBalancerClasses, openstackv1alpha1.LoadBalancerClass{ + Name: loadBalancerClass.Name, + FloatingSubnetID: loadBalancerClass.FloatingSubnetID, + FloatingNetworkID: loadBalancerClass.FloatingNetworkID, + SubnetID: loadBalancerClass.SubnetID, + }) + } + + controlPlaneConfig.CloudControllerManager = cloudControllerManager + controlPlaneConfig.LoadBalancerProvider = in.Spec.Cloud.OpenStack.LoadBalancerProvider + controlPlaneConfig.LoadBalancerClasses = loadBalancerClasses + controlPlaneConfig.Zone = in.Spec.Cloud.OpenStack.Zones[0] + + data, err = json.Marshal(controlPlaneConfig) + if err != nil { + return err + } + out.Spec.Provider.ControlPlaneConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + var workers []garden.Worker + out.Spec.Provider.Workers = nil + + for _, worker := range in.Spec.Cloud.OpenStack.Workers { + w := garden.Worker{ + Annotations: worker.Annotations, + CABundle: worker.CABundle, + Labels: worker.Labels, + Name: worker.Name, + Machine: garden.Machine{ + Type: worker.MachineType, + }, + Maximum: worker.AutoScalerMax, + Minimum: worker.AutoScalerMin, + MaxSurge: worker.MaxSurge, + MaxUnavailable: worker.MaxUnavailable, + Taints: worker.Taints, + } + + var machineImage *garden.ShootMachineImage + if worker.MachineImage != nil { + machineImage = &garden.ShootMachineImage{} + if err := autoConvert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(worker.MachineImage, machineImage, s); err != nil { + return err + } + } + w.Machine.Image = machineImage + + if worker.Kubelet != nil { + kubeletConfig := &garden.KubeletConfig{} + if err := autoConvert_v1beta1_KubeletConfig_To_garden_KubeletConfig(worker.Kubelet, kubeletConfig, s); err != nil { + return err + } + w.Kubernetes = &garden.WorkerKubernetes{Kubelet: kubeletConfig} + } + + if data, ok := workerMigrationInfo[worker.Name]; ok { + w.ProviderConfig = data.ProviderConfig + w.Zones = data.Zones + w.Volume = data.Volume + } + + if w.Zones == nil { + w.Zones = in.Spec.Cloud.OpenStack.Zones + } + + out.Spec.Provider.Workers = append(out.Spec.Provider.Workers, w) + workers = append(workers, w) + } + out.Spec.Cloud.OpenStack.Workers = workers + + if in.Spec.Cloud.OpenStack.Networks.Nodes != nil { + out.Spec.Networking.Nodes = *in.Spec.Cloud.OpenStack.Networks.Nodes + } + if in.Spec.Cloud.OpenStack.Networks.Pods != nil { + out.Spec.Networking.Pods = in.Spec.Cloud.OpenStack.Networks.Pods + } + if in.Spec.Cloud.OpenStack.Networks.Services != nil { + out.Spec.Networking.Services = in.Spec.Cloud.OpenStack.Networks.Services + } + + case in.Spec.Cloud.Alicloud != nil: + out.Spec.Provider.Type = "alicloud" + + infrastructureConfig := &alicloudv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: alicloudv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + + if len(in.Spec.Cloud.Alicloud.Networks.Workers) != len(in.Spec.Cloud.Alicloud.Zones) { + return fmt.Errorf("alicloud workers networks must have same number of entries like zones") + } + if len(in.Spec.Cloud.Alicloud.Zones) == 0 { + return fmt.Errorf("alicloud zones must have at least one entry") + } + + zones := make([]alicloudv1alpha1.Zone, 0, len(in.Spec.Cloud.Alicloud.Zones)) + for i, zone := range in.Spec.Cloud.Alicloud.Zones { + zones = append(zones, alicloudv1alpha1.Zone{ + Name: zone, + Worker: in.Spec.Cloud.Alicloud.Networks.Workers[i], + }) + } + + var vpcCIDR *string + if c := in.Spec.Cloud.Alicloud.Networks.VPC.CIDR; c != nil { + cidr := *c + vpcCIDR = &cidr + } + + infrastructureConfig.Networks = alicloudv1alpha1.Networks{ + VPC: alicloudv1alpha1.VPC{ + ID: in.Spec.Cloud.Alicloud.Networks.VPC.ID, + CIDR: vpcCIDR, + }, + Zones: zones, + } + + data, err := json.Marshal(infrastructureConfig) + if err != nil { + return err + } + out.Spec.Provider.InfrastructureConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + controlPlaneConfig := &alicloudv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: alicloudv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + + var cloudControllerManager *alicloudv1alpha1.CloudControllerManagerConfig + if in.Spec.Kubernetes.CloudControllerManager != nil { + cloudControllerManager = &alicloudv1alpha1.CloudControllerManagerConfig{ + FeatureGates: in.Spec.Kubernetes.CloudControllerManager.FeatureGates, + } + } + controlPlaneConfig.CloudControllerManager = cloudControllerManager + controlPlaneConfig.Zone = in.Spec.Cloud.Alicloud.Zones[0] + + data, err = json.Marshal(controlPlaneConfig) + if err != nil { + return err + } + out.Spec.Provider.ControlPlaneConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + var workers []garden.Worker + out.Spec.Provider.Workers = nil + + for _, worker := range in.Spec.Cloud.Alicloud.Workers { + volumeType := worker.VolumeType + w := garden.Worker{ + Annotations: worker.Annotations, + CABundle: worker.CABundle, + Labels: worker.Labels, + Name: worker.Name, + Machine: garden.Machine{ + Type: worker.MachineType, + }, + Maximum: worker.AutoScalerMax, + Minimum: worker.AutoScalerMin, + MaxSurge: worker.MaxSurge, + MaxUnavailable: worker.MaxUnavailable, + Taints: worker.Taints, + Volume: &garden.Volume{ + Size: worker.VolumeSize, + Type: &volumeType, + }, + } + + var machineImage *garden.ShootMachineImage + if worker.MachineImage != nil { + machineImage = &garden.ShootMachineImage{} + if err := autoConvert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(worker.MachineImage, machineImage, s); err != nil { + return err + } + } + w.Machine.Image = machineImage + + if worker.Kubelet != nil { + kubeletConfig := &garden.KubeletConfig{} + if err := autoConvert_v1beta1_KubeletConfig_To_garden_KubeletConfig(worker.Kubelet, kubeletConfig, s); err != nil { + return err + } + w.Kubernetes = &garden.WorkerKubernetes{Kubelet: kubeletConfig} + } + + if data, ok := workerMigrationInfo[worker.Name]; ok { + w.ProviderConfig = data.ProviderConfig + w.Zones = data.Zones + } + + if w.Zones == nil { + w.Zones = in.Spec.Cloud.Alicloud.Zones + } + + out.Spec.Provider.Workers = append(out.Spec.Provider.Workers, w) + workers = append(workers, w) + } + out.Spec.Cloud.Alicloud.Workers = workers + + if in.Spec.Cloud.Alicloud.Networks.Nodes != nil { + out.Spec.Networking.Nodes = *in.Spec.Cloud.Alicloud.Networks.Nodes + } + if in.Spec.Cloud.Alicloud.Networks.Pods != nil { + out.Spec.Networking.Pods = in.Spec.Cloud.Alicloud.Networks.Pods + } + if in.Spec.Cloud.Alicloud.Networks.Services != nil { + out.Spec.Networking.Services = in.Spec.Cloud.Alicloud.Networks.Services + } + + case in.Spec.Cloud.Packet != nil: + out.Spec.Provider.Type = "packet" + + infrastructureConfig := &packetv1alpha1.InfrastructureConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: packetv1alpha1.SchemeGroupVersion.String(), + Kind: "InfrastructureConfig", + }, + } + + data, err := json.Marshal(infrastructureConfig) + if err != nil { + return err + } + out.Spec.Provider.InfrastructureConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + controlPlaneConfig := &packetv1alpha1.ControlPlaneConfig{ + TypeMeta: metav1.TypeMeta{ + APIVersion: packetv1alpha1.SchemeGroupVersion.String(), + Kind: "ControlPlaneConfig", + }, + } + + data, err = json.Marshal(controlPlaneConfig) + if err != nil { + return err + } + out.Spec.Provider.ControlPlaneConfig = &garden.ProviderConfig{ + RawExtension: runtime.RawExtension{ + Raw: data, + }, + } + + var workers []garden.Worker + out.Spec.Provider.Workers = nil + + for _, worker := range in.Spec.Cloud.Packet.Workers { + volumeType := worker.VolumeType + w := garden.Worker{ + Annotations: worker.Annotations, + CABundle: worker.CABundle, + Labels: worker.Labels, + Name: worker.Name, + Machine: garden.Machine{ + Type: worker.MachineType, + }, + Maximum: worker.AutoScalerMax, + Minimum: worker.AutoScalerMin, + MaxSurge: worker.MaxSurge, + MaxUnavailable: worker.MaxUnavailable, + Taints: worker.Taints, + Volume: &garden.Volume{ + Size: worker.VolumeSize, + Type: &volumeType, + }, + } + + var machineImage *garden.ShootMachineImage + if worker.MachineImage != nil { + machineImage = &garden.ShootMachineImage{} + if err := autoConvert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(worker.MachineImage, machineImage, s); err != nil { + return err + } + } + w.Machine.Image = machineImage + + if worker.Kubelet != nil { + kubeletConfig := &garden.KubeletConfig{} + if err := autoConvert_v1beta1_KubeletConfig_To_garden_KubeletConfig(worker.Kubelet, kubeletConfig, s); err != nil { + return err + } + w.Kubernetes = &garden.WorkerKubernetes{Kubelet: kubeletConfig} + } + + if data, ok := workerMigrationInfo[worker.Name]; ok { + w.ProviderConfig = data.ProviderConfig + w.Zones = data.Zones + } + + if w.Zones == nil { + w.Zones = in.Spec.Cloud.Packet.Zones + } + + out.Spec.Provider.Workers = append(out.Spec.Provider.Workers, w) + workers = append(workers, w) + } + out.Spec.Cloud.Packet.Workers = workers + + if in.Spec.Cloud.Packet.Networks.Nodes != nil { + out.Spec.Networking.Nodes = *in.Spec.Cloud.Packet.Networks.Nodes + } + if in.Spec.Cloud.Packet.Networks.Pods != nil { + out.Spec.Networking.Pods = in.Spec.Cloud.Packet.Networks.Pods + } + if in.Spec.Cloud.Packet.Networks.Services != nil { + out.Spec.Networking.Services = in.Spec.Cloud.Packet.Networks.Services + } + + default: + if data, ok := in.Annotations[garden.MigrationShootProvider]; ok { + var provider garden.Provider + if err := json.Unmarshal([]byte(data), &provider); err != nil { + return err + } + out.Spec.Provider = provider + } + } + + out.Spec.CloudProfileName = in.Spec.Cloud.Profile + out.Spec.Region = in.Spec.Cloud.Region + out.Spec.SecretBindingName = in.Spec.Cloud.SecretBindingRef.Name + out.Spec.SeedName = in.Spec.Cloud.Seed + + return nil +} + +func Convert_garden_Shoot_To_v1beta1_Shoot(in *garden.Shoot, out *Shoot, s conversion.Scope) error { + if err := autoConvert_garden_Shoot_To_v1beta1_Shoot(in, out, s); err != nil { + return err + } + + networking := &Networking{} + if err := Convert_garden_Networking_To_v1beta1_Networking(&in.Spec.Networking, networking, s); err != nil { + return err + } + out.Spec.Networking = networking + + var dns *DNS + if in.Spec.DNS != nil { + dns = &DNS{} + if err := autoConvert_garden_DNS_To_v1beta1_DNS(in.Spec.DNS, dns, s); err != nil { + return err + } + + if len(in.Spec.DNS.Providers) > 0 { + dns.Provider = in.Spec.DNS.Providers[0].Type + dns.SecretName = in.Spec.DNS.Providers[0].SecretName + + if in.Spec.DNS.Providers[0].Domains != nil { + dns.IncludeDomains = in.Spec.DNS.Providers[0].Domains.Include + dns.ExcludeDomains = in.Spec.DNS.Providers[0].Domains.Exclude + } + + if in.Spec.DNS.Providers[0].Zones != nil { + dns.IncludeZones = in.Spec.DNS.Providers[0].Zones.Include + dns.ExcludeZones = in.Spec.DNS.Providers[0].Zones.Exclude + } + } + + if len(in.Spec.DNS.Providers) > 1 { + data, err := json.Marshal(in.Spec.DNS.Providers[1:]) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootDNSProviders, string(data)) + } else { + delete(out.Annotations, garden.MigrationShootDNSProviders) + } + } + out.Spec.DNS = dns + + out.Spec.Cloud.Profile = in.Spec.CloudProfileName + out.Spec.Cloud.Region = in.Spec.Region + out.Spec.Cloud.SecretBindingRef.Name = in.Spec.SecretBindingName + out.Spec.Cloud.Seed = in.Spec.SeedName + + if in.Spec.Cloud.AWS != nil || in.Spec.Cloud.Azure != nil || in.Spec.Cloud.GCP != nil || in.Spec.Cloud.OpenStack != nil || in.Spec.Cloud.Alicloud != nil || in.Spec.Cloud.Packet != nil { + workerMigrationInfo := make(garden.WorkerMigrationInfo, len(in.Spec.Provider.Workers)) + for _, worker := range in.Spec.Provider.Workers { + workerMigrationInfo[worker.Name] = garden.WorkerMigrationData{ + ProviderConfig: worker.ProviderConfig, + Zones: worker.Zones, + Volume: worker.Volume, + } + } + data, err := json.Marshal(workerMigrationInfo) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootWorkers, string(data)) + } else { + data, err := json.Marshal(in.Spec.Provider) + if err != nil { + return err + } + metav1.SetMetaDataAnnotation(&out.ObjectMeta, garden.MigrationShootProvider, string(data)) + } + + return nil +} + +func Convert_garden_ShootSpec_To_v1beta1_ShootSpec(in *garden.ShootSpec, out *ShootSpec, s conversion.Scope) error { + return autoConvert_garden_ShootSpec_To_v1beta1_ShootSpec(in, out, s) +} + +func Convert_v1beta1_ShootSpec_To_garden_ShootSpec(in *ShootSpec, out *garden.ShootSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ShootSpec_To_garden_ShootSpec(in, out, s) +} + +func Convert_garden_ShootStatus_To_v1beta1_ShootStatus(in *garden.ShootStatus, out *ShootStatus, s conversion.Scope) error { + if err := autoConvert_garden_ShootStatus_To_v1beta1_ShootStatus(in, out, s); err != nil { + return err + } + + if len(in.LastErrors) != 0 { + out.LastError = (*gardencorev1alpha1.LastError)(unsafe.Pointer(&in.LastErrors[0])) + if len(in.LastErrors) > 1 { + lastErrors := in.LastErrors[1:] + out.LastErrors = *(*[]gardencorev1alpha1.LastError)(unsafe.Pointer(&lastErrors)) + } else { + out.LastErrors = nil + } + } + + if in.SeedName != nil { + out.Seed = *in.SeedName + } else { + out.Seed = "" + } + + return nil +} + +func Convert_v1beta1_ShootStatus_To_garden_ShootStatus(in *ShootStatus, out *garden.ShootStatus, s conversion.Scope) error { + if err := autoConvert_v1beta1_ShootStatus_To_garden_ShootStatus(in, out, s); err != nil { + return err + } + + if in.LastError != nil { + outLastErrors := []garden.LastError{ + { + Description: in.LastError.Description, + Codes: *(*[]garden.ErrorCode)(unsafe.Pointer(&in.LastError.Codes)), + LastUpdateTime: in.LastError.LastUpdateTime, + }, + } + out.LastErrors = append(outLastErrors, *(*[]garden.LastError)(unsafe.Pointer(&in.LastErrors))...) + } else { + out.LastErrors = nil + } + + if len(in.Seed) > 0 { + out.SeedName = &in.Seed + } else { + out.SeedName = nil + } + + return nil +} + +func Convert_garden_DNS_To_v1beta1_DNS(in *garden.DNS, out *DNS, s conversion.Scope) error { + return autoConvert_garden_DNS_To_v1beta1_DNS(in, out, s) +} + +func Convert_v1beta1_DNS_To_garden_DNS(in *DNS, out *garden.DNS, s conversion.Scope) error { + return autoConvert_v1beta1_DNS_To_garden_DNS(in, out, s) +} + +func Convert_garden_Worker_To_v1beta1_Worker(in *garden.Worker, out *Worker, s conversion.Scope) error { + return autoConvert_garden_Worker_To_v1beta1_Worker(in, out, s) +} + +func Convert_v1beta1_Worker_To_garden_Worker(in *Worker, out *garden.Worker, s conversion.Scope) error { + return autoConvert_v1beta1_Worker_To_garden_Worker(in, out, s) +} + +func Convert_garden_Worker_To_v1beta1_AWSWorker(in *garden.Worker, out *AWSWorker, s conversion.Scope) error { + out.Name = in.Name + out.MachineType = in.Machine.Type + out.AutoScalerMin = in.Minimum + out.AutoScalerMax = in.Maximum + out.MaxSurge = in.MaxSurge + out.MaxUnavailable = in.MaxUnavailable + out.Annotations = in.Annotations + out.Labels = in.Labels + out.Taints = in.Taints + out.CABundle = in.CABundle + + var machineImage *ShootMachineImage + if in.Machine.Image != nil { + machineImage = &ShootMachineImage{} + if err := autoConvert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in.Machine.Image, machineImage, s); err != nil { + return err + } + out.MachineImage = machineImage + } + + if in.Volume != nil { + out.VolumeSize = in.Volume.Size + if in.Volume.Type != nil { + out.VolumeType = *in.Volume.Type + } + } + + var kubeletConfig *KubeletConfig + if in.Kubernetes != nil { + kubeletConfig = &KubeletConfig{} + if err := autoConvert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in.Kubernetes.Kubelet, kubeletConfig, s); err != nil { + return err + } + } + out.Kubelet = kubeletConfig + + return nil +} + +func Convert_v1beta1_AWSWorker_To_garden_Worker(in *AWSWorker, out *garden.Worker, s conversion.Scope) error { + return nil +} + +func Convert_garden_Worker_To_v1beta1_AzureWorker(in *garden.Worker, out *AzureWorker, s conversion.Scope) error { + out.Name = in.Name + out.MachineType = in.Machine.Type + out.AutoScalerMin = in.Minimum + out.AutoScalerMax = in.Maximum + out.MaxSurge = in.MaxSurge + out.MaxUnavailable = in.MaxUnavailable + out.Annotations = in.Annotations + out.Labels = in.Labels + out.Taints = in.Taints + out.CABundle = in.CABundle + + var machineImage *ShootMachineImage + if in.Machine.Image != nil { + machineImage = &ShootMachineImage{} + if err := autoConvert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in.Machine.Image, machineImage, s); err != nil { + return err + } + out.MachineImage = machineImage + } + + if in.Volume != nil { + out.VolumeSize = in.Volume.Size + if in.Volume.Type != nil { + out.VolumeType = *in.Volume.Type + } + } + + var kubeletConfig *KubeletConfig + if in.Kubernetes != nil { + kubeletConfig = &KubeletConfig{} + if err := autoConvert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in.Kubernetes.Kubelet, kubeletConfig, s); err != nil { + return err + } + } + out.Kubelet = kubeletConfig + + return nil +} + +func Convert_v1beta1_AzureWorker_To_garden_Worker(in *AzureWorker, out *garden.Worker, s conversion.Scope) error { + return nil +} + +func Convert_garden_Worker_To_v1beta1_GCPWorker(in *garden.Worker, out *GCPWorker, s conversion.Scope) error { + out.Name = in.Name + out.MachineType = in.Machine.Type + out.AutoScalerMin = in.Minimum + out.AutoScalerMax = in.Maximum + out.MaxSurge = in.MaxSurge + out.MaxUnavailable = in.MaxUnavailable + out.Annotations = in.Annotations + out.Labels = in.Labels + out.Taints = in.Taints + out.CABundle = in.CABundle + + var machineImage *ShootMachineImage + if in.Machine.Image != nil { + machineImage = &ShootMachineImage{} + if err := autoConvert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in.Machine.Image, machineImage, s); err != nil { + return err + } + out.MachineImage = machineImage + } + + if in.Volume != nil { + out.VolumeSize = in.Volume.Size + if in.Volume.Type != nil { + out.VolumeType = *in.Volume.Type + } + } + + var kubeletConfig *KubeletConfig + if in.Kubernetes != nil { + kubeletConfig = &KubeletConfig{} + if err := autoConvert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in.Kubernetes.Kubelet, kubeletConfig, s); err != nil { + return err + } + } + out.Kubelet = kubeletConfig + + return nil +} + +func Convert_v1beta1_GCPWorker_To_garden_Worker(in *GCPWorker, out *garden.Worker, s conversion.Scope) error { + return nil +} + +func Convert_garden_Worker_To_v1beta1_OpenStackWorker(in *garden.Worker, out *OpenStackWorker, s conversion.Scope) error { + out.Name = in.Name + out.MachineType = in.Machine.Type + out.AutoScalerMin = in.Minimum + out.AutoScalerMax = in.Maximum + out.MaxSurge = in.MaxSurge + out.MaxUnavailable = in.MaxUnavailable + out.Annotations = in.Annotations + out.Labels = in.Labels + out.Taints = in.Taints + out.CABundle = in.CABundle + + var machineImage *ShootMachineImage + if in.Machine.Image != nil { + machineImage = &ShootMachineImage{} + if err := autoConvert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in.Machine.Image, machineImage, s); err != nil { + return err + } + out.MachineImage = machineImage + } + + var kubeletConfig *KubeletConfig + if in.Kubernetes != nil { + kubeletConfig = &KubeletConfig{} + if err := autoConvert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in.Kubernetes.Kubelet, kubeletConfig, s); err != nil { + return err + } + } + out.Kubelet = kubeletConfig + + return nil +} + +func Convert_v1beta1_OpenStackWorker_To_garden_Worker(in *OpenStackWorker, out *garden.Worker, s conversion.Scope) error { + return nil +} + +func Convert_garden_Worker_To_v1beta1_AlicloudWorker(in *garden.Worker, out *AlicloudWorker, s conversion.Scope) error { + out.Name = in.Name + out.MachineType = in.Machine.Type + out.AutoScalerMin = in.Minimum + out.AutoScalerMax = in.Maximum + out.MaxSurge = in.MaxSurge + out.MaxUnavailable = in.MaxUnavailable + out.Annotations = in.Annotations + out.Labels = in.Labels + out.Taints = in.Taints + out.CABundle = in.CABundle + + var machineImage *ShootMachineImage + if in.Machine.Image != nil { + machineImage = &ShootMachineImage{} + if err := autoConvert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in.Machine.Image, machineImage, s); err != nil { + return err + } + out.MachineImage = machineImage + } + + if in.Volume != nil { + out.VolumeSize = in.Volume.Size + if in.Volume.Type != nil { + out.VolumeType = *in.Volume.Type + } + } + + var kubeletConfig *KubeletConfig + if in.Kubernetes != nil { + kubeletConfig = &KubeletConfig{} + if err := autoConvert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in.Kubernetes.Kubelet, kubeletConfig, s); err != nil { + return err + } + } + out.Kubelet = kubeletConfig + + return nil +} + +func Convert_v1beta1_AlicloudWorker_To_garden_Worker(in *AlicloudWorker, out *garden.Worker, s conversion.Scope) error { + return nil +} + +func Convert_garden_Worker_To_v1beta1_PacketWorker(in *garden.Worker, out *PacketWorker, s conversion.Scope) error { + out.Name = in.Name + out.MachineType = in.Machine.Type + out.AutoScalerMin = in.Minimum + out.AutoScalerMax = in.Maximum + out.MaxSurge = in.MaxSurge + out.MaxUnavailable = in.MaxUnavailable + out.Annotations = in.Annotations + out.Labels = in.Labels + out.Taints = in.Taints + out.CABundle = in.CABundle + + var machineImage *ShootMachineImage + if in.Machine.Image != nil { + machineImage = &ShootMachineImage{} + if err := autoConvert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in.Machine.Image, machineImage, s); err != nil { + return err + } + out.MachineImage = machineImage + } + + if in.Volume != nil { + out.VolumeSize = in.Volume.Size + if in.Volume.Type != nil { + out.VolumeType = *in.Volume.Type + } + } + + var kubeletConfig *KubeletConfig + if in.Kubernetes != nil { + kubeletConfig = &KubeletConfig{} + if err := autoConvert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in.Kubernetes.Kubelet, kubeletConfig, s); err != nil { + return err + } + } + out.Kubelet = kubeletConfig + + return nil +} + +func Convert_v1beta1_PacketWorker_To_garden_Worker(in *PacketWorker, out *garden.Worker, s conversion.Scope) error { + return nil +} + +func Convert_garden_Networking_To_v1beta1_Networking(in *garden.Networking, out *Networking, s conversion.Scope) error { + if err := autoConvert_garden_Networking_To_v1beta1_Networking(in, out, s); err != nil { + return err + } + + out.K8SNetworks = K8SNetworks{ + Nodes: &in.Nodes, + Pods: in.Pods, + Services: in.Services, + } + + return nil +} + +func Convert_v1beta1_Networking_To_garden_Networking(in *Networking, out *garden.Networking, s conversion.Scope) error { + if err := autoConvert_v1beta1_Networking_To_garden_Networking(in, out, s); err != nil { + return err + } + + if in.K8SNetworks.Nodes != nil { + out.Nodes = *in.K8SNetworks.Nodes + } + out.Pods = in.K8SNetworks.Pods + out.Services = in.K8SNetworks.Services + + return nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/defaults.go b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/defaults.go index 9b6fbb331..149635636 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/defaults.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/defaults.go @@ -21,6 +21,7 @@ import ( "github.com/gardener/gardener/pkg/utils" rbacv1 "k8s.io/api/rbac/v1" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" ) @@ -244,6 +245,14 @@ func SetDefaults_Shoot(obj *Shoot) { } } +// SetDefaults_NginxIngress sets default values for NginxIngress objects. +func SetDefaults_NginxIngress(obj *NginxIngress) { + if obj.ExternalTrafficPolicy == nil { + v := corev1.ServiceExternalTrafficPolicyTypeCluster + obj.ExternalTrafficPolicy = &v + } +} + // SetDefaults_Seed sets default values for Seed objects. func SetDefaults_Seed(obj *Seed) { trueVar := true diff --git a/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/types.go b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/types.go index fd38c85bb..05b9b4d90 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/types.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/types.go @@ -94,18 +94,28 @@ type AWSProfile struct { // AWSConstraints is an object containing constraints for certain values in the Shoot specification. type AWSConstraints struct { // DNSProviders contains constraints regarding allowed values of the 'dns.provider' block in the Shoot specification. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - DNSProviders []DNSProviderConstraint `json:"dnsProviders,omitempty"` + DNSProviders []DNSProviderConstraint `json:"dnsProviders,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // Kubernetes contains constraints regarding allowed values of the 'kubernetes' block in the Shoot specification. Kubernetes KubernetesConstraints `json:"kubernetes"` // MachineImages contains constraints regarding allowed values for machine images in the Shoot specification. - MachineImages []MachineImage `json:"machineImages"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineImages []MachineImage `json:"machineImages" patchStrategy:"merge" patchMergeKey:"name"` // MachineTypes contains constraints regarding allowed values for machine types in the 'workers' block in the Shoot specification. - MachineTypes []MachineType `json:"machineTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineTypes []MachineType `json:"machineTypes" patchStrategy:"merge" patchMergeKey:"name"` // VolumeTypes contains constraints regarding allowed values for volume types in the 'workers' block in the Shoot specification. - VolumeTypes []VolumeType `json:"volumeTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + VolumeTypes []VolumeType `json:"volumeTypes" patchStrategy:"merge" patchMergeKey:"name"` // Zones contains constraints regarding allowed values for 'zones' block in the Shoot specification. - Zones []Zone `json:"zones"` + // +patchMergeKey=region + // +patchStrategy=merge + Zones []Zone `json:"zones" patchStrategy:"merge" patchMergeKey:"region"` } // MachineImage defines the name and multiple versions of the machine image in any environment. @@ -116,8 +126,10 @@ type MachineImage struct { // +optional Version string `json:"version,omitempty"` // Versions contains versions and expiration dates of the machine image + // +patchMergeKey=version + // +patchStrategy=merge // +optional - Versions []MachineImageVersion `json:"versions,omitempty"` + Versions []MachineImageVersion `json:"versions,omitempty" patchStrategy:"merge" patchMergeKey:"version"` } // MachineImageVersion contains a version and an expiration date of a machine image @@ -136,27 +148,41 @@ type AzureProfile struct { // Constraints is an object containing constraints for certain values in the Shoot specification. Constraints AzureConstraints `json:"constraints"` // CountUpdateDomains is list of Azure update domain counts for each region. - CountUpdateDomains []AzureDomainCount `json:"countUpdateDomains"` + // +patchMergeKey=region + // +patchStrategy=merge + CountUpdateDomains []AzureDomainCount `json:"countUpdateDomains" patchStrategy:"merge" patchMergeKey:"region"` // CountFaultDomains is list of Azure fault domain counts for each region. - CountFaultDomains []AzureDomainCount `json:"countFaultDomains"` + // +patchMergeKey=region + // +patchStrategy=merge + CountFaultDomains []AzureDomainCount `json:"countFaultDomains" patchStrategy:"merge" patchMergeKey:"region"` } // AzureConstraints is an object containing constraints for certain values in the Shoot specification. type AzureConstraints struct { // DNSProviders contains constraints regarding allowed values of the 'dns.provider' block in the Shoot specification. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - DNSProviders []DNSProviderConstraint `json:"dnsProviders,omitempty"` + DNSProviders []DNSProviderConstraint `json:"dnsProviders,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // Kubernetes contains constraints regarding allowed values of the 'kubernetes' block in the Shoot specification. Kubernetes KubernetesConstraints `json:"kubernetes"` // MachineImages contains constraints regarding allowed values for machine images in the Shoot specification. - MachineImages []MachineImage `json:"machineImages"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineImages []MachineImage `json:"machineImages" patchStrategy:"merge" patchMergeKey:"name"` // MachineTypes contains constraints regarding allowed values for machine types in the 'workers' block in the Shoot specification. - MachineTypes []MachineType `json:"machineTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineTypes []MachineType `json:"machineTypes" patchStrategy:"merge" patchMergeKey:"name"` // VolumeTypes contains constraints regarding allowed values for volume types in the 'workers' block in the Shoot specification. - VolumeTypes []VolumeType `json:"volumeTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + VolumeTypes []VolumeType `json:"volumeTypes" patchStrategy:"merge" patchMergeKey:"name"` // Zones contains constraints regarding allowed values for 'zones' block in the Shoot specification. + // +patchMergeKey=region + // +patchStrategy=merge // +optional - Zones []Zone `json:"zones,omitempty"` + Zones []Zone `json:"zones" patchStrategy:"merge" patchMergeKey:"region"` } // AzureDomainCount defines the region and the count for this domain count value. @@ -176,18 +202,28 @@ type GCPProfile struct { // GCPConstraints is an object containing constraints for certain values in the Shoot specification. type GCPConstraints struct { // DNSProviders contains constraints regarding allowed values of the 'dns.provider' block in the Shoot specification. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - DNSProviders []DNSProviderConstraint `json:"dnsProviders,omitempty"` + DNSProviders []DNSProviderConstraint `json:"dnsProviders,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // Kubernetes contains constraints regarding allowed values of the 'kubernetes' block in the Shoot specification. Kubernetes KubernetesConstraints `json:"kubernetes"` // MachineImages contains constraints regarding allowed values for machine images in the Shoot specification. - MachineImages []MachineImage `json:"machineImages"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineImages []MachineImage `json:"machineImages" patchStrategy:"merge" patchMergeKey:"name"` // MachineTypes contains constraints regarding allowed values for machine types in the 'workers' block in the Shoot specification. - MachineTypes []MachineType `json:"machineTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineTypes []MachineType `json:"machineTypes" patchStrategy:"merge" patchMergeKey:"name"` // VolumeTypes contains constraints regarding allowed values for volume types in the 'workers' block in the Shoot specification. - VolumeTypes []VolumeType `json:"volumeTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + VolumeTypes []VolumeType `json:"volumeTypes" patchStrategy:"merge" patchMergeKey:"name"` // Zones contains constraints regarding allowed values for 'zones' block in the Shoot specification. - Zones []Zone `json:"zones"` + // +patchMergeKey=region + // +patchStrategy=merge + Zones []Zone `json:"zones" patchStrategy:"merge" patchMergeKey:"region"` } // OpenStackProfile defines certain constraints and definitions for the OpenStack cloud. @@ -211,20 +247,32 @@ type OpenStackProfile struct { // OpenStackConstraints is an object containing constraints for certain values in the Shoot specification. type OpenStackConstraints struct { // DNSProviders contains constraints regarding allowed values of the 'dns.provider' block in the Shoot specification. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - DNSProviders []DNSProviderConstraint `json:"dnsProviders,omitempty"` + DNSProviders []DNSProviderConstraint `json:"dnsProviders,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // FloatingPools contains constraints regarding allowed values of the 'floatingPoolName' block in the Shoot specification. - FloatingPools []OpenStackFloatingPool `json:"floatingPools"` + // +patchMergeKey=name + // +patchStrategy=merge + FloatingPools []OpenStackFloatingPool `json:"floatingPools" patchStrategy:"merge" patchMergeKey:"name"` // Kubernetes contains constraints regarding allowed values of the 'kubernetes' block in the Shoot specification. Kubernetes KubernetesConstraints `json:"kubernetes"` // LoadBalancerProviders contains constraints regarding allowed values of the 'loadBalancerProvider' block in the Shoot specification. - LoadBalancerProviders []OpenStackLoadBalancerProvider `json:"loadBalancerProviders"` + // +patchMergeKey=name + // +patchStrategy=merge + LoadBalancerProviders []OpenStackLoadBalancerProvider `json:"loadBalancerProviders" patchStrategy:"merge" patchMergeKey:"name"` // MachineImages contains constraints regarding allowed values for machine images in the Shoot specification. - MachineImages []MachineImage `json:"machineImages"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineImages []MachineImage `json:"machineImages" patchStrategy:"merge" patchMergeKey:"name"` // MachineTypes contains constraints regarding allowed values for machine types in the 'workers' block in the Shoot specification. - MachineTypes []OpenStackMachineType `json:"machineTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineTypes []OpenStackMachineType `json:"machineTypes" patchStrategy:"merge" patchMergeKey:"name"` // Zones contains constraints regarding allowed values for 'zones' block in the Shoot specification. - Zones []Zone `json:"zones"` + // +patchMergeKey=region + // +patchStrategy=merge + Zones []Zone `json:"zones" patchStrategy:"merge" patchMergeKey:"region"` } // OpenStackFloatingPool contains constraints regarding allowed values of the 'floatingPoolName' block in the Shoot specification. @@ -232,8 +280,10 @@ type OpenStackFloatingPool struct { // Name is the name of the floating pool. Name string `json:"name"` // LoadBalancerClasses contains a list of supported labeled load balancer network settings. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - LoadBalancerClasses []OpenStackLoadBalancerClass `json:"loadBalancerClasses,omitempty"` + LoadBalancerClasses []OpenStackLoadBalancerClass `json:"loadBalancerClasses,omitempty" patchStrategy:"merge" patchMergeKey:"name"` } // OpenStackLoadBalancerProvider contains constraints regarding allowed values of the 'loadBalancerProvider' block in the Shoot specification. @@ -251,18 +301,28 @@ type AlicloudProfile struct { // AlicloudConstraints is an object containing constraints for certain values in the Shoot specification type AlicloudConstraints struct { // DNSProviders contains constraints regarding allowed values of the 'dns.provider' block in the Shoot specification. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - DNSProviders []DNSProviderConstraint `json:"dnsProviders,omitempty"` + DNSProviders []DNSProviderConstraint `json:"dnsProviders,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // Kubernetes contains constraints regarding allowed values of the 'kubernetes' block in the Shoot specification. Kubernetes KubernetesConstraints `json:"kubernetes"` // MachineImages contains constraints regarding allowed values for machine images in the Shoot specification. - MachineImages []MachineImage `json:"machineImages"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineImages []MachineImage `json:"machineImages" patchStrategy:"merge" patchMergeKey:"name"` // MachineTypes contains constraints regarding allowed values for machine types in the 'workers' block in the Shoot specification. - MachineTypes []AlicloudMachineType `json:"machineTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineTypes []AlicloudMachineType `json:"machineTypes" patchStrategy:"merge" patchMergeKey:"name"` // VolumeTypes contains constraints regarding allowed values for volume types in the 'workers' block in the Shoot specification. - VolumeTypes []AlicloudVolumeType `json:"volumeTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + VolumeTypes []AlicloudVolumeType `json:"volumeTypes" patchStrategy:"merge" patchMergeKey:"name"` // Zones contains constraints regarding allowed values for 'zones' block in the Shoot specification. - Zones []Zone `json:"zones"` + // +patchMergeKey=region + // +patchStrategy=merge + Zones []Zone `json:"zones" patchStrategy:"merge" patchMergeKey:"region"` } // AlicloudMachineType defines certain machine types and zone constraints. @@ -291,13 +351,21 @@ type PacketConstraints struct { // Kubernetes contains constraints regarding allowed values of the 'kubernetes' block in the Shoot specification. Kubernetes KubernetesConstraints `json:"kubernetes"` // MachineImages contains constraints regarding allowed values for machine images in the Shoot specification. - MachineImages []MachineImage `json:"machineImages"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineImages []MachineImage `json:"machineImages" patchStrategy:"merge" patchMergeKey:"name"` // MachineTypes contains constraints regarding allowed values for machine types in the 'workers' block in the Shoot specification. - MachineTypes []MachineType `json:"machineTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + MachineTypes []MachineType `json:"machineTypes" patchStrategy:"merge" patchMergeKey:"name"` // VolumeTypes contains constraints regarding allowed values for volume types in the 'workers' block in the Shoot specification. - VolumeTypes []VolumeType `json:"volumeTypes"` + // +patchMergeKey=name + // +patchStrategy=merge + VolumeTypes []VolumeType `json:"volumeTypes" patchStrategy:"merge" patchMergeKey:"name"` // Zones contains constraints regarding allowed values for 'zones' block in the Shoot specification. - Zones []Zone `json:"zones"` + // +patchMergeKey=region + // +patchStrategy=merge + Zones []Zone `json:"zones" patchStrategy:"merge" patchMergeKey:"region"` } // DNSProviderConstraint contains constraints regarding allowed values of the 'dns.provider' block in the Shoot specification. @@ -312,8 +380,10 @@ type KubernetesConstraints struct { // +optional Versions []string `json:"versions,omitempty"` // OfferedVersions is the list of allowed Kubernetes versions with optional expiration dates for Shoot clusters. + // +patchMergeKey=version + // +patchStrategy=merge // +optional - OfferedVersions []KubernetesVersion `json:"offeredVersions,omitempty"` + OfferedVersions []KubernetesVersion `json:"offeredVersions,omitempty" patchStrategy:"merge" patchMergeKey:"version"` } // KubernetesVersion contains the version code and optional expiration date for a kubernetes version @@ -493,7 +563,6 @@ const ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Seed holds certain properties about a Seed cluster. -// +k8s:openapi-gen=x-kubernetes-print-columns:custom-columns=NAME:.metadata.name,DOMAIN:.spec.ingressDomain,CLOUDPROFILE:.spec.cloud.profile,REGION:.spec.cloud.profile,READY:.status.conditions[?(@.type == 'Available')].status type Seed struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. @@ -528,10 +597,11 @@ type SeedSpec struct { IngressDomain string `json:"ingressDomain"` // SecretRef is a reference to a Secret object containing the Kubeconfig and the cloud provider credentials for // the account the Seed cluster has been deployed to. - SecretRef corev1.SecretReference `json:"secretRef"` + // +optional + SecretRef *corev1.SecretReference `json:"secretRef,omitempty"` // Networks defines the pod, service and worker network of the Seed cluster. Networks SeedNetworks `json:"networks"` - // BlockCIDRs is a list of network addresses tha should be blocked for shoot control plane components running + // BlockCIDRs is a list of network addresses that should be blocked for shoot control plane components running // in the seed cluster. // +optional BlockCIDRs []string `json:"blockCIDRs,omitempty"` @@ -551,12 +621,17 @@ type SeedSpec struct { // SeedStatus holds the most recently observed status of the Seed cluster. type SeedStatus struct { - // Gardener holds information about the Gardener which last acted on the Shoot. - // +optional - Gardener Gardener `json:"gardener,omitempty"` // Conditions represents the latest available observations of a Seed's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Conditions []gardencorev1alpha1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // Gardener holds information about the Gardener which last acted on the Seed. + // +optional + Gardener *Gardener `json:"gardener,omitempty"` + // KubernetesVersion is the Kubernetes version of the seed cluster. // +optional - Conditions []gardencorev1alpha1.Condition `json:"conditions,omitempty"` + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` // ObservedGeneration is the most recent generation observed for this Seed. It corresponds to the // Seed's generation, which is updated on mutation by the API Server. // +optional @@ -682,7 +757,6 @@ type SecretBindingList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=x-kubernetes-print-columns:custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,SEED:.spec.cloud.seed,DOMAIN:.spec.dns.domain,VERSION:.spec.kubernetes.version,CONTROL:.status.conditions[?(@.type == 'ControlPlaneHealthy')].status,NODES:.status.conditions[?(@.type == 'EveryNodeReady')].status,SYSTEM:.status.conditions[?(@.type == 'SystemComponentsHealthy')].status,LATEST:.status.lastOperation.state type Shoot struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. @@ -716,7 +790,8 @@ type ShootSpec struct { // Cloud contains information about the cloud environment and their specific settings. Cloud Cloud `json:"cloud"` // DNS contains information about the DNS settings of the Shoot. - DNS DNS `json:"dns"` + // +optional + DNS *DNS `json:"dns,omitempty"` // Extensions contain type and provider information for Shoot extensions. // +optional Extensions []Extension `json:"extensions,omitempty"` @@ -739,8 +814,15 @@ type ShootSpec struct { // ShootStatus holds the most recently observed status of the Shoot cluster. type ShootStatus struct { // Conditions represents the latest available observations of a Shoots's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Conditions []gardencorev1alpha1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // Constraints represents conditions of a Shoot's current state that constraint some operations on it. + // +patchMergeKey=type + // +patchStrategy=merge // +optional - Conditions []gardencorev1alpha1.Condition `json:"conditions,omitempty"` + Constraints []gardencorev1alpha1.Condition `json:"constraints,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // Gardener holds information about the Gardener which last acted on the Shoot. Gardener Gardener `json:"gardener"` // LastOperation holds information about the last operation on the Shoot. @@ -833,7 +915,9 @@ type AWSCloud struct { // Networks holds information about the Kubernetes and infrastructure networks. Networks AWSNetworks `json:"networks"` // Workers is a list of worker groups. - Workers []AWSWorker `json:"workers"` + // +patchMergeKey=name + // +patchStrategy=merge + Workers []AWSWorker `json:"workers" patchStrategy:"merge" patchMergeKey:"name"` // Zones is a list of availability zones to deploy the Shoot cluster to. Zones []string `json:"zones"` } @@ -880,7 +964,9 @@ type Alicloud struct { // Networks holds information about the Kubernetes and infrastructure networks. Networks AlicloudNetworks `json:"networks"` // Workers is a list of worker groups. - Workers []AlicloudWorker `json:"workers"` + // +patchMergeKey=name + // +patchStrategy=merge + Workers []AlicloudWorker `json:"workers" patchStrategy:"merge" patchMergeKey:"name"` // Zones is a list of availability zones to deploy the Shoot cluster to, currently, only one is supported. Zones []string `json:"zones"` } @@ -923,7 +1009,9 @@ type PacketCloud struct { // Networks holds information about the Kubernetes and infrastructure networks. Networks PacketNetworks `json:"networks"` // Workers is a list of worker groups. - Workers []PacketWorker `json:"workers"` + // +patchMergeKey=name + // +patchStrategy=merge + Workers []PacketWorker `json:"workers" patchStrategy:"merge" patchMergeKey:"name"` // Zones is a list of availability zones to deploy the Shoot cluster to, currently, only one is supported. Zones []string `json:"zones"` } @@ -955,7 +1043,9 @@ type AzureCloud struct { // +optional ResourceGroup *AzureResourceGroup `json:"resourceGroup,omitempty"` // Workers is a list of worker groups. - Workers []AzureWorker `json:"workers"` + // +patchMergeKey=name + // +patchStrategy=merge + Workers []AzureWorker `json:"workers" patchStrategy:"merge" patchMergeKey:"name"` // Zones is a list of availability zones to deploy the Shoot cluster to. // +optional Zones []string `json:"zones,omitempty"` @@ -1011,7 +1101,9 @@ type GCPCloud struct { // Networks holds information about the Kubernetes and infrastructure networks. Networks GCPNetworks `json:"networks"` // Workers is a list of worker groups. - Workers []GCPWorker `json:"workers"` + // +patchMergeKey=name + // +patchStrategy=merge + Workers []GCPWorker `json:"workers" patchStrategy:"merge" patchMergeKey:"name"` // Zones is a list of availability zones to deploy the Shoot cluster to. Zones []string `json:"zones"` } @@ -1051,8 +1143,10 @@ type OpenStackCloud struct { // LoadBalancerProvider is the name of the load balancer provider in the OpenStack environment. LoadBalancerProvider string `json:"loadBalancerProvider"` // LoadBalancerClasses available for a dedicated Shoot. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - LoadBalancerClasses []OpenStackLoadBalancerClass `json:"loadBalancerClasses,omitempty"` + LoadBalancerClasses []OpenStackLoadBalancerClass `json:"loadBalancerClasses,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // ShootMachineImage holds information about the machine image to use for all workers. // It will default to the latest version of the first image stated in the referenced CloudProfile if no // value has been provided. @@ -1061,7 +1155,9 @@ type OpenStackCloud struct { // Networks holds information about the Kubernetes and infrastructure networks. Networks OpenStackNetworks `json:"networks"` // Workers is a list of worker groups. - Workers []OpenStackWorker `json:"workers"` + // +patchMergeKey=name + // +patchStrategy=merge + Workers []OpenStackWorker `json:"workers" patchStrategy:"merge" patchMergeKey:"name"` // Zones is a list of availability zones to deploy the Shoot cluster to. Zones []string `json:"zones"` } @@ -1236,6 +1332,10 @@ type NginxIngress struct { // See https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md#configuration-options // +optional Config map[string]string `json:"config,omitempty"` + // ExternalTrafficPolicy controls the `.spec.externalTrafficPolicy` value of the load balancer `Service` + // exposing the nginx-ingress. Defaults to `Cluster`. + // +optional + ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"` } // Monocular describes configuration values for the monocular addon. @@ -1255,8 +1355,10 @@ type KubeLego struct { type Kube2IAM struct { Addon `json:",inline"` // Roles is list of AWS IAM roles which should be created by the Gardener. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - Roles []Kube2IAMRole `json:"roles,omitempty"` + Roles []Kube2IAMRole `json:"roles,omitempty" patchStrategy:"merge" patchMergeKey:"name"` } // Kube2IAMRole allows passing AWS IAM policies which will result in IAM roles. @@ -1325,7 +1427,8 @@ const ( // Hibernation contains information whether the Shoot is suspended or not. type Hibernation struct { - // Enabled is true if the Shoot's desired state is hibernated, false otherwise. + // Enabled specifies whether the Shoot needs to be hibernated or not. If it is true, the Shoot's desired state is to be hibernated. + // If it is false or nil, the Shoot's desired state is to be awaken. // +optional Enabled *bool `json:"enabled,omitempty"` // Schedules determine the hibernation schedules. @@ -1411,8 +1514,10 @@ type KubeAPIServerConfig struct { KubernetesConfig `json:",inline"` // AdmissionPlugins contains the list of user-defined admission plugins (additional to those managed by Gardener), and, if desired, the corresponding // configuration. + // +patchMergeKey=name + // +patchStrategy=merge // +optional - AdmissionPlugins []AdmissionPlugin `json:"admissionPlugins,omitempty"` + AdmissionPlugins []AdmissionPlugin `json:"admissionPlugins,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // APIAudiences are the identifiers of the API. The service account token authenticator will // validate that tokens used against the API are bound to at least one of these audiences. // If `serviceAccountConfig.issuer` is configured and this is not, this defaults to a single @@ -1880,8 +1985,11 @@ const ( ) const ( - // SeedAvailable is a constant for a condition type indicating the Seed cluster availability. - SeedAvailable gardencorev1alpha1.ConditionType = "Available" + // SeedGardenletReady is a constant for a condition type indicating that the Gardenlet is ready. + SeedGardenletReady gardencorev1alpha1.ConditionType = "GardenletReady" + // SeedBootstrapped is a constant for a condition type indicating that the seed cluster has been + // bootstrapped. + SeedBootstrapped gardencorev1alpha1.ConditionType = "Bootstrapped" // ShootControlPlaneHealthy is a constant for a condition type indicating the control plane health. ShootControlPlaneHealthy gardencorev1alpha1.ConditionType = "ControlPlaneHealthy" @@ -1891,6 +1999,8 @@ const ( ShootSystemComponentsHealthy gardencorev1alpha1.ConditionType = "SystemComponentsHealthy" // ShootAPIServerAvailable is a constant for a condition type indicating that the Shoot clusters API server is available. ShootAPIServerAvailable gardencorev1alpha1.ConditionType = "APIServerAvailable" + // ShootHibernationPossible is a constant for a condition type indicating whether the Shoot can be hibernated. + ShootHibernationPossible gardencorev1alpha1.ConditionType = "HibernationPossible" ) const ( diff --git a/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.conversion.go b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.conversion.go new file mode 100644 index 000000000..a9cd85cd2 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.conversion.go @@ -0,0 +1,4959 @@ +// +build !ignore_autogenerated + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1beta1 + +import ( + unsafe "unsafe" + + v1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + garden "github.com/gardener/gardener/pkg/apis/garden" + v1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" + resource "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + intstr "k8s.io/apimachinery/pkg/util/intstr" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*AWSCloud)(nil), (*garden.AWSCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AWSCloud_To_garden_AWSCloud(a.(*AWSCloud), b.(*garden.AWSCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AWSCloud)(nil), (*AWSCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AWSCloud_To_v1beta1_AWSCloud(a.(*garden.AWSCloud), b.(*AWSCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AWSConstraints)(nil), (*garden.AWSConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AWSConstraints_To_garden_AWSConstraints(a.(*AWSConstraints), b.(*garden.AWSConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AWSConstraints)(nil), (*AWSConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AWSConstraints_To_v1beta1_AWSConstraints(a.(*garden.AWSConstraints), b.(*AWSConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AWSNetworks)(nil), (*garden.AWSNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AWSNetworks_To_garden_AWSNetworks(a.(*AWSNetworks), b.(*garden.AWSNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AWSNetworks)(nil), (*AWSNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AWSNetworks_To_v1beta1_AWSNetworks(a.(*garden.AWSNetworks), b.(*AWSNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AWSProfile)(nil), (*garden.AWSProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AWSProfile_To_garden_AWSProfile(a.(*AWSProfile), b.(*garden.AWSProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AWSProfile)(nil), (*AWSProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AWSProfile_To_v1beta1_AWSProfile(a.(*garden.AWSProfile), b.(*AWSProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AWSVPC)(nil), (*garden.AWSVPC)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AWSVPC_To_garden_AWSVPC(a.(*AWSVPC), b.(*garden.AWSVPC), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AWSVPC)(nil), (*AWSVPC)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AWSVPC_To_v1beta1_AWSVPC(a.(*garden.AWSVPC), b.(*AWSVPC), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Addon)(nil), (*garden.Addon)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Addon_To_garden_Addon(a.(*Addon), b.(*garden.Addon), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Addon)(nil), (*Addon)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Addon_To_v1beta1_Addon(a.(*garden.Addon), b.(*Addon), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AddonClusterAutoscaler)(nil), (*garden.AddonClusterAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AddonClusterAutoscaler_To_garden_AddonClusterAutoscaler(a.(*AddonClusterAutoscaler), b.(*garden.AddonClusterAutoscaler), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AddonClusterAutoscaler)(nil), (*AddonClusterAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AddonClusterAutoscaler_To_v1beta1_AddonClusterAutoscaler(a.(*garden.AddonClusterAutoscaler), b.(*AddonClusterAutoscaler), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Addons)(nil), (*garden.Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Addons_To_garden_Addons(a.(*Addons), b.(*garden.Addons), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Addons)(nil), (*Addons)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Addons_To_v1beta1_Addons(a.(*garden.Addons), b.(*Addons), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AdmissionPlugin)(nil), (*garden.AdmissionPlugin)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AdmissionPlugin_To_garden_AdmissionPlugin(a.(*AdmissionPlugin), b.(*garden.AdmissionPlugin), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AdmissionPlugin)(nil), (*AdmissionPlugin)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AdmissionPlugin_To_v1beta1_AdmissionPlugin(a.(*garden.AdmissionPlugin), b.(*AdmissionPlugin), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Alerting)(nil), (*garden.Alerting)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Alerting_To_garden_Alerting(a.(*Alerting), b.(*garden.Alerting), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Alerting)(nil), (*Alerting)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Alerting_To_v1beta1_Alerting(a.(*garden.Alerting), b.(*Alerting), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Alicloud)(nil), (*garden.Alicloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Alicloud_To_garden_Alicloud(a.(*Alicloud), b.(*garden.Alicloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Alicloud)(nil), (*Alicloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Alicloud_To_v1beta1_Alicloud(a.(*garden.Alicloud), b.(*Alicloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AlicloudConstraints)(nil), (*garden.AlicloudConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AlicloudConstraints_To_garden_AlicloudConstraints(a.(*AlicloudConstraints), b.(*garden.AlicloudConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AlicloudConstraints)(nil), (*AlicloudConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AlicloudConstraints_To_v1beta1_AlicloudConstraints(a.(*garden.AlicloudConstraints), b.(*AlicloudConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AlicloudMachineType)(nil), (*garden.AlicloudMachineType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AlicloudMachineType_To_garden_AlicloudMachineType(a.(*AlicloudMachineType), b.(*garden.AlicloudMachineType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AlicloudMachineType)(nil), (*AlicloudMachineType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AlicloudMachineType_To_v1beta1_AlicloudMachineType(a.(*garden.AlicloudMachineType), b.(*AlicloudMachineType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AlicloudNetworks)(nil), (*garden.AlicloudNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AlicloudNetworks_To_garden_AlicloudNetworks(a.(*AlicloudNetworks), b.(*garden.AlicloudNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AlicloudNetworks)(nil), (*AlicloudNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AlicloudNetworks_To_v1beta1_AlicloudNetworks(a.(*garden.AlicloudNetworks), b.(*AlicloudNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AlicloudProfile)(nil), (*garden.AlicloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AlicloudProfile_To_garden_AlicloudProfile(a.(*AlicloudProfile), b.(*garden.AlicloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AlicloudProfile)(nil), (*AlicloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AlicloudProfile_To_v1beta1_AlicloudProfile(a.(*garden.AlicloudProfile), b.(*AlicloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AlicloudVPC)(nil), (*garden.AlicloudVPC)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AlicloudVPC_To_garden_AlicloudVPC(a.(*AlicloudVPC), b.(*garden.AlicloudVPC), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AlicloudVPC)(nil), (*AlicloudVPC)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AlicloudVPC_To_v1beta1_AlicloudVPC(a.(*garden.AlicloudVPC), b.(*AlicloudVPC), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AlicloudVolumeType)(nil), (*garden.AlicloudVolumeType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AlicloudVolumeType_To_garden_AlicloudVolumeType(a.(*AlicloudVolumeType), b.(*garden.AlicloudVolumeType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AlicloudVolumeType)(nil), (*AlicloudVolumeType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AlicloudVolumeType_To_v1beta1_AlicloudVolumeType(a.(*garden.AlicloudVolumeType), b.(*AlicloudVolumeType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuditConfig)(nil), (*garden.AuditConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AuditConfig_To_garden_AuditConfig(a.(*AuditConfig), b.(*garden.AuditConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AuditConfig)(nil), (*AuditConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AuditConfig_To_v1beta1_AuditConfig(a.(*garden.AuditConfig), b.(*AuditConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AuditPolicy)(nil), (*garden.AuditPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AuditPolicy_To_garden_AuditPolicy(a.(*AuditPolicy), b.(*garden.AuditPolicy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AuditPolicy)(nil), (*AuditPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AuditPolicy_To_v1beta1_AuditPolicy(a.(*garden.AuditPolicy), b.(*AuditPolicy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AzureCloud)(nil), (*garden.AzureCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AzureCloud_To_garden_AzureCloud(a.(*AzureCloud), b.(*garden.AzureCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AzureCloud)(nil), (*AzureCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AzureCloud_To_v1beta1_AzureCloud(a.(*garden.AzureCloud), b.(*AzureCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AzureConstraints)(nil), (*garden.AzureConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AzureConstraints_To_garden_AzureConstraints(a.(*AzureConstraints), b.(*garden.AzureConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AzureConstraints)(nil), (*AzureConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AzureConstraints_To_v1beta1_AzureConstraints(a.(*garden.AzureConstraints), b.(*AzureConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AzureDomainCount)(nil), (*garden.AzureDomainCount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AzureDomainCount_To_garden_AzureDomainCount(a.(*AzureDomainCount), b.(*garden.AzureDomainCount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AzureDomainCount)(nil), (*AzureDomainCount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AzureDomainCount_To_v1beta1_AzureDomainCount(a.(*garden.AzureDomainCount), b.(*AzureDomainCount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AzureNetworks)(nil), (*garden.AzureNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AzureNetworks_To_garden_AzureNetworks(a.(*AzureNetworks), b.(*garden.AzureNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AzureNetworks)(nil), (*AzureNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AzureNetworks_To_v1beta1_AzureNetworks(a.(*garden.AzureNetworks), b.(*AzureNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AzureProfile)(nil), (*garden.AzureProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AzureProfile_To_garden_AzureProfile(a.(*AzureProfile), b.(*garden.AzureProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AzureProfile)(nil), (*AzureProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AzureProfile_To_v1beta1_AzureProfile(a.(*garden.AzureProfile), b.(*AzureProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AzureResourceGroup)(nil), (*garden.AzureResourceGroup)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AzureResourceGroup_To_garden_AzureResourceGroup(a.(*AzureResourceGroup), b.(*garden.AzureResourceGroup), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AzureResourceGroup)(nil), (*AzureResourceGroup)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AzureResourceGroup_To_v1beta1_AzureResourceGroup(a.(*garden.AzureResourceGroup), b.(*AzureResourceGroup), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AzureVNet)(nil), (*garden.AzureVNet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AzureVNet_To_garden_AzureVNet(a.(*AzureVNet), b.(*garden.AzureVNet), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.AzureVNet)(nil), (*AzureVNet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_AzureVNet_To_v1beta1_AzureVNet(a.(*garden.AzureVNet), b.(*AzureVNet), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Cloud)(nil), (*garden.Cloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Cloud_To_garden_Cloud(a.(*Cloud), b.(*garden.Cloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Cloud)(nil), (*Cloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Cloud_To_v1beta1_Cloud(a.(*garden.Cloud), b.(*Cloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudControllerManagerConfig)(nil), (*garden.CloudControllerManagerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudControllerManagerConfig_To_garden_CloudControllerManagerConfig(a.(*CloudControllerManagerConfig), b.(*garden.CloudControllerManagerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.CloudControllerManagerConfig)(nil), (*CloudControllerManagerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudControllerManagerConfig_To_v1beta1_CloudControllerManagerConfig(a.(*garden.CloudControllerManagerConfig), b.(*CloudControllerManagerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudProfile)(nil), (*garden.CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProfile_To_garden_CloudProfile(a.(*CloudProfile), b.(*garden.CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.CloudProfile)(nil), (*CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfile_To_v1beta1_CloudProfile(a.(*garden.CloudProfile), b.(*CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudProfileList)(nil), (*garden.CloudProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProfileList_To_garden_CloudProfileList(a.(*CloudProfileList), b.(*garden.CloudProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.CloudProfileList)(nil), (*CloudProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfileList_To_v1beta1_CloudProfileList(a.(*garden.CloudProfileList), b.(*CloudProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CloudProfileSpec)(nil), (*garden.CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(a.(*CloudProfileSpec), b.(*garden.CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.CloudProfileSpec)(nil), (*CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(a.(*garden.CloudProfileSpec), b.(*CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterAutoscaler)(nil), (*garden.ClusterAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler(a.(*ClusterAutoscaler), b.(*garden.ClusterAutoscaler), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ClusterAutoscaler)(nil), (*ClusterAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler(a.(*garden.ClusterAutoscaler), b.(*ClusterAutoscaler), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNS)(nil), (*garden.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNS_To_garden_DNS(a.(*DNS), b.(*garden.DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_DNS_To_v1beta1_DNS(a.(*garden.DNS), b.(*DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNSProviderConstraint)(nil), (*garden.DNSProviderConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNSProviderConstraint_To_garden_DNSProviderConstraint(a.(*DNSProviderConstraint), b.(*garden.DNSProviderConstraint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.DNSProviderConstraint)(nil), (*DNSProviderConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_DNSProviderConstraint_To_v1beta1_DNSProviderConstraint(a.(*garden.DNSProviderConstraint), b.(*DNSProviderConstraint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Extension)(nil), (*garden.Extension)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Extension_To_garden_Extension(a.(*Extension), b.(*garden.Extension), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Extension)(nil), (*Extension)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Extension_To_v1beta1_Extension(a.(*garden.Extension), b.(*Extension), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GCPCloud)(nil), (*garden.GCPCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_GCPCloud_To_garden_GCPCloud(a.(*GCPCloud), b.(*garden.GCPCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.GCPCloud)(nil), (*GCPCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_GCPCloud_To_v1beta1_GCPCloud(a.(*garden.GCPCloud), b.(*GCPCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GCPConstraints)(nil), (*garden.GCPConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_GCPConstraints_To_garden_GCPConstraints(a.(*GCPConstraints), b.(*garden.GCPConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.GCPConstraints)(nil), (*GCPConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_GCPConstraints_To_v1beta1_GCPConstraints(a.(*garden.GCPConstraints), b.(*GCPConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GCPNetworks)(nil), (*garden.GCPNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_GCPNetworks_To_garden_GCPNetworks(a.(*GCPNetworks), b.(*garden.GCPNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.GCPNetworks)(nil), (*GCPNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_GCPNetworks_To_v1beta1_GCPNetworks(a.(*garden.GCPNetworks), b.(*GCPNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GCPProfile)(nil), (*garden.GCPProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_GCPProfile_To_garden_GCPProfile(a.(*GCPProfile), b.(*garden.GCPProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.GCPProfile)(nil), (*GCPProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_GCPProfile_To_v1beta1_GCPProfile(a.(*garden.GCPProfile), b.(*GCPProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GCPVPC)(nil), (*garden.GCPVPC)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_GCPVPC_To_garden_GCPVPC(a.(*GCPVPC), b.(*garden.GCPVPC), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.GCPVPC)(nil), (*GCPVPC)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_GCPVPC_To_v1beta1_GCPVPC(a.(*garden.GCPVPC), b.(*GCPVPC), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Gardener)(nil), (*garden.Gardener)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Gardener_To_garden_Gardener(a.(*Gardener), b.(*garden.Gardener), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Gardener)(nil), (*Gardener)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Gardener_To_v1beta1_Gardener(a.(*garden.Gardener), b.(*Gardener), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Heapster)(nil), (*garden.Heapster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Heapster_To_garden_Heapster(a.(*Heapster), b.(*garden.Heapster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Heapster)(nil), (*Heapster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Heapster_To_v1beta1_Heapster(a.(*garden.Heapster), b.(*Heapster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HelmTiller)(nil), (*garden.HelmTiller)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HelmTiller_To_garden_HelmTiller(a.(*HelmTiller), b.(*garden.HelmTiller), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.HelmTiller)(nil), (*HelmTiller)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_HelmTiller_To_v1beta1_HelmTiller(a.(*garden.HelmTiller), b.(*HelmTiller), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Hibernation)(nil), (*garden.Hibernation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Hibernation_To_garden_Hibernation(a.(*Hibernation), b.(*garden.Hibernation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Hibernation)(nil), (*Hibernation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Hibernation_To_v1beta1_Hibernation(a.(*garden.Hibernation), b.(*Hibernation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HibernationSchedule)(nil), (*garden.HibernationSchedule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HibernationSchedule_To_garden_HibernationSchedule(a.(*HibernationSchedule), b.(*garden.HibernationSchedule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.HibernationSchedule)(nil), (*HibernationSchedule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_HibernationSchedule_To_v1beta1_HibernationSchedule(a.(*garden.HibernationSchedule), b.(*HibernationSchedule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HorizontalPodAutoscalerConfig)(nil), (*garden.HorizontalPodAutoscalerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(a.(*HorizontalPodAutoscalerConfig), b.(*garden.HorizontalPodAutoscalerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.HorizontalPodAutoscalerConfig)(nil), (*HorizontalPodAutoscalerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig(a.(*garden.HorizontalPodAutoscalerConfig), b.(*HorizontalPodAutoscalerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*K8SNetworks)(nil), (*garden.K8SNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_K8SNetworks_To_garden_K8SNetworks(a.(*K8SNetworks), b.(*garden.K8SNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.K8SNetworks)(nil), (*K8SNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_K8SNetworks_To_v1beta1_K8SNetworks(a.(*garden.K8SNetworks), b.(*K8SNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Kube2IAM)(nil), (*garden.Kube2IAM)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Kube2IAM_To_garden_Kube2IAM(a.(*Kube2IAM), b.(*garden.Kube2IAM), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Kube2IAM)(nil), (*Kube2IAM)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Kube2IAM_To_v1beta1_Kube2IAM(a.(*garden.Kube2IAM), b.(*Kube2IAM), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Kube2IAMRole)(nil), (*garden.Kube2IAMRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Kube2IAMRole_To_garden_Kube2IAMRole(a.(*Kube2IAMRole), b.(*garden.Kube2IAMRole), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Kube2IAMRole)(nil), (*Kube2IAMRole)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Kube2IAMRole_To_v1beta1_Kube2IAMRole(a.(*garden.Kube2IAMRole), b.(*Kube2IAMRole), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeAPIServerConfig)(nil), (*garden.KubeAPIServerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(a.(*KubeAPIServerConfig), b.(*garden.KubeAPIServerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeAPIServerConfig)(nil), (*KubeAPIServerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig(a.(*garden.KubeAPIServerConfig), b.(*KubeAPIServerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeControllerManagerConfig)(nil), (*garden.KubeControllerManagerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(a.(*KubeControllerManagerConfig), b.(*garden.KubeControllerManagerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeControllerManagerConfig)(nil), (*KubeControllerManagerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig(a.(*garden.KubeControllerManagerConfig), b.(*KubeControllerManagerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeLego)(nil), (*garden.KubeLego)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeLego_To_garden_KubeLego(a.(*KubeLego), b.(*garden.KubeLego), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeLego)(nil), (*KubeLego)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeLego_To_v1beta1_KubeLego(a.(*garden.KubeLego), b.(*KubeLego), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeProxyConfig)(nil), (*garden.KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeProxyConfig_To_garden_KubeProxyConfig(a.(*KubeProxyConfig), b.(*garden.KubeProxyConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeProxyConfig)(nil), (*KubeProxyConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeProxyConfig_To_v1beta1_KubeProxyConfig(a.(*garden.KubeProxyConfig), b.(*KubeProxyConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeSchedulerConfig)(nil), (*garden.KubeSchedulerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(a.(*KubeSchedulerConfig), b.(*garden.KubeSchedulerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeSchedulerConfig)(nil), (*KubeSchedulerConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeSchedulerConfig_To_v1beta1_KubeSchedulerConfig(a.(*garden.KubeSchedulerConfig), b.(*KubeSchedulerConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfig)(nil), (*garden.KubeletConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeletConfig_To_garden_KubeletConfig(a.(*KubeletConfig), b.(*garden.KubeletConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfig)(nil), (*KubeletConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfig_To_v1beta1_KubeletConfig(a.(*garden.KubeletConfig), b.(*KubeletConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfigEviction)(nil), (*garden.KubeletConfigEviction)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeletConfigEviction_To_garden_KubeletConfigEviction(a.(*KubeletConfigEviction), b.(*garden.KubeletConfigEviction), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfigEviction)(nil), (*KubeletConfigEviction)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfigEviction_To_v1beta1_KubeletConfigEviction(a.(*garden.KubeletConfigEviction), b.(*KubeletConfigEviction), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfigEvictionMinimumReclaim)(nil), (*garden.KubeletConfigEvictionMinimumReclaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(a.(*KubeletConfigEvictionMinimumReclaim), b.(*garden.KubeletConfigEvictionMinimumReclaim), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfigEvictionMinimumReclaim)(nil), (*KubeletConfigEvictionMinimumReclaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfigEvictionMinimumReclaim_To_v1beta1_KubeletConfigEvictionMinimumReclaim(a.(*garden.KubeletConfigEvictionMinimumReclaim), b.(*KubeletConfigEvictionMinimumReclaim), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeletConfigEvictionSoftGracePeriod)(nil), (*garden.KubeletConfigEvictionSoftGracePeriod)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(a.(*KubeletConfigEvictionSoftGracePeriod), b.(*garden.KubeletConfigEvictionSoftGracePeriod), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubeletConfigEvictionSoftGracePeriod)(nil), (*KubeletConfigEvictionSoftGracePeriod)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1beta1_KubeletConfigEvictionSoftGracePeriod(a.(*garden.KubeletConfigEvictionSoftGracePeriod), b.(*KubeletConfigEvictionSoftGracePeriod), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Kubernetes)(nil), (*garden.Kubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Kubernetes_To_garden_Kubernetes(a.(*Kubernetes), b.(*garden.Kubernetes), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Kubernetes)(nil), (*Kubernetes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Kubernetes_To_v1beta1_Kubernetes(a.(*garden.Kubernetes), b.(*Kubernetes), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesConfig)(nil), (*garden.KubernetesConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(a.(*KubernetesConfig), b.(*garden.KubernetesConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubernetesConfig)(nil), (*KubernetesConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(a.(*garden.KubernetesConfig), b.(*KubernetesConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesConstraints)(nil), (*garden.KubernetesConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubernetesConstraints_To_garden_KubernetesConstraints(a.(*KubernetesConstraints), b.(*garden.KubernetesConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubernetesConstraints)(nil), (*KubernetesConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(a.(*garden.KubernetesConstraints), b.(*KubernetesConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesDashboard)(nil), (*garden.KubernetesDashboard)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubernetesDashboard_To_garden_KubernetesDashboard(a.(*KubernetesDashboard), b.(*garden.KubernetesDashboard), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubernetesDashboard)(nil), (*KubernetesDashboard)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesDashboard_To_v1beta1_KubernetesDashboard(a.(*garden.KubernetesDashboard), b.(*KubernetesDashboard), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubernetesVersion)(nil), (*garden.KubernetesVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubernetesVersion_To_garden_KubernetesVersion(a.(*KubernetesVersion), b.(*garden.KubernetesVersion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.KubernetesVersion)(nil), (*KubernetesVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesVersion_To_v1beta1_KubernetesVersion(a.(*garden.KubernetesVersion), b.(*KubernetesVersion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineImage)(nil), (*garden.MachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineImage_To_garden_MachineImage(a.(*MachineImage), b.(*garden.MachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MachineImage)(nil), (*MachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineImage_To_v1beta1_MachineImage(a.(*garden.MachineImage), b.(*MachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineImageVersion)(nil), (*garden.MachineImageVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineImageVersion_To_garden_MachineImageVersion(a.(*MachineImageVersion), b.(*garden.MachineImageVersion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MachineImageVersion)(nil), (*MachineImageVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineImageVersion_To_v1beta1_MachineImageVersion(a.(*garden.MachineImageVersion), b.(*MachineImageVersion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineType)(nil), (*garden.MachineType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineType_To_garden_MachineType(a.(*MachineType), b.(*garden.MachineType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MachineType)(nil), (*MachineType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineType_To_v1beta1_MachineType(a.(*garden.MachineType), b.(*MachineType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineTypeStorage)(nil), (*garden.MachineTypeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineTypeStorage_To_garden_MachineTypeStorage(a.(*MachineTypeStorage), b.(*garden.MachineTypeStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MachineTypeStorage)(nil), (*MachineTypeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineTypeStorage_To_v1beta1_MachineTypeStorage(a.(*garden.MachineTypeStorage), b.(*MachineTypeStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Maintenance)(nil), (*garden.Maintenance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Maintenance_To_garden_Maintenance(a.(*Maintenance), b.(*garden.Maintenance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Maintenance)(nil), (*Maintenance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Maintenance_To_v1beta1_Maintenance(a.(*garden.Maintenance), b.(*Maintenance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MaintenanceAutoUpdate)(nil), (*garden.MaintenanceAutoUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(a.(*MaintenanceAutoUpdate), b.(*garden.MaintenanceAutoUpdate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MaintenanceAutoUpdate)(nil), (*MaintenanceAutoUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate(a.(*garden.MaintenanceAutoUpdate), b.(*MaintenanceAutoUpdate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MaintenanceTimeWindow)(nil), (*garden.MaintenanceTimeWindow)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(a.(*MaintenanceTimeWindow), b.(*garden.MaintenanceTimeWindow), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.MaintenanceTimeWindow)(nil), (*MaintenanceTimeWindow)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MaintenanceTimeWindow_To_v1beta1_MaintenanceTimeWindow(a.(*garden.MaintenanceTimeWindow), b.(*MaintenanceTimeWindow), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Monitoring)(nil), (*garden.Monitoring)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Monitoring_To_garden_Monitoring(a.(*Monitoring), b.(*garden.Monitoring), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Monitoring)(nil), (*Monitoring)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Monitoring_To_v1beta1_Monitoring(a.(*garden.Monitoring), b.(*Monitoring), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Monocular)(nil), (*garden.Monocular)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Monocular_To_garden_Monocular(a.(*Monocular), b.(*garden.Monocular), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Monocular)(nil), (*Monocular)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Monocular_To_v1beta1_Monocular(a.(*garden.Monocular), b.(*Monocular), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Networking)(nil), (*garden.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Networking_To_garden_Networking(a.(*Networking), b.(*garden.Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Networking_To_v1beta1_Networking(a.(*garden.Networking), b.(*Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NginxIngress)(nil), (*garden.NginxIngress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NginxIngress_To_garden_NginxIngress(a.(*NginxIngress), b.(*garden.NginxIngress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.NginxIngress)(nil), (*NginxIngress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_NginxIngress_To_v1beta1_NginxIngress(a.(*garden.NginxIngress), b.(*NginxIngress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCConfig)(nil), (*garden.OIDCConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OIDCConfig_To_garden_OIDCConfig(a.(*OIDCConfig), b.(*garden.OIDCConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OIDCConfig)(nil), (*OIDCConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OIDCConfig_To_v1beta1_OIDCConfig(a.(*garden.OIDCConfig), b.(*OIDCConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenIDConnectClientAuthentication)(nil), (*garden.OpenIDConnectClientAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(a.(*OpenIDConnectClientAuthentication), b.(*garden.OpenIDConnectClientAuthentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenIDConnectClientAuthentication)(nil), (*OpenIDConnectClientAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication(a.(*garden.OpenIDConnectClientAuthentication), b.(*OpenIDConnectClientAuthentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackCloud)(nil), (*garden.OpenStackCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackCloud_To_garden_OpenStackCloud(a.(*OpenStackCloud), b.(*garden.OpenStackCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenStackCloud)(nil), (*OpenStackCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenStackCloud_To_v1beta1_OpenStackCloud(a.(*garden.OpenStackCloud), b.(*OpenStackCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackConstraints)(nil), (*garden.OpenStackConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackConstraints_To_garden_OpenStackConstraints(a.(*OpenStackConstraints), b.(*garden.OpenStackConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenStackConstraints)(nil), (*OpenStackConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenStackConstraints_To_v1beta1_OpenStackConstraints(a.(*garden.OpenStackConstraints), b.(*OpenStackConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackFloatingPool)(nil), (*garden.OpenStackFloatingPool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackFloatingPool_To_garden_OpenStackFloatingPool(a.(*OpenStackFloatingPool), b.(*garden.OpenStackFloatingPool), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenStackFloatingPool)(nil), (*OpenStackFloatingPool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenStackFloatingPool_To_v1beta1_OpenStackFloatingPool(a.(*garden.OpenStackFloatingPool), b.(*OpenStackFloatingPool), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackLoadBalancerClass)(nil), (*garden.OpenStackLoadBalancerClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackLoadBalancerClass_To_garden_OpenStackLoadBalancerClass(a.(*OpenStackLoadBalancerClass), b.(*garden.OpenStackLoadBalancerClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenStackLoadBalancerClass)(nil), (*OpenStackLoadBalancerClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenStackLoadBalancerClass_To_v1beta1_OpenStackLoadBalancerClass(a.(*garden.OpenStackLoadBalancerClass), b.(*OpenStackLoadBalancerClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackLoadBalancerProvider)(nil), (*garden.OpenStackLoadBalancerProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackLoadBalancerProvider_To_garden_OpenStackLoadBalancerProvider(a.(*OpenStackLoadBalancerProvider), b.(*garden.OpenStackLoadBalancerProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenStackLoadBalancerProvider)(nil), (*OpenStackLoadBalancerProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenStackLoadBalancerProvider_To_v1beta1_OpenStackLoadBalancerProvider(a.(*garden.OpenStackLoadBalancerProvider), b.(*OpenStackLoadBalancerProvider), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackMachineType)(nil), (*garden.OpenStackMachineType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackMachineType_To_garden_OpenStackMachineType(a.(*OpenStackMachineType), b.(*garden.OpenStackMachineType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenStackMachineType)(nil), (*OpenStackMachineType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenStackMachineType_To_v1beta1_OpenStackMachineType(a.(*garden.OpenStackMachineType), b.(*OpenStackMachineType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackNetworks)(nil), (*garden.OpenStackNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackNetworks_To_garden_OpenStackNetworks(a.(*OpenStackNetworks), b.(*garden.OpenStackNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenStackNetworks)(nil), (*OpenStackNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenStackNetworks_To_v1beta1_OpenStackNetworks(a.(*garden.OpenStackNetworks), b.(*OpenStackNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackProfile)(nil), (*garden.OpenStackProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackProfile_To_garden_OpenStackProfile(a.(*OpenStackProfile), b.(*garden.OpenStackProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenStackProfile)(nil), (*OpenStackProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenStackProfile_To_v1beta1_OpenStackProfile(a.(*garden.OpenStackProfile), b.(*OpenStackProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OpenStackRouter)(nil), (*garden.OpenStackRouter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackRouter_To_garden_OpenStackRouter(a.(*OpenStackRouter), b.(*garden.OpenStackRouter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.OpenStackRouter)(nil), (*OpenStackRouter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_OpenStackRouter_To_v1beta1_OpenStackRouter(a.(*garden.OpenStackRouter), b.(*OpenStackRouter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PacketCloud)(nil), (*garden.PacketCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PacketCloud_To_garden_PacketCloud(a.(*PacketCloud), b.(*garden.PacketCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.PacketCloud)(nil), (*PacketCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_PacketCloud_To_v1beta1_PacketCloud(a.(*garden.PacketCloud), b.(*PacketCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PacketConstraints)(nil), (*garden.PacketConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PacketConstraints_To_garden_PacketConstraints(a.(*PacketConstraints), b.(*garden.PacketConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.PacketConstraints)(nil), (*PacketConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_PacketConstraints_To_v1beta1_PacketConstraints(a.(*garden.PacketConstraints), b.(*PacketConstraints), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PacketNetworks)(nil), (*garden.PacketNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PacketNetworks_To_garden_PacketNetworks(a.(*PacketNetworks), b.(*garden.PacketNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.PacketNetworks)(nil), (*PacketNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_PacketNetworks_To_v1beta1_PacketNetworks(a.(*garden.PacketNetworks), b.(*PacketNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PacketProfile)(nil), (*garden.PacketProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PacketProfile_To_garden_PacketProfile(a.(*PacketProfile), b.(*garden.PacketProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.PacketProfile)(nil), (*PacketProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_PacketProfile_To_v1beta1_PacketProfile(a.(*garden.PacketProfile), b.(*PacketProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Project)(nil), (*garden.Project)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Project_To_garden_Project(a.(*Project), b.(*garden.Project), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Project)(nil), (*Project)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Project_To_v1beta1_Project(a.(*garden.Project), b.(*Project), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectList)(nil), (*garden.ProjectList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProjectList_To_garden_ProjectList(a.(*ProjectList), b.(*garden.ProjectList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectList)(nil), (*ProjectList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectList_To_v1beta1_ProjectList(a.(*garden.ProjectList), b.(*ProjectList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectSpec)(nil), (*garden.ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProjectSpec_To_garden_ProjectSpec(a.(*ProjectSpec), b.(*garden.ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectSpec)(nil), (*ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectSpec_To_v1beta1_ProjectSpec(a.(*garden.ProjectSpec), b.(*ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ProjectStatus)(nil), (*garden.ProjectStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProjectStatus_To_garden_ProjectStatus(a.(*ProjectStatus), b.(*garden.ProjectStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ProjectStatus)(nil), (*ProjectStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectStatus_To_v1beta1_ProjectStatus(a.(*garden.ProjectStatus), b.(*ProjectStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Quota)(nil), (*garden.Quota)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Quota_To_garden_Quota(a.(*Quota), b.(*garden.Quota), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Quota)(nil), (*Quota)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Quota_To_v1beta1_Quota(a.(*garden.Quota), b.(*Quota), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*QuotaList)(nil), (*garden.QuotaList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_QuotaList_To_garden_QuotaList(a.(*QuotaList), b.(*garden.QuotaList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.QuotaList)(nil), (*QuotaList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_QuotaList_To_v1beta1_QuotaList(a.(*garden.QuotaList), b.(*QuotaList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*QuotaSpec)(nil), (*garden.QuotaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_QuotaSpec_To_garden_QuotaSpec(a.(*QuotaSpec), b.(*garden.QuotaSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.QuotaSpec)(nil), (*QuotaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_QuotaSpec_To_v1beta1_QuotaSpec(a.(*garden.QuotaSpec), b.(*QuotaSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecretBinding)(nil), (*garden.SecretBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SecretBinding_To_garden_SecretBinding(a.(*SecretBinding), b.(*garden.SecretBinding), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SecretBinding)(nil), (*SecretBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SecretBinding_To_v1beta1_SecretBinding(a.(*garden.SecretBinding), b.(*SecretBinding), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecretBindingList)(nil), (*garden.SecretBindingList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SecretBindingList_To_garden_SecretBindingList(a.(*SecretBindingList), b.(*garden.SecretBindingList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SecretBindingList)(nil), (*SecretBindingList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SecretBindingList_To_v1beta1_SecretBindingList(a.(*garden.SecretBindingList), b.(*SecretBindingList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Seed)(nil), (*garden.Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Seed_To_garden_Seed(a.(*Seed), b.(*garden.Seed), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Seed)(nil), (*Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Seed_To_v1beta1_Seed(a.(*garden.Seed), b.(*Seed), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedCloud)(nil), (*garden.SeedCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedCloud_To_garden_SeedCloud(a.(*SeedCloud), b.(*garden.SeedCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedCloud)(nil), (*SeedCloud)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedCloud_To_v1beta1_SeedCloud(a.(*garden.SeedCloud), b.(*SeedCloud), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedList)(nil), (*garden.SeedList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedList_To_garden_SeedList(a.(*SeedList), b.(*garden.SeedList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedList)(nil), (*SeedList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedList_To_v1beta1_SeedList(a.(*garden.SeedList), b.(*SeedList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedNetworks)(nil), (*garden.SeedNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedNetworks_To_garden_SeedNetworks(a.(*SeedNetworks), b.(*garden.SeedNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedNetworks)(nil), (*SeedNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedNetworks_To_v1beta1_SeedNetworks(a.(*garden.SeedNetworks), b.(*SeedNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedSpec)(nil), (*garden.SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedSpec_To_garden_SeedSpec(a.(*SeedSpec), b.(*garden.SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedSpec)(nil), (*SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedSpec_To_v1beta1_SeedSpec(a.(*garden.SeedSpec), b.(*SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SeedStatus)(nil), (*garden.SeedStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedStatus_To_garden_SeedStatus(a.(*SeedStatus), b.(*garden.SeedStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.SeedStatus)(nil), (*SeedStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedStatus_To_v1beta1_SeedStatus(a.(*garden.SeedStatus), b.(*SeedStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ServiceAccountConfig)(nil), (*garden.ServiceAccountConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ServiceAccountConfig_To_garden_ServiceAccountConfig(a.(*ServiceAccountConfig), b.(*garden.ServiceAccountConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ServiceAccountConfig)(nil), (*ServiceAccountConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ServiceAccountConfig_To_v1beta1_ServiceAccountConfig(a.(*garden.ServiceAccountConfig), b.(*ServiceAccountConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Shoot)(nil), (*garden.Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Shoot_To_garden_Shoot(a.(*Shoot), b.(*garden.Shoot), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Shoot)(nil), (*Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Shoot_To_v1beta1_Shoot(a.(*garden.Shoot), b.(*Shoot), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootList)(nil), (*garden.ShootList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootList_To_garden_ShootList(a.(*ShootList), b.(*garden.ShootList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootList)(nil), (*ShootList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootList_To_v1beta1_ShootList(a.(*garden.ShootList), b.(*ShootList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootMachineImage)(nil), (*garden.ShootMachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(a.(*ShootMachineImage), b.(*garden.ShootMachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootMachineImage)(nil), (*ShootMachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(a.(*garden.ShootMachineImage), b.(*ShootMachineImage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootNetworks)(nil), (*garden.ShootNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootNetworks_To_garden_ShootNetworks(a.(*ShootNetworks), b.(*garden.ShootNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootNetworks)(nil), (*ShootNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootNetworks_To_v1beta1_ShootNetworks(a.(*garden.ShootNetworks), b.(*ShootNetworks), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootSpec)(nil), (*garden.ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootSpec_To_garden_ShootSpec(a.(*ShootSpec), b.(*garden.ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootSpec)(nil), (*ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootSpec_To_v1beta1_ShootSpec(a.(*garden.ShootSpec), b.(*ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ShootStatus)(nil), (*garden.ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootStatus_To_garden_ShootStatus(a.(*ShootStatus), b.(*garden.ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.ShootStatus)(nil), (*ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootStatus_To_v1beta1_ShootStatus(a.(*garden.ShootStatus), b.(*ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*VolumeType)(nil), (*garden.VolumeType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_VolumeType_To_garden_VolumeType(a.(*VolumeType), b.(*garden.VolumeType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.VolumeType)(nil), (*VolumeType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_VolumeType_To_v1beta1_VolumeType(a.(*garden.VolumeType), b.(*VolumeType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Worker)(nil), (*garden.Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Worker_To_garden_Worker(a.(*Worker), b.(*garden.Worker), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Worker)(nil), (*Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Worker_To_v1beta1_Worker(a.(*garden.Worker), b.(*Worker), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Zone)(nil), (*garden.Zone)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Zone_To_garden_Zone(a.(*Zone), b.(*garden.Zone), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*garden.Zone)(nil), (*Zone)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Zone_To_v1beta1_Zone(a.(*garden.Zone), b.(*Zone), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.CloudProfileSpec)(nil), (*CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(a.(*garden.CloudProfileSpec), b.(*CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.CloudProfile)(nil), (*CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_CloudProfile_To_v1beta1_CloudProfile(a.(*garden.CloudProfile), b.(*CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_DNS_To_v1beta1_DNS(a.(*garden.DNS), b.(*DNS), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.KubernetesConstraints)(nil), (*KubernetesConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(a.(*garden.KubernetesConstraints), b.(*KubernetesConstraints), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.MachineImage)(nil), (*MachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_MachineImage_To_v1beta1_MachineImage(a.(*garden.MachineImage), b.(*MachineImage), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Networking_To_v1beta1_Networking(a.(*garden.Networking), b.(*Networking), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.ProjectSpec)(nil), (*ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ProjectSpec_To_v1beta1_ProjectSpec(a.(*garden.ProjectSpec), b.(*ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.QuotaSpec)(nil), (*QuotaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_QuotaSpec_To_v1beta1_QuotaSpec(a.(*garden.QuotaSpec), b.(*QuotaSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.SeedNetworks)(nil), (*SeedNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedNetworks_To_v1beta1_SeedNetworks(a.(*garden.SeedNetworks), b.(*SeedNetworks), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.SeedSpec)(nil), (*SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_SeedSpec_To_v1beta1_SeedSpec(a.(*garden.SeedSpec), b.(*SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Seed)(nil), (*Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Seed_To_v1beta1_Seed(a.(*garden.Seed), b.(*Seed), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.ShootSpec)(nil), (*ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootSpec_To_v1beta1_ShootSpec(a.(*garden.ShootSpec), b.(*ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.ShootStatus)(nil), (*ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_ShootStatus_To_v1beta1_ShootStatus(a.(*garden.ShootStatus), b.(*ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Shoot)(nil), (*Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Shoot_To_v1beta1_Shoot(a.(*garden.Shoot), b.(*Shoot), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Worker)(nil), (*AWSWorker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Worker_To_v1beta1_AWSWorker(a.(*garden.Worker), b.(*AWSWorker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Worker)(nil), (*AlicloudWorker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Worker_To_v1beta1_AlicloudWorker(a.(*garden.Worker), b.(*AlicloudWorker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Worker)(nil), (*AzureWorker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Worker_To_v1beta1_AzureWorker(a.(*garden.Worker), b.(*AzureWorker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Worker)(nil), (*GCPWorker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Worker_To_v1beta1_GCPWorker(a.(*garden.Worker), b.(*GCPWorker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Worker)(nil), (*OpenStackWorker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Worker_To_v1beta1_OpenStackWorker(a.(*garden.Worker), b.(*OpenStackWorker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Worker)(nil), (*PacketWorker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Worker_To_v1beta1_PacketWorker(a.(*garden.Worker), b.(*PacketWorker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*garden.Worker)(nil), (*Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_garden_Worker_To_v1beta1_Worker(a.(*garden.Worker), b.(*Worker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*AWSWorker)(nil), (*garden.Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AWSWorker_To_garden_Worker(a.(*AWSWorker), b.(*garden.Worker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*AlicloudWorker)(nil), (*garden.Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AlicloudWorker_To_garden_Worker(a.(*AlicloudWorker), b.(*garden.Worker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*AzureWorker)(nil), (*garden.Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_AzureWorker_To_garden_Worker(a.(*AzureWorker), b.(*garden.Worker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*CloudProfileSpec)(nil), (*garden.CloudProfileSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(a.(*CloudProfileSpec), b.(*garden.CloudProfileSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*CloudProfile)(nil), (*garden.CloudProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CloudProfile_To_garden_CloudProfile(a.(*CloudProfile), b.(*garden.CloudProfile), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*DNS)(nil), (*garden.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNS_To_garden_DNS(a.(*DNS), b.(*garden.DNS), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*GCPWorker)(nil), (*garden.Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_GCPWorker_To_garden_Worker(a.(*GCPWorker), b.(*garden.Worker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*KubernetesConstraints)(nil), (*garden.KubernetesConstraints)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubernetesConstraints_To_garden_KubernetesConstraints(a.(*KubernetesConstraints), b.(*garden.KubernetesConstraints), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*MachineImage)(nil), (*garden.MachineImage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineImage_To_garden_MachineImage(a.(*MachineImage), b.(*garden.MachineImage), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Networking)(nil), (*garden.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Networking_To_garden_Networking(a.(*Networking), b.(*garden.Networking), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*OpenStackWorker)(nil), (*garden.Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_OpenStackWorker_To_garden_Worker(a.(*OpenStackWorker), b.(*garden.Worker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*PacketWorker)(nil), (*garden.Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PacketWorker_To_garden_Worker(a.(*PacketWorker), b.(*garden.Worker), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ProjectSpec)(nil), (*garden.ProjectSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ProjectSpec_To_garden_ProjectSpec(a.(*ProjectSpec), b.(*garden.ProjectSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*QuotaSpec)(nil), (*garden.QuotaSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_QuotaSpec_To_garden_QuotaSpec(a.(*QuotaSpec), b.(*garden.QuotaSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*SeedNetworks)(nil), (*garden.SeedNetworks)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedNetworks_To_garden_SeedNetworks(a.(*SeedNetworks), b.(*garden.SeedNetworks), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*SeedSpec)(nil), (*garden.SeedSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SeedSpec_To_garden_SeedSpec(a.(*SeedSpec), b.(*garden.SeedSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Seed)(nil), (*garden.Seed)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Seed_To_garden_Seed(a.(*Seed), b.(*garden.Seed), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ShootSpec)(nil), (*garden.ShootSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootSpec_To_garden_ShootSpec(a.(*ShootSpec), b.(*garden.ShootSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ShootStatus)(nil), (*garden.ShootStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ShootStatus_To_garden_ShootStatus(a.(*ShootStatus), b.(*garden.ShootStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Shoot)(nil), (*garden.Shoot)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Shoot_To_garden_Shoot(a.(*Shoot), b.(*garden.Shoot), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Worker)(nil), (*garden.Worker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Worker_To_garden_Worker(a.(*Worker), b.(*garden.Worker), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_AWSCloud_To_garden_AWSCloud(in *AWSCloud, out *garden.AWSCloud, s conversion.Scope) error { + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(garden.ShootMachineImage) + if err := Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_v1beta1_AWSNetworks_To_garden_AWSNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]garden.Worker, len(*in)) + for i := range *in { + if err := Convert_v1beta1_AWSWorker_To_garden_Worker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_AWSCloud_To_garden_AWSCloud is an autogenerated conversion function. +func Convert_v1beta1_AWSCloud_To_garden_AWSCloud(in *AWSCloud, out *garden.AWSCloud, s conversion.Scope) error { + return autoConvert_v1beta1_AWSCloud_To_garden_AWSCloud(in, out, s) +} + +func autoConvert_garden_AWSCloud_To_v1beta1_AWSCloud(in *garden.AWSCloud, out *AWSCloud, s conversion.Scope) error { + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(ShootMachineImage) + if err := Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_garden_AWSNetworks_To_v1beta1_AWSNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]AWSWorker, len(*in)) + for i := range *in { + if err := Convert_garden_Worker_To_v1beta1_AWSWorker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_AWSCloud_To_v1beta1_AWSCloud is an autogenerated conversion function. +func Convert_garden_AWSCloud_To_v1beta1_AWSCloud(in *garden.AWSCloud, out *AWSCloud, s conversion.Scope) error { + return autoConvert_garden_AWSCloud_To_v1beta1_AWSCloud(in, out, s) +} + +func autoConvert_v1beta1_AWSConstraints_To_garden_AWSConstraints(in *AWSConstraints, out *garden.AWSConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]garden.DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + if err := Convert_v1beta1_KubernetesConstraints_To_garden_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]garden.MachineImage, len(*in)) + for i := range *in { + if err := Convert_v1beta1_MachineImage_To_garden_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]garden.MachineType)(unsafe.Pointer(&in.MachineTypes)) + out.VolumeTypes = *(*[]garden.VolumeType)(unsafe.Pointer(&in.VolumeTypes)) + out.Zones = *(*[]garden.Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_AWSConstraints_To_garden_AWSConstraints is an autogenerated conversion function. +func Convert_v1beta1_AWSConstraints_To_garden_AWSConstraints(in *AWSConstraints, out *garden.AWSConstraints, s conversion.Scope) error { + return autoConvert_v1beta1_AWSConstraints_To_garden_AWSConstraints(in, out, s) +} + +func autoConvert_garden_AWSConstraints_To_v1beta1_AWSConstraints(in *garden.AWSConstraints, out *AWSConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + if err := Convert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]MachineImage, len(*in)) + for i := range *in { + if err := Convert_garden_MachineImage_To_v1beta1_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]MachineType)(unsafe.Pointer(&in.MachineTypes)) + out.VolumeTypes = *(*[]VolumeType)(unsafe.Pointer(&in.VolumeTypes)) + out.Zones = *(*[]Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_AWSConstraints_To_v1beta1_AWSConstraints is an autogenerated conversion function. +func Convert_garden_AWSConstraints_To_v1beta1_AWSConstraints(in *garden.AWSConstraints, out *AWSConstraints, s conversion.Scope) error { + return autoConvert_garden_AWSConstraints_To_v1beta1_AWSConstraints(in, out, s) +} + +func autoConvert_v1beta1_AWSNetworks_To_garden_AWSNetworks(in *AWSNetworks, out *garden.AWSNetworks, s conversion.Scope) error { + if err := Convert_v1beta1_K8SNetworks_To_garden_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + if err := Convert_v1beta1_AWSVPC_To_garden_AWSVPC(&in.VPC, &out.VPC, s); err != nil { + return err + } + out.Internal = *(*[]string)(unsafe.Pointer(&in.Internal)) + out.Public = *(*[]string)(unsafe.Pointer(&in.Public)) + out.Workers = *(*[]string)(unsafe.Pointer(&in.Workers)) + return nil +} + +// Convert_v1beta1_AWSNetworks_To_garden_AWSNetworks is an autogenerated conversion function. +func Convert_v1beta1_AWSNetworks_To_garden_AWSNetworks(in *AWSNetworks, out *garden.AWSNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_AWSNetworks_To_garden_AWSNetworks(in, out, s) +} + +func autoConvert_garden_AWSNetworks_To_v1beta1_AWSNetworks(in *garden.AWSNetworks, out *AWSNetworks, s conversion.Scope) error { + if err := Convert_garden_K8SNetworks_To_v1beta1_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + if err := Convert_garden_AWSVPC_To_v1beta1_AWSVPC(&in.VPC, &out.VPC, s); err != nil { + return err + } + out.Internal = *(*[]string)(unsafe.Pointer(&in.Internal)) + out.Public = *(*[]string)(unsafe.Pointer(&in.Public)) + out.Workers = *(*[]string)(unsafe.Pointer(&in.Workers)) + return nil +} + +// Convert_garden_AWSNetworks_To_v1beta1_AWSNetworks is an autogenerated conversion function. +func Convert_garden_AWSNetworks_To_v1beta1_AWSNetworks(in *garden.AWSNetworks, out *AWSNetworks, s conversion.Scope) error { + return autoConvert_garden_AWSNetworks_To_v1beta1_AWSNetworks(in, out, s) +} + +func autoConvert_v1beta1_AWSProfile_To_garden_AWSProfile(in *AWSProfile, out *garden.AWSProfile, s conversion.Scope) error { + if err := Convert_v1beta1_AWSConstraints_To_garden_AWSConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_AWSProfile_To_garden_AWSProfile is an autogenerated conversion function. +func Convert_v1beta1_AWSProfile_To_garden_AWSProfile(in *AWSProfile, out *garden.AWSProfile, s conversion.Scope) error { + return autoConvert_v1beta1_AWSProfile_To_garden_AWSProfile(in, out, s) +} + +func autoConvert_garden_AWSProfile_To_v1beta1_AWSProfile(in *garden.AWSProfile, out *AWSProfile, s conversion.Scope) error { + if err := Convert_garden_AWSConstraints_To_v1beta1_AWSConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + return nil +} + +// Convert_garden_AWSProfile_To_v1beta1_AWSProfile is an autogenerated conversion function. +func Convert_garden_AWSProfile_To_v1beta1_AWSProfile(in *garden.AWSProfile, out *AWSProfile, s conversion.Scope) error { + return autoConvert_garden_AWSProfile_To_v1beta1_AWSProfile(in, out, s) +} + +func autoConvert_v1beta1_AWSVPC_To_garden_AWSVPC(in *AWSVPC, out *garden.AWSVPC, s conversion.Scope) error { + out.ID = (*string)(unsafe.Pointer(in.ID)) + out.CIDR = (*string)(unsafe.Pointer(in.CIDR)) + return nil +} + +// Convert_v1beta1_AWSVPC_To_garden_AWSVPC is an autogenerated conversion function. +func Convert_v1beta1_AWSVPC_To_garden_AWSVPC(in *AWSVPC, out *garden.AWSVPC, s conversion.Scope) error { + return autoConvert_v1beta1_AWSVPC_To_garden_AWSVPC(in, out, s) +} + +func autoConvert_garden_AWSVPC_To_v1beta1_AWSVPC(in *garden.AWSVPC, out *AWSVPC, s conversion.Scope) error { + out.ID = (*string)(unsafe.Pointer(in.ID)) + out.CIDR = (*string)(unsafe.Pointer(in.CIDR)) + return nil +} + +// Convert_garden_AWSVPC_To_v1beta1_AWSVPC is an autogenerated conversion function. +func Convert_garden_AWSVPC_To_v1beta1_AWSVPC(in *garden.AWSVPC, out *AWSVPC, s conversion.Scope) error { + return autoConvert_garden_AWSVPC_To_v1beta1_AWSVPC(in, out, s) +} + +func autoConvert_v1beta1_Addon_To_garden_Addon(in *Addon, out *garden.Addon, s conversion.Scope) error { + out.Enabled = in.Enabled + return nil +} + +// Convert_v1beta1_Addon_To_garden_Addon is an autogenerated conversion function. +func Convert_v1beta1_Addon_To_garden_Addon(in *Addon, out *garden.Addon, s conversion.Scope) error { + return autoConvert_v1beta1_Addon_To_garden_Addon(in, out, s) +} + +func autoConvert_garden_Addon_To_v1beta1_Addon(in *garden.Addon, out *Addon, s conversion.Scope) error { + out.Enabled = in.Enabled + return nil +} + +// Convert_garden_Addon_To_v1beta1_Addon is an autogenerated conversion function. +func Convert_garden_Addon_To_v1beta1_Addon(in *garden.Addon, out *Addon, s conversion.Scope) error { + return autoConvert_garden_Addon_To_v1beta1_Addon(in, out, s) +} + +func autoConvert_v1beta1_AddonClusterAutoscaler_To_garden_AddonClusterAutoscaler(in *AddonClusterAutoscaler, out *garden.AddonClusterAutoscaler, s conversion.Scope) error { + if err := Convert_v1beta1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_AddonClusterAutoscaler_To_garden_AddonClusterAutoscaler is an autogenerated conversion function. +func Convert_v1beta1_AddonClusterAutoscaler_To_garden_AddonClusterAutoscaler(in *AddonClusterAutoscaler, out *garden.AddonClusterAutoscaler, s conversion.Scope) error { + return autoConvert_v1beta1_AddonClusterAutoscaler_To_garden_AddonClusterAutoscaler(in, out, s) +} + +func autoConvert_garden_AddonClusterAutoscaler_To_v1beta1_AddonClusterAutoscaler(in *garden.AddonClusterAutoscaler, out *AddonClusterAutoscaler, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1beta1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + return nil +} + +// Convert_garden_AddonClusterAutoscaler_To_v1beta1_AddonClusterAutoscaler is an autogenerated conversion function. +func Convert_garden_AddonClusterAutoscaler_To_v1beta1_AddonClusterAutoscaler(in *garden.AddonClusterAutoscaler, out *AddonClusterAutoscaler, s conversion.Scope) error { + return autoConvert_garden_AddonClusterAutoscaler_To_v1beta1_AddonClusterAutoscaler(in, out, s) +} + +func autoConvert_v1beta1_Addons_To_garden_Addons(in *Addons, out *garden.Addons, s conversion.Scope) error { + out.KubernetesDashboard = (*garden.KubernetesDashboard)(unsafe.Pointer(in.KubernetesDashboard)) + out.NginxIngress = (*garden.NginxIngress)(unsafe.Pointer(in.NginxIngress)) + out.ClusterAutoscaler = (*garden.AddonClusterAutoscaler)(unsafe.Pointer(in.ClusterAutoscaler)) + out.Heapster = (*garden.Heapster)(unsafe.Pointer(in.Heapster)) + out.Kube2IAM = (*garden.Kube2IAM)(unsafe.Pointer(in.Kube2IAM)) + out.KubeLego = (*garden.KubeLego)(unsafe.Pointer(in.KubeLego)) + out.Monocular = (*garden.Monocular)(unsafe.Pointer(in.Monocular)) + return nil +} + +// Convert_v1beta1_Addons_To_garden_Addons is an autogenerated conversion function. +func Convert_v1beta1_Addons_To_garden_Addons(in *Addons, out *garden.Addons, s conversion.Scope) error { + return autoConvert_v1beta1_Addons_To_garden_Addons(in, out, s) +} + +func autoConvert_garden_Addons_To_v1beta1_Addons(in *garden.Addons, out *Addons, s conversion.Scope) error { + out.KubernetesDashboard = (*KubernetesDashboard)(unsafe.Pointer(in.KubernetesDashboard)) + out.NginxIngress = (*NginxIngress)(unsafe.Pointer(in.NginxIngress)) + out.ClusterAutoscaler = (*AddonClusterAutoscaler)(unsafe.Pointer(in.ClusterAutoscaler)) + out.Heapster = (*Heapster)(unsafe.Pointer(in.Heapster)) + out.Kube2IAM = (*Kube2IAM)(unsafe.Pointer(in.Kube2IAM)) + out.KubeLego = (*KubeLego)(unsafe.Pointer(in.KubeLego)) + out.Monocular = (*Monocular)(unsafe.Pointer(in.Monocular)) + return nil +} + +// Convert_garden_Addons_To_v1beta1_Addons is an autogenerated conversion function. +func Convert_garden_Addons_To_v1beta1_Addons(in *garden.Addons, out *Addons, s conversion.Scope) error { + return autoConvert_garden_Addons_To_v1beta1_Addons(in, out, s) +} + +func autoConvert_v1beta1_AdmissionPlugin_To_garden_AdmissionPlugin(in *AdmissionPlugin, out *garden.AdmissionPlugin, s conversion.Scope) error { + out.Name = in.Name + out.Config = (*garden.ProviderConfig)(unsafe.Pointer(in.Config)) + return nil +} + +// Convert_v1beta1_AdmissionPlugin_To_garden_AdmissionPlugin is an autogenerated conversion function. +func Convert_v1beta1_AdmissionPlugin_To_garden_AdmissionPlugin(in *AdmissionPlugin, out *garden.AdmissionPlugin, s conversion.Scope) error { + return autoConvert_v1beta1_AdmissionPlugin_To_garden_AdmissionPlugin(in, out, s) +} + +func autoConvert_garden_AdmissionPlugin_To_v1beta1_AdmissionPlugin(in *garden.AdmissionPlugin, out *AdmissionPlugin, s conversion.Scope) error { + out.Name = in.Name + out.Config = (*v1alpha1.ProviderConfig)(unsafe.Pointer(in.Config)) + return nil +} + +// Convert_garden_AdmissionPlugin_To_v1beta1_AdmissionPlugin is an autogenerated conversion function. +func Convert_garden_AdmissionPlugin_To_v1beta1_AdmissionPlugin(in *garden.AdmissionPlugin, out *AdmissionPlugin, s conversion.Scope) error { + return autoConvert_garden_AdmissionPlugin_To_v1beta1_AdmissionPlugin(in, out, s) +} + +func autoConvert_v1beta1_Alerting_To_garden_Alerting(in *Alerting, out *garden.Alerting, s conversion.Scope) error { + out.EmailReceivers = *(*[]string)(unsafe.Pointer(&in.EmailReceivers)) + return nil +} + +// Convert_v1beta1_Alerting_To_garden_Alerting is an autogenerated conversion function. +func Convert_v1beta1_Alerting_To_garden_Alerting(in *Alerting, out *garden.Alerting, s conversion.Scope) error { + return autoConvert_v1beta1_Alerting_To_garden_Alerting(in, out, s) +} + +func autoConvert_garden_Alerting_To_v1beta1_Alerting(in *garden.Alerting, out *Alerting, s conversion.Scope) error { + out.EmailReceivers = *(*[]string)(unsafe.Pointer(&in.EmailReceivers)) + return nil +} + +// Convert_garden_Alerting_To_v1beta1_Alerting is an autogenerated conversion function. +func Convert_garden_Alerting_To_v1beta1_Alerting(in *garden.Alerting, out *Alerting, s conversion.Scope) error { + return autoConvert_garden_Alerting_To_v1beta1_Alerting(in, out, s) +} + +func autoConvert_v1beta1_Alicloud_To_garden_Alicloud(in *Alicloud, out *garden.Alicloud, s conversion.Scope) error { + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(garden.ShootMachineImage) + if err := Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_v1beta1_AlicloudNetworks_To_garden_AlicloudNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]garden.Worker, len(*in)) + for i := range *in { + if err := Convert_v1beta1_AlicloudWorker_To_garden_Worker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_Alicloud_To_garden_Alicloud is an autogenerated conversion function. +func Convert_v1beta1_Alicloud_To_garden_Alicloud(in *Alicloud, out *garden.Alicloud, s conversion.Scope) error { + return autoConvert_v1beta1_Alicloud_To_garden_Alicloud(in, out, s) +} + +func autoConvert_garden_Alicloud_To_v1beta1_Alicloud(in *garden.Alicloud, out *Alicloud, s conversion.Scope) error { + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(ShootMachineImage) + if err := Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_garden_AlicloudNetworks_To_v1beta1_AlicloudNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]AlicloudWorker, len(*in)) + for i := range *in { + if err := Convert_garden_Worker_To_v1beta1_AlicloudWorker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_Alicloud_To_v1beta1_Alicloud is an autogenerated conversion function. +func Convert_garden_Alicloud_To_v1beta1_Alicloud(in *garden.Alicloud, out *Alicloud, s conversion.Scope) error { + return autoConvert_garden_Alicloud_To_v1beta1_Alicloud(in, out, s) +} + +func autoConvert_v1beta1_AlicloudConstraints_To_garden_AlicloudConstraints(in *AlicloudConstraints, out *garden.AlicloudConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]garden.DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + if err := Convert_v1beta1_KubernetesConstraints_To_garden_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]garden.MachineImage, len(*in)) + for i := range *in { + if err := Convert_v1beta1_MachineImage_To_garden_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]garden.AlicloudMachineType)(unsafe.Pointer(&in.MachineTypes)) + out.VolumeTypes = *(*[]garden.AlicloudVolumeType)(unsafe.Pointer(&in.VolumeTypes)) + out.Zones = *(*[]garden.Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_AlicloudConstraints_To_garden_AlicloudConstraints is an autogenerated conversion function. +func Convert_v1beta1_AlicloudConstraints_To_garden_AlicloudConstraints(in *AlicloudConstraints, out *garden.AlicloudConstraints, s conversion.Scope) error { + return autoConvert_v1beta1_AlicloudConstraints_To_garden_AlicloudConstraints(in, out, s) +} + +func autoConvert_garden_AlicloudConstraints_To_v1beta1_AlicloudConstraints(in *garden.AlicloudConstraints, out *AlicloudConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + if err := Convert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]MachineImage, len(*in)) + for i := range *in { + if err := Convert_garden_MachineImage_To_v1beta1_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]AlicloudMachineType)(unsafe.Pointer(&in.MachineTypes)) + out.VolumeTypes = *(*[]AlicloudVolumeType)(unsafe.Pointer(&in.VolumeTypes)) + out.Zones = *(*[]Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_AlicloudConstraints_To_v1beta1_AlicloudConstraints is an autogenerated conversion function. +func Convert_garden_AlicloudConstraints_To_v1beta1_AlicloudConstraints(in *garden.AlicloudConstraints, out *AlicloudConstraints, s conversion.Scope) error { + return autoConvert_garden_AlicloudConstraints_To_v1beta1_AlicloudConstraints(in, out, s) +} + +func autoConvert_v1beta1_AlicloudMachineType_To_garden_AlicloudMachineType(in *AlicloudMachineType, out *garden.AlicloudMachineType, s conversion.Scope) error { + if err := Convert_v1beta1_MachineType_To_garden_MachineType(&in.MachineType, &out.MachineType, s); err != nil { + return err + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_AlicloudMachineType_To_garden_AlicloudMachineType is an autogenerated conversion function. +func Convert_v1beta1_AlicloudMachineType_To_garden_AlicloudMachineType(in *AlicloudMachineType, out *garden.AlicloudMachineType, s conversion.Scope) error { + return autoConvert_v1beta1_AlicloudMachineType_To_garden_AlicloudMachineType(in, out, s) +} + +func autoConvert_garden_AlicloudMachineType_To_v1beta1_AlicloudMachineType(in *garden.AlicloudMachineType, out *AlicloudMachineType, s conversion.Scope) error { + if err := Convert_garden_MachineType_To_v1beta1_MachineType(&in.MachineType, &out.MachineType, s); err != nil { + return err + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_AlicloudMachineType_To_v1beta1_AlicloudMachineType is an autogenerated conversion function. +func Convert_garden_AlicloudMachineType_To_v1beta1_AlicloudMachineType(in *garden.AlicloudMachineType, out *AlicloudMachineType, s conversion.Scope) error { + return autoConvert_garden_AlicloudMachineType_To_v1beta1_AlicloudMachineType(in, out, s) +} + +func autoConvert_v1beta1_AlicloudNetworks_To_garden_AlicloudNetworks(in *AlicloudNetworks, out *garden.AlicloudNetworks, s conversion.Scope) error { + if err := Convert_v1beta1_K8SNetworks_To_garden_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + if err := Convert_v1beta1_AlicloudVPC_To_garden_AlicloudVPC(&in.VPC, &out.VPC, s); err != nil { + return err + } + out.Workers = *(*[]string)(unsafe.Pointer(&in.Workers)) + return nil +} + +// Convert_v1beta1_AlicloudNetworks_To_garden_AlicloudNetworks is an autogenerated conversion function. +func Convert_v1beta1_AlicloudNetworks_To_garden_AlicloudNetworks(in *AlicloudNetworks, out *garden.AlicloudNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_AlicloudNetworks_To_garden_AlicloudNetworks(in, out, s) +} + +func autoConvert_garden_AlicloudNetworks_To_v1beta1_AlicloudNetworks(in *garden.AlicloudNetworks, out *AlicloudNetworks, s conversion.Scope) error { + if err := Convert_garden_K8SNetworks_To_v1beta1_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + if err := Convert_garden_AlicloudVPC_To_v1beta1_AlicloudVPC(&in.VPC, &out.VPC, s); err != nil { + return err + } + out.Workers = *(*[]string)(unsafe.Pointer(&in.Workers)) + return nil +} + +// Convert_garden_AlicloudNetworks_To_v1beta1_AlicloudNetworks is an autogenerated conversion function. +func Convert_garden_AlicloudNetworks_To_v1beta1_AlicloudNetworks(in *garden.AlicloudNetworks, out *AlicloudNetworks, s conversion.Scope) error { + return autoConvert_garden_AlicloudNetworks_To_v1beta1_AlicloudNetworks(in, out, s) +} + +func autoConvert_v1beta1_AlicloudProfile_To_garden_AlicloudProfile(in *AlicloudProfile, out *garden.AlicloudProfile, s conversion.Scope) error { + if err := Convert_v1beta1_AlicloudConstraints_To_garden_AlicloudConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_AlicloudProfile_To_garden_AlicloudProfile is an autogenerated conversion function. +func Convert_v1beta1_AlicloudProfile_To_garden_AlicloudProfile(in *AlicloudProfile, out *garden.AlicloudProfile, s conversion.Scope) error { + return autoConvert_v1beta1_AlicloudProfile_To_garden_AlicloudProfile(in, out, s) +} + +func autoConvert_garden_AlicloudProfile_To_v1beta1_AlicloudProfile(in *garden.AlicloudProfile, out *AlicloudProfile, s conversion.Scope) error { + if err := Convert_garden_AlicloudConstraints_To_v1beta1_AlicloudConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + return nil +} + +// Convert_garden_AlicloudProfile_To_v1beta1_AlicloudProfile is an autogenerated conversion function. +func Convert_garden_AlicloudProfile_To_v1beta1_AlicloudProfile(in *garden.AlicloudProfile, out *AlicloudProfile, s conversion.Scope) error { + return autoConvert_garden_AlicloudProfile_To_v1beta1_AlicloudProfile(in, out, s) +} + +func autoConvert_v1beta1_AlicloudVPC_To_garden_AlicloudVPC(in *AlicloudVPC, out *garden.AlicloudVPC, s conversion.Scope) error { + out.ID = (*string)(unsafe.Pointer(in.ID)) + out.CIDR = (*string)(unsafe.Pointer(in.CIDR)) + return nil +} + +// Convert_v1beta1_AlicloudVPC_To_garden_AlicloudVPC is an autogenerated conversion function. +func Convert_v1beta1_AlicloudVPC_To_garden_AlicloudVPC(in *AlicloudVPC, out *garden.AlicloudVPC, s conversion.Scope) error { + return autoConvert_v1beta1_AlicloudVPC_To_garden_AlicloudVPC(in, out, s) +} + +func autoConvert_garden_AlicloudVPC_To_v1beta1_AlicloudVPC(in *garden.AlicloudVPC, out *AlicloudVPC, s conversion.Scope) error { + out.ID = (*string)(unsafe.Pointer(in.ID)) + out.CIDR = (*string)(unsafe.Pointer(in.CIDR)) + return nil +} + +// Convert_garden_AlicloudVPC_To_v1beta1_AlicloudVPC is an autogenerated conversion function. +func Convert_garden_AlicloudVPC_To_v1beta1_AlicloudVPC(in *garden.AlicloudVPC, out *AlicloudVPC, s conversion.Scope) error { + return autoConvert_garden_AlicloudVPC_To_v1beta1_AlicloudVPC(in, out, s) +} + +func autoConvert_v1beta1_AlicloudVolumeType_To_garden_AlicloudVolumeType(in *AlicloudVolumeType, out *garden.AlicloudVolumeType, s conversion.Scope) error { + if err := Convert_v1beta1_VolumeType_To_garden_VolumeType(&in.VolumeType, &out.VolumeType, s); err != nil { + return err + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_AlicloudVolumeType_To_garden_AlicloudVolumeType is an autogenerated conversion function. +func Convert_v1beta1_AlicloudVolumeType_To_garden_AlicloudVolumeType(in *AlicloudVolumeType, out *garden.AlicloudVolumeType, s conversion.Scope) error { + return autoConvert_v1beta1_AlicloudVolumeType_To_garden_AlicloudVolumeType(in, out, s) +} + +func autoConvert_garden_AlicloudVolumeType_To_v1beta1_AlicloudVolumeType(in *garden.AlicloudVolumeType, out *AlicloudVolumeType, s conversion.Scope) error { + if err := Convert_garden_VolumeType_To_v1beta1_VolumeType(&in.VolumeType, &out.VolumeType, s); err != nil { + return err + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_AlicloudVolumeType_To_v1beta1_AlicloudVolumeType is an autogenerated conversion function. +func Convert_garden_AlicloudVolumeType_To_v1beta1_AlicloudVolumeType(in *garden.AlicloudVolumeType, out *AlicloudVolumeType, s conversion.Scope) error { + return autoConvert_garden_AlicloudVolumeType_To_v1beta1_AlicloudVolumeType(in, out, s) +} + +func autoConvert_v1beta1_AuditConfig_To_garden_AuditConfig(in *AuditConfig, out *garden.AuditConfig, s conversion.Scope) error { + out.AuditPolicy = (*garden.AuditPolicy)(unsafe.Pointer(in.AuditPolicy)) + return nil +} + +// Convert_v1beta1_AuditConfig_To_garden_AuditConfig is an autogenerated conversion function. +func Convert_v1beta1_AuditConfig_To_garden_AuditConfig(in *AuditConfig, out *garden.AuditConfig, s conversion.Scope) error { + return autoConvert_v1beta1_AuditConfig_To_garden_AuditConfig(in, out, s) +} + +func autoConvert_garden_AuditConfig_To_v1beta1_AuditConfig(in *garden.AuditConfig, out *AuditConfig, s conversion.Scope) error { + out.AuditPolicy = (*AuditPolicy)(unsafe.Pointer(in.AuditPolicy)) + return nil +} + +// Convert_garden_AuditConfig_To_v1beta1_AuditConfig is an autogenerated conversion function. +func Convert_garden_AuditConfig_To_v1beta1_AuditConfig(in *garden.AuditConfig, out *AuditConfig, s conversion.Scope) error { + return autoConvert_garden_AuditConfig_To_v1beta1_AuditConfig(in, out, s) +} + +func autoConvert_v1beta1_AuditPolicy_To_garden_AuditPolicy(in *AuditPolicy, out *garden.AuditPolicy, s conversion.Scope) error { + out.ConfigMapRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigMapRef)) + return nil +} + +// Convert_v1beta1_AuditPolicy_To_garden_AuditPolicy is an autogenerated conversion function. +func Convert_v1beta1_AuditPolicy_To_garden_AuditPolicy(in *AuditPolicy, out *garden.AuditPolicy, s conversion.Scope) error { + return autoConvert_v1beta1_AuditPolicy_To_garden_AuditPolicy(in, out, s) +} + +func autoConvert_garden_AuditPolicy_To_v1beta1_AuditPolicy(in *garden.AuditPolicy, out *AuditPolicy, s conversion.Scope) error { + out.ConfigMapRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigMapRef)) + return nil +} + +// Convert_garden_AuditPolicy_To_v1beta1_AuditPolicy is an autogenerated conversion function. +func Convert_garden_AuditPolicy_To_v1beta1_AuditPolicy(in *garden.AuditPolicy, out *AuditPolicy, s conversion.Scope) error { + return autoConvert_garden_AuditPolicy_To_v1beta1_AuditPolicy(in, out, s) +} + +func autoConvert_v1beta1_AzureCloud_To_garden_AzureCloud(in *AzureCloud, out *garden.AzureCloud, s conversion.Scope) error { + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(garden.ShootMachineImage) + if err := Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_v1beta1_AzureNetworks_To_garden_AzureNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + out.ResourceGroup = (*garden.AzureResourceGroup)(unsafe.Pointer(in.ResourceGroup)) + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]garden.Worker, len(*in)) + for i := range *in { + if err := Convert_v1beta1_AzureWorker_To_garden_Worker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_AzureCloud_To_garden_AzureCloud is an autogenerated conversion function. +func Convert_v1beta1_AzureCloud_To_garden_AzureCloud(in *AzureCloud, out *garden.AzureCloud, s conversion.Scope) error { + return autoConvert_v1beta1_AzureCloud_To_garden_AzureCloud(in, out, s) +} + +func autoConvert_garden_AzureCloud_To_v1beta1_AzureCloud(in *garden.AzureCloud, out *AzureCloud, s conversion.Scope) error { + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(ShootMachineImage) + if err := Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_garden_AzureNetworks_To_v1beta1_AzureNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + out.ResourceGroup = (*AzureResourceGroup)(unsafe.Pointer(in.ResourceGroup)) + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]AzureWorker, len(*in)) + for i := range *in { + if err := Convert_garden_Worker_To_v1beta1_AzureWorker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_AzureCloud_To_v1beta1_AzureCloud is an autogenerated conversion function. +func Convert_garden_AzureCloud_To_v1beta1_AzureCloud(in *garden.AzureCloud, out *AzureCloud, s conversion.Scope) error { + return autoConvert_garden_AzureCloud_To_v1beta1_AzureCloud(in, out, s) +} + +func autoConvert_v1beta1_AzureConstraints_To_garden_AzureConstraints(in *AzureConstraints, out *garden.AzureConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]garden.DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + if err := Convert_v1beta1_KubernetesConstraints_To_garden_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]garden.MachineImage, len(*in)) + for i := range *in { + if err := Convert_v1beta1_MachineImage_To_garden_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]garden.MachineType)(unsafe.Pointer(&in.MachineTypes)) + out.VolumeTypes = *(*[]garden.VolumeType)(unsafe.Pointer(&in.VolumeTypes)) + out.Zones = *(*[]garden.Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_AzureConstraints_To_garden_AzureConstraints is an autogenerated conversion function. +func Convert_v1beta1_AzureConstraints_To_garden_AzureConstraints(in *AzureConstraints, out *garden.AzureConstraints, s conversion.Scope) error { + return autoConvert_v1beta1_AzureConstraints_To_garden_AzureConstraints(in, out, s) +} + +func autoConvert_garden_AzureConstraints_To_v1beta1_AzureConstraints(in *garden.AzureConstraints, out *AzureConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + if err := Convert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]MachineImage, len(*in)) + for i := range *in { + if err := Convert_garden_MachineImage_To_v1beta1_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]MachineType)(unsafe.Pointer(&in.MachineTypes)) + out.VolumeTypes = *(*[]VolumeType)(unsafe.Pointer(&in.VolumeTypes)) + out.Zones = *(*[]Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_AzureConstraints_To_v1beta1_AzureConstraints is an autogenerated conversion function. +func Convert_garden_AzureConstraints_To_v1beta1_AzureConstraints(in *garden.AzureConstraints, out *AzureConstraints, s conversion.Scope) error { + return autoConvert_garden_AzureConstraints_To_v1beta1_AzureConstraints(in, out, s) +} + +func autoConvert_v1beta1_AzureDomainCount_To_garden_AzureDomainCount(in *AzureDomainCount, out *garden.AzureDomainCount, s conversion.Scope) error { + out.Region = in.Region + out.Count = in.Count + return nil +} + +// Convert_v1beta1_AzureDomainCount_To_garden_AzureDomainCount is an autogenerated conversion function. +func Convert_v1beta1_AzureDomainCount_To_garden_AzureDomainCount(in *AzureDomainCount, out *garden.AzureDomainCount, s conversion.Scope) error { + return autoConvert_v1beta1_AzureDomainCount_To_garden_AzureDomainCount(in, out, s) +} + +func autoConvert_garden_AzureDomainCount_To_v1beta1_AzureDomainCount(in *garden.AzureDomainCount, out *AzureDomainCount, s conversion.Scope) error { + out.Region = in.Region + out.Count = in.Count + return nil +} + +// Convert_garden_AzureDomainCount_To_v1beta1_AzureDomainCount is an autogenerated conversion function. +func Convert_garden_AzureDomainCount_To_v1beta1_AzureDomainCount(in *garden.AzureDomainCount, out *AzureDomainCount, s conversion.Scope) error { + return autoConvert_garden_AzureDomainCount_To_v1beta1_AzureDomainCount(in, out, s) +} + +func autoConvert_v1beta1_AzureNetworks_To_garden_AzureNetworks(in *AzureNetworks, out *garden.AzureNetworks, s conversion.Scope) error { + if err := Convert_v1beta1_K8SNetworks_To_garden_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + if err := Convert_v1beta1_AzureVNet_To_garden_AzureVNet(&in.VNet, &out.VNet, s); err != nil { + return err + } + out.Workers = in.Workers + out.ServiceEndpoints = *(*[]string)(unsafe.Pointer(&in.ServiceEndpoints)) + return nil +} + +// Convert_v1beta1_AzureNetworks_To_garden_AzureNetworks is an autogenerated conversion function. +func Convert_v1beta1_AzureNetworks_To_garden_AzureNetworks(in *AzureNetworks, out *garden.AzureNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_AzureNetworks_To_garden_AzureNetworks(in, out, s) +} + +func autoConvert_garden_AzureNetworks_To_v1beta1_AzureNetworks(in *garden.AzureNetworks, out *AzureNetworks, s conversion.Scope) error { + if err := Convert_garden_K8SNetworks_To_v1beta1_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + if err := Convert_garden_AzureVNet_To_v1beta1_AzureVNet(&in.VNet, &out.VNet, s); err != nil { + return err + } + out.Workers = in.Workers + out.ServiceEndpoints = *(*[]string)(unsafe.Pointer(&in.ServiceEndpoints)) + return nil +} + +// Convert_garden_AzureNetworks_To_v1beta1_AzureNetworks is an autogenerated conversion function. +func Convert_garden_AzureNetworks_To_v1beta1_AzureNetworks(in *garden.AzureNetworks, out *AzureNetworks, s conversion.Scope) error { + return autoConvert_garden_AzureNetworks_To_v1beta1_AzureNetworks(in, out, s) +} + +func autoConvert_v1beta1_AzureProfile_To_garden_AzureProfile(in *AzureProfile, out *garden.AzureProfile, s conversion.Scope) error { + if err := Convert_v1beta1_AzureConstraints_To_garden_AzureConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + out.CountUpdateDomains = *(*[]garden.AzureDomainCount)(unsafe.Pointer(&in.CountUpdateDomains)) + out.CountFaultDomains = *(*[]garden.AzureDomainCount)(unsafe.Pointer(&in.CountFaultDomains)) + return nil +} + +// Convert_v1beta1_AzureProfile_To_garden_AzureProfile is an autogenerated conversion function. +func Convert_v1beta1_AzureProfile_To_garden_AzureProfile(in *AzureProfile, out *garden.AzureProfile, s conversion.Scope) error { + return autoConvert_v1beta1_AzureProfile_To_garden_AzureProfile(in, out, s) +} + +func autoConvert_garden_AzureProfile_To_v1beta1_AzureProfile(in *garden.AzureProfile, out *AzureProfile, s conversion.Scope) error { + if err := Convert_garden_AzureConstraints_To_v1beta1_AzureConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + out.CountUpdateDomains = *(*[]AzureDomainCount)(unsafe.Pointer(&in.CountUpdateDomains)) + out.CountFaultDomains = *(*[]AzureDomainCount)(unsafe.Pointer(&in.CountFaultDomains)) + return nil +} + +// Convert_garden_AzureProfile_To_v1beta1_AzureProfile is an autogenerated conversion function. +func Convert_garden_AzureProfile_To_v1beta1_AzureProfile(in *garden.AzureProfile, out *AzureProfile, s conversion.Scope) error { + return autoConvert_garden_AzureProfile_To_v1beta1_AzureProfile(in, out, s) +} + +func autoConvert_v1beta1_AzureResourceGroup_To_garden_AzureResourceGroup(in *AzureResourceGroup, out *garden.AzureResourceGroup, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_v1beta1_AzureResourceGroup_To_garden_AzureResourceGroup is an autogenerated conversion function. +func Convert_v1beta1_AzureResourceGroup_To_garden_AzureResourceGroup(in *AzureResourceGroup, out *garden.AzureResourceGroup, s conversion.Scope) error { + return autoConvert_v1beta1_AzureResourceGroup_To_garden_AzureResourceGroup(in, out, s) +} + +func autoConvert_garden_AzureResourceGroup_To_v1beta1_AzureResourceGroup(in *garden.AzureResourceGroup, out *AzureResourceGroup, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_garden_AzureResourceGroup_To_v1beta1_AzureResourceGroup is an autogenerated conversion function. +func Convert_garden_AzureResourceGroup_To_v1beta1_AzureResourceGroup(in *garden.AzureResourceGroup, out *AzureResourceGroup, s conversion.Scope) error { + return autoConvert_garden_AzureResourceGroup_To_v1beta1_AzureResourceGroup(in, out, s) +} + +func autoConvert_v1beta1_AzureVNet_To_garden_AzureVNet(in *AzureVNet, out *garden.AzureVNet, s conversion.Scope) error { + out.Name = (*string)(unsafe.Pointer(in.Name)) + out.ResourceGroup = (*string)(unsafe.Pointer(in.ResourceGroup)) + out.CIDR = (*string)(unsafe.Pointer(in.CIDR)) + return nil +} + +// Convert_v1beta1_AzureVNet_To_garden_AzureVNet is an autogenerated conversion function. +func Convert_v1beta1_AzureVNet_To_garden_AzureVNet(in *AzureVNet, out *garden.AzureVNet, s conversion.Scope) error { + return autoConvert_v1beta1_AzureVNet_To_garden_AzureVNet(in, out, s) +} + +func autoConvert_garden_AzureVNet_To_v1beta1_AzureVNet(in *garden.AzureVNet, out *AzureVNet, s conversion.Scope) error { + out.Name = (*string)(unsafe.Pointer(in.Name)) + out.ResourceGroup = (*string)(unsafe.Pointer(in.ResourceGroup)) + out.CIDR = (*string)(unsafe.Pointer(in.CIDR)) + return nil +} + +// Convert_garden_AzureVNet_To_v1beta1_AzureVNet is an autogenerated conversion function. +func Convert_garden_AzureVNet_To_v1beta1_AzureVNet(in *garden.AzureVNet, out *AzureVNet, s conversion.Scope) error { + return autoConvert_garden_AzureVNet_To_v1beta1_AzureVNet(in, out, s) +} + +func autoConvert_v1beta1_Cloud_To_garden_Cloud(in *Cloud, out *garden.Cloud, s conversion.Scope) error { + out.Profile = in.Profile + out.Region = in.Region + out.SecretBindingRef = in.SecretBindingRef + out.Seed = (*string)(unsafe.Pointer(in.Seed)) + if in.AWS != nil { + in, out := &in.AWS, &out.AWS + *out = new(garden.AWSCloud) + if err := Convert_v1beta1_AWSCloud_To_garden_AWSCloud(*in, *out, s); err != nil { + return err + } + } else { + out.AWS = nil + } + if in.Azure != nil { + in, out := &in.Azure, &out.Azure + *out = new(garden.AzureCloud) + if err := Convert_v1beta1_AzureCloud_To_garden_AzureCloud(*in, *out, s); err != nil { + return err + } + } else { + out.Azure = nil + } + if in.GCP != nil { + in, out := &in.GCP, &out.GCP + *out = new(garden.GCPCloud) + if err := Convert_v1beta1_GCPCloud_To_garden_GCPCloud(*in, *out, s); err != nil { + return err + } + } else { + out.GCP = nil + } + if in.OpenStack != nil { + in, out := &in.OpenStack, &out.OpenStack + *out = new(garden.OpenStackCloud) + if err := Convert_v1beta1_OpenStackCloud_To_garden_OpenStackCloud(*in, *out, s); err != nil { + return err + } + } else { + out.OpenStack = nil + } + if in.Alicloud != nil { + in, out := &in.Alicloud, &out.Alicloud + *out = new(garden.Alicloud) + if err := Convert_v1beta1_Alicloud_To_garden_Alicloud(*in, *out, s); err != nil { + return err + } + } else { + out.Alicloud = nil + } + if in.Packet != nil { + in, out := &in.Packet, &out.Packet + *out = new(garden.PacketCloud) + if err := Convert_v1beta1_PacketCloud_To_garden_PacketCloud(*in, *out, s); err != nil { + return err + } + } else { + out.Packet = nil + } + return nil +} + +// Convert_v1beta1_Cloud_To_garden_Cloud is an autogenerated conversion function. +func Convert_v1beta1_Cloud_To_garden_Cloud(in *Cloud, out *garden.Cloud, s conversion.Scope) error { + return autoConvert_v1beta1_Cloud_To_garden_Cloud(in, out, s) +} + +func autoConvert_garden_Cloud_To_v1beta1_Cloud(in *garden.Cloud, out *Cloud, s conversion.Scope) error { + out.Profile = in.Profile + out.Region = in.Region + out.SecretBindingRef = in.SecretBindingRef + out.Seed = (*string)(unsafe.Pointer(in.Seed)) + if in.AWS != nil { + in, out := &in.AWS, &out.AWS + *out = new(AWSCloud) + if err := Convert_garden_AWSCloud_To_v1beta1_AWSCloud(*in, *out, s); err != nil { + return err + } + } else { + out.AWS = nil + } + if in.Azure != nil { + in, out := &in.Azure, &out.Azure + *out = new(AzureCloud) + if err := Convert_garden_AzureCloud_To_v1beta1_AzureCloud(*in, *out, s); err != nil { + return err + } + } else { + out.Azure = nil + } + if in.GCP != nil { + in, out := &in.GCP, &out.GCP + *out = new(GCPCloud) + if err := Convert_garden_GCPCloud_To_v1beta1_GCPCloud(*in, *out, s); err != nil { + return err + } + } else { + out.GCP = nil + } + if in.OpenStack != nil { + in, out := &in.OpenStack, &out.OpenStack + *out = new(OpenStackCloud) + if err := Convert_garden_OpenStackCloud_To_v1beta1_OpenStackCloud(*in, *out, s); err != nil { + return err + } + } else { + out.OpenStack = nil + } + if in.Alicloud != nil { + in, out := &in.Alicloud, &out.Alicloud + *out = new(Alicloud) + if err := Convert_garden_Alicloud_To_v1beta1_Alicloud(*in, *out, s); err != nil { + return err + } + } else { + out.Alicloud = nil + } + if in.Packet != nil { + in, out := &in.Packet, &out.Packet + *out = new(PacketCloud) + if err := Convert_garden_PacketCloud_To_v1beta1_PacketCloud(*in, *out, s); err != nil { + return err + } + } else { + out.Packet = nil + } + return nil +} + +// Convert_garden_Cloud_To_v1beta1_Cloud is an autogenerated conversion function. +func Convert_garden_Cloud_To_v1beta1_Cloud(in *garden.Cloud, out *Cloud, s conversion.Scope) error { + return autoConvert_garden_Cloud_To_v1beta1_Cloud(in, out, s) +} + +func autoConvert_v1beta1_CloudControllerManagerConfig_To_garden_CloudControllerManagerConfig(in *CloudControllerManagerConfig, out *garden.CloudControllerManagerConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_CloudControllerManagerConfig_To_garden_CloudControllerManagerConfig is an autogenerated conversion function. +func Convert_v1beta1_CloudControllerManagerConfig_To_garden_CloudControllerManagerConfig(in *CloudControllerManagerConfig, out *garden.CloudControllerManagerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_CloudControllerManagerConfig_To_garden_CloudControllerManagerConfig(in, out, s) +} + +func autoConvert_garden_CloudControllerManagerConfig_To_v1beta1_CloudControllerManagerConfig(in *garden.CloudControllerManagerConfig, out *CloudControllerManagerConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + return nil +} + +// Convert_garden_CloudControllerManagerConfig_To_v1beta1_CloudControllerManagerConfig is an autogenerated conversion function. +func Convert_garden_CloudControllerManagerConfig_To_v1beta1_CloudControllerManagerConfig(in *garden.CloudControllerManagerConfig, out *CloudControllerManagerConfig, s conversion.Scope) error { + return autoConvert_garden_CloudControllerManagerConfig_To_v1beta1_CloudControllerManagerConfig(in, out, s) +} + +func autoConvert_v1beta1_CloudProfile_To_garden_CloudProfile(in *CloudProfile, out *garden.CloudProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func autoConvert_garden_CloudProfile_To_v1beta1_CloudProfile(in *garden.CloudProfile, out *CloudProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_CloudProfileList_To_garden_CloudProfileList(in *CloudProfileList, out *garden.CloudProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.CloudProfile, len(*in)) + for i := range *in { + if err := Convert_v1beta1_CloudProfile_To_garden_CloudProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_CloudProfileList_To_garden_CloudProfileList is an autogenerated conversion function. +func Convert_v1beta1_CloudProfileList_To_garden_CloudProfileList(in *CloudProfileList, out *garden.CloudProfileList, s conversion.Scope) error { + return autoConvert_v1beta1_CloudProfileList_To_garden_CloudProfileList(in, out, s) +} + +func autoConvert_garden_CloudProfileList_To_v1beta1_CloudProfileList(in *garden.CloudProfileList, out *CloudProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CloudProfile, len(*in)) + for i := range *in { + if err := Convert_garden_CloudProfile_To_v1beta1_CloudProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_CloudProfileList_To_v1beta1_CloudProfileList is an autogenerated conversion function. +func Convert_garden_CloudProfileList_To_v1beta1_CloudProfileList(in *garden.CloudProfileList, out *CloudProfileList, s conversion.Scope) error { + return autoConvert_garden_CloudProfileList_To_v1beta1_CloudProfileList(in, out, s) +} + +func autoConvert_v1beta1_CloudProfileSpec_To_garden_CloudProfileSpec(in *CloudProfileSpec, out *garden.CloudProfileSpec, s conversion.Scope) error { + if in.AWS != nil { + in, out := &in.AWS, &out.AWS + *out = new(garden.AWSProfile) + if err := Convert_v1beta1_AWSProfile_To_garden_AWSProfile(*in, *out, s); err != nil { + return err + } + } else { + out.AWS = nil + } + if in.Azure != nil { + in, out := &in.Azure, &out.Azure + *out = new(garden.AzureProfile) + if err := Convert_v1beta1_AzureProfile_To_garden_AzureProfile(*in, *out, s); err != nil { + return err + } + } else { + out.Azure = nil + } + if in.GCP != nil { + in, out := &in.GCP, &out.GCP + *out = new(garden.GCPProfile) + if err := Convert_v1beta1_GCPProfile_To_garden_GCPProfile(*in, *out, s); err != nil { + return err + } + } else { + out.GCP = nil + } + if in.OpenStack != nil { + in, out := &in.OpenStack, &out.OpenStack + *out = new(garden.OpenStackProfile) + if err := Convert_v1beta1_OpenStackProfile_To_garden_OpenStackProfile(*in, *out, s); err != nil { + return err + } + } else { + out.OpenStack = nil + } + if in.Alicloud != nil { + in, out := &in.Alicloud, &out.Alicloud + *out = new(garden.AlicloudProfile) + if err := Convert_v1beta1_AlicloudProfile_To_garden_AlicloudProfile(*in, *out, s); err != nil { + return err + } + } else { + out.Alicloud = nil + } + if in.Packet != nil { + in, out := &in.Packet, &out.Packet + *out = new(garden.PacketProfile) + if err := Convert_v1beta1_PacketProfile_To_garden_PacketProfile(*in, *out, s); err != nil { + return err + } + } else { + out.Packet = nil + } + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + return nil +} + +func autoConvert_garden_CloudProfileSpec_To_v1beta1_CloudProfileSpec(in *garden.CloudProfileSpec, out *CloudProfileSpec, s conversion.Scope) error { + if in.AWS != nil { + in, out := &in.AWS, &out.AWS + *out = new(AWSProfile) + if err := Convert_garden_AWSProfile_To_v1beta1_AWSProfile(*in, *out, s); err != nil { + return err + } + } else { + out.AWS = nil + } + if in.Azure != nil { + in, out := &in.Azure, &out.Azure + *out = new(AzureProfile) + if err := Convert_garden_AzureProfile_To_v1beta1_AzureProfile(*in, *out, s); err != nil { + return err + } + } else { + out.Azure = nil + } + if in.GCP != nil { + in, out := &in.GCP, &out.GCP + *out = new(GCPProfile) + if err := Convert_garden_GCPProfile_To_v1beta1_GCPProfile(*in, *out, s); err != nil { + return err + } + } else { + out.GCP = nil + } + if in.OpenStack != nil { + in, out := &in.OpenStack, &out.OpenStack + *out = new(OpenStackProfile) + if err := Convert_garden_OpenStackProfile_To_v1beta1_OpenStackProfile(*in, *out, s); err != nil { + return err + } + } else { + out.OpenStack = nil + } + if in.Alicloud != nil { + in, out := &in.Alicloud, &out.Alicloud + *out = new(AlicloudProfile) + if err := Convert_garden_AlicloudProfile_To_v1beta1_AlicloudProfile(*in, *out, s); err != nil { + return err + } + } else { + out.Alicloud = nil + } + if in.Packet != nil { + in, out := &in.Packet, &out.Packet + *out = new(PacketProfile) + if err := Convert_garden_PacketProfile_To_v1beta1_PacketProfile(*in, *out, s); err != nil { + return err + } + } else { + out.Packet = nil + } + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + // WARNING: in.Kubernetes requires manual conversion: does not exist in peer-type + // WARNING: in.MachineImages requires manual conversion: does not exist in peer-type + // WARNING: in.MachineTypes requires manual conversion: does not exist in peer-type + // WARNING: in.ProviderConfig requires manual conversion: does not exist in peer-type + // WARNING: in.Regions requires manual conversion: does not exist in peer-type + // WARNING: in.SeedSelector requires manual conversion: does not exist in peer-type + // WARNING: in.Type requires manual conversion: does not exist in peer-type + // WARNING: in.VolumeTypes requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler(in *ClusterAutoscaler, out *garden.ClusterAutoscaler, s conversion.Scope) error { + out.ScaleDownUtilizationThreshold = (*float64)(unsafe.Pointer(in.ScaleDownUtilizationThreshold)) + out.ScaleDownUnneededTime = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownUnneededTime)) + out.ScaleDownDelayAfterAdd = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterAdd)) + out.ScaleDownDelayAfterFailure = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterFailure)) + out.ScaleDownDelayAfterDelete = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterDelete)) + out.ScanInterval = (*metav1.Duration)(unsafe.Pointer(in.ScanInterval)) + return nil +} + +// Convert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler is an autogenerated conversion function. +func Convert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler(in *ClusterAutoscaler, out *garden.ClusterAutoscaler, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterAutoscaler_To_garden_ClusterAutoscaler(in, out, s) +} + +func autoConvert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler(in *garden.ClusterAutoscaler, out *ClusterAutoscaler, s conversion.Scope) error { + out.ScaleDownUtilizationThreshold = (*float64)(unsafe.Pointer(in.ScaleDownUtilizationThreshold)) + out.ScaleDownUnneededTime = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownUnneededTime)) + out.ScaleDownDelayAfterAdd = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterAdd)) + out.ScaleDownDelayAfterFailure = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterFailure)) + out.ScaleDownDelayAfterDelete = (*metav1.Duration)(unsafe.Pointer(in.ScaleDownDelayAfterDelete)) + out.ScanInterval = (*metav1.Duration)(unsafe.Pointer(in.ScanInterval)) + return nil +} + +// Convert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler is an autogenerated conversion function. +func Convert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler(in *garden.ClusterAutoscaler, out *ClusterAutoscaler, s conversion.Scope) error { + return autoConvert_garden_ClusterAutoscaler_To_v1beta1_ClusterAutoscaler(in, out, s) +} + +func autoConvert_v1beta1_DNS_To_garden_DNS(in *DNS, out *garden.DNS, s conversion.Scope) error { + out.Domain = (*string)(unsafe.Pointer(in.Domain)) + // WARNING: in.SecretName requires manual conversion: does not exist in peer-type + // WARNING: in.Provider requires manual conversion: does not exist in peer-type + // WARNING: in.IncludeDomains requires manual conversion: does not exist in peer-type + // WARNING: in.ExcludeDomains requires manual conversion: does not exist in peer-type + // WARNING: in.IncludeZones requires manual conversion: does not exist in peer-type + // WARNING: in.ExcludeZones requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_garden_DNS_To_v1beta1_DNS(in *garden.DNS, out *DNS, s conversion.Scope) error { + out.Domain = (*string)(unsafe.Pointer(in.Domain)) + // WARNING: in.Providers requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_DNSProviderConstraint_To_garden_DNSProviderConstraint(in *DNSProviderConstraint, out *garden.DNSProviderConstraint, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_v1beta1_DNSProviderConstraint_To_garden_DNSProviderConstraint is an autogenerated conversion function. +func Convert_v1beta1_DNSProviderConstraint_To_garden_DNSProviderConstraint(in *DNSProviderConstraint, out *garden.DNSProviderConstraint, s conversion.Scope) error { + return autoConvert_v1beta1_DNSProviderConstraint_To_garden_DNSProviderConstraint(in, out, s) +} + +func autoConvert_garden_DNSProviderConstraint_To_v1beta1_DNSProviderConstraint(in *garden.DNSProviderConstraint, out *DNSProviderConstraint, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_garden_DNSProviderConstraint_To_v1beta1_DNSProviderConstraint is an autogenerated conversion function. +func Convert_garden_DNSProviderConstraint_To_v1beta1_DNSProviderConstraint(in *garden.DNSProviderConstraint, out *DNSProviderConstraint, s conversion.Scope) error { + return autoConvert_garden_DNSProviderConstraint_To_v1beta1_DNSProviderConstraint(in, out, s) +} + +func autoConvert_v1beta1_Extension_To_garden_Extension(in *Extension, out *garden.Extension, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_v1beta1_Extension_To_garden_Extension is an autogenerated conversion function. +func Convert_v1beta1_Extension_To_garden_Extension(in *Extension, out *garden.Extension, s conversion.Scope) error { + return autoConvert_v1beta1_Extension_To_garden_Extension(in, out, s) +} + +func autoConvert_garden_Extension_To_v1beta1_Extension(in *garden.Extension, out *Extension, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*v1alpha1.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_garden_Extension_To_v1beta1_Extension is an autogenerated conversion function. +func Convert_garden_Extension_To_v1beta1_Extension(in *garden.Extension, out *Extension, s conversion.Scope) error { + return autoConvert_garden_Extension_To_v1beta1_Extension(in, out, s) +} + +func autoConvert_v1beta1_GCPCloud_To_garden_GCPCloud(in *GCPCloud, out *garden.GCPCloud, s conversion.Scope) error { + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(garden.ShootMachineImage) + if err := Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_v1beta1_GCPNetworks_To_garden_GCPNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]garden.Worker, len(*in)) + for i := range *in { + if err := Convert_v1beta1_GCPWorker_To_garden_Worker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_GCPCloud_To_garden_GCPCloud is an autogenerated conversion function. +func Convert_v1beta1_GCPCloud_To_garden_GCPCloud(in *GCPCloud, out *garden.GCPCloud, s conversion.Scope) error { + return autoConvert_v1beta1_GCPCloud_To_garden_GCPCloud(in, out, s) +} + +func autoConvert_garden_GCPCloud_To_v1beta1_GCPCloud(in *garden.GCPCloud, out *GCPCloud, s conversion.Scope) error { + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(ShootMachineImage) + if err := Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_garden_GCPNetworks_To_v1beta1_GCPNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]GCPWorker, len(*in)) + for i := range *in { + if err := Convert_garden_Worker_To_v1beta1_GCPWorker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_GCPCloud_To_v1beta1_GCPCloud is an autogenerated conversion function. +func Convert_garden_GCPCloud_To_v1beta1_GCPCloud(in *garden.GCPCloud, out *GCPCloud, s conversion.Scope) error { + return autoConvert_garden_GCPCloud_To_v1beta1_GCPCloud(in, out, s) +} + +func autoConvert_v1beta1_GCPConstraints_To_garden_GCPConstraints(in *GCPConstraints, out *garden.GCPConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]garden.DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + if err := Convert_v1beta1_KubernetesConstraints_To_garden_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]garden.MachineImage, len(*in)) + for i := range *in { + if err := Convert_v1beta1_MachineImage_To_garden_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]garden.MachineType)(unsafe.Pointer(&in.MachineTypes)) + out.VolumeTypes = *(*[]garden.VolumeType)(unsafe.Pointer(&in.VolumeTypes)) + out.Zones = *(*[]garden.Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_GCPConstraints_To_garden_GCPConstraints is an autogenerated conversion function. +func Convert_v1beta1_GCPConstraints_To_garden_GCPConstraints(in *GCPConstraints, out *garden.GCPConstraints, s conversion.Scope) error { + return autoConvert_v1beta1_GCPConstraints_To_garden_GCPConstraints(in, out, s) +} + +func autoConvert_garden_GCPConstraints_To_v1beta1_GCPConstraints(in *garden.GCPConstraints, out *GCPConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + if err := Convert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]MachineImage, len(*in)) + for i := range *in { + if err := Convert_garden_MachineImage_To_v1beta1_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]MachineType)(unsafe.Pointer(&in.MachineTypes)) + out.VolumeTypes = *(*[]VolumeType)(unsafe.Pointer(&in.VolumeTypes)) + out.Zones = *(*[]Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_GCPConstraints_To_v1beta1_GCPConstraints is an autogenerated conversion function. +func Convert_garden_GCPConstraints_To_v1beta1_GCPConstraints(in *garden.GCPConstraints, out *GCPConstraints, s conversion.Scope) error { + return autoConvert_garden_GCPConstraints_To_v1beta1_GCPConstraints(in, out, s) +} + +func autoConvert_v1beta1_GCPNetworks_To_garden_GCPNetworks(in *GCPNetworks, out *garden.GCPNetworks, s conversion.Scope) error { + if err := Convert_v1beta1_K8SNetworks_To_garden_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + out.VPC = (*garden.GCPVPC)(unsafe.Pointer(in.VPC)) + out.Workers = *(*[]string)(unsafe.Pointer(&in.Workers)) + out.Internal = (*string)(unsafe.Pointer(in.Internal)) + return nil +} + +// Convert_v1beta1_GCPNetworks_To_garden_GCPNetworks is an autogenerated conversion function. +func Convert_v1beta1_GCPNetworks_To_garden_GCPNetworks(in *GCPNetworks, out *garden.GCPNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_GCPNetworks_To_garden_GCPNetworks(in, out, s) +} + +func autoConvert_garden_GCPNetworks_To_v1beta1_GCPNetworks(in *garden.GCPNetworks, out *GCPNetworks, s conversion.Scope) error { + if err := Convert_garden_K8SNetworks_To_v1beta1_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + out.VPC = (*GCPVPC)(unsafe.Pointer(in.VPC)) + out.Internal = (*string)(unsafe.Pointer(in.Internal)) + out.Workers = *(*[]string)(unsafe.Pointer(&in.Workers)) + return nil +} + +// Convert_garden_GCPNetworks_To_v1beta1_GCPNetworks is an autogenerated conversion function. +func Convert_garden_GCPNetworks_To_v1beta1_GCPNetworks(in *garden.GCPNetworks, out *GCPNetworks, s conversion.Scope) error { + return autoConvert_garden_GCPNetworks_To_v1beta1_GCPNetworks(in, out, s) +} + +func autoConvert_v1beta1_GCPProfile_To_garden_GCPProfile(in *GCPProfile, out *garden.GCPProfile, s conversion.Scope) error { + if err := Convert_v1beta1_GCPConstraints_To_garden_GCPConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_GCPProfile_To_garden_GCPProfile is an autogenerated conversion function. +func Convert_v1beta1_GCPProfile_To_garden_GCPProfile(in *GCPProfile, out *garden.GCPProfile, s conversion.Scope) error { + return autoConvert_v1beta1_GCPProfile_To_garden_GCPProfile(in, out, s) +} + +func autoConvert_garden_GCPProfile_To_v1beta1_GCPProfile(in *garden.GCPProfile, out *GCPProfile, s conversion.Scope) error { + if err := Convert_garden_GCPConstraints_To_v1beta1_GCPConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + return nil +} + +// Convert_garden_GCPProfile_To_v1beta1_GCPProfile is an autogenerated conversion function. +func Convert_garden_GCPProfile_To_v1beta1_GCPProfile(in *garden.GCPProfile, out *GCPProfile, s conversion.Scope) error { + return autoConvert_garden_GCPProfile_To_v1beta1_GCPProfile(in, out, s) +} + +func autoConvert_v1beta1_GCPVPC_To_garden_GCPVPC(in *GCPVPC, out *garden.GCPVPC, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_v1beta1_GCPVPC_To_garden_GCPVPC is an autogenerated conversion function. +func Convert_v1beta1_GCPVPC_To_garden_GCPVPC(in *GCPVPC, out *garden.GCPVPC, s conversion.Scope) error { + return autoConvert_v1beta1_GCPVPC_To_garden_GCPVPC(in, out, s) +} + +func autoConvert_garden_GCPVPC_To_v1beta1_GCPVPC(in *garden.GCPVPC, out *GCPVPC, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_garden_GCPVPC_To_v1beta1_GCPVPC is an autogenerated conversion function. +func Convert_garden_GCPVPC_To_v1beta1_GCPVPC(in *garden.GCPVPC, out *GCPVPC, s conversion.Scope) error { + return autoConvert_garden_GCPVPC_To_v1beta1_GCPVPC(in, out, s) +} + +func autoConvert_v1beta1_Gardener_To_garden_Gardener(in *Gardener, out *garden.Gardener, s conversion.Scope) error { + out.ID = in.ID + out.Name = in.Name + out.Version = in.Version + return nil +} + +// Convert_v1beta1_Gardener_To_garden_Gardener is an autogenerated conversion function. +func Convert_v1beta1_Gardener_To_garden_Gardener(in *Gardener, out *garden.Gardener, s conversion.Scope) error { + return autoConvert_v1beta1_Gardener_To_garden_Gardener(in, out, s) +} + +func autoConvert_garden_Gardener_To_v1beta1_Gardener(in *garden.Gardener, out *Gardener, s conversion.Scope) error { + out.ID = in.ID + out.Name = in.Name + out.Version = in.Version + return nil +} + +// Convert_garden_Gardener_To_v1beta1_Gardener is an autogenerated conversion function. +func Convert_garden_Gardener_To_v1beta1_Gardener(in *garden.Gardener, out *Gardener, s conversion.Scope) error { + return autoConvert_garden_Gardener_To_v1beta1_Gardener(in, out, s) +} + +func autoConvert_v1beta1_Heapster_To_garden_Heapster(in *Heapster, out *garden.Heapster, s conversion.Scope) error { + if err := Convert_v1beta1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_Heapster_To_garden_Heapster is an autogenerated conversion function. +func Convert_v1beta1_Heapster_To_garden_Heapster(in *Heapster, out *garden.Heapster, s conversion.Scope) error { + return autoConvert_v1beta1_Heapster_To_garden_Heapster(in, out, s) +} + +func autoConvert_garden_Heapster_To_v1beta1_Heapster(in *garden.Heapster, out *Heapster, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1beta1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + return nil +} + +// Convert_garden_Heapster_To_v1beta1_Heapster is an autogenerated conversion function. +func Convert_garden_Heapster_To_v1beta1_Heapster(in *garden.Heapster, out *Heapster, s conversion.Scope) error { + return autoConvert_garden_Heapster_To_v1beta1_Heapster(in, out, s) +} + +func autoConvert_v1beta1_HelmTiller_To_garden_HelmTiller(in *HelmTiller, out *garden.HelmTiller, s conversion.Scope) error { + if err := Convert_v1beta1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_HelmTiller_To_garden_HelmTiller is an autogenerated conversion function. +func Convert_v1beta1_HelmTiller_To_garden_HelmTiller(in *HelmTiller, out *garden.HelmTiller, s conversion.Scope) error { + return autoConvert_v1beta1_HelmTiller_To_garden_HelmTiller(in, out, s) +} + +func autoConvert_garden_HelmTiller_To_v1beta1_HelmTiller(in *garden.HelmTiller, out *HelmTiller, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1beta1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + return nil +} + +// Convert_garden_HelmTiller_To_v1beta1_HelmTiller is an autogenerated conversion function. +func Convert_garden_HelmTiller_To_v1beta1_HelmTiller(in *garden.HelmTiller, out *HelmTiller, s conversion.Scope) error { + return autoConvert_garden_HelmTiller_To_v1beta1_HelmTiller(in, out, s) +} + +func autoConvert_v1beta1_Hibernation_To_garden_Hibernation(in *Hibernation, out *garden.Hibernation, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + out.Schedules = *(*[]garden.HibernationSchedule)(unsafe.Pointer(&in.Schedules)) + return nil +} + +// Convert_v1beta1_Hibernation_To_garden_Hibernation is an autogenerated conversion function. +func Convert_v1beta1_Hibernation_To_garden_Hibernation(in *Hibernation, out *garden.Hibernation, s conversion.Scope) error { + return autoConvert_v1beta1_Hibernation_To_garden_Hibernation(in, out, s) +} + +func autoConvert_garden_Hibernation_To_v1beta1_Hibernation(in *garden.Hibernation, out *Hibernation, s conversion.Scope) error { + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + out.Schedules = *(*[]HibernationSchedule)(unsafe.Pointer(&in.Schedules)) + return nil +} + +// Convert_garden_Hibernation_To_v1beta1_Hibernation is an autogenerated conversion function. +func Convert_garden_Hibernation_To_v1beta1_Hibernation(in *garden.Hibernation, out *Hibernation, s conversion.Scope) error { + return autoConvert_garden_Hibernation_To_v1beta1_Hibernation(in, out, s) +} + +func autoConvert_v1beta1_HibernationSchedule_To_garden_HibernationSchedule(in *HibernationSchedule, out *garden.HibernationSchedule, s conversion.Scope) error { + out.Start = (*string)(unsafe.Pointer(in.Start)) + out.End = (*string)(unsafe.Pointer(in.End)) + out.Location = (*string)(unsafe.Pointer(in.Location)) + return nil +} + +// Convert_v1beta1_HibernationSchedule_To_garden_HibernationSchedule is an autogenerated conversion function. +func Convert_v1beta1_HibernationSchedule_To_garden_HibernationSchedule(in *HibernationSchedule, out *garden.HibernationSchedule, s conversion.Scope) error { + return autoConvert_v1beta1_HibernationSchedule_To_garden_HibernationSchedule(in, out, s) +} + +func autoConvert_garden_HibernationSchedule_To_v1beta1_HibernationSchedule(in *garden.HibernationSchedule, out *HibernationSchedule, s conversion.Scope) error { + out.Start = (*string)(unsafe.Pointer(in.Start)) + out.End = (*string)(unsafe.Pointer(in.End)) + out.Location = (*string)(unsafe.Pointer(in.Location)) + return nil +} + +// Convert_garden_HibernationSchedule_To_v1beta1_HibernationSchedule is an autogenerated conversion function. +func Convert_garden_HibernationSchedule_To_v1beta1_HibernationSchedule(in *garden.HibernationSchedule, out *HibernationSchedule, s conversion.Scope) error { + return autoConvert_garden_HibernationSchedule_To_v1beta1_HibernationSchedule(in, out, s) +} + +func autoConvert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(in *HorizontalPodAutoscalerConfig, out *garden.HorizontalPodAutoscalerConfig, s conversion.Scope) error { + out.DownscaleDelay = (*metav1.Duration)(unsafe.Pointer(in.DownscaleDelay)) + out.SyncPeriod = (*metav1.Duration)(unsafe.Pointer(in.SyncPeriod)) + out.Tolerance = (*float64)(unsafe.Pointer(in.Tolerance)) + out.UpscaleDelay = (*metav1.Duration)(unsafe.Pointer(in.UpscaleDelay)) + out.DownscaleStabilization = (*metav1.Duration)(unsafe.Pointer(in.DownscaleStabilization)) + out.InitialReadinessDelay = (*metav1.Duration)(unsafe.Pointer(in.InitialReadinessDelay)) + out.CPUInitializationPeriod = (*metav1.Duration)(unsafe.Pointer(in.CPUInitializationPeriod)) + return nil +} + +// Convert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig is an autogenerated conversion function. +func Convert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(in *HorizontalPodAutoscalerConfig, out *garden.HorizontalPodAutoscalerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_HorizontalPodAutoscalerConfig_To_garden_HorizontalPodAutoscalerConfig(in, out, s) +} + +func autoConvert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig(in *garden.HorizontalPodAutoscalerConfig, out *HorizontalPodAutoscalerConfig, s conversion.Scope) error { + out.DownscaleDelay = (*GardenerDuration)(unsafe.Pointer(in.DownscaleDelay)) + out.SyncPeriod = (*GardenerDuration)(unsafe.Pointer(in.SyncPeriod)) + out.Tolerance = (*float64)(unsafe.Pointer(in.Tolerance)) + out.UpscaleDelay = (*GardenerDuration)(unsafe.Pointer(in.UpscaleDelay)) + out.DownscaleStabilization = (*GardenerDuration)(unsafe.Pointer(in.DownscaleStabilization)) + out.InitialReadinessDelay = (*GardenerDuration)(unsafe.Pointer(in.InitialReadinessDelay)) + out.CPUInitializationPeriod = (*GardenerDuration)(unsafe.Pointer(in.CPUInitializationPeriod)) + return nil +} + +// Convert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig is an autogenerated conversion function. +func Convert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig(in *garden.HorizontalPodAutoscalerConfig, out *HorizontalPodAutoscalerConfig, s conversion.Scope) error { + return autoConvert_garden_HorizontalPodAutoscalerConfig_To_v1beta1_HorizontalPodAutoscalerConfig(in, out, s) +} + +func autoConvert_v1beta1_K8SNetworks_To_garden_K8SNetworks(in *K8SNetworks, out *garden.K8SNetworks, s conversion.Scope) error { + out.Nodes = (*string)(unsafe.Pointer(in.Nodes)) + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_v1beta1_K8SNetworks_To_garden_K8SNetworks is an autogenerated conversion function. +func Convert_v1beta1_K8SNetworks_To_garden_K8SNetworks(in *K8SNetworks, out *garden.K8SNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_K8SNetworks_To_garden_K8SNetworks(in, out, s) +} + +func autoConvert_garden_K8SNetworks_To_v1beta1_K8SNetworks(in *garden.K8SNetworks, out *K8SNetworks, s conversion.Scope) error { + out.Nodes = (*string)(unsafe.Pointer(in.Nodes)) + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_garden_K8SNetworks_To_v1beta1_K8SNetworks is an autogenerated conversion function. +func Convert_garden_K8SNetworks_To_v1beta1_K8SNetworks(in *garden.K8SNetworks, out *K8SNetworks, s conversion.Scope) error { + return autoConvert_garden_K8SNetworks_To_v1beta1_K8SNetworks(in, out, s) +} + +func autoConvert_v1beta1_Kube2IAM_To_garden_Kube2IAM(in *Kube2IAM, out *garden.Kube2IAM, s conversion.Scope) error { + if err := Convert_v1beta1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.Roles = *(*[]garden.Kube2IAMRole)(unsafe.Pointer(&in.Roles)) + return nil +} + +// Convert_v1beta1_Kube2IAM_To_garden_Kube2IAM is an autogenerated conversion function. +func Convert_v1beta1_Kube2IAM_To_garden_Kube2IAM(in *Kube2IAM, out *garden.Kube2IAM, s conversion.Scope) error { + return autoConvert_v1beta1_Kube2IAM_To_garden_Kube2IAM(in, out, s) +} + +func autoConvert_garden_Kube2IAM_To_v1beta1_Kube2IAM(in *garden.Kube2IAM, out *Kube2IAM, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1beta1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.Roles = *(*[]Kube2IAMRole)(unsafe.Pointer(&in.Roles)) + return nil +} + +// Convert_garden_Kube2IAM_To_v1beta1_Kube2IAM is an autogenerated conversion function. +func Convert_garden_Kube2IAM_To_v1beta1_Kube2IAM(in *garden.Kube2IAM, out *Kube2IAM, s conversion.Scope) error { + return autoConvert_garden_Kube2IAM_To_v1beta1_Kube2IAM(in, out, s) +} + +func autoConvert_v1beta1_Kube2IAMRole_To_garden_Kube2IAMRole(in *Kube2IAMRole, out *garden.Kube2IAMRole, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.Policy = in.Policy + return nil +} + +// Convert_v1beta1_Kube2IAMRole_To_garden_Kube2IAMRole is an autogenerated conversion function. +func Convert_v1beta1_Kube2IAMRole_To_garden_Kube2IAMRole(in *Kube2IAMRole, out *garden.Kube2IAMRole, s conversion.Scope) error { + return autoConvert_v1beta1_Kube2IAMRole_To_garden_Kube2IAMRole(in, out, s) +} + +func autoConvert_garden_Kube2IAMRole_To_v1beta1_Kube2IAMRole(in *garden.Kube2IAMRole, out *Kube2IAMRole, s conversion.Scope) error { + out.Name = in.Name + out.Description = in.Description + out.Policy = in.Policy + return nil +} + +// Convert_garden_Kube2IAMRole_To_v1beta1_Kube2IAMRole is an autogenerated conversion function. +func Convert_garden_Kube2IAMRole_To_v1beta1_Kube2IAMRole(in *garden.Kube2IAMRole, out *Kube2IAMRole, s conversion.Scope) error { + return autoConvert_garden_Kube2IAMRole_To_v1beta1_Kube2IAMRole(in, out, s) +} + +func autoConvert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(in *KubeAPIServerConfig, out *garden.KubeAPIServerConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.AdmissionPlugins = *(*[]garden.AdmissionPlugin)(unsafe.Pointer(&in.AdmissionPlugins)) + out.APIAudiences = *(*[]string)(unsafe.Pointer(&in.APIAudiences)) + out.AuditConfig = (*garden.AuditConfig)(unsafe.Pointer(in.AuditConfig)) + out.EnableBasicAuthentication = (*bool)(unsafe.Pointer(in.EnableBasicAuthentication)) + out.OIDCConfig = (*garden.OIDCConfig)(unsafe.Pointer(in.OIDCConfig)) + out.RuntimeConfig = *(*map[string]bool)(unsafe.Pointer(&in.RuntimeConfig)) + out.ServiceAccountConfig = (*garden.ServiceAccountConfig)(unsafe.Pointer(in.ServiceAccountConfig)) + return nil +} + +// Convert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(in *KubeAPIServerConfig, out *garden.KubeAPIServerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeAPIServerConfig_To_garden_KubeAPIServerConfig(in, out, s) +} + +func autoConvert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig(in *garden.KubeAPIServerConfig, out *KubeAPIServerConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.AdmissionPlugins = *(*[]AdmissionPlugin)(unsafe.Pointer(&in.AdmissionPlugins)) + out.APIAudiences = *(*[]string)(unsafe.Pointer(&in.APIAudiences)) + out.AuditConfig = (*AuditConfig)(unsafe.Pointer(in.AuditConfig)) + out.EnableBasicAuthentication = (*bool)(unsafe.Pointer(in.EnableBasicAuthentication)) + out.OIDCConfig = (*OIDCConfig)(unsafe.Pointer(in.OIDCConfig)) + out.RuntimeConfig = *(*map[string]bool)(unsafe.Pointer(&in.RuntimeConfig)) + out.ServiceAccountConfig = (*ServiceAccountConfig)(unsafe.Pointer(in.ServiceAccountConfig)) + return nil +} + +// Convert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig is an autogenerated conversion function. +func Convert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig(in *garden.KubeAPIServerConfig, out *KubeAPIServerConfig, s conversion.Scope) error { + return autoConvert_garden_KubeAPIServerConfig_To_v1beta1_KubeAPIServerConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(in *KubeControllerManagerConfig, out *garden.KubeControllerManagerConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.HorizontalPodAutoscalerConfig = (*garden.HorizontalPodAutoscalerConfig)(unsafe.Pointer(in.HorizontalPodAutoscalerConfig)) + out.NodeCIDRMaskSize = (*int)(unsafe.Pointer(in.NodeCIDRMaskSize)) + return nil +} + +// Convert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(in *KubeControllerManagerConfig, out *garden.KubeControllerManagerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeControllerManagerConfig_To_garden_KubeControllerManagerConfig(in, out, s) +} + +func autoConvert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig(in *garden.KubeControllerManagerConfig, out *KubeControllerManagerConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.HorizontalPodAutoscalerConfig = (*HorizontalPodAutoscalerConfig)(unsafe.Pointer(in.HorizontalPodAutoscalerConfig)) + out.NodeCIDRMaskSize = (*int)(unsafe.Pointer(in.NodeCIDRMaskSize)) + return nil +} + +// Convert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig is an autogenerated conversion function. +func Convert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig(in *garden.KubeControllerManagerConfig, out *KubeControllerManagerConfig, s conversion.Scope) error { + return autoConvert_garden_KubeControllerManagerConfig_To_v1beta1_KubeControllerManagerConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeLego_To_garden_KubeLego(in *KubeLego, out *garden.KubeLego, s conversion.Scope) error { + if err := Convert_v1beta1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.Mail = in.Mail + return nil +} + +// Convert_v1beta1_KubeLego_To_garden_KubeLego is an autogenerated conversion function. +func Convert_v1beta1_KubeLego_To_garden_KubeLego(in *KubeLego, out *garden.KubeLego, s conversion.Scope) error { + return autoConvert_v1beta1_KubeLego_To_garden_KubeLego(in, out, s) +} + +func autoConvert_garden_KubeLego_To_v1beta1_KubeLego(in *garden.KubeLego, out *KubeLego, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1beta1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.Mail = in.Mail + return nil +} + +// Convert_garden_KubeLego_To_v1beta1_KubeLego is an autogenerated conversion function. +func Convert_garden_KubeLego_To_v1beta1_KubeLego(in *garden.KubeLego, out *KubeLego, s conversion.Scope) error { + return autoConvert_garden_KubeLego_To_v1beta1_KubeLego(in, out, s) +} + +func autoConvert_v1beta1_KubeProxyConfig_To_garden_KubeProxyConfig(in *KubeProxyConfig, out *garden.KubeProxyConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.Mode = (*garden.ProxyMode)(unsafe.Pointer(in.Mode)) + return nil +} + +// Convert_v1beta1_KubeProxyConfig_To_garden_KubeProxyConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeProxyConfig_To_garden_KubeProxyConfig(in *KubeProxyConfig, out *garden.KubeProxyConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeProxyConfig_To_garden_KubeProxyConfig(in, out, s) +} + +func autoConvert_garden_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *garden.KubeProxyConfig, out *KubeProxyConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.Mode = (*ProxyMode)(unsafe.Pointer(in.Mode)) + return nil +} + +// Convert_garden_KubeProxyConfig_To_v1beta1_KubeProxyConfig is an autogenerated conversion function. +func Convert_garden_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in *garden.KubeProxyConfig, out *KubeProxyConfig, s conversion.Scope) error { + return autoConvert_garden_KubeProxyConfig_To_v1beta1_KubeProxyConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(in *KubeSchedulerConfig, out *garden.KubeSchedulerConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(in *KubeSchedulerConfig, out *garden.KubeSchedulerConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeSchedulerConfig_To_garden_KubeSchedulerConfig(in, out, s) +} + +func autoConvert_garden_KubeSchedulerConfig_To_v1beta1_KubeSchedulerConfig(in *garden.KubeSchedulerConfig, out *KubeSchedulerConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + return nil +} + +// Convert_garden_KubeSchedulerConfig_To_v1beta1_KubeSchedulerConfig is an autogenerated conversion function. +func Convert_garden_KubeSchedulerConfig_To_v1beta1_KubeSchedulerConfig(in *garden.KubeSchedulerConfig, out *KubeSchedulerConfig, s conversion.Scope) error { + return autoConvert_garden_KubeSchedulerConfig_To_v1beta1_KubeSchedulerConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeletConfig_To_garden_KubeletConfig(in *KubeletConfig, out *garden.KubeletConfig, s conversion.Scope) error { + if err := Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.PodPIDsLimit = (*int64)(unsafe.Pointer(in.PodPIDsLimit)) + out.CPUCFSQuota = (*bool)(unsafe.Pointer(in.CPUCFSQuota)) + out.CPUManagerPolicy = (*string)(unsafe.Pointer(in.CPUManagerPolicy)) + out.MaxPods = (*int32)(unsafe.Pointer(in.MaxPods)) + out.EvictionHard = (*garden.KubeletConfigEviction)(unsafe.Pointer(in.EvictionHard)) + out.EvictionSoft = (*garden.KubeletConfigEviction)(unsafe.Pointer(in.EvictionSoft)) + out.EvictionSoftGracePeriod = (*garden.KubeletConfigEvictionSoftGracePeriod)(unsafe.Pointer(in.EvictionSoftGracePeriod)) + out.EvictionMinimumReclaim = (*garden.KubeletConfigEvictionMinimumReclaim)(unsafe.Pointer(in.EvictionMinimumReclaim)) + out.EvictionPressureTransitionPeriod = (*metav1.Duration)(unsafe.Pointer(in.EvictionPressureTransitionPeriod)) + out.EvictionMaxPodGracePeriod = (*int32)(unsafe.Pointer(in.EvictionMaxPodGracePeriod)) + return nil +} + +// Convert_v1beta1_KubeletConfig_To_garden_KubeletConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeletConfig_To_garden_KubeletConfig(in *KubeletConfig, out *garden.KubeletConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeletConfig_To_garden_KubeletConfig(in, out, s) +} + +func autoConvert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in *garden.KubeletConfig, out *KubeletConfig, s conversion.Scope) error { + if err := Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(&in.KubernetesConfig, &out.KubernetesConfig, s); err != nil { + return err + } + out.PodPIDsLimit = (*int64)(unsafe.Pointer(in.PodPIDsLimit)) + out.CPUCFSQuota = (*bool)(unsafe.Pointer(in.CPUCFSQuota)) + out.CPUManagerPolicy = (*string)(unsafe.Pointer(in.CPUManagerPolicy)) + out.MaxPods = (*int32)(unsafe.Pointer(in.MaxPods)) + out.EvictionHard = (*KubeletConfigEviction)(unsafe.Pointer(in.EvictionHard)) + out.EvictionSoft = (*KubeletConfigEviction)(unsafe.Pointer(in.EvictionSoft)) + out.EvictionSoftGracePeriod = (*KubeletConfigEvictionSoftGracePeriod)(unsafe.Pointer(in.EvictionSoftGracePeriod)) + out.EvictionMinimumReclaim = (*KubeletConfigEvictionMinimumReclaim)(unsafe.Pointer(in.EvictionMinimumReclaim)) + out.EvictionPressureTransitionPeriod = (*metav1.Duration)(unsafe.Pointer(in.EvictionPressureTransitionPeriod)) + out.EvictionMaxPodGracePeriod = (*int32)(unsafe.Pointer(in.EvictionMaxPodGracePeriod)) + return nil +} + +// Convert_garden_KubeletConfig_To_v1beta1_KubeletConfig is an autogenerated conversion function. +func Convert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in *garden.KubeletConfig, out *KubeletConfig, s conversion.Scope) error { + return autoConvert_garden_KubeletConfig_To_v1beta1_KubeletConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeletConfigEviction_To_garden_KubeletConfigEviction(in *KubeletConfigEviction, out *garden.KubeletConfigEviction, s conversion.Scope) error { + out.MemoryAvailable = (*string)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*string)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*string)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*string)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*string)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_v1beta1_KubeletConfigEviction_To_garden_KubeletConfigEviction is an autogenerated conversion function. +func Convert_v1beta1_KubeletConfigEviction_To_garden_KubeletConfigEviction(in *KubeletConfigEviction, out *garden.KubeletConfigEviction, s conversion.Scope) error { + return autoConvert_v1beta1_KubeletConfigEviction_To_garden_KubeletConfigEviction(in, out, s) +} + +func autoConvert_garden_KubeletConfigEviction_To_v1beta1_KubeletConfigEviction(in *garden.KubeletConfigEviction, out *KubeletConfigEviction, s conversion.Scope) error { + out.MemoryAvailable = (*string)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*string)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*string)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*string)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*string)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_garden_KubeletConfigEviction_To_v1beta1_KubeletConfigEviction is an autogenerated conversion function. +func Convert_garden_KubeletConfigEviction_To_v1beta1_KubeletConfigEviction(in *garden.KubeletConfigEviction, out *KubeletConfigEviction, s conversion.Scope) error { + return autoConvert_garden_KubeletConfigEviction_To_v1beta1_KubeletConfigEviction(in, out, s) +} + +func autoConvert_v1beta1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(in *KubeletConfigEvictionMinimumReclaim, out *garden.KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + out.MemoryAvailable = (*resource.Quantity)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_v1beta1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim is an autogenerated conversion function. +func Convert_v1beta1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(in *KubeletConfigEvictionMinimumReclaim, out *garden.KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + return autoConvert_v1beta1_KubeletConfigEvictionMinimumReclaim_To_garden_KubeletConfigEvictionMinimumReclaim(in, out, s) +} + +func autoConvert_garden_KubeletConfigEvictionMinimumReclaim_To_v1beta1_KubeletConfigEvictionMinimumReclaim(in *garden.KubeletConfigEvictionMinimumReclaim, out *KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + out.MemoryAvailable = (*resource.Quantity)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*resource.Quantity)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*resource.Quantity)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_garden_KubeletConfigEvictionMinimumReclaim_To_v1beta1_KubeletConfigEvictionMinimumReclaim is an autogenerated conversion function. +func Convert_garden_KubeletConfigEvictionMinimumReclaim_To_v1beta1_KubeletConfigEvictionMinimumReclaim(in *garden.KubeletConfigEvictionMinimumReclaim, out *KubeletConfigEvictionMinimumReclaim, s conversion.Scope) error { + return autoConvert_garden_KubeletConfigEvictionMinimumReclaim_To_v1beta1_KubeletConfigEvictionMinimumReclaim(in, out, s) +} + +func autoConvert_v1beta1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(in *KubeletConfigEvictionSoftGracePeriod, out *garden.KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + out.MemoryAvailable = (*metav1.Duration)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_v1beta1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod is an autogenerated conversion function. +func Convert_v1beta1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(in *KubeletConfigEvictionSoftGracePeriod, out *garden.KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + return autoConvert_v1beta1_KubeletConfigEvictionSoftGracePeriod_To_garden_KubeletConfigEvictionSoftGracePeriod(in, out, s) +} + +func autoConvert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1beta1_KubeletConfigEvictionSoftGracePeriod(in *garden.KubeletConfigEvictionSoftGracePeriod, out *KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + out.MemoryAvailable = (*metav1.Duration)(unsafe.Pointer(in.MemoryAvailable)) + out.ImageFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.ImageFSAvailable)) + out.ImageFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.ImageFSInodesFree)) + out.NodeFSAvailable = (*metav1.Duration)(unsafe.Pointer(in.NodeFSAvailable)) + out.NodeFSInodesFree = (*metav1.Duration)(unsafe.Pointer(in.NodeFSInodesFree)) + return nil +} + +// Convert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1beta1_KubeletConfigEvictionSoftGracePeriod is an autogenerated conversion function. +func Convert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1beta1_KubeletConfigEvictionSoftGracePeriod(in *garden.KubeletConfigEvictionSoftGracePeriod, out *KubeletConfigEvictionSoftGracePeriod, s conversion.Scope) error { + return autoConvert_garden_KubeletConfigEvictionSoftGracePeriod_To_v1beta1_KubeletConfigEvictionSoftGracePeriod(in, out, s) +} + +func autoConvert_v1beta1_Kubernetes_To_garden_Kubernetes(in *Kubernetes, out *garden.Kubernetes, s conversion.Scope) error { + out.AllowPrivilegedContainers = (*bool)(unsafe.Pointer(in.AllowPrivilegedContainers)) + out.KubeAPIServer = (*garden.KubeAPIServerConfig)(unsafe.Pointer(in.KubeAPIServer)) + out.CloudControllerManager = (*garden.CloudControllerManagerConfig)(unsafe.Pointer(in.CloudControllerManager)) + out.KubeControllerManager = (*garden.KubeControllerManagerConfig)(unsafe.Pointer(in.KubeControllerManager)) + out.KubeScheduler = (*garden.KubeSchedulerConfig)(unsafe.Pointer(in.KubeScheduler)) + out.KubeProxy = (*garden.KubeProxyConfig)(unsafe.Pointer(in.KubeProxy)) + out.Kubelet = (*garden.KubeletConfig)(unsafe.Pointer(in.Kubelet)) + out.Version = in.Version + out.ClusterAutoscaler = (*garden.ClusterAutoscaler)(unsafe.Pointer(in.ClusterAutoscaler)) + return nil +} + +// Convert_v1beta1_Kubernetes_To_garden_Kubernetes is an autogenerated conversion function. +func Convert_v1beta1_Kubernetes_To_garden_Kubernetes(in *Kubernetes, out *garden.Kubernetes, s conversion.Scope) error { + return autoConvert_v1beta1_Kubernetes_To_garden_Kubernetes(in, out, s) +} + +func autoConvert_garden_Kubernetes_To_v1beta1_Kubernetes(in *garden.Kubernetes, out *Kubernetes, s conversion.Scope) error { + out.AllowPrivilegedContainers = (*bool)(unsafe.Pointer(in.AllowPrivilegedContainers)) + out.KubeAPIServer = (*KubeAPIServerConfig)(unsafe.Pointer(in.KubeAPIServer)) + out.CloudControllerManager = (*CloudControllerManagerConfig)(unsafe.Pointer(in.CloudControllerManager)) + out.KubeControllerManager = (*KubeControllerManagerConfig)(unsafe.Pointer(in.KubeControllerManager)) + out.KubeScheduler = (*KubeSchedulerConfig)(unsafe.Pointer(in.KubeScheduler)) + out.KubeProxy = (*KubeProxyConfig)(unsafe.Pointer(in.KubeProxy)) + out.Kubelet = (*KubeletConfig)(unsafe.Pointer(in.Kubelet)) + out.Version = in.Version + out.ClusterAutoscaler = (*ClusterAutoscaler)(unsafe.Pointer(in.ClusterAutoscaler)) + return nil +} + +// Convert_garden_Kubernetes_To_v1beta1_Kubernetes is an autogenerated conversion function. +func Convert_garden_Kubernetes_To_v1beta1_Kubernetes(in *garden.Kubernetes, out *Kubernetes, s conversion.Scope) error { + return autoConvert_garden_Kubernetes_To_v1beta1_Kubernetes(in, out, s) +} + +func autoConvert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(in *KubernetesConfig, out *garden.KubernetesConfig, s conversion.Scope) error { + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + return nil +} + +// Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig is an autogenerated conversion function. +func Convert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(in *KubernetesConfig, out *garden.KubernetesConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubernetesConfig_To_garden_KubernetesConfig(in, out, s) +} + +func autoConvert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(in *garden.KubernetesConfig, out *KubernetesConfig, s conversion.Scope) error { + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + return nil +} + +// Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig is an autogenerated conversion function. +func Convert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(in *garden.KubernetesConfig, out *KubernetesConfig, s conversion.Scope) error { + return autoConvert_garden_KubernetesConfig_To_v1beta1_KubernetesConfig(in, out, s) +} + +func autoConvert_v1beta1_KubernetesConstraints_To_garden_KubernetesConstraints(in *KubernetesConstraints, out *garden.KubernetesConstraints, s conversion.Scope) error { + // WARNING: in.Versions requires manual conversion: does not exist in peer-type + out.OfferedVersions = *(*[]garden.KubernetesVersion)(unsafe.Pointer(&in.OfferedVersions)) + return nil +} + +func autoConvert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(in *garden.KubernetesConstraints, out *KubernetesConstraints, s conversion.Scope) error { + out.OfferedVersions = *(*[]KubernetesVersion)(unsafe.Pointer(&in.OfferedVersions)) + return nil +} + +func autoConvert_v1beta1_KubernetesDashboard_To_garden_KubernetesDashboard(in *KubernetesDashboard, out *garden.KubernetesDashboard, s conversion.Scope) error { + if err := Convert_v1beta1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.AuthenticationMode = (*string)(unsafe.Pointer(in.AuthenticationMode)) + return nil +} + +// Convert_v1beta1_KubernetesDashboard_To_garden_KubernetesDashboard is an autogenerated conversion function. +func Convert_v1beta1_KubernetesDashboard_To_garden_KubernetesDashboard(in *KubernetesDashboard, out *garden.KubernetesDashboard, s conversion.Scope) error { + return autoConvert_v1beta1_KubernetesDashboard_To_garden_KubernetesDashboard(in, out, s) +} + +func autoConvert_garden_KubernetesDashboard_To_v1beta1_KubernetesDashboard(in *garden.KubernetesDashboard, out *KubernetesDashboard, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1beta1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.AuthenticationMode = (*string)(unsafe.Pointer(in.AuthenticationMode)) + return nil +} + +// Convert_garden_KubernetesDashboard_To_v1beta1_KubernetesDashboard is an autogenerated conversion function. +func Convert_garden_KubernetesDashboard_To_v1beta1_KubernetesDashboard(in *garden.KubernetesDashboard, out *KubernetesDashboard, s conversion.Scope) error { + return autoConvert_garden_KubernetesDashboard_To_v1beta1_KubernetesDashboard(in, out, s) +} + +func autoConvert_v1beta1_KubernetesVersion_To_garden_KubernetesVersion(in *KubernetesVersion, out *garden.KubernetesVersion, s conversion.Scope) error { + out.Version = in.Version + out.ExpirationDate = (*metav1.Time)(unsafe.Pointer(in.ExpirationDate)) + return nil +} + +// Convert_v1beta1_KubernetesVersion_To_garden_KubernetesVersion is an autogenerated conversion function. +func Convert_v1beta1_KubernetesVersion_To_garden_KubernetesVersion(in *KubernetesVersion, out *garden.KubernetesVersion, s conversion.Scope) error { + return autoConvert_v1beta1_KubernetesVersion_To_garden_KubernetesVersion(in, out, s) +} + +func autoConvert_garden_KubernetesVersion_To_v1beta1_KubernetesVersion(in *garden.KubernetesVersion, out *KubernetesVersion, s conversion.Scope) error { + out.Version = in.Version + out.ExpirationDate = (*metav1.Time)(unsafe.Pointer(in.ExpirationDate)) + return nil +} + +// Convert_garden_KubernetesVersion_To_v1beta1_KubernetesVersion is an autogenerated conversion function. +func Convert_garden_KubernetesVersion_To_v1beta1_KubernetesVersion(in *garden.KubernetesVersion, out *KubernetesVersion, s conversion.Scope) error { + return autoConvert_garden_KubernetesVersion_To_v1beta1_KubernetesVersion(in, out, s) +} + +func autoConvert_v1beta1_MachineImage_To_garden_MachineImage(in *MachineImage, out *garden.MachineImage, s conversion.Scope) error { + out.Name = in.Name + // WARNING: in.Version requires manual conversion: does not exist in peer-type + out.Versions = *(*[]garden.MachineImageVersion)(unsafe.Pointer(&in.Versions)) + return nil +} + +func autoConvert_garden_MachineImage_To_v1beta1_MachineImage(in *garden.MachineImage, out *MachineImage, s conversion.Scope) error { + out.Name = in.Name + out.Versions = *(*[]MachineImageVersion)(unsafe.Pointer(&in.Versions)) + return nil +} + +func autoConvert_v1beta1_MachineImageVersion_To_garden_MachineImageVersion(in *MachineImageVersion, out *garden.MachineImageVersion, s conversion.Scope) error { + out.Version = in.Version + out.ExpirationDate = (*metav1.Time)(unsafe.Pointer(in.ExpirationDate)) + return nil +} + +// Convert_v1beta1_MachineImageVersion_To_garden_MachineImageVersion is an autogenerated conversion function. +func Convert_v1beta1_MachineImageVersion_To_garden_MachineImageVersion(in *MachineImageVersion, out *garden.MachineImageVersion, s conversion.Scope) error { + return autoConvert_v1beta1_MachineImageVersion_To_garden_MachineImageVersion(in, out, s) +} + +func autoConvert_garden_MachineImageVersion_To_v1beta1_MachineImageVersion(in *garden.MachineImageVersion, out *MachineImageVersion, s conversion.Scope) error { + out.Version = in.Version + out.ExpirationDate = (*metav1.Time)(unsafe.Pointer(in.ExpirationDate)) + return nil +} + +// Convert_garden_MachineImageVersion_To_v1beta1_MachineImageVersion is an autogenerated conversion function. +func Convert_garden_MachineImageVersion_To_v1beta1_MachineImageVersion(in *garden.MachineImageVersion, out *MachineImageVersion, s conversion.Scope) error { + return autoConvert_garden_MachineImageVersion_To_v1beta1_MachineImageVersion(in, out, s) +} + +func autoConvert_v1beta1_MachineType_To_garden_MachineType(in *MachineType, out *garden.MachineType, s conversion.Scope) error { + out.Name = in.Name + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + out.CPU = in.CPU + out.GPU = in.GPU + out.Storage = (*garden.MachineTypeStorage)(unsafe.Pointer(in.Storage)) + out.Memory = in.Memory + return nil +} + +// Convert_v1beta1_MachineType_To_garden_MachineType is an autogenerated conversion function. +func Convert_v1beta1_MachineType_To_garden_MachineType(in *MachineType, out *garden.MachineType, s conversion.Scope) error { + return autoConvert_v1beta1_MachineType_To_garden_MachineType(in, out, s) +} + +func autoConvert_garden_MachineType_To_v1beta1_MachineType(in *garden.MachineType, out *MachineType, s conversion.Scope) error { + out.Name = in.Name + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + out.CPU = in.CPU + out.GPU = in.GPU + out.Storage = (*MachineTypeStorage)(unsafe.Pointer(in.Storage)) + out.Memory = in.Memory + return nil +} + +// Convert_garden_MachineType_To_v1beta1_MachineType is an autogenerated conversion function. +func Convert_garden_MachineType_To_v1beta1_MachineType(in *garden.MachineType, out *MachineType, s conversion.Scope) error { + return autoConvert_garden_MachineType_To_v1beta1_MachineType(in, out, s) +} + +func autoConvert_v1beta1_MachineTypeStorage_To_garden_MachineTypeStorage(in *MachineTypeStorage, out *garden.MachineTypeStorage, s conversion.Scope) error { + out.Class = in.Class + out.Size = in.Size + out.Type = in.Type + return nil +} + +// Convert_v1beta1_MachineTypeStorage_To_garden_MachineTypeStorage is an autogenerated conversion function. +func Convert_v1beta1_MachineTypeStorage_To_garden_MachineTypeStorage(in *MachineTypeStorage, out *garden.MachineTypeStorage, s conversion.Scope) error { + return autoConvert_v1beta1_MachineTypeStorage_To_garden_MachineTypeStorage(in, out, s) +} + +func autoConvert_garden_MachineTypeStorage_To_v1beta1_MachineTypeStorage(in *garden.MachineTypeStorage, out *MachineTypeStorage, s conversion.Scope) error { + out.Class = in.Class + out.Size = in.Size + out.Type = in.Type + return nil +} + +// Convert_garden_MachineTypeStorage_To_v1beta1_MachineTypeStorage is an autogenerated conversion function. +func Convert_garden_MachineTypeStorage_To_v1beta1_MachineTypeStorage(in *garden.MachineTypeStorage, out *MachineTypeStorage, s conversion.Scope) error { + return autoConvert_garden_MachineTypeStorage_To_v1beta1_MachineTypeStorage(in, out, s) +} + +func autoConvert_v1beta1_Maintenance_To_garden_Maintenance(in *Maintenance, out *garden.Maintenance, s conversion.Scope) error { + out.AutoUpdate = (*garden.MaintenanceAutoUpdate)(unsafe.Pointer(in.AutoUpdate)) + out.TimeWindow = (*garden.MaintenanceTimeWindow)(unsafe.Pointer(in.TimeWindow)) + return nil +} + +// Convert_v1beta1_Maintenance_To_garden_Maintenance is an autogenerated conversion function. +func Convert_v1beta1_Maintenance_To_garden_Maintenance(in *Maintenance, out *garden.Maintenance, s conversion.Scope) error { + return autoConvert_v1beta1_Maintenance_To_garden_Maintenance(in, out, s) +} + +func autoConvert_garden_Maintenance_To_v1beta1_Maintenance(in *garden.Maintenance, out *Maintenance, s conversion.Scope) error { + out.AutoUpdate = (*MaintenanceAutoUpdate)(unsafe.Pointer(in.AutoUpdate)) + out.TimeWindow = (*MaintenanceTimeWindow)(unsafe.Pointer(in.TimeWindow)) + return nil +} + +// Convert_garden_Maintenance_To_v1beta1_Maintenance is an autogenerated conversion function. +func Convert_garden_Maintenance_To_v1beta1_Maintenance(in *garden.Maintenance, out *Maintenance, s conversion.Scope) error { + return autoConvert_garden_Maintenance_To_v1beta1_Maintenance(in, out, s) +} + +func autoConvert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(in *MaintenanceAutoUpdate, out *garden.MaintenanceAutoUpdate, s conversion.Scope) error { + out.KubernetesVersion = in.KubernetesVersion + out.MachineImageVersion = (*bool)(unsafe.Pointer(in.MachineImageVersion)) + return nil +} + +// Convert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate is an autogenerated conversion function. +func Convert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(in *MaintenanceAutoUpdate, out *garden.MaintenanceAutoUpdate, s conversion.Scope) error { + return autoConvert_v1beta1_MaintenanceAutoUpdate_To_garden_MaintenanceAutoUpdate(in, out, s) +} + +func autoConvert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate(in *garden.MaintenanceAutoUpdate, out *MaintenanceAutoUpdate, s conversion.Scope) error { + out.KubernetesVersion = in.KubernetesVersion + out.MachineImageVersion = (*bool)(unsafe.Pointer(in.MachineImageVersion)) + return nil +} + +// Convert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate is an autogenerated conversion function. +func Convert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate(in *garden.MaintenanceAutoUpdate, out *MaintenanceAutoUpdate, s conversion.Scope) error { + return autoConvert_garden_MaintenanceAutoUpdate_To_v1beta1_MaintenanceAutoUpdate(in, out, s) +} + +func autoConvert_v1beta1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(in *MaintenanceTimeWindow, out *garden.MaintenanceTimeWindow, s conversion.Scope) error { + out.Begin = in.Begin + out.End = in.End + return nil +} + +// Convert_v1beta1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow is an autogenerated conversion function. +func Convert_v1beta1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(in *MaintenanceTimeWindow, out *garden.MaintenanceTimeWindow, s conversion.Scope) error { + return autoConvert_v1beta1_MaintenanceTimeWindow_To_garden_MaintenanceTimeWindow(in, out, s) +} + +func autoConvert_garden_MaintenanceTimeWindow_To_v1beta1_MaintenanceTimeWindow(in *garden.MaintenanceTimeWindow, out *MaintenanceTimeWindow, s conversion.Scope) error { + out.Begin = in.Begin + out.End = in.End + return nil +} + +// Convert_garden_MaintenanceTimeWindow_To_v1beta1_MaintenanceTimeWindow is an autogenerated conversion function. +func Convert_garden_MaintenanceTimeWindow_To_v1beta1_MaintenanceTimeWindow(in *garden.MaintenanceTimeWindow, out *MaintenanceTimeWindow, s conversion.Scope) error { + return autoConvert_garden_MaintenanceTimeWindow_To_v1beta1_MaintenanceTimeWindow(in, out, s) +} + +func autoConvert_v1beta1_Monitoring_To_garden_Monitoring(in *Monitoring, out *garden.Monitoring, s conversion.Scope) error { + out.Alerting = (*garden.Alerting)(unsafe.Pointer(in.Alerting)) + return nil +} + +// Convert_v1beta1_Monitoring_To_garden_Monitoring is an autogenerated conversion function. +func Convert_v1beta1_Monitoring_To_garden_Monitoring(in *Monitoring, out *garden.Monitoring, s conversion.Scope) error { + return autoConvert_v1beta1_Monitoring_To_garden_Monitoring(in, out, s) +} + +func autoConvert_garden_Monitoring_To_v1beta1_Monitoring(in *garden.Monitoring, out *Monitoring, s conversion.Scope) error { + out.Alerting = (*Alerting)(unsafe.Pointer(in.Alerting)) + return nil +} + +// Convert_garden_Monitoring_To_v1beta1_Monitoring is an autogenerated conversion function. +func Convert_garden_Monitoring_To_v1beta1_Monitoring(in *garden.Monitoring, out *Monitoring, s conversion.Scope) error { + return autoConvert_garden_Monitoring_To_v1beta1_Monitoring(in, out, s) +} + +func autoConvert_v1beta1_Monocular_To_garden_Monocular(in *Monocular, out *garden.Monocular, s conversion.Scope) error { + if err := Convert_v1beta1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_Monocular_To_garden_Monocular is an autogenerated conversion function. +func Convert_v1beta1_Monocular_To_garden_Monocular(in *Monocular, out *garden.Monocular, s conversion.Scope) error { + return autoConvert_v1beta1_Monocular_To_garden_Monocular(in, out, s) +} + +func autoConvert_garden_Monocular_To_v1beta1_Monocular(in *garden.Monocular, out *Monocular, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1beta1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + return nil +} + +// Convert_garden_Monocular_To_v1beta1_Monocular is an autogenerated conversion function. +func Convert_garden_Monocular_To_v1beta1_Monocular(in *garden.Monocular, out *Monocular, s conversion.Scope) error { + return autoConvert_garden_Monocular_To_v1beta1_Monocular(in, out, s) +} + +func autoConvert_v1beta1_Networking_To_garden_Networking(in *Networking, out *garden.Networking, s conversion.Scope) error { + // WARNING: in.K8SNetworks requires manual conversion: does not exist in peer-type + out.Type = in.Type + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +func autoConvert_garden_Networking_To_v1beta1_Networking(in *garden.Networking, out *Networking, s conversion.Scope) error { + out.Type = in.Type + out.ProviderConfig = (*v1alpha1.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + // WARNING: in.Pods requires manual conversion: does not exist in peer-type + // WARNING: in.Nodes requires manual conversion: does not exist in peer-type + // WARNING: in.Services requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_NginxIngress_To_garden_NginxIngress(in *NginxIngress, out *garden.NginxIngress, s conversion.Scope) error { + if err := Convert_v1beta1_Addon_To_garden_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges)) + out.Config = *(*map[string]string)(unsafe.Pointer(&in.Config)) + out.ExternalTrafficPolicy = (*v1.ServiceExternalTrafficPolicyType)(unsafe.Pointer(in.ExternalTrafficPolicy)) + return nil +} + +// Convert_v1beta1_NginxIngress_To_garden_NginxIngress is an autogenerated conversion function. +func Convert_v1beta1_NginxIngress_To_garden_NginxIngress(in *NginxIngress, out *garden.NginxIngress, s conversion.Scope) error { + return autoConvert_v1beta1_NginxIngress_To_garden_NginxIngress(in, out, s) +} + +func autoConvert_garden_NginxIngress_To_v1beta1_NginxIngress(in *garden.NginxIngress, out *NginxIngress, s conversion.Scope) error { + if err := Convert_garden_Addon_To_v1beta1_Addon(&in.Addon, &out.Addon, s); err != nil { + return err + } + out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges)) + out.Config = *(*map[string]string)(unsafe.Pointer(&in.Config)) + out.ExternalTrafficPolicy = (*v1.ServiceExternalTrafficPolicyType)(unsafe.Pointer(in.ExternalTrafficPolicy)) + return nil +} + +// Convert_garden_NginxIngress_To_v1beta1_NginxIngress is an autogenerated conversion function. +func Convert_garden_NginxIngress_To_v1beta1_NginxIngress(in *garden.NginxIngress, out *NginxIngress, s conversion.Scope) error { + return autoConvert_garden_NginxIngress_To_v1beta1_NginxIngress(in, out, s) +} + +func autoConvert_v1beta1_OIDCConfig_To_garden_OIDCConfig(in *OIDCConfig, out *garden.OIDCConfig, s conversion.Scope) error { + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + out.ClientID = (*string)(unsafe.Pointer(in.ClientID)) + out.GroupsClaim = (*string)(unsafe.Pointer(in.GroupsClaim)) + out.GroupsPrefix = (*string)(unsafe.Pointer(in.GroupsPrefix)) + out.IssuerURL = (*string)(unsafe.Pointer(in.IssuerURL)) + out.RequiredClaims = *(*map[string]string)(unsafe.Pointer(&in.RequiredClaims)) + out.SigningAlgs = *(*[]string)(unsafe.Pointer(&in.SigningAlgs)) + out.UsernameClaim = (*string)(unsafe.Pointer(in.UsernameClaim)) + out.UsernamePrefix = (*string)(unsafe.Pointer(in.UsernamePrefix)) + out.ClientAuthentication = (*garden.OpenIDConnectClientAuthentication)(unsafe.Pointer(in.ClientAuthentication)) + return nil +} + +// Convert_v1beta1_OIDCConfig_To_garden_OIDCConfig is an autogenerated conversion function. +func Convert_v1beta1_OIDCConfig_To_garden_OIDCConfig(in *OIDCConfig, out *garden.OIDCConfig, s conversion.Scope) error { + return autoConvert_v1beta1_OIDCConfig_To_garden_OIDCConfig(in, out, s) +} + +func autoConvert_garden_OIDCConfig_To_v1beta1_OIDCConfig(in *garden.OIDCConfig, out *OIDCConfig, s conversion.Scope) error { + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + out.ClientID = (*string)(unsafe.Pointer(in.ClientID)) + out.GroupsClaim = (*string)(unsafe.Pointer(in.GroupsClaim)) + out.GroupsPrefix = (*string)(unsafe.Pointer(in.GroupsPrefix)) + out.IssuerURL = (*string)(unsafe.Pointer(in.IssuerURL)) + out.RequiredClaims = *(*map[string]string)(unsafe.Pointer(&in.RequiredClaims)) + out.SigningAlgs = *(*[]string)(unsafe.Pointer(&in.SigningAlgs)) + out.UsernameClaim = (*string)(unsafe.Pointer(in.UsernameClaim)) + out.UsernamePrefix = (*string)(unsafe.Pointer(in.UsernamePrefix)) + out.ClientAuthentication = (*OpenIDConnectClientAuthentication)(unsafe.Pointer(in.ClientAuthentication)) + return nil +} + +// Convert_garden_OIDCConfig_To_v1beta1_OIDCConfig is an autogenerated conversion function. +func Convert_garden_OIDCConfig_To_v1beta1_OIDCConfig(in *garden.OIDCConfig, out *OIDCConfig, s conversion.Scope) error { + return autoConvert_garden_OIDCConfig_To_v1beta1_OIDCConfig(in, out, s) +} + +func autoConvert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(in *OpenIDConnectClientAuthentication, out *garden.OpenIDConnectClientAuthentication, s conversion.Scope) error { + out.Secret = (*string)(unsafe.Pointer(in.Secret)) + out.ExtraConfig = *(*map[string]string)(unsafe.Pointer(&in.ExtraConfig)) + return nil +} + +// Convert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication is an autogenerated conversion function. +func Convert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(in *OpenIDConnectClientAuthentication, out *garden.OpenIDConnectClientAuthentication, s conversion.Scope) error { + return autoConvert_v1beta1_OpenIDConnectClientAuthentication_To_garden_OpenIDConnectClientAuthentication(in, out, s) +} + +func autoConvert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication(in *garden.OpenIDConnectClientAuthentication, out *OpenIDConnectClientAuthentication, s conversion.Scope) error { + out.Secret = (*string)(unsafe.Pointer(in.Secret)) + out.ExtraConfig = *(*map[string]string)(unsafe.Pointer(&in.ExtraConfig)) + return nil +} + +// Convert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication is an autogenerated conversion function. +func Convert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication(in *garden.OpenIDConnectClientAuthentication, out *OpenIDConnectClientAuthentication, s conversion.Scope) error { + return autoConvert_garden_OpenIDConnectClientAuthentication_To_v1beta1_OpenIDConnectClientAuthentication(in, out, s) +} + +func autoConvert_v1beta1_OpenStackCloud_To_garden_OpenStackCloud(in *OpenStackCloud, out *garden.OpenStackCloud, s conversion.Scope) error { + out.FloatingPoolName = in.FloatingPoolName + out.LoadBalancerProvider = in.LoadBalancerProvider + out.LoadBalancerClasses = *(*[]garden.OpenStackLoadBalancerClass)(unsafe.Pointer(&in.LoadBalancerClasses)) + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(garden.ShootMachineImage) + if err := Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_v1beta1_OpenStackNetworks_To_garden_OpenStackNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]garden.Worker, len(*in)) + for i := range *in { + if err := Convert_v1beta1_OpenStackWorker_To_garden_Worker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_OpenStackCloud_To_garden_OpenStackCloud is an autogenerated conversion function. +func Convert_v1beta1_OpenStackCloud_To_garden_OpenStackCloud(in *OpenStackCloud, out *garden.OpenStackCloud, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackCloud_To_garden_OpenStackCloud(in, out, s) +} + +func autoConvert_garden_OpenStackCloud_To_v1beta1_OpenStackCloud(in *garden.OpenStackCloud, out *OpenStackCloud, s conversion.Scope) error { + out.FloatingPoolName = in.FloatingPoolName + out.LoadBalancerProvider = in.LoadBalancerProvider + out.LoadBalancerClasses = *(*[]OpenStackLoadBalancerClass)(unsafe.Pointer(&in.LoadBalancerClasses)) + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(ShootMachineImage) + if err := Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_garden_OpenStackNetworks_To_v1beta1_OpenStackNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]OpenStackWorker, len(*in)) + for i := range *in { + if err := Convert_garden_Worker_To_v1beta1_OpenStackWorker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_OpenStackCloud_To_v1beta1_OpenStackCloud is an autogenerated conversion function. +func Convert_garden_OpenStackCloud_To_v1beta1_OpenStackCloud(in *garden.OpenStackCloud, out *OpenStackCloud, s conversion.Scope) error { + return autoConvert_garden_OpenStackCloud_To_v1beta1_OpenStackCloud(in, out, s) +} + +func autoConvert_v1beta1_OpenStackConstraints_To_garden_OpenStackConstraints(in *OpenStackConstraints, out *garden.OpenStackConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]garden.DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + out.FloatingPools = *(*[]garden.OpenStackFloatingPool)(unsafe.Pointer(&in.FloatingPools)) + if err := Convert_v1beta1_KubernetesConstraints_To_garden_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + out.LoadBalancerProviders = *(*[]garden.OpenStackLoadBalancerProvider)(unsafe.Pointer(&in.LoadBalancerProviders)) + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]garden.MachineImage, len(*in)) + for i := range *in { + if err := Convert_v1beta1_MachineImage_To_garden_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]garden.OpenStackMachineType)(unsafe.Pointer(&in.MachineTypes)) + out.Zones = *(*[]garden.Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_OpenStackConstraints_To_garden_OpenStackConstraints is an autogenerated conversion function. +func Convert_v1beta1_OpenStackConstraints_To_garden_OpenStackConstraints(in *OpenStackConstraints, out *garden.OpenStackConstraints, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackConstraints_To_garden_OpenStackConstraints(in, out, s) +} + +func autoConvert_garden_OpenStackConstraints_To_v1beta1_OpenStackConstraints(in *garden.OpenStackConstraints, out *OpenStackConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + out.FloatingPools = *(*[]OpenStackFloatingPool)(unsafe.Pointer(&in.FloatingPools)) + if err := Convert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + out.LoadBalancerProviders = *(*[]OpenStackLoadBalancerProvider)(unsafe.Pointer(&in.LoadBalancerProviders)) + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]MachineImage, len(*in)) + for i := range *in { + if err := Convert_garden_MachineImage_To_v1beta1_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]OpenStackMachineType)(unsafe.Pointer(&in.MachineTypes)) + out.Zones = *(*[]Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_OpenStackConstraints_To_v1beta1_OpenStackConstraints is an autogenerated conversion function. +func Convert_garden_OpenStackConstraints_To_v1beta1_OpenStackConstraints(in *garden.OpenStackConstraints, out *OpenStackConstraints, s conversion.Scope) error { + return autoConvert_garden_OpenStackConstraints_To_v1beta1_OpenStackConstraints(in, out, s) +} + +func autoConvert_v1beta1_OpenStackFloatingPool_To_garden_OpenStackFloatingPool(in *OpenStackFloatingPool, out *garden.OpenStackFloatingPool, s conversion.Scope) error { + out.Name = in.Name + out.LoadBalancerClasses = *(*[]garden.OpenStackLoadBalancerClass)(unsafe.Pointer(&in.LoadBalancerClasses)) + return nil +} + +// Convert_v1beta1_OpenStackFloatingPool_To_garden_OpenStackFloatingPool is an autogenerated conversion function. +func Convert_v1beta1_OpenStackFloatingPool_To_garden_OpenStackFloatingPool(in *OpenStackFloatingPool, out *garden.OpenStackFloatingPool, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackFloatingPool_To_garden_OpenStackFloatingPool(in, out, s) +} + +func autoConvert_garden_OpenStackFloatingPool_To_v1beta1_OpenStackFloatingPool(in *garden.OpenStackFloatingPool, out *OpenStackFloatingPool, s conversion.Scope) error { + out.Name = in.Name + out.LoadBalancerClasses = *(*[]OpenStackLoadBalancerClass)(unsafe.Pointer(&in.LoadBalancerClasses)) + return nil +} + +// Convert_garden_OpenStackFloatingPool_To_v1beta1_OpenStackFloatingPool is an autogenerated conversion function. +func Convert_garden_OpenStackFloatingPool_To_v1beta1_OpenStackFloatingPool(in *garden.OpenStackFloatingPool, out *OpenStackFloatingPool, s conversion.Scope) error { + return autoConvert_garden_OpenStackFloatingPool_To_v1beta1_OpenStackFloatingPool(in, out, s) +} + +func autoConvert_v1beta1_OpenStackLoadBalancerClass_To_garden_OpenStackLoadBalancerClass(in *OpenStackLoadBalancerClass, out *garden.OpenStackLoadBalancerClass, s conversion.Scope) error { + out.Name = in.Name + out.FloatingSubnetID = (*string)(unsafe.Pointer(in.FloatingSubnetID)) + out.FloatingNetworkID = (*string)(unsafe.Pointer(in.FloatingNetworkID)) + out.SubnetID = (*string)(unsafe.Pointer(in.SubnetID)) + return nil +} + +// Convert_v1beta1_OpenStackLoadBalancerClass_To_garden_OpenStackLoadBalancerClass is an autogenerated conversion function. +func Convert_v1beta1_OpenStackLoadBalancerClass_To_garden_OpenStackLoadBalancerClass(in *OpenStackLoadBalancerClass, out *garden.OpenStackLoadBalancerClass, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackLoadBalancerClass_To_garden_OpenStackLoadBalancerClass(in, out, s) +} + +func autoConvert_garden_OpenStackLoadBalancerClass_To_v1beta1_OpenStackLoadBalancerClass(in *garden.OpenStackLoadBalancerClass, out *OpenStackLoadBalancerClass, s conversion.Scope) error { + out.Name = in.Name + out.FloatingSubnetID = (*string)(unsafe.Pointer(in.FloatingSubnetID)) + out.FloatingNetworkID = (*string)(unsafe.Pointer(in.FloatingNetworkID)) + out.SubnetID = (*string)(unsafe.Pointer(in.SubnetID)) + return nil +} + +// Convert_garden_OpenStackLoadBalancerClass_To_v1beta1_OpenStackLoadBalancerClass is an autogenerated conversion function. +func Convert_garden_OpenStackLoadBalancerClass_To_v1beta1_OpenStackLoadBalancerClass(in *garden.OpenStackLoadBalancerClass, out *OpenStackLoadBalancerClass, s conversion.Scope) error { + return autoConvert_garden_OpenStackLoadBalancerClass_To_v1beta1_OpenStackLoadBalancerClass(in, out, s) +} + +func autoConvert_v1beta1_OpenStackLoadBalancerProvider_To_garden_OpenStackLoadBalancerProvider(in *OpenStackLoadBalancerProvider, out *garden.OpenStackLoadBalancerProvider, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_v1beta1_OpenStackLoadBalancerProvider_To_garden_OpenStackLoadBalancerProvider is an autogenerated conversion function. +func Convert_v1beta1_OpenStackLoadBalancerProvider_To_garden_OpenStackLoadBalancerProvider(in *OpenStackLoadBalancerProvider, out *garden.OpenStackLoadBalancerProvider, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackLoadBalancerProvider_To_garden_OpenStackLoadBalancerProvider(in, out, s) +} + +func autoConvert_garden_OpenStackLoadBalancerProvider_To_v1beta1_OpenStackLoadBalancerProvider(in *garden.OpenStackLoadBalancerProvider, out *OpenStackLoadBalancerProvider, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_garden_OpenStackLoadBalancerProvider_To_v1beta1_OpenStackLoadBalancerProvider is an autogenerated conversion function. +func Convert_garden_OpenStackLoadBalancerProvider_To_v1beta1_OpenStackLoadBalancerProvider(in *garden.OpenStackLoadBalancerProvider, out *OpenStackLoadBalancerProvider, s conversion.Scope) error { + return autoConvert_garden_OpenStackLoadBalancerProvider_To_v1beta1_OpenStackLoadBalancerProvider(in, out, s) +} + +func autoConvert_v1beta1_OpenStackMachineType_To_garden_OpenStackMachineType(in *OpenStackMachineType, out *garden.OpenStackMachineType, s conversion.Scope) error { + if err := Convert_v1beta1_MachineType_To_garden_MachineType(&in.MachineType, &out.MachineType, s); err != nil { + return err + } + out.VolumeType = in.VolumeType + out.VolumeSize = in.VolumeSize + return nil +} + +// Convert_v1beta1_OpenStackMachineType_To_garden_OpenStackMachineType is an autogenerated conversion function. +func Convert_v1beta1_OpenStackMachineType_To_garden_OpenStackMachineType(in *OpenStackMachineType, out *garden.OpenStackMachineType, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackMachineType_To_garden_OpenStackMachineType(in, out, s) +} + +func autoConvert_garden_OpenStackMachineType_To_v1beta1_OpenStackMachineType(in *garden.OpenStackMachineType, out *OpenStackMachineType, s conversion.Scope) error { + if err := Convert_garden_MachineType_To_v1beta1_MachineType(&in.MachineType, &out.MachineType, s); err != nil { + return err + } + out.VolumeType = in.VolumeType + out.VolumeSize = in.VolumeSize + return nil +} + +// Convert_garden_OpenStackMachineType_To_v1beta1_OpenStackMachineType is an autogenerated conversion function. +func Convert_garden_OpenStackMachineType_To_v1beta1_OpenStackMachineType(in *garden.OpenStackMachineType, out *OpenStackMachineType, s conversion.Scope) error { + return autoConvert_garden_OpenStackMachineType_To_v1beta1_OpenStackMachineType(in, out, s) +} + +func autoConvert_v1beta1_OpenStackNetworks_To_garden_OpenStackNetworks(in *OpenStackNetworks, out *garden.OpenStackNetworks, s conversion.Scope) error { + if err := Convert_v1beta1_K8SNetworks_To_garden_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + out.Router = (*garden.OpenStackRouter)(unsafe.Pointer(in.Router)) + out.Workers = *(*[]string)(unsafe.Pointer(&in.Workers)) + return nil +} + +// Convert_v1beta1_OpenStackNetworks_To_garden_OpenStackNetworks is an autogenerated conversion function. +func Convert_v1beta1_OpenStackNetworks_To_garden_OpenStackNetworks(in *OpenStackNetworks, out *garden.OpenStackNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackNetworks_To_garden_OpenStackNetworks(in, out, s) +} + +func autoConvert_garden_OpenStackNetworks_To_v1beta1_OpenStackNetworks(in *garden.OpenStackNetworks, out *OpenStackNetworks, s conversion.Scope) error { + if err := Convert_garden_K8SNetworks_To_v1beta1_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + out.Router = (*OpenStackRouter)(unsafe.Pointer(in.Router)) + out.Workers = *(*[]string)(unsafe.Pointer(&in.Workers)) + return nil +} + +// Convert_garden_OpenStackNetworks_To_v1beta1_OpenStackNetworks is an autogenerated conversion function. +func Convert_garden_OpenStackNetworks_To_v1beta1_OpenStackNetworks(in *garden.OpenStackNetworks, out *OpenStackNetworks, s conversion.Scope) error { + return autoConvert_garden_OpenStackNetworks_To_v1beta1_OpenStackNetworks(in, out, s) +} + +func autoConvert_v1beta1_OpenStackProfile_To_garden_OpenStackProfile(in *OpenStackProfile, out *garden.OpenStackProfile, s conversion.Scope) error { + if err := Convert_v1beta1_OpenStackConstraints_To_garden_OpenStackConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + out.KeyStoneURL = in.KeyStoneURL + out.DNSServers = *(*[]string)(unsafe.Pointer(&in.DNSServers)) + out.DHCPDomain = (*string)(unsafe.Pointer(in.DHCPDomain)) + out.RequestTimeout = (*string)(unsafe.Pointer(in.RequestTimeout)) + return nil +} + +// Convert_v1beta1_OpenStackProfile_To_garden_OpenStackProfile is an autogenerated conversion function. +func Convert_v1beta1_OpenStackProfile_To_garden_OpenStackProfile(in *OpenStackProfile, out *garden.OpenStackProfile, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackProfile_To_garden_OpenStackProfile(in, out, s) +} + +func autoConvert_garden_OpenStackProfile_To_v1beta1_OpenStackProfile(in *garden.OpenStackProfile, out *OpenStackProfile, s conversion.Scope) error { + if err := Convert_garden_OpenStackConstraints_To_v1beta1_OpenStackConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + out.KeyStoneURL = in.KeyStoneURL + out.DNSServers = *(*[]string)(unsafe.Pointer(&in.DNSServers)) + out.DHCPDomain = (*string)(unsafe.Pointer(in.DHCPDomain)) + out.RequestTimeout = (*string)(unsafe.Pointer(in.RequestTimeout)) + return nil +} + +// Convert_garden_OpenStackProfile_To_v1beta1_OpenStackProfile is an autogenerated conversion function. +func Convert_garden_OpenStackProfile_To_v1beta1_OpenStackProfile(in *garden.OpenStackProfile, out *OpenStackProfile, s conversion.Scope) error { + return autoConvert_garden_OpenStackProfile_To_v1beta1_OpenStackProfile(in, out, s) +} + +func autoConvert_v1beta1_OpenStackRouter_To_garden_OpenStackRouter(in *OpenStackRouter, out *garden.OpenStackRouter, s conversion.Scope) error { + out.ID = in.ID + return nil +} + +// Convert_v1beta1_OpenStackRouter_To_garden_OpenStackRouter is an autogenerated conversion function. +func Convert_v1beta1_OpenStackRouter_To_garden_OpenStackRouter(in *OpenStackRouter, out *garden.OpenStackRouter, s conversion.Scope) error { + return autoConvert_v1beta1_OpenStackRouter_To_garden_OpenStackRouter(in, out, s) +} + +func autoConvert_garden_OpenStackRouter_To_v1beta1_OpenStackRouter(in *garden.OpenStackRouter, out *OpenStackRouter, s conversion.Scope) error { + out.ID = in.ID + return nil +} + +// Convert_garden_OpenStackRouter_To_v1beta1_OpenStackRouter is an autogenerated conversion function. +func Convert_garden_OpenStackRouter_To_v1beta1_OpenStackRouter(in *garden.OpenStackRouter, out *OpenStackRouter, s conversion.Scope) error { + return autoConvert_garden_OpenStackRouter_To_v1beta1_OpenStackRouter(in, out, s) +} + +func autoConvert_v1beta1_PacketCloud_To_garden_PacketCloud(in *PacketCloud, out *garden.PacketCloud, s conversion.Scope) error { + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(garden.ShootMachineImage) + if err := Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_v1beta1_PacketNetworks_To_garden_PacketNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]garden.Worker, len(*in)) + for i := range *in { + if err := Convert_v1beta1_PacketWorker_To_garden_Worker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_PacketCloud_To_garden_PacketCloud is an autogenerated conversion function. +func Convert_v1beta1_PacketCloud_To_garden_PacketCloud(in *PacketCloud, out *garden.PacketCloud, s conversion.Scope) error { + return autoConvert_v1beta1_PacketCloud_To_garden_PacketCloud(in, out, s) +} + +func autoConvert_garden_PacketCloud_To_v1beta1_PacketCloud(in *garden.PacketCloud, out *PacketCloud, s conversion.Scope) error { + if in.MachineImage != nil { + in, out := &in.MachineImage, &out.MachineImage + *out = new(ShootMachineImage) + if err := Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(*in, *out, s); err != nil { + return err + } + } else { + out.MachineImage = nil + } + if err := Convert_garden_PacketNetworks_To_v1beta1_PacketNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = make([]PacketWorker, len(*in)) + for i := range *in { + if err := Convert_garden_Worker_To_v1beta1_PacketWorker(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Workers = nil + } + out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_PacketCloud_To_v1beta1_PacketCloud is an autogenerated conversion function. +func Convert_garden_PacketCloud_To_v1beta1_PacketCloud(in *garden.PacketCloud, out *PacketCloud, s conversion.Scope) error { + return autoConvert_garden_PacketCloud_To_v1beta1_PacketCloud(in, out, s) +} + +func autoConvert_v1beta1_PacketConstraints_To_garden_PacketConstraints(in *PacketConstraints, out *garden.PacketConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]garden.DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + if err := Convert_v1beta1_KubernetesConstraints_To_garden_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]garden.MachineImage, len(*in)) + for i := range *in { + if err := Convert_v1beta1_MachineImage_To_garden_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]garden.MachineType)(unsafe.Pointer(&in.MachineTypes)) + out.VolumeTypes = *(*[]garden.VolumeType)(unsafe.Pointer(&in.VolumeTypes)) + out.Zones = *(*[]garden.Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_v1beta1_PacketConstraints_To_garden_PacketConstraints is an autogenerated conversion function. +func Convert_v1beta1_PacketConstraints_To_garden_PacketConstraints(in *PacketConstraints, out *garden.PacketConstraints, s conversion.Scope) error { + return autoConvert_v1beta1_PacketConstraints_To_garden_PacketConstraints(in, out, s) +} + +func autoConvert_garden_PacketConstraints_To_v1beta1_PacketConstraints(in *garden.PacketConstraints, out *PacketConstraints, s conversion.Scope) error { + out.DNSProviders = *(*[]DNSProviderConstraint)(unsafe.Pointer(&in.DNSProviders)) + if err := Convert_garden_KubernetesConstraints_To_v1beta1_KubernetesConstraints(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + if in.MachineImages != nil { + in, out := &in.MachineImages, &out.MachineImages + *out = make([]MachineImage, len(*in)) + for i := range *in { + if err := Convert_garden_MachineImage_To_v1beta1_MachineImage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.MachineImages = nil + } + out.MachineTypes = *(*[]MachineType)(unsafe.Pointer(&in.MachineTypes)) + out.VolumeTypes = *(*[]VolumeType)(unsafe.Pointer(&in.VolumeTypes)) + out.Zones = *(*[]Zone)(unsafe.Pointer(&in.Zones)) + return nil +} + +// Convert_garden_PacketConstraints_To_v1beta1_PacketConstraints is an autogenerated conversion function. +func Convert_garden_PacketConstraints_To_v1beta1_PacketConstraints(in *garden.PacketConstraints, out *PacketConstraints, s conversion.Scope) error { + return autoConvert_garden_PacketConstraints_To_v1beta1_PacketConstraints(in, out, s) +} + +func autoConvert_v1beta1_PacketNetworks_To_garden_PacketNetworks(in *PacketNetworks, out *garden.PacketNetworks, s conversion.Scope) error { + if err := Convert_v1beta1_K8SNetworks_To_garden_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_PacketNetworks_To_garden_PacketNetworks is an autogenerated conversion function. +func Convert_v1beta1_PacketNetworks_To_garden_PacketNetworks(in *PacketNetworks, out *garden.PacketNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_PacketNetworks_To_garden_PacketNetworks(in, out, s) +} + +func autoConvert_garden_PacketNetworks_To_v1beta1_PacketNetworks(in *garden.PacketNetworks, out *PacketNetworks, s conversion.Scope) error { + if err := Convert_garden_K8SNetworks_To_v1beta1_K8SNetworks(&in.K8SNetworks, &out.K8SNetworks, s); err != nil { + return err + } + return nil +} + +// Convert_garden_PacketNetworks_To_v1beta1_PacketNetworks is an autogenerated conversion function. +func Convert_garden_PacketNetworks_To_v1beta1_PacketNetworks(in *garden.PacketNetworks, out *PacketNetworks, s conversion.Scope) error { + return autoConvert_garden_PacketNetworks_To_v1beta1_PacketNetworks(in, out, s) +} + +func autoConvert_v1beta1_PacketProfile_To_garden_PacketProfile(in *PacketProfile, out *garden.PacketProfile, s conversion.Scope) error { + if err := Convert_v1beta1_PacketConstraints_To_garden_PacketConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_PacketProfile_To_garden_PacketProfile is an autogenerated conversion function. +func Convert_v1beta1_PacketProfile_To_garden_PacketProfile(in *PacketProfile, out *garden.PacketProfile, s conversion.Scope) error { + return autoConvert_v1beta1_PacketProfile_To_garden_PacketProfile(in, out, s) +} + +func autoConvert_garden_PacketProfile_To_v1beta1_PacketProfile(in *garden.PacketProfile, out *PacketProfile, s conversion.Scope) error { + if err := Convert_garden_PacketConstraints_To_v1beta1_PacketConstraints(&in.Constraints, &out.Constraints, s); err != nil { + return err + } + return nil +} + +// Convert_garden_PacketProfile_To_v1beta1_PacketProfile is an autogenerated conversion function. +func Convert_garden_PacketProfile_To_v1beta1_PacketProfile(in *garden.PacketProfile, out *PacketProfile, s conversion.Scope) error { + return autoConvert_garden_PacketProfile_To_v1beta1_PacketProfile(in, out, s) +} + +func autoConvert_v1beta1_Project_To_garden_Project(in *Project, out *garden.Project, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_ProjectSpec_To_garden_ProjectSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_ProjectStatus_To_garden_ProjectStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_Project_To_garden_Project is an autogenerated conversion function. +func Convert_v1beta1_Project_To_garden_Project(in *Project, out *garden.Project, s conversion.Scope) error { + return autoConvert_v1beta1_Project_To_garden_Project(in, out, s) +} + +func autoConvert_garden_Project_To_v1beta1_Project(in *garden.Project, out *Project, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_ProjectSpec_To_v1beta1_ProjectSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_garden_ProjectStatus_To_v1beta1_ProjectStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_garden_Project_To_v1beta1_Project is an autogenerated conversion function. +func Convert_garden_Project_To_v1beta1_Project(in *garden.Project, out *Project, s conversion.Scope) error { + return autoConvert_garden_Project_To_v1beta1_Project(in, out, s) +} + +func autoConvert_v1beta1_ProjectList_To_garden_ProjectList(in *ProjectList, out *garden.ProjectList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.Project, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Project_To_garden_Project(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_ProjectList_To_garden_ProjectList is an autogenerated conversion function. +func Convert_v1beta1_ProjectList_To_garden_ProjectList(in *ProjectList, out *garden.ProjectList, s conversion.Scope) error { + return autoConvert_v1beta1_ProjectList_To_garden_ProjectList(in, out, s) +} + +func autoConvert_garden_ProjectList_To_v1beta1_ProjectList(in *garden.ProjectList, out *ProjectList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Project, len(*in)) + for i := range *in { + if err := Convert_garden_Project_To_v1beta1_Project(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_ProjectList_To_v1beta1_ProjectList is an autogenerated conversion function. +func Convert_garden_ProjectList_To_v1beta1_ProjectList(in *garden.ProjectList, out *ProjectList, s conversion.Scope) error { + return autoConvert_garden_ProjectList_To_v1beta1_ProjectList(in, out, s) +} + +func autoConvert_v1beta1_ProjectSpec_To_garden_ProjectSpec(in *ProjectSpec, out *garden.ProjectSpec, s conversion.Scope) error { + out.CreatedBy = (*rbacv1.Subject)(unsafe.Pointer(in.CreatedBy)) + out.Description = (*string)(unsafe.Pointer(in.Description)) + out.Owner = (*rbacv1.Subject)(unsafe.Pointer(in.Owner)) + out.Purpose = (*string)(unsafe.Pointer(in.Purpose)) + // WARNING: in.Members requires manual conversion: does not exist in peer-type + out.Namespace = (*string)(unsafe.Pointer(in.Namespace)) + // WARNING: in.Viewers requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_garden_ProjectSpec_To_v1beta1_ProjectSpec(in *garden.ProjectSpec, out *ProjectSpec, s conversion.Scope) error { + out.CreatedBy = (*rbacv1.Subject)(unsafe.Pointer(in.CreatedBy)) + out.Description = (*string)(unsafe.Pointer(in.Description)) + out.Owner = (*rbacv1.Subject)(unsafe.Pointer(in.Owner)) + out.Purpose = (*string)(unsafe.Pointer(in.Purpose)) + // WARNING: in.ProjectMembers requires manual conversion: does not exist in peer-type + out.Namespace = (*string)(unsafe.Pointer(in.Namespace)) + return nil +} + +func autoConvert_v1beta1_ProjectStatus_To_garden_ProjectStatus(in *ProjectStatus, out *garden.ProjectStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.Phase = garden.ProjectPhase(in.Phase) + return nil +} + +// Convert_v1beta1_ProjectStatus_To_garden_ProjectStatus is an autogenerated conversion function. +func Convert_v1beta1_ProjectStatus_To_garden_ProjectStatus(in *ProjectStatus, out *garden.ProjectStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ProjectStatus_To_garden_ProjectStatus(in, out, s) +} + +func autoConvert_garden_ProjectStatus_To_v1beta1_ProjectStatus(in *garden.ProjectStatus, out *ProjectStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.Phase = ProjectPhase(in.Phase) + return nil +} + +// Convert_garden_ProjectStatus_To_v1beta1_ProjectStatus is an autogenerated conversion function. +func Convert_garden_ProjectStatus_To_v1beta1_ProjectStatus(in *garden.ProjectStatus, out *ProjectStatus, s conversion.Scope) error { + return autoConvert_garden_ProjectStatus_To_v1beta1_ProjectStatus(in, out, s) +} + +func autoConvert_v1beta1_Quota_To_garden_Quota(in *Quota, out *garden.Quota, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_QuotaSpec_To_garden_QuotaSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_Quota_To_garden_Quota is an autogenerated conversion function. +func Convert_v1beta1_Quota_To_garden_Quota(in *Quota, out *garden.Quota, s conversion.Scope) error { + return autoConvert_v1beta1_Quota_To_garden_Quota(in, out, s) +} + +func autoConvert_garden_Quota_To_v1beta1_Quota(in *garden.Quota, out *Quota, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_QuotaSpec_To_v1beta1_QuotaSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_garden_Quota_To_v1beta1_Quota is an autogenerated conversion function. +func Convert_garden_Quota_To_v1beta1_Quota(in *garden.Quota, out *Quota, s conversion.Scope) error { + return autoConvert_garden_Quota_To_v1beta1_Quota(in, out, s) +} + +func autoConvert_v1beta1_QuotaList_To_garden_QuotaList(in *QuotaList, out *garden.QuotaList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.Quota, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Quota_To_garden_Quota(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_QuotaList_To_garden_QuotaList is an autogenerated conversion function. +func Convert_v1beta1_QuotaList_To_garden_QuotaList(in *QuotaList, out *garden.QuotaList, s conversion.Scope) error { + return autoConvert_v1beta1_QuotaList_To_garden_QuotaList(in, out, s) +} + +func autoConvert_garden_QuotaList_To_v1beta1_QuotaList(in *garden.QuotaList, out *QuotaList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Quota, len(*in)) + for i := range *in { + if err := Convert_garden_Quota_To_v1beta1_Quota(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_QuotaList_To_v1beta1_QuotaList is an autogenerated conversion function. +func Convert_garden_QuotaList_To_v1beta1_QuotaList(in *garden.QuotaList, out *QuotaList, s conversion.Scope) error { + return autoConvert_garden_QuotaList_To_v1beta1_QuotaList(in, out, s) +} + +func autoConvert_v1beta1_QuotaSpec_To_garden_QuotaSpec(in *QuotaSpec, out *garden.QuotaSpec, s conversion.Scope) error { + out.ClusterLifetimeDays = (*int)(unsafe.Pointer(in.ClusterLifetimeDays)) + out.Metrics = *(*v1.ResourceList)(unsafe.Pointer(&in.Metrics)) + // WARNING: in.Scope requires manual conversion: inconvertible types (github.com/gardener/gardener/pkg/apis/garden/v1beta1.QuotaScope vs k8s.io/api/core/v1.ObjectReference) + return nil +} + +func autoConvert_garden_QuotaSpec_To_v1beta1_QuotaSpec(in *garden.QuotaSpec, out *QuotaSpec, s conversion.Scope) error { + out.ClusterLifetimeDays = (*int)(unsafe.Pointer(in.ClusterLifetimeDays)) + out.Metrics = *(*v1.ResourceList)(unsafe.Pointer(&in.Metrics)) + // WARNING: in.Scope requires manual conversion: inconvertible types (k8s.io/api/core/v1.ObjectReference vs github.com/gardener/gardener/pkg/apis/garden/v1beta1.QuotaScope) + return nil +} + +func autoConvert_v1beta1_SecretBinding_To_garden_SecretBinding(in *SecretBinding, out *garden.SecretBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.SecretRef = in.SecretRef + out.Quotas = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.Quotas)) + return nil +} + +// Convert_v1beta1_SecretBinding_To_garden_SecretBinding is an autogenerated conversion function. +func Convert_v1beta1_SecretBinding_To_garden_SecretBinding(in *SecretBinding, out *garden.SecretBinding, s conversion.Scope) error { + return autoConvert_v1beta1_SecretBinding_To_garden_SecretBinding(in, out, s) +} + +func autoConvert_garden_SecretBinding_To_v1beta1_SecretBinding(in *garden.SecretBinding, out *SecretBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.SecretRef = in.SecretRef + out.Quotas = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.Quotas)) + return nil +} + +// Convert_garden_SecretBinding_To_v1beta1_SecretBinding is an autogenerated conversion function. +func Convert_garden_SecretBinding_To_v1beta1_SecretBinding(in *garden.SecretBinding, out *SecretBinding, s conversion.Scope) error { + return autoConvert_garden_SecretBinding_To_v1beta1_SecretBinding(in, out, s) +} + +func autoConvert_v1beta1_SecretBindingList_To_garden_SecretBindingList(in *SecretBindingList, out *garden.SecretBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]garden.SecretBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_SecretBindingList_To_garden_SecretBindingList is an autogenerated conversion function. +func Convert_v1beta1_SecretBindingList_To_garden_SecretBindingList(in *SecretBindingList, out *garden.SecretBindingList, s conversion.Scope) error { + return autoConvert_v1beta1_SecretBindingList_To_garden_SecretBindingList(in, out, s) +} + +func autoConvert_garden_SecretBindingList_To_v1beta1_SecretBindingList(in *garden.SecretBindingList, out *SecretBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SecretBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_garden_SecretBindingList_To_v1beta1_SecretBindingList is an autogenerated conversion function. +func Convert_garden_SecretBindingList_To_v1beta1_SecretBindingList(in *garden.SecretBindingList, out *SecretBindingList, s conversion.Scope) error { + return autoConvert_garden_SecretBindingList_To_v1beta1_SecretBindingList(in, out, s) +} + +func autoConvert_v1beta1_Seed_To_garden_Seed(in *Seed, out *garden.Seed, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_SeedSpec_To_garden_SeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_SeedStatus_To_garden_SeedStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_garden_Seed_To_v1beta1_Seed(in *garden.Seed, out *Seed, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_SeedSpec_To_v1beta1_SeedSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_garden_SeedStatus_To_v1beta1_SeedStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_SeedCloud_To_garden_SeedCloud(in *SeedCloud, out *garden.SeedCloud, s conversion.Scope) error { + out.Profile = in.Profile + out.Region = in.Region + return nil +} + +// Convert_v1beta1_SeedCloud_To_garden_SeedCloud is an autogenerated conversion function. +func Convert_v1beta1_SeedCloud_To_garden_SeedCloud(in *SeedCloud, out *garden.SeedCloud, s conversion.Scope) error { + return autoConvert_v1beta1_SeedCloud_To_garden_SeedCloud(in, out, s) +} + +func autoConvert_garden_SeedCloud_To_v1beta1_SeedCloud(in *garden.SeedCloud, out *SeedCloud, s conversion.Scope) error { + out.Profile = in.Profile + out.Region = in.Region + return nil +} + +// Convert_garden_SeedCloud_To_v1beta1_SeedCloud is an autogenerated conversion function. +func Convert_garden_SeedCloud_To_v1beta1_SeedCloud(in *garden.SeedCloud, out *SeedCloud, s conversion.Scope) error { + return autoConvert_garden_SeedCloud_To_v1beta1_SeedCloud(in, out, s) +} + +func autoConvert_v1beta1_SeedList_To_garden_SeedList(in *SeedList, out *garden.SeedList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.Seed, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Seed_To_garden_Seed(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_SeedList_To_garden_SeedList is an autogenerated conversion function. +func Convert_v1beta1_SeedList_To_garden_SeedList(in *SeedList, out *garden.SeedList, s conversion.Scope) error { + return autoConvert_v1beta1_SeedList_To_garden_SeedList(in, out, s) +} + +func autoConvert_garden_SeedList_To_v1beta1_SeedList(in *garden.SeedList, out *SeedList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Seed, len(*in)) + for i := range *in { + if err := Convert_garden_Seed_To_v1beta1_Seed(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_SeedList_To_v1beta1_SeedList is an autogenerated conversion function. +func Convert_garden_SeedList_To_v1beta1_SeedList(in *garden.SeedList, out *SeedList, s conversion.Scope) error { + return autoConvert_garden_SeedList_To_v1beta1_SeedList(in, out, s) +} + +func autoConvert_v1beta1_SeedNetworks_To_garden_SeedNetworks(in *SeedNetworks, out *garden.SeedNetworks, s conversion.Scope) error { + out.Nodes = in.Nodes + out.Pods = in.Pods + out.Services = in.Services + out.ShootDefaults = (*garden.ShootNetworks)(unsafe.Pointer(in.ShootDefaults)) + return nil +} + +func autoConvert_garden_SeedNetworks_To_v1beta1_SeedNetworks(in *garden.SeedNetworks, out *SeedNetworks, s conversion.Scope) error { + out.Nodes = in.Nodes + out.Pods = in.Pods + out.Services = in.Services + out.ShootDefaults = (*ShootNetworks)(unsafe.Pointer(in.ShootDefaults)) + // WARNING: in.BlockCIDRs requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_SeedSpec_To_garden_SeedSpec(in *SeedSpec, out *garden.SeedSpec, s conversion.Scope) error { + if err := Convert_v1beta1_SeedCloud_To_garden_SeedCloud(&in.Cloud, &out.Cloud, s); err != nil { + return err + } + out.IngressDomain = in.IngressDomain + out.SecretRef = (*v1.SecretReference)(unsafe.Pointer(in.SecretRef)) + if err := Convert_v1beta1_SeedNetworks_To_garden_SeedNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + // WARNING: in.BlockCIDRs requires manual conversion: does not exist in peer-type + // WARNING: in.Visible requires manual conversion: does not exist in peer-type + // WARNING: in.Protected requires manual conversion: does not exist in peer-type + out.Backup = (*garden.SeedBackup)(unsafe.Pointer(in.Backup)) + return nil +} + +func autoConvert_garden_SeedSpec_To_v1beta1_SeedSpec(in *garden.SeedSpec, out *SeedSpec, s conversion.Scope) error { + if err := Convert_garden_SeedCloud_To_v1beta1_SeedCloud(&in.Cloud, &out.Cloud, s); err != nil { + return err + } + // WARNING: in.Provider requires manual conversion: does not exist in peer-type + out.IngressDomain = in.IngressDomain + out.SecretRef = (*v1.SecretReference)(unsafe.Pointer(in.SecretRef)) + if err := Convert_garden_SeedNetworks_To_v1beta1_SeedNetworks(&in.Networks, &out.Networks, s); err != nil { + return err + } + // WARNING: in.Taints requires manual conversion: does not exist in peer-type + out.Backup = (*BackupProfile)(unsafe.Pointer(in.Backup)) + // WARNING: in.Volume requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_SeedStatus_To_garden_SeedStatus(in *SeedStatus, out *garden.SeedStatus, s conversion.Scope) error { + out.Conditions = *(*[]garden.Condition)(unsafe.Pointer(&in.Conditions)) + out.Gardener = (*garden.Gardener)(unsafe.Pointer(in.Gardener)) + out.KubernetesVersion = (*string)(unsafe.Pointer(in.KubernetesVersion)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_v1beta1_SeedStatus_To_garden_SeedStatus is an autogenerated conversion function. +func Convert_v1beta1_SeedStatus_To_garden_SeedStatus(in *SeedStatus, out *garden.SeedStatus, s conversion.Scope) error { + return autoConvert_v1beta1_SeedStatus_To_garden_SeedStatus(in, out, s) +} + +func autoConvert_garden_SeedStatus_To_v1beta1_SeedStatus(in *garden.SeedStatus, out *SeedStatus, s conversion.Scope) error { + out.Conditions = *(*[]v1alpha1.Condition)(unsafe.Pointer(&in.Conditions)) + out.Gardener = (*Gardener)(unsafe.Pointer(in.Gardener)) + out.KubernetesVersion = (*string)(unsafe.Pointer(in.KubernetesVersion)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_garden_SeedStatus_To_v1beta1_SeedStatus is an autogenerated conversion function. +func Convert_garden_SeedStatus_To_v1beta1_SeedStatus(in *garden.SeedStatus, out *SeedStatus, s conversion.Scope) error { + return autoConvert_garden_SeedStatus_To_v1beta1_SeedStatus(in, out, s) +} + +func autoConvert_v1beta1_ServiceAccountConfig_To_garden_ServiceAccountConfig(in *ServiceAccountConfig, out *garden.ServiceAccountConfig, s conversion.Scope) error { + out.Issuer = (*string)(unsafe.Pointer(in.Issuer)) + out.SigningKeySecret = (*v1.LocalObjectReference)(unsafe.Pointer(in.SigningKeySecret)) + return nil +} + +// Convert_v1beta1_ServiceAccountConfig_To_garden_ServiceAccountConfig is an autogenerated conversion function. +func Convert_v1beta1_ServiceAccountConfig_To_garden_ServiceAccountConfig(in *ServiceAccountConfig, out *garden.ServiceAccountConfig, s conversion.Scope) error { + return autoConvert_v1beta1_ServiceAccountConfig_To_garden_ServiceAccountConfig(in, out, s) +} + +func autoConvert_garden_ServiceAccountConfig_To_v1beta1_ServiceAccountConfig(in *garden.ServiceAccountConfig, out *ServiceAccountConfig, s conversion.Scope) error { + out.Issuer = (*string)(unsafe.Pointer(in.Issuer)) + out.SigningKeySecret = (*v1.LocalObjectReference)(unsafe.Pointer(in.SigningKeySecret)) + return nil +} + +// Convert_garden_ServiceAccountConfig_To_v1beta1_ServiceAccountConfig is an autogenerated conversion function. +func Convert_garden_ServiceAccountConfig_To_v1beta1_ServiceAccountConfig(in *garden.ServiceAccountConfig, out *ServiceAccountConfig, s conversion.Scope) error { + return autoConvert_garden_ServiceAccountConfig_To_v1beta1_ServiceAccountConfig(in, out, s) +} + +func autoConvert_v1beta1_Shoot_To_garden_Shoot(in *Shoot, out *garden.Shoot, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_ShootSpec_To_garden_ShootSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_ShootStatus_To_garden_ShootStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_garden_Shoot_To_v1beta1_Shoot(in *garden.Shoot, out *Shoot, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_garden_ShootSpec_To_v1beta1_ShootSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_garden_ShootStatus_To_v1beta1_ShootStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_ShootList_To_garden_ShootList(in *ShootList, out *garden.ShootList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]garden.Shoot, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Shoot_To_garden_Shoot(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_ShootList_To_garden_ShootList is an autogenerated conversion function. +func Convert_v1beta1_ShootList_To_garden_ShootList(in *ShootList, out *garden.ShootList, s conversion.Scope) error { + return autoConvert_v1beta1_ShootList_To_garden_ShootList(in, out, s) +} + +func autoConvert_garden_ShootList_To_v1beta1_ShootList(in *garden.ShootList, out *ShootList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Shoot, len(*in)) + for i := range *in { + if err := Convert_garden_Shoot_To_v1beta1_Shoot(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_garden_ShootList_To_v1beta1_ShootList is an autogenerated conversion function. +func Convert_garden_ShootList_To_v1beta1_ShootList(in *garden.ShootList, out *ShootList, s conversion.Scope) error { + return autoConvert_garden_ShootList_To_v1beta1_ShootList(in, out, s) +} + +func autoConvert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(in *ShootMachineImage, out *garden.ShootMachineImage, s conversion.Scope) error { + out.Name = in.Name + out.Version = in.Version + out.ProviderConfig = (*garden.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + return nil +} + +// Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage is an autogenerated conversion function. +func Convert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(in *ShootMachineImage, out *garden.ShootMachineImage, s conversion.Scope) error { + return autoConvert_v1beta1_ShootMachineImage_To_garden_ShootMachineImage(in, out, s) +} + +func autoConvert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in *garden.ShootMachineImage, out *ShootMachineImage, s conversion.Scope) error { + out.Name = in.Name + out.ProviderConfig = (*v1alpha1.ProviderConfig)(unsafe.Pointer(in.ProviderConfig)) + out.Version = in.Version + return nil +} + +// Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage is an autogenerated conversion function. +func Convert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in *garden.ShootMachineImage, out *ShootMachineImage, s conversion.Scope) error { + return autoConvert_garden_ShootMachineImage_To_v1beta1_ShootMachineImage(in, out, s) +} + +func autoConvert_v1beta1_ShootNetworks_To_garden_ShootNetworks(in *ShootNetworks, out *garden.ShootNetworks, s conversion.Scope) error { + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_v1beta1_ShootNetworks_To_garden_ShootNetworks is an autogenerated conversion function. +func Convert_v1beta1_ShootNetworks_To_garden_ShootNetworks(in *ShootNetworks, out *garden.ShootNetworks, s conversion.Scope) error { + return autoConvert_v1beta1_ShootNetworks_To_garden_ShootNetworks(in, out, s) +} + +func autoConvert_garden_ShootNetworks_To_v1beta1_ShootNetworks(in *garden.ShootNetworks, out *ShootNetworks, s conversion.Scope) error { + out.Pods = (*string)(unsafe.Pointer(in.Pods)) + out.Services = (*string)(unsafe.Pointer(in.Services)) + return nil +} + +// Convert_garden_ShootNetworks_To_v1beta1_ShootNetworks is an autogenerated conversion function. +func Convert_garden_ShootNetworks_To_v1beta1_ShootNetworks(in *garden.ShootNetworks, out *ShootNetworks, s conversion.Scope) error { + return autoConvert_garden_ShootNetworks_To_v1beta1_ShootNetworks(in, out, s) +} + +func autoConvert_v1beta1_ShootSpec_To_garden_ShootSpec(in *ShootSpec, out *garden.ShootSpec, s conversion.Scope) error { + out.Addons = (*garden.Addons)(unsafe.Pointer(in.Addons)) + if err := Convert_v1beta1_Cloud_To_garden_Cloud(&in.Cloud, &out.Cloud, s); err != nil { + return err + } + if in.DNS != nil { + in, out := &in.DNS, &out.DNS + *out = new(garden.DNS) + if err := Convert_v1beta1_DNS_To_garden_DNS(*in, *out, s); err != nil { + return err + } + } else { + out.DNS = nil + } + out.Extensions = *(*[]garden.Extension)(unsafe.Pointer(&in.Extensions)) + out.Hibernation = (*garden.Hibernation)(unsafe.Pointer(in.Hibernation)) + if err := Convert_v1beta1_Kubernetes_To_garden_Kubernetes(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + // WARNING: in.Networking requires manual conversion: inconvertible types (*github.com/gardener/gardener/pkg/apis/garden/v1beta1.Networking vs github.com/gardener/gardener/pkg/apis/garden.Networking) + out.Maintenance = (*garden.Maintenance)(unsafe.Pointer(in.Maintenance)) + out.Monitoring = (*garden.Monitoring)(unsafe.Pointer(in.Monitoring)) + return nil +} + +func autoConvert_garden_ShootSpec_To_v1beta1_ShootSpec(in *garden.ShootSpec, out *ShootSpec, s conversion.Scope) error { + out.Addons = (*Addons)(unsafe.Pointer(in.Addons)) + if err := Convert_garden_Cloud_To_v1beta1_Cloud(&in.Cloud, &out.Cloud, s); err != nil { + return err + } + // WARNING: in.CloudProfileName requires manual conversion: does not exist in peer-type + if in.DNS != nil { + in, out := &in.DNS, &out.DNS + *out = new(DNS) + if err := Convert_garden_DNS_To_v1beta1_DNS(*in, *out, s); err != nil { + return err + } + } else { + out.DNS = nil + } + out.Extensions = *(*[]Extension)(unsafe.Pointer(&in.Extensions)) + out.Hibernation = (*Hibernation)(unsafe.Pointer(in.Hibernation)) + if err := Convert_garden_Kubernetes_To_v1beta1_Kubernetes(&in.Kubernetes, &out.Kubernetes, s); err != nil { + return err + } + // WARNING: in.Networking requires manual conversion: inconvertible types (github.com/gardener/gardener/pkg/apis/garden.Networking vs *github.com/gardener/gardener/pkg/apis/garden/v1beta1.Networking) + out.Maintenance = (*Maintenance)(unsafe.Pointer(in.Maintenance)) + out.Monitoring = (*Monitoring)(unsafe.Pointer(in.Monitoring)) + // WARNING: in.Provider requires manual conversion: does not exist in peer-type + // WARNING: in.Region requires manual conversion: does not exist in peer-type + // WARNING: in.SecretBindingName requires manual conversion: does not exist in peer-type + // WARNING: in.SeedName requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_ShootStatus_To_garden_ShootStatus(in *ShootStatus, out *garden.ShootStatus, s conversion.Scope) error { + out.Conditions = *(*[]garden.Condition)(unsafe.Pointer(&in.Conditions)) + out.Constraints = *(*[]garden.Condition)(unsafe.Pointer(&in.Constraints)) + if err := Convert_v1beta1_Gardener_To_garden_Gardener(&in.Gardener, &out.Gardener, s); err != nil { + return err + } + out.LastOperation = (*garden.LastOperation)(unsafe.Pointer(in.LastOperation)) + // WARNING: in.LastError requires manual conversion: does not exist in peer-type + out.LastErrors = *(*[]garden.LastError)(unsafe.Pointer(&in.LastErrors)) + out.ObservedGeneration = in.ObservedGeneration + out.RetryCycleStartTime = (*metav1.Time)(unsafe.Pointer(in.RetryCycleStartTime)) + // WARNING: in.Seed requires manual conversion: does not exist in peer-type + out.IsHibernated = (*bool)(unsafe.Pointer(in.IsHibernated)) + out.TechnicalID = in.TechnicalID + out.UID = types.UID(in.UID) + return nil +} + +func autoConvert_garden_ShootStatus_To_v1beta1_ShootStatus(in *garden.ShootStatus, out *ShootStatus, s conversion.Scope) error { + out.Conditions = *(*[]v1alpha1.Condition)(unsafe.Pointer(&in.Conditions)) + out.Constraints = *(*[]v1alpha1.Condition)(unsafe.Pointer(&in.Constraints)) + if err := Convert_garden_Gardener_To_v1beta1_Gardener(&in.Gardener, &out.Gardener, s); err != nil { + return err + } + out.LastOperation = (*v1alpha1.LastOperation)(unsafe.Pointer(in.LastOperation)) + out.LastErrors = *(*[]v1alpha1.LastError)(unsafe.Pointer(&in.LastErrors)) + out.ObservedGeneration = in.ObservedGeneration + out.RetryCycleStartTime = (*metav1.Time)(unsafe.Pointer(in.RetryCycleStartTime)) + // WARNING: in.SeedName requires manual conversion: does not exist in peer-type + out.IsHibernated = (*bool)(unsafe.Pointer(in.IsHibernated)) + out.TechnicalID = in.TechnicalID + out.UID = types.UID(in.UID) + return nil +} + +func autoConvert_v1beta1_VolumeType_To_garden_VolumeType(in *VolumeType, out *garden.VolumeType, s conversion.Scope) error { + out.Name = in.Name + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + out.Class = in.Class + return nil +} + +// Convert_v1beta1_VolumeType_To_garden_VolumeType is an autogenerated conversion function. +func Convert_v1beta1_VolumeType_To_garden_VolumeType(in *VolumeType, out *garden.VolumeType, s conversion.Scope) error { + return autoConvert_v1beta1_VolumeType_To_garden_VolumeType(in, out, s) +} + +func autoConvert_garden_VolumeType_To_v1beta1_VolumeType(in *garden.VolumeType, out *VolumeType, s conversion.Scope) error { + out.Name = in.Name + out.Usable = (*bool)(unsafe.Pointer(in.Usable)) + out.Class = in.Class + return nil +} + +// Convert_garden_VolumeType_To_v1beta1_VolumeType is an autogenerated conversion function. +func Convert_garden_VolumeType_To_v1beta1_VolumeType(in *garden.VolumeType, out *VolumeType, s conversion.Scope) error { + return autoConvert_garden_VolumeType_To_v1beta1_VolumeType(in, out, s) +} + +func autoConvert_v1beta1_Worker_To_garden_Worker(in *Worker, out *garden.Worker, s conversion.Scope) error { + out.Name = in.Name + // WARNING: in.MachineType requires manual conversion: does not exist in peer-type + // WARNING: in.MachineImage requires manual conversion: does not exist in peer-type + // WARNING: in.AutoScalerMin requires manual conversion: does not exist in peer-type + // WARNING: in.AutoScalerMax requires manual conversion: does not exist in peer-type + out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) + out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) + // WARNING: in.Kubelet requires manual conversion: does not exist in peer-type + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + return nil +} + +func autoConvert_garden_Worker_To_v1beta1_Worker(in *garden.Worker, out *Worker, s conversion.Scope) error { + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.CABundle = (*string)(unsafe.Pointer(in.CABundle)) + // WARNING: in.Kubernetes requires manual conversion: does not exist in peer-type + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Name = in.Name + // WARNING: in.Machine requires manual conversion: does not exist in peer-type + // WARNING: in.Maximum requires manual conversion: does not exist in peer-type + // WARNING: in.Minimum requires manual conversion: does not exist in peer-type + out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) + out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) + // WARNING: in.ProviderConfig requires manual conversion: does not exist in peer-type + out.Taints = *(*[]v1.Taint)(unsafe.Pointer(&in.Taints)) + // WARNING: in.Volume requires manual conversion: does not exist in peer-type + // WARNING: in.Zones requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_Zone_To_garden_Zone(in *Zone, out *garden.Zone, s conversion.Scope) error { + out.Region = in.Region + out.Names = *(*[]string)(unsafe.Pointer(&in.Names)) + return nil +} + +// Convert_v1beta1_Zone_To_garden_Zone is an autogenerated conversion function. +func Convert_v1beta1_Zone_To_garden_Zone(in *Zone, out *garden.Zone, s conversion.Scope) error { + return autoConvert_v1beta1_Zone_To_garden_Zone(in, out, s) +} + +func autoConvert_garden_Zone_To_v1beta1_Zone(in *garden.Zone, out *Zone, s conversion.Scope) error { + out.Region = in.Region + out.Names = *(*[]string)(unsafe.Pointer(&in.Names)) + return nil +} + +// Convert_garden_Zone_To_v1beta1_Zone is an autogenerated conversion function. +func Convert_garden_Zone_To_v1beta1_Zone(in *garden.Zone, out *Zone, s conversion.Scope) error { + return autoConvert_garden_Zone_To_v1beta1_Zone(in, out, s) +} diff --git a/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.deepcopy.go index 81b6088aa..8ac8c8f61 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.deepcopy.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.deepcopy.go @@ -2257,6 +2257,11 @@ func (in *NginxIngress) DeepCopyInto(out *NginxIngress) { (*out)[key] = val } } + if in.ExternalTrafficPolicy != nil { + in, out := &in.ExternalTrafficPolicy, &out.ExternalTrafficPolicy + *out = new(v1.ServiceExternalTrafficPolicyType) + **out = **in + } return } @@ -3160,7 +3165,11 @@ func (in *SeedNetworks) DeepCopy() *SeedNetworks { func (in *SeedSpec) DeepCopyInto(out *SeedSpec) { *out = *in out.Cloud = in.Cloud - out.SecretRef = in.SecretRef + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(v1.SecretReference) + **out = **in + } in.Networks.DeepCopyInto(&out.Networks) if in.BlockCIDRs != nil { in, out := &in.BlockCIDRs, &out.BlockCIDRs @@ -3198,7 +3207,6 @@ func (in *SeedSpec) DeepCopy() *SeedSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SeedStatus) DeepCopyInto(out *SeedStatus) { *out = *in - out.Gardener = in.Gardener if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]v1alpha1.Condition, len(*in)) @@ -3206,6 +3214,16 @@ func (in *SeedStatus) DeepCopyInto(out *SeedStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Gardener != nil { + in, out := &in.Gardener, &out.Gardener + *out = new(Gardener) + **out = **in + } + if in.KubernetesVersion != nil { + in, out := &in.KubernetesVersion, &out.KubernetesVersion + *out = new(string) + **out = **in + } return } @@ -3362,7 +3380,11 @@ func (in *ShootSpec) DeepCopyInto(out *ShootSpec) { (*in).DeepCopyInto(*out) } in.Cloud.DeepCopyInto(&out.Cloud) - in.DNS.DeepCopyInto(&out.DNS) + if in.DNS != nil { + in, out := &in.DNS, &out.DNS + *out = new(DNS) + (*in).DeepCopyInto(*out) + } if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make([]Extension, len(*in)) @@ -3414,6 +3436,13 @@ func (in *ShootStatus) DeepCopyInto(out *ShootStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Constraints != nil { + in, out := &in.Constraints, &out.Constraints + *out = make([]v1alpha1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } out.Gardener = in.Gardener if in.LastOperation != nil { in, out := &in.LastOperation, &out.LastOperation diff --git a/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.defaults.go b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.defaults.go index 2e8ee7b3b..87933e666 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.defaults.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/garden/v1beta1/zz_generated.defaults.go @@ -126,6 +126,11 @@ func SetObjectDefaults_SeedList(in *SeedList) { func SetObjectDefaults_Shoot(in *Shoot) { SetDefaults_Shoot(in) + if in.Spec.Addons != nil { + if in.Spec.Addons.NginxIngress != nil { + SetDefaults_NginxIngress(in.Spec.Addons.NginxIngress) + } + } if in.Spec.Cloud.AWS != nil { for i := range in.Spec.Cloud.AWS.Workers { a := &in.Spec.Cloud.AWS.Workers[i] diff --git a/vendor/github.com/gardener/gardener/pkg/apis/garden/zz_generated.deepcopy.go b/vendor/github.com/gardener/gardener/pkg/apis/garden/zz_generated.deepcopy.go index 8a58e2d4b..24cfd4aad 100644 --- a/vendor/github.com/gardener/gardener/pkg/apis/garden/zz_generated.deepcopy.go +++ b/vendor/github.com/gardener/gardener/pkg/apis/garden/zz_generated.deepcopy.go @@ -2410,6 +2410,11 @@ func (in *NginxIngress) DeepCopyInto(out *NginxIngress) { (*out)[key] = val } } + if in.ExternalTrafficPolicy != nil { + in, out := &in.ExternalTrafficPolicy, &out.ExternalTrafficPolicy + *out = new(v1.ServiceExternalTrafficPolicyType) + **out = **in + } return } @@ -3370,6 +3375,11 @@ func (in *SeedNetworks) DeepCopyInto(out *SeedNetworks) { *out = new(ShootNetworks) (*in).DeepCopyInto(*out) } + if in.BlockCIDRs != nil { + in, out := &in.BlockCIDRs, &out.BlockCIDRs + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -3404,13 +3414,12 @@ func (in *SeedSpec) DeepCopyInto(out *SeedSpec) { *out = *in out.Cloud = in.Cloud out.Provider = in.Provider - out.SecretRef = in.SecretRef - in.Networks.DeepCopyInto(&out.Networks) - if in.BlockCIDRs != nil { - in, out := &in.BlockCIDRs, &out.BlockCIDRs - *out = make([]string, len(*in)) - copy(*out, *in) + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(v1.SecretReference) + **out = **in } + in.Networks.DeepCopyInto(&out.Networks) if in.Taints != nil { in, out := &in.Taints, &out.Taints *out = make([]SeedTaint, len(*in)) @@ -3451,7 +3460,16 @@ func (in *SeedStatus) DeepCopyInto(out *SeedStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - out.Gardener = in.Gardener + if in.Gardener != nil { + in, out := &in.Gardener, &out.Gardener + *out = new(Gardener) + **out = **in + } + if in.KubernetesVersion != nil { + in, out := &in.KubernetesVersion, &out.KubernetesVersion + *out = new(string) + **out = **in + } return } @@ -3729,6 +3747,13 @@ func (in *ShootStatus) DeepCopyInto(out *ShootStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Constraints != nil { + in, out := &in.Constraints, &out.Constraints + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } out.Gardener = in.Gardener if in.LastOperation != nil { in, out := &in.LastOperation, &out.LastOperation @@ -3746,8 +3771,8 @@ func (in *ShootStatus) DeepCopyInto(out *ShootStatus) { in, out := &in.RetryCycleStartTime, &out.RetryCycleStartTime *out = (*in).DeepCopy() } - if in.Seed != nil { - in, out := &in.Seed, &out.Seed + if in.SeedName != nil { + in, out := &in.SeedName, &out.SeedName *out = new(string) **out = **in } diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/clientset.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/clientset.go index 25e34d2c5..be8ebd1ca 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/clientset.go +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/clientset.go @@ -4,6 +4,7 @@ package versioned import ( corev1alpha1 "github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1" + corev1beta1 "github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -12,6 +13,7 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface CoreV1alpha1() corev1alpha1.CoreV1alpha1Interface + CoreV1beta1() corev1beta1.CoreV1beta1Interface } // Clientset contains the clients for groups. Each group has exactly one @@ -19,6 +21,7 @@ type Interface interface { type Clientset struct { *discovery.DiscoveryClient coreV1alpha1 *corev1alpha1.CoreV1alpha1Client + coreV1beta1 *corev1beta1.CoreV1beta1Client } // CoreV1alpha1 retrieves the CoreV1alpha1Client @@ -26,6 +29,11 @@ func (c *Clientset) CoreV1alpha1() corev1alpha1.CoreV1alpha1Interface { return c.coreV1alpha1 } +// CoreV1beta1 retrieves the CoreV1beta1Client +func (c *Clientset) CoreV1beta1() corev1beta1.CoreV1beta1Interface { + return c.coreV1beta1 +} + // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -46,6 +54,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.coreV1beta1, err = corev1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -59,6 +71,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.coreV1alpha1 = corev1alpha1.NewForConfigOrDie(c) + cs.coreV1beta1 = corev1beta1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -68,6 +81,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { func New(c rest.Interface) *Clientset { var cs Clientset cs.coreV1alpha1 = corev1alpha1.New(c) + cs.coreV1beta1 = corev1beta1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme/register.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme/register.go index f23764b4a..926ccf74d 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme/register.go +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme/register.go @@ -4,6 +4,7 @@ package scheme import ( corev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -16,6 +17,7 @@ var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ corev1alpha1.AddToScheme, + corev1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/core_client.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/core_client.go index e1cb3321c..84fef8752 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/core_client.go +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/core_client.go @@ -22,6 +22,7 @@ type CoreV1alpha1Interface interface { SecretBindingsGetter SeedsGetter ShootsGetter + ShootStatesGetter } // CoreV1alpha1Client is used to interact with features provided by the core.gardener.cloud group. @@ -73,6 +74,10 @@ func (c *CoreV1alpha1Client) Shoots(namespace string) ShootInterface { return newShoots(c, namespace) } +func (c *CoreV1alpha1Client) ShootStates(namespace string) ShootStateInterface { + return newShootStates(c, namespace) +} + // NewForConfig creates a new CoreV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*CoreV1alpha1Client, error) { config := *c diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/generated_expansion.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/generated_expansion.go index d76cca58b..c9a60a0bf 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/generated_expansion.go +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/generated_expansion.go @@ -23,3 +23,5 @@ type SecretBindingExpansion interface{} type SeedExpansion interface{} type ShootExpansion interface{} + +type ShootStateExpansion interface{} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/shootstate.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/shootstate.go new file mode 100644 index 000000000..3ff9dae51 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1/shootstate.go @@ -0,0 +1,158 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "time" + + v1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ShootStatesGetter has a method to return a ShootStateInterface. +// A group's client should implement this interface. +type ShootStatesGetter interface { + ShootStates(namespace string) ShootStateInterface +} + +// ShootStateInterface has methods to work with ShootState resources. +type ShootStateInterface interface { + Create(*v1alpha1.ShootState) (*v1alpha1.ShootState, error) + Update(*v1alpha1.ShootState) (*v1alpha1.ShootState, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.ShootState, error) + List(opts v1.ListOptions) (*v1alpha1.ShootStateList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ShootState, err error) + ShootStateExpansion +} + +// shootStates implements ShootStateInterface +type shootStates struct { + client rest.Interface + ns string +} + +// newShootStates returns a ShootStates +func newShootStates(c *CoreV1alpha1Client, namespace string) *shootStates { + return &shootStates{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the shootState, and returns the corresponding shootState object, and an error if there is any. +func (c *shootStates) Get(name string, options v1.GetOptions) (result *v1alpha1.ShootState, err error) { + result = &v1alpha1.ShootState{} + err = c.client.Get(). + Namespace(c.ns). + Resource("shootstates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ShootStates that match those selectors. +func (c *shootStates) List(opts v1.ListOptions) (result *v1alpha1.ShootStateList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ShootStateList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("shootstates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested shootStates. +func (c *shootStates) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("shootstates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a shootState and creates it. Returns the server's representation of the shootState, and an error, if there is any. +func (c *shootStates) Create(shootState *v1alpha1.ShootState) (result *v1alpha1.ShootState, err error) { + result = &v1alpha1.ShootState{} + err = c.client.Post(). + Namespace(c.ns). + Resource("shootstates"). + Body(shootState). + Do(). + Into(result) + return +} + +// Update takes the representation of a shootState and updates it. Returns the server's representation of the shootState, and an error, if there is any. +func (c *shootStates) Update(shootState *v1alpha1.ShootState) (result *v1alpha1.ShootState, err error) { + result = &v1alpha1.ShootState{} + err = c.client.Put(). + Namespace(c.ns). + Resource("shootstates"). + Name(shootState.Name). + Body(shootState). + Do(). + Into(result) + return +} + +// Delete takes name of the shootState and deletes it. Returns an error if one occurs. +func (c *shootStates) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("shootstates"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *shootStates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("shootstates"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched shootState. +func (c *shootStates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ShootState, err error) { + result = &v1alpha1.ShootState{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("shootstates"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/backupbucket.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/backupbucket.go new file mode 100644 index 000000000..b200207ee --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/backupbucket.go @@ -0,0 +1,164 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// BackupBucketsGetter has a method to return a BackupBucketInterface. +// A group's client should implement this interface. +type BackupBucketsGetter interface { + BackupBuckets() BackupBucketInterface +} + +// BackupBucketInterface has methods to work with BackupBucket resources. +type BackupBucketInterface interface { + Create(*v1beta1.BackupBucket) (*v1beta1.BackupBucket, error) + Update(*v1beta1.BackupBucket) (*v1beta1.BackupBucket, error) + UpdateStatus(*v1beta1.BackupBucket) (*v1beta1.BackupBucket, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.BackupBucket, error) + List(opts v1.ListOptions) (*v1beta1.BackupBucketList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.BackupBucket, err error) + BackupBucketExpansion +} + +// backupBuckets implements BackupBucketInterface +type backupBuckets struct { + client rest.Interface +} + +// newBackupBuckets returns a BackupBuckets +func newBackupBuckets(c *CoreV1beta1Client) *backupBuckets { + return &backupBuckets{ + client: c.RESTClient(), + } +} + +// Get takes name of the backupBucket, and returns the corresponding backupBucket object, and an error if there is any. +func (c *backupBuckets) Get(name string, options v1.GetOptions) (result *v1beta1.BackupBucket, err error) { + result = &v1beta1.BackupBucket{} + err = c.client.Get(). + Resource("backupbuckets"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of BackupBuckets that match those selectors. +func (c *backupBuckets) List(opts v1.ListOptions) (result *v1beta1.BackupBucketList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.BackupBucketList{} + err = c.client.Get(). + Resource("backupbuckets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested backupBuckets. +func (c *backupBuckets) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("backupbuckets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a backupBucket and creates it. Returns the server's representation of the backupBucket, and an error, if there is any. +func (c *backupBuckets) Create(backupBucket *v1beta1.BackupBucket) (result *v1beta1.BackupBucket, err error) { + result = &v1beta1.BackupBucket{} + err = c.client.Post(). + Resource("backupbuckets"). + Body(backupBucket). + Do(). + Into(result) + return +} + +// Update takes the representation of a backupBucket and updates it. Returns the server's representation of the backupBucket, and an error, if there is any. +func (c *backupBuckets) Update(backupBucket *v1beta1.BackupBucket) (result *v1beta1.BackupBucket, err error) { + result = &v1beta1.BackupBucket{} + err = c.client.Put(). + Resource("backupbuckets"). + Name(backupBucket.Name). + Body(backupBucket). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *backupBuckets) UpdateStatus(backupBucket *v1beta1.BackupBucket) (result *v1beta1.BackupBucket, err error) { + result = &v1beta1.BackupBucket{} + err = c.client.Put(). + Resource("backupbuckets"). + Name(backupBucket.Name). + SubResource("status"). + Body(backupBucket). + Do(). + Into(result) + return +} + +// Delete takes name of the backupBucket and deletes it. Returns an error if one occurs. +func (c *backupBuckets) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("backupbuckets"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *backupBuckets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("backupbuckets"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched backupBucket. +func (c *backupBuckets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.BackupBucket, err error) { + result = &v1beta1.BackupBucket{} + err = c.client.Patch(pt). + Resource("backupbuckets"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/backupentry.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/backupentry.go new file mode 100644 index 000000000..8d44186e2 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/backupentry.go @@ -0,0 +1,175 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// BackupEntriesGetter has a method to return a BackupEntryInterface. +// A group's client should implement this interface. +type BackupEntriesGetter interface { + BackupEntries(namespace string) BackupEntryInterface +} + +// BackupEntryInterface has methods to work with BackupEntry resources. +type BackupEntryInterface interface { + Create(*v1beta1.BackupEntry) (*v1beta1.BackupEntry, error) + Update(*v1beta1.BackupEntry) (*v1beta1.BackupEntry, error) + UpdateStatus(*v1beta1.BackupEntry) (*v1beta1.BackupEntry, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.BackupEntry, error) + List(opts v1.ListOptions) (*v1beta1.BackupEntryList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.BackupEntry, err error) + BackupEntryExpansion +} + +// backupEntries implements BackupEntryInterface +type backupEntries struct { + client rest.Interface + ns string +} + +// newBackupEntries returns a BackupEntries +func newBackupEntries(c *CoreV1beta1Client, namespace string) *backupEntries { + return &backupEntries{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the backupEntry, and returns the corresponding backupEntry object, and an error if there is any. +func (c *backupEntries) Get(name string, options v1.GetOptions) (result *v1beta1.BackupEntry, err error) { + result = &v1beta1.BackupEntry{} + err = c.client.Get(). + Namespace(c.ns). + Resource("backupentries"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of BackupEntries that match those selectors. +func (c *backupEntries) List(opts v1.ListOptions) (result *v1beta1.BackupEntryList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.BackupEntryList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("backupentries"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested backupEntries. +func (c *backupEntries) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("backupentries"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a backupEntry and creates it. Returns the server's representation of the backupEntry, and an error, if there is any. +func (c *backupEntries) Create(backupEntry *v1beta1.BackupEntry) (result *v1beta1.BackupEntry, err error) { + result = &v1beta1.BackupEntry{} + err = c.client.Post(). + Namespace(c.ns). + Resource("backupentries"). + Body(backupEntry). + Do(). + Into(result) + return +} + +// Update takes the representation of a backupEntry and updates it. Returns the server's representation of the backupEntry, and an error, if there is any. +func (c *backupEntries) Update(backupEntry *v1beta1.BackupEntry) (result *v1beta1.BackupEntry, err error) { + result = &v1beta1.BackupEntry{} + err = c.client.Put(). + Namespace(c.ns). + Resource("backupentries"). + Name(backupEntry.Name). + Body(backupEntry). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *backupEntries) UpdateStatus(backupEntry *v1beta1.BackupEntry) (result *v1beta1.BackupEntry, err error) { + result = &v1beta1.BackupEntry{} + err = c.client.Put(). + Namespace(c.ns). + Resource("backupentries"). + Name(backupEntry.Name). + SubResource("status"). + Body(backupEntry). + Do(). + Into(result) + return +} + +// Delete takes name of the backupEntry and deletes it. Returns an error if one occurs. +func (c *backupEntries) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("backupentries"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *backupEntries) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("backupentries"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched backupEntry. +func (c *backupEntries) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.BackupEntry, err error) { + result = &v1beta1.BackupEntry{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("backupentries"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/cloudprofile.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/cloudprofile.go new file mode 100644 index 000000000..52cbde7e0 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/cloudprofile.go @@ -0,0 +1,148 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// CloudProfilesGetter has a method to return a CloudProfileInterface. +// A group's client should implement this interface. +type CloudProfilesGetter interface { + CloudProfiles() CloudProfileInterface +} + +// CloudProfileInterface has methods to work with CloudProfile resources. +type CloudProfileInterface interface { + Create(*v1beta1.CloudProfile) (*v1beta1.CloudProfile, error) + Update(*v1beta1.CloudProfile) (*v1beta1.CloudProfile, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.CloudProfile, error) + List(opts v1.ListOptions) (*v1beta1.CloudProfileList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CloudProfile, err error) + CloudProfileExpansion +} + +// cloudProfiles implements CloudProfileInterface +type cloudProfiles struct { + client rest.Interface +} + +// newCloudProfiles returns a CloudProfiles +func newCloudProfiles(c *CoreV1beta1Client) *cloudProfiles { + return &cloudProfiles{ + client: c.RESTClient(), + } +} + +// Get takes name of the cloudProfile, and returns the corresponding cloudProfile object, and an error if there is any. +func (c *cloudProfiles) Get(name string, options v1.GetOptions) (result *v1beta1.CloudProfile, err error) { + result = &v1beta1.CloudProfile{} + err = c.client.Get(). + Resource("cloudprofiles"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CloudProfiles that match those selectors. +func (c *cloudProfiles) List(opts v1.ListOptions) (result *v1beta1.CloudProfileList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.CloudProfileList{} + err = c.client.Get(). + Resource("cloudprofiles"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cloudProfiles. +func (c *cloudProfiles) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("cloudprofiles"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a cloudProfile and creates it. Returns the server's representation of the cloudProfile, and an error, if there is any. +func (c *cloudProfiles) Create(cloudProfile *v1beta1.CloudProfile) (result *v1beta1.CloudProfile, err error) { + result = &v1beta1.CloudProfile{} + err = c.client.Post(). + Resource("cloudprofiles"). + Body(cloudProfile). + Do(). + Into(result) + return +} + +// Update takes the representation of a cloudProfile and updates it. Returns the server's representation of the cloudProfile, and an error, if there is any. +func (c *cloudProfiles) Update(cloudProfile *v1beta1.CloudProfile) (result *v1beta1.CloudProfile, err error) { + result = &v1beta1.CloudProfile{} + err = c.client.Put(). + Resource("cloudprofiles"). + Name(cloudProfile.Name). + Body(cloudProfile). + Do(). + Into(result) + return +} + +// Delete takes name of the cloudProfile and deletes it. Returns an error if one occurs. +func (c *cloudProfiles) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("cloudprofiles"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cloudProfiles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("cloudprofiles"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched cloudProfile. +func (c *cloudProfiles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CloudProfile, err error) { + result = &v1beta1.CloudProfile{} + err = c.client.Patch(pt). + Resource("cloudprofiles"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/controllerinstallation.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/controllerinstallation.go new file mode 100644 index 000000000..ee2b6e28e --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/controllerinstallation.go @@ -0,0 +1,164 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ControllerInstallationsGetter has a method to return a ControllerInstallationInterface. +// A group's client should implement this interface. +type ControllerInstallationsGetter interface { + ControllerInstallations() ControllerInstallationInterface +} + +// ControllerInstallationInterface has methods to work with ControllerInstallation resources. +type ControllerInstallationInterface interface { + Create(*v1beta1.ControllerInstallation) (*v1beta1.ControllerInstallation, error) + Update(*v1beta1.ControllerInstallation) (*v1beta1.ControllerInstallation, error) + UpdateStatus(*v1beta1.ControllerInstallation) (*v1beta1.ControllerInstallation, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.ControllerInstallation, error) + List(opts v1.ListOptions) (*v1beta1.ControllerInstallationList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerInstallation, err error) + ControllerInstallationExpansion +} + +// controllerInstallations implements ControllerInstallationInterface +type controllerInstallations struct { + client rest.Interface +} + +// newControllerInstallations returns a ControllerInstallations +func newControllerInstallations(c *CoreV1beta1Client) *controllerInstallations { + return &controllerInstallations{ + client: c.RESTClient(), + } +} + +// Get takes name of the controllerInstallation, and returns the corresponding controllerInstallation object, and an error if there is any. +func (c *controllerInstallations) Get(name string, options v1.GetOptions) (result *v1beta1.ControllerInstallation, err error) { + result = &v1beta1.ControllerInstallation{} + err = c.client.Get(). + Resource("controllerinstallations"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ControllerInstallations that match those selectors. +func (c *controllerInstallations) List(opts v1.ListOptions) (result *v1beta1.ControllerInstallationList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.ControllerInstallationList{} + err = c.client.Get(). + Resource("controllerinstallations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested controllerInstallations. +func (c *controllerInstallations) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("controllerinstallations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a controllerInstallation and creates it. Returns the server's representation of the controllerInstallation, and an error, if there is any. +func (c *controllerInstallations) Create(controllerInstallation *v1beta1.ControllerInstallation) (result *v1beta1.ControllerInstallation, err error) { + result = &v1beta1.ControllerInstallation{} + err = c.client.Post(). + Resource("controllerinstallations"). + Body(controllerInstallation). + Do(). + Into(result) + return +} + +// Update takes the representation of a controllerInstallation and updates it. Returns the server's representation of the controllerInstallation, and an error, if there is any. +func (c *controllerInstallations) Update(controllerInstallation *v1beta1.ControllerInstallation) (result *v1beta1.ControllerInstallation, err error) { + result = &v1beta1.ControllerInstallation{} + err = c.client.Put(). + Resource("controllerinstallations"). + Name(controllerInstallation.Name). + Body(controllerInstallation). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *controllerInstallations) UpdateStatus(controllerInstallation *v1beta1.ControllerInstallation) (result *v1beta1.ControllerInstallation, err error) { + result = &v1beta1.ControllerInstallation{} + err = c.client.Put(). + Resource("controllerinstallations"). + Name(controllerInstallation.Name). + SubResource("status"). + Body(controllerInstallation). + Do(). + Into(result) + return +} + +// Delete takes name of the controllerInstallation and deletes it. Returns an error if one occurs. +func (c *controllerInstallations) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("controllerinstallations"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *controllerInstallations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("controllerinstallations"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched controllerInstallation. +func (c *controllerInstallations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerInstallation, err error) { + result = &v1beta1.ControllerInstallation{} + err = c.client.Patch(pt). + Resource("controllerinstallations"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/controllerregistration.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/controllerregistration.go new file mode 100644 index 000000000..1ed2f60fd --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/controllerregistration.go @@ -0,0 +1,148 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ControllerRegistrationsGetter has a method to return a ControllerRegistrationInterface. +// A group's client should implement this interface. +type ControllerRegistrationsGetter interface { + ControllerRegistrations() ControllerRegistrationInterface +} + +// ControllerRegistrationInterface has methods to work with ControllerRegistration resources. +type ControllerRegistrationInterface interface { + Create(*v1beta1.ControllerRegistration) (*v1beta1.ControllerRegistration, error) + Update(*v1beta1.ControllerRegistration) (*v1beta1.ControllerRegistration, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.ControllerRegistration, error) + List(opts v1.ListOptions) (*v1beta1.ControllerRegistrationList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRegistration, err error) + ControllerRegistrationExpansion +} + +// controllerRegistrations implements ControllerRegistrationInterface +type controllerRegistrations struct { + client rest.Interface +} + +// newControllerRegistrations returns a ControllerRegistrations +func newControllerRegistrations(c *CoreV1beta1Client) *controllerRegistrations { + return &controllerRegistrations{ + client: c.RESTClient(), + } +} + +// Get takes name of the controllerRegistration, and returns the corresponding controllerRegistration object, and an error if there is any. +func (c *controllerRegistrations) Get(name string, options v1.GetOptions) (result *v1beta1.ControllerRegistration, err error) { + result = &v1beta1.ControllerRegistration{} + err = c.client.Get(). + Resource("controllerregistrations"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ControllerRegistrations that match those selectors. +func (c *controllerRegistrations) List(opts v1.ListOptions) (result *v1beta1.ControllerRegistrationList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.ControllerRegistrationList{} + err = c.client.Get(). + Resource("controllerregistrations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested controllerRegistrations. +func (c *controllerRegistrations) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("controllerregistrations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a controllerRegistration and creates it. Returns the server's representation of the controllerRegistration, and an error, if there is any. +func (c *controllerRegistrations) Create(controllerRegistration *v1beta1.ControllerRegistration) (result *v1beta1.ControllerRegistration, err error) { + result = &v1beta1.ControllerRegistration{} + err = c.client.Post(). + Resource("controllerregistrations"). + Body(controllerRegistration). + Do(). + Into(result) + return +} + +// Update takes the representation of a controllerRegistration and updates it. Returns the server's representation of the controllerRegistration, and an error, if there is any. +func (c *controllerRegistrations) Update(controllerRegistration *v1beta1.ControllerRegistration) (result *v1beta1.ControllerRegistration, err error) { + result = &v1beta1.ControllerRegistration{} + err = c.client.Put(). + Resource("controllerregistrations"). + Name(controllerRegistration.Name). + Body(controllerRegistration). + Do(). + Into(result) + return +} + +// Delete takes name of the controllerRegistration and deletes it. Returns an error if one occurs. +func (c *controllerRegistrations) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("controllerregistrations"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *controllerRegistrations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("controllerregistrations"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched controllerRegistration. +func (c *controllerRegistrations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRegistration, err error) { + result = &v1beta1.ControllerRegistration{} + err = c.client.Patch(pt). + Resource("controllerregistrations"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/core_client.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/core_client.go new file mode 100644 index 000000000..7d682695b --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/core_client.go @@ -0,0 +1,124 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" +) + +type CoreV1beta1Interface interface { + RESTClient() rest.Interface + BackupBucketsGetter + BackupEntriesGetter + CloudProfilesGetter + ControllerInstallationsGetter + ControllerRegistrationsGetter + PlantsGetter + ProjectsGetter + QuotasGetter + SecretBindingsGetter + SeedsGetter + ShootsGetter +} + +// CoreV1beta1Client is used to interact with features provided by the core.gardener.cloud group. +type CoreV1beta1Client struct { + restClient rest.Interface +} + +func (c *CoreV1beta1Client) BackupBuckets() BackupBucketInterface { + return newBackupBuckets(c) +} + +func (c *CoreV1beta1Client) BackupEntries(namespace string) BackupEntryInterface { + return newBackupEntries(c, namespace) +} + +func (c *CoreV1beta1Client) CloudProfiles() CloudProfileInterface { + return newCloudProfiles(c) +} + +func (c *CoreV1beta1Client) ControllerInstallations() ControllerInstallationInterface { + return newControllerInstallations(c) +} + +func (c *CoreV1beta1Client) ControllerRegistrations() ControllerRegistrationInterface { + return newControllerRegistrations(c) +} + +func (c *CoreV1beta1Client) Plants(namespace string) PlantInterface { + return newPlants(c, namespace) +} + +func (c *CoreV1beta1Client) Projects() ProjectInterface { + return newProjects(c) +} + +func (c *CoreV1beta1Client) Quotas(namespace string) QuotaInterface { + return newQuotas(c, namespace) +} + +func (c *CoreV1beta1Client) SecretBindings(namespace string) SecretBindingInterface { + return newSecretBindings(c, namespace) +} + +func (c *CoreV1beta1Client) Seeds() SeedInterface { + return newSeeds(c) +} + +func (c *CoreV1beta1Client) Shoots(namespace string) ShootInterface { + return newShoots(c, namespace) +} + +// NewForConfig creates a new CoreV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*CoreV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &CoreV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new CoreV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *CoreV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new CoreV1beta1Client for the given RESTClient. +func New(c rest.Interface) *CoreV1beta1Client { + return &CoreV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *CoreV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/doc.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/doc.go new file mode 100644 index 000000000..897c0995f --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/generated_expansion.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/generated_expansion.go new file mode 100644 index 000000000..313dfa636 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/generated_expansion.go @@ -0,0 +1,25 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +type BackupBucketExpansion interface{} + +type BackupEntryExpansion interface{} + +type CloudProfileExpansion interface{} + +type ControllerInstallationExpansion interface{} + +type ControllerRegistrationExpansion interface{} + +type PlantExpansion interface{} + +type ProjectExpansion interface{} + +type QuotaExpansion interface{} + +type SecretBindingExpansion interface{} + +type SeedExpansion interface{} + +type ShootExpansion interface{} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/plant.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/plant.go new file mode 100644 index 000000000..e87a6840a --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/plant.go @@ -0,0 +1,175 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// PlantsGetter has a method to return a PlantInterface. +// A group's client should implement this interface. +type PlantsGetter interface { + Plants(namespace string) PlantInterface +} + +// PlantInterface has methods to work with Plant resources. +type PlantInterface interface { + Create(*v1beta1.Plant) (*v1beta1.Plant, error) + Update(*v1beta1.Plant) (*v1beta1.Plant, error) + UpdateStatus(*v1beta1.Plant) (*v1beta1.Plant, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Plant, error) + List(opts v1.ListOptions) (*v1beta1.PlantList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Plant, err error) + PlantExpansion +} + +// plants implements PlantInterface +type plants struct { + client rest.Interface + ns string +} + +// newPlants returns a Plants +func newPlants(c *CoreV1beta1Client, namespace string) *plants { + return &plants{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the plant, and returns the corresponding plant object, and an error if there is any. +func (c *plants) Get(name string, options v1.GetOptions) (result *v1beta1.Plant, err error) { + result = &v1beta1.Plant{} + err = c.client.Get(). + Namespace(c.ns). + Resource("plants"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Plants that match those selectors. +func (c *plants) List(opts v1.ListOptions) (result *v1beta1.PlantList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.PlantList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("plants"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested plants. +func (c *plants) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("plants"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a plant and creates it. Returns the server's representation of the plant, and an error, if there is any. +func (c *plants) Create(plant *v1beta1.Plant) (result *v1beta1.Plant, err error) { + result = &v1beta1.Plant{} + err = c.client.Post(). + Namespace(c.ns). + Resource("plants"). + Body(plant). + Do(). + Into(result) + return +} + +// Update takes the representation of a plant and updates it. Returns the server's representation of the plant, and an error, if there is any. +func (c *plants) Update(plant *v1beta1.Plant) (result *v1beta1.Plant, err error) { + result = &v1beta1.Plant{} + err = c.client.Put(). + Namespace(c.ns). + Resource("plants"). + Name(plant.Name). + Body(plant). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *plants) UpdateStatus(plant *v1beta1.Plant) (result *v1beta1.Plant, err error) { + result = &v1beta1.Plant{} + err = c.client.Put(). + Namespace(c.ns). + Resource("plants"). + Name(plant.Name). + SubResource("status"). + Body(plant). + Do(). + Into(result) + return +} + +// Delete takes name of the plant and deletes it. Returns an error if one occurs. +func (c *plants) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("plants"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *plants) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("plants"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched plant. +func (c *plants) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Plant, err error) { + result = &v1beta1.Plant{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("plants"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/project.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/project.go new file mode 100644 index 000000000..7b14b1eba --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/project.go @@ -0,0 +1,164 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ProjectsGetter has a method to return a ProjectInterface. +// A group's client should implement this interface. +type ProjectsGetter interface { + Projects() ProjectInterface +} + +// ProjectInterface has methods to work with Project resources. +type ProjectInterface interface { + Create(*v1beta1.Project) (*v1beta1.Project, error) + Update(*v1beta1.Project) (*v1beta1.Project, error) + UpdateStatus(*v1beta1.Project) (*v1beta1.Project, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Project, error) + List(opts v1.ListOptions) (*v1beta1.ProjectList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Project, err error) + ProjectExpansion +} + +// projects implements ProjectInterface +type projects struct { + client rest.Interface +} + +// newProjects returns a Projects +func newProjects(c *CoreV1beta1Client) *projects { + return &projects{ + client: c.RESTClient(), + } +} + +// Get takes name of the project, and returns the corresponding project object, and an error if there is any. +func (c *projects) Get(name string, options v1.GetOptions) (result *v1beta1.Project, err error) { + result = &v1beta1.Project{} + err = c.client.Get(). + Resource("projects"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Projects that match those selectors. +func (c *projects) List(opts v1.ListOptions) (result *v1beta1.ProjectList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.ProjectList{} + err = c.client.Get(). + Resource("projects"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested projects. +func (c *projects) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("projects"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a project and creates it. Returns the server's representation of the project, and an error, if there is any. +func (c *projects) Create(project *v1beta1.Project) (result *v1beta1.Project, err error) { + result = &v1beta1.Project{} + err = c.client.Post(). + Resource("projects"). + Body(project). + Do(). + Into(result) + return +} + +// Update takes the representation of a project and updates it. Returns the server's representation of the project, and an error, if there is any. +func (c *projects) Update(project *v1beta1.Project) (result *v1beta1.Project, err error) { + result = &v1beta1.Project{} + err = c.client.Put(). + Resource("projects"). + Name(project.Name). + Body(project). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *projects) UpdateStatus(project *v1beta1.Project) (result *v1beta1.Project, err error) { + result = &v1beta1.Project{} + err = c.client.Put(). + Resource("projects"). + Name(project.Name). + SubResource("status"). + Body(project). + Do(). + Into(result) + return +} + +// Delete takes name of the project and deletes it. Returns an error if one occurs. +func (c *projects) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("projects"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *projects) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("projects"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched project. +func (c *projects) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Project, err error) { + result = &v1beta1.Project{} + err = c.client.Patch(pt). + Resource("projects"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/quota.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/quota.go new file mode 100644 index 000000000..e68f09de0 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/quota.go @@ -0,0 +1,158 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// QuotasGetter has a method to return a QuotaInterface. +// A group's client should implement this interface. +type QuotasGetter interface { + Quotas(namespace string) QuotaInterface +} + +// QuotaInterface has methods to work with Quota resources. +type QuotaInterface interface { + Create(*v1beta1.Quota) (*v1beta1.Quota, error) + Update(*v1beta1.Quota) (*v1beta1.Quota, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Quota, error) + List(opts v1.ListOptions) (*v1beta1.QuotaList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Quota, err error) + QuotaExpansion +} + +// quotas implements QuotaInterface +type quotas struct { + client rest.Interface + ns string +} + +// newQuotas returns a Quotas +func newQuotas(c *CoreV1beta1Client, namespace string) *quotas { + return "as{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the quota, and returns the corresponding quota object, and an error if there is any. +func (c *quotas) Get(name string, options v1.GetOptions) (result *v1beta1.Quota, err error) { + result = &v1beta1.Quota{} + err = c.client.Get(). + Namespace(c.ns). + Resource("quotas"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Quotas that match those selectors. +func (c *quotas) List(opts v1.ListOptions) (result *v1beta1.QuotaList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.QuotaList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("quotas"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested quotas. +func (c *quotas) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("quotas"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a quota and creates it. Returns the server's representation of the quota, and an error, if there is any. +func (c *quotas) Create(quota *v1beta1.Quota) (result *v1beta1.Quota, err error) { + result = &v1beta1.Quota{} + err = c.client.Post(). + Namespace(c.ns). + Resource("quotas"). + Body(quota). + Do(). + Into(result) + return +} + +// Update takes the representation of a quota and updates it. Returns the server's representation of the quota, and an error, if there is any. +func (c *quotas) Update(quota *v1beta1.Quota) (result *v1beta1.Quota, err error) { + result = &v1beta1.Quota{} + err = c.client.Put(). + Namespace(c.ns). + Resource("quotas"). + Name(quota.Name). + Body(quota). + Do(). + Into(result) + return +} + +// Delete takes name of the quota and deletes it. Returns an error if one occurs. +func (c *quotas) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("quotas"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *quotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("quotas"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched quota. +func (c *quotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Quota, err error) { + result = &v1beta1.Quota{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("quotas"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/secretbinding.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/secretbinding.go new file mode 100644 index 000000000..a37804518 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/secretbinding.go @@ -0,0 +1,158 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SecretBindingsGetter has a method to return a SecretBindingInterface. +// A group's client should implement this interface. +type SecretBindingsGetter interface { + SecretBindings(namespace string) SecretBindingInterface +} + +// SecretBindingInterface has methods to work with SecretBinding resources. +type SecretBindingInterface interface { + Create(*v1beta1.SecretBinding) (*v1beta1.SecretBinding, error) + Update(*v1beta1.SecretBinding) (*v1beta1.SecretBinding, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.SecretBinding, error) + List(opts v1.ListOptions) (*v1beta1.SecretBindingList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.SecretBinding, err error) + SecretBindingExpansion +} + +// secretBindings implements SecretBindingInterface +type secretBindings struct { + client rest.Interface + ns string +} + +// newSecretBindings returns a SecretBindings +func newSecretBindings(c *CoreV1beta1Client, namespace string) *secretBindings { + return &secretBindings{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the secretBinding, and returns the corresponding secretBinding object, and an error if there is any. +func (c *secretBindings) Get(name string, options v1.GetOptions) (result *v1beta1.SecretBinding, err error) { + result = &v1beta1.SecretBinding{} + err = c.client.Get(). + Namespace(c.ns). + Resource("secretbindings"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SecretBindings that match those selectors. +func (c *secretBindings) List(opts v1.ListOptions) (result *v1beta1.SecretBindingList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.SecretBindingList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("secretbindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested secretBindings. +func (c *secretBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("secretbindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a secretBinding and creates it. Returns the server's representation of the secretBinding, and an error, if there is any. +func (c *secretBindings) Create(secretBinding *v1beta1.SecretBinding) (result *v1beta1.SecretBinding, err error) { + result = &v1beta1.SecretBinding{} + err = c.client.Post(). + Namespace(c.ns). + Resource("secretbindings"). + Body(secretBinding). + Do(). + Into(result) + return +} + +// Update takes the representation of a secretBinding and updates it. Returns the server's representation of the secretBinding, and an error, if there is any. +func (c *secretBindings) Update(secretBinding *v1beta1.SecretBinding) (result *v1beta1.SecretBinding, err error) { + result = &v1beta1.SecretBinding{} + err = c.client.Put(). + Namespace(c.ns). + Resource("secretbindings"). + Name(secretBinding.Name). + Body(secretBinding). + Do(). + Into(result) + return +} + +// Delete takes name of the secretBinding and deletes it. Returns an error if one occurs. +func (c *secretBindings) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("secretbindings"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *secretBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("secretbindings"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched secretBinding. +func (c *secretBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.SecretBinding, err error) { + result = &v1beta1.SecretBinding{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("secretbindings"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/seed.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/seed.go new file mode 100644 index 000000000..a129ee9fb --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/seed.go @@ -0,0 +1,164 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SeedsGetter has a method to return a SeedInterface. +// A group's client should implement this interface. +type SeedsGetter interface { + Seeds() SeedInterface +} + +// SeedInterface has methods to work with Seed resources. +type SeedInterface interface { + Create(*v1beta1.Seed) (*v1beta1.Seed, error) + Update(*v1beta1.Seed) (*v1beta1.Seed, error) + UpdateStatus(*v1beta1.Seed) (*v1beta1.Seed, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Seed, error) + List(opts v1.ListOptions) (*v1beta1.SeedList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Seed, err error) + SeedExpansion +} + +// seeds implements SeedInterface +type seeds struct { + client rest.Interface +} + +// newSeeds returns a Seeds +func newSeeds(c *CoreV1beta1Client) *seeds { + return &seeds{ + client: c.RESTClient(), + } +} + +// Get takes name of the seed, and returns the corresponding seed object, and an error if there is any. +func (c *seeds) Get(name string, options v1.GetOptions) (result *v1beta1.Seed, err error) { + result = &v1beta1.Seed{} + err = c.client.Get(). + Resource("seeds"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Seeds that match those selectors. +func (c *seeds) List(opts v1.ListOptions) (result *v1beta1.SeedList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.SeedList{} + err = c.client.Get(). + Resource("seeds"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested seeds. +func (c *seeds) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("seeds"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a seed and creates it. Returns the server's representation of the seed, and an error, if there is any. +func (c *seeds) Create(seed *v1beta1.Seed) (result *v1beta1.Seed, err error) { + result = &v1beta1.Seed{} + err = c.client.Post(). + Resource("seeds"). + Body(seed). + Do(). + Into(result) + return +} + +// Update takes the representation of a seed and updates it. Returns the server's representation of the seed, and an error, if there is any. +func (c *seeds) Update(seed *v1beta1.Seed) (result *v1beta1.Seed, err error) { + result = &v1beta1.Seed{} + err = c.client.Put(). + Resource("seeds"). + Name(seed.Name). + Body(seed). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *seeds) UpdateStatus(seed *v1beta1.Seed) (result *v1beta1.Seed, err error) { + result = &v1beta1.Seed{} + err = c.client.Put(). + Resource("seeds"). + Name(seed.Name). + SubResource("status"). + Body(seed). + Do(). + Into(result) + return +} + +// Delete takes name of the seed and deletes it. Returns an error if one occurs. +func (c *seeds) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("seeds"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *seeds) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("seeds"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched seed. +func (c *seeds) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Seed, err error) { + result = &v1beta1.Seed{} + err = c.client.Patch(pt). + Resource("seeds"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/shoot.go b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/shoot.go new file mode 100644 index 000000000..451dddbc0 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1/shoot.go @@ -0,0 +1,175 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "time" + + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + scheme "github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ShootsGetter has a method to return a ShootInterface. +// A group's client should implement this interface. +type ShootsGetter interface { + Shoots(namespace string) ShootInterface +} + +// ShootInterface has methods to work with Shoot resources. +type ShootInterface interface { + Create(*v1beta1.Shoot) (*v1beta1.Shoot, error) + Update(*v1beta1.Shoot) (*v1beta1.Shoot, error) + UpdateStatus(*v1beta1.Shoot) (*v1beta1.Shoot, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Shoot, error) + List(opts v1.ListOptions) (*v1beta1.ShootList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Shoot, err error) + ShootExpansion +} + +// shoots implements ShootInterface +type shoots struct { + client rest.Interface + ns string +} + +// newShoots returns a Shoots +func newShoots(c *CoreV1beta1Client, namespace string) *shoots { + return &shoots{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the shoot, and returns the corresponding shoot object, and an error if there is any. +func (c *shoots) Get(name string, options v1.GetOptions) (result *v1beta1.Shoot, err error) { + result = &v1beta1.Shoot{} + err = c.client.Get(). + Namespace(c.ns). + Resource("shoots"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Shoots that match those selectors. +func (c *shoots) List(opts v1.ListOptions) (result *v1beta1.ShootList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.ShootList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("shoots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested shoots. +func (c *shoots) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("shoots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a shoot and creates it. Returns the server's representation of the shoot, and an error, if there is any. +func (c *shoots) Create(shoot *v1beta1.Shoot) (result *v1beta1.Shoot, err error) { + result = &v1beta1.Shoot{} + err = c.client.Post(). + Namespace(c.ns). + Resource("shoots"). + Body(shoot). + Do(). + Into(result) + return +} + +// Update takes the representation of a shoot and updates it. Returns the server's representation of the shoot, and an error, if there is any. +func (c *shoots) Update(shoot *v1beta1.Shoot) (result *v1beta1.Shoot, err error) { + result = &v1beta1.Shoot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("shoots"). + Name(shoot.Name). + Body(shoot). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *shoots) UpdateStatus(shoot *v1beta1.Shoot) (result *v1beta1.Shoot, err error) { + result = &v1beta1.Shoot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("shoots"). + Name(shoot.Name). + SubResource("status"). + Body(shoot). + Do(). + Into(result) + return +} + +// Delete takes name of the shoot and deletes it. Returns an error if one occurs. +func (c *shoots) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("shoots"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *shoots) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("shoots"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched shoot. +func (c *shoots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Shoot, err error) { + result = &v1beta1.Shoot{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("shoots"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/interface.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/interface.go index dd82d9976..81cadba50 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/interface.go +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/interface.go @@ -4,6 +4,7 @@ package core import ( v1alpha1 "github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1alpha1" + v1beta1 "github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1" internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" ) @@ -11,6 +12,8 @@ import ( type Interface interface { // V1alpha1 provides access to shared informers for resources in V1alpha1. V1alpha1() v1alpha1.Interface + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface } type group struct { @@ -28,3 +31,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (g *group) V1alpha1() v1alpha1.Interface { return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) } + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1alpha1/interface.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1alpha1/interface.go index 07e3243bf..df448a061 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1alpha1/interface.go +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1alpha1/interface.go @@ -30,6 +30,8 @@ type Interface interface { Seeds() SeedInformer // Shoots returns a ShootInformer. Shoots() ShootInformer + // ShootStates returns a ShootStateInformer. + ShootStates() ShootStateInformer } type version struct { @@ -97,3 +99,8 @@ func (v *version) Seeds() SeedInformer { func (v *version) Shoots() ShootInformer { return &shootInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// ShootStates returns a ShootStateInformer. +func (v *version) ShootStates() ShootStateInformer { + return &shootStateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1alpha1/shootstate.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1alpha1/shootstate.go new file mode 100644 index 000000000..0846527e8 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1alpha1/shootstate.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + time "time" + + corev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1" + 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" +) + +// ShootStateInformer provides access to a shared informer and lister for +// ShootStates. +type ShootStateInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ShootStateLister +} + +type shootStateInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewShootStateInformer constructs a new informer for ShootState 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 NewShootStateInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredShootStateInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredShootStateInformer constructs a new informer for ShootState 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 NewFilteredShootStateInformer(client versioned.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.CoreV1alpha1().ShootStates(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1alpha1().ShootStates(namespace).Watch(options) + }, + }, + &corev1alpha1.ShootState{}, + resyncPeriod, + indexers, + ) +} + +func (f *shootStateInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredShootStateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *shootStateInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1alpha1.ShootState{}, f.defaultInformer) +} + +func (f *shootStateInformer) Lister() v1alpha1.ShootStateLister { + return v1alpha1.NewShootStateLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/backupbucket.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/backupbucket.go new file mode 100644 index 000000000..4e71ede13 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/backupbucket.go @@ -0,0 +1,72 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// BackupBucketInformer provides access to a shared informer and lister for +// BackupBuckets. +type BackupBucketInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.BackupBucketLister +} + +type backupBucketInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewBackupBucketInformer constructs a new informer for BackupBucket 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 NewBackupBucketInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredBackupBucketInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredBackupBucketInformer constructs a new informer for BackupBucket 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 NewFilteredBackupBucketInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().BackupBuckets().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().BackupBuckets().Watch(options) + }, + }, + &corev1beta1.BackupBucket{}, + resyncPeriod, + indexers, + ) +} + +func (f *backupBucketInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredBackupBucketInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *backupBucketInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.BackupBucket{}, f.defaultInformer) +} + +func (f *backupBucketInformer) Lister() v1beta1.BackupBucketLister { + return v1beta1.NewBackupBucketLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/backupentry.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/backupentry.go new file mode 100644 index 000000000..426179be1 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/backupentry.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// BackupEntryInformer provides access to a shared informer and lister for +// BackupEntries. +type BackupEntryInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.BackupEntryLister +} + +type backupEntryInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewBackupEntryInformer constructs a new informer for BackupEntry 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 NewBackupEntryInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredBackupEntryInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredBackupEntryInformer constructs a new informer for BackupEntry 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 NewFilteredBackupEntryInformer(client versioned.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.CoreV1beta1().BackupEntries(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().BackupEntries(namespace).Watch(options) + }, + }, + &corev1beta1.BackupEntry{}, + resyncPeriod, + indexers, + ) +} + +func (f *backupEntryInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredBackupEntryInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *backupEntryInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.BackupEntry{}, f.defaultInformer) +} + +func (f *backupEntryInformer) Lister() v1beta1.BackupEntryLister { + return v1beta1.NewBackupEntryLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/cloudprofile.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/cloudprofile.go new file mode 100644 index 000000000..fc5ab6f49 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/cloudprofile.go @@ -0,0 +1,72 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// CloudProfileInformer provides access to a shared informer and lister for +// CloudProfiles. +type CloudProfileInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.CloudProfileLister +} + +type cloudProfileInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewCloudProfileInformer constructs a new informer for CloudProfile 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 NewCloudProfileInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredCloudProfileInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredCloudProfileInformer constructs a new informer for CloudProfile 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 NewFilteredCloudProfileInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().CloudProfiles().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().CloudProfiles().Watch(options) + }, + }, + &corev1beta1.CloudProfile{}, + resyncPeriod, + indexers, + ) +} + +func (f *cloudProfileInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredCloudProfileInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *cloudProfileInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.CloudProfile{}, f.defaultInformer) +} + +func (f *cloudProfileInformer) Lister() v1beta1.CloudProfileLister { + return v1beta1.NewCloudProfileLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/controllerinstallation.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/controllerinstallation.go new file mode 100644 index 000000000..ba775aa06 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/controllerinstallation.go @@ -0,0 +1,72 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// ControllerInstallationInformer provides access to a shared informer and lister for +// ControllerInstallations. +type ControllerInstallationInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ControllerInstallationLister +} + +type controllerInstallationInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewControllerInstallationInformer constructs a new informer for ControllerInstallation 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 NewControllerInstallationInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredControllerInstallationInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredControllerInstallationInformer constructs a new informer for ControllerInstallation 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 NewFilteredControllerInstallationInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().ControllerInstallations().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().ControllerInstallations().Watch(options) + }, + }, + &corev1beta1.ControllerInstallation{}, + resyncPeriod, + indexers, + ) +} + +func (f *controllerInstallationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredControllerInstallationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *controllerInstallationInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.ControllerInstallation{}, f.defaultInformer) +} + +func (f *controllerInstallationInformer) Lister() v1beta1.ControllerInstallationLister { + return v1beta1.NewControllerInstallationLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/controllerregistration.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/controllerregistration.go new file mode 100644 index 000000000..8d2a3e28b --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/controllerregistration.go @@ -0,0 +1,72 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// ControllerRegistrationInformer provides access to a shared informer and lister for +// ControllerRegistrations. +type ControllerRegistrationInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ControllerRegistrationLister +} + +type controllerRegistrationInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewControllerRegistrationInformer constructs a new informer for ControllerRegistration 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 NewControllerRegistrationInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredControllerRegistrationInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredControllerRegistrationInformer constructs a new informer for ControllerRegistration 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 NewFilteredControllerRegistrationInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().ControllerRegistrations().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().ControllerRegistrations().Watch(options) + }, + }, + &corev1beta1.ControllerRegistration{}, + resyncPeriod, + indexers, + ) +} + +func (f *controllerRegistrationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredControllerRegistrationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *controllerRegistrationInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.ControllerRegistration{}, f.defaultInformer) +} + +func (f *controllerRegistrationInformer) Lister() v1beta1.ControllerRegistrationLister { + return v1beta1.NewControllerRegistrationLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/interface.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/interface.go new file mode 100644 index 000000000..635083945 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/interface.go @@ -0,0 +1,99 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // BackupBuckets returns a BackupBucketInformer. + BackupBuckets() BackupBucketInformer + // BackupEntries returns a BackupEntryInformer. + BackupEntries() BackupEntryInformer + // CloudProfiles returns a CloudProfileInformer. + CloudProfiles() CloudProfileInformer + // ControllerInstallations returns a ControllerInstallationInformer. + ControllerInstallations() ControllerInstallationInformer + // ControllerRegistrations returns a ControllerRegistrationInformer. + ControllerRegistrations() ControllerRegistrationInformer + // Plants returns a PlantInformer. + Plants() PlantInformer + // Projects returns a ProjectInformer. + Projects() ProjectInformer + // Quotas returns a QuotaInformer. + Quotas() QuotaInformer + // SecretBindings returns a SecretBindingInformer. + SecretBindings() SecretBindingInformer + // Seeds returns a SeedInformer. + Seeds() SeedInformer + // Shoots returns a ShootInformer. + Shoots() ShootInformer +} + +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} +} + +// BackupBuckets returns a BackupBucketInformer. +func (v *version) BackupBuckets() BackupBucketInformer { + return &backupBucketInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// BackupEntries returns a BackupEntryInformer. +func (v *version) BackupEntries() BackupEntryInformer { + return &backupEntryInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// CloudProfiles returns a CloudProfileInformer. +func (v *version) CloudProfiles() CloudProfileInformer { + return &cloudProfileInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// ControllerInstallations returns a ControllerInstallationInformer. +func (v *version) ControllerInstallations() ControllerInstallationInformer { + return &controllerInstallationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// ControllerRegistrations returns a ControllerRegistrationInformer. +func (v *version) ControllerRegistrations() ControllerRegistrationInformer { + return &controllerRegistrationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// Plants returns a PlantInformer. +func (v *version) Plants() PlantInformer { + return &plantInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// Projects returns a ProjectInformer. +func (v *version) Projects() ProjectInformer { + return &projectInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// Quotas returns a QuotaInformer. +func (v *version) Quotas() QuotaInformer { + return "aInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// SecretBindings returns a SecretBindingInformer. +func (v *version) SecretBindings() SecretBindingInformer { + return &secretBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// Seeds returns a SeedInformer. +func (v *version) Seeds() SeedInformer { + return &seedInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// Shoots returns a ShootInformer. +func (v *version) Shoots() ShootInformer { + return &shootInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/plant.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/plant.go new file mode 100644 index 000000000..fcb8fe18a --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/plant.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// PlantInformer provides access to a shared informer and lister for +// Plants. +type PlantInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.PlantLister +} + +type plantInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewPlantInformer constructs a new informer for Plant 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 NewPlantInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredPlantInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredPlantInformer constructs a new informer for Plant 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 NewFilteredPlantInformer(client versioned.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.CoreV1beta1().Plants(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().Plants(namespace).Watch(options) + }, + }, + &corev1beta1.Plant{}, + resyncPeriod, + indexers, + ) +} + +func (f *plantInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredPlantInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *plantInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.Plant{}, f.defaultInformer) +} + +func (f *plantInformer) Lister() v1beta1.PlantLister { + return v1beta1.NewPlantLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/project.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/project.go new file mode 100644 index 000000000..995658411 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/project.go @@ -0,0 +1,72 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// ProjectInformer provides access to a shared informer and lister for +// Projects. +type ProjectInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ProjectLister +} + +type projectInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewProjectInformer constructs a new informer for Project 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 NewProjectInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredProjectInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredProjectInformer constructs a new informer for Project 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 NewFilteredProjectInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().Projects().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().Projects().Watch(options) + }, + }, + &corev1beta1.Project{}, + resyncPeriod, + indexers, + ) +} + +func (f *projectInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredProjectInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *projectInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.Project{}, f.defaultInformer) +} + +func (f *projectInformer) Lister() v1beta1.ProjectLister { + return v1beta1.NewProjectLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/quota.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/quota.go new file mode 100644 index 000000000..2e218d15d --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/quota.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// QuotaInformer provides access to a shared informer and lister for +// Quotas. +type QuotaInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.QuotaLister +} + +type quotaInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewQuotaInformer constructs a new informer for Quota 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 NewQuotaInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredQuotaInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredQuotaInformer constructs a new informer for Quota 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 NewFilteredQuotaInformer(client versioned.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.CoreV1beta1().Quotas(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().Quotas(namespace).Watch(options) + }, + }, + &corev1beta1.Quota{}, + resyncPeriod, + indexers, + ) +} + +func (f *quotaInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredQuotaInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *quotaInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.Quota{}, f.defaultInformer) +} + +func (f *quotaInformer) Lister() v1beta1.QuotaLister { + return v1beta1.NewQuotaLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/secretbinding.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/secretbinding.go new file mode 100644 index 000000000..0be919705 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/secretbinding.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// SecretBindingInformer provides access to a shared informer and lister for +// SecretBindings. +type SecretBindingInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.SecretBindingLister +} + +type secretBindingInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewSecretBindingInformer constructs a new informer for SecretBinding 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 NewSecretBindingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredSecretBindingInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredSecretBindingInformer constructs a new informer for SecretBinding 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 NewFilteredSecretBindingInformer(client versioned.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.CoreV1beta1().SecretBindings(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().SecretBindings(namespace).Watch(options) + }, + }, + &corev1beta1.SecretBinding{}, + resyncPeriod, + indexers, + ) +} + +func (f *secretBindingInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredSecretBindingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *secretBindingInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.SecretBinding{}, f.defaultInformer) +} + +func (f *secretBindingInformer) Lister() v1beta1.SecretBindingLister { + return v1beta1.NewSecretBindingLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/seed.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/seed.go new file mode 100644 index 000000000..efe03ca5a --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/seed.go @@ -0,0 +1,72 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// SeedInformer provides access to a shared informer and lister for +// Seeds. +type SeedInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.SeedLister +} + +type seedInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewSeedInformer constructs a new informer for Seed 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 NewSeedInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredSeedInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredSeedInformer constructs a new informer for Seed 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 NewFilteredSeedInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().Seeds().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().Seeds().Watch(options) + }, + }, + &corev1beta1.Seed{}, + resyncPeriod, + indexers, + ) +} + +func (f *seedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredSeedInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *seedInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.Seed{}, f.defaultInformer) +} + +func (f *seedInformer) Lister() v1beta1.SeedLister { + return v1beta1.NewSeedLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/shoot.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/shoot.go new file mode 100644 index 000000000..61b904a50 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1/shoot.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + corev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + versioned "github.com/gardener/gardener/pkg/client/core/clientset/versioned" + internalinterfaces "github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces" + v1beta1 "github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1" + 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" +) + +// ShootInformer provides access to a shared informer and lister for +// Shoots. +type ShootInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ShootLister +} + +type shootInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewShootInformer constructs a new informer for Shoot 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 NewShootInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredShootInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredShootInformer constructs a new informer for Shoot 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 NewFilteredShootInformer(client versioned.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.CoreV1beta1().Shoots(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoreV1beta1().Shoots(namespace).Watch(options) + }, + }, + &corev1beta1.Shoot{}, + resyncPeriod, + indexers, + ) +} + +func (f *shootInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredShootInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *shootInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&corev1beta1.Shoot{}, f.defaultInformer) +} + +func (f *shootInformer) Lister() v1beta1.ShootLister { + return v1beta1.NewShootLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/generic.go b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/generic.go index afc6c7beb..2b4153dde 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/generic.go +++ b/vendor/github.com/gardener/gardener/pkg/client/core/informers/externalversions/generic.go @@ -6,6 +6,7 @@ import ( "fmt" v1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -59,6 +60,32 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1alpha1().Seeds().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("shoots"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1alpha1().Shoots().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("shootstates"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1alpha1().ShootStates().Informer()}, nil + + // Group=core.gardener.cloud, Version=v1beta1 + case v1beta1.SchemeGroupVersion.WithResource("backupbuckets"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().BackupBuckets().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("backupentries"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().BackupEntries().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("cloudprofiles"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().CloudProfiles().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("controllerinstallations"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().ControllerInstallations().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("controllerregistrations"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().ControllerRegistrations().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("plants"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().Plants().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("projects"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().Projects().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("quotas"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().Quotas().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("secretbindings"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().SecretBindings().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("seeds"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().Seeds().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("shoots"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().Shoots().Informer()}, nil } diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1/expansion_generated.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1/expansion_generated.go index fca2006cf..2d9eaec62 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1/expansion_generated.go +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1/expansion_generated.go @@ -65,3 +65,11 @@ type ShootListerExpansion interface{} // ShootNamespaceListerExpansion allows custom methods to be added to // ShootNamespaceLister. type ShootNamespaceListerExpansion interface{} + +// ShootStateListerExpansion allows custom methods to be added to +// ShootStateLister. +type ShootStateListerExpansion interface{} + +// ShootStateNamespaceListerExpansion allows custom methods to be added to +// ShootStateNamespaceLister. +type ShootStateNamespaceListerExpansion interface{} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1/shootstate.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1/shootstate.go new file mode 100644 index 000000000..0455e49f9 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1/shootstate.go @@ -0,0 +1,78 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ShootStateLister helps list ShootStates. +type ShootStateLister interface { + // List lists all ShootStates in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.ShootState, err error) + // ShootStates returns an object that can list and get ShootStates. + ShootStates(namespace string) ShootStateNamespaceLister + ShootStateListerExpansion +} + +// shootStateLister implements the ShootStateLister interface. +type shootStateLister struct { + indexer cache.Indexer +} + +// NewShootStateLister returns a new ShootStateLister. +func NewShootStateLister(indexer cache.Indexer) ShootStateLister { + return &shootStateLister{indexer: indexer} +} + +// List lists all ShootStates in the indexer. +func (s *shootStateLister) List(selector labels.Selector) (ret []*v1alpha1.ShootState, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ShootState)) + }) + return ret, err +} + +// ShootStates returns an object that can list and get ShootStates. +func (s *shootStateLister) ShootStates(namespace string) ShootStateNamespaceLister { + return shootStateNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ShootStateNamespaceLister helps list and get ShootStates. +type ShootStateNamespaceLister interface { + // List lists all ShootStates in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.ShootState, err error) + // Get retrieves the ShootState from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.ShootState, error) + ShootStateNamespaceListerExpansion +} + +// shootStateNamespaceLister implements the ShootStateNamespaceLister +// interface. +type shootStateNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ShootStates in the indexer for a given namespace. +func (s shootStateNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ShootState, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ShootState)) + }) + return ret, err +} + +// Get retrieves the ShootState from the indexer for a given namespace and name. +func (s shootStateNamespaceLister) Get(name string) (*v1alpha1.ShootState, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("shootstate"), name) + } + return obj.(*v1alpha1.ShootState), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupbucket.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupbucket.go new file mode 100644 index 000000000..224b56e33 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupbucket.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// BackupBucketLister helps list BackupBuckets. +type BackupBucketLister interface { + // List lists all BackupBuckets in the indexer. + List(selector labels.Selector) (ret []*v1beta1.BackupBucket, err error) + // Get retrieves the BackupBucket from the index for a given name. + Get(name string) (*v1beta1.BackupBucket, error) + BackupBucketListerExpansion +} + +// backupBucketLister implements the BackupBucketLister interface. +type backupBucketLister struct { + indexer cache.Indexer +} + +// NewBackupBucketLister returns a new BackupBucketLister. +func NewBackupBucketLister(indexer cache.Indexer) BackupBucketLister { + return &backupBucketLister{indexer: indexer} +} + +// List lists all BackupBuckets in the indexer. +func (s *backupBucketLister) List(selector labels.Selector) (ret []*v1beta1.BackupBucket, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.BackupBucket)) + }) + return ret, err +} + +// Get retrieves the BackupBucket from the index for a given name. +func (s *backupBucketLister) Get(name string) (*v1beta1.BackupBucket, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("backupbucket"), name) + } + return obj.(*v1beta1.BackupBucket), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupentry.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupentry.go new file mode 100644 index 000000000..a830aebf5 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/backupentry.go @@ -0,0 +1,78 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// BackupEntryLister helps list BackupEntries. +type BackupEntryLister interface { + // List lists all BackupEntries in the indexer. + List(selector labels.Selector) (ret []*v1beta1.BackupEntry, err error) + // BackupEntries returns an object that can list and get BackupEntries. + BackupEntries(namespace string) BackupEntryNamespaceLister + BackupEntryListerExpansion +} + +// backupEntryLister implements the BackupEntryLister interface. +type backupEntryLister struct { + indexer cache.Indexer +} + +// NewBackupEntryLister returns a new BackupEntryLister. +func NewBackupEntryLister(indexer cache.Indexer) BackupEntryLister { + return &backupEntryLister{indexer: indexer} +} + +// List lists all BackupEntries in the indexer. +func (s *backupEntryLister) List(selector labels.Selector) (ret []*v1beta1.BackupEntry, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.BackupEntry)) + }) + return ret, err +} + +// BackupEntries returns an object that can list and get BackupEntries. +func (s *backupEntryLister) BackupEntries(namespace string) BackupEntryNamespaceLister { + return backupEntryNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// BackupEntryNamespaceLister helps list and get BackupEntries. +type BackupEntryNamespaceLister interface { + // List lists all BackupEntries in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.BackupEntry, err error) + // Get retrieves the BackupEntry from the indexer for a given namespace and name. + Get(name string) (*v1beta1.BackupEntry, error) + BackupEntryNamespaceListerExpansion +} + +// backupEntryNamespaceLister implements the BackupEntryNamespaceLister +// interface. +type backupEntryNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all BackupEntries in the indexer for a given namespace. +func (s backupEntryNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.BackupEntry, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.BackupEntry)) + }) + return ret, err +} + +// Get retrieves the BackupEntry from the indexer for a given namespace and name. +func (s backupEntryNamespaceLister) Get(name string) (*v1beta1.BackupEntry, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("backupentry"), name) + } + return obj.(*v1beta1.BackupEntry), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/cloudprofile.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/cloudprofile.go new file mode 100644 index 000000000..36599efd0 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/cloudprofile.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// CloudProfileLister helps list CloudProfiles. +type CloudProfileLister interface { + // List lists all CloudProfiles in the indexer. + List(selector labels.Selector) (ret []*v1beta1.CloudProfile, err error) + // Get retrieves the CloudProfile from the index for a given name. + Get(name string) (*v1beta1.CloudProfile, error) + CloudProfileListerExpansion +} + +// cloudProfileLister implements the CloudProfileLister interface. +type cloudProfileLister struct { + indexer cache.Indexer +} + +// NewCloudProfileLister returns a new CloudProfileLister. +func NewCloudProfileLister(indexer cache.Indexer) CloudProfileLister { + return &cloudProfileLister{indexer: indexer} +} + +// List lists all CloudProfiles in the indexer. +func (s *cloudProfileLister) List(selector labels.Selector) (ret []*v1beta1.CloudProfile, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.CloudProfile)) + }) + return ret, err +} + +// Get retrieves the CloudProfile from the index for a given name. +func (s *cloudProfileLister) Get(name string) (*v1beta1.CloudProfile, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("cloudprofile"), name) + } + return obj.(*v1beta1.CloudProfile), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerinstallation.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerinstallation.go new file mode 100644 index 000000000..6d4c367ec --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerinstallation.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ControllerInstallationLister helps list ControllerInstallations. +type ControllerInstallationLister interface { + // List lists all ControllerInstallations in the indexer. + List(selector labels.Selector) (ret []*v1beta1.ControllerInstallation, err error) + // Get retrieves the ControllerInstallation from the index for a given name. + Get(name string) (*v1beta1.ControllerInstallation, error) + ControllerInstallationListerExpansion +} + +// controllerInstallationLister implements the ControllerInstallationLister interface. +type controllerInstallationLister struct { + indexer cache.Indexer +} + +// NewControllerInstallationLister returns a new ControllerInstallationLister. +func NewControllerInstallationLister(indexer cache.Indexer) ControllerInstallationLister { + return &controllerInstallationLister{indexer: indexer} +} + +// List lists all ControllerInstallations in the indexer. +func (s *controllerInstallationLister) List(selector labels.Selector) (ret []*v1beta1.ControllerInstallation, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ControllerInstallation)) + }) + return ret, err +} + +// Get retrieves the ControllerInstallation from the index for a given name. +func (s *controllerInstallationLister) Get(name string) (*v1beta1.ControllerInstallation, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("controllerinstallation"), name) + } + return obj.(*v1beta1.ControllerInstallation), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerregistration.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerregistration.go new file mode 100644 index 000000000..b3bc7ea3a --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/controllerregistration.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ControllerRegistrationLister helps list ControllerRegistrations. +type ControllerRegistrationLister interface { + // List lists all ControllerRegistrations in the indexer. + List(selector labels.Selector) (ret []*v1beta1.ControllerRegistration, err error) + // Get retrieves the ControllerRegistration from the index for a given name. + Get(name string) (*v1beta1.ControllerRegistration, error) + ControllerRegistrationListerExpansion +} + +// controllerRegistrationLister implements the ControllerRegistrationLister interface. +type controllerRegistrationLister struct { + indexer cache.Indexer +} + +// NewControllerRegistrationLister returns a new ControllerRegistrationLister. +func NewControllerRegistrationLister(indexer cache.Indexer) ControllerRegistrationLister { + return &controllerRegistrationLister{indexer: indexer} +} + +// List lists all ControllerRegistrations in the indexer. +func (s *controllerRegistrationLister) List(selector labels.Selector) (ret []*v1beta1.ControllerRegistration, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ControllerRegistration)) + }) + return ret, err +} + +// Get retrieves the ControllerRegistration from the index for a given name. +func (s *controllerRegistrationLister) Get(name string) (*v1beta1.ControllerRegistration, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("controllerregistration"), name) + } + return obj.(*v1beta1.ControllerRegistration), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/expansion_generated.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/expansion_generated.go new file mode 100644 index 000000000..0535c71d1 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/expansion_generated.go @@ -0,0 +1,67 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +// BackupBucketListerExpansion allows custom methods to be added to +// BackupBucketLister. +type BackupBucketListerExpansion interface{} + +// BackupEntryListerExpansion allows custom methods to be added to +// BackupEntryLister. +type BackupEntryListerExpansion interface{} + +// BackupEntryNamespaceListerExpansion allows custom methods to be added to +// BackupEntryNamespaceLister. +type BackupEntryNamespaceListerExpansion interface{} + +// CloudProfileListerExpansion allows custom methods to be added to +// CloudProfileLister. +type CloudProfileListerExpansion interface{} + +// ControllerInstallationListerExpansion allows custom methods to be added to +// ControllerInstallationLister. +type ControllerInstallationListerExpansion interface{} + +// ControllerRegistrationListerExpansion allows custom methods to be added to +// ControllerRegistrationLister. +type ControllerRegistrationListerExpansion interface{} + +// PlantListerExpansion allows custom methods to be added to +// PlantLister. +type PlantListerExpansion interface{} + +// PlantNamespaceListerExpansion allows custom methods to be added to +// PlantNamespaceLister. +type PlantNamespaceListerExpansion interface{} + +// ProjectListerExpansion allows custom methods to be added to +// ProjectLister. +type ProjectListerExpansion interface{} + +// QuotaListerExpansion allows custom methods to be added to +// QuotaLister. +type QuotaListerExpansion interface{} + +// QuotaNamespaceListerExpansion allows custom methods to be added to +// QuotaNamespaceLister. +type QuotaNamespaceListerExpansion interface{} + +// SecretBindingListerExpansion allows custom methods to be added to +// SecretBindingLister. +type SecretBindingListerExpansion interface{} + +// SecretBindingNamespaceListerExpansion allows custom methods to be added to +// SecretBindingNamespaceLister. +type SecretBindingNamespaceListerExpansion interface{} + +// SeedListerExpansion allows custom methods to be added to +// SeedLister. +type SeedListerExpansion interface{} + +// ShootListerExpansion allows custom methods to be added to +// ShootLister. +type ShootListerExpansion interface{} + +// ShootNamespaceListerExpansion allows custom methods to be added to +// ShootNamespaceLister. +type ShootNamespaceListerExpansion interface{} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/plant.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/plant.go new file mode 100644 index 000000000..304b8c0a1 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/plant.go @@ -0,0 +1,78 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// PlantLister helps list Plants. +type PlantLister interface { + // List lists all Plants in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Plant, err error) + // Plants returns an object that can list and get Plants. + Plants(namespace string) PlantNamespaceLister + PlantListerExpansion +} + +// plantLister implements the PlantLister interface. +type plantLister struct { + indexer cache.Indexer +} + +// NewPlantLister returns a new PlantLister. +func NewPlantLister(indexer cache.Indexer) PlantLister { + return &plantLister{indexer: indexer} +} + +// List lists all Plants in the indexer. +func (s *plantLister) List(selector labels.Selector) (ret []*v1beta1.Plant, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Plant)) + }) + return ret, err +} + +// Plants returns an object that can list and get Plants. +func (s *plantLister) Plants(namespace string) PlantNamespaceLister { + return plantNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// PlantNamespaceLister helps list and get Plants. +type PlantNamespaceLister interface { + // List lists all Plants in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.Plant, err error) + // Get retrieves the Plant from the indexer for a given namespace and name. + Get(name string) (*v1beta1.Plant, error) + PlantNamespaceListerExpansion +} + +// plantNamespaceLister implements the PlantNamespaceLister +// interface. +type plantNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Plants in the indexer for a given namespace. +func (s plantNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Plant, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Plant)) + }) + return ret, err +} + +// Get retrieves the Plant from the indexer for a given namespace and name. +func (s plantNamespaceLister) Get(name string) (*v1beta1.Plant, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("plant"), name) + } + return obj.(*v1beta1.Plant), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/project.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/project.go new file mode 100644 index 000000000..0abba5634 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/project.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ProjectLister helps list Projects. +type ProjectLister interface { + // List lists all Projects in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Project, err error) + // Get retrieves the Project from the index for a given name. + Get(name string) (*v1beta1.Project, error) + ProjectListerExpansion +} + +// projectLister implements the ProjectLister interface. +type projectLister struct { + indexer cache.Indexer +} + +// NewProjectLister returns a new ProjectLister. +func NewProjectLister(indexer cache.Indexer) ProjectLister { + return &projectLister{indexer: indexer} +} + +// List lists all Projects in the indexer. +func (s *projectLister) List(selector labels.Selector) (ret []*v1beta1.Project, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Project)) + }) + return ret, err +} + +// Get retrieves the Project from the index for a given name. +func (s *projectLister) Get(name string) (*v1beta1.Project, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("project"), name) + } + return obj.(*v1beta1.Project), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/quota.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/quota.go new file mode 100644 index 000000000..56405b902 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/quota.go @@ -0,0 +1,78 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// QuotaLister helps list Quotas. +type QuotaLister interface { + // List lists all Quotas in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Quota, err error) + // Quotas returns an object that can list and get Quotas. + Quotas(namespace string) QuotaNamespaceLister + QuotaListerExpansion +} + +// quotaLister implements the QuotaLister interface. +type quotaLister struct { + indexer cache.Indexer +} + +// NewQuotaLister returns a new QuotaLister. +func NewQuotaLister(indexer cache.Indexer) QuotaLister { + return "aLister{indexer: indexer} +} + +// List lists all Quotas in the indexer. +func (s *quotaLister) List(selector labels.Selector) (ret []*v1beta1.Quota, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Quota)) + }) + return ret, err +} + +// Quotas returns an object that can list and get Quotas. +func (s *quotaLister) Quotas(namespace string) QuotaNamespaceLister { + return quotaNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// QuotaNamespaceLister helps list and get Quotas. +type QuotaNamespaceLister interface { + // List lists all Quotas in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.Quota, err error) + // Get retrieves the Quota from the indexer for a given namespace and name. + Get(name string) (*v1beta1.Quota, error) + QuotaNamespaceListerExpansion +} + +// quotaNamespaceLister implements the QuotaNamespaceLister +// interface. +type quotaNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Quotas in the indexer for a given namespace. +func (s quotaNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Quota, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Quota)) + }) + return ret, err +} + +// Get retrieves the Quota from the indexer for a given namespace and name. +func (s quotaNamespaceLister) Get(name string) (*v1beta1.Quota, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("quota"), name) + } + return obj.(*v1beta1.Quota), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/secretbinding.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/secretbinding.go new file mode 100644 index 000000000..523f62247 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/secretbinding.go @@ -0,0 +1,78 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// SecretBindingLister helps list SecretBindings. +type SecretBindingLister interface { + // List lists all SecretBindings in the indexer. + List(selector labels.Selector) (ret []*v1beta1.SecretBinding, err error) + // SecretBindings returns an object that can list and get SecretBindings. + SecretBindings(namespace string) SecretBindingNamespaceLister + SecretBindingListerExpansion +} + +// secretBindingLister implements the SecretBindingLister interface. +type secretBindingLister struct { + indexer cache.Indexer +} + +// NewSecretBindingLister returns a new SecretBindingLister. +func NewSecretBindingLister(indexer cache.Indexer) SecretBindingLister { + return &secretBindingLister{indexer: indexer} +} + +// List lists all SecretBindings in the indexer. +func (s *secretBindingLister) List(selector labels.Selector) (ret []*v1beta1.SecretBinding, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.SecretBinding)) + }) + return ret, err +} + +// SecretBindings returns an object that can list and get SecretBindings. +func (s *secretBindingLister) SecretBindings(namespace string) SecretBindingNamespaceLister { + return secretBindingNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// SecretBindingNamespaceLister helps list and get SecretBindings. +type SecretBindingNamespaceLister interface { + // List lists all SecretBindings in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.SecretBinding, err error) + // Get retrieves the SecretBinding from the indexer for a given namespace and name. + Get(name string) (*v1beta1.SecretBinding, error) + SecretBindingNamespaceListerExpansion +} + +// secretBindingNamespaceLister implements the SecretBindingNamespaceLister +// interface. +type secretBindingNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all SecretBindings in the indexer for a given namespace. +func (s secretBindingNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.SecretBinding, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.SecretBinding)) + }) + return ret, err +} + +// Get retrieves the SecretBinding from the indexer for a given namespace and name. +func (s secretBindingNamespaceLister) Get(name string) (*v1beta1.SecretBinding, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("secretbinding"), name) + } + return obj.(*v1beta1.SecretBinding), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/seed.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/seed.go new file mode 100644 index 000000000..90013253b --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/seed.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// SeedLister helps list Seeds. +type SeedLister interface { + // List lists all Seeds in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Seed, err error) + // Get retrieves the Seed from the index for a given name. + Get(name string) (*v1beta1.Seed, error) + SeedListerExpansion +} + +// seedLister implements the SeedLister interface. +type seedLister struct { + indexer cache.Indexer +} + +// NewSeedLister returns a new SeedLister. +func NewSeedLister(indexer cache.Indexer) SeedLister { + return &seedLister{indexer: indexer} +} + +// List lists all Seeds in the indexer. +func (s *seedLister) List(selector labels.Selector) (ret []*v1beta1.Seed, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Seed)) + }) + return ret, err +} + +// Get retrieves the Seed from the index for a given name. +func (s *seedLister) Get(name string) (*v1beta1.Seed, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("seed"), name) + } + return obj.(*v1beta1.Seed), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/shoot.go b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/shoot.go new file mode 100644 index 000000000..d06a54ce0 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1/shoot.go @@ -0,0 +1,78 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ShootLister helps list Shoots. +type ShootLister interface { + // List lists all Shoots in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Shoot, err error) + // Shoots returns an object that can list and get Shoots. + Shoots(namespace string) ShootNamespaceLister + ShootListerExpansion +} + +// shootLister implements the ShootLister interface. +type shootLister struct { + indexer cache.Indexer +} + +// NewShootLister returns a new ShootLister. +func NewShootLister(indexer cache.Indexer) ShootLister { + return &shootLister{indexer: indexer} +} + +// List lists all Shoots in the indexer. +func (s *shootLister) List(selector labels.Selector) (ret []*v1beta1.Shoot, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Shoot)) + }) + return ret, err +} + +// Shoots returns an object that can list and get Shoots. +func (s *shootLister) Shoots(namespace string) ShootNamespaceLister { + return shootNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ShootNamespaceLister helps list and get Shoots. +type ShootNamespaceLister interface { + // List lists all Shoots in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.Shoot, err error) + // Get retrieves the Shoot from the indexer for a given namespace and name. + Get(name string) (*v1beta1.Shoot, error) + ShootNamespaceListerExpansion +} + +// shootNamespaceLister implements the ShootNamespaceLister +// interface. +type shootNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Shoots in the indexer for a given namespace. +func (s shootNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Shoot, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Shoot)) + }) + return ret, err +} + +// Get retrieves the Shoot from the indexer for a given namespace and name. +func (s shootNamespaceLister) Get(name string) (*v1beta1.Shoot, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("shoot"), name) + } + return obj.(*v1beta1.Shoot), nil +} diff --git a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/client.go b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/client.go index c43c377fb..ae89c1aa0 100644 --- a/vendor/github.com/gardener/gardener/pkg/client/kubernetes/client.go +++ b/vendor/github.com/gardener/gardener/pkg/client/kubernetes/client.go @@ -30,6 +30,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + componentbaseconfig "k8s.io/component-base/config" apiserviceclientset "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -52,13 +53,7 @@ func NewRuntimeClientFromBytes(kubeconfig []byte, fns ...ConfigFunc) (client.Cli return nil, err } - // Validate that the given kubeconfig doesn't have fields in its auth-info that are - // not acceptable. - rawConfig, err := clientConfig.RawConfig() - if err != nil { - return nil, err - } - if err := ValidateClientConfig(rawConfig); err != nil { + if err := validateClientConfig(clientConfig); err != nil { return nil, err } @@ -89,10 +84,11 @@ func NewRuntimeClientForConfig(fns ...ConfigFunc) (client.Client, error) { func NewClientFromFile(masterURL, kubeconfigPath string, fns ...ConfigFunc) (Interface, error) { if kubeconfigPath == "" && masterURL == "" { kubeconfig, err := rest.InClusterConfig() - if err == nil { - opts := append([]ConfigFunc{WithRESTConfig(kubeconfig)}, fns...) - return NewWithConfig(opts...) + if err != nil { + return nil, err } + opts := append([]ConfigFunc{WithRESTConfig(kubeconfig)}, fns...) + return NewWithConfig(opts...) } clientConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig( @@ -100,13 +96,7 @@ func NewClientFromFile(masterURL, kubeconfigPath string, fns ...ConfigFunc) (Int &clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterURL}}, ) - // Validate that the given kubeconfig doesn't have fields in its auth-info that are - // not acceptable. - rawConfig, err := clientConfig.RawConfig() - if err != nil { - return nil, err - } - if err := ValidateClientConfig(rawConfig); err != nil { + if err := validateClientConfig(clientConfig); err != nil { return nil, err } @@ -121,22 +111,7 @@ func NewClientFromFile(masterURL, kubeconfigPath string, fns ...ConfigFunc) (Int // NewClientFromBytes creates a new Client struct for a given kubeconfig byte slice. func NewClientFromBytes(kubeconfig []byte, fns ...ConfigFunc) (Interface, error) { - clientConfig, err := clientcmd.NewClientConfigFromBytes(kubeconfig) - if err != nil { - return nil, err - } - - // Validate that the given kubeconfig doesn't have fields in its auth-info that are - // not acceptable. - rawConfig, err := clientConfig.RawConfig() - if err != nil { - return nil, err - } - if err := ValidateClientConfig(rawConfig); err != nil { - return nil, err - } - - config, err := clientConfig.ClientConfig() + config, err := RESTConfigFromClientConnectionConfiguration(nil, kubeconfig) if err != nil { return nil, err } @@ -166,8 +141,63 @@ func NewClientFromSecretObject(secret *corev1.Secret, fns ...ConfigFunc) (Interf return nil, errors.New("the secret does not contain a field with name 'kubeconfig'") } -// ValidateClientConfig validates that the auth info of a given kubeconfig doesn't have unsupported fields. -func ValidateClientConfig(config clientcmdapi.Config) error { +// RESTConfigFromClientConnectionConfiguration creates a *rest.Config from a componentbaseconfig.ClientConnectionConfiguration & the configured kubeconfig +func RESTConfigFromClientConnectionConfiguration(cfg *componentbaseconfig.ClientConnectionConfiguration, kubeconfig []byte) (*rest.Config, error) { + var ( + restConfig *rest.Config + err error + ) + + if kubeconfig == nil { + clientConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig( + &clientcmd.ClientConfigLoadingRules{ExplicitPath: cfg.Kubeconfig}, + &clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: ""}}, + ) + + if err := validateClientConfig(clientConfig); err != nil { + return nil, err + } + + restConfig, err = clientConfig.ClientConfig() + if err != nil { + return nil, err + } + } else { + clientConfig, err := clientcmd.NewClientConfigFromBytes(kubeconfig) + if err != nil { + return nil, err + } + + if err := validateClientConfig(clientConfig); err != nil { + return nil, err + } + + restConfig, err = clientConfig.ClientConfig() + if err != nil { + return nil, err + } + } + + if cfg != nil { + restConfig.Burst = int(cfg.Burst) + restConfig.QPS = cfg.QPS + restConfig.AcceptContentTypes = cfg.AcceptContentTypes + restConfig.ContentType = cfg.ContentType + } + + return restConfig, nil +} + +func validateClientConfig(clientConfig clientcmd.ClientConfig) error { + rawConfig, err := clientConfig.RawConfig() + if err != nil { + return err + } + return ValidateConfig(rawConfig) +} + +// ValidateConfig validates that the auth info of a given kubeconfig doesn't have unsupported fields. +func ValidateConfig(config clientcmdapi.Config) error { validFields := []string{"client-certificate-data", "client-key-data", "token", "username", "password"} for user, authInfo := range config.AuthInfos { @@ -198,6 +228,7 @@ var supportedKubernetesVersions = []string{ "1.14", "1.15", "1.16", + "1.17", } func checkIfSupportedKubernetesVersion(gitVersion string) error { diff --git a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/associations.go b/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/associations.go deleted file mode 100644 index 707d62ade..000000000 --- a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/associations.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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 utils - -import ( - "context" - "fmt" - - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - gardencorelisters "github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1" - "github.com/gardener/gardener/pkg/logger" - - "k8s.io/apimachinery/pkg/labels" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -// DetermineShootAssociations gets a to determine the Shoots resources which are associated -// to given (either a CloudProfile a or a Seed object). -func DetermineShootAssociations(obj interface{}, shootLister gardencorelisters.ShootLister) ([]string, error) { - var associatedShoots []string - shoots, err := shootLister.List(labels.Everything()) - if err != nil { - logger.Logger.Info(err.Error()) - return nil, err - } - - for _, shoot := range shoots { - switch t := obj.(type) { - case *gardencorev1alpha1.CloudProfile: - cloudProfile := obj.(*gardencorev1alpha1.CloudProfile) - if shoot.Spec.CloudProfileName == cloudProfile.Name { - associatedShoots = append(associatedShoots, fmt.Sprintf("%s/%s", shoot.Namespace, shoot.Name)) - } - case *gardencorev1alpha1.Seed: - seed := obj.(*gardencorev1alpha1.Seed) - if shoot.Spec.SeedName != nil && *shoot.Spec.SeedName == seed.Name { - associatedShoots = append(associatedShoots, fmt.Sprintf("%s/%s", shoot.Namespace, shoot.Name)) - } - case *gardencorev1alpha1.SecretBinding: - binding := obj.(*gardencorev1alpha1.SecretBinding) - if shoot.Spec.SecretBindingName == binding.Name && shoot.Namespace == binding.Namespace { - associatedShoots = append(associatedShoots, fmt.Sprintf("%s/%s", shoot.Namespace, shoot.Name)) - } - default: - return nil, fmt.Errorf("Unable to determine Shoot associations, due to unknown type %t", t) - } - } - return associatedShoots, nil -} - -// DetermineSecretBindingAssociations gets a to determine the SecretBinding -// resources which are associated to given Quota . -func DetermineSecretBindingAssociations(quota *gardencorev1alpha1.Quota, bindingLister gardencorelisters.SecretBindingLister) ([]string, error) { - var associatedBindings []string - bindings, err := bindingLister.List(labels.Everything()) - if err != nil { - return nil, err - } - - for _, binding := range bindings { - for _, quotaRef := range binding.Quotas { - if quotaRef.Name == quota.Name && quotaRef.Namespace == quota.Namespace { - associatedBindings = append(associatedBindings, fmt.Sprintf("%s/%s", binding.Namespace, binding.Name)) - } - } - } - return associatedBindings, nil -} - -// DetermineBackupBucketAssociations determine the BackupBucket resources which are associated -// to seed with name -func DetermineBackupBucketAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error) { - var ( - associatedBackupBuckets []string - backupBuckets = &gardencorev1alpha1.BackupBucketList{} - ) - - if err := c.List(ctx, backupBuckets); err != nil { - return nil, err - } - - for _, backupBucket := range backupBuckets.Items { - if backupBucket.Spec.Seed != nil && *backupBucket.Spec.Seed == seedName { - associatedBackupBuckets = append(associatedBackupBuckets, backupBucket.Name) - } - } - return associatedBackupBuckets, nil -} diff --git a/vendor/github.com/gardener/gardener/pkg/controllerutils/associations.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/associations.go new file mode 100644 index 000000000..3d3ba33dd --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/associations.go @@ -0,0 +1,163 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 controllerutils + +import ( + "context" + "fmt" + + gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorelisters "github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1" + "github.com/gardener/gardener/pkg/logger" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// DetermineShootsAssociatedTo gets a to determine the Shoots resources which are associated +// to given (either a CloudProfile a or a Seed object). +func DetermineShootsAssociatedTo(obj interface{}, shootLister gardencorelisters.ShootLister) ([]string, error) { + var associatedShoots []string + shoots, err := shootLister.List(labels.Everything()) + if err != nil { + logger.Logger.Info(err.Error()) + return nil, err + } + + for _, shoot := range shoots { + switch t := obj.(type) { + case *gardencorev1alpha1.CloudProfile: + cloudProfile := obj.(*gardencorev1alpha1.CloudProfile) + if shoot.Spec.CloudProfileName == cloudProfile.Name { + associatedShoots = append(associatedShoots, fmt.Sprintf("%s/%s", shoot.Namespace, shoot.Name)) + } + case *gardencorev1alpha1.Seed: + seed := obj.(*gardencorev1alpha1.Seed) + if shoot.Spec.SeedName != nil && *shoot.Spec.SeedName == seed.Name { + associatedShoots = append(associatedShoots, fmt.Sprintf("%s/%s", shoot.Namespace, shoot.Name)) + } + case *gardencorev1alpha1.SecretBinding: + binding := obj.(*gardencorev1alpha1.SecretBinding) + if shoot.Spec.SecretBindingName == binding.Name && shoot.Namespace == binding.Namespace { + associatedShoots = append(associatedShoots, fmt.Sprintf("%s/%s", shoot.Namespace, shoot.Name)) + } + default: + return nil, fmt.Errorf("Unable to determine Shoot associations, due to unknown type %t", t) + } + } + return associatedShoots, nil +} + +// DetermineSecretBindingAssociations gets a to determine the SecretBinding +// resources which are associated to given Quota . +func DetermineSecretBindingAssociations(quota *gardencorev1alpha1.Quota, bindingLister gardencorelisters.SecretBindingLister) ([]string, error) { + var associatedBindings []string + bindings, err := bindingLister.List(labels.Everything()) + if err != nil { + return nil, err + } + + for _, binding := range bindings { + for _, quotaRef := range binding.Quotas { + if quotaRef.Name == quota.Name && quotaRef.Namespace == quota.Namespace { + associatedBindings = append(associatedBindings, fmt.Sprintf("%s/%s", binding.Namespace, binding.Name)) + } + } + } + return associatedBindings, nil +} + +// DetermineBackupBucketAssociations determine the BackupBucket resources which are associated +// to seed with name +func DetermineBackupBucketAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error) { + return determineAssociations(ctx, c, seedName, &gardencorev1alpha1.BackupBucketList{}, func(o runtime.Object) (string, error) { + backupBucket, ok := o.(*gardencorev1alpha1.BackupBucket) + if !ok { + return "", fmt.Errorf("got unexpected object when expecting BackupBucket") + } + if backupBucket.Spec.Seed == nil { + return "", nil + } + return *backupBucket.Spec.Seed, nil + }) +} + +// DetermineBackupEntryAssociations determine the BackupEntry resources which are associated +// to seed with name +func DetermineBackupEntryAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error) { + return determineAssociations(ctx, c, seedName, &gardencorev1alpha1.BackupEntryList{}, func(o runtime.Object) (string, error) { + backupEntry, ok := o.(*gardencorev1alpha1.BackupEntry) + if !ok { + return "", fmt.Errorf("got unexpected object when expecting BackupEntry") + } + if backupEntry.Spec.Seed == nil { + return "", nil + } + return *backupEntry.Spec.Seed, nil + }) +} + +// DetermineControllerInstallationAssociations determine the ControllerInstallation resources which are associated +// to seed with name +func DetermineControllerInstallationAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error) { + return determineAssociations(ctx, c, seedName, &gardencorev1alpha1.ControllerInstallationList{}, func(o runtime.Object) (string, error) { + controllerInstallation, ok := o.(*gardencorev1alpha1.ControllerInstallation) + if !ok { + return "", fmt.Errorf("got unexpected object when expecting ControllerInstallation") + } + return controllerInstallation.Spec.SeedRef.Name, nil + }) +} + +// DetermineShootAssociations determine the Shoot resources which are associated +// to seed with name +func DetermineShootAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error) { + return determineAssociations(ctx, c, seedName, &gardencorev1alpha1.ShootList{}, func(o runtime.Object) (string, error) { + shoot, ok := o.(*gardencorev1alpha1.Shoot) + if !ok { + return "", fmt.Errorf("got unexpected object when expecting Shoot") + } + if shoot.Spec.SeedName == nil { + return "", nil + } + return *shoot.Spec.SeedName, nil + }) +} + +func determineAssociations(ctx context.Context, c client.Client, seedName string, listObj runtime.Object, seedNameFunc func(runtime.Object) (string, error)) ([]string, error) { + if err := c.List(ctx, listObj); err != nil { + return nil, err + } + + var associations []string + err := meta.EachListItem(listObj, func(obj runtime.Object) error { + name, err := seedNameFunc(obj) + if err != nil { + return err + } + + if name == seedName { + accessor, err := meta.Accessor(obj) + if err != nil { + return err + } + associations = append(associations, accessor.GetName()) + } + return nil + }) + return associations, err +} diff --git a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/finalizers.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/finalizers.go similarity index 99% rename from vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/finalizers.go rename to vendor/github.com/gardener/gardener/pkg/controllerutils/finalizers.go index 36ae6c93a..1a42e26ce 100644 --- a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/finalizers.go +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/finalizers.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package utils +package controllerutils import ( "context" diff --git a/vendor/github.com/gardener/gardener/pkg/controllermanager/metrics/controller_manager.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/metrics/controller.go similarity index 78% rename from vendor/github.com/gardener/gardener/pkg/controllermanager/metrics/controller_manager.go rename to vendor/github.com/gardener/gardener/pkg/controllerutils/metrics/controller.go index 8b2fe9787..387300720 100644 --- a/vendor/github.com/gardener/gardener/pkg/controllermanager/metrics/controller_manager.go +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/metrics/controller.go @@ -21,32 +21,36 @@ import ( var ( collector controllerCollector metricsInitialized bool +) - // ControllerWorkerSum is a metric descriptor which collects the current amount of workers per controller. - ControllerWorkerSum = prometheus.NewDesc("garden_cm_worker_amount", "Count of currently running controller workers", []string{"controller"}, nil) +// NewMetricDescriptor returns a new metric descriptor. +func NewMetricDescriptor(name, description string) *prometheus.Desc { + return prometheus.NewDesc(name, description, []string{"controller"}, nil) +} - // ScrapeFailures is a metric descriptor which counts the amount scrape issues grouped by kind. - ScrapeFailures = prometheus.NewCounterVec(prometheus.CounterOpts{ - Name: "garden_scrape_failure_total", - Help: "Total count of scraping failures, grouped by kind/group of metric(s)", +// NewCounterVec returns a new counter vector. +func NewCounterVec(name, help string) *prometheus.CounterVec { + return prometheus.NewCounterVec(prometheus.CounterOpts{ + Name: name, + Help: help, }, []string{"kind"}) -) +} // RegisterControllerMetrics initializes the collection of Controller related metrics. // This function ensures to run only once for avoiding multiple controller registration. -func RegisterControllerMetrics(controllers ...ControllerMetricsCollector) { +func RegisterControllerMetrics(metricsDesc *prometheus.Desc, scrapeFailureMetric *prometheus.CounterVec, controllers ...ControllerMetricsCollector) { if metricsInitialized { panic("Controller Manager metrics are already initialized") } // Register scrape failure metric. - prometheus.MustRegister(ScrapeFailures) + prometheus.MustRegister(scrapeFailureMetric) // Create a controllerCollector, pass the metrics descriptors for metrics which should be registered // and the collectors which should collect the metrics. At the end register the collector. collector = controllerCollector{ controllers: controllers, - metricDescs: []*prometheus.Desc{ControllerWorkerSum}, + metricDescs: []*prometheus.Desc{metricsDesc}, } prometheus.MustRegister(collector) @@ -68,7 +72,7 @@ type controllerCollector struct { // Describe is required to implement by the prometheus.Collector interface // which is used to implement a Prometheus collector. Describe will be invoked -// when the collctor gets registered and is used to register metric descriptors +// when the collector gets registered and is used to register metric descriptors // for the metrics which should be collected by the collector. func (c controllerCollector) Describe(ch chan<- *prometheus.Desc) { for _, desc := range c.metricDescs { diff --git a/vendor/github.com/gardener/gardener/pkg/controllermanager/metrics/workqueue.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/metrics/workqueue.go similarity index 99% rename from vendor/github.com/gardener/gardener/pkg/controllermanager/metrics/workqueue.go rename to vendor/github.com/gardener/gardener/pkg/controllerutils/metrics/workqueue.go index 12db5e38c..6c027c9e5 100644 --- a/vendor/github.com/gardener/gardener/pkg/controllermanager/metrics/workqueue.go +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/metrics/workqueue.go @@ -16,7 +16,6 @@ package metrics import ( "github.com/prometheus/client_golang/prometheus" - "k8s.io/client-go/util/workqueue" ) diff --git a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/miscelleneous.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/miscelleneous.go similarity index 98% rename from vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/miscelleneous.go rename to vendor/github.com/gardener/gardener/pkg/controllerutils/miscelleneous.go index 1e609f3d6..3d443ce65 100644 --- a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/miscelleneous.go +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/miscelleneous.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package utils +package controllerutils import ( "strings" diff --git a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/operations.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/operations.go similarity index 98% rename from vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/operations.go rename to vendor/github.com/gardener/gardener/pkg/controllerutils/operations.go index 8c1930860..627ea2bc7 100644 --- a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/operations.go +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/operations.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package utils +package controllerutils import ( "context" diff --git a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/pointers.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/pointers.go similarity index 97% rename from vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/pointers.go rename to vendor/github.com/gardener/gardener/pkg/controllerutils/pointers.go index dc3144d69..ed643a4e9 100644 --- a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/pointers.go +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/pointers.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package utils +package controllerutils // BoolPtrDerefOr dereferences the given bool if it's non-nil. Otherwise, returns the default. func BoolPtrDerefOr(b *bool, defaultValue bool) bool { diff --git a/vendor/github.com/gardener/gardener/pkg/controllerutils/seedfilter.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/seedfilter.go new file mode 100644 index 000000000..bcc165ce4 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/seedfilter.go @@ -0,0 +1,120 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 controllerutils + +import ( + gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorelisters "github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" +) + +// LabelsMatchFor checks whether the given label selector matches for the given set of labels. +func LabelsMatchFor(l map[string]string, labelSelector *metav1.LabelSelector) bool { + selector, err := metav1.LabelSelectorAsSelector(labelSelector) + if err != nil { + return false + } + return selector.Matches(labels.Set(l)) +} + +// SeedFilterFunc returns a filtering func for the seeds and the given label selector. +func SeedFilterFunc(seedName string, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + seed, ok := obj.(*gardencorev1alpha1.Seed) + if !ok { + return false + } + if len(seedName) > 0 { + return seed.Name == seedName + } + return LabelsMatchFor(seed.Labels, labelSelector) + } +} + +// ShootFilterFunc returns a filtering func for the seeds and the given label selector. +func ShootFilterFunc(seedName string, seedLister gardencorelisters.SeedLister, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + shoot, ok := obj.(*gardencorev1alpha1.Shoot) + if !ok { + return false + } + if shoot.Spec.SeedName == nil { + return false + } + if len(seedName) > 0 { + return *shoot.Spec.SeedName == seedName + } + return seedLabelsMatch(seedLister, *shoot.Spec.SeedName, labelSelector) + } +} + +func seedLabelsMatch(seedLister gardencorelisters.SeedLister, seedName string, labelSelector *metav1.LabelSelector) bool { + seed, err := seedLister.Get(seedName) + if err != nil { + return false + } + + return LabelsMatchFor(seed.Labels, labelSelector) +} + +// ControllerInstallationFilterFunc returns a filtering func for the seeds and the given label selector. +func ControllerInstallationFilterFunc(seedName string, seedLister gardencorelisters.SeedLister, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + controllerInstallation, ok := obj.(*gardencorev1alpha1.ControllerInstallation) + if !ok { + return false + } + if len(seedName) > 0 { + return controllerInstallation.Spec.SeedRef.Name == seedName + } + return seedLabelsMatch(seedLister, controllerInstallation.Spec.SeedRef.Name, labelSelector) + } +} + +// BackupBucketFilterFunc returns a filtering func for the seeds and the given label selector. +func BackupBucketFilterFunc(seedName string, seedLister gardencorelisters.SeedLister, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + backupBucket, ok := obj.(*gardencorev1alpha1.BackupBucket) + if !ok { + return false + } + if backupBucket.Spec.Seed == nil { + return false + } + if len(seedName) > 0 { + return *backupBucket.Spec.Seed == seedName + } + return seedLabelsMatch(seedLister, *backupBucket.Spec.Seed, labelSelector) + } +} + +// BackupEntryFilterFunc returns a filtering func for the seeds and the given label selector. +func BackupEntryFilterFunc(seedName string, seedLister gardencorelisters.SeedLister, labelSelector *metav1.LabelSelector) func(obj interface{}) bool { + return func(obj interface{}) bool { + backupEntry, ok := obj.(*gardencorev1alpha1.BackupEntry) + if !ok { + return false + } + if backupEntry.Spec.Seed == nil { + return false + } + if len(seedName) > 0 { + return *backupEntry.Spec.Seed == seedName + } + return seedLabelsMatch(seedLister, *backupEntry.Spec.Seed, labelSelector) + } +} diff --git a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/worker.go b/vendor/github.com/gardener/gardener/pkg/controllerutils/worker.go similarity index 99% rename from vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/worker.go rename to vendor/github.com/gardener/gardener/pkg/controllerutils/worker.go index 135472029..748bc87e7 100644 --- a/vendor/github.com/gardener/gardener/pkg/controllermanager/controller/utils/worker.go +++ b/vendor/github.com/gardener/gardener/pkg/controllerutils/worker.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package utils +package controllerutils import ( "context" diff --git a/vendor/github.com/gardener/gardener/pkg/operation/common/types.go b/vendor/github.com/gardener/gardener/pkg/operation/common/types.go index 859876b6f..57c704e19 100644 --- a/vendor/github.com/gardener/gardener/pkg/operation/common/types.go +++ b/vendor/github.com/gardener/gardener/pkg/operation/common/types.go @@ -189,9 +189,6 @@ const ( // CalicoKubeControllersDeploymentName is the name of calico-kube-controllers deployment. CalicoKubeControllersDeploymentName = "calico-kube-controllers" - // CalicoTyphaDeploymentName is the name of the calico-typha deployment. - CalicoTyphaDeploymentName = "calico-typha-deploy" - // CoreDNSDeploymentName is the name of the coredns deployment. CoreDNSDeploymentName = "coredns" @@ -222,6 +219,15 @@ const ( // KubecfgSecretName is the name of the kubecfg secret. KubecfgSecretName = "kubecfg" + // DependencyWatchdogExternalProbeSecretName is the name of the kubecfg secret with internal DNS for external access. + DependencyWatchdogExternalProbeSecretName = "dependency-watchdog-external-probe" + + // DependencyWatchdogInternalProbeSecretName is the name of the kubecfg secret with cluster IP access. + DependencyWatchdogInternalProbeSecretName = "dependency-watchdog-internal-probe" + + // DeprecatedKubecfgInternalProbeSecretName is the name of the kubecfg secret with cluster IP access. + DeprecatedKubecfgInternalProbeSecretName = "kubecfg-internal" + // KubeAPIServerHealthCheck is a key for the kube-apiserver-health-check user. KubeAPIServerHealthCheck = "kube-apiserver-health-check" @@ -431,6 +437,9 @@ const ( // HvpaControllerImageName is the name of the hvpa-controller image HvpaControllerImageName = "hvpa-controller" + // DependencyWatchdogImageName is the name of the dependency-watchdog image + DependencyWatchdogImageName = "dependency-watchdog" + // ServiceAccountSigningKeySecretDataKey is the data key of a signing key Kubernetes secret. ServiceAccountSigningKeySecretDataKey = "signing-key" ) @@ -443,7 +452,6 @@ var ( v1alpha1constants.DeploymentNameKubeAPIServer, v1alpha1constants.DeploymentNameKubeControllerManager, v1alpha1constants.DeploymentNameKubeScheduler, - v1alpha1constants.DeploymentNameDependencyWatchdog, MachineControllerManagerDeploymentName, ) @@ -457,7 +465,6 @@ var ( // RequiredSystemComponentDeployments is a set of the required system components. RequiredSystemComponentDeployments = sets.NewString( CalicoKubeControllersDeploymentName, - CalicoTyphaDeploymentName, CoreDNSDeploymentName, VPNShootDeploymentName, MetricsServerDeploymentName, diff --git a/vendor/github.com/gardener/gardener/pkg/operation/common/utils.go b/vendor/github.com/gardener/gardener/pkg/operation/common/utils.go index 9abab2873..f78ad7db8 100644 --- a/vendor/github.com/gardener/gardener/pkg/operation/common/utils.go +++ b/vendor/github.com/gardener/gardener/pkg/operation/common/utils.go @@ -34,7 +34,6 @@ import ( "github.com/gardener/gardener/pkg/version" jsoniter "github.com/json-iterator/go" - errors2 "github.com/pkg/errors" appsv1 "k8s.io/api/apps/v1" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" batchv1beta1 "k8s.io/api/batch/v1beta1" @@ -308,9 +307,6 @@ func DeleteLoggingStack(ctx context.Context, k8sClient client.Client, namespace &appsv1.StatefulSetList{}, } - // TODO: Use `DeleteCollection` as soon it is in the controller-runtime: - // https://github.com/kubernetes-sigs/controller-runtime/pull/324 - for _, list := range lists { if err := k8sClient.List(ctx, list, client.InNamespace(namespace), @@ -605,11 +601,3 @@ func GetSecretFromSecretRef(ctx context.Context, c client.Client, secretRef *cor } return secret, nil } - -// WrapWithLastError is wrapper function for gardencorev1alpha1.LastError -func WrapWithLastError(err error, lastError *gardencorev1alpha1.LastError) error { - if err == nil || lastError == nil { - return err - } - return errors2.Wrapf(err, "last error: %s", lastError.Description) -} diff --git a/vendor/github.com/gardener/gardener/pkg/scheduler/controller/common/seed.go b/vendor/github.com/gardener/gardener/pkg/scheduler/controller/common/seed.go new file mode 100644 index 000000000..c2201f95f --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/scheduler/controller/common/seed.go @@ -0,0 +1,31 @@ +// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 common + +import ( + gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1alpha1helper "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" +) + +// VerifySeedReadiness verifies whether the seed is ready. +func VerifySeedReadiness(seed *gardencorev1alpha1.Seed) bool { + if cond := gardencorev1alpha1helper.GetCondition(seed.Status.Conditions, gardencorev1alpha1.SeedBootstrapped); cond == nil || cond.Status != gardencorev1alpha1.ConditionTrue { + return false + } + if cond := gardencorev1alpha1helper.GetCondition(seed.Status.Conditions, gardencorev1alpha1.SeedGardenletReady); cond == nil || cond.Status != gardencorev1alpha1.ConditionTrue { + return false + } + return true +} diff --git a/vendor/github.com/gardener/gardener/pkg/scheduler/controller/shoot/scheduler.go b/vendor/github.com/gardener/gardener/pkg/scheduler/controller/shoot/scheduler.go index c7fd696c2..7f646d123 100644 --- a/vendor/github.com/gardener/gardener/pkg/scheduler/controller/shoot/scheduler.go +++ b/vendor/github.com/gardener/gardener/pkg/scheduler/controller/shoot/scheduler.go @@ -22,9 +22,9 @@ import ( gardencoreinformers "github.com/gardener/gardener/pkg/client/core/informers/externalversions" gardencorelisters "github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1" "github.com/gardener/gardener/pkg/client/kubernetes" - controllerutils "github.com/gardener/gardener/pkg/controllermanager/controller/utils" - gardenmetrics "github.com/gardener/gardener/pkg/controllermanager/metrics" + "github.com/gardener/gardener/pkg/controllerutils" "github.com/gardener/gardener/pkg/logger" + "github.com/gardener/gardener/pkg/scheduler" "github.com/gardener/gardener/pkg/scheduler/apis/config" "github.com/prometheus/client_golang/prometheus" @@ -146,9 +146,9 @@ func (c *SchedulerController) RunningWorkers() int { // CollectMetrics implements gardenmetrics.ControllerMetricsCollector interface func (c *SchedulerController) CollectMetrics(ch chan<- prometheus.Metric) { - metric, err := prometheus.NewConstMetric(gardenmetrics.ControllerWorkerSum, prometheus.GaugeValue, float64(c.RunningWorkers()), "seed") + metric, err := prometheus.NewConstMetric(scheduler.ControllerWorkerSum, prometheus.GaugeValue, float64(c.RunningWorkers()), "seed") if err != nil { - gardenmetrics.ScrapeFailures.With(prometheus.Labels{"kind": "gardener-shoot-scheduler"}).Inc() + scheduler.ScrapeFailures.With(prometheus.Labels{"kind": "gardener-shoot-scheduler"}).Inc() return } ch <- metric diff --git a/vendor/github.com/gardener/gardener/pkg/scheduler/controller/shoot/scheduler_control.go b/vendor/github.com/gardener/gardener/pkg/scheduler/controller/shoot/scheduler_control.go index c8a6eaacf..2d8fe26c2 100644 --- a/vendor/github.com/gardener/gardener/pkg/scheduler/controller/shoot/scheduler_control.go +++ b/vendor/github.com/gardener/gardener/pkg/scheduler/controller/shoot/scheduler_control.go @@ -208,15 +208,21 @@ func determineBestSeedCandidate(shoot *gardencorev1alpha1.Shoot, cloudProfile *g candidateErrors := make(map[string]error) for _, seed := range old { - disj, err := networksAreDisjunct(seed, shoot) - if !disj { + if disjointed, err := networksAreDisjointed(seed, shoot); !disjointed { candidateErrors[seed.Name] = err continue } + + if ignoreSeedDueToDNSConfiguration(seed, shoot) { + candidateErrors[seed.Name] = fmt.Errorf("seed does not support DNS") + continue + } + if !seedSelector.Matches(labels.Set(seed.Labels)) { candidateErrors[seed.Name] = fmt.Errorf("seed labels don't match seed selector") continue } + candidates = append(candidates, seed) } @@ -244,7 +250,7 @@ func determineBestSeedCandidate(shoot *gardencorev1alpha1.Shoot, cloudProfile *g func determineCandidatesWithSameRegionStrategy(seedList []*gardencorev1alpha1.Seed, shoot *gardencorev1alpha1.Shoot, candidates []*gardencorev1alpha1.Seed) []*gardencorev1alpha1.Seed { // Determine all candidate seed clusters matching the shoot's provider and region. for _, seed := range seedList { - if seed.DeletionTimestamp == nil && seed.Spec.Provider.Type == shoot.Spec.Provider.Type && seed.Spec.Provider.Region == shoot.Spec.Region && !gardencorev1alpha1helper.TaintsHave(seed.Spec.Taints, gardencorev1alpha1.SeedTaintInvisible) && verifySeedAvailability(seed) { + if seed.DeletionTimestamp == nil && seed.Spec.Provider.Type == shoot.Spec.Provider.Type && seed.Spec.Provider.Region == shoot.Spec.Region && !gardencorev1alpha1helper.TaintsHave(seed.Spec.Taints, gardencorev1alpha1.SeedTaintInvisible) && common.VerifySeedReadiness(seed) { candidates = append(candidates, seed) } } @@ -263,7 +269,7 @@ func determineCandidatesWithMinimalDistanceStrategy(seeds []*gardencorev1alpha1. // Determine all candidate seed clusters with matching cloud provider but different region that are lexicographically closest to the shoot for _, seed := range seeds { - if seed.DeletionTimestamp == nil && seed.Spec.Provider.Type == shoot.Spec.Provider.Type && !gardencorev1alpha1helper.TaintsHave(seed.Spec.Taints, gardencorev1alpha1.SeedTaintInvisible) && verifySeedAvailability(seed) { + if seed.DeletionTimestamp == nil && seed.Spec.Provider.Type == shoot.Spec.Provider.Type && !gardencorev1alpha1helper.TaintsHave(seed.Spec.Taints, gardencorev1alpha1.SeedTaintInvisible) && common.VerifySeedReadiness(seed) { seedRegion := seed.Spec.Provider.Region for currentMaxMatchingCharacters < len(shootRegion) { @@ -293,20 +299,28 @@ func generateSeedUsageMap(shootList []*gardencorev1alpha1.Shoot) map[string]int return m } -func networksAreDisjunct(seed *gardencorev1alpha1.Seed, shoot *gardencorev1alpha1.Shoot) (bool, error) { - errs := schedulerutils.ValidateNetworkDisjointedness(seed.Spec.Networks, shoot.Spec.Networking.Nodes, shoot.Spec.Networking.Pods, shoot.Spec.Networking.Services, field.NewPath("")) - var errMsgs []string +func networksAreDisjointed(seed *gardencorev1alpha1.Seed, shoot *gardencorev1alpha1.Shoot) (bool, error) { + var ( + errs = schedulerutils.ValidateNetworkDisjointedness(seed.Spec.Networks, shoot.Spec.Networking.Nodes, shoot.Spec.Networking.Pods, shoot.Spec.Networking.Services, field.NewPath("")) + errorMessages []string + ) + for _, e := range errs { - errMsgs = append(errMsgs, e.ErrorBody()) + errorMessages = append(errorMessages, e.ErrorBody()) } - return len(errs) == 0, fmt.Errorf("invalid networks: %s", errMsgs) + + return len(errs) == 0, fmt.Errorf("invalid networks: %s", errorMessages) } -func verifySeedAvailability(seed *gardencorev1alpha1.Seed) bool { - if cond := gardencorev1alpha1helper.GetCondition(seed.Status.Conditions, gardencorev1alpha1.SeedAvailable); cond != nil { - return cond.Status == gardencorev1alpha1.ConditionTrue +// ignore seed if it disables DNS and shoot has DNS but not unmanaged +func ignoreSeedDueToDNSConfiguration(seed *gardencorev1alpha1.Seed, shoot *gardencorev1alpha1.Shoot) bool { + if !gardencorev1alpha1helper.TaintsHave(seed.Spec.Taints, gardencorev1alpha1.SeedTaintDisableDNS) { + return false + } + if shoot.Spec.DNS == nil { + return false } - return false + return !gardencorev1alpha1helper.ShootUsesUnmanagedDNS(shoot) } // UpdateShootToBeScheduledOntoSeed sets the seed name where the shoot should be scheduled on. Then it executes the actual update call to the API server. The call is capsuled to allow for easier testing. diff --git a/vendor/github.com/gardener/gardener/pkg/scheduler/metrics.go b/vendor/github.com/gardener/gardener/pkg/scheduler/metrics.go new file mode 100644 index 000000000..d9f6fca1b --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/scheduler/metrics.go @@ -0,0 +1,27 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 scheduler + +import ( + gardenmetrics "github.com/gardener/gardener/pkg/controllerutils/metrics" +) + +var ( + // ControllerWorkerSum is a metric descriptor which collects the current amount of workers per controller. + ControllerWorkerSum = gardenmetrics.NewMetricDescriptor("garden_scheduler_worker_amount", "Count of currently running controller workers") + + // ScrapeFailures is a metric descriptor which counts the amount scrape issues grouped by kind. + ScrapeFailures = gardenmetrics.NewCounterVec("garden_scheduler_scrape_failure_total", "Total count of scraping failures, grouped by kind/group of metric(s)") +) diff --git a/vendor/github.com/gardener/gardener/pkg/utils/errors/errors.go b/vendor/github.com/gardener/gardener/pkg/utils/errors/errors.go index d8cd4c9d9..52abd1c69 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/errors/errors.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/errors/errors.go @@ -211,7 +211,7 @@ func ToExecute(errorID string, task func() error) TaskFunc { // HandleErrors takes a reference to an ErrorContext, onSuccess and onFailure callback functions and a variadic list of taskFuncs. // It sequentially adds the Tasks' errorIDs to the provided ErrorContext and executes them. -// If the ErrorContext has errors from the previous reconcilation and the tasks which caused errors complete successfully OnSuccess is called. +// If the ErrorContext has errors from the previous reconciliation and the tasks which caused errors complete successfully OnSuccess is called. // If a task fails OnFailure is called func HandleErrors(errorContext *ErrorContext, onSuccess SuccessHandler, onFailure FailureHandler, tasks ...TaskFunc) error { for _, task := range tasks { diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/bootstrap_token.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/bootstrap_token.go new file mode 100644 index 000000000..94d811099 --- /dev/null +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/bootstrap_token.go @@ -0,0 +1,69 @@ +// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 kubernetes + +import ( + "context" + "time" + + "github.com/gardener/gardener/pkg/utils" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + bootstraptokenapi "k8s.io/cluster-bootstrap/token/api" + bootstraptokenutil "k8s.io/cluster-bootstrap/token/util" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ComputeBootstrapToken computes and creates a new bootstrap token, and returns it. +func ComputeBootstrapToken(ctx context.Context, c client.Client, tokenID, description string, validity time.Duration) (secret *corev1.Secret, err error) { + secret = &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: bootstraptokenutil.BootstrapTokenSecretName(tokenID), + Namespace: metav1.NamespaceSystem, + }, + } + + if err := c.Get(ctx, Key(secret.Namespace, secret.Name), secret); client.IgnoreNotFound(err) != nil { + return nil, err + } + + bootstrapTokenSecretKey, err := utils.GenerateRandomStringFromCharset(16, "0123456789abcdefghijklmnopqrstuvwxyz") + if err != nil { + return nil, err + } + + data := map[string][]byte{ + bootstraptokenapi.BootstrapTokenDescriptionKey: []byte(description), + bootstraptokenapi.BootstrapTokenIDKey: []byte(tokenID), + bootstraptokenapi.BootstrapTokenSecretKey: []byte(bootstrapTokenSecretKey), + bootstraptokenapi.BootstrapTokenExpirationKey: []byte(metav1.Now().Add(validity).Format(time.RFC3339)), + bootstraptokenapi.BootstrapTokenUsageAuthentication: []byte("true"), + bootstraptokenapi.BootstrapTokenUsageSigningKey: []byte("true"), + } + + err2 := CreateOrUpdate(ctx, c, secret, func() error { + secret.Type = bootstraptokenapi.SecretTypeBootstrapToken + secret.Data = data + return nil + }) + + return secret, err2 +} + +// BootstrapTokenFrom returns the bootstrap token based on the secret data. +func BootstrapTokenFrom(data map[string][]byte) string { + return bootstraptokenutil.TokenFromIDAndSecret(string(data[bootstraptokenapi.BootstrapTokenIDKey]), string(data[bootstraptokenapi.BootstrapTokenSecretKey])) +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/client/options.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/client/options.go index 23ce071de..dca494511 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/client/options.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/client/options.go @@ -16,8 +16,6 @@ package client import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/labels" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -94,33 +92,3 @@ func (l Limit) ApplyToList(opts *client.ListOptions) { } opts.Raw.Limit = int64(l) } - -// MatchingLabelsSelector filters the list/delete operation on the given label -// selector (or index in the case of cached lists). A struct is used because -// labels.Selector is an interface, which cannot be aliased. -// -// TODO: Replace this with client.MatchingLabelsSelector (available from v0.2.1) -// https://github.com/kubernetes-sigs/controller-runtime/pull/578 -type MatchingLabelsSelector struct { - labels.Selector -} - -// ApplyToList restricts the list operation to match the label selector. -func (m MatchingLabelsSelector) ApplyToList(opts *client.ListOptions) { - opts.LabelSelector = m -} - -// MatchingFieldsSelector filters the list/delete operation on the given field -// selector (or index in the case of cached lists). A struct is used because -// fields.Selector is an interface, which cannot be aliased. -// -// TODO: Replace this with client.MatchingFieldsSelector (available from v0.2.1) -// https://github.com/kubernetes-sigs/controller-runtime/pull/578 -type MatchingFieldsSelector struct { - fields.Selector -} - -// ApplyToList restricts the list operation to match the field selector. -func (m MatchingFieldsSelector) ApplyToList(opts *client.ListOptions) { - opts.FieldSelector = m -} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/health.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/health.go index 1fa0bb61e..f51cc56c7 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/health.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/health/health.go @@ -22,11 +22,14 @@ import ( gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/rest" ) @@ -286,7 +289,8 @@ func CheckMachineDeployment(deployment *machinev1alpha1.MachineDeployment) error var ( trueSeedConditionTypes = []gardencorev1alpha1.ConditionType{ - gardencorev1alpha1.SeedAvailable, + gardencorev1alpha1.SeedGardenletReady, + gardencorev1alpha1.SeedBootstrapped, } ) @@ -295,7 +299,7 @@ func CheckSeed(seed *gardencorev1alpha1.Seed, identity *gardencorev1alpha1.Garde if seed.Status.ObservedGeneration < seed.Generation { return fmt.Errorf("observed generation outdated (%d/%d)", seed.Status.ObservedGeneration, seed.Generation) } - if seed.Status.Gardener != *identity { + if !apiequality.Semantic.DeepEqual(seed.Status.Gardener, identity) { return fmt.Errorf("observing Gardener version not up to date (%v/%v)", seed.Status.Gardener, identity) } @@ -325,7 +329,7 @@ func CheckExtensionObject(obj extensionsv1alpha1.Object) error { return fmt.Errorf("observed generation outdated (%d/%d)", status.GetObservedGeneration(), obj.GetGeneration()) } - op, ok := obj.GetAnnotations()[v1alpha1constants.GardenerOperation] + op, ok := obj.GetAnnotations()[v1beta1constants.GardenerOperation] if ok { return fmt.Errorf("gardener operation %q is not yet picked up by extension controller", op) } @@ -339,7 +343,7 @@ func CheckExtensionObject(obj extensionsv1alpha1.Object) error { return fmt.Errorf("extension did not record a last operation yet") } - if lastOp.GetState() != gardencorev1alpha1.LastOperationStateSucceeded { + if lastOp.GetState() != gardencorev1beta1.LastOperationStateSucceeded { return fmt.Errorf("extension state is not succeeded but %v", lastOp.GetState()) } return nil diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/kubernetes.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/kubernetes.go index 183f9e308..b12b0bdb0 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/kubernetes.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/kubernetes.go @@ -173,8 +173,8 @@ func WaitUntilResourceDeletedWithDefaults(ctx context.Context, c client.Client, } // GetLoadBalancerIngress takes a context, a client, a namespace and a service name. It queries for a load balancer's technical name -// (ip address or hostname). It returns the value of the technical name whereby it always prefers the IP address (if given) -// over the hostname. It also returns the list of all load balancer ingresses. +// (ip address or hostname). It returns the value of the technical name whereby it always prefers the hostname (if given) +// over the IP address. It also returns the list of all load balancer ingresses. func GetLoadBalancerIngress(ctx context.Context, client client.Client, namespace, name string) (string, error) { service := &corev1.Service{} if err := client.Get(ctx, Key(namespace, name), service); err != nil { @@ -189,10 +189,10 @@ func GetLoadBalancerIngress(ctx context.Context, client client.Client, namespace switch { case length == 0: return "", errors.New("`.status.loadBalancer.ingress[]` has no elements yet, i.e. external load balancer has not been created") - case serviceStatusIngress[length-1].IP != "": - return serviceStatusIngress[length-1].IP, nil case serviceStatusIngress[length-1].Hostname != "": return serviceStatusIngress[length-1].Hostname, nil + case serviceStatusIngress[length-1].IP != "": + return serviceStatusIngress[length-1].IP, nil } return "", errors.New("`.status.loadBalancer.ingress[]` has an element which does neither contain `.ip` nor `.hostname`") diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/seed.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/seed.go index 610dcc329..0dde3ddc5 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/seed.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/seed.go @@ -86,3 +86,27 @@ func TryUpdateSeed(g gardencore.Interface, backoff wait.Backoff, meta metav1.Obj return equality.Semantic.DeepEqual(cur, updated) }) } + +// TryUpdateSeedStatus tries to update the status of the seed matching the given . +// It retries with the given characteristics as long as it gets Conflict errors. +// The transformation function is applied to the current state of the Seed object. If the transformation +// yields a semantically equal Seed (regarding Status), no update is done and the operation returns normally. +func TryUpdateSeedStatus(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1alpha1.Seed) (*gardencorev1alpha1.Seed, error)) (*gardencorev1alpha1.Seed, error) { + return tryUpdateSeed(g, backoff, meta, transform, func(g gardencore.Interface, seed *gardencorev1alpha1.Seed) (*gardencorev1alpha1.Seed, error) { + return g.CoreV1alpha1().Seeds().UpdateStatus(seed) + }, func(cur, updated *gardencorev1alpha1.Seed) bool { + return equality.Semantic.DeepEqual(cur.Status, updated.Status) + }) +} + +// TryUpdateSeedConditions tries to update the status of the seed matching the given . +// It retries with the given characteristics as long as it gets Conflict errors. +// The transformation function is applied to the current state of the Seed object. If the transformation +// yields a semantically equal Seed (regarding conditions), no update is done and the operation returns normally. +func TryUpdateSeedConditions(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1alpha1.Seed) (*gardencorev1alpha1.Seed, error)) (*gardencorev1alpha1.Seed, error) { + return tryUpdateSeed(g, backoff, meta, transform, func(g gardencore.Interface, seed *gardencorev1alpha1.Seed) (*gardencorev1alpha1.Seed, error) { + return g.CoreV1alpha1().Seeds().UpdateStatus(seed) + }, func(cur, updated *gardencorev1alpha1.Seed) bool { + return equality.Semantic.DeepEqual(cur.Status.Conditions, updated.Status.Conditions) + }) +} diff --git a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/shoot.go b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/shoot.go index c832bdeba..af22595de 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/shoot.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/kubernetes/shoot.go @@ -115,18 +115,6 @@ func TryUpdateShootLabels(g gardencore.Interface, backoff wait.Backoff, meta met }) } -// TryUpdateShootConditions tries to update the status of the shoot matching the given . -// It retries with the given characteristics as long as it gets Conflict errors. -// The transformation function is applied to the current state of the Shoot object. If the transformation -// yields a semantically equal Shoot (regarding conditions), no update is done and the operation returns normally. -func TryUpdateShootConditions(g gardencore.Interface, backoff wait.Backoff, meta metav1.ObjectMeta, transform func(*gardencorev1alpha1.Shoot) (*gardencorev1alpha1.Shoot, error)) (*gardencorev1alpha1.Shoot, error) { - return tryUpdateShoot(g, backoff, meta, transform, func(g gardencore.Interface, shoot *gardencorev1alpha1.Shoot) (*gardencorev1alpha1.Shoot, error) { - return g.CoreV1alpha1().Shoots(shoot.Namespace).UpdateStatus(shoot) - }, func(cur, updated *gardencorev1alpha1.Shoot) bool { - return equality.Semantic.DeepEqual(cur.Status.Conditions, updated.Status.Conditions) - }) -} - // TryUpdateShootAnnotations tries to update the annotations of the shoot matching the given . // It retries with the given characteristics as long as it gets Conflict errors. // The transformation function is applied to the current state of the Shoot object. If the transformation diff --git a/vendor/github.com/gardener/gardener/pkg/utils/secrets/certificates.go b/vendor/github.com/gardener/gardener/pkg/utils/secrets/certificates.go index 14b7f8ac9..348d7121c 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/secrets/certificates.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/secrets/certificates.go @@ -76,6 +76,8 @@ type CertificateSecretConfig struct { CertType certType SigningCA *Certificate PKCS int + + Validity *time.Duration } // Certificate contains the private key, and the certificate. It does also contain the CA certificate @@ -216,9 +218,14 @@ func LoadCAFromSecret(k8sClient client.Client, namespace, name string) (*corev1. // or both, depending on the value. If is true, then a CA certificate is being created. // The certificates a valid for 10 years. func (s *CertificateSecretConfig) generateCertificateTemplate() *x509.Certificate { + now := time.Now() + expiration := now.AddDate(10, 0, 0) // + 10 years + if s.Validity != nil { + expiration = now.Add(*s.Validity) + } + var ( serialNumber, _ = rand.Int(rand.Reader, new(big.Int).Lsh(big.NewInt(1), 128)) - now = time.Now() isCA = s.CertType == CACert template = &x509.Certificate{ @@ -226,7 +233,7 @@ func (s *CertificateSecretConfig) generateCertificateTemplate() *x509.Certificat IsCA: isCA, SerialNumber: serialNumber, NotBefore: now, - NotAfter: now.AddDate(10, 0, 0), // + 10 years + NotAfter: expiration, KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment, Subject: pkix.Name{ CommonName: s.CommonName, diff --git a/vendor/github.com/gardener/gardener/pkg/utils/secrets/generate.go b/vendor/github.com/gardener/gardener/pkg/utils/secrets/generate.go index 36cafb678..92c68b3c2 100644 --- a/vendor/github.com/gardener/gardener/pkg/utils/secrets/generate.go +++ b/vendor/github.com/gardener/gardener/pkg/utils/secrets/generate.go @@ -89,7 +89,7 @@ func GenerateClusterSecrets(ctx context.Context, k8sClusterClient kubernetes.Int deployedClusterSecrets[out.secret.Name] = out.secret } - // Wait and check wether an error occurred during the parallel processing of the Secret creation. + // Wait and check whether an error occurred during the parallel processing of the Secret creation. if len(errorList) > 0 { return deployedClusterSecrets, fmt.Errorf("Errors occurred during shoot secrets generation: %+v", errorList) } diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/common.go b/vendor/github.com/gardener/gardener/test/integration/framework/common.go index ac456d5b1..1ee9dd252 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/common.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/common.go @@ -22,9 +22,9 @@ import ( "runtime" "strings" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants" - "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" + "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/utils" @@ -49,8 +49,8 @@ const ( ) // CreateShootTestArtifacts creates a shoot object from the given path and sets common attributes (test-individual settings like workers have to be handled by each test). -func CreateShootTestArtifacts(shootTestYamlPath string, prefix *string, projectNamespace, shootRegion, cloudProfile, secretbinding, providerType, k8sVersion, externalDomain *string, clearDNS bool, clearExtensions bool) (string, *gardencorev1alpha1.Shoot, error) { - shoot := &gardencorev1alpha1.Shoot{} +func CreateShootTestArtifacts(shootTestYamlPath string, prefix *string, projectNamespace, shootRegion, cloudProfile, secretbinding, providerType, k8sVersion, externalDomain *string, clearDNS bool, clearExtensions bool) (string, *gardencorev1beta1.Shoot, error) { + shoot := &gardencorev1beta1.Shoot{} if err := ReadObject(shootTestYamlPath, shoot); err != nil { return "", nil, err } @@ -60,7 +60,7 @@ func CreateShootTestArtifacts(shootTestYamlPath string, prefix *string, projectN } if externalDomain != nil && len(*externalDomain) > 0 { - shoot.Spec.DNS = &gardencorev1alpha1.DNS{Domain: externalDomain} + shoot.Spec.DNS = &gardencorev1beta1.DNS{Domain: externalDomain} clearDNS = false } @@ -93,7 +93,7 @@ func CreateShootTestArtifacts(shootTestYamlPath string, prefix *string, projectN } if clearDNS { - shoot.Spec.DNS = &gardencorev1alpha1.DNS{} + shoot.Spec.DNS = &gardencorev1beta1.DNS{} } if clearExtensions { @@ -103,13 +103,13 @@ func CreateShootTestArtifacts(shootTestYamlPath string, prefix *string, projectN if shoot.Annotations == nil { shoot.Annotations = map[string]string{} } - shoot.Annotations[v1alpha1constants.AnnotationShootIgnoreAlerts] = "true" + shoot.Annotations[v1beta1constants.AnnotationShootIgnoreAlerts] = "true" return shoot.Name, shoot, nil } // SetProviderConfigsFromFilepath parses the infrastructure, controlPlane and networking provider-configs and sets them on the shoot -func SetProviderConfigsFromFilepath(shoot *gardencorev1alpha1.Shoot, infrastructureConfigPath, controlPlaneConfigPath, networkingConfigPath, workersConfigPath *string) error { +func SetProviderConfigsFromFilepath(shoot *gardencorev1beta1.Shoot, infrastructureConfigPath, controlPlaneConfigPath, networkingConfigPath, workersConfigPath *string) error { // clear provider configs first shoot.Spec.Provider.InfrastructureConfig = nil shoot.Spec.Provider.ControlPlaneConfig = nil @@ -164,9 +164,9 @@ func generateRandomShootName(prefix string, length int) (string, error) { } // CreatePlantTestArtifacts creates a plant object which is read from the resources directory -func CreatePlantTestArtifacts(plantTestYamlPath string) (*gardencorev1alpha1.Plant, error) { +func CreatePlantTestArtifacts(plantTestYamlPath string) (*gardencorev1beta1.Plant, error) { - plant := &gardencorev1alpha1.Plant{} + plant := &gardencorev1beta1.Plant{} if err := ReadObject(plantTestYamlPath, plant); err != nil { return nil, err } @@ -186,7 +186,7 @@ func ReadObject(file string, into apimachineryRuntime.Object) error { } // ParseFileAsProviderConfig parses a file as a ProviderConfig -func ParseFileAsProviderConfig(filepath string) (*gardencorev1alpha1.ProviderConfig, error) { +func ParseFileAsProviderConfig(filepath string) (*gardencorev1beta1.ProviderConfig, error) { data, err := ioutil.ReadFile(filepath) if err != nil { return nil, err @@ -197,17 +197,17 @@ func ParseFileAsProviderConfig(filepath string) (*gardencorev1alpha1.ProviderCon if err != nil { return nil, fmt.Errorf("unable to decode ProviderConfig: %v", err) } - return &gardencorev1alpha1.ProviderConfig{RawExtension: apimachineryRuntime.RawExtension{Raw: jsonData}}, nil + return &gardencorev1beta1.ProviderConfig{RawExtension: apimachineryRuntime.RawExtension{Raw: jsonData}}, nil } // ParseFileAsWorkers parses a file as a Worker configuration -func ParseFileAsWorkers(filepath string) ([]gardencorev1alpha1.Worker, error) { +func ParseFileAsWorkers(filepath string) ([]gardencorev1beta1.Worker, error) { data, err := ioutil.ReadFile(filepath) if err != nil { return nil, err } - workers := []gardencorev1alpha1.Worker{} + workers := []gardencorev1beta1.Worker{} if err := yaml.Unmarshal(data, &workers); err != nil { return nil, fmt.Errorf("unable to decode workers: %v", err) } @@ -222,7 +222,7 @@ func GetProjectRootPath() string { } // AddWorkerForName adds a valid worker to the shoot for the given machine image name. Returns an error if the machine image cannot be found in the CloudProfile. -func AddWorkerForName(shoot *gardencorev1alpha1.Shoot, cloudProfile *gardencorev1alpha1.CloudProfile, machineImageName *string, workerZone *string) error { +func AddWorkerForName(shoot *gardencorev1beta1.Shoot, cloudProfile *gardencorev1beta1.CloudProfile, machineImageName *string, workerZone *string) error { found, image, err := helper.DetermineMachineImageForName(cloudProfile, *machineImageName) if err != nil { return err @@ -235,7 +235,7 @@ func AddWorkerForName(shoot *gardencorev1alpha1.Shoot, cloudProfile *gardencorev } // AddWorker adds a valid default worker to the shoot for the given machineImage and CloudProfile. -func AddWorker(shoot *gardencorev1alpha1.Shoot, cloudProfile *gardencorev1alpha1.CloudProfile, machineImage gardencorev1alpha1.MachineImage, workerZone *string) error { +func AddWorker(shoot *gardencorev1beta1.Shoot, cloudProfile *gardencorev1beta1.CloudProfile, machineImage gardencorev1beta1.MachineImage, workerZone *string) error { _, shootMachineImage, err := helper.GetShootMachineImageFromLatestMachineImageVersion(machineImage) if err != nil { return err @@ -251,11 +251,11 @@ func AddWorker(shoot *gardencorev1alpha1.Shoot, cloudProfile *gardencorev1alpha1 return err } - shoot.Spec.Provider.Workers = append(shoot.Spec.Provider.Workers, gardencorev1alpha1.Worker{ + shoot.Spec.Provider.Workers = append(shoot.Spec.Provider.Workers, gardencorev1beta1.Worker{ Name: workerName, Maximum: 2, Minimum: 2, - Machine: gardencorev1alpha1.Machine{ + Machine: gardencorev1beta1.Machine{ Type: machineType.Name, Image: &shootMachineImage, }, @@ -265,7 +265,7 @@ func AddWorker(shoot *gardencorev1alpha1.Shoot, cloudProfile *gardencorev1alpha1 if len(cloudProfile.Spec.VolumeTypes) == 0 { return fmt.Errorf("no VolumeTypes configured in the Cloudprofile '%s'", cloudProfile.Name) } - shoot.Spec.Provider.Workers[0].Volume = &gardencorev1alpha1.Volume{ + shoot.Spec.Provider.Workers[0].Volume = &gardencorev1beta1.Volume{ Type: &cloudProfile.Spec.VolumeTypes[0].Name, Size: "35Gi", } diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/dump.go b/vendor/github.com/gardener/gardener/test/integration/framework/dump.go index 00993dd06..2bfcd95b0 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/dump.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/dump.go @@ -19,10 +19,11 @@ import ( "fmt" "sort" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/utils/kubernetes/health" + "github.com/hashicorp/go-multierror" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -66,7 +67,7 @@ func (o *GardenerTestOperation) dumpDefaultResourcesInAllNamespaces(ctx context. return result } -func (o *GardenerTestOperation) dumpControlplaneInSeed(ctx context.Context, k8sClient kubernetes.Interface, seed *gardencorev1alpha1.Seed, namespace string) error { +func (o *GardenerTestOperation) dumpControlplaneInSeed(ctx context.Context, k8sClient kubernetes.Interface, seed *gardencorev1beta1.Seed, namespace string) error { cxtIdentifier := fmt.Sprintf("[SEED %s]", o.Seed.Name) o.Logger.Info(cxtIdentifier) diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/errors.go b/vendor/github.com/gardener/gardener/test/integration/framework/errors.go index b9e304e7f..ee235b6bc 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/errors.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/errors.go @@ -17,8 +17,8 @@ package framework import "errors" var ( - // ErrNoRepositoriesFound no repositories found in repoitories file - ErrNoRepositoriesFound = errors.New("no repositories found in repoitories file") + // ErrNoRepositoriesFound no repositories found in repository file + ErrNoRepositoriesFound = errors.New("no repositories found in repository file") // ErrNoInternalIPsForNodeWasFound no internal IPs were found for node ErrNoInternalIPsForNodeWasFound = errors.New("no internal IPs were found for node") diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/garden_operation.go b/vendor/github.com/gardener/gardener/test/integration/framework/garden_operation.go index 33d533cdb..ced27494c 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/garden_operation.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/garden_operation.go @@ -26,17 +26,14 @@ import ( "strings" "time" - "github.com/onsi/ginkgo" - "k8s.io/apimachinery/pkg/runtime" - - "github.com/gardener/gardener/pkg/utils/retry" - - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/chartrenderer" "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/operation/common" "github.com/gardener/gardener/pkg/utils/kubernetes/health" + "github.com/gardener/gardener/pkg/utils/retry" + + "github.com/onsi/ginkgo" "github.com/pkg/errors" "github.com/sirupsen/logrus" appsv1 "k8s.io/api/apps/v1" @@ -45,6 +42,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" corescheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/helm/pkg/repo" apiregistrationscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" @@ -71,7 +69,7 @@ func NewGardenTestOperation(k8sGardenClient kubernetes.Interface, logger logrus. } // NewGardenTestOperationWithShoot initializes a new test operation from created shoot Objects that can be used to issue commands against seeds and shoots -func NewGardenTestOperationWithShoot(ctx context.Context, k8sGardenClient kubernetes.Interface, logger logrus.FieldLogger, shoot *gardencorev1alpha1.Shoot) (*GardenerTestOperation, error) { +func NewGardenTestOperationWithShoot(ctx context.Context, k8sGardenClient kubernetes.Interface, logger logrus.FieldLogger, shoot *gardencorev1beta1.Shoot) (*GardenerTestOperation, error) { operation := &GardenerTestOperation{ Logger: logger, GardenClient: k8sGardenClient, @@ -86,7 +84,7 @@ func NewGardenTestOperationWithShoot(ctx context.Context, k8sGardenClient kubern } // AddShoot sets the shoot and its seed for the GardenerOperation. -func (o *GardenerTestOperation) AddShoot(ctx context.Context, shoot *gardencorev1alpha1.Shoot) error { +func (o *GardenerTestOperation) AddShoot(ctx context.Context, shoot *gardencorev1beta1.Shoot) error { if o.GardenClient == nil { return errors.New("no gardener client is defined") } @@ -95,9 +93,9 @@ func (o *GardenerTestOperation) AddShoot(ctx context.Context, shoot *gardencorev seedClient kubernetes.Interface shootClient kubernetes.Interface - seed = &gardencorev1alpha1.Seed{} - cloudProfile = &gardencorev1alpha1.CloudProfile{} - project = &gardencorev1alpha1.Project{} + seed = &gardencorev1beta1.Seed{} + cloudProfile = &gardencorev1beta1.CloudProfile{} + project = &gardencorev1beta1.Project{} ) if err := o.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: shoot.Namespace, Name: shoot.Name}, shoot); err != nil { @@ -157,7 +155,7 @@ func (o *GardenerTestOperation) AddShoot(ctx context.Context, shoot *gardencorev return errors.Wrap(err, "could not add schemes to shoot scheme") } if err := retry.UntilTimeout(ctx, k8sClientInitPollInterval, k8sClientInitTimeout, func(ctx context.Context) (bool, error) { - shootClient, err = kubernetes.NewClientFromSecret(seedClient, computeTechnicalID(project.Name, shoot), gardencorev1alpha1.GardenerName, kubernetes.WithClientOptions(client.Options{ + shootClient, err = kubernetes.NewClientFromSecret(seedClient, computeTechnicalID(project.Name, shoot), gardencorev1beta1.GardenerName, kubernetes.WithClientOptions(client.Options{ Scheme: shootScheme, })) if err != nil { @@ -173,7 +171,7 @@ func (o *GardenerTestOperation) AddShoot(ctx context.Context, shoot *gardencorev return nil } -func computeTechnicalID(projectName string, shoot *gardencorev1alpha1.Shoot) string { +func computeTechnicalID(projectName string, shoot *gardencorev1beta1.Shoot) string { // Use the stored technical ID in the Shoot's status field if it's there. // For backwards compatibility we keep the pattern as it was before we had to change it // (double hyphens). diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/helm_utils.go b/vendor/github.com/gardener/gardener/test/integration/framework/helm_utils.go index 4484dce6d..93ba5c22a 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/helm_utils.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/helm_utils.go @@ -20,11 +20,9 @@ import ( "path/filepath" "github.com/mholt/archiver" - - "k8s.io/helm/pkg/helm/environment" - "k8s.io/helm/pkg/downloader" "k8s.io/helm/pkg/getter" + "k8s.io/helm/pkg/helm/environment" "k8s.io/helm/pkg/helm/helmpath" "k8s.io/helm/pkg/repo" ) diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/plant_operations.go b/vendor/github.com/gardener/gardener/test/integration/framework/plant_operations.go index 598edb58b..c030209f5 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/plant_operations.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/plant_operations.go @@ -19,26 +19,20 @@ import ( "fmt" "time" - utilretry "github.com/gardener/gardener/pkg/utils/retry" - - "k8s.io/client-go/util/retry" - - v1 "k8s.io/api/core/v1" - + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/client/kubernetes" - - "sigs.k8s.io/controller-runtime/pkg/client" + utilretry "github.com/gardener/gardener/pkg/utils/retry" "github.com/sirupsen/logrus" - + v1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + "k8s.io/client-go/util/retry" + "sigs.k8s.io/controller-runtime/pkg/client" ) // NewPlantTest creates a new plantGardenerTest object, given an already created plant (created after parsing a plant YAML) and a path to a kubeconfig of an external cluster -func NewPlantTest(kubeconfig string, kubeconfigPathExternalCluster string, plant *gardencorev1alpha1.Plant, logger *logrus.Logger) (*PlantTest, error) { +func NewPlantTest(kubeconfig string, kubeconfigPathExternalCluster string, plant *gardencorev1beta1.Plant, logger *logrus.Logger) (*PlantTest, error) { if len(kubeconfig) == 0 { return nil, fmt.Errorf("Please specify the kubeconfig path correctly") } @@ -114,8 +108,8 @@ func (s *PlantTest) GetPlantSecret(ctx context.Context) (*v1.Secret, error) { } // GetPlant gets the test plant -func (s *PlantTest) GetPlant(ctx context.Context) (*gardencorev1alpha1.Plant, error) { - plant := &gardencorev1alpha1.Plant{} +func (s *PlantTest) GetPlant(ctx context.Context) (*gardencorev1beta1.Plant, error) { + plant := &gardencorev1beta1.Plant{} err := s.GardenClient.Client().Get(ctx, client.ObjectKey{ Namespace: s.Plant.Namespace, Name: s.Plant.Name, @@ -169,7 +163,7 @@ func (s *PlantTest) DeletePlant(ctx context.Context) error { // WaitForPlantToBeCreated waits for the plant to be created func (s *PlantTest) WaitForPlantToBeCreated(ctx context.Context) error { return utilretry.Until(ctx, 2*time.Second, func(ctx context.Context) (done bool, err error) { - plant := &gardencorev1alpha1.Plant{} + plant := &gardencorev1beta1.Plant{} err = s.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.Plant.Namespace, Name: s.Plant.Name}, plant) if err != nil { return utilretry.SevereError(err) @@ -183,7 +177,7 @@ func (s *PlantTest) WaitForPlantToBeCreated(ctx context.Context) error { // WaitForPlantToBeDeleted waits for the plant to be deleted func (s *PlantTest) WaitForPlantToBeDeleted(ctx context.Context) error { return utilretry.Until(ctx, 2*time.Second, func(ctx context.Context) (done bool, err error) { - plant := &gardencorev1alpha1.Plant{} + plant := &gardencorev1beta1.Plant{} err = s.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.Plant.ObjectMeta.Namespace, Name: s.Plant.ObjectMeta.Name}, plant) if err != nil { if apierrors.IsNotFound(err) { @@ -200,7 +194,7 @@ func (s *PlantTest) WaitForPlantToBeDeleted(ctx context.Context) error { // WaitForPlantToBeReconciledSuccessfully waits for the plant to be reconciled with a status indicating success func (s *PlantTest) WaitForPlantToBeReconciledSuccessfully(ctx context.Context) error { return utilretry.Until(ctx, 2*time.Second, func(ctx context.Context) (done bool, err error) { - plant := &gardencorev1alpha1.Plant{} + plant := &gardencorev1beta1.Plant{} err = s.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.Plant.Namespace, Name: s.Plant.Name}, plant) if err != nil { return utilretry.SevereError(err) @@ -218,7 +212,7 @@ func (s *PlantTest) WaitForPlantToBeReconciledSuccessfully(ctx context.Context) // WaitForPlantToBeReconciledWithUnknownStatus waits for the plant to be reconciled, setting the expected status 'unknown' func (s *PlantTest) WaitForPlantToBeReconciledWithUnknownStatus(ctx context.Context) error { return utilretry.Until(ctx, 2*time.Second, func(ctx context.Context) (done bool, err error) { - plant := &gardencorev1alpha1.Plant{} + plant := &gardencorev1beta1.Plant{} err = s.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.Plant.Namespace, Name: s.Plant.Name}, plant) if err != nil { return utilretry.SevereError(err) diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/scheduler_operations.go b/vendor/github.com/gardener/gardener/test/integration/framework/scheduler_operations.go index 8bc18edbf..5c92f1934 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/scheduler_operations.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/scheduler_operations.go @@ -19,22 +19,19 @@ import ( "fmt" "time" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/client/kubernetes" + "github.com/gardener/gardener/pkg/scheduler/apis/config" + schedulerconfigv1alpha1 "github.com/gardener/gardener/pkg/scheduler/apis/config/v1alpha1" + "github.com/gardener/gardener/pkg/utils" "github.com/gardener/gardener/pkg/utils/retry" - corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" "sigs.k8s.io/controller-runtime/pkg/client" - - apierrors "k8s.io/apimachinery/pkg/api/errors" - - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - "github.com/gardener/gardener/pkg/scheduler/apis/config" - schedulerconfigv1alpha1 "github.com/gardener/gardener/pkg/scheduler/apis/config/v1alpha1" - "github.com/gardener/gardener/pkg/utils" ) const configurationFileName = "schedulerconfiguration.yaml" @@ -60,12 +57,12 @@ func NewGardenSchedulerTest(ctx context.Context, shootGardenTest *ShootGardenerT return nil, err } - cloudProfileForShoot := &gardencorev1alpha1.CloudProfile{} + cloudProfileForShoot := &gardencorev1beta1.CloudProfile{} if err := shootGardenTest.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: "garden", Name: shootGardenTest.Shoot.Spec.CloudProfileName}, cloudProfileForShoot); err != nil { return nil, err } - allSeeds := &gardencorev1alpha1.SeedList{} + allSeeds := &gardencorev1beta1.SeedList{} if err := shootGardenTest.GardenClient.Client().List(ctx, allSeeds); err != nil { return nil, err } @@ -105,7 +102,7 @@ func parseSchedulerConfiguration(configuration *corev1.ConfigMap) (*config.Sched } // CreateShoot Creates a shoot from a shoot Object -func (s *SchedulerGardenerTest) CreateShoot(ctx context.Context) (*gardencorev1alpha1.Shoot, error) { +func (s *SchedulerGardenerTest) CreateShoot(ctx context.Context) (*gardencorev1beta1.Shoot, error) { _, err := s.ShootGardenerTest.GetShoot(ctx) if !apierrors.IsNotFound(err) { return nil, err @@ -116,9 +113,9 @@ func (s *SchedulerGardenerTest) CreateShoot(ctx context.Context) (*gardencorev1a // ScheduleShoot set the Spec.Cloud.Seed of a shoot to the specified seed. // This is the request the Gardener Scheduler executes after a scheduling decision. -func (s *SchedulerGardenerTest) ScheduleShoot(ctx context.Context, shoot *gardencorev1alpha1.Shoot, seed *gardencorev1alpha1.Seed) error { - executeSchedulingRequest := func(ctx context.Context, shootToUpdate *gardencorev1alpha1.Shoot) error { - if _, err := s.ShootGardenerTest.GardenClient.GardenCore().CoreV1alpha1().Shoots(shootToUpdate.Namespace).Update(shootToUpdate); err != nil { +func (s *SchedulerGardenerTest) ScheduleShoot(ctx context.Context, shoot *gardencorev1beta1.Shoot, seed *gardencorev1beta1.Seed) error { + executeSchedulingRequest := func(ctx context.Context, shootToUpdate *gardencorev1beta1.Shoot) error { + if _, err := s.ShootGardenerTest.GardenClient.GardenCore().CoreV1beta1().Shoots(shootToUpdate.Namespace).Update(shootToUpdate); err != nil { return err } return nil @@ -128,12 +125,12 @@ func (s *SchedulerGardenerTest) ScheduleShoot(ctx context.Context, shoot *garden } // ChooseRegionAndZoneWithNoSeed determines all available Zones from the Shoot and the CloudProfile and then delegates the choosing of a region were no seed is deployed -func (s *SchedulerGardenerTest) ChooseRegionAndZoneWithNoSeed() (*gardencorev1alpha1.Region, error) { +func (s *SchedulerGardenerTest) ChooseRegionAndZoneWithNoSeed() (*gardencorev1beta1.Region, error) { return ChooseRegionAndZoneWithNoSeed(s.CloudProfile.Spec.Regions, s.Seeds) } // ChooseRegionAndZoneWithNoSeed chooses a region within the cloud provider of the shoot were no seed is deployed and that is allowed by the cloud profile -func ChooseRegionAndZoneWithNoSeed(regions []gardencorev1alpha1.Region, seeds []gardencorev1alpha1.Seed) (*gardencorev1alpha1.Region, error) { +func ChooseRegionAndZoneWithNoSeed(regions []gardencorev1beta1.Region, seeds []gardencorev1beta1.Seed) (*gardencorev1beta1.Region, error) { if len(regions) == 0 { return nil, fmt.Errorf("no regions configured in CloudProfile") } @@ -156,7 +153,7 @@ func ChooseRegionAndZoneWithNoSeed(regions []gardencorev1alpha1.Region, seeds [] // ChooseSeedWhereTestShootIsNotDeployed determines a Seed different from the shoot's seed using the same Provider(e.g aws) // If none can be found, it returns an error -func (s *SchedulerGardenerTest) ChooseSeedWhereTestShootIsNotDeployed(shoot *gardencorev1alpha1.Shoot) (*gardencorev1alpha1.Seed, error) { +func (s *SchedulerGardenerTest) ChooseSeedWhereTestShootIsNotDeployed(shoot *gardencorev1beta1.Shoot) (*gardencorev1beta1.Seed, error) { for _, seed := range s.Seeds { if seed.Name != *shoot.Spec.SeedName && seed.Spec.Provider.Type == shoot.Spec.Provider.Type { return &seed, nil @@ -169,7 +166,7 @@ func (s *SchedulerGardenerTest) ChooseSeedWhereTestShootIsNotDeployed(shoot *gar // WaitForShootToBeUnschedulable waits for the shoot to be unschedulable. This is indicated by Events created by the scheduler on the shoot func (s *SchedulerGardenerTest) WaitForShootToBeUnschedulable(ctx context.Context) error { return retry.Until(ctx, 2*time.Second, func(ctx context.Context) (bool, error) { - shoot := &gardencorev1alpha1.Shoot{} + shoot := &gardencorev1beta1.Shoot{} err := s.ShootGardenerTest.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.ShootGardenerTest.Shoot.Namespace, Name: s.ShootGardenerTest.Shoot.Name}, shoot) if err != nil { return false, err @@ -197,7 +194,7 @@ func (s *SchedulerGardenerTest) WaitForShootToBeUnschedulable(ctx context.Contex // WaitForShootToBeScheduled waits for the shoot to be scheduled successfully func (s *SchedulerGardenerTest) WaitForShootToBeScheduled(ctx context.Context) error { return retry.Until(ctx, 2*time.Second, func(ctx context.Context) (bool, error) { - shoot := &gardencorev1alpha1.Shoot{} + shoot := &gardencorev1beta1.Shoot{} err := s.ShootGardenerTest.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.ShootGardenerTest.Shoot.Namespace, Name: s.ShootGardenerTest.Shoot.Name}, shoot) if err != nil { return retry.SevereError(err) @@ -214,7 +211,7 @@ func (s *SchedulerGardenerTest) WaitForShootToBeScheduled(ctx context.Context) e } // GenerateInvalidShoot generates a shoot with an invalid dummy name -func (s *SchedulerGardenerTest) GenerateInvalidShoot() (*gardencorev1alpha1.Shoot, error) { +func (s *SchedulerGardenerTest) GenerateInvalidShoot() (*gardencorev1beta1.Shoot, error) { shoot := s.ShootGardenerTest.Shoot.DeepCopy() randomString, err := utils.GenerateRandomString(10) if err != nil { @@ -225,7 +222,7 @@ func (s *SchedulerGardenerTest) GenerateInvalidShoot() (*gardencorev1alpha1.Shoo } // GenerateInvalidSeed generates a seed with an invalid dummy name -func (s *SchedulerGardenerTest) GenerateInvalidSeed() (*gardencorev1alpha1.Seed, error) { +func (s *SchedulerGardenerTest) GenerateInvalidSeed() (*gardencorev1beta1.Seed, error) { validSeed := s.Seeds[0] if len(validSeed.Name) == 0 { return nil, fmt.Errorf("failed to retrieve a valid seed from the current cluster") diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/shoot_maintenance_operations.go b/vendor/github.com/gardener/gardener/test/integration/framework/shoot_maintenance_operations.go index 45aa5688f..ffc6b9b1a 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/shoot_maintenance_operations.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/shoot_maintenance_operations.go @@ -19,23 +19,23 @@ import ( "fmt" "time" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/util/retry" - "sigs.k8s.io/controller-runtime/pkg/client" - - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - "github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "github.com/gardener/gardener/pkg/apis/core/v1beta1/helper" "github.com/gardener/gardener/pkg/logger" "github.com/gardener/gardener/pkg/utils" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" + apiequality "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/retry" + "sigs.k8s.io/controller-runtime/pkg/client" ) // NewShootMaintenanceTest creates a new ShootMaintenanceTest func NewShootMaintenanceTest(ctx context.Context, shootGardenTest *ShootGardenerTest, shootMachineImageName *string) (*ShootMaintenanceTest, error) { - cloudProfileForShoot := &gardencorev1alpha1.CloudProfile{} + cloudProfileForShoot := &gardencorev1beta1.CloudProfile{} shoot := shootGardenTest.Shoot if err := shootGardenTest.GardenClient.Client().Get(ctx, client.ObjectKey{Name: shoot.Spec.CloudProfileName}, cloudProfileForShoot); err != nil { return nil, err @@ -54,7 +54,7 @@ func NewShootMaintenanceTest(ctx context.Context, shootGardenTest *ShootGardener }, nil } -func getLatestShootMachineImagePossible(shootMachineImageName *string, profile gardencorev1alpha1.CloudProfile) (*gardencorev1alpha1.ShootMachineImage, error) { +func getLatestShootMachineImagePossible(shootMachineImageName *string, profile gardencorev1beta1.CloudProfile) (*gardencorev1beta1.ShootMachineImage, error) { if shootMachineImageName == nil || len(*shootMachineImageName) == 0 { shootCurrentMachineImage := helper.GetDefaultMachineImageFromCloudProfile(profile) if shootCurrentMachineImage == nil { @@ -78,7 +78,7 @@ func getLatestShootMachineImagePossible(shootMachineImageName *string, profile g } // CreateShoot creates a Shoot Resource -func (s *ShootMaintenanceTest) CreateShoot(ctx context.Context) (*gardencorev1alpha1.Shoot, error) { +func (s *ShootMaintenanceTest) CreateShoot(ctx context.Context) (*gardencorev1beta1.Shoot, error) { _, err := s.ShootGardenerTest.GetShoot(ctx) if !apierrors.IsNotFound(err) { return nil, err @@ -87,18 +87,18 @@ func (s *ShootMaintenanceTest) CreateShoot(ctx context.Context) (*gardencorev1al } // CleanupCloudProfile tries to update the CloudProfile with retries to make sure the machine image version & kubernetes version introduced during the integration test is being removed -func (s *ShootMaintenanceTest) CleanupCloudProfile(ctx context.Context, testMachineImage gardencorev1alpha1.ShootMachineImage, testKubernetesVersions []gardencorev1alpha1.ExpirableVersion) error { +func (s *ShootMaintenanceTest) CleanupCloudProfile(ctx context.Context, testMachineImage gardencorev1beta1.ShootMachineImage, testKubernetesVersions []gardencorev1beta1.ExpirableVersion) error { var ( attempt int ) if err := retry.RetryOnConflict(retry.DefaultBackoff, func() (err error) { - existingCloudProfile := &gardencorev1alpha1.CloudProfile{} + existingCloudProfile := &gardencorev1beta1.CloudProfile{} if err = s.ShootGardenerTest.GardenClient.Client().Get(ctx, client.ObjectKey{Name: s.ShootGardenerTest.Shoot.Spec.CloudProfileName}, existingCloudProfile); err != nil { return err } // clean machine image - removedCloudProfileImages := []gardencorev1alpha1.MachineImage{} + removedCloudProfileImages := []gardencorev1beta1.MachineImage{} for _, image := range existingCloudProfile.Spec.MachineImages { versionExists, index := helper.ShootMachineImageVersionExists(image, testMachineImage) if versionExists { @@ -109,7 +109,7 @@ func (s *ShootMaintenanceTest) CleanupCloudProfile(ctx context.Context, testMach existingCloudProfile.Spec.MachineImages = removedCloudProfileImages // clean kubernetes CloudProfile Version - removedKubernetesVersions := []gardencorev1alpha1.ExpirableVersion{} + removedKubernetesVersions := []gardencorev1beta1.ExpirableVersion{} for _, cloudprofileVersion := range existingCloudProfile.Spec.Kubernetes.Versions { versionShouldBeRemoved := false for _, versionToBeRemoved := range testKubernetesVersions { @@ -125,7 +125,7 @@ func (s *ShootMaintenanceTest) CleanupCloudProfile(ctx context.Context, testMach existingCloudProfile.Spec.Kubernetes.Versions = removedKubernetesVersions // update Cloud Profile to remove the test machine image - if _, err = s.ShootGardenerTest.GardenClient.GardenCore().CoreV1alpha1().CloudProfiles().Update(existingCloudProfile); err != nil { + if _, err = s.ShootGardenerTest.GardenClient.GardenCore().CoreV1beta1().CloudProfiles().Update(existingCloudProfile); err != nil { logger.Logger.Errorf("attempt %d failed to update CloudProfile %s due to %v", attempt, existingCloudProfile.Name, err) return err } @@ -138,9 +138,9 @@ func (s *ShootMaintenanceTest) CleanupCloudProfile(ctx context.Context, testMach } // WaitForExpectedMachineImageMaintenance polls a shoot until the given deadline is exceeded. Checks if the shoot's machine image equals the targetImage and if an image update is required. -func (s *ShootMaintenanceTest) WaitForExpectedMachineImageMaintenance(ctx context.Context, targetMachineImage gardencorev1alpha1.ShootMachineImage, imageUpdateRequired bool, deadline time.Time) error { +func (s *ShootMaintenanceTest) WaitForExpectedMachineImageMaintenance(ctx context.Context, targetMachineImage gardencorev1beta1.ShootMachineImage, imageUpdateRequired bool, deadline time.Time) error { return wait.PollImmediateUntil(2*time.Second, func() (bool, error) { - shoot := &gardencorev1alpha1.Shoot{} + shoot := &gardencorev1beta1.Shoot{} err := s.ShootGardenerTest.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.ShootGardenerTest.Shoot.Namespace, Name: s.ShootGardenerTest.Shoot.Name}, shoot) if err != nil { return false, err @@ -173,7 +173,7 @@ func (s *ShootMaintenanceTest) WaitForExpectedMachineImageMaintenance(ctx contex // WaitForExpectedKubernetesVersionMaintenance polls a shoot until the given deadline is exceeded. Checks if the shoot's kubernetes version equals the targetVersion and if an kubernetes version update is required. func (s *ShootMaintenanceTest) WaitForExpectedKubernetesVersionMaintenance(ctx context.Context, targetVersion string, kubernetesVersionUpdateRequired bool, deadline time.Time) error { return wait.PollImmediateUntil(2*time.Second, func() (bool, error) { - shoot := &gardencorev1alpha1.Shoot{} + shoot := &gardencorev1beta1.Shoot{} err := s.ShootGardenerTest.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.ShootGardenerTest.Shoot.Namespace, Name: s.ShootGardenerTest.Shoot.Name}, shoot) if err != nil { return false, err @@ -198,8 +198,10 @@ func (s *ShootMaintenanceTest) WaitForExpectedKubernetesVersionMaintenance(ctx c } // TryUpdateShootForMachineImageMaintenance tries to update the maintenance section of the shoot spec regarding the machine image -func (s *ShootMaintenanceTest) TryUpdateShootForMachineImageMaintenance(ctx context.Context, shootToUpdate *gardencorev1alpha1.Shoot, updateMachineImage bool, workers []gardencorev1alpha1.Worker) error { - _, err := kutil.TryUpdateShoot(s.ShootGardenerTest.GardenClient.GardenCore(), retry.DefaultBackoff, shootToUpdate.ObjectMeta, func(shoot *gardencorev1alpha1.Shoot) (*gardencorev1alpha1.Shoot, error) { +func (s *ShootMaintenanceTest) TryUpdateShootForMachineImageMaintenance(ctx context.Context, shootToUpdate *gardencorev1beta1.Shoot, updateMachineImage bool, workers []gardencorev1beta1.Worker) error { + shoot := &gardencorev1beta1.Shoot{ObjectMeta: shootToUpdate.ObjectMeta} + + return kutil.TryUpdate(ctx, retry.DefaultBackoff, s.ShootGardenerTest.GardenClient.Client(), shoot, func() error { if shootToUpdate.Spec.Maintenance.AutoUpdate != nil { shoot.Spec.Maintenance.AutoUpdate.MachineImageVersion = shootToUpdate.Spec.Maintenance.AutoUpdate.MachineImageVersion } @@ -207,90 +209,62 @@ func (s *ShootMaintenanceTest) TryUpdateShootForMachineImageMaintenance(ctx cont if updateMachineImage { shoot.Spec.Provider.Workers = workers } - return shoot, nil + return nil }) - return err } // TryUpdateShootForKubernetesMaintenance tries to update the maintenance section of the shoot spec regarding the Kubernetes version -func (s *ShootMaintenanceTest) TryUpdateShootForKubernetesMaintenance(ctx context.Context, shootToUpdate *gardencorev1alpha1.Shoot) error { - _, err := kutil.TryUpdateShoot(s.ShootGardenerTest.GardenClient.GardenCore(), retry.DefaultBackoff, shootToUpdate.ObjectMeta, func(shoot *gardencorev1alpha1.Shoot) (*gardencorev1alpha1.Shoot, error) { +func (s *ShootMaintenanceTest) TryUpdateShootForKubernetesMaintenance(ctx context.Context, shootToUpdate *gardencorev1beta1.Shoot) error { + shoot := &gardencorev1beta1.Shoot{ObjectMeta: shootToUpdate.ObjectMeta} + + return kutil.TryUpdate(ctx, retry.DefaultBackoff, s.ShootGardenerTest.GardenClient.Client(), shoot, func() error { shoot.Spec.Maintenance.AutoUpdate.KubernetesVersion = shootToUpdate.Spec.Maintenance.AutoUpdate.KubernetesVersion shoot.Annotations = utils.MergeStringMaps(shoot.Annotations, shootToUpdate.Annotations) - return shoot, nil + return nil }) - return err } // TryUpdateCloudProfileForMaintenance tries to update the images of the Cloud Profile -func (s *ShootMaintenanceTest) TryUpdateCloudProfileForMaintenance(ctx context.Context, shoot *gardencorev1alpha1.Shoot, testMachineImage gardencorev1alpha1.ShootMachineImage, expirationDate *metav1.Time) error { - var attempt int - err := retry.RetryOnConflict(retry.DefaultBackoff, func() (err error) { - attempt++ - cloudProfileForShoot := &gardencorev1alpha1.CloudProfile{} - err = s.ShootGardenerTest.GardenClient.Client().Get(ctx, client.ObjectKey{Name: shoot.Spec.CloudProfileName}, cloudProfileForShoot) - if err != nil { - return err - } +func (s *ShootMaintenanceTest) TryUpdateCloudProfileForMaintenance(ctx context.Context, shoot *gardencorev1beta1.Shoot, testMachineImage gardencorev1beta1.ShootMachineImage, expirationDate *metav1.Time) error { + cloudProfile := &gardencorev1beta1.CloudProfile{ + ObjectMeta: metav1.ObjectMeta{ + Name: shoot.Spec.CloudProfileName, + }, + } + return kutil.TryUpdate(ctx, retry.DefaultBackoff, s.ShootGardenerTest.GardenClient.Client(), cloudProfile, func() error { // update Cloud Profile with expirationDate for integration test machine image - cloudProfileImagesToUpdate := []gardencorev1alpha1.MachineImage{} - for _, image := range cloudProfileForShoot.Spec.MachineImages { + cloudProfileImagesToUpdate := []gardencorev1beta1.MachineImage{} + for _, image := range cloudProfile.Spec.MachineImages { versionExists, index := helper.ShootMachineImageVersionExists(image, testMachineImage) if versionExists { image.Versions[index].ExpirationDate = expirationDate } - cloudProfileImagesToUpdate = append(cloudProfileImagesToUpdate, image) } - cloudProfileForShoot.Spec.MachineImages = cloudProfileImagesToUpdate - - _, err = s.ShootGardenerTest.GardenClient.GardenCore().CoreV1alpha1().CloudProfiles().Update(cloudProfileForShoot) - if err != nil { - logger.Logger.Errorf("Attempt %d failed to update CloudProfile %s due to %v", attempt, cloudProfileForShoot.Name, err) - return err - } + cloudProfile.Spec.MachineImages = cloudProfileImagesToUpdate return nil }) - if err != nil { - logger.Logger.Errorf("Failed to updated CloudProfile after %d attempts due to %v", attempt, err) - return err - } - return nil } // TryUpdateCloudProfileForKubernetesVersionMaintenance tries to update the images of the Cloud Profile -func (s *ShootMaintenanceTest) TryUpdateCloudProfileForKubernetesVersionMaintenance(ctx context.Context, shoot *gardencorev1alpha1.Shoot, targetVersion string, expirationDateInNearFuture *metav1.Time) error { - var attempt int - - err := retry.RetryOnConflict(retry.DefaultBackoff, func() (err error) { - attempt++ - cloudProfileForShoot := &gardencorev1alpha1.CloudProfile{} - err = s.ShootGardenerTest.GardenClient.Client().Get(ctx, client.ObjectKey{Name: shoot.Spec.CloudProfileName}, cloudProfileForShoot) - if err != nil { - return err - } +func (s *ShootMaintenanceTest) TryUpdateCloudProfileForKubernetesVersionMaintenance(ctx context.Context, shoot *gardencorev1beta1.Shoot, targetVersion string, expirationDateInNearFuture *metav1.Time) error { + cloudProfile := &gardencorev1beta1.CloudProfile{ + ObjectMeta: metav1.ObjectMeta{ + Name: shoot.Spec.CloudProfileName, + }, + } + return kutil.TryUpdate(ctx, retry.DefaultBackoff, s.ShootGardenerTest.GardenClient.Client(), cloudProfile, func() error { // update kubernetes version in cloud profile with an expiration date - cloudProfileKubernetesVersionsToUpdate := []gardencorev1alpha1.ExpirableVersion{} - for _, version := range cloudProfileForShoot.Spec.Kubernetes.Versions { + cloudProfileKubernetesVersionsToUpdate := []gardencorev1beta1.ExpirableVersion{} + for _, version := range cloudProfile.Spec.Kubernetes.Versions { if version.Version == targetVersion { version.ExpirationDate = expirationDateInNearFuture } cloudProfileKubernetesVersionsToUpdate = append(cloudProfileKubernetesVersionsToUpdate, version) } - cloudProfileForShoot.Spec.Kubernetes.Versions = cloudProfileKubernetesVersionsToUpdate - - _, err = s.ShootGardenerTest.GardenClient.GardenCore().CoreV1alpha1().CloudProfiles().Update(cloudProfileForShoot) - if err != nil { - logger.Logger.Errorf("Attempt %d failed to update CloudProfile %s due to %v", attempt, cloudProfileForShoot.Name, err) - return err - } + cloudProfile.Spec.Kubernetes.Versions = cloudProfileKubernetesVersionsToUpdate return nil }) - if err != nil { - logger.Logger.Errorf("Failed to updated CloudProfile after %d attempts due to %v", attempt, err) - return err - } - return nil } diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/shoot_operations.go b/vendor/github.com/gardener/gardener/test/integration/framework/shoot_operations.go index 03a2ce7b4..17ca0a873 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/shoot_operations.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/shoot_operations.go @@ -19,23 +19,19 @@ import ( "fmt" "time" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" - "github.com/gardener/gardener/pkg/utils/retry" - + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/client/kubernetes" - - "sigs.k8s.io/controller-runtime/pkg/client" + "github.com/gardener/gardener/pkg/operation/common" + "github.com/gardener/gardener/pkg/utils/retry" "github.com/sirupsen/logrus" - apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/gardener/gardener/pkg/operation/common" + "sigs.k8s.io/controller-runtime/pkg/client" ) // NewShootGardenerTest creates a new shootGardenerTest object, given an already created shoot (created after parsing a shoot YAML) -func NewShootGardenerTest(kubeconfig string, shoot *gardencorev1alpha1.Shoot, logger *logrus.Logger) (*ShootGardenerTest, error) { +func NewShootGardenerTest(kubeconfig string, shoot *gardencorev1beta1.Shoot, logger *logrus.Logger) (*ShootGardenerTest, error) { if len(kubeconfig) == 0 { return nil, fmt.Errorf("please specify the kubeconfig path correctly") } @@ -49,7 +45,7 @@ func NewShootGardenerTest(kubeconfig string, shoot *gardencorev1alpha1.Shoot, lo return nil, err } - cloudProfileForShoot := &gardencorev1alpha1.CloudProfile{} + cloudProfileForShoot := &gardencorev1beta1.CloudProfile{} if shoot != nil && len(shoot.Spec.CloudProfileName) != 0 { if err := k8sGardenClient.Client().Get(context.TODO(), client.ObjectKey{Namespace: "garden", Name: shoot.Spec.CloudProfileName}, cloudProfileForShoot); err != nil { return nil, err @@ -65,8 +61,8 @@ func NewShootGardenerTest(kubeconfig string, shoot *gardencorev1alpha1.Shoot, lo } // GetShoot gets the test shoot -func (s *ShootGardenerTest) GetShoot(ctx context.Context) (*gardencorev1alpha1.Shoot, error) { - shoot := &gardencorev1alpha1.Shoot{} +func (s *ShootGardenerTest) GetShoot(ctx context.Context) (*gardencorev1beta1.Shoot, error) { + shoot := &gardencorev1beta1.Shoot{} err := s.GardenClient.Client().Get(ctx, client.ObjectKey{ Namespace: s.Shoot.Namespace, Name: s.Shoot.Name, @@ -79,7 +75,7 @@ func (s *ShootGardenerTest) GetShoot(ctx context.Context) (*gardencorev1alpha1.S } // CreateShootResource creates a shoot from a shoot Object -func (s *ShootGardenerTest) CreateShootResource(ctx context.Context, shootToCreate *gardencorev1alpha1.Shoot) (*gardencorev1alpha1.Shoot, error) { +func (s *ShootGardenerTest) CreateShootResource(ctx context.Context, shootToCreate *gardencorev1beta1.Shoot) (*gardencorev1beta1.Shoot, error) { shoot := s.Shoot if err := s.GardenClient.Client().Create(ctx, shoot); err != nil { return nil, err @@ -90,7 +86,7 @@ func (s *ShootGardenerTest) CreateShootResource(ctx context.Context, shootToCrea } // CreateShoot Creates a shoot from a shoot Object and waits until it is successfully reconciled -func (s *ShootGardenerTest) CreateShoot(ctx context.Context) (*gardencorev1alpha1.Shoot, error) { +func (s *ShootGardenerTest) CreateShoot(ctx context.Context) (*gardencorev1beta1.Shoot, error) { _, err := s.GetShoot(ctx) if !apierrors.IsNotFound(err) { return nil, err @@ -120,17 +116,17 @@ func (s *ShootGardenerTest) CreateShoot(ctx context.Context) (*gardencorev1alpha } // UpdateShootFunc represents a function that mutates the shoot to be updated -type UpdateShootFunc = func(shoot *gardencorev1alpha1.Shoot) error +type UpdateShootFunc = func(shoot *gardencorev1beta1.Shoot) error // UpdateShoot Updates a shoot from a shoot Object and waits for its reconciliation -func (s *ShootGardenerTest) UpdateShoot(ctx context.Context, shoot *gardencorev1alpha1.Shoot, update UpdateShootFunc) (*gardencorev1alpha1.Shoot, error) { +func (s *ShootGardenerTest) UpdateShoot(ctx context.Context, shoot *gardencorev1beta1.Shoot, update UpdateShootFunc) (*gardencorev1beta1.Shoot, error) { err := retry.UntilTimeout(ctx, 20*time.Second, 5*time.Minute, func(ctx context.Context) (done bool, err error) { key, err := client.ObjectKeyFromObject(shoot) if err != nil { return retry.SevereError(err) } - updatedShoot := &gardencorev1alpha1.Shoot{} + updatedShoot := &gardencorev1beta1.Shoot{} if err := s.GardenClient.Client().Get(ctx, key, updatedShoot); err != nil { return retry.MinorError(err) } @@ -319,7 +315,7 @@ func (s *ShootGardenerTest) AnnotateShoot(ctx context.Context, annotations map[s // WaitForShootToBeCreated waits for the shoot to be created func (s *ShootGardenerTest) WaitForShootToBeCreated(ctx context.Context) error { return retry.UntilTimeout(ctx, 30*time.Second, 60*time.Minute, func(ctx context.Context) (done bool, err error) { - shoot := &gardencorev1alpha1.Shoot{} + shoot := &gardencorev1beta1.Shoot{} err = s.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.Shoot.Namespace, Name: s.Shoot.Name}, shoot) if err != nil { s.Logger.Infof("Error while waiting for shoot to be created: %s", err.Error()) @@ -339,7 +335,7 @@ func (s *ShootGardenerTest) WaitForShootToBeCreated(ctx context.Context) error { // WaitForShootToBeReconciled waits for the shoot to be successfully reconciled func (s *ShootGardenerTest) WaitForShootToBeReconciled(ctx context.Context) error { return retry.UntilTimeout(ctx, 30*time.Second, 60*time.Minute, func(ctx context.Context) (done bool, err error) { - shoot := &gardencorev1alpha1.Shoot{} + shoot := &gardencorev1beta1.Shoot{} err = s.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.Shoot.Namespace, Name: s.Shoot.Name}, shoot) if err != nil { s.Logger.Infof("Error while waiting for shoot to be reconciled: %s", err.Error()) @@ -359,7 +355,7 @@ func (s *ShootGardenerTest) WaitForShootToBeReconciled(ctx context.Context) erro // WaitForShootToBeDeleted waits for the shoot to be deleted func (s *ShootGardenerTest) WaitForShootToBeDeleted(ctx context.Context) error { return retry.UntilTimeout(ctx, 30*time.Second, 60*time.Minute, func(ctx context.Context) (done bool, err error) { - shoot := &gardencorev1alpha1.Shoot{} + shoot := &gardencorev1beta1.Shoot{} err = s.GardenClient.Client().Get(ctx, client.ObjectKey{Namespace: s.Shoot.Namespace, Name: s.Shoot.Name}, shoot) if err != nil { if apierrors.IsNotFound(err) { @@ -383,7 +379,7 @@ func (s *ShootGardenerTest) SetupShootWorker(workerZone *string) error { } // clear current workers - s.Shoot.Spec.Provider.Workers = []gardencorev1alpha1.Worker{} + s.Shoot.Spec.Provider.Workers = []gardencorev1beta1.Worker{} if err := AddWorker(s.Shoot, s.CloudProfile, s.CloudProfile.Spec.MachineImages[0], workerZone); err != nil { return err diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/types.go b/vendor/github.com/gardener/gardener/test/integration/framework/types.go index bc162df49..ed4493245 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/types.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/types.go @@ -18,11 +18,11 @@ import ( "fmt" "path/filepath" - "github.com/sirupsen/logrus" - - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/scheduler/apis/config" + + "github.com/sirupsen/logrus" ) // Helm is the home for the HELM repo @@ -60,37 +60,37 @@ func (h Helm) CacheIndex(name string) string { type ShootGardenerTest struct { GardenClient kubernetes.Interface - Shoot *gardencorev1alpha1.Shoot - CloudProfile *gardencorev1alpha1.CloudProfile + Shoot *gardencorev1beta1.Shoot + CloudProfile *gardencorev1beta1.CloudProfile Logger *logrus.Logger } // SchedulerGardenerTest represents an instance of scheduler tests which contains a shoot test & adds the scheduler configuration type SchedulerGardenerTest struct { ShootGardenerTest *ShootGardenerTest - CloudProfile *gardencorev1alpha1.CloudProfile + CloudProfile *gardencorev1beta1.CloudProfile SchedulerConfiguration *config.SchedulerConfiguration - Seeds []gardencorev1alpha1.Seed + Seeds []gardencorev1beta1.Seed } // ShootMaintenanceTest contains all necessary data for the shoot maintenance integration test type ShootMaintenanceTest struct { ShootGardenerTest *ShootGardenerTest - CloudProfile *gardencorev1alpha1.CloudProfile - ShootMachineImage gardencorev1alpha1.ShootMachineImage + CloudProfile *gardencorev1beta1.CloudProfile + ShootMachineImage gardencorev1beta1.ShootMachineImage } // WorkerGardenerTest represents an instance of worker tests which contains a shoot test & adds the worker configuration type WorkerGardenerTest struct { ShootGardenerTest *ShootGardenerTest - CloudProfile *gardencorev1alpha1.CloudProfile + CloudProfile *gardencorev1beta1.CloudProfile ShootClient kubernetes.Interface } // PlantTest represents an instance of shoot tests which entails all necessary data type PlantTest struct { GardenClient kubernetes.Interface - Plant *gardencorev1alpha1.Plant + Plant *gardencorev1beta1.Plant kubeconfigPathExternalCluster string //PlantSecret *v1.Secret Logger *logrus.Logger @@ -103,10 +103,10 @@ type GardenerTestOperation struct { SeedClient kubernetes.Interface ShootClient kubernetes.Interface - Seed *gardencorev1alpha1.Seed - CloudProfile *gardencorev1alpha1.CloudProfile - Shoot *gardencorev1alpha1.Shoot - Project *gardencorev1alpha1.Project + Seed *gardencorev1beta1.Seed + CloudProfile *gardencorev1beta1.CloudProfile + Shoot *gardencorev1beta1.Shoot + Project *gardencorev1beta1.Project } // HelmAccess is a struct that holds the helm home diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/utils.go b/vendor/github.com/gardener/gardener/test/integration/framework/utils.go index d23389bc2..9b958333f 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/utils.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/utils.go @@ -22,15 +22,14 @@ import ( "strings" "time" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/gardener/gardener/pkg/client/kubernetes" "github.com/gardener/gardener/pkg/operation/common" scheduler "github.com/gardener/gardener/pkg/scheduler/controller/shoot" kutil "github.com/gardener/gardener/pkg/utils/kubernetes" - utilclient "github.com/gardener/gardener/pkg/utils/kubernetes/client" "github.com/gardener/gardener/pkg/utils/kubernetes/health" "github.com/gardener/gardener/pkg/utils/retry" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -75,18 +74,13 @@ func (o *GardenerTestOperation) GetPodsByLabels(ctx context.Context, labelsSelec podList := &corev1.PodList{} err := c.Client().List(ctx, podList, client.InNamespace(namespace), - utilclient.MatchingLabelsSelector{Selector: labelsSelector}) + client.MatchingLabelsSelector{Selector: labelsSelector}) if err != nil { return nil, err } return podList, nil } -// getAdminPassword gets the admin password for authenticating against the api -func (o *GardenerTestOperation) getAdminPassword(ctx context.Context) (string, error) { - return GetObjectFromSecret(ctx, o.SeedClient, o.ShootSeedNamespace(), common.KubecfgSecretName, password) -} - // getAdminToken gets the admin token for authenticating against the api func (o *GardenerTestOperation) getAdminToken(ctx context.Context) (string, error) { return GetObjectFromSecret(ctx, o.SeedClient, o.ShootSeedNamespace(), common.KubecfgSecretName, token) @@ -157,7 +151,7 @@ func (o *GardenerTestOperation) dashboardAvailableWithBasicAuth(ctx context.Cont return nil } -func (s *ShootGardenerTest) mergePatch(ctx context.Context, oldShoot, newShoot *gardencorev1alpha1.Shoot) error { +func (s *ShootGardenerTest) mergePatch(ctx context.Context, oldShoot, newShoot *gardencorev1beta1.Shoot) error { patchBytes, err := kutil.CreateTwoWayMergePatch(oldShoot, newShoot) if err != nil { return fmt.Errorf("failed to patch bytes") @@ -170,7 +164,7 @@ func (s *ShootGardenerTest) mergePatch(ctx context.Context, oldShoot, newShoot * func getDeploymentListByLabels(ctx context.Context, labelsSelector labels.Selector, namespace string, c kubernetes.Interface) (*appsv1.DeploymentList, error) { deploymentList := &appsv1.DeploymentList{} if err := c.Client().List(ctx, deploymentList, - utilclient.MatchingLabelsSelector{Selector: labelsSelector}); err != nil { + client.MatchingLabelsSelector{Selector: labelsSelector}); err != nil { return nil, err } @@ -178,7 +172,7 @@ func getDeploymentListByLabels(ctx context.Context, labelsSelector labels.Select } // ShootCreationCompleted checks if a shoot is successfully reconciled. -func ShootCreationCompleted(newShoot *gardencorev1alpha1.Shoot) bool { +func ShootCreationCompleted(newShoot *gardencorev1beta1.Shoot) bool { if newShoot.Generation != newShoot.Status.ObservedGeneration { return false } @@ -187,15 +181,15 @@ func ShootCreationCompleted(newShoot *gardencorev1alpha1.Shoot) bool { } for _, condition := range newShoot.Status.Conditions { - if condition.Status != gardencorev1alpha1.ConditionTrue { + if condition.Status != gardencorev1beta1.ConditionTrue { return false } } if newShoot.Status.LastOperation != nil { - if newShoot.Status.LastOperation.Type == gardencorev1alpha1.LastOperationTypeCreate || - newShoot.Status.LastOperation.Type == gardencorev1alpha1.LastOperationTypeReconcile { - if newShoot.Status.LastOperation.State != gardencorev1alpha1.LastOperationStateSucceeded { + if newShoot.Status.LastOperation.Type == gardencorev1beta1.LastOperationTypeCreate || + newShoot.Status.LastOperation.Type == gardencorev1beta1.LastOperationTypeReconcile { + if newShoot.Status.LastOperation.State != gardencorev1beta1.LastOperationStateSucceeded { return false } } @@ -230,13 +224,13 @@ func Exists(path string) (bool, error) { } // plantCreationSuccessful determines, based on the plant condition and Cluster Info, if the Plant was reconciled successfully -func plantCreationSuccessful(plantStatus *gardencorev1alpha1.PlantStatus) bool { +func plantCreationSuccessful(plantStatus *gardencorev1beta1.PlantStatus) bool { if len(plantStatus.Conditions) == 0 { return false } for _, condition := range plantStatus.Conditions { - if condition.Status != gardencorev1alpha1.ConditionTrue { + if condition.Status != gardencorev1beta1.ConditionTrue { return false } } @@ -249,13 +243,13 @@ func plantCreationSuccessful(plantStatus *gardencorev1alpha1.PlantStatus) bool { } // plantReconciledWithStatusUnknown determines, based on the plant status.condition and status.ClusterInfo, if the PlantStatus is 'unknown' -func plantReconciledWithStatusUnknown(plantStatus *gardencorev1alpha1.PlantStatus) bool { +func plantReconciledWithStatusUnknown(plantStatus *gardencorev1beta1.PlantStatus) bool { if len(plantStatus.Conditions) == 0 { return false } for _, condition := range plantStatus.Conditions { - if condition.Status != gardencorev1alpha1.ConditionFalse && condition.Status != gardencorev1alpha1.ConditionUnknown { + if condition.Status != gardencorev1beta1.ConditionFalse && condition.Status != gardencorev1beta1.ConditionUnknown { return false } } @@ -280,18 +274,18 @@ func shootIsUnschedulable(events []corev1.Event) bool { return false } -func shootIsScheduledSuccessfully(newSpec *gardencorev1alpha1.ShootSpec) bool { +func shootIsScheduledSuccessfully(newSpec *gardencorev1beta1.ShootSpec) bool { if newSpec.SeedName != nil { return true } return false } -func setHibernation(shoot *gardencorev1alpha1.Shoot, hibernated bool) { +func setHibernation(shoot *gardencorev1beta1.Shoot, hibernated bool) { if shoot.Spec.Hibernation != nil { shoot.Spec.Hibernation.Enabled = &hibernated } - shoot.Spec.Hibernation = &gardencorev1alpha1.Hibernation{ + shoot.Spec.Hibernation = &gardencorev1beta1.Hibernation{ Enabled: &hibernated, } } diff --git a/vendor/github.com/gardener/gardener/test/integration/framework/worker_operations.go b/vendor/github.com/gardener/gardener/test/integration/framework/worker_operations.go index 928b6e7c0..c17f9db46 100644 --- a/vendor/github.com/gardener/gardener/test/integration/framework/worker_operations.go +++ b/vendor/github.com/gardener/gardener/test/integration/framework/worker_operations.go @@ -16,7 +16,7 @@ package framework import ( "fmt" - gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1" + gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" ) // NewWorkerGardenerTest creates a new NewWorkerGardenerTest @@ -33,7 +33,7 @@ func (s *WorkerGardenerTest) SetupShootWorkers(shootMachineImageName *string, sh } // clear current workers - s.ShootGardenerTest.Shoot.Spec.Provider.Workers = []gardencorev1alpha1.Worker{} + s.ShootGardenerTest.Shoot.Spec.Provider.Workers = []gardencorev1beta1.Worker{} // determine two different machine image names from the CloudProfile if shootMachineImageName == nil || len(*shootMachineImageName) == 0 || shootMachineImageName2 == nil || len(*shootMachineImageName2) == 0 { diff --git a/vendor/k8s.io/cluster-bootstrap/LICENSE b/vendor/k8s.io/cluster-bootstrap/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/k8s.io/cluster-bootstrap/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT 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/k8s.io/cluster-bootstrap/token/api/doc.go b/vendor/k8s.io/cluster-bootstrap/token/api/doc.go new file mode 100644 index 000000000..9bb5d9cdb --- /dev/null +++ b/vendor/k8s.io/cluster-bootstrap/token/api/doc.go @@ -0,0 +1,20 @@ +/* +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 api (k8s.io/cluster-bootstrap/token/api) contains constants and types needed for +// bootstrap tokens as maintained by the BootstrapSigner and TokenCleaner +// controllers (in k8s.io/kubernetes/pkg/controller/bootstrap) +package api // import "k8s.io/cluster-bootstrap/token/api" diff --git a/vendor/k8s.io/cluster-bootstrap/token/api/types.go b/vendor/k8s.io/cluster-bootstrap/token/api/types.go new file mode 100644 index 000000000..3bea78b17 --- /dev/null +++ b/vendor/k8s.io/cluster-bootstrap/token/api/types.go @@ -0,0 +1,112 @@ +/* +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 api + +import ( + "k8s.io/api/core/v1" +) + +const ( + // BootstrapTokenSecretPrefix is the prefix for bootstrap token names. + // Bootstrap tokens secrets must be named in the form + // `bootstrap-token-`. This is the prefix to be used before the + // token ID. + BootstrapTokenSecretPrefix = "bootstrap-token-" + + // SecretTypeBootstrapToken is used during the automated bootstrap process (first + // implemented by kubeadm). It stores tokens that are used to sign well known + // ConfigMaps. They may also eventually be used for authentication. + SecretTypeBootstrapToken v1.SecretType = "bootstrap.kubernetes.io/token" + + // BootstrapTokenIDKey is the id of this token. This can be transmitted in the + // clear and encoded in the name of the secret. It must be a random 6 character + // string that matches the regexp `^([a-z0-9]{6})$`. Required. + BootstrapTokenIDKey = "token-id" + + // BootstrapTokenSecretKey is the actual secret. It must be a random 16 character + // string that matches the regexp `^([a-z0-9]{16})$`. Required. + BootstrapTokenSecretKey = "token-secret" + + // BootstrapTokenExpirationKey is when this token should be expired and no + // longer used. A controller will delete this resource after this time. This + // is an absolute UTC time using RFC3339. If this cannot be parsed, the token + // should be considered invalid. Optional. + BootstrapTokenExpirationKey = "expiration" + + // BootstrapTokenDescriptionKey is a description in human-readable format that + // describes what the bootstrap token is used for. Optional. + BootstrapTokenDescriptionKey = "description" + + // BootstrapTokenExtraGroupsKey is a comma-separated list of group names. + // The bootstrap token will authenticate as these groups in addition to the + // "system:bootstrappers" group. + BootstrapTokenExtraGroupsKey = "auth-extra-groups" + + // BootstrapTokenUsagePrefix is the prefix for the other usage constants that specifies different + // functions of a bootstrap token + BootstrapTokenUsagePrefix = "usage-bootstrap-" + + // BootstrapTokenUsageSigningKey signals that this token should be used to + // sign configs as part of the bootstrap process. Value must be "true". Any + // other value is assumed to be false. Optional. + BootstrapTokenUsageSigningKey = "usage-bootstrap-signing" + + // BootstrapTokenUsageAuthentication signals that this token should be used + // as a bearer token to authenticate against the Kubernetes API. The bearer + // token takes the form "." and authenticates as the + // user "system:bootstrap:" in the "system:bootstrappers" group + // as well as any groups specified using BootstrapTokenExtraGroupsKey. + // Value must be "true". Any other value is assumed to be false. Optional. + BootstrapTokenUsageAuthentication = "usage-bootstrap-authentication" + + // ConfigMapClusterInfo defines the name for the ConfigMap where the information how to connect and trust the cluster exist + ConfigMapClusterInfo = "cluster-info" + + // KubeConfigKey defines at which key in the Data object of the ConfigMap the KubeConfig object is stored + KubeConfigKey = "kubeconfig" + + // JWSSignatureKeyPrefix defines what key prefix the JWS-signed tokens have + JWSSignatureKeyPrefix = "jws-kubeconfig-" + + // BootstrapUserPrefix is the username prefix bootstrapping bearer tokens + // authenticate as. The full username given is "system:bootstrap:". + BootstrapUserPrefix = "system:bootstrap:" + + // BootstrapDefaultGroup is the default group for bootstrapping bearer + // tokens (in addition to any groups from BootstrapTokenExtraGroupsKey). + BootstrapDefaultGroup = "system:bootstrappers" + + // BootstrapGroupPattern is the valid regex pattern that all groups + // assigned to a bootstrap token by BootstrapTokenExtraGroupsKey must match. + // See also util.ValidateBootstrapGroupName() + BootstrapGroupPattern = `\Asystem:bootstrappers:[a-z0-9:-]{0,255}[a-z0-9]\z` + + // BootstrapTokenPattern defines the {id}.{secret} regular expression pattern + BootstrapTokenPattern = `\A([a-z0-9]{6})\.([a-z0-9]{16})\z` + + // BootstrapTokenIDPattern defines token's id regular expression pattern + BootstrapTokenIDPattern = `\A([a-z0-9]{6})\z` + + // BootstrapTokenIDBytes defines the number of bytes used for the Bootstrap Token's ID field + BootstrapTokenIDBytes = 6 + + // BootstrapTokenSecretBytes defines the number of bytes used the Bootstrap Token's Secret field + BootstrapTokenSecretBytes = 16 +) + +// KnownTokenUsages specifies the known functions a token will get. +var KnownTokenUsages = []string{"signing", "authentication"} diff --git a/vendor/k8s.io/cluster-bootstrap/token/util/helpers.go b/vendor/k8s.io/cluster-bootstrap/token/util/helpers.go new file mode 100644 index 000000000..5565cb26d --- /dev/null +++ b/vendor/k8s.io/cluster-bootstrap/token/util/helpers.go @@ -0,0 +1,133 @@ +/* +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 ( + "bufio" + "crypto/rand" + "fmt" + "regexp" + "strings" + + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/cluster-bootstrap/token/api" +) + +// validBootstrapTokenChars defines the characters a bootstrap token can consist of +const validBootstrapTokenChars = "0123456789abcdefghijklmnopqrstuvwxyz" + +var ( + // BootstrapTokenRegexp is a compiled regular expression of TokenRegexpString + BootstrapTokenRegexp = regexp.MustCompile(api.BootstrapTokenPattern) + // BootstrapTokenIDRegexp is a compiled regular expression of TokenIDRegexpString + BootstrapTokenIDRegexp = regexp.MustCompile(api.BootstrapTokenIDPattern) + // BootstrapGroupRegexp is a compiled regular expression of BootstrapGroupPattern + BootstrapGroupRegexp = regexp.MustCompile(api.BootstrapGroupPattern) +) + +// GenerateBootstrapToken generates a new, random Bootstrap Token. +func GenerateBootstrapToken() (string, error) { + tokenID, err := randBytes(api.BootstrapTokenIDBytes) + if err != nil { + return "", err + } + + tokenSecret, err := randBytes(api.BootstrapTokenSecretBytes) + if err != nil { + return "", err + } + + return TokenFromIDAndSecret(tokenID, tokenSecret), nil +} + +// randBytes returns a random string consisting of the characters in +// validBootstrapTokenChars, with the length customized by the parameter +func randBytes(length int) (string, error) { + // len("0123456789abcdefghijklmnopqrstuvwxyz") = 36 which doesn't evenly divide + // the possible values of a byte: 256 mod 36 = 4. Discard any random bytes we + // read that are >= 252 so the bytes we evenly divide the character set. + const maxByteValue = 252 + + var ( + b byte + err error + token = make([]byte, length) + ) + + reader := bufio.NewReaderSize(rand.Reader, length*2) + for i := range token { + for { + if b, err = reader.ReadByte(); err != nil { + return "", err + } + if b < maxByteValue { + break + } + } + + token[i] = validBootstrapTokenChars[int(b)%len(validBootstrapTokenChars)] + } + + return string(token), nil +} + +// TokenFromIDAndSecret returns the full token which is of the form "{id}.{secret}" +func TokenFromIDAndSecret(id, secret string) string { + return fmt.Sprintf("%s.%s", id, secret) +} + +// IsValidBootstrapToken returns whether the given string is valid as a Bootstrap Token and +// in other words satisfies the BootstrapTokenRegexp +func IsValidBootstrapToken(token string) bool { + return BootstrapTokenRegexp.MatchString(token) +} + +// IsValidBootstrapTokenID returns whether the given string is valid as a Bootstrap Token ID and +// in other words satisfies the BootstrapTokenIDRegexp +func IsValidBootstrapTokenID(tokenID string) bool { + return BootstrapTokenIDRegexp.MatchString(tokenID) +} + +// BootstrapTokenSecretName returns the expected name for the Secret storing the +// Bootstrap Token in the Kubernetes API. +func BootstrapTokenSecretName(tokenID string) string { + return fmt.Sprintf("%s%s", api.BootstrapTokenSecretPrefix, tokenID) +} + +// ValidateBootstrapGroupName checks if the provided group name is a valid +// bootstrap group name. Returns nil if valid or a validation error if invalid. +func ValidateBootstrapGroupName(name string) error { + if BootstrapGroupRegexp.Match([]byte(name)) { + return nil + } + return fmt.Errorf("bootstrap group %q is invalid (must match %s)", name, api.BootstrapGroupPattern) +} + +// ValidateUsages validates that the passed in string are valid usage strings for bootstrap tokens. +func ValidateUsages(usages []string) error { + validUsages := sets.NewString(api.KnownTokenUsages...) + invalidUsages := sets.NewString() + for _, usage := range usages { + if !validUsages.Has(usage) { + invalidUsages.Insert(usage) + } + } + if len(invalidUsages) > 0 { + return fmt.Errorf("invalid bootstrap token usage string: %s, valid usage options: %s", strings.Join(invalidUsages.List(), ","), strings.Join(api.KnownTokenUsages, ",")) + } + return nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index c134e998e..d50d3e334 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -128,7 +128,7 @@ github.com/dsnet/compress/internal/errors github.com/dsnet/compress/internal/prefix # github.com/evanphx/json-patch v4.5.0+incompatible github.com/evanphx/json-patch -# github.com/gardener/controller-manager-library v0.0.0-20191022090355-2f744b5822cc +# github.com/gardener/controller-manager-library v0.1.0 github.com/gardener/controller-manager-library/pkg/controllermanager/controller/reconcile/conditions github.com/gardener/controller-manager-library/pkg/ctxutil github.com/gardener/controller-manager-library/pkg/fieldpath @@ -137,16 +137,20 @@ github.com/gardener/controller-manager-library/pkg/kutil github.com/gardener/controller-manager-library/pkg/logger github.com/gardener/controller-manager-library/pkg/resources github.com/gardener/controller-manager-library/pkg/utils -# github.com/gardener/external-dns-management v0.0.0-20190722114702-f6b12f6e4b43 => github.com/gardener/external-dns-management v0.0.0-20190927090840-6659f5a46d13 +# github.com/gardener/external-dns-management v0.7.3 => github.com/gardener/external-dns-management v0.0.0-20190927090840-6659f5a46d13 github.com/gardener/external-dns-management/pkg/apis/dns github.com/gardener/external-dns-management/pkg/apis/dns/v1alpha1 github.com/gardener/external-dns-management/pkg/client/dns/clientset/versioned/scheme -# github.com/gardener/gardener v0.0.0-20191127162005-7672763b3716 +# github.com/gardener/gardener v0.33.1-0.20191217084546-948979065a54 github.com/gardener/gardener/pkg/api/extensions github.com/gardener/gardener/pkg/apis/core +github.com/gardener/gardener/pkg/apis/core/install github.com/gardener/gardener/pkg/apis/core/v1alpha1 github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants github.com/gardener/gardener/pkg/apis/core/v1alpha1/helper +github.com/gardener/gardener/pkg/apis/core/v1beta1 +github.com/gardener/gardener/pkg/apis/core/v1beta1/constants +github.com/gardener/gardener/pkg/apis/core/v1beta1/helper github.com/gardener/gardener/pkg/apis/extensions github.com/gardener/gardener/pkg/apis/extensions/v1alpha1 github.com/gardener/gardener/pkg/apis/extensions/v1alpha1/helper @@ -157,20 +161,24 @@ github.com/gardener/gardener/pkg/chartrenderer github.com/gardener/gardener/pkg/client/core/clientset/versioned github.com/gardener/gardener/pkg/client/core/clientset/versioned/scheme github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1alpha1 +github.com/gardener/gardener/pkg/client/core/clientset/versioned/typed/core/v1beta1 github.com/gardener/gardener/pkg/client/core/informers/externalversions github.com/gardener/gardener/pkg/client/core/informers/externalversions/core github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1alpha1 +github.com/gardener/gardener/pkg/client/core/informers/externalversions/core/v1beta1 github.com/gardener/gardener/pkg/client/core/informers/externalversions/internalinterfaces github.com/gardener/gardener/pkg/client/core/listers/core/v1alpha1 +github.com/gardener/gardener/pkg/client/core/listers/core/v1beta1 github.com/gardener/gardener/pkg/client/extensions/clientset/versioned/scheme github.com/gardener/gardener/pkg/client/garden/clientset/versioned github.com/gardener/gardener/pkg/client/garden/clientset/versioned/scheme github.com/gardener/gardener/pkg/client/garden/clientset/versioned/typed/garden/v1beta1 github.com/gardener/gardener/pkg/client/kubernetes -github.com/gardener/gardener/pkg/controllermanager/controller/utils -github.com/gardener/gardener/pkg/controllermanager/metrics +github.com/gardener/gardener/pkg/controllerutils +github.com/gardener/gardener/pkg/controllerutils/metrics github.com/gardener/gardener/pkg/logger github.com/gardener/gardener/pkg/operation/common +github.com/gardener/gardener/pkg/scheduler github.com/gardener/gardener/pkg/scheduler/apis/config github.com/gardener/gardener/pkg/scheduler/apis/config/v1alpha1 github.com/gardener/gardener/pkg/scheduler/controller/common @@ -193,13 +201,13 @@ github.com/gardener/gardener/pkg/utils/validation/gomega github.com/gardener/gardener/pkg/version github.com/gardener/gardener/test/integration/framework github.com/gardener/gardener/test/integration/shoots -# github.com/gardener/gardener-resource-manager v0.0.0-20191025075317-09173887c1a7 +# github.com/gardener/gardener-resource-manager v0.8.1 github.com/gardener/gardener-resource-manager/pkg/apis/resources github.com/gardener/gardener-resource-manager/pkg/apis/resources/v1alpha1 github.com/gardener/gardener-resource-manager/pkg/manager # github.com/gardener/hvpa-controller v0.0.0-20191014062307-fad3bdf06a25 github.com/gardener/hvpa-controller/api/v1alpha1 -# github.com/gardener/machine-controller-manager v0.0.0-20191118095523-e30355bc7945 +# github.com/gardener/machine-controller-manager v0.25.0 github.com/gardener/machine-controller-manager/pkg/apis/machine github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1 github.com/gardener/machine-controller-manager/pkg/client/clientset/versioned/scheme @@ -792,6 +800,9 @@ k8s.io/client-go/util/homedir k8s.io/client-go/util/keyutil k8s.io/client-go/util/retry k8s.io/client-go/util/workqueue +# k8s.io/cluster-bootstrap v0.0.0-20190816225014-88e17f53ad9d +k8s.io/cluster-bootstrap/token/api +k8s.io/cluster-bootstrap/token/util # k8s.io/code-generator v0.0.0-20190713022532-93d7507fc8ff k8s.io/code-generator/cmd/client-gen k8s.io/code-generator/cmd/client-gen/args