From 868e0864e664bb0cc4b51b57fed5e66efe228020 Mon Sep 17 00:00:00 2001 From: Vince Prignano Date: Wed, 15 Sep 2021 21:39:09 -0700 Subject: [PATCH] :warning: Prepare for v1beta1 Signed-off-by: Vince Prignano --- .gitignore | 1 + Makefile | 37 +- PROJECT | 15 + api/v1alpha3/conversion.go | 130 +- api/v1alpha3/conversion_test.go | 18 +- api/v1alpha3/doc.go | 2 +- api/v1alpha3/zz_generated.conversion.go | 856 ++++---- api/v1alpha4/cluster_types.go | 1 - api/v1alpha4/clusterclass_types.go | 1 - api/v1alpha4/conversion.go | 134 +- api/v1alpha4/doc.go | 2 + api/v1alpha4/groupversion_info.go | 2 + api/v1alpha4/machine_types.go | 1 - api/v1alpha4/machinedeployment_types.go | 1 - api/v1alpha4/machinehealthcheck_types.go | 1 - api/v1alpha4/machineset_types.go | 1 - api/v1alpha4/zz_generated.conversion.go | 1717 +++++++++++++++++ api/v1beta1/cluster_phase_types.go | 55 + api/v1beta1/cluster_types.go | 435 +++++ api/v1beta1/cluster_types_test.go | 197 ++ api/{v1alpha4 => v1beta1}/cluster_webhook.go | 8 +- .../cluster_webhook_test.go | 4 +- api/v1beta1/clusterclass_types.go | 133 ++ .../clusterclass_webhook.go | 6 +- .../clusterclass_webhook_test.go | 2 +- api/v1beta1/common_types.go | 188 ++ api/v1beta1/condition_consts.go | 220 +++ api/v1beta1/condition_types.go | 97 + api/v1beta1/conversion.go | 28 + api/v1beta1/doc.go | 17 + api/v1beta1/groupversion_info.go | 36 + api/{v1alpha4 => v1beta1}/index/cluster.go | 2 +- .../index/cluster_test.go | 2 +- api/{v1alpha4 => v1beta1}/index/index.go | 0 api/{v1alpha4 => v1beta1}/index/machine.go | 2 +- .../index/machine_test.go | 2 +- api/{v1alpha4 => v1beta1}/index/node.go | 0 api/{v1alpha4 => v1beta1}/index/node_test.go | 0 api/v1beta1/machine_phase_types.go | 64 + api/v1beta1/machine_types.go | 276 +++ api/{v1alpha4 => v1beta1}/machine_webhook.go | 8 +- .../machine_webhook_test.go | 4 +- api/v1beta1/machinedeployment_types.go | 311 +++ .../machinedeployment_webhook.go | 8 +- .../machinedeployment_webhook_test.go | 4 +- api/v1beta1/machinehealthcheck_types.go | 170 ++ .../machinehealthcheck_webhook.go | 8 +- .../machinehealthcheck_webhook_test.go | 4 +- api/v1beta1/machineset_types.go | 224 +++ .../machineset_webhook.go | 8 +- .../machineset_webhook_test.go | 4 +- api/v1beta1/zz_generated.deepcopy.go | 1250 ++++++++++++ bootstrap/kubeadm/api/v1alpha3/conversion.go | 89 +- .../kubeadm/api/v1alpha3/conversion_test.go | 18 +- bootstrap/kubeadm/api/v1alpha3/doc.go | 2 +- .../api/v1alpha3/kubeadmconfig_types.go | 2 +- .../kubeadm/api/v1alpha3/webhook_test.go | 5 +- .../api/v1alpha3/zz_generated.conversion.go | 496 ++--- .../api/v1alpha3/zz_generated.deepcopy.go | 8 +- .../kubeadm/api/v1alpha4/condition_consts.go | 2 +- bootstrap/kubeadm/api/v1alpha4/conversion.go | 61 +- bootstrap/kubeadm/api/v1alpha4/doc.go | 2 + .../kubeadm/api/v1alpha4/groupversion_info.go | 2 + .../api/v1alpha4/kubeadmconfig_types.go | 3 +- .../v1alpha4/kubeadmconfigtemplate_types.go | 1 - .../api/v1alpha4/zz_generated.conversion.go | 1432 ++++++++++++++ .../api/v1alpha4/zz_generated.deepcopy.go | 4 +- .../kubeadm/api/v1beta1/condition_consts.go | 61 + bootstrap/kubeadm/api/v1beta1/conversion.go | 27 + bootstrap/kubeadm/api/v1beta1/doc.go | 17 + .../kubeadm/api/v1beta1/groupversion_info.go | 36 + .../kubeadm/api/v1beta1/kubeadm_types.go | 501 +++++ .../kubeadm/api/v1beta1/kubeadm_types_test.go | 188 ++ .../api/v1beta1/kubeadmconfig_types.go | 331 ++++ .../kubeadmconfig_types_test.go | 2 +- .../kubeadmconfig_webhook.go | 4 +- .../kubeadmconfiglist_webhook.go | 2 +- .../v1beta1/kubeadmconfigtemplate_types.go | 57 + .../kubeadmconfigtemplate_webhook.go | 2 +- .../kubeadmconfigtemplatelist_webhook.go | 2 +- .../api/v1beta1/zz_generated.deepcopy.go | 1041 ++++++++++ ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 984 ++++++++++ ...uster.x-k8s.io_kubeadmconfigtemplates.yaml | 981 ++++++++++ .../kubeadm/config/webhook/manifests.yaml | 4 +- .../controllers/kubeadmconfig_controller.go | 6 +- ...ubeadmconfig_controller_reconciler_test.go | 2 +- .../kubeadmconfig_controller_test.go | 6 +- .../kubeadm/internal/cloudinit/cloudinit.go | 2 +- .../internal/cloudinit/cloudinit_test.go | 2 +- .../kubeadm/internal/cloudinit/node_test.go | 2 +- .../locking/control_plane_init_mutex.go | 2 +- .../locking/control_plane_init_mutex_test.go | 2 +- bootstrap/kubeadm/main.go | 12 +- .../bootstraptokenstring.go | 2 +- .../bootstraptokenstring_test.go | 2 +- .../conversion.go | 34 +- .../conversion_test.go | 15 +- .../types/{v1beta1 => upstreamv1beta1}/doc.go | 6 +- .../groupversion_info.go | 2 +- .../{v1beta1 => upstreamv1beta1}/types.go | 2 +- .../zz_generated.conversion.go | 815 ++++++++ .../zz_generated.deepcopy.go | 2 +- .../bootstraptokenstring.go | 2 +- .../bootstraptokenstring_test.go | 2 +- .../types/upstreamv1beta2/conversion.go | 83 + .../conversion_test.go | 13 +- .../types/{v1beta2 => upstreamv1beta2}/doc.go | 6 +- .../groupversion_info.go | 2 +- .../{v1beta2 => upstreamv1beta2}/types.go | 2 +- .../zz_generated.conversion.go | 829 ++++++++ .../zz_generated.deepcopy.go | 2 +- .../bootstraptokenstring.go | 2 +- .../bootstraptokenstring_test.go | 2 +- .../conversion.go | 32 +- .../conversion_test.go | 12 +- .../types/{v1beta3 => upstreamv1beta3}/doc.go | 6 +- .../groupversion_info.go | 2 +- .../{v1beta3 => upstreamv1beta3}/types.go | 2 +- .../zz_generated.conversion.go | 799 ++++++++ .../zz_generated.deepcopy.go | 2 +- bootstrap/kubeadm/types/utils.go | 36 +- bootstrap/kubeadm/types/utils_test.go | 22 +- .../types/v1beta1/zz_generated.conversion.go | 815 -------- bootstrap/kubeadm/types/v1beta2/conversion.go | 91 - .../types/v1beta2/zz_generated.conversion.go | 829 -------- .../types/v1beta3/zz_generated.conversion.go | 799 -------- bootstrap/util/configowner.go | 4 +- bootstrap/util/configowner_test.go | 6 +- .../client/alpha/machinedeployment.go | 2 +- .../client/alpha/rollout_pauser_test.go | 2 +- .../client/alpha/rollout_restarter_test.go | 6 +- .../client/alpha/rollout_resumer_test.go | 2 +- .../client/alpha/rollout_rollbacker.go | 2 +- .../client/alpha/rollout_rollbacker_test.go | 6 +- cmd/clusterctl/client/cluster/components.go | 2 +- .../client/cluster/components_test.go | 2 +- cmd/clusterctl/client/cluster/installer.go | 2 +- cmd/clusterctl/client/cluster/inventory.go | 2 +- cmd/clusterctl/client/cluster/mover.go | 2 +- cmd/clusterctl/client/cluster/mover_test.go | 192 +- cmd/clusterctl/client/cluster/objectgraph.go | 4 +- .../client/cluster/objectgraph_test.go | 506 ++--- .../client/cluster/template_test.go | 4 +- cmd/clusterctl/client/cluster/upgrader.go | 2 +- .../client/cluster/upgrader_info_test.go | 2 +- .../client/cluster/workload_cluster_test.go | 2 +- .../client/repository/components.go | 2 +- .../repository/components_client_test.go | 2 +- .../client/repository/components_test.go | 2 +- .../client/repository/repository_github.go | 2 +- .../client/repository/repository_local.go | 2 +- .../client/repository/repository_memory.go | 2 +- cmd/clusterctl/client/rollout_test.go | 6 +- cmd/clusterctl/client/tree/discovery.go | 2 +- cmd/clusterctl/client/tree/discovery_test.go | 120 +- cmd/clusterctl/client/tree/tree.go | 2 +- cmd/clusterctl/client/tree/tree_test.go | 8 +- cmd/clusterctl/client/tree/util.go | 4 +- cmd/clusterctl/client/upgrade.go | 2 +- cmd/clusterctl/client/upgrade_test.go | 2 +- cmd/clusterctl/cmd/describe_cluster.go | 6 +- cmd/clusterctl/cmd/describe_cluster_test.go | 2 +- cmd/clusterctl/cmd/upgrade_plan.go | 2 +- cmd/clusterctl/internal/scheme/scheme.go | 4 +- cmd/clusterctl/internal/test/contracts.go | 2 +- cmd/clusterctl/internal/test/fake_objects.go | 6 +- cmd/clusterctl/internal/test/fake_proxy.go | 6 +- .../providers/bootstrap/groupversion_info.go | 2 +- .../controlplane/groupversion_info.go | 2 +- .../providers/external/groupversion_info.go | 2 +- .../infrastructure/groupversion_info.go | 2 +- ...r.x-k8s.io_clusterresourcesetbindings.yaml | 88 + ....cluster.x-k8s.io_clusterresourcesets.yaml | 163 ++ .../cluster.x-k8s.io_clusterclasses.yaml | 359 ++++ .../crd/bases/cluster.x-k8s.io_clusters.yaml | 384 ++++ .../cluster.x-k8s.io_machinedeployments.yaml | 458 +++++ .../cluster.x-k8s.io_machinehealthchecks.yaml | 269 +++ .../bases/cluster.x-k8s.io_machinepools.yaml | 405 ++++ .../crd/bases/cluster.x-k8s.io_machines.yaml | 391 ++++ .../bases/cluster.x-k8s.io_machinesets.yaml | 348 ++++ config/webhook/manifests.yaml | 64 +- controllers/cluster_controller.go | 4 +- controllers/cluster_controller_phases.go | 2 +- controllers/cluster_controller_phases_test.go | 10 +- controllers/cluster_controller_test.go | 4 +- controllers/external/testing.go | 2 +- controllers/external/tracker_test.go | 2 +- controllers/external/util.go | 2 +- controllers/external/util_test.go | 2 +- controllers/machine_controller.go | 4 +- controllers/machine_controller_node_labels.go | 2 +- .../machine_controller_node_labels_test.go | 8 +- controllers/machine_controller_noderef.go | 4 +- .../machine_controller_noderef_test.go | 2 +- controllers/machine_controller_phases.go | 2 +- controllers/machine_controller_phases_test.go | 48 +- controllers/machine_controller_test.go | 68 +- controllers/machinedeployment_controller.go | 2 +- .../machinedeployment_controller_test.go | 8 +- controllers/machinedeployment_rolling.go | 2 +- controllers/machinedeployment_rolling_test.go | 2 +- .../machinedeployment_rollout_ondelete.go | 2 +- controllers/machinedeployment_sync.go | 2 +- controllers/machinedeployment_sync_test.go | 2 +- controllers/machinehealthcheck_controller.go | 4 +- .../machinehealthcheck_controller_test.go | 10 +- .../machinehealthcheck_status_matcher_test.go | 2 +- controllers/machinehealthcheck_targets.go | 2 +- .../machinehealthcheck_targets_test.go | 2 +- controllers/machineset_controller.go | 2 +- controllers/machineset_controller_test.go | 16 +- controllers/machineset_delete_policy.go | 2 +- controllers/machineset_delete_policy_test.go | 2 +- controllers/mdutil/util.go | 2 +- controllers/mdutil/util_test.go | 10 +- controllers/noderefutil/indexer.go | 2 +- controllers/noderefutil/machine.go | 2 +- controllers/remote/cluster_cache.go | 2 +- .../remote/cluster_cache_healthcheck_test.go | 2 +- .../remote/cluster_cache_reconciler.go | 2 +- .../remote/cluster_cache_reconciler_test.go | 2 +- .../remote/cluster_cache_tracker_test.go | 2 +- controllers/remote/index.go | 2 +- controllers/schema_test.go | 2 +- controllers/suite_test.go | 4 +- controllers/suite_util_test.go | 2 +- controllers/topology/blueprint.go | 2 +- controllers/topology/blueprint_test.go | 2 +- controllers/topology/cluster_controller.go | 4 +- controllers/topology/current_state.go | 2 +- controllers/topology/current_state_test.go | 2 +- controllers/topology/desired_state.go | 2 +- controllers/topology/desired_state_test.go | 2 +- .../internal/check/compatibility_test.go | 4 +- .../internal/contract/controlplane_test.go | 2 +- .../topology/internal/contract/metadata.go | 2 +- controllers/topology/internal/log/log.go | 2 +- .../topology/internal/scope/blueprint.go | 2 +- controllers/topology/internal/scope/scope.go | 2 +- controllers/topology/internal/scope/state.go | 2 +- .../topology/machinedeployment_controller.go | 2 +- .../machinedeployment_controller_test.go | 2 +- controllers/topology/machineset_controller.go | 2 +- .../topology/machineset_controller_test.go | 2 +- controllers/topology/reconcile_state_test.go | 2 +- controllers/topology/suite_test.go | 2 +- controllers/topology/util.go | 2 +- controllers/topology/util_test.go | 4 +- .../kubeadm/api/v1alpha3/conversion.go | 40 +- .../kubeadm/api/v1alpha3/conversion_test.go | 8 +- controlplane/kubeadm/api/v1alpha3/doc.go | 2 +- .../kubeadm/api/v1alpha3/webhook_test.go | 2 +- .../api/v1alpha3/zz_generated.conversion.go | 162 +- .../kubeadm/api/v1alpha4/conversion.go | 30 +- controlplane/kubeadm/api/v1alpha4/doc.go | 2 + .../kubeadm/api/v1alpha4/groupversion_info.go | 2 + .../v1alpha4/kubeadm_control_plane_types.go | 1 - .../kubeadmcontrolplanetemplate_types.go | 1 - .../api/v1alpha4/zz_generated.conversion.go | 515 +++++ .../kubeadm/api/v1beta1/condition_consts.go | 151 ++ .../kubeadm/api/v1beta1/conversion.go | 20 + controlplane/kubeadm/api/v1beta1/doc.go | 17 + .../kubeadm/api/v1beta1/groupversion_info.go | 36 + .../v1beta1/kubeadm_control_plane_types.go | 243 +++ .../kubeadm_control_plane_webhook.go | 6 +- .../kubeadm_control_plane_webhook_test.go | 4 +- .../kubeadmcontrolplanetemplate_types.go | 57 + .../kubeadmcontrolplanetemplate_webhook.go | 6 +- ...ubeadmcontrolplanetemplate_webhook_test.go | 2 +- .../api/v1beta1/zz_generated.deepcopy.go | 302 +++ ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 1210 ++++++++++++ ...x-k8s.io_kubeadmcontrolplanetemplates.yaml | 1158 +++++++++++ .../kubeadm/config/webhook/manifests.yaml | 16 +- .../kubeadm/controllers/controller.go | 8 +- .../kubeadm/controllers/controller_test.go | 17 +- .../kubeadm/controllers/fakes_test.go | 4 +- controlplane/kubeadm/controllers/helpers.go | 6 +- .../kubeadm/controllers/helpers_test.go | 10 +- .../kubeadm/controllers/remediation.go | 4 +- .../kubeadm/controllers/remediation_test.go | 4 +- controlplane/kubeadm/controllers/scale.go | 4 +- .../kubeadm/controllers/scale_test.go | 6 +- controlplane/kubeadm/controllers/status.go | 4 +- .../kubeadm/controllers/status_test.go | 4 +- .../kubeadm/controllers/suite_test.go | 2 +- controlplane/kubeadm/controllers/upgrade.go | 4 +- .../kubeadm/controllers/upgrade_test.go | 4 +- controlplane/kubeadm/internal/cluster.go | 4 +- .../kubeadm/internal/cluster_labels.go | 4 +- controlplane/kubeadm/internal/cluster_test.go | 2 +- .../kubeadm/internal/control_plane.go | 6 +- .../kubeadm/internal/control_plane_test.go | 6 +- controlplane/kubeadm/internal/filters.go | 6 +- controlplane/kubeadm/internal/filters_test.go | 12 +- .../kubeadm/internal/workload_cluster.go | 6 +- .../internal/workload_cluster_conditions.go | 4 +- .../workload_cluster_conditions_test.go | 6 +- .../internal/workload_cluster_coredns.go | 4 +- .../internal/workload_cluster_coredns_test.go | 4 +- .../kubeadm/internal/workload_cluster_etcd.go | 4 +- .../internal/workload_cluster_etcd_test.go | 2 +- .../kubeadm/internal/workload_cluster_test.go | 34 +- controlplane/kubeadm/main.go | 6 +- ...insulate-users-from-kubeadm-API-changes.md | 16 +- exp/addons/api/v1alpha3/doc.go | 2 +- .../api/v1alpha3/zz_generated.conversion.go | 280 +-- .../api/v1alpha4/clusterresourceset_types.go | 3 +- .../clusterresourcesetbinding_types.go | 1 - exp/addons/api/v1alpha4/condition_consts.go | 2 +- .../api/v1alpha4/zz_generated.deepcopy.go | 6 +- .../api/v1beta1/clusterresourceset_types.go | 139 ++ .../clusterresourceset_webhook.go | 6 +- .../clusterresourceset_webhook_test.go | 2 +- .../clusterresourcesetbinding_types.go | 137 ++ .../clusterresourcesetbinding_types_test.go | 159 ++ exp/addons/api/v1beta1/condition_consts.go | 42 + exp/addons/api/v1beta1/doc.go | 17 + exp/addons/api/v1beta1/groupversion_info.go | 36 + .../api/v1beta1/zz_generated.deepcopy.go | 269 +++ .../clusterresourceset_controller.go | 4 +- .../clusterresourceset_controller_test.go | 4 +- .../controllers/clusterresourceset_helpers.go | 4 +- .../clusterresourceset_helpers_test.go | 4 +- .../clusterresourcesetbinding_controller.go | 4 +- exp/addons/controllers/suite_test.go | 4 +- exp/api/v1alpha3/conversion.go | 14 +- exp/api/v1alpha3/doc.go | 2 +- exp/api/v1alpha3/zz_generated.conversion.go | 112 +- exp/api/v1alpha4/machinepool_types.go | 1 - exp/api/v1alpha4/zz_generated.deepcopy.go | 2 +- exp/api/v1beta1/condition_consts.go | 30 + exp/api/v1beta1/doc.go | 17 + exp/api/v1beta1/groupversion_info.go | 36 + exp/api/v1beta1/machinepool_types.go | 241 +++ .../machinepool_webhook.go | 8 +- .../machinepool_webhook_test.go | 4 +- exp/api/v1beta1/zz_generated.deepcopy.go | 160 ++ exp/controllers/machinepool_controller.go | 4 +- .../machinepool_controller_noderef.go | 4 +- .../machinepool_controller_phases.go | 4 +- .../machinepool_controller_phases_test.go | 48 +- .../machinepool_controller_test.go | 34 +- exp/controllers/suite_test.go | 2 +- exp/util/util.go | 2 +- go.mod | 10 +- go.sum | 55 +- hack/tools/go.mod | 2 +- hack/tools/go.sum | 25 +- internal/envtest/environment.go | 10 +- internal/testtypes/bootstrap.go | 2 +- internal/testtypes/builders.go | 2 +- internal/testtypes/controlplane.go | 2 +- internal/testtypes/crds.go | 4 +- internal/testtypes/infrastructure.go | 2 +- internal/testtypes/remediation.go | 2 +- main.go | 32 +- test/e2e/clusterctl_upgrade.go | 2 +- test/e2e/common.go | 2 +- test/e2e/e2e_suite_test.go | 2 +- test/e2e/kcp_adoption.go | 7 +- test/e2e/node_drain_timeout.go | 5 +- test/e2e/self_hosted.go | 2 +- test/framework/alltypes_helpers.go | 2 +- test/framework/bootstrap/kind_provider.go | 2 +- test/framework/cluster_helpers.go | 2 +- test/framework/cluster_proxy.go | 4 +- .../clusterctl/clusterctl_helpers.go | 6 +- test/framework/clusterresourceset_helpers.go | 4 +- test/framework/control_plane.go | 2 +- test/framework/controlplane_helpers.go | 6 +- test/framework/convenience.go | 14 +- test/framework/deployment_helpers.go | 2 +- test/framework/docker_logcollector.go | 4 +- test/framework/machine_helpers.go | 2 +- test/framework/machinedeployment_helpers.go | 2 +- test/framework/machinehealthcheck_helpers.go | 2 +- test/framework/machinepool_helpers.go | 4 +- test/framework/machines.go | 2 +- test/go.mod | 12 +- test/go.sum | 86 +- test/infrastructure/container/docker.go | 4 +- test/infrastructure/container/interface.go | 4 +- test/infrastructure/docker/Makefile | 5 +- .../docker/api/v1alpha3/conversion.go | 15 +- .../infrastructure/docker/api/v1alpha3/doc.go | 2 +- .../api/v1alpha3/zz_generated.conversion.go | 418 ++-- .../docker/api/v1alpha4/conversion.go | 54 +- .../infrastructure/docker/api/v1alpha4/doc.go | 2 + .../api/v1alpha4/dockercluster_types.go | 1 - .../api/v1alpha4/dockermachine_types.go | 1 - .../v1alpha4/dockermachinetemplate_types.go | 1 - .../docker/api/v1alpha4/groupversion_info.go | 2 + .../api/v1alpha4/zz_generated.conversion.go | 911 +++++++++ .../docker/api/v1beta1/condition_consts.go | 81 + .../docker/api/v1beta1/conversion.go | 26 + test/infrastructure/docker/api/v1beta1/doc.go | 17 + .../docker/api/v1beta1/dockercluster_types.go | 130 ++ .../dockercluster_webhook.go | 6 +- .../v1beta1/dockerclustertemplate_types.go | 57 + .../dockerclustertemplate_webhook.go | 6 +- .../dockerclustertemplate_webhook_test.go | 2 +- .../docker/api/v1beta1/dockermachine_types.go | 129 ++ .../v1beta1/dockermachinetemplate_types.go | 58 + .../dockermachinetemplate_webhook.go | 4 +- .../dockermachinetemplate_webhook_test.go | 2 +- .../docker/api/v1beta1/groupversion_info.go | 36 + .../api/v1beta1/zz_generated.deepcopy.go | 495 +++++ ...cture.cluster.x-k8s.io_dockerclusters.yaml | 156 ++ ...uster.x-k8s.io_dockerclustertemplates.yaml | 100 + ...e.cluster.x-k8s.io_dockermachinepools.yaml | 182 ++ ...cture.cluster.x-k8s.io_dockermachines.yaml | 146 ++ ...uster.x-k8s.io_dockermachinetemplates.yaml | 87 + .../docker/config/crd/kustomization.yaml | 6 +- ...cainjection_in_dockermachinetemplates.yaml | 8 + .../webhook_in_dockermachinetemplates.yaml | 19 + .../docker/config/webhook/manifests.yaml | 20 +- .../controllers/dockercluster_controller.go | 4 +- .../controllers/dockermachine_controller.go | 4 +- .../dockermachine_controller_test.go | 4 +- .../docker/controllers/suite_test.go | 4 +- .../docker/docker/kind_manager.go | 2 +- .../docker/docker/loadbalancer.go | 8 +- test/infrastructure/docker/docker/machine.go | 4 +- .../docker/exp/api/v1alpha3/doc.go | 2 +- .../api/v1alpha3/zz_generated.conversion.go | 190 +- .../api/v1alpha4/dockermachinepool_types.go | 1 - .../api/v1beta1/dockermachinepool_types.go | 149 ++ .../exp/api/v1beta1/groupversion_info.go | 36 + .../exp/api/v1beta1/zz_generated.deepcopy.go | 191 ++ .../dockermachinepool_controller.go | 6 +- .../docker/exp/docker/nodepool.go | 6 +- test/infrastructure/docker/main.go | 20 +- util/annotations/helpers.go | 2 +- util/collections/helpers.go | 2 +- util/collections/machine_collection.go | 2 +- util/collections/machine_collection_test.go | 2 +- util/collections/machine_filters.go | 4 +- util/collections/machine_filters_test.go | 4 +- util/conditions/getter.go | 2 +- util/conditions/getter_test.go | 2 +- util/conditions/matcher.go | 2 +- util/conditions/matcher_test.go | 2 +- util/conditions/matchers.go | 2 +- util/conditions/merge.go | 2 +- util/conditions/merge_strategies.go | 2 +- util/conditions/merge_strategies_test.go | 2 +- util/conditions/merge_test.go | 2 +- util/conditions/patch.go | 2 +- util/conditions/patch_test.go | 2 +- util/conditions/setter.go | 2 +- util/conditions/setter_test.go | 2 +- util/conditions/suite_test.go | 2 +- util/conditions/unstructured.go | 2 +- util/conditions/unstructured_test.go | 2 +- util/conversion/conversion.go | 2 +- util/conversion/conversion_test.go | 2 +- util/deprecated.go | 2 +- util/failuredomains/failure_domains.go | 2 +- util/failuredomains/failure_domains_test.go | 2 +- util/kubeconfig/kubeconfig.go | 2 +- util/kubeconfig/kubeconfig_test.go | 2 +- util/kubeconfig/testing.go | 2 +- util/labels/helpers.go | 2 +- util/labels/helpers_test.go | 2 +- util/patch/options.go | 2 +- util/patch/patch.go | 2 +- util/patch/patch_test.go | 6 +- util/patch/utils_test.go | 2 +- util/predicates/cluster_predicates.go | 2 +- util/secret/certificates.go | 4 +- util/secret/certificates_test.go | 2 +- util/suite_test.go | 2 +- util/util.go | 2 +- util/util_test.go | 16 +- util/yaml/yaml.go | 2 +- util/yaml/yaml_test.go | 30 +- 476 files changed, 27608 insertions(+), 5293 deletions(-) create mode 100644 api/v1alpha4/zz_generated.conversion.go create mode 100644 api/v1beta1/cluster_phase_types.go create mode 100644 api/v1beta1/cluster_types.go create mode 100644 api/v1beta1/cluster_types_test.go rename api/{v1alpha4 => v1beta1}/cluster_webhook.go (92%) rename api/{v1alpha4 => v1beta1}/cluster_webhook_test.go (99%) create mode 100644 api/v1beta1/clusterclass_types.go rename api/{v1alpha4 => v1beta1}/clusterclass_webhook.go (95%) rename api/{v1alpha4 => v1beta1}/clusterclass_webhook_test.go (99%) create mode 100644 api/v1beta1/common_types.go create mode 100644 api/v1beta1/condition_consts.go create mode 100644 api/v1beta1/condition_types.go create mode 100644 api/v1beta1/conversion.go create mode 100644 api/v1beta1/doc.go create mode 100644 api/v1beta1/groupversion_info.go rename api/{v1alpha4 => v1beta1}/index/cluster.go (96%) rename api/{v1alpha4 => v1beta1}/index/cluster_test.go (96%) rename api/{v1alpha4 => v1beta1}/index/index.go (100%) rename api/{v1alpha4 => v1beta1}/index/machine.go (98%) rename api/{v1alpha4 => v1beta1}/index/machine_test.go (98%) rename api/{v1alpha4 => v1beta1}/index/node.go (100%) rename api/{v1alpha4 => v1beta1}/index/node_test.go (100%) create mode 100644 api/v1beta1/machine_phase_types.go create mode 100644 api/v1beta1/machine_types.go rename api/{v1alpha4 => v1beta1}/machine_webhook.go (88%) rename api/{v1alpha4 => v1beta1}/machine_webhook_test.go (99%) create mode 100644 api/v1beta1/machinedeployment_types.go rename api/{v1alpha4 => v1beta1}/machinedeployment_webhook.go (92%) rename api/{v1alpha4 => v1beta1}/machinedeployment_webhook_test.go (99%) create mode 100644 api/v1beta1/machinehealthcheck_types.go rename api/{v1alpha4 => v1beta1}/machinehealthcheck_webhook.go (90%) rename api/{v1alpha4 => v1beta1}/machinehealthcheck_webhook_test.go (99%) create mode 100644 api/v1beta1/machineset_types.go rename api/{v1alpha4 => v1beta1}/machineset_webhook.go (86%) rename api/{v1alpha4 => v1beta1}/machineset_webhook_test.go (98%) create mode 100644 api/v1beta1/zz_generated.deepcopy.go create mode 100644 bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go create mode 100644 bootstrap/kubeadm/api/v1beta1/condition_consts.go create mode 100644 bootstrap/kubeadm/api/v1beta1/conversion.go create mode 100644 bootstrap/kubeadm/api/v1beta1/doc.go create mode 100644 bootstrap/kubeadm/api/v1beta1/groupversion_info.go create mode 100644 bootstrap/kubeadm/api/v1beta1/kubeadm_types.go create mode 100644 bootstrap/kubeadm/api/v1beta1/kubeadm_types_test.go create mode 100644 bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go rename bootstrap/kubeadm/api/{v1alpha4 => v1beta1}/kubeadmconfig_types_test.go (99%) rename bootstrap/kubeadm/api/{v1alpha4 => v1beta1}/kubeadmconfig_webhook.go (91%) rename bootstrap/kubeadm/api/{v1alpha4 => v1beta1}/kubeadmconfiglist_webhook.go (97%) create mode 100644 bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go rename bootstrap/kubeadm/api/{v1alpha4 => v1beta1}/kubeadmconfigtemplate_webhook.go (97%) rename bootstrap/kubeadm/api/{v1alpha4 => v1beta1}/kubeadmconfigtemplatelist_webhook.go (97%) create mode 100644 bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go rename bootstrap/kubeadm/types/{v1beta1 => upstreamv1beta1}/bootstraptokenstring.go (99%) rename bootstrap/kubeadm/types/{v1beta1 => upstreamv1beta1}/bootstraptokenstring_test.go (99%) rename bootstrap/kubeadm/types/{v1beta1 => upstreamv1beta1}/conversion.go (60%) rename bootstrap/kubeadm/types/{v1beta1 => upstreamv1beta1}/conversion_test.go (88%) rename bootstrap/kubeadm/types/{v1beta1 => upstreamv1beta1}/doc.go (78%) rename bootstrap/kubeadm/types/{v1beta1 => upstreamv1beta1}/groupversion_info.go (97%) rename bootstrap/kubeadm/types/{v1beta1 => upstreamv1beta1}/types.go (99%) create mode 100644 bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.conversion.go rename bootstrap/kubeadm/types/{v1beta1 => upstreamv1beta1}/zz_generated.deepcopy.go (99%) rename bootstrap/kubeadm/types/{v1beta2 => upstreamv1beta2}/bootstraptokenstring.go (99%) rename bootstrap/kubeadm/types/{v1beta2 => upstreamv1beta2}/bootstraptokenstring_test.go (99%) create mode 100644 bootstrap/kubeadm/types/upstreamv1beta2/conversion.go rename bootstrap/kubeadm/types/{v1beta2 => upstreamv1beta2}/conversion_test.go (93%) rename bootstrap/kubeadm/types/{v1beta2 => upstreamv1beta2}/doc.go (77%) rename bootstrap/kubeadm/types/{v1beta2 => upstreamv1beta2}/groupversion_info.go (97%) rename bootstrap/kubeadm/types/{v1beta2 => upstreamv1beta2}/types.go (99%) create mode 100644 bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go rename bootstrap/kubeadm/types/{v1beta2 => upstreamv1beta2}/zz_generated.deepcopy.go (99%) rename bootstrap/kubeadm/types/{v1beta3 => upstreamv1beta3}/bootstraptokenstring.go (99%) rename bootstrap/kubeadm/types/{v1beta3 => upstreamv1beta3}/bootstraptokenstring_test.go (99%) rename bootstrap/kubeadm/types/{v1beta3 => upstreamv1beta3}/conversion.go (60%) rename bootstrap/kubeadm/types/{v1beta3 => upstreamv1beta3}/conversion_test.go (93%) rename bootstrap/kubeadm/types/{v1beta3 => upstreamv1beta3}/doc.go (77%) rename bootstrap/kubeadm/types/{v1beta3 => upstreamv1beta3}/groupversion_info.go (97%) rename bootstrap/kubeadm/types/{v1beta3 => upstreamv1beta3}/types.go (99%) create mode 100644 bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go rename bootstrap/kubeadm/types/{v1beta3 => upstreamv1beta3}/zz_generated.deepcopy.go (99%) delete mode 100644 bootstrap/kubeadm/types/v1beta1/zz_generated.conversion.go delete mode 100644 bootstrap/kubeadm/types/v1beta2/conversion.go delete mode 100644 bootstrap/kubeadm/types/v1beta2/zz_generated.conversion.go delete mode 100644 bootstrap/kubeadm/types/v1beta3/zz_generated.conversion.go create mode 100644 controlplane/kubeadm/api/v1alpha4/zz_generated.conversion.go create mode 100644 controlplane/kubeadm/api/v1beta1/condition_consts.go create mode 100644 controlplane/kubeadm/api/v1beta1/conversion.go create mode 100644 controlplane/kubeadm/api/v1beta1/doc.go create mode 100644 controlplane/kubeadm/api/v1beta1/groupversion_info.go create mode 100644 controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go rename controlplane/kubeadm/api/{v1alpha4 => v1beta1}/kubeadm_control_plane_webhook.go (96%) rename controlplane/kubeadm/api/{v1alpha4 => v1beta1}/kubeadm_control_plane_webhook_test.go (99%) create mode 100644 controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go rename controlplane/kubeadm/api/{v1alpha4 => v1beta1}/kubeadmcontrolplanetemplate_webhook.go (84%) rename controlplane/kubeadm/api/{v1alpha4 => v1beta1}/kubeadmcontrolplanetemplate_webhook_test.go (99%) create mode 100644 controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go create mode 100644 exp/addons/api/v1beta1/clusterresourceset_types.go rename exp/addons/api/{v1alpha4 => v1beta1}/clusterresourceset_webhook.go (85%) rename exp/addons/api/{v1alpha4 => v1beta1}/clusterresourceset_webhook_test.go (99%) create mode 100644 exp/addons/api/v1beta1/clusterresourcesetbinding_types.go create mode 100644 exp/addons/api/v1beta1/clusterresourcesetbinding_types_test.go create mode 100644 exp/addons/api/v1beta1/condition_consts.go create mode 100644 exp/addons/api/v1beta1/doc.go create mode 100644 exp/addons/api/v1beta1/groupversion_info.go create mode 100644 exp/addons/api/v1beta1/zz_generated.deepcopy.go create mode 100644 exp/api/v1beta1/condition_consts.go create mode 100644 exp/api/v1beta1/doc.go create mode 100644 exp/api/v1beta1/groupversion_info.go create mode 100644 exp/api/v1beta1/machinepool_types.go rename exp/api/{v1alpha4 => v1beta1}/machinepool_webhook.go (87%) rename exp/api/{v1alpha4 => v1beta1}/machinepool_webhook_test.go (98%) create mode 100644 exp/api/v1beta1/zz_generated.deepcopy.go create mode 100644 test/infrastructure/docker/api/v1alpha4/zz_generated.conversion.go create mode 100644 test/infrastructure/docker/api/v1beta1/condition_consts.go create mode 100644 test/infrastructure/docker/api/v1beta1/conversion.go create mode 100644 test/infrastructure/docker/api/v1beta1/doc.go create mode 100644 test/infrastructure/docker/api/v1beta1/dockercluster_types.go rename test/infrastructure/docker/api/{v1alpha4 => v1beta1}/dockercluster_webhook.go (77%) create mode 100644 test/infrastructure/docker/api/v1beta1/dockerclustertemplate_types.go rename test/infrastructure/docker/api/{v1alpha4 => v1beta1}/dockerclustertemplate_webhook.go (82%) rename test/infrastructure/docker/api/{v1alpha4 => v1beta1}/dockerclustertemplate_webhook_test.go (99%) create mode 100644 test/infrastructure/docker/api/v1beta1/dockermachine_types.go create mode 100644 test/infrastructure/docker/api/v1beta1/dockermachinetemplate_types.go rename test/infrastructure/docker/api/{v1alpha4 => v1beta1}/dockermachinetemplate_webhook.go (86%) rename test/infrastructure/docker/api/{v1alpha4 => v1beta1}/dockermachinetemplate_webhook_test.go (99%) create mode 100644 test/infrastructure/docker/api/v1beta1/groupversion_info.go create mode 100644 test/infrastructure/docker/api/v1beta1/zz_generated.deepcopy.go create mode 100644 test/infrastructure/docker/config/crd/patches/cainjection_in_dockermachinetemplates.yaml create mode 100644 test/infrastructure/docker/config/crd/patches/webhook_in_dockermachinetemplates.yaml create mode 100644 test/infrastructure/docker/exp/api/v1beta1/dockermachinepool_types.go create mode 100644 test/infrastructure/docker/exp/api/v1beta1/groupversion_info.go create mode 100644 test/infrastructure/docker/exp/api/v1beta1/zz_generated.deepcopy.go diff --git a/.gitignore b/.gitignore index 60bcc613a445..b1445ab20620 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ hack/tools/bin # E2E test templates test/e2e/data/infrastructure-docker/v1alpha3/cluster-template*.yaml test/e2e/data/infrastructure-docker/v1alpha4/cluster-template*.yaml +test/e2e/data/infrastructure-docker/v1beta1/cluster-template*.yaml # Output of the go coverage tool, specifically when used with LiteIDE *.out diff --git a/Makefile b/Makefile index 0a4e79173199..ed66bc3a7ba2 100644 --- a/Makefile +++ b/Makefile @@ -253,12 +253,16 @@ ALL_GENERATE_MODULES = core cabpk kcp .PHONY: generate generate: ## Generate code - $(MAKE) generate-manifests generate-go + $(MAKE) generate-manifests generate-go generate-go-conversions $(MAKE) -C $(CAPD_DIR) generate .PHONY: generate-go generate-go: ## Runs Go related generate targets - $(MAKE) $(addprefix generate-go-,$(ALL_GENERATE_MODULES)) $(addprefix generate-go-conversions-,$(ALL_GENERATE_MODULES)) + $(MAKE) $(addprefix generate-go-,$(ALL_GENERATE_MODULES)) + +.PHONY: generate-go-conversions +generate-go-conversions: ## Runs Go related generate targets for conversions + $(MAKE) $(addprefix generate-go-conversions-,$(ALL_GENERATE_MODULES)) .PHONY: generate-go-core generate-go-core: $(CONTROLLER_GEN) @@ -272,15 +276,20 @@ generate-go-core: $(CONTROLLER_GEN) .PHONY: generate-go-conversions-core generate-go-conversions-core: $(CONVERSION_GEN) $(MAKE) clean-generated-conversions SRC_DIRS="./api/v1alpha3,./$(EXP_DIR)/api/v1alpha3,./$(EXP_DIR)/addons/api/v1alpha3" + $(MAKE) clean-generated-conversions SRC_DIRS="./api/v1alpha4,./$(EXP_DIR)/api/v1alpha4,./$(EXP_DIR)/addons/api/v1alpha4" $(CONVERSION_GEN) \ --input-dirs=./api/v1alpha3 \ - --build-tag=ignore_autogenerated_core_v1alpha3 \ + --input-dirs=./api/v1alpha4 \ + --build-tag=ignore_autogenerated_core \ --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt $(CONVERSION_GEN) \ --input-dirs=./$(EXP_DIR)/api/v1alpha3 \ + --input-dirs=./$(EXP_DIR)/api/v1alpha4 \ --input-dirs=./$(EXP_DIR)/addons/api/v1alpha3 \ + --input-dirs=./$(EXP_DIR)/addons/api/v1alpha4 \ --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \ + --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha4 \ --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt @@ -296,16 +305,18 @@ generate-go-conversions-cabpk: $(CONVERSION_GEN) $(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/api" $(CONVERSION_GEN) \ --input-dirs=./bootstrap/kubeadm/api/v1alpha3 \ - --build-tag=ignore_autogenerated_kubeadm_bootstrap_v1alpha3 \ + --input-dirs=./bootstrap/kubeadm/api/v1alpha4 \ + --build-tag=ignore_autogenerated_kubeadm_bootstrap \ --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \ + --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha4 \ --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt - $(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/types/v1beta1,./bootstrap/kubeadm/types/v1beta2,./bootstrap/kubeadm/types/v1beta3" + $(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/types/upstreamv1beta1,./bootstrap/kubeadm/types/upstreamv1beta2,./bootstrap/kubeadm/types/upstreamv1beta3" $(CONVERSION_GEN) \ - --input-dirs=./bootstrap/kubeadm/types/v1beta1 \ - --input-dirs=./bootstrap/kubeadm/types/v1beta2 \ - --input-dirs=./bootstrap/kubeadm/types/v1beta3 \ - --build-tag=ignore_autogenerated_kubeadm_bootstrap_v1alpha3 \ + --input-dirs=./bootstrap/kubeadm/types/upstreamv1beta1 \ + --input-dirs=./bootstrap/kubeadm/types/upstreamv1beta2 \ + --input-dirs=./bootstrap/kubeadm/types/upstreamv1beta3 \ + --build-tag=ignore_autogenerated_kubeadm_types \ --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt @@ -320,8 +331,12 @@ generate-go-conversions-kcp: $(CONVERSION_GEN) $(MAKE) clean-generated-conversions SRC_DIRS="./controlplane/kubeadm/api" $(CONVERSION_GEN) \ --input-dirs=./controlplane/kubeadm/api/v1alpha3 \ - --build-tag=ignore_autogenerated_kubeadm_controlplane_v1alpha3 \ - --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3,sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3 \ + --input-dirs=./controlplane/kubeadm/api/v1alpha4 \ + --build-tag=ignore_autogenerated_kubeadm_controlplane \ + --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \ + --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha4 \ + --extra-peer-dirs=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3 \ + --extra-peer-dirs=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4 \ --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt diff --git a/PROJECT b/PROJECT index a63e02d51e26..9f7899a3ad0e 100644 --- a/PROJECT +++ b/PROJECT @@ -28,4 +28,19 @@ resources: - group: cluster kind: MachineDeployment version: v1alpha4 +- group: cluster + kind: ClusterClass + version: v1beta1 +- group: cluster + kind: Cluster + version: v1beta1 +- group: cluster + kind: Machine + version: v1beta1 +- group: cluster + kind: MachineSet + version: v1beta1 +- group: cluster + kind: MachineDeployment + version: v1beta1 version: "2" diff --git a/api/v1alpha3/conversion.go b/api/v1alpha3/conversion.go index df45394b2b49..1bc301353957 100644 --- a/api/v1alpha3/conversion.go +++ b/api/v1alpha3/conversion.go @@ -18,16 +18,16 @@ package v1alpha3 import ( apiconversion "k8s.io/apimachinery/pkg/conversion" - "sigs.k8s.io/cluster-api/api/v1alpha4" + v1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/conditions" utilconversion "sigs.k8s.io/cluster-api/util/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" ) func (src *Cluster) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.Cluster) + dst := dstRaw.(*v1beta1.Cluster) - if err := Convert_v1alpha3_Cluster_To_v1alpha4_Cluster(src, dst, nil); err != nil { + if err := Convert_v1alpha3_Cluster_To_v1beta1_Cluster(src, dst, nil); err != nil { return err } @@ -35,11 +35,11 @@ func (src *Cluster) ConvertTo(dstRaw conversion.Hub) error { // will be "now". See https://github.com/kubernetes-sigs/cluster-api/issues/3798#issuecomment-708619826 for more // discussion. if src.Status.ControlPlaneInitialized { - conditions.MarkTrue(dst, v1alpha4.ControlPlaneInitializedCondition) + conditions.MarkTrue(dst, v1beta1.ControlPlaneInitializedCondition) } // Manually restore data. - restored := &v1alpha4.Cluster{} + restored := &v1beta1.Cluster{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -52,14 +52,14 @@ func (src *Cluster) ConvertTo(dstRaw conversion.Hub) error { } func (dst *Cluster) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.Cluster) + src := srcRaw.(*v1beta1.Cluster) - if err := Convert_v1alpha4_Cluster_To_v1alpha3_Cluster(src, dst, nil); err != nil { + if err := Convert_v1beta1_Cluster_To_v1alpha3_Cluster(src, dst, nil); err != nil { return err } // Set the v1alpha3 boolean status field if the v1alpha4 condition was true - if conditions.IsTrue(src, v1alpha4.ControlPlaneInitializedCondition) { + if conditions.IsTrue(src, v1beta1.ControlPlaneInitializedCondition) { dst.Status.ControlPlaneInitialized = true } @@ -72,26 +72,26 @@ func (dst *Cluster) ConvertFrom(srcRaw conversion.Hub) error { } func (src *ClusterList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.ClusterList) + dst := dstRaw.(*v1beta1.ClusterList) - return Convert_v1alpha3_ClusterList_To_v1alpha4_ClusterList(src, dst, nil) + return Convert_v1alpha3_ClusterList_To_v1beta1_ClusterList(src, dst, nil) } func (dst *ClusterList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.ClusterList) + src := srcRaw.(*v1beta1.ClusterList) - return Convert_v1alpha4_ClusterList_To_v1alpha3_ClusterList(src, dst, nil) + return Convert_v1beta1_ClusterList_To_v1alpha3_ClusterList(src, dst, nil) } func (src *Machine) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.Machine) + dst := dstRaw.(*v1beta1.Machine) - if err := Convert_v1alpha3_Machine_To_v1alpha4_Machine(src, dst, nil); err != nil { + if err := Convert_v1alpha3_Machine_To_v1beta1_Machine(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &v1alpha4.Machine{} + restored := &v1beta1.Machine{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -101,9 +101,9 @@ func (src *Machine) ConvertTo(dstRaw conversion.Hub) error { } func (dst *Machine) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.Machine) + src := srcRaw.(*v1beta1.Machine) - if err := Convert_v1alpha4_Machine_To_v1alpha3_Machine(src, dst, nil); err != nil { + if err := Convert_v1beta1_Machine_To_v1alpha3_Machine(src, dst, nil); err != nil { return err } @@ -116,60 +116,60 @@ func (dst *Machine) ConvertFrom(srcRaw conversion.Hub) error { } func (src *MachineList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.MachineList) + dst := dstRaw.(*v1beta1.MachineList) - return Convert_v1alpha3_MachineList_To_v1alpha4_MachineList(src, dst, nil) + return Convert_v1alpha3_MachineList_To_v1beta1_MachineList(src, dst, nil) } func (dst *MachineList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.MachineList) + src := srcRaw.(*v1beta1.MachineList) - return Convert_v1alpha4_MachineList_To_v1alpha3_MachineList(src, dst, nil) + return Convert_v1beta1_MachineList_To_v1alpha3_MachineList(src, dst, nil) } func (src *MachineSet) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.MachineSet) + dst := dstRaw.(*v1beta1.MachineSet) - return Convert_v1alpha3_MachineSet_To_v1alpha4_MachineSet(src, dst, nil) + return Convert_v1alpha3_MachineSet_To_v1beta1_MachineSet(src, dst, nil) } func (dst *MachineSet) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.MachineSet) + src := srcRaw.(*v1beta1.MachineSet) - return Convert_v1alpha4_MachineSet_To_v1alpha3_MachineSet(src, dst, nil) + return Convert_v1beta1_MachineSet_To_v1alpha3_MachineSet(src, dst, nil) } func (src *MachineSetList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.MachineSetList) + dst := dstRaw.(*v1beta1.MachineSetList) - return Convert_v1alpha3_MachineSetList_To_v1alpha4_MachineSetList(src, dst, nil) + return Convert_v1alpha3_MachineSetList_To_v1beta1_MachineSetList(src, dst, nil) } func (dst *MachineSetList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.MachineSetList) + src := srcRaw.(*v1beta1.MachineSetList) - return Convert_v1alpha4_MachineSetList_To_v1alpha3_MachineSetList(src, dst, nil) + return Convert_v1beta1_MachineSetList_To_v1alpha3_MachineSetList(src, dst, nil) } func (src *MachineDeployment) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.MachineDeployment) + dst := dstRaw.(*v1beta1.MachineDeployment) - if err := Convert_v1alpha3_MachineDeployment_To_v1alpha4_MachineDeployment(src, dst, nil); err != nil { + if err := Convert_v1alpha3_MachineDeployment_To_v1beta1_MachineDeployment(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &v1alpha4.MachineDeployment{} + restored := &v1beta1.MachineDeployment{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } if restored.Spec.Strategy != nil && restored.Spec.Strategy.RollingUpdate != nil { if dst.Spec.Strategy == nil { - dst.Spec.Strategy = &v1alpha4.MachineDeploymentStrategy{} + dst.Spec.Strategy = &v1beta1.MachineDeploymentStrategy{} } if dst.Spec.Strategy.RollingUpdate == nil { - dst.Spec.Strategy.RollingUpdate = &v1alpha4.MachineRollingUpdateDeployment{} + dst.Spec.Strategy.RollingUpdate = &v1beta1.MachineRollingUpdateDeployment{} } dst.Spec.Strategy.RollingUpdate.DeletePolicy = restored.Spec.Strategy.RollingUpdate.DeletePolicy } @@ -179,9 +179,9 @@ func (src *MachineDeployment) ConvertTo(dstRaw conversion.Hub) error { } func (dst *MachineDeployment) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.MachineDeployment) + src := srcRaw.(*v1beta1.MachineDeployment) - if err := Convert_v1alpha4_MachineDeployment_To_v1alpha3_MachineDeployment(src, dst, nil); err != nil { + if err := Convert_v1beta1_MachineDeployment_To_v1alpha3_MachineDeployment(src, dst, nil); err != nil { return err } @@ -194,31 +194,31 @@ func (dst *MachineDeployment) ConvertFrom(srcRaw conversion.Hub) error { } // Status.Conditions was introduced in v1alpha4, thus requiring a custom conversion function; the values is going to be preserved in an annotation thus allowing roundtrip without loosing informations -func Convert_v1alpha4_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentStatus(in *v1alpha4.MachineDeploymentStatus, out *MachineDeploymentStatus, s apiconversion.Scope) error { - return autoConvert_v1alpha4_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentStatus(in, out, s) +func Convert_v1beta1_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentStatus(in *v1beta1.MachineDeploymentStatus, out *MachineDeploymentStatus, s apiconversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentStatus(in, out, s) } func (src *MachineDeploymentList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.MachineDeploymentList) + dst := dstRaw.(*v1beta1.MachineDeploymentList) - return Convert_v1alpha3_MachineDeploymentList_To_v1alpha4_MachineDeploymentList(src, dst, nil) + return Convert_v1alpha3_MachineDeploymentList_To_v1beta1_MachineDeploymentList(src, dst, nil) } func (dst *MachineDeploymentList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.MachineDeploymentList) + src := srcRaw.(*v1beta1.MachineDeploymentList) - return Convert_v1alpha4_MachineDeploymentList_To_v1alpha3_MachineDeploymentList(src, dst, nil) + return Convert_v1beta1_MachineDeploymentList_To_v1alpha3_MachineDeploymentList(src, dst, nil) } func (src *MachineHealthCheck) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.MachineHealthCheck) + dst := dstRaw.(*v1beta1.MachineHealthCheck) - if err := Convert_v1alpha3_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(src, dst, nil); err != nil { + if err := Convert_v1alpha3_MachineHealthCheck_To_v1beta1_MachineHealthCheck(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &v1alpha4.MachineHealthCheck{} + restored := &v1beta1.MachineHealthCheck{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -231,9 +231,9 @@ func (src *MachineHealthCheck) ConvertTo(dstRaw conversion.Hub) error { } func (dst *MachineHealthCheck) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.MachineHealthCheck) + src := srcRaw.(*v1beta1.MachineHealthCheck) - if err := Convert_v1alpha4_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(src, dst, nil); err != nil { + if err := Convert_v1beta1_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(src, dst, nil); err != nil { return err } @@ -246,42 +246,42 @@ func (dst *MachineHealthCheck) ConvertFrom(srcRaw conversion.Hub) error { } func (src *MachineHealthCheckList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.MachineHealthCheckList) + dst := dstRaw.(*v1beta1.MachineHealthCheckList) - return Convert_v1alpha3_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList(src, dst, nil) + return Convert_v1alpha3_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList(src, dst, nil) } func (dst *MachineHealthCheckList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.MachineHealthCheckList) + src := srcRaw.(*v1beta1.MachineHealthCheckList) - return Convert_v1alpha4_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(src, dst, nil) + return Convert_v1beta1_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(src, dst, nil) } -func Convert_v1alpha4_ClusterSpec_To_v1alpha3_ClusterSpec(in *v1alpha4.ClusterSpec, out *ClusterSpec, s apiconversion.Scope) error { +func Convert_v1beta1_ClusterSpec_To_v1alpha3_ClusterSpec(in *v1beta1.ClusterSpec, out *ClusterSpec, s apiconversion.Scope) error { // NOTE: custom conversion func is required because spec.Topology does not exists in v1alpha3 - return autoConvert_v1alpha4_ClusterSpec_To_v1alpha3_ClusterSpec(in, out, s) + return autoConvert_v1beta1_ClusterSpec_To_v1alpha3_ClusterSpec(in, out, s) } -func Convert_v1alpha3_Bootstrap_To_v1alpha4_Bootstrap(in *Bootstrap, out *v1alpha4.Bootstrap, s apiconversion.Scope) error { - return autoConvert_v1alpha3_Bootstrap_To_v1alpha4_Bootstrap(in, out, s) +func Convert_v1alpha3_Bootstrap_To_v1beta1_Bootstrap(in *Bootstrap, out *v1beta1.Bootstrap, s apiconversion.Scope) error { + return autoConvert_v1alpha3_Bootstrap_To_v1beta1_Bootstrap(in, out, s) } -func Convert_v1alpha4_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(in *v1alpha4.MachineRollingUpdateDeployment, out *MachineRollingUpdateDeployment, s apiconversion.Scope) error { - return autoConvert_v1alpha4_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(in, out, s) +func Convert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(in *v1beta1.MachineRollingUpdateDeployment, out *MachineRollingUpdateDeployment, s apiconversion.Scope) error { + return autoConvert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(in, out, s) } -func Convert_v1alpha4_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckSpec(in *v1alpha4.MachineHealthCheckSpec, out *MachineHealthCheckSpec, s apiconversion.Scope) error { - return autoConvert_v1alpha4_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckSpec(in, out, s) +func Convert_v1beta1_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckSpec(in *v1beta1.MachineHealthCheckSpec, out *MachineHealthCheckSpec, s apiconversion.Scope) error { + return autoConvert_v1beta1_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckSpec(in, out, s) } -func Convert_v1alpha3_ClusterStatus_To_v1alpha4_ClusterStatus(in *ClusterStatus, out *v1alpha4.ClusterStatus, s apiconversion.Scope) error { - return autoConvert_v1alpha3_ClusterStatus_To_v1alpha4_ClusterStatus(in, out, s) +func Convert_v1alpha3_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s apiconversion.Scope) error { + return autoConvert_v1alpha3_ClusterStatus_To_v1beta1_ClusterStatus(in, out, s) } -func Convert_v1alpha3_ObjectMeta_To_v1alpha4_ObjectMeta(in *ObjectMeta, out *v1alpha4.ObjectMeta, s apiconversion.Scope) error { - return autoConvert_v1alpha3_ObjectMeta_To_v1alpha4_ObjectMeta(in, out, s) +func Convert_v1alpha3_ObjectMeta_To_v1beta1_ObjectMeta(in *ObjectMeta, out *v1beta1.ObjectMeta, s apiconversion.Scope) error { + return autoConvert_v1alpha3_ObjectMeta_To_v1beta1_ObjectMeta(in, out, s) } -func Convert_v1alpha4_MachineStatus_To_v1alpha3_MachineStatus(in *v1alpha4.MachineStatus, out *MachineStatus, s apiconversion.Scope) error { - return autoConvert_v1alpha4_MachineStatus_To_v1alpha3_MachineStatus(in, out, s) +func Convert_v1beta1_MachineStatus_To_v1alpha3_MachineStatus(in *v1beta1.MachineStatus, out *MachineStatus, s apiconversion.Scope) error { + return autoConvert_v1beta1_MachineStatus_To_v1alpha3_MachineStatus(in, out, s) } diff --git a/api/v1alpha3/conversion_test.go b/api/v1alpha3/conversion_test.go index 4c2c07951479..7c3adb0e783c 100644 --- a/api/v1alpha3/conversion_test.go +++ b/api/v1alpha3/conversion_test.go @@ -22,38 +22,38 @@ import ( fuzz "github.com/google/gofuzz" "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - "sigs.k8s.io/cluster-api/api/v1alpha4" + "sigs.k8s.io/cluster-api/api/v1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" ) func TestFuzzyConversion(t *testing.T) { t.Run("for Cluster", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.Cluster{}, + Hub: &v1beta1.Cluster{}, Spoke: &Cluster{}, SpokeAfterMutation: clusterSpokeAfterMutation, })) t.Run("for Machine", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.Machine{}, + Hub: &v1beta1.Machine{}, Spoke: &Machine{}, FuzzerFuncs: []fuzzer.FuzzerFuncs{BootstrapFuzzFuncs}, })) t.Run("for MachineSet", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.MachineSet{}, + Hub: &v1beta1.MachineSet{}, Spoke: &MachineSet{}, FuzzerFuncs: []fuzzer.FuzzerFuncs{BootstrapFuzzFuncs, CustomObjectMetaFuzzFunc}, })) t.Run("for MachineDeployment", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.MachineDeployment{}, + Hub: &v1beta1.MachineDeployment{}, Spoke: &MachineDeployment{}, FuzzerFuncs: []fuzzer.FuzzerFuncs{BootstrapFuzzFuncs, CustomObjectMetaFuzzFunc}, })) t.Run("for MachineHealthCheckSpec", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.MachineHealthCheck{}, + Hub: &v1beta1.MachineHealthCheck{}, Spoke: &MachineHealthCheck{}, })) } @@ -67,7 +67,7 @@ func CustomObjectMetaFuzzFunc(_ runtimeserializer.CodecFactory) []interface{} { func CustomObjectMetaFuzzer(in *ObjectMeta, c fuzz.Continue) { c.FuzzNoCustom(in) - // These fields have been removed in v1alpha4 + // These fields have been removed in v1beta1 // data is going to be lost, so we're forcing zero values here. in.Name = "" in.GenerateName = "" @@ -84,7 +84,7 @@ func BootstrapFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} { func BootstrapFuzzer(obj *Bootstrap, c fuzz.Continue) { c.FuzzNoCustom(obj) - // Bootstrap.Data has been removed in v1alpha4, so setting it to nil in order to avoid v1alpha3 --> v1alpha4 --> v1alpha3 round trip errors. + // Bootstrap.Data has been removed in v1beta1, so setting it to nil in order to avoid v1alpha3 --> v1beta1 --> v1alpha3 round trip errors. obj.Data = nil } @@ -101,7 +101,7 @@ func clusterSpokeAfterMutation(c conversion.Convertible) { condition := cluster.Status.Conditions[i] // Keep everything that is not ControlPlaneInitializedCondition - if condition.Type != ConditionType(v1alpha4.ControlPlaneInitializedCondition) { + if condition.Type != ConditionType(v1beta1.ControlPlaneInitializedCondition) { tmp = append(tmp, condition) } } diff --git a/api/v1alpha3/doc.go b/api/v1alpha3/doc.go index ccbb4ca7e57d..2682381adf91 100644 --- a/api/v1alpha3/doc.go +++ b/api/v1alpha3/doc.go @@ -15,5 +15,5 @@ limitations under the License. */ // Package v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1alpha4 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1beta1 package v1alpha3 diff --git a/api/v1alpha3/zz_generated.conversion.go b/api/v1alpha3/zz_generated.conversion.go index 7087056a0e2b..eca613597467 100644 --- a/api/v1alpha3/zz_generated.conversion.go +++ b/api/v1alpha3/zz_generated.conversion.go @@ -1,4 +1,4 @@ -// +build !ignore_autogenerated_core_v1alpha3 +// +build !ignore_autogenerated_core /* Copyright The Kubernetes Authors. @@ -28,7 +28,7 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" - v1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" + v1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" errors "sigs.k8s.io/cluster-api/errors" ) @@ -39,408 +39,408 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*APIEndpoint)(nil), (*v1alpha4.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint(a.(*APIEndpoint), b.(*v1alpha4.APIEndpoint), scope) + if err := s.AddGeneratedConversionFunc((*APIEndpoint)(nil), (*v1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(a.(*APIEndpoint), b.(*v1beta1.APIEndpoint), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint(a.(*v1alpha4.APIEndpoint), b.(*APIEndpoint), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(a.(*v1beta1.APIEndpoint), b.(*APIEndpoint), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Bootstrap)(nil), (*Bootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Bootstrap_To_v1alpha3_Bootstrap(a.(*v1alpha4.Bootstrap), b.(*Bootstrap), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.Bootstrap)(nil), (*Bootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Bootstrap_To_v1alpha3_Bootstrap(a.(*v1beta1.Bootstrap), b.(*Bootstrap), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*Cluster)(nil), (*v1alpha4.Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Cluster_To_v1alpha4_Cluster(a.(*Cluster), b.(*v1alpha4.Cluster), scope) + if err := s.AddGeneratedConversionFunc((*Cluster)(nil), (*v1beta1.Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_Cluster_To_v1beta1_Cluster(a.(*Cluster), b.(*v1beta1.Cluster), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Cluster)(nil), (*Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Cluster_To_v1alpha3_Cluster(a.(*v1alpha4.Cluster), b.(*Cluster), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.Cluster)(nil), (*Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Cluster_To_v1alpha3_Cluster(a.(*v1beta1.Cluster), b.(*Cluster), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ClusterList)(nil), (*v1alpha4.ClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterList_To_v1alpha4_ClusterList(a.(*ClusterList), b.(*v1alpha4.ClusterList), scope) + if err := s.AddGeneratedConversionFunc((*ClusterList)(nil), (*v1beta1.ClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterList_To_v1beta1_ClusterList(a.(*ClusterList), b.(*v1beta1.ClusterList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterList)(nil), (*ClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterList_To_v1alpha3_ClusterList(a.(*v1alpha4.ClusterList), b.(*ClusterList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterList)(nil), (*ClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterList_To_v1alpha3_ClusterList(a.(*v1beta1.ClusterList), b.(*ClusterList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ClusterNetwork)(nil), (*v1alpha4.ClusterNetwork)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterNetwork_To_v1alpha4_ClusterNetwork(a.(*ClusterNetwork), b.(*v1alpha4.ClusterNetwork), scope) + if err := s.AddGeneratedConversionFunc((*ClusterNetwork)(nil), (*v1beta1.ClusterNetwork)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterNetwork_To_v1beta1_ClusterNetwork(a.(*ClusterNetwork), b.(*v1beta1.ClusterNetwork), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterNetwork)(nil), (*ClusterNetwork)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterNetwork_To_v1alpha3_ClusterNetwork(a.(*v1alpha4.ClusterNetwork), b.(*ClusterNetwork), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterNetwork)(nil), (*ClusterNetwork)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterNetwork_To_v1alpha3_ClusterNetwork(a.(*v1beta1.ClusterNetwork), b.(*ClusterNetwork), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ClusterSpec)(nil), (*v1alpha4.ClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterSpec_To_v1alpha4_ClusterSpec(a.(*ClusterSpec), b.(*v1alpha4.ClusterSpec), scope) + if err := s.AddGeneratedConversionFunc((*ClusterSpec)(nil), (*v1beta1.ClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterSpec_To_v1beta1_ClusterSpec(a.(*ClusterSpec), b.(*v1beta1.ClusterSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterStatus)(nil), (*ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterStatus_To_v1alpha3_ClusterStatus(a.(*v1alpha4.ClusterStatus), b.(*ClusterStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterStatus)(nil), (*ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterStatus_To_v1alpha3_ClusterStatus(a.(*v1beta1.ClusterStatus), b.(*ClusterStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*Condition)(nil), (*v1alpha4.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Condition_To_v1alpha4_Condition(a.(*Condition), b.(*v1alpha4.Condition), scope) + if err := s.AddGeneratedConversionFunc((*Condition)(nil), (*v1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_Condition_To_v1beta1_Condition(a.(*Condition), b.(*v1beta1.Condition), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Condition)(nil), (*Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Condition_To_v1alpha3_Condition(a.(*v1alpha4.Condition), b.(*Condition), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.Condition)(nil), (*Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Condition_To_v1alpha3_Condition(a.(*v1beta1.Condition), b.(*Condition), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*FailureDomainSpec)(nil), (*v1alpha4.FailureDomainSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(a.(*FailureDomainSpec), b.(*v1alpha4.FailureDomainSpec), scope) + if err := s.AddGeneratedConversionFunc((*FailureDomainSpec)(nil), (*v1beta1.FailureDomainSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_FailureDomainSpec_To_v1beta1_FailureDomainSpec(a.(*FailureDomainSpec), b.(*v1beta1.FailureDomainSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.FailureDomainSpec)(nil), (*FailureDomainSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(a.(*v1alpha4.FailureDomainSpec), b.(*FailureDomainSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.FailureDomainSpec)(nil), (*FailureDomainSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(a.(*v1beta1.FailureDomainSpec), b.(*FailureDomainSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*Machine)(nil), (*v1alpha4.Machine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Machine_To_v1alpha4_Machine(a.(*Machine), b.(*v1alpha4.Machine), scope) + if err := s.AddGeneratedConversionFunc((*Machine)(nil), (*v1beta1.Machine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_Machine_To_v1beta1_Machine(a.(*Machine), b.(*v1beta1.Machine), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Machine)(nil), (*Machine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Machine_To_v1alpha3_Machine(a.(*v1alpha4.Machine), b.(*Machine), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.Machine)(nil), (*Machine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Machine_To_v1alpha3_Machine(a.(*v1beta1.Machine), b.(*Machine), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineAddress)(nil), (*v1alpha4.MachineAddress)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineAddress_To_v1alpha4_MachineAddress(a.(*MachineAddress), b.(*v1alpha4.MachineAddress), scope) + if err := s.AddGeneratedConversionFunc((*MachineAddress)(nil), (*v1beta1.MachineAddress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineAddress_To_v1beta1_MachineAddress(a.(*MachineAddress), b.(*v1beta1.MachineAddress), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineAddress)(nil), (*MachineAddress)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineAddress_To_v1alpha3_MachineAddress(a.(*v1alpha4.MachineAddress), b.(*MachineAddress), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineAddress)(nil), (*MachineAddress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineAddress_To_v1alpha3_MachineAddress(a.(*v1beta1.MachineAddress), b.(*MachineAddress), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineDeployment)(nil), (*v1alpha4.MachineDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineDeployment_To_v1alpha4_MachineDeployment(a.(*MachineDeployment), b.(*v1alpha4.MachineDeployment), scope) + if err := s.AddGeneratedConversionFunc((*MachineDeployment)(nil), (*v1beta1.MachineDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineDeployment_To_v1beta1_MachineDeployment(a.(*MachineDeployment), b.(*v1beta1.MachineDeployment), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineDeployment)(nil), (*MachineDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineDeployment_To_v1alpha3_MachineDeployment(a.(*v1alpha4.MachineDeployment), b.(*MachineDeployment), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeployment)(nil), (*MachineDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeployment_To_v1alpha3_MachineDeployment(a.(*v1beta1.MachineDeployment), b.(*MachineDeployment), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineDeploymentList)(nil), (*v1alpha4.MachineDeploymentList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineDeploymentList_To_v1alpha4_MachineDeploymentList(a.(*MachineDeploymentList), b.(*v1alpha4.MachineDeploymentList), scope) + if err := s.AddGeneratedConversionFunc((*MachineDeploymentList)(nil), (*v1beta1.MachineDeploymentList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineDeploymentList_To_v1beta1_MachineDeploymentList(a.(*MachineDeploymentList), b.(*v1beta1.MachineDeploymentList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineDeploymentList)(nil), (*MachineDeploymentList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineDeploymentList_To_v1alpha3_MachineDeploymentList(a.(*v1alpha4.MachineDeploymentList), b.(*MachineDeploymentList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeploymentList)(nil), (*MachineDeploymentList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentList_To_v1alpha3_MachineDeploymentList(a.(*v1beta1.MachineDeploymentList), b.(*MachineDeploymentList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineDeploymentSpec)(nil), (*v1alpha4.MachineDeploymentSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec(a.(*MachineDeploymentSpec), b.(*v1alpha4.MachineDeploymentSpec), scope) + if err := s.AddGeneratedConversionFunc((*MachineDeploymentSpec)(nil), (*v1beta1.MachineDeploymentSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec(a.(*MachineDeploymentSpec), b.(*v1beta1.MachineDeploymentSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineDeploymentSpec)(nil), (*MachineDeploymentSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec(a.(*v1alpha4.MachineDeploymentSpec), b.(*MachineDeploymentSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeploymentSpec)(nil), (*MachineDeploymentSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec(a.(*v1beta1.MachineDeploymentSpec), b.(*MachineDeploymentSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineDeploymentStatus)(nil), (*v1alpha4.MachineDeploymentStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus(a.(*MachineDeploymentStatus), b.(*v1alpha4.MachineDeploymentStatus), scope) + if err := s.AddGeneratedConversionFunc((*MachineDeploymentStatus)(nil), (*v1beta1.MachineDeploymentStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(a.(*MachineDeploymentStatus), b.(*v1beta1.MachineDeploymentStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineDeploymentStrategy)(nil), (*v1alpha4.MachineDeploymentStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy(a.(*MachineDeploymentStrategy), b.(*v1alpha4.MachineDeploymentStrategy), scope) + if err := s.AddGeneratedConversionFunc((*MachineDeploymentStrategy)(nil), (*v1beta1.MachineDeploymentStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy(a.(*MachineDeploymentStrategy), b.(*v1beta1.MachineDeploymentStrategy), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineDeploymentStrategy)(nil), (*MachineDeploymentStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy(a.(*v1alpha4.MachineDeploymentStrategy), b.(*MachineDeploymentStrategy), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeploymentStrategy)(nil), (*MachineDeploymentStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy(a.(*v1beta1.MachineDeploymentStrategy), b.(*MachineDeploymentStrategy), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineHealthCheck)(nil), (*v1alpha4.MachineHealthCheck)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(a.(*MachineHealthCheck), b.(*v1alpha4.MachineHealthCheck), scope) + if err := s.AddGeneratedConversionFunc((*MachineHealthCheck)(nil), (*v1beta1.MachineHealthCheck)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineHealthCheck_To_v1beta1_MachineHealthCheck(a.(*MachineHealthCheck), b.(*v1beta1.MachineHealthCheck), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineHealthCheck)(nil), (*MachineHealthCheck)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(a.(*v1alpha4.MachineHealthCheck), b.(*MachineHealthCheck), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineHealthCheck)(nil), (*MachineHealthCheck)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(a.(*v1beta1.MachineHealthCheck), b.(*MachineHealthCheck), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineHealthCheckList)(nil), (*v1alpha4.MachineHealthCheckList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList(a.(*MachineHealthCheckList), b.(*v1alpha4.MachineHealthCheckList), scope) + if err := s.AddGeneratedConversionFunc((*MachineHealthCheckList)(nil), (*v1beta1.MachineHealthCheckList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList(a.(*MachineHealthCheckList), b.(*v1beta1.MachineHealthCheckList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineHealthCheckList)(nil), (*MachineHealthCheckList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(a.(*v1alpha4.MachineHealthCheckList), b.(*MachineHealthCheckList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineHealthCheckList)(nil), (*MachineHealthCheckList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(a.(*v1beta1.MachineHealthCheckList), b.(*MachineHealthCheckList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineHealthCheckSpec)(nil), (*v1alpha4.MachineHealthCheckSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec(a.(*MachineHealthCheckSpec), b.(*v1alpha4.MachineHealthCheckSpec), scope) + if err := s.AddGeneratedConversionFunc((*MachineHealthCheckSpec)(nil), (*v1beta1.MachineHealthCheckSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(a.(*MachineHealthCheckSpec), b.(*v1beta1.MachineHealthCheckSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineHealthCheckStatus)(nil), (*v1alpha4.MachineHealthCheckStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus(a.(*MachineHealthCheckStatus), b.(*v1alpha4.MachineHealthCheckStatus), scope) + if err := s.AddGeneratedConversionFunc((*MachineHealthCheckStatus)(nil), (*v1beta1.MachineHealthCheckStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(a.(*MachineHealthCheckStatus), b.(*v1beta1.MachineHealthCheckStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineHealthCheckStatus)(nil), (*MachineHealthCheckStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus(a.(*v1alpha4.MachineHealthCheckStatus), b.(*MachineHealthCheckStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineHealthCheckStatus)(nil), (*MachineHealthCheckStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus(a.(*v1beta1.MachineHealthCheckStatus), b.(*MachineHealthCheckStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineList)(nil), (*v1alpha4.MachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineList_To_v1alpha4_MachineList(a.(*MachineList), b.(*v1alpha4.MachineList), scope) + if err := s.AddGeneratedConversionFunc((*MachineList)(nil), (*v1beta1.MachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineList_To_v1beta1_MachineList(a.(*MachineList), b.(*v1beta1.MachineList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineList)(nil), (*MachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineList_To_v1alpha3_MachineList(a.(*v1alpha4.MachineList), b.(*MachineList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineList)(nil), (*MachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineList_To_v1alpha3_MachineList(a.(*v1beta1.MachineList), b.(*MachineList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineRollingUpdateDeployment)(nil), (*v1alpha4.MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(a.(*MachineRollingUpdateDeployment), b.(*v1alpha4.MachineRollingUpdateDeployment), scope) + if err := s.AddGeneratedConversionFunc((*MachineRollingUpdateDeployment)(nil), (*v1beta1.MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(a.(*MachineRollingUpdateDeployment), b.(*v1beta1.MachineRollingUpdateDeployment), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineSet)(nil), (*v1alpha4.MachineSet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineSet_To_v1alpha4_MachineSet(a.(*MachineSet), b.(*v1alpha4.MachineSet), scope) + if err := s.AddGeneratedConversionFunc((*MachineSet)(nil), (*v1beta1.MachineSet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineSet_To_v1beta1_MachineSet(a.(*MachineSet), b.(*v1beta1.MachineSet), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineSet)(nil), (*MachineSet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineSet_To_v1alpha3_MachineSet(a.(*v1alpha4.MachineSet), b.(*MachineSet), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineSet)(nil), (*MachineSet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineSet_To_v1alpha3_MachineSet(a.(*v1beta1.MachineSet), b.(*MachineSet), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineSetList)(nil), (*v1alpha4.MachineSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineSetList_To_v1alpha4_MachineSetList(a.(*MachineSetList), b.(*v1alpha4.MachineSetList), scope) + if err := s.AddGeneratedConversionFunc((*MachineSetList)(nil), (*v1beta1.MachineSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineSetList_To_v1beta1_MachineSetList(a.(*MachineSetList), b.(*v1beta1.MachineSetList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineSetList)(nil), (*MachineSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineSetList_To_v1alpha3_MachineSetList(a.(*v1alpha4.MachineSetList), b.(*MachineSetList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineSetList)(nil), (*MachineSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineSetList_To_v1alpha3_MachineSetList(a.(*v1beta1.MachineSetList), b.(*MachineSetList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineSetSpec)(nil), (*v1alpha4.MachineSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineSetSpec_To_v1alpha4_MachineSetSpec(a.(*MachineSetSpec), b.(*v1alpha4.MachineSetSpec), scope) + if err := s.AddGeneratedConversionFunc((*MachineSetSpec)(nil), (*v1beta1.MachineSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineSetSpec_To_v1beta1_MachineSetSpec(a.(*MachineSetSpec), b.(*v1beta1.MachineSetSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineSetSpec)(nil), (*MachineSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineSetSpec_To_v1alpha3_MachineSetSpec(a.(*v1alpha4.MachineSetSpec), b.(*MachineSetSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineSetSpec)(nil), (*MachineSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineSetSpec_To_v1alpha3_MachineSetSpec(a.(*v1beta1.MachineSetSpec), b.(*MachineSetSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineSetStatus)(nil), (*v1alpha4.MachineSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineSetStatus_To_v1alpha4_MachineSetStatus(a.(*MachineSetStatus), b.(*v1alpha4.MachineSetStatus), scope) + if err := s.AddGeneratedConversionFunc((*MachineSetStatus)(nil), (*v1beta1.MachineSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineSetStatus_To_v1beta1_MachineSetStatus(a.(*MachineSetStatus), b.(*v1beta1.MachineSetStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineSetStatus)(nil), (*MachineSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineSetStatus_To_v1alpha3_MachineSetStatus(a.(*v1alpha4.MachineSetStatus), b.(*MachineSetStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineSetStatus)(nil), (*MachineSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineSetStatus_To_v1alpha3_MachineSetStatus(a.(*v1beta1.MachineSetStatus), b.(*MachineSetStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineSpec)(nil), (*v1alpha4.MachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineSpec_To_v1alpha4_MachineSpec(a.(*MachineSpec), b.(*v1alpha4.MachineSpec), scope) + if err := s.AddGeneratedConversionFunc((*MachineSpec)(nil), (*v1beta1.MachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineSpec_To_v1beta1_MachineSpec(a.(*MachineSpec), b.(*v1beta1.MachineSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineSpec)(nil), (*MachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineSpec_To_v1alpha3_MachineSpec(a.(*v1alpha4.MachineSpec), b.(*MachineSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineSpec)(nil), (*MachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineSpec_To_v1alpha3_MachineSpec(a.(*v1beta1.MachineSpec), b.(*MachineSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineStatus)(nil), (*v1alpha4.MachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineStatus_To_v1alpha4_MachineStatus(a.(*MachineStatus), b.(*v1alpha4.MachineStatus), scope) + if err := s.AddGeneratedConversionFunc((*MachineStatus)(nil), (*v1beta1.MachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineStatus_To_v1beta1_MachineStatus(a.(*MachineStatus), b.(*v1beta1.MachineStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachineTemplateSpec)(nil), (*v1alpha4.MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(a.(*MachineTemplateSpec), b.(*v1alpha4.MachineTemplateSpec), scope) + if err := s.AddGeneratedConversionFunc((*MachineTemplateSpec)(nil), (*v1beta1.MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(a.(*MachineTemplateSpec), b.(*v1beta1.MachineTemplateSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachineTemplateSpec)(nil), (*MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(a.(*v1alpha4.MachineTemplateSpec), b.(*MachineTemplateSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineTemplateSpec)(nil), (*MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(a.(*v1beta1.MachineTemplateSpec), b.(*MachineTemplateSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NetworkRanges)(nil), (*v1alpha4.NetworkRanges)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NetworkRanges_To_v1alpha4_NetworkRanges(a.(*NetworkRanges), b.(*v1alpha4.NetworkRanges), scope) + if err := s.AddGeneratedConversionFunc((*NetworkRanges)(nil), (*v1beta1.NetworkRanges)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NetworkRanges_To_v1beta1_NetworkRanges(a.(*NetworkRanges), b.(*v1beta1.NetworkRanges), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.NetworkRanges)(nil), (*NetworkRanges)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NetworkRanges_To_v1alpha3_NetworkRanges(a.(*v1alpha4.NetworkRanges), b.(*NetworkRanges), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.NetworkRanges)(nil), (*NetworkRanges)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NetworkRanges_To_v1alpha3_NetworkRanges(a.(*v1beta1.NetworkRanges), b.(*NetworkRanges), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ObjectMeta)(nil), (*ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ObjectMeta_To_v1alpha3_ObjectMeta(a.(*v1alpha4.ObjectMeta), b.(*ObjectMeta), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ObjectMeta)(nil), (*ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ObjectMeta_To_v1alpha3_ObjectMeta(a.(*v1beta1.ObjectMeta), b.(*ObjectMeta), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*UnhealthyCondition)(nil), (*v1alpha4.UnhealthyCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_UnhealthyCondition_To_v1alpha4_UnhealthyCondition(a.(*UnhealthyCondition), b.(*v1alpha4.UnhealthyCondition), scope) + if err := s.AddGeneratedConversionFunc((*UnhealthyCondition)(nil), (*v1beta1.UnhealthyCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_UnhealthyCondition_To_v1beta1_UnhealthyCondition(a.(*UnhealthyCondition), b.(*v1beta1.UnhealthyCondition), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.UnhealthyCondition)(nil), (*UnhealthyCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_UnhealthyCondition_To_v1alpha3_UnhealthyCondition(a.(*v1alpha4.UnhealthyCondition), b.(*UnhealthyCondition), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.UnhealthyCondition)(nil), (*UnhealthyCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_UnhealthyCondition_To_v1alpha3_UnhealthyCondition(a.(*v1beta1.UnhealthyCondition), b.(*UnhealthyCondition), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*Bootstrap)(nil), (*v1alpha4.Bootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Bootstrap_To_v1alpha4_Bootstrap(a.(*Bootstrap), b.(*v1alpha4.Bootstrap), scope) + if err := s.AddConversionFunc((*Bootstrap)(nil), (*v1beta1.Bootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_Bootstrap_To_v1beta1_Bootstrap(a.(*Bootstrap), b.(*v1beta1.Bootstrap), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*ClusterStatus)(nil), (*v1alpha4.ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterStatus_To_v1alpha4_ClusterStatus(a.(*ClusterStatus), b.(*v1alpha4.ClusterStatus), scope) + if err := s.AddConversionFunc((*ClusterStatus)(nil), (*v1beta1.ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterStatus_To_v1beta1_ClusterStatus(a.(*ClusterStatus), b.(*v1beta1.ClusterStatus), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*ObjectMeta)(nil), (*v1alpha4.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ObjectMeta_To_v1alpha4_ObjectMeta(a.(*ObjectMeta), b.(*v1alpha4.ObjectMeta), scope) + if err := s.AddConversionFunc((*ObjectMeta)(nil), (*v1beta1.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ObjectMeta_To_v1beta1_ObjectMeta(a.(*ObjectMeta), b.(*v1beta1.ObjectMeta), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.ClusterSpec)(nil), (*ClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterSpec_To_v1alpha3_ClusterSpec(a.(*v1alpha4.ClusterSpec), b.(*ClusterSpec), scope) + if err := s.AddConversionFunc((*v1beta1.ClusterSpec)(nil), (*ClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterSpec_To_v1alpha3_ClusterSpec(a.(*v1beta1.ClusterSpec), b.(*ClusterSpec), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.MachineDeploymentStatus)(nil), (*MachineDeploymentStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentStatus(a.(*v1alpha4.MachineDeploymentStatus), b.(*MachineDeploymentStatus), scope) + if err := s.AddConversionFunc((*v1beta1.MachineDeploymentStatus)(nil), (*MachineDeploymentStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentStatus(a.(*v1beta1.MachineDeploymentStatus), b.(*MachineDeploymentStatus), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.MachineHealthCheckSpec)(nil), (*MachineHealthCheckSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckSpec(a.(*v1alpha4.MachineHealthCheckSpec), b.(*MachineHealthCheckSpec), scope) + if err := s.AddConversionFunc((*v1beta1.MachineHealthCheckSpec)(nil), (*MachineHealthCheckSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckSpec(a.(*v1beta1.MachineHealthCheckSpec), b.(*MachineHealthCheckSpec), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.MachineRollingUpdateDeployment)(nil), (*MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(a.(*v1alpha4.MachineRollingUpdateDeployment), b.(*MachineRollingUpdateDeployment), scope) + if err := s.AddConversionFunc((*v1beta1.MachineRollingUpdateDeployment)(nil), (*MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(a.(*v1beta1.MachineRollingUpdateDeployment), b.(*MachineRollingUpdateDeployment), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.MachineStatus)(nil), (*MachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineStatus_To_v1alpha3_MachineStatus(a.(*v1alpha4.MachineStatus), b.(*MachineStatus), scope) + if err := s.AddConversionFunc((*v1beta1.MachineStatus)(nil), (*MachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineStatus_To_v1alpha3_MachineStatus(a.(*v1beta1.MachineStatus), b.(*MachineStatus), scope) }); err != nil { return err } return nil } -func autoConvert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint(in *APIEndpoint, out *v1alpha4.APIEndpoint, s conversion.Scope) error { +func autoConvert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { out.Host = in.Host out.Port = in.Port return nil } -// Convert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint(in *APIEndpoint, out *v1alpha4.APIEndpoint, s conversion.Scope) error { - return autoConvert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) +// Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. +func Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + return autoConvert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) } -func autoConvert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint(in *v1alpha4.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { +func autoConvert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { out.Host = in.Host out.Port = in.Port return nil } -// Convert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint(in *v1alpha4.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - return autoConvert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint(in, out, s) +// Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint is an autogenerated conversion function. +func Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + return autoConvert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in, out, s) } -func autoConvert_v1alpha3_Bootstrap_To_v1alpha4_Bootstrap(in *Bootstrap, out *v1alpha4.Bootstrap, s conversion.Scope) error { +func autoConvert_v1alpha3_Bootstrap_To_v1beta1_Bootstrap(in *Bootstrap, out *v1beta1.Bootstrap, s conversion.Scope) error { out.ConfigRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigRef)) // WARNING: in.Data requires manual conversion: does not exist in peer-type out.DataSecretName = (*string)(unsafe.Pointer(in.DataSecretName)) return nil } -func autoConvert_v1alpha4_Bootstrap_To_v1alpha3_Bootstrap(in *v1alpha4.Bootstrap, out *Bootstrap, s conversion.Scope) error { +func autoConvert_v1beta1_Bootstrap_To_v1alpha3_Bootstrap(in *v1beta1.Bootstrap, out *Bootstrap, s conversion.Scope) error { out.ConfigRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigRef)) out.DataSecretName = (*string)(unsafe.Pointer(in.DataSecretName)) return nil } -// Convert_v1alpha4_Bootstrap_To_v1alpha3_Bootstrap is an autogenerated conversion function. -func Convert_v1alpha4_Bootstrap_To_v1alpha3_Bootstrap(in *v1alpha4.Bootstrap, out *Bootstrap, s conversion.Scope) error { - return autoConvert_v1alpha4_Bootstrap_To_v1alpha3_Bootstrap(in, out, s) +// Convert_v1beta1_Bootstrap_To_v1alpha3_Bootstrap is an autogenerated conversion function. +func Convert_v1beta1_Bootstrap_To_v1alpha3_Bootstrap(in *v1beta1.Bootstrap, out *Bootstrap, s conversion.Scope) error { + return autoConvert_v1beta1_Bootstrap_To_v1alpha3_Bootstrap(in, out, s) } -func autoConvert_v1alpha3_Cluster_To_v1alpha4_Cluster(in *Cluster, out *v1alpha4.Cluster, s conversion.Scope) error { +func autoConvert_v1alpha3_Cluster_To_v1beta1_Cluster(in *Cluster, out *v1beta1.Cluster, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_ClusterSpec_To_v1alpha4_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_ClusterSpec_To_v1beta1_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_ClusterStatus_To_v1alpha4_ClusterStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_ClusterStatus_To_v1beta1_ClusterStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_Cluster_To_v1alpha4_Cluster is an autogenerated conversion function. -func Convert_v1alpha3_Cluster_To_v1alpha4_Cluster(in *Cluster, out *v1alpha4.Cluster, s conversion.Scope) error { - return autoConvert_v1alpha3_Cluster_To_v1alpha4_Cluster(in, out, s) +// Convert_v1alpha3_Cluster_To_v1beta1_Cluster is an autogenerated conversion function. +func Convert_v1alpha3_Cluster_To_v1beta1_Cluster(in *Cluster, out *v1beta1.Cluster, s conversion.Scope) error { + return autoConvert_v1alpha3_Cluster_To_v1beta1_Cluster(in, out, s) } -func autoConvert_v1alpha4_Cluster_To_v1alpha3_Cluster(in *v1alpha4.Cluster, out *Cluster, s conversion.Scope) error { +func autoConvert_v1beta1_Cluster_To_v1alpha3_Cluster(in *v1beta1.Cluster, out *Cluster, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_ClusterSpec_To_v1alpha3_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_ClusterSpec_To_v1alpha3_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_ClusterStatus_To_v1alpha3_ClusterStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_ClusterStatus_To_v1alpha3_ClusterStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_Cluster_To_v1alpha3_Cluster is an autogenerated conversion function. -func Convert_v1alpha4_Cluster_To_v1alpha3_Cluster(in *v1alpha4.Cluster, out *Cluster, s conversion.Scope) error { - return autoConvert_v1alpha4_Cluster_To_v1alpha3_Cluster(in, out, s) +// Convert_v1beta1_Cluster_To_v1alpha3_Cluster is an autogenerated conversion function. +func Convert_v1beta1_Cluster_To_v1alpha3_Cluster(in *v1beta1.Cluster, out *Cluster, s conversion.Scope) error { + return autoConvert_v1beta1_Cluster_To_v1alpha3_Cluster(in, out, s) } -func autoConvert_v1alpha3_ClusterList_To_v1alpha4_ClusterList(in *ClusterList, out *v1alpha4.ClusterList, s conversion.Scope) error { +func autoConvert_v1alpha3_ClusterList_To_v1beta1_ClusterList(in *ClusterList, out *v1beta1.ClusterList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.Cluster, len(*in)) + *out = make([]v1beta1.Cluster, len(*in)) for i := range *in { - if err := Convert_v1alpha3_Cluster_To_v1alpha4_Cluster(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_Cluster_To_v1beta1_Cluster(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -450,18 +450,18 @@ func autoConvert_v1alpha3_ClusterList_To_v1alpha4_ClusterList(in *ClusterList, o return nil } -// Convert_v1alpha3_ClusterList_To_v1alpha4_ClusterList is an autogenerated conversion function. -func Convert_v1alpha3_ClusterList_To_v1alpha4_ClusterList(in *ClusterList, out *v1alpha4.ClusterList, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterList_To_v1alpha4_ClusterList(in, out, s) +// Convert_v1alpha3_ClusterList_To_v1beta1_ClusterList is an autogenerated conversion function. +func Convert_v1alpha3_ClusterList_To_v1beta1_ClusterList(in *ClusterList, out *v1beta1.ClusterList, s conversion.Scope) error { + return autoConvert_v1alpha3_ClusterList_To_v1beta1_ClusterList(in, out, s) } -func autoConvert_v1alpha4_ClusterList_To_v1alpha3_ClusterList(in *v1alpha4.ClusterList, out *ClusterList, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterList_To_v1alpha3_ClusterList(in *v1beta1.ClusterList, out *ClusterList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Cluster, len(*in)) for i := range *in { - if err := Convert_v1alpha4_Cluster_To_v1alpha3_Cluster(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_Cluster_To_v1alpha3_Cluster(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -471,25 +471,25 @@ func autoConvert_v1alpha4_ClusterList_To_v1alpha3_ClusterList(in *v1alpha4.Clust return nil } -// Convert_v1alpha4_ClusterList_To_v1alpha3_ClusterList is an autogenerated conversion function. -func Convert_v1alpha4_ClusterList_To_v1alpha3_ClusterList(in *v1alpha4.ClusterList, out *ClusterList, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterList_To_v1alpha3_ClusterList(in, out, s) +// Convert_v1beta1_ClusterList_To_v1alpha3_ClusterList is an autogenerated conversion function. +func Convert_v1beta1_ClusterList_To_v1alpha3_ClusterList(in *v1beta1.ClusterList, out *ClusterList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterList_To_v1alpha3_ClusterList(in, out, s) } -func autoConvert_v1alpha3_ClusterNetwork_To_v1alpha4_ClusterNetwork(in *ClusterNetwork, out *v1alpha4.ClusterNetwork, s conversion.Scope) error { +func autoConvert_v1alpha3_ClusterNetwork_To_v1beta1_ClusterNetwork(in *ClusterNetwork, out *v1beta1.ClusterNetwork, s conversion.Scope) error { out.APIServerPort = (*int32)(unsafe.Pointer(in.APIServerPort)) - out.Services = (*v1alpha4.NetworkRanges)(unsafe.Pointer(in.Services)) - out.Pods = (*v1alpha4.NetworkRanges)(unsafe.Pointer(in.Pods)) + out.Services = (*v1beta1.NetworkRanges)(unsafe.Pointer(in.Services)) + out.Pods = (*v1beta1.NetworkRanges)(unsafe.Pointer(in.Pods)) out.ServiceDomain = in.ServiceDomain return nil } -// Convert_v1alpha3_ClusterNetwork_To_v1alpha4_ClusterNetwork is an autogenerated conversion function. -func Convert_v1alpha3_ClusterNetwork_To_v1alpha4_ClusterNetwork(in *ClusterNetwork, out *v1alpha4.ClusterNetwork, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterNetwork_To_v1alpha4_ClusterNetwork(in, out, s) +// Convert_v1alpha3_ClusterNetwork_To_v1beta1_ClusterNetwork is an autogenerated conversion function. +func Convert_v1alpha3_ClusterNetwork_To_v1beta1_ClusterNetwork(in *ClusterNetwork, out *v1beta1.ClusterNetwork, s conversion.Scope) error { + return autoConvert_v1alpha3_ClusterNetwork_To_v1beta1_ClusterNetwork(in, out, s) } -func autoConvert_v1alpha4_ClusterNetwork_To_v1alpha3_ClusterNetwork(in *v1alpha4.ClusterNetwork, out *ClusterNetwork, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterNetwork_To_v1alpha3_ClusterNetwork(in *v1beta1.ClusterNetwork, out *ClusterNetwork, s conversion.Scope) error { out.APIServerPort = (*int32)(unsafe.Pointer(in.APIServerPort)) out.Services = (*NetworkRanges)(unsafe.Pointer(in.Services)) out.Pods = (*NetworkRanges)(unsafe.Pointer(in.Pods)) @@ -497,15 +497,15 @@ func autoConvert_v1alpha4_ClusterNetwork_To_v1alpha3_ClusterNetwork(in *v1alpha4 return nil } -// Convert_v1alpha4_ClusterNetwork_To_v1alpha3_ClusterNetwork is an autogenerated conversion function. -func Convert_v1alpha4_ClusterNetwork_To_v1alpha3_ClusterNetwork(in *v1alpha4.ClusterNetwork, out *ClusterNetwork, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterNetwork_To_v1alpha3_ClusterNetwork(in, out, s) +// Convert_v1beta1_ClusterNetwork_To_v1alpha3_ClusterNetwork is an autogenerated conversion function. +func Convert_v1beta1_ClusterNetwork_To_v1alpha3_ClusterNetwork(in *v1beta1.ClusterNetwork, out *ClusterNetwork, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterNetwork_To_v1alpha3_ClusterNetwork(in, out, s) } -func autoConvert_v1alpha3_ClusterSpec_To_v1alpha4_ClusterSpec(in *ClusterSpec, out *v1alpha4.ClusterSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_ClusterSpec_To_v1beta1_ClusterSpec(in *ClusterSpec, out *v1beta1.ClusterSpec, s conversion.Scope) error { out.Paused = in.Paused - out.ClusterNetwork = (*v1alpha4.ClusterNetwork)(unsafe.Pointer(in.ClusterNetwork)) - if err := Convert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { + out.ClusterNetwork = (*v1beta1.ClusterNetwork)(unsafe.Pointer(in.ClusterNetwork)) + if err := Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { return err } out.ControlPlaneRef = (*v1.ObjectReference)(unsafe.Pointer(in.ControlPlaneRef)) @@ -513,15 +513,15 @@ func autoConvert_v1alpha3_ClusterSpec_To_v1alpha4_ClusterSpec(in *ClusterSpec, o return nil } -// Convert_v1alpha3_ClusterSpec_To_v1alpha4_ClusterSpec is an autogenerated conversion function. -func Convert_v1alpha3_ClusterSpec_To_v1alpha4_ClusterSpec(in *ClusterSpec, out *v1alpha4.ClusterSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterSpec_To_v1alpha4_ClusterSpec(in, out, s) +// Convert_v1alpha3_ClusterSpec_To_v1beta1_ClusterSpec is an autogenerated conversion function. +func Convert_v1alpha3_ClusterSpec_To_v1beta1_ClusterSpec(in *ClusterSpec, out *v1beta1.ClusterSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_ClusterSpec_To_v1beta1_ClusterSpec(in, out, s) } -func autoConvert_v1alpha4_ClusterSpec_To_v1alpha3_ClusterSpec(in *v1alpha4.ClusterSpec, out *ClusterSpec, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterSpec_To_v1alpha3_ClusterSpec(in *v1beta1.ClusterSpec, out *ClusterSpec, s conversion.Scope) error { out.Paused = in.Paused out.ClusterNetwork = (*ClusterNetwork)(unsafe.Pointer(in.ClusterNetwork)) - if err := Convert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { + if err := Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { return err } out.ControlPlaneRef = (*v1.ObjectReference)(unsafe.Pointer(in.ControlPlaneRef)) @@ -530,20 +530,20 @@ func autoConvert_v1alpha4_ClusterSpec_To_v1alpha3_ClusterSpec(in *v1alpha4.Clust return nil } -func autoConvert_v1alpha3_ClusterStatus_To_v1alpha4_ClusterStatus(in *ClusterStatus, out *v1alpha4.ClusterStatus, s conversion.Scope) error { - out.FailureDomains = *(*v1alpha4.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) +func autoConvert_v1alpha3_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { + out.FailureDomains = *(*v1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) out.FailureReason = (*errors.ClusterStatusError)(unsafe.Pointer(in.FailureReason)) out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) out.Phase = in.Phase out.InfrastructureReady = in.InfrastructureReady // WARNING: in.ControlPlaneInitialized requires manual conversion: does not exist in peer-type out.ControlPlaneReady = in.ControlPlaneReady - out.Conditions = *(*v1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) + out.Conditions = *(*v1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) out.ObservedGeneration = in.ObservedGeneration return nil } -func autoConvert_v1alpha4_ClusterStatus_To_v1alpha3_ClusterStatus(in *v1alpha4.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterStatus_To_v1alpha3_ClusterStatus(in *v1beta1.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { out.FailureDomains = *(*FailureDomains)(unsafe.Pointer(&in.FailureDomains)) out.FailureReason = (*errors.ClusterStatusError)(unsafe.Pointer(in.FailureReason)) out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) @@ -555,27 +555,27 @@ func autoConvert_v1alpha4_ClusterStatus_To_v1alpha3_ClusterStatus(in *v1alpha4.C return nil } -// Convert_v1alpha4_ClusterStatus_To_v1alpha3_ClusterStatus is an autogenerated conversion function. -func Convert_v1alpha4_ClusterStatus_To_v1alpha3_ClusterStatus(in *v1alpha4.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterStatus_To_v1alpha3_ClusterStatus(in, out, s) +// Convert_v1beta1_ClusterStatus_To_v1alpha3_ClusterStatus is an autogenerated conversion function. +func Convert_v1beta1_ClusterStatus_To_v1alpha3_ClusterStatus(in *v1beta1.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterStatus_To_v1alpha3_ClusterStatus(in, out, s) } -func autoConvert_v1alpha3_Condition_To_v1alpha4_Condition(in *Condition, out *v1alpha4.Condition, s conversion.Scope) error { - out.Type = v1alpha4.ConditionType(in.Type) +func autoConvert_v1alpha3_Condition_To_v1beta1_Condition(in *Condition, out *v1beta1.Condition, s conversion.Scope) error { + out.Type = v1beta1.ConditionType(in.Type) out.Status = v1.ConditionStatus(in.Status) - out.Severity = v1alpha4.ConditionSeverity(in.Severity) + out.Severity = v1beta1.ConditionSeverity(in.Severity) out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil } -// Convert_v1alpha3_Condition_To_v1alpha4_Condition is an autogenerated conversion function. -func Convert_v1alpha3_Condition_To_v1alpha4_Condition(in *Condition, out *v1alpha4.Condition, s conversion.Scope) error { - return autoConvert_v1alpha3_Condition_To_v1alpha4_Condition(in, out, s) +// Convert_v1alpha3_Condition_To_v1beta1_Condition is an autogenerated conversion function. +func Convert_v1alpha3_Condition_To_v1beta1_Condition(in *Condition, out *v1beta1.Condition, s conversion.Scope) error { + return autoConvert_v1alpha3_Condition_To_v1beta1_Condition(in, out, s) } -func autoConvert_v1alpha4_Condition_To_v1alpha3_Condition(in *v1alpha4.Condition, out *Condition, s conversion.Scope) error { +func autoConvert_v1beta1_Condition_To_v1alpha3_Condition(in *v1beta1.Condition, out *Condition, s conversion.Scope) error { out.Type = ConditionType(in.Type) out.Status = v1.ConditionStatus(in.Status) out.Severity = ConditionSeverity(in.Severity) @@ -585,126 +585,126 @@ func autoConvert_v1alpha4_Condition_To_v1alpha3_Condition(in *v1alpha4.Condition return nil } -// Convert_v1alpha4_Condition_To_v1alpha3_Condition is an autogenerated conversion function. -func Convert_v1alpha4_Condition_To_v1alpha3_Condition(in *v1alpha4.Condition, out *Condition, s conversion.Scope) error { - return autoConvert_v1alpha4_Condition_To_v1alpha3_Condition(in, out, s) +// Convert_v1beta1_Condition_To_v1alpha3_Condition is an autogenerated conversion function. +func Convert_v1beta1_Condition_To_v1alpha3_Condition(in *v1beta1.Condition, out *Condition, s conversion.Scope) error { + return autoConvert_v1beta1_Condition_To_v1alpha3_Condition(in, out, s) } -func autoConvert_v1alpha3_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(in *FailureDomainSpec, out *v1alpha4.FailureDomainSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_FailureDomainSpec_To_v1beta1_FailureDomainSpec(in *FailureDomainSpec, out *v1beta1.FailureDomainSpec, s conversion.Scope) error { out.ControlPlane = in.ControlPlane out.Attributes = *(*map[string]string)(unsafe.Pointer(&in.Attributes)) return nil } -// Convert_v1alpha3_FailureDomainSpec_To_v1alpha4_FailureDomainSpec is an autogenerated conversion function. -func Convert_v1alpha3_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(in *FailureDomainSpec, out *v1alpha4.FailureDomainSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(in, out, s) +// Convert_v1alpha3_FailureDomainSpec_To_v1beta1_FailureDomainSpec is an autogenerated conversion function. +func Convert_v1alpha3_FailureDomainSpec_To_v1beta1_FailureDomainSpec(in *FailureDomainSpec, out *v1beta1.FailureDomainSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_FailureDomainSpec_To_v1beta1_FailureDomainSpec(in, out, s) } -func autoConvert_v1alpha4_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(in *v1alpha4.FailureDomainSpec, out *FailureDomainSpec, s conversion.Scope) error { +func autoConvert_v1beta1_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(in *v1beta1.FailureDomainSpec, out *FailureDomainSpec, s conversion.Scope) error { out.ControlPlane = in.ControlPlane out.Attributes = *(*map[string]string)(unsafe.Pointer(&in.Attributes)) return nil } -// Convert_v1alpha4_FailureDomainSpec_To_v1alpha3_FailureDomainSpec is an autogenerated conversion function. -func Convert_v1alpha4_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(in *v1alpha4.FailureDomainSpec, out *FailureDomainSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(in, out, s) +// Convert_v1beta1_FailureDomainSpec_To_v1alpha3_FailureDomainSpec is an autogenerated conversion function. +func Convert_v1beta1_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(in *v1beta1.FailureDomainSpec, out *FailureDomainSpec, s conversion.Scope) error { + return autoConvert_v1beta1_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(in, out, s) } -func autoConvert_v1alpha3_Machine_To_v1alpha4_Machine(in *Machine, out *v1alpha4.Machine, s conversion.Scope) error { +func autoConvert_v1alpha3_Machine_To_v1beta1_Machine(in *Machine, out *v1beta1.Machine, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_MachineSpec_To_v1alpha4_MachineSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_MachineSpec_To_v1beta1_MachineSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_MachineStatus_To_v1alpha4_MachineStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_MachineStatus_To_v1beta1_MachineStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_Machine_To_v1alpha4_Machine is an autogenerated conversion function. -func Convert_v1alpha3_Machine_To_v1alpha4_Machine(in *Machine, out *v1alpha4.Machine, s conversion.Scope) error { - return autoConvert_v1alpha3_Machine_To_v1alpha4_Machine(in, out, s) +// Convert_v1alpha3_Machine_To_v1beta1_Machine is an autogenerated conversion function. +func Convert_v1alpha3_Machine_To_v1beta1_Machine(in *Machine, out *v1beta1.Machine, s conversion.Scope) error { + return autoConvert_v1alpha3_Machine_To_v1beta1_Machine(in, out, s) } -func autoConvert_v1alpha4_Machine_To_v1alpha3_Machine(in *v1alpha4.Machine, out *Machine, s conversion.Scope) error { +func autoConvert_v1beta1_Machine_To_v1alpha3_Machine(in *v1beta1.Machine, out *Machine, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_MachineSpec_To_v1alpha3_MachineSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_MachineSpec_To_v1alpha3_MachineSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_MachineStatus_To_v1alpha3_MachineStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_MachineStatus_To_v1alpha3_MachineStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_Machine_To_v1alpha3_Machine is an autogenerated conversion function. -func Convert_v1alpha4_Machine_To_v1alpha3_Machine(in *v1alpha4.Machine, out *Machine, s conversion.Scope) error { - return autoConvert_v1alpha4_Machine_To_v1alpha3_Machine(in, out, s) +// Convert_v1beta1_Machine_To_v1alpha3_Machine is an autogenerated conversion function. +func Convert_v1beta1_Machine_To_v1alpha3_Machine(in *v1beta1.Machine, out *Machine, s conversion.Scope) error { + return autoConvert_v1beta1_Machine_To_v1alpha3_Machine(in, out, s) } -func autoConvert_v1alpha3_MachineAddress_To_v1alpha4_MachineAddress(in *MachineAddress, out *v1alpha4.MachineAddress, s conversion.Scope) error { - out.Type = v1alpha4.MachineAddressType(in.Type) +func autoConvert_v1alpha3_MachineAddress_To_v1beta1_MachineAddress(in *MachineAddress, out *v1beta1.MachineAddress, s conversion.Scope) error { + out.Type = v1beta1.MachineAddressType(in.Type) out.Address = in.Address return nil } -// Convert_v1alpha3_MachineAddress_To_v1alpha4_MachineAddress is an autogenerated conversion function. -func Convert_v1alpha3_MachineAddress_To_v1alpha4_MachineAddress(in *MachineAddress, out *v1alpha4.MachineAddress, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineAddress_To_v1alpha4_MachineAddress(in, out, s) +// Convert_v1alpha3_MachineAddress_To_v1beta1_MachineAddress is an autogenerated conversion function. +func Convert_v1alpha3_MachineAddress_To_v1beta1_MachineAddress(in *MachineAddress, out *v1beta1.MachineAddress, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineAddress_To_v1beta1_MachineAddress(in, out, s) } -func autoConvert_v1alpha4_MachineAddress_To_v1alpha3_MachineAddress(in *v1alpha4.MachineAddress, out *MachineAddress, s conversion.Scope) error { +func autoConvert_v1beta1_MachineAddress_To_v1alpha3_MachineAddress(in *v1beta1.MachineAddress, out *MachineAddress, s conversion.Scope) error { out.Type = MachineAddressType(in.Type) out.Address = in.Address return nil } -// Convert_v1alpha4_MachineAddress_To_v1alpha3_MachineAddress is an autogenerated conversion function. -func Convert_v1alpha4_MachineAddress_To_v1alpha3_MachineAddress(in *v1alpha4.MachineAddress, out *MachineAddress, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineAddress_To_v1alpha3_MachineAddress(in, out, s) +// Convert_v1beta1_MachineAddress_To_v1alpha3_MachineAddress is an autogenerated conversion function. +func Convert_v1beta1_MachineAddress_To_v1alpha3_MachineAddress(in *v1beta1.MachineAddress, out *MachineAddress, s conversion.Scope) error { + return autoConvert_v1beta1_MachineAddress_To_v1alpha3_MachineAddress(in, out, s) } -func autoConvert_v1alpha3_MachineDeployment_To_v1alpha4_MachineDeployment(in *MachineDeployment, out *v1alpha4.MachineDeployment, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineDeployment_To_v1beta1_MachineDeployment(in *MachineDeployment, out *v1beta1.MachineDeployment, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_MachineDeployment_To_v1alpha4_MachineDeployment is an autogenerated conversion function. -func Convert_v1alpha3_MachineDeployment_To_v1alpha4_MachineDeployment(in *MachineDeployment, out *v1alpha4.MachineDeployment, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineDeployment_To_v1alpha4_MachineDeployment(in, out, s) +// Convert_v1alpha3_MachineDeployment_To_v1beta1_MachineDeployment is an autogenerated conversion function. +func Convert_v1alpha3_MachineDeployment_To_v1beta1_MachineDeployment(in *MachineDeployment, out *v1beta1.MachineDeployment, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineDeployment_To_v1beta1_MachineDeployment(in, out, s) } -func autoConvert_v1alpha4_MachineDeployment_To_v1alpha3_MachineDeployment(in *v1alpha4.MachineDeployment, out *MachineDeployment, s conversion.Scope) error { +func autoConvert_v1beta1_MachineDeployment_To_v1alpha3_MachineDeployment(in *v1beta1.MachineDeployment, out *MachineDeployment, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_MachineDeployment_To_v1alpha3_MachineDeployment is an autogenerated conversion function. -func Convert_v1alpha4_MachineDeployment_To_v1alpha3_MachineDeployment(in *v1alpha4.MachineDeployment, out *MachineDeployment, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineDeployment_To_v1alpha3_MachineDeployment(in, out, s) +// Convert_v1beta1_MachineDeployment_To_v1alpha3_MachineDeployment is an autogenerated conversion function. +func Convert_v1beta1_MachineDeployment_To_v1alpha3_MachineDeployment(in *v1beta1.MachineDeployment, out *MachineDeployment, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeployment_To_v1alpha3_MachineDeployment(in, out, s) } -func autoConvert_v1alpha3_MachineDeploymentList_To_v1alpha4_MachineDeploymentList(in *MachineDeploymentList, out *v1alpha4.MachineDeploymentList, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineDeploymentList_To_v1beta1_MachineDeploymentList(in *MachineDeploymentList, out *v1beta1.MachineDeploymentList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.MachineDeployment, len(*in)) + *out = make([]v1beta1.MachineDeployment, len(*in)) for i := range *in { - if err := Convert_v1alpha3_MachineDeployment_To_v1alpha4_MachineDeployment(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_MachineDeployment_To_v1beta1_MachineDeployment(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -714,18 +714,18 @@ func autoConvert_v1alpha3_MachineDeploymentList_To_v1alpha4_MachineDeploymentLis return nil } -// Convert_v1alpha3_MachineDeploymentList_To_v1alpha4_MachineDeploymentList is an autogenerated conversion function. -func Convert_v1alpha3_MachineDeploymentList_To_v1alpha4_MachineDeploymentList(in *MachineDeploymentList, out *v1alpha4.MachineDeploymentList, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineDeploymentList_To_v1alpha4_MachineDeploymentList(in, out, s) +// Convert_v1alpha3_MachineDeploymentList_To_v1beta1_MachineDeploymentList is an autogenerated conversion function. +func Convert_v1alpha3_MachineDeploymentList_To_v1beta1_MachineDeploymentList(in *MachineDeploymentList, out *v1beta1.MachineDeploymentList, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineDeploymentList_To_v1beta1_MachineDeploymentList(in, out, s) } -func autoConvert_v1alpha4_MachineDeploymentList_To_v1alpha3_MachineDeploymentList(in *v1alpha4.MachineDeploymentList, out *MachineDeploymentList, s conversion.Scope) error { +func autoConvert_v1beta1_MachineDeploymentList_To_v1alpha3_MachineDeploymentList(in *v1beta1.MachineDeploymentList, out *MachineDeploymentList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]MachineDeployment, len(*in)) for i := range *in { - if err := Convert_v1alpha4_MachineDeployment_To_v1alpha3_MachineDeployment(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_MachineDeployment_To_v1alpha3_MachineDeployment(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -735,22 +735,22 @@ func autoConvert_v1alpha4_MachineDeploymentList_To_v1alpha3_MachineDeploymentLis return nil } -// Convert_v1alpha4_MachineDeploymentList_To_v1alpha3_MachineDeploymentList is an autogenerated conversion function. -func Convert_v1alpha4_MachineDeploymentList_To_v1alpha3_MachineDeploymentList(in *v1alpha4.MachineDeploymentList, out *MachineDeploymentList, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineDeploymentList_To_v1alpha3_MachineDeploymentList(in, out, s) +// Convert_v1beta1_MachineDeploymentList_To_v1alpha3_MachineDeploymentList is an autogenerated conversion function. +func Convert_v1beta1_MachineDeploymentList_To_v1alpha3_MachineDeploymentList(in *v1beta1.MachineDeploymentList, out *MachineDeploymentList, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentList_To_v1alpha3_MachineDeploymentList(in, out, s) } -func autoConvert_v1alpha3_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec(in *MachineDeploymentSpec, out *v1alpha4.MachineDeploymentSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec(in *MachineDeploymentSpec, out *v1beta1.MachineDeploymentSpec, s conversion.Scope) error { out.ClusterName = in.ClusterName out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) out.Selector = in.Selector - if err := Convert_v1alpha3_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + if err := Convert_v1alpha3_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } if in.Strategy != nil { in, out := &in.Strategy, &out.Strategy - *out = new(v1alpha4.MachineDeploymentStrategy) - if err := Convert_v1alpha3_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy(*in, *out, s); err != nil { + *out = new(v1beta1.MachineDeploymentStrategy) + if err := Convert_v1alpha3_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy(*in, *out, s); err != nil { return err } } else { @@ -763,22 +763,22 @@ func autoConvert_v1alpha3_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpe return nil } -// Convert_v1alpha3_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec is an autogenerated conversion function. -func Convert_v1alpha3_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec(in *MachineDeploymentSpec, out *v1alpha4.MachineDeploymentSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec(in, out, s) +// Convert_v1alpha3_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec is an autogenerated conversion function. +func Convert_v1alpha3_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec(in *MachineDeploymentSpec, out *v1beta1.MachineDeploymentSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec(in, out, s) } -func autoConvert_v1alpha4_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec(in *v1alpha4.MachineDeploymentSpec, out *MachineDeploymentSpec, s conversion.Scope) error { +func autoConvert_v1beta1_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec(in *v1beta1.MachineDeploymentSpec, out *MachineDeploymentSpec, s conversion.Scope) error { out.ClusterName = in.ClusterName out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) out.Selector = in.Selector - if err := Convert_v1alpha4_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + if err := Convert_v1beta1_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } if in.Strategy != nil { in, out := &in.Strategy, &out.Strategy *out = new(MachineDeploymentStrategy) - if err := Convert_v1alpha4_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy(*in, *out, s); err != nil { + if err := Convert_v1beta1_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy(*in, *out, s); err != nil { return err } } else { @@ -791,12 +791,12 @@ func autoConvert_v1alpha4_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpe return nil } -// Convert_v1alpha4_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec is an autogenerated conversion function. -func Convert_v1alpha4_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec(in *v1alpha4.MachineDeploymentSpec, out *MachineDeploymentSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec(in, out, s) +// Convert_v1beta1_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec is an autogenerated conversion function. +func Convert_v1beta1_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec(in *v1beta1.MachineDeploymentSpec, out *MachineDeploymentSpec, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentSpec_To_v1alpha3_MachineDeploymentSpec(in, out, s) } -func autoConvert_v1alpha3_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus(in *MachineDeploymentStatus, out *v1alpha4.MachineDeploymentStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(in *MachineDeploymentStatus, out *v1beta1.MachineDeploymentStatus, s conversion.Scope) error { out.ObservedGeneration = in.ObservedGeneration out.Selector = in.Selector out.Replicas = in.Replicas @@ -808,12 +808,12 @@ func autoConvert_v1alpha3_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentS return nil } -// Convert_v1alpha3_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus is an autogenerated conversion function. -func Convert_v1alpha3_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus(in *MachineDeploymentStatus, out *v1alpha4.MachineDeploymentStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus(in, out, s) +// Convert_v1alpha3_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus is an autogenerated conversion function. +func Convert_v1alpha3_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(in *MachineDeploymentStatus, out *v1beta1.MachineDeploymentStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(in, out, s) } -func autoConvert_v1alpha4_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentStatus(in *v1alpha4.MachineDeploymentStatus, out *MachineDeploymentStatus, s conversion.Scope) error { +func autoConvert_v1beta1_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentStatus(in *v1beta1.MachineDeploymentStatus, out *MachineDeploymentStatus, s conversion.Scope) error { out.ObservedGeneration = in.ObservedGeneration out.Selector = in.Selector out.Replicas = in.Replicas @@ -826,12 +826,12 @@ func autoConvert_v1alpha4_MachineDeploymentStatus_To_v1alpha3_MachineDeploymentS return nil } -func autoConvert_v1alpha3_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy(in *MachineDeploymentStrategy, out *v1alpha4.MachineDeploymentStrategy, s conversion.Scope) error { - out.Type = v1alpha4.MachineDeploymentStrategyType(in.Type) +func autoConvert_v1alpha3_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy(in *MachineDeploymentStrategy, out *v1beta1.MachineDeploymentStrategy, s conversion.Scope) error { + out.Type = v1beta1.MachineDeploymentStrategyType(in.Type) if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - *out = new(v1alpha4.MachineRollingUpdateDeployment) - if err := Convert_v1alpha3_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(*in, *out, s); err != nil { + *out = new(v1beta1.MachineRollingUpdateDeployment) + if err := Convert_v1alpha3_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(*in, *out, s); err != nil { return err } } else { @@ -840,17 +840,17 @@ func autoConvert_v1alpha3_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymen return nil } -// Convert_v1alpha3_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy is an autogenerated conversion function. -func Convert_v1alpha3_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy(in *MachineDeploymentStrategy, out *v1alpha4.MachineDeploymentStrategy, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy(in, out, s) +// Convert_v1alpha3_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy is an autogenerated conversion function. +func Convert_v1alpha3_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy(in *MachineDeploymentStrategy, out *v1beta1.MachineDeploymentStrategy, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy(in, out, s) } -func autoConvert_v1alpha4_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy(in *v1alpha4.MachineDeploymentStrategy, out *MachineDeploymentStrategy, s conversion.Scope) error { +func autoConvert_v1beta1_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy(in *v1beta1.MachineDeploymentStrategy, out *MachineDeploymentStrategy, s conversion.Scope) error { out.Type = MachineDeploymentStrategyType(in.Type) if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate *out = new(MachineRollingUpdateDeployment) - if err := Convert_v1alpha4_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(*in, *out, s); err != nil { + if err := Convert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(*in, *out, s); err != nil { return err } } else { @@ -859,50 +859,50 @@ func autoConvert_v1alpha4_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymen return nil } -// Convert_v1alpha4_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy is an autogenerated conversion function. -func Convert_v1alpha4_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy(in *v1alpha4.MachineDeploymentStrategy, out *MachineDeploymentStrategy, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy(in, out, s) +// Convert_v1beta1_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy is an autogenerated conversion function. +func Convert_v1beta1_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy(in *v1beta1.MachineDeploymentStrategy, out *MachineDeploymentStrategy, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentStrategy_To_v1alpha3_MachineDeploymentStrategy(in, out, s) } -func autoConvert_v1alpha3_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(in *MachineHealthCheck, out *v1alpha4.MachineHealthCheck, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineHealthCheck_To_v1beta1_MachineHealthCheck(in *MachineHealthCheck, out *v1beta1.MachineHealthCheck, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_MachineHealthCheck_To_v1alpha4_MachineHealthCheck is an autogenerated conversion function. -func Convert_v1alpha3_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(in *MachineHealthCheck, out *v1alpha4.MachineHealthCheck, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(in, out, s) +// Convert_v1alpha3_MachineHealthCheck_To_v1beta1_MachineHealthCheck is an autogenerated conversion function. +func Convert_v1alpha3_MachineHealthCheck_To_v1beta1_MachineHealthCheck(in *MachineHealthCheck, out *v1beta1.MachineHealthCheck, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineHealthCheck_To_v1beta1_MachineHealthCheck(in, out, s) } -func autoConvert_v1alpha4_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(in *v1alpha4.MachineHealthCheck, out *MachineHealthCheck, s conversion.Scope) error { +func autoConvert_v1beta1_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(in *v1beta1.MachineHealthCheck, out *MachineHealthCheck, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_MachineHealthCheck_To_v1alpha3_MachineHealthCheck is an autogenerated conversion function. -func Convert_v1alpha4_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(in *v1alpha4.MachineHealthCheck, out *MachineHealthCheck, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(in, out, s) +// Convert_v1beta1_MachineHealthCheck_To_v1alpha3_MachineHealthCheck is an autogenerated conversion function. +func Convert_v1beta1_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(in *v1beta1.MachineHealthCheck, out *MachineHealthCheck, s conversion.Scope) error { + return autoConvert_v1beta1_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(in, out, s) } -func autoConvert_v1alpha3_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList(in *MachineHealthCheckList, out *v1alpha4.MachineHealthCheckList, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList(in *MachineHealthCheckList, out *v1beta1.MachineHealthCheckList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.MachineHealthCheck, len(*in)) + *out = make([]v1beta1.MachineHealthCheck, len(*in)) for i := range *in { - if err := Convert_v1alpha3_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_MachineHealthCheck_To_v1beta1_MachineHealthCheck(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -912,18 +912,18 @@ func autoConvert_v1alpha3_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckL return nil } -// Convert_v1alpha3_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList is an autogenerated conversion function. -func Convert_v1alpha3_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList(in *MachineHealthCheckList, out *v1alpha4.MachineHealthCheckList, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList(in, out, s) +// Convert_v1alpha3_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList is an autogenerated conversion function. +func Convert_v1alpha3_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList(in *MachineHealthCheckList, out *v1beta1.MachineHealthCheckList, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList(in, out, s) } -func autoConvert_v1alpha4_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(in *v1alpha4.MachineHealthCheckList, out *MachineHealthCheckList, s conversion.Scope) error { +func autoConvert_v1beta1_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(in *v1beta1.MachineHealthCheckList, out *MachineHealthCheckList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]MachineHealthCheck, len(*in)) for i := range *in { - if err := Convert_v1alpha4_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_MachineHealthCheck_To_v1alpha3_MachineHealthCheck(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -933,27 +933,27 @@ func autoConvert_v1alpha4_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckL return nil } -// Convert_v1alpha4_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList is an autogenerated conversion function. -func Convert_v1alpha4_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(in *v1alpha4.MachineHealthCheckList, out *MachineHealthCheckList, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(in, out, s) +// Convert_v1beta1_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList is an autogenerated conversion function. +func Convert_v1beta1_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(in *v1beta1.MachineHealthCheckList, out *MachineHealthCheckList, s conversion.Scope) error { + return autoConvert_v1beta1_MachineHealthCheckList_To_v1alpha3_MachineHealthCheckList(in, out, s) } -func autoConvert_v1alpha3_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec(in *MachineHealthCheckSpec, out *v1alpha4.MachineHealthCheckSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(in *MachineHealthCheckSpec, out *v1beta1.MachineHealthCheckSpec, s conversion.Scope) error { out.ClusterName = in.ClusterName out.Selector = in.Selector - out.UnhealthyConditions = *(*[]v1alpha4.UnhealthyCondition)(unsafe.Pointer(&in.UnhealthyConditions)) + out.UnhealthyConditions = *(*[]v1beta1.UnhealthyCondition)(unsafe.Pointer(&in.UnhealthyConditions)) out.MaxUnhealthy = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnhealthy)) out.NodeStartupTimeout = (*metav1.Duration)(unsafe.Pointer(in.NodeStartupTimeout)) out.RemediationTemplate = (*v1.ObjectReference)(unsafe.Pointer(in.RemediationTemplate)) return nil } -// Convert_v1alpha3_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec is an autogenerated conversion function. -func Convert_v1alpha3_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec(in *MachineHealthCheckSpec, out *v1alpha4.MachineHealthCheckSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec(in, out, s) +// Convert_v1alpha3_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec is an autogenerated conversion function. +func Convert_v1alpha3_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(in *MachineHealthCheckSpec, out *v1beta1.MachineHealthCheckSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(in, out, s) } -func autoConvert_v1alpha4_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckSpec(in *v1alpha4.MachineHealthCheckSpec, out *MachineHealthCheckSpec, s conversion.Scope) error { +func autoConvert_v1beta1_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckSpec(in *v1beta1.MachineHealthCheckSpec, out *MachineHealthCheckSpec, s conversion.Scope) error { out.ClusterName = in.ClusterName out.Selector = in.Selector out.UnhealthyConditions = *(*[]UnhealthyCondition)(unsafe.Pointer(&in.UnhealthyConditions)) @@ -964,22 +964,22 @@ func autoConvert_v1alpha4_MachineHealthCheckSpec_To_v1alpha3_MachineHealthCheckS return nil } -func autoConvert_v1alpha3_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus(in *MachineHealthCheckStatus, out *v1alpha4.MachineHealthCheckStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(in *MachineHealthCheckStatus, out *v1beta1.MachineHealthCheckStatus, s conversion.Scope) error { out.ExpectedMachines = in.ExpectedMachines out.CurrentHealthy = in.CurrentHealthy out.RemediationsAllowed = in.RemediationsAllowed out.ObservedGeneration = in.ObservedGeneration out.Targets = *(*[]string)(unsafe.Pointer(&in.Targets)) - out.Conditions = *(*v1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) + out.Conditions = *(*v1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) return nil } -// Convert_v1alpha3_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus is an autogenerated conversion function. -func Convert_v1alpha3_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus(in *MachineHealthCheckStatus, out *v1alpha4.MachineHealthCheckStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus(in, out, s) +// Convert_v1alpha3_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus is an autogenerated conversion function. +func Convert_v1alpha3_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(in *MachineHealthCheckStatus, out *v1beta1.MachineHealthCheckStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(in, out, s) } -func autoConvert_v1alpha4_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus(in *v1alpha4.MachineHealthCheckStatus, out *MachineHealthCheckStatus, s conversion.Scope) error { +func autoConvert_v1beta1_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus(in *v1beta1.MachineHealthCheckStatus, out *MachineHealthCheckStatus, s conversion.Scope) error { out.ExpectedMachines = in.ExpectedMachines out.CurrentHealthy = in.CurrentHealthy out.RemediationsAllowed = in.RemediationsAllowed @@ -989,18 +989,18 @@ func autoConvert_v1alpha4_MachineHealthCheckStatus_To_v1alpha3_MachineHealthChec return nil } -// Convert_v1alpha4_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus is an autogenerated conversion function. -func Convert_v1alpha4_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus(in *v1alpha4.MachineHealthCheckStatus, out *MachineHealthCheckStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus(in, out, s) +// Convert_v1beta1_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus is an autogenerated conversion function. +func Convert_v1beta1_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus(in *v1beta1.MachineHealthCheckStatus, out *MachineHealthCheckStatus, s conversion.Scope) error { + return autoConvert_v1beta1_MachineHealthCheckStatus_To_v1alpha3_MachineHealthCheckStatus(in, out, s) } -func autoConvert_v1alpha3_MachineList_To_v1alpha4_MachineList(in *MachineList, out *v1alpha4.MachineList, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineList_To_v1beta1_MachineList(in *MachineList, out *v1beta1.MachineList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.Machine, len(*in)) + *out = make([]v1beta1.Machine, len(*in)) for i := range *in { - if err := Convert_v1alpha3_Machine_To_v1alpha4_Machine(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_Machine_To_v1beta1_Machine(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -1010,18 +1010,18 @@ func autoConvert_v1alpha3_MachineList_To_v1alpha4_MachineList(in *MachineList, o return nil } -// Convert_v1alpha3_MachineList_To_v1alpha4_MachineList is an autogenerated conversion function. -func Convert_v1alpha3_MachineList_To_v1alpha4_MachineList(in *MachineList, out *v1alpha4.MachineList, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineList_To_v1alpha4_MachineList(in, out, s) +// Convert_v1alpha3_MachineList_To_v1beta1_MachineList is an autogenerated conversion function. +func Convert_v1alpha3_MachineList_To_v1beta1_MachineList(in *MachineList, out *v1beta1.MachineList, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineList_To_v1beta1_MachineList(in, out, s) } -func autoConvert_v1alpha4_MachineList_To_v1alpha3_MachineList(in *v1alpha4.MachineList, out *MachineList, s conversion.Scope) error { +func autoConvert_v1beta1_MachineList_To_v1alpha3_MachineList(in *v1beta1.MachineList, out *MachineList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Machine, len(*in)) for i := range *in { - if err := Convert_v1alpha4_Machine_To_v1alpha3_Machine(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_Machine_To_v1alpha3_Machine(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -1031,68 +1031,68 @@ func autoConvert_v1alpha4_MachineList_To_v1alpha3_MachineList(in *v1alpha4.Machi return nil } -// Convert_v1alpha4_MachineList_To_v1alpha3_MachineList is an autogenerated conversion function. -func Convert_v1alpha4_MachineList_To_v1alpha3_MachineList(in *v1alpha4.MachineList, out *MachineList, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineList_To_v1alpha3_MachineList(in, out, s) +// Convert_v1beta1_MachineList_To_v1alpha3_MachineList is an autogenerated conversion function. +func Convert_v1beta1_MachineList_To_v1alpha3_MachineList(in *v1beta1.MachineList, out *MachineList, s conversion.Scope) error { + return autoConvert_v1beta1_MachineList_To_v1alpha3_MachineList(in, out, s) } -func autoConvert_v1alpha3_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(in *MachineRollingUpdateDeployment, out *v1alpha4.MachineRollingUpdateDeployment, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(in *MachineRollingUpdateDeployment, out *v1beta1.MachineRollingUpdateDeployment, s conversion.Scope) error { out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) return nil } -// Convert_v1alpha3_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment is an autogenerated conversion function. -func Convert_v1alpha3_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(in *MachineRollingUpdateDeployment, out *v1alpha4.MachineRollingUpdateDeployment, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(in, out, s) +// Convert_v1alpha3_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment is an autogenerated conversion function. +func Convert_v1alpha3_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(in *MachineRollingUpdateDeployment, out *v1beta1.MachineRollingUpdateDeployment, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(in, out, s) } -func autoConvert_v1alpha4_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(in *v1alpha4.MachineRollingUpdateDeployment, out *MachineRollingUpdateDeployment, s conversion.Scope) error { +func autoConvert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(in *v1beta1.MachineRollingUpdateDeployment, out *MachineRollingUpdateDeployment, s conversion.Scope) error { out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) // WARNING: in.DeletePolicy requires manual conversion: does not exist in peer-type return nil } -func autoConvert_v1alpha3_MachineSet_To_v1alpha4_MachineSet(in *MachineSet, out *v1alpha4.MachineSet, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineSet_To_v1beta1_MachineSet(in *MachineSet, out *v1beta1.MachineSet, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_MachineSetSpec_To_v1alpha4_MachineSetSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_MachineSetSpec_To_v1beta1_MachineSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_MachineSetStatus_To_v1alpha4_MachineSetStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_MachineSetStatus_To_v1beta1_MachineSetStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_MachineSet_To_v1alpha4_MachineSet is an autogenerated conversion function. -func Convert_v1alpha3_MachineSet_To_v1alpha4_MachineSet(in *MachineSet, out *v1alpha4.MachineSet, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineSet_To_v1alpha4_MachineSet(in, out, s) +// Convert_v1alpha3_MachineSet_To_v1beta1_MachineSet is an autogenerated conversion function. +func Convert_v1alpha3_MachineSet_To_v1beta1_MachineSet(in *MachineSet, out *v1beta1.MachineSet, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineSet_To_v1beta1_MachineSet(in, out, s) } -func autoConvert_v1alpha4_MachineSet_To_v1alpha3_MachineSet(in *v1alpha4.MachineSet, out *MachineSet, s conversion.Scope) error { +func autoConvert_v1beta1_MachineSet_To_v1alpha3_MachineSet(in *v1beta1.MachineSet, out *MachineSet, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_MachineSetSpec_To_v1alpha3_MachineSetSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_MachineSetSpec_To_v1alpha3_MachineSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_MachineSetStatus_To_v1alpha3_MachineSetStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_MachineSetStatus_To_v1alpha3_MachineSetStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_MachineSet_To_v1alpha3_MachineSet is an autogenerated conversion function. -func Convert_v1alpha4_MachineSet_To_v1alpha3_MachineSet(in *v1alpha4.MachineSet, out *MachineSet, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineSet_To_v1alpha3_MachineSet(in, out, s) +// Convert_v1beta1_MachineSet_To_v1alpha3_MachineSet is an autogenerated conversion function. +func Convert_v1beta1_MachineSet_To_v1alpha3_MachineSet(in *v1beta1.MachineSet, out *MachineSet, s conversion.Scope) error { + return autoConvert_v1beta1_MachineSet_To_v1alpha3_MachineSet(in, out, s) } -func autoConvert_v1alpha3_MachineSetList_To_v1alpha4_MachineSetList(in *MachineSetList, out *v1alpha4.MachineSetList, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineSetList_To_v1beta1_MachineSetList(in *MachineSetList, out *v1beta1.MachineSetList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.MachineSet, len(*in)) + *out = make([]v1beta1.MachineSet, len(*in)) for i := range *in { - if err := Convert_v1alpha3_MachineSet_To_v1alpha4_MachineSet(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_MachineSet_To_v1beta1_MachineSet(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -1102,18 +1102,18 @@ func autoConvert_v1alpha3_MachineSetList_To_v1alpha4_MachineSetList(in *MachineS return nil } -// Convert_v1alpha3_MachineSetList_To_v1alpha4_MachineSetList is an autogenerated conversion function. -func Convert_v1alpha3_MachineSetList_To_v1alpha4_MachineSetList(in *MachineSetList, out *v1alpha4.MachineSetList, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineSetList_To_v1alpha4_MachineSetList(in, out, s) +// Convert_v1alpha3_MachineSetList_To_v1beta1_MachineSetList is an autogenerated conversion function. +func Convert_v1alpha3_MachineSetList_To_v1beta1_MachineSetList(in *MachineSetList, out *v1beta1.MachineSetList, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineSetList_To_v1beta1_MachineSetList(in, out, s) } -func autoConvert_v1alpha4_MachineSetList_To_v1alpha3_MachineSetList(in *v1alpha4.MachineSetList, out *MachineSetList, s conversion.Scope) error { +func autoConvert_v1beta1_MachineSetList_To_v1alpha3_MachineSetList(in *v1beta1.MachineSetList, out *MachineSetList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]MachineSet, len(*in)) for i := range *in { - if err := Convert_v1alpha4_MachineSet_To_v1alpha3_MachineSet(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_MachineSet_To_v1alpha3_MachineSet(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -1123,46 +1123,46 @@ func autoConvert_v1alpha4_MachineSetList_To_v1alpha3_MachineSetList(in *v1alpha4 return nil } -// Convert_v1alpha4_MachineSetList_To_v1alpha3_MachineSetList is an autogenerated conversion function. -func Convert_v1alpha4_MachineSetList_To_v1alpha3_MachineSetList(in *v1alpha4.MachineSetList, out *MachineSetList, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineSetList_To_v1alpha3_MachineSetList(in, out, s) +// Convert_v1beta1_MachineSetList_To_v1alpha3_MachineSetList is an autogenerated conversion function. +func Convert_v1beta1_MachineSetList_To_v1alpha3_MachineSetList(in *v1beta1.MachineSetList, out *MachineSetList, s conversion.Scope) error { + return autoConvert_v1beta1_MachineSetList_To_v1alpha3_MachineSetList(in, out, s) } -func autoConvert_v1alpha3_MachineSetSpec_To_v1alpha4_MachineSetSpec(in *MachineSetSpec, out *v1alpha4.MachineSetSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineSetSpec_To_v1beta1_MachineSetSpec(in *MachineSetSpec, out *v1beta1.MachineSetSpec, s conversion.Scope) error { out.ClusterName = in.ClusterName out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) out.MinReadySeconds = in.MinReadySeconds out.DeletePolicy = in.DeletePolicy out.Selector = in.Selector - if err := Convert_v1alpha3_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + if err := Convert_v1alpha3_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } return nil } -// Convert_v1alpha3_MachineSetSpec_To_v1alpha4_MachineSetSpec is an autogenerated conversion function. -func Convert_v1alpha3_MachineSetSpec_To_v1alpha4_MachineSetSpec(in *MachineSetSpec, out *v1alpha4.MachineSetSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineSetSpec_To_v1alpha4_MachineSetSpec(in, out, s) +// Convert_v1alpha3_MachineSetSpec_To_v1beta1_MachineSetSpec is an autogenerated conversion function. +func Convert_v1alpha3_MachineSetSpec_To_v1beta1_MachineSetSpec(in *MachineSetSpec, out *v1beta1.MachineSetSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineSetSpec_To_v1beta1_MachineSetSpec(in, out, s) } -func autoConvert_v1alpha4_MachineSetSpec_To_v1alpha3_MachineSetSpec(in *v1alpha4.MachineSetSpec, out *MachineSetSpec, s conversion.Scope) error { +func autoConvert_v1beta1_MachineSetSpec_To_v1alpha3_MachineSetSpec(in *v1beta1.MachineSetSpec, out *MachineSetSpec, s conversion.Scope) error { out.ClusterName = in.ClusterName out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) out.MinReadySeconds = in.MinReadySeconds out.DeletePolicy = in.DeletePolicy out.Selector = in.Selector - if err := Convert_v1alpha4_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + if err := Convert_v1beta1_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } return nil } -// Convert_v1alpha4_MachineSetSpec_To_v1alpha3_MachineSetSpec is an autogenerated conversion function. -func Convert_v1alpha4_MachineSetSpec_To_v1alpha3_MachineSetSpec(in *v1alpha4.MachineSetSpec, out *MachineSetSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineSetSpec_To_v1alpha3_MachineSetSpec(in, out, s) +// Convert_v1beta1_MachineSetSpec_To_v1alpha3_MachineSetSpec is an autogenerated conversion function. +func Convert_v1beta1_MachineSetSpec_To_v1alpha3_MachineSetSpec(in *v1beta1.MachineSetSpec, out *MachineSetSpec, s conversion.Scope) error { + return autoConvert_v1beta1_MachineSetSpec_To_v1alpha3_MachineSetSpec(in, out, s) } -func autoConvert_v1alpha3_MachineSetStatus_To_v1alpha4_MachineSetStatus(in *MachineSetStatus, out *v1alpha4.MachineSetStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineSetStatus_To_v1beta1_MachineSetStatus(in *MachineSetStatus, out *v1beta1.MachineSetStatus, s conversion.Scope) error { out.Selector = in.Selector out.Replicas = in.Replicas out.FullyLabeledReplicas = in.FullyLabeledReplicas @@ -1174,12 +1174,12 @@ func autoConvert_v1alpha3_MachineSetStatus_To_v1alpha4_MachineSetStatus(in *Mach return nil } -// Convert_v1alpha3_MachineSetStatus_To_v1alpha4_MachineSetStatus is an autogenerated conversion function. -func Convert_v1alpha3_MachineSetStatus_To_v1alpha4_MachineSetStatus(in *MachineSetStatus, out *v1alpha4.MachineSetStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineSetStatus_To_v1alpha4_MachineSetStatus(in, out, s) +// Convert_v1alpha3_MachineSetStatus_To_v1beta1_MachineSetStatus is an autogenerated conversion function. +func Convert_v1alpha3_MachineSetStatus_To_v1beta1_MachineSetStatus(in *MachineSetStatus, out *v1beta1.MachineSetStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineSetStatus_To_v1beta1_MachineSetStatus(in, out, s) } -func autoConvert_v1alpha4_MachineSetStatus_To_v1alpha3_MachineSetStatus(in *v1alpha4.MachineSetStatus, out *MachineSetStatus, s conversion.Scope) error { +func autoConvert_v1beta1_MachineSetStatus_To_v1alpha3_MachineSetStatus(in *v1beta1.MachineSetStatus, out *MachineSetStatus, s conversion.Scope) error { out.Selector = in.Selector out.Replicas = in.Replicas out.FullyLabeledReplicas = in.FullyLabeledReplicas @@ -1191,14 +1191,14 @@ func autoConvert_v1alpha4_MachineSetStatus_To_v1alpha3_MachineSetStatus(in *v1al return nil } -// Convert_v1alpha4_MachineSetStatus_To_v1alpha3_MachineSetStatus is an autogenerated conversion function. -func Convert_v1alpha4_MachineSetStatus_To_v1alpha3_MachineSetStatus(in *v1alpha4.MachineSetStatus, out *MachineSetStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineSetStatus_To_v1alpha3_MachineSetStatus(in, out, s) +// Convert_v1beta1_MachineSetStatus_To_v1alpha3_MachineSetStatus is an autogenerated conversion function. +func Convert_v1beta1_MachineSetStatus_To_v1alpha3_MachineSetStatus(in *v1beta1.MachineSetStatus, out *MachineSetStatus, s conversion.Scope) error { + return autoConvert_v1beta1_MachineSetStatus_To_v1alpha3_MachineSetStatus(in, out, s) } -func autoConvert_v1alpha3_MachineSpec_To_v1alpha4_MachineSpec(in *MachineSpec, out *v1alpha4.MachineSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineSpec_To_v1beta1_MachineSpec(in *MachineSpec, out *v1beta1.MachineSpec, s conversion.Scope) error { out.ClusterName = in.ClusterName - if err := Convert_v1alpha3_Bootstrap_To_v1alpha4_Bootstrap(&in.Bootstrap, &out.Bootstrap, s); err != nil { + if err := Convert_v1alpha3_Bootstrap_To_v1beta1_Bootstrap(&in.Bootstrap, &out.Bootstrap, s); err != nil { return err } out.InfrastructureRef = in.InfrastructureRef @@ -1209,14 +1209,14 @@ func autoConvert_v1alpha3_MachineSpec_To_v1alpha4_MachineSpec(in *MachineSpec, o return nil } -// Convert_v1alpha3_MachineSpec_To_v1alpha4_MachineSpec is an autogenerated conversion function. -func Convert_v1alpha3_MachineSpec_To_v1alpha4_MachineSpec(in *MachineSpec, out *v1alpha4.MachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineSpec_To_v1alpha4_MachineSpec(in, out, s) +// Convert_v1alpha3_MachineSpec_To_v1beta1_MachineSpec is an autogenerated conversion function. +func Convert_v1alpha3_MachineSpec_To_v1beta1_MachineSpec(in *MachineSpec, out *v1beta1.MachineSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineSpec_To_v1beta1_MachineSpec(in, out, s) } -func autoConvert_v1alpha4_MachineSpec_To_v1alpha3_MachineSpec(in *v1alpha4.MachineSpec, out *MachineSpec, s conversion.Scope) error { +func autoConvert_v1beta1_MachineSpec_To_v1alpha3_MachineSpec(in *v1beta1.MachineSpec, out *MachineSpec, s conversion.Scope) error { out.ClusterName = in.ClusterName - if err := Convert_v1alpha4_Bootstrap_To_v1alpha3_Bootstrap(&in.Bootstrap, &out.Bootstrap, s); err != nil { + if err := Convert_v1beta1_Bootstrap_To_v1alpha3_Bootstrap(&in.Bootstrap, &out.Bootstrap, s); err != nil { return err } out.InfrastructureRef = in.InfrastructureRef @@ -1227,32 +1227,32 @@ func autoConvert_v1alpha4_MachineSpec_To_v1alpha3_MachineSpec(in *v1alpha4.Machi return nil } -// Convert_v1alpha4_MachineSpec_To_v1alpha3_MachineSpec is an autogenerated conversion function. -func Convert_v1alpha4_MachineSpec_To_v1alpha3_MachineSpec(in *v1alpha4.MachineSpec, out *MachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineSpec_To_v1alpha3_MachineSpec(in, out, s) +// Convert_v1beta1_MachineSpec_To_v1alpha3_MachineSpec is an autogenerated conversion function. +func Convert_v1beta1_MachineSpec_To_v1alpha3_MachineSpec(in *v1beta1.MachineSpec, out *MachineSpec, s conversion.Scope) error { + return autoConvert_v1beta1_MachineSpec_To_v1alpha3_MachineSpec(in, out, s) } -func autoConvert_v1alpha3_MachineStatus_To_v1alpha4_MachineStatus(in *MachineStatus, out *v1alpha4.MachineStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_MachineStatus_To_v1beta1_MachineStatus(in *MachineStatus, out *v1beta1.MachineStatus, s conversion.Scope) error { out.NodeRef = (*v1.ObjectReference)(unsafe.Pointer(in.NodeRef)) out.LastUpdated = (*metav1.Time)(unsafe.Pointer(in.LastUpdated)) out.Version = (*string)(unsafe.Pointer(in.Version)) out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Addresses = *(*v1alpha4.MachineAddresses)(unsafe.Pointer(&in.Addresses)) + out.Addresses = *(*v1beta1.MachineAddresses)(unsafe.Pointer(&in.Addresses)) out.Phase = in.Phase out.BootstrapReady = in.BootstrapReady out.InfrastructureReady = in.InfrastructureReady out.ObservedGeneration = in.ObservedGeneration - out.Conditions = *(*v1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) + out.Conditions = *(*v1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) return nil } -// Convert_v1alpha3_MachineStatus_To_v1alpha4_MachineStatus is an autogenerated conversion function. -func Convert_v1alpha3_MachineStatus_To_v1alpha4_MachineStatus(in *MachineStatus, out *v1alpha4.MachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineStatus_To_v1alpha4_MachineStatus(in, out, s) +// Convert_v1alpha3_MachineStatus_To_v1beta1_MachineStatus is an autogenerated conversion function. +func Convert_v1alpha3_MachineStatus_To_v1beta1_MachineStatus(in *MachineStatus, out *v1beta1.MachineStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineStatus_To_v1beta1_MachineStatus(in, out, s) } -func autoConvert_v1alpha4_MachineStatus_To_v1alpha3_MachineStatus(in *v1alpha4.MachineStatus, out *MachineStatus, s conversion.Scope) error { +func autoConvert_v1beta1_MachineStatus_To_v1alpha3_MachineStatus(in *v1beta1.MachineStatus, out *MachineStatus, s conversion.Scope) error { out.NodeRef = (*v1.ObjectReference)(unsafe.Pointer(in.NodeRef)) // WARNING: in.NodeInfo requires manual conversion: does not exist in peer-type out.LastUpdated = (*metav1.Time)(unsafe.Pointer(in.LastUpdated)) @@ -1268,57 +1268,57 @@ func autoConvert_v1alpha4_MachineStatus_To_v1alpha3_MachineStatus(in *v1alpha4.M return nil } -func autoConvert_v1alpha3_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(in *MachineTemplateSpec, out *v1alpha4.MachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_ObjectMeta_To_v1alpha4_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { +func autoConvert_v1alpha3_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(in *MachineTemplateSpec, out *v1beta1.MachineTemplateSpec, s conversion.Scope) error { + if err := Convert_v1alpha3_ObjectMeta_To_v1beta1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { return err } - if err := Convert_v1alpha3_MachineSpec_To_v1alpha4_MachineSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_MachineSpec_To_v1beta1_MachineSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha3_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha3_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(in *MachineTemplateSpec, out *v1alpha4.MachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(in, out, s) +// Convert_v1alpha3_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec is an autogenerated conversion function. +func Convert_v1alpha3_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(in *MachineTemplateSpec, out *v1beta1.MachineTemplateSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(in, out, s) } -func autoConvert_v1alpha4_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(in *v1alpha4.MachineTemplateSpec, out *MachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_ObjectMeta_To_v1alpha3_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { +func autoConvert_v1beta1_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(in *v1beta1.MachineTemplateSpec, out *MachineTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta1_ObjectMeta_To_v1alpha3_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { return err } - if err := Convert_v1alpha4_MachineSpec_To_v1alpha3_MachineSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_MachineSpec_To_v1alpha3_MachineSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha4_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha4_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(in *v1alpha4.MachineTemplateSpec, out *MachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(in, out, s) +// Convert_v1beta1_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec is an autogenerated conversion function. +func Convert_v1beta1_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(in *v1beta1.MachineTemplateSpec, out *MachineTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta1_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(in, out, s) } -func autoConvert_v1alpha3_NetworkRanges_To_v1alpha4_NetworkRanges(in *NetworkRanges, out *v1alpha4.NetworkRanges, s conversion.Scope) error { +func autoConvert_v1alpha3_NetworkRanges_To_v1beta1_NetworkRanges(in *NetworkRanges, out *v1beta1.NetworkRanges, s conversion.Scope) error { out.CIDRBlocks = *(*[]string)(unsafe.Pointer(&in.CIDRBlocks)) return nil } -// Convert_v1alpha3_NetworkRanges_To_v1alpha4_NetworkRanges is an autogenerated conversion function. -func Convert_v1alpha3_NetworkRanges_To_v1alpha4_NetworkRanges(in *NetworkRanges, out *v1alpha4.NetworkRanges, s conversion.Scope) error { - return autoConvert_v1alpha3_NetworkRanges_To_v1alpha4_NetworkRanges(in, out, s) +// Convert_v1alpha3_NetworkRanges_To_v1beta1_NetworkRanges is an autogenerated conversion function. +func Convert_v1alpha3_NetworkRanges_To_v1beta1_NetworkRanges(in *NetworkRanges, out *v1beta1.NetworkRanges, s conversion.Scope) error { + return autoConvert_v1alpha3_NetworkRanges_To_v1beta1_NetworkRanges(in, out, s) } -func autoConvert_v1alpha4_NetworkRanges_To_v1alpha3_NetworkRanges(in *v1alpha4.NetworkRanges, out *NetworkRanges, s conversion.Scope) error { +func autoConvert_v1beta1_NetworkRanges_To_v1alpha3_NetworkRanges(in *v1beta1.NetworkRanges, out *NetworkRanges, s conversion.Scope) error { out.CIDRBlocks = *(*[]string)(unsafe.Pointer(&in.CIDRBlocks)) return nil } -// Convert_v1alpha4_NetworkRanges_To_v1alpha3_NetworkRanges is an autogenerated conversion function. -func Convert_v1alpha4_NetworkRanges_To_v1alpha3_NetworkRanges(in *v1alpha4.NetworkRanges, out *NetworkRanges, s conversion.Scope) error { - return autoConvert_v1alpha4_NetworkRanges_To_v1alpha3_NetworkRanges(in, out, s) +// Convert_v1beta1_NetworkRanges_To_v1alpha3_NetworkRanges is an autogenerated conversion function. +func Convert_v1beta1_NetworkRanges_To_v1alpha3_NetworkRanges(in *v1beta1.NetworkRanges, out *NetworkRanges, s conversion.Scope) error { + return autoConvert_v1beta1_NetworkRanges_To_v1alpha3_NetworkRanges(in, out, s) } -func autoConvert_v1alpha3_ObjectMeta_To_v1alpha4_ObjectMeta(in *ObjectMeta, out *v1alpha4.ObjectMeta, s conversion.Scope) error { +func autoConvert_v1alpha3_ObjectMeta_To_v1beta1_ObjectMeta(in *ObjectMeta, out *v1beta1.ObjectMeta, s conversion.Scope) error { // WARNING: in.Name requires manual conversion: does not exist in peer-type // WARNING: in.GenerateName requires manual conversion: does not exist in peer-type // WARNING: in.Namespace requires manual conversion: does not exist in peer-type @@ -1328,37 +1328,37 @@ func autoConvert_v1alpha3_ObjectMeta_To_v1alpha4_ObjectMeta(in *ObjectMeta, out return nil } -func autoConvert_v1alpha4_ObjectMeta_To_v1alpha3_ObjectMeta(in *v1alpha4.ObjectMeta, out *ObjectMeta, s conversion.Scope) error { +func autoConvert_v1beta1_ObjectMeta_To_v1alpha3_ObjectMeta(in *v1beta1.ObjectMeta, out *ObjectMeta, s conversion.Scope) error { out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) return nil } -// Convert_v1alpha4_ObjectMeta_To_v1alpha3_ObjectMeta is an autogenerated conversion function. -func Convert_v1alpha4_ObjectMeta_To_v1alpha3_ObjectMeta(in *v1alpha4.ObjectMeta, out *ObjectMeta, s conversion.Scope) error { - return autoConvert_v1alpha4_ObjectMeta_To_v1alpha3_ObjectMeta(in, out, s) +// Convert_v1beta1_ObjectMeta_To_v1alpha3_ObjectMeta is an autogenerated conversion function. +func Convert_v1beta1_ObjectMeta_To_v1alpha3_ObjectMeta(in *v1beta1.ObjectMeta, out *ObjectMeta, s conversion.Scope) error { + return autoConvert_v1beta1_ObjectMeta_To_v1alpha3_ObjectMeta(in, out, s) } -func autoConvert_v1alpha3_UnhealthyCondition_To_v1alpha4_UnhealthyCondition(in *UnhealthyCondition, out *v1alpha4.UnhealthyCondition, s conversion.Scope) error { +func autoConvert_v1alpha3_UnhealthyCondition_To_v1beta1_UnhealthyCondition(in *UnhealthyCondition, out *v1beta1.UnhealthyCondition, s conversion.Scope) error { out.Type = v1.NodeConditionType(in.Type) out.Status = v1.ConditionStatus(in.Status) out.Timeout = in.Timeout return nil } -// Convert_v1alpha3_UnhealthyCondition_To_v1alpha4_UnhealthyCondition is an autogenerated conversion function. -func Convert_v1alpha3_UnhealthyCondition_To_v1alpha4_UnhealthyCondition(in *UnhealthyCondition, out *v1alpha4.UnhealthyCondition, s conversion.Scope) error { - return autoConvert_v1alpha3_UnhealthyCondition_To_v1alpha4_UnhealthyCondition(in, out, s) +// Convert_v1alpha3_UnhealthyCondition_To_v1beta1_UnhealthyCondition is an autogenerated conversion function. +func Convert_v1alpha3_UnhealthyCondition_To_v1beta1_UnhealthyCondition(in *UnhealthyCondition, out *v1beta1.UnhealthyCondition, s conversion.Scope) error { + return autoConvert_v1alpha3_UnhealthyCondition_To_v1beta1_UnhealthyCondition(in, out, s) } -func autoConvert_v1alpha4_UnhealthyCondition_To_v1alpha3_UnhealthyCondition(in *v1alpha4.UnhealthyCondition, out *UnhealthyCondition, s conversion.Scope) error { +func autoConvert_v1beta1_UnhealthyCondition_To_v1alpha3_UnhealthyCondition(in *v1beta1.UnhealthyCondition, out *UnhealthyCondition, s conversion.Scope) error { out.Type = v1.NodeConditionType(in.Type) out.Status = v1.ConditionStatus(in.Status) out.Timeout = in.Timeout return nil } -// Convert_v1alpha4_UnhealthyCondition_To_v1alpha3_UnhealthyCondition is an autogenerated conversion function. -func Convert_v1alpha4_UnhealthyCondition_To_v1alpha3_UnhealthyCondition(in *v1alpha4.UnhealthyCondition, out *UnhealthyCondition, s conversion.Scope) error { - return autoConvert_v1alpha4_UnhealthyCondition_To_v1alpha3_UnhealthyCondition(in, out, s) +// Convert_v1beta1_UnhealthyCondition_To_v1alpha3_UnhealthyCondition is an autogenerated conversion function. +func Convert_v1beta1_UnhealthyCondition_To_v1alpha3_UnhealthyCondition(in *v1beta1.UnhealthyCondition, out *UnhealthyCondition, s conversion.Scope) error { + return autoConvert_v1beta1_UnhealthyCondition_To_v1alpha3_UnhealthyCondition(in, out, s) } diff --git a/api/v1alpha4/cluster_types.go b/api/v1alpha4/cluster_types.go index 04532bdbc694..794363ab61bd 100644 --- a/api/v1alpha4/cluster_types.go +++ b/api/v1alpha4/cluster_types.go @@ -277,7 +277,6 @@ func (v APIEndpoint) String() string { // +kubebuilder:object:root=true // +kubebuilder:resource:path=clusters,shortName=cl,scope=Namespaced,categories=cluster-api -// +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Cluster" // +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed" diff --git a/api/v1alpha4/clusterclass_types.go b/api/v1alpha4/clusterclass_types.go index a444bf4607f4..14ad43b15f7d 100644 --- a/api/v1alpha4/clusterclass_types.go +++ b/api/v1alpha4/clusterclass_types.go @@ -23,7 +23,6 @@ import ( // +kubebuilder:object:root=true // +kubebuilder:resource:path=clusterclasses,shortName=cc,scope=Namespaced,categories=cluster-api -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ClusterClass" // ClusterClass is a template which can be used to create managed topologies. diff --git a/api/v1alpha4/conversion.go b/api/v1alpha4/conversion.go index edfdee99e242..efd3c6e327ed 100644 --- a/api/v1alpha4/conversion.go +++ b/api/v1alpha4/conversion.go @@ -16,13 +16,127 @@ limitations under the License. package v1alpha4 -func (*Cluster) Hub() {} -func (*ClusterList) Hub() {} -func (*Machine) Hub() {} -func (*MachineList) Hub() {} -func (*MachineSet) Hub() {} -func (*MachineSetList) Hub() {} -func (*MachineDeployment) Hub() {} -func (*MachineDeploymentList) Hub() {} -func (*MachineHealthCheck) Hub() {} -func (*MachineHealthCheckList) Hub() {} +import ( + "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/controller-runtime/pkg/conversion" +) + +func (src *Cluster) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.Cluster) + + return Convert_v1alpha4_Cluster_To_v1beta1_Cluster(src, dst, nil) +} + +func (dst *Cluster) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.Cluster) + + return Convert_v1beta1_Cluster_To_v1alpha4_Cluster(src, dst, nil) +} + +func (src *ClusterList) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.ClusterList) + + return Convert_v1alpha4_ClusterList_To_v1beta1_ClusterList(src, dst, nil) +} + +func (dst *ClusterList) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.ClusterList) + + return Convert_v1beta1_ClusterList_To_v1alpha4_ClusterList(src, dst, nil) +} + +func (src *Machine) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.Machine) + + return Convert_v1alpha4_Machine_To_v1beta1_Machine(src, dst, nil) +} + +func (dst *Machine) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.Machine) + + return Convert_v1beta1_Machine_To_v1alpha4_Machine(src, dst, nil) +} + +func (src *MachineList) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.MachineList) + + return Convert_v1alpha4_MachineList_To_v1beta1_MachineList(src, dst, nil) +} + +func (dst *MachineList) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.MachineList) + + return Convert_v1beta1_MachineList_To_v1alpha4_MachineList(src, dst, nil) +} + +func (src *MachineSet) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.MachineSet) + + return Convert_v1alpha4_MachineSet_To_v1beta1_MachineSet(src, dst, nil) +} + +func (dst *MachineSet) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.MachineSet) + + return Convert_v1beta1_MachineSet_To_v1alpha4_MachineSet(src, dst, nil) +} + +func (src *MachineSetList) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.MachineSetList) + + return Convert_v1alpha4_MachineSetList_To_v1beta1_MachineSetList(src, dst, nil) +} + +func (dst *MachineSetList) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.MachineSetList) + + return Convert_v1beta1_MachineSetList_To_v1alpha4_MachineSetList(src, dst, nil) +} + +func (src *MachineDeployment) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.MachineDeployment) + + return Convert_v1alpha4_MachineDeployment_To_v1beta1_MachineDeployment(src, dst, nil) +} + +func (dst *MachineDeployment) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.MachineDeployment) + + return Convert_v1beta1_MachineDeployment_To_v1alpha4_MachineDeployment(src, dst, nil) +} + +func (src *MachineDeploymentList) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.MachineDeploymentList) + + return Convert_v1alpha4_MachineDeploymentList_To_v1beta1_MachineDeploymentList(src, dst, nil) +} + +func (dst *MachineDeploymentList) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.MachineDeploymentList) + + return Convert_v1beta1_MachineDeploymentList_To_v1alpha4_MachineDeploymentList(src, dst, nil) +} + +func (src *MachineHealthCheck) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.MachineHealthCheck) + + return Convert_v1alpha4_MachineHealthCheck_To_v1beta1_MachineHealthCheck(src, dst, nil) +} + +func (dst *MachineHealthCheck) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.MachineHealthCheck) + + return Convert_v1beta1_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(src, dst, nil) +} + +func (src *MachineHealthCheckList) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.MachineHealthCheckList) + + return Convert_v1alpha4_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList(src, dst, nil) +} + +func (dst *MachineHealthCheckList) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.MachineHealthCheckList) + + return Convert_v1beta1_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList(src, dst, nil) +} diff --git a/api/v1alpha4/doc.go b/api/v1alpha4/doc.go index b0efd4cde559..ca3c5da05500 100644 --- a/api/v1alpha4/doc.go +++ b/api/v1alpha4/doc.go @@ -14,4 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package v1alpha4 contains the v1alpha4 API implementation. +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1beta1 package v1alpha4 diff --git a/api/v1alpha4/groupversion_info.go b/api/v1alpha4/groupversion_info.go index bc83bb32ee45..382657c78967 100644 --- a/api/v1alpha4/groupversion_info.go +++ b/api/v1alpha4/groupversion_info.go @@ -33,4 +33,6 @@ var ( // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = SchemeBuilder.SchemeBuilder ) diff --git a/api/v1alpha4/machine_types.go b/api/v1alpha4/machine_types.go index 0dab8b9117be..fad4b798e553 100644 --- a/api/v1alpha4/machine_types.go +++ b/api/v1alpha4/machine_types.go @@ -235,7 +235,6 @@ type Bootstrap struct { // +kubebuilder:object:root=true // +kubebuilder:resource:path=machines,shortName=ma,scope=Namespaced,categories=cluster-api // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Machine" // +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="Provider ID" diff --git a/api/v1alpha4/machinedeployment_types.go b/api/v1alpha4/machinedeployment_types.go index 3389aa0b26eb..b3eae32d8d0b 100644 --- a/api/v1alpha4/machinedeployment_types.go +++ b/api/v1alpha4/machinedeployment_types.go @@ -267,7 +267,6 @@ func (md *MachineDeploymentStatus) GetTypedPhase() MachineDeploymentPhase { // +kubebuilder:object:root=true // +kubebuilder:resource:path=machinedeployments,shortName=md,scope=Namespaced,categories=cluster-api -// +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector // +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster" diff --git a/api/v1alpha4/machinehealthcheck_types.go b/api/v1alpha4/machinehealthcheck_types.go index 86158cfe8e9b..ba5a47a41368 100644 --- a/api/v1alpha4/machinehealthcheck_types.go +++ b/api/v1alpha4/machinehealthcheck_types.go @@ -126,7 +126,6 @@ type MachineHealthCheckStatus struct { // +kubebuilder:object:root=true // +kubebuilder:resource:path=machinehealthchecks,shortName=mhc;mhcs,scope=Namespaced,categories=cluster-api -// +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachineHealthCheck" diff --git a/api/v1alpha4/machineset_types.go b/api/v1alpha4/machineset_types.go index e043a5e1a2f4..b8f8f3d0a1d4 100644 --- a/api/v1alpha4/machineset_types.go +++ b/api/v1alpha4/machineset_types.go @@ -192,7 +192,6 @@ func (m *MachineSet) Validate() field.ErrorList { // +kubebuilder:object:root=true // +kubebuilder:resource:path=machinesets,shortName=ms,scope=Namespaced,categories=cluster-api -// +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector // +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster" diff --git a/api/v1alpha4/zz_generated.conversion.go b/api/v1alpha4/zz_generated.conversion.go new file mode 100644 index 000000000000..203266e98806 --- /dev/null +++ b/api/v1alpha4/zz_generated.conversion.go @@ -0,0 +1,1717 @@ +// +build !ignore_autogenerated_core + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha4 + +import ( + unsafe "unsafe" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + intstr "k8s.io/apimachinery/pkg/util/intstr" + v1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + errors "sigs.k8s.io/cluster-api/errors" +) + +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((*APIEndpoint)(nil), (*v1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(a.(*APIEndpoint), b.(*v1beta1.APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(a.(*v1beta1.APIEndpoint), b.(*APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Bootstrap)(nil), (*v1beta1.Bootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Bootstrap_To_v1beta1_Bootstrap(a.(*Bootstrap), b.(*v1beta1.Bootstrap), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Bootstrap)(nil), (*Bootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Bootstrap_To_v1alpha4_Bootstrap(a.(*v1beta1.Bootstrap), b.(*Bootstrap), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Cluster)(nil), (*v1beta1.Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Cluster_To_v1beta1_Cluster(a.(*Cluster), b.(*v1beta1.Cluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Cluster)(nil), (*Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Cluster_To_v1alpha4_Cluster(a.(*v1beta1.Cluster), b.(*Cluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterClass)(nil), (*v1beta1.ClusterClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterClass_To_v1beta1_ClusterClass(a.(*ClusterClass), b.(*v1beta1.ClusterClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterClass)(nil), (*ClusterClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterClass_To_v1alpha4_ClusterClass(a.(*v1beta1.ClusterClass), b.(*ClusterClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterClassList)(nil), (*v1beta1.ClusterClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterClassList_To_v1beta1_ClusterClassList(a.(*ClusterClassList), b.(*v1beta1.ClusterClassList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterClassList)(nil), (*ClusterClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterClassList_To_v1alpha4_ClusterClassList(a.(*v1beta1.ClusterClassList), b.(*ClusterClassList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterClassSpec)(nil), (*v1beta1.ClusterClassSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterClassSpec_To_v1beta1_ClusterClassSpec(a.(*ClusterClassSpec), b.(*v1beta1.ClusterClassSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterClassSpec)(nil), (*ClusterClassSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterClassSpec_To_v1alpha4_ClusterClassSpec(a.(*v1beta1.ClusterClassSpec), b.(*ClusterClassSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterList)(nil), (*v1beta1.ClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterList_To_v1beta1_ClusterList(a.(*ClusterList), b.(*v1beta1.ClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterList)(nil), (*ClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterList_To_v1alpha4_ClusterList(a.(*v1beta1.ClusterList), b.(*ClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterNetwork)(nil), (*v1beta1.ClusterNetwork)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterNetwork_To_v1beta1_ClusterNetwork(a.(*ClusterNetwork), b.(*v1beta1.ClusterNetwork), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterNetwork)(nil), (*ClusterNetwork)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterNetwork_To_v1alpha4_ClusterNetwork(a.(*v1beta1.ClusterNetwork), b.(*ClusterNetwork), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterSpec)(nil), (*v1beta1.ClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterSpec_To_v1beta1_ClusterSpec(a.(*ClusterSpec), b.(*v1beta1.ClusterSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterSpec)(nil), (*ClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterSpec_To_v1alpha4_ClusterSpec(a.(*v1beta1.ClusterSpec), b.(*ClusterSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterStatus)(nil), (*v1beta1.ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(a.(*ClusterStatus), b.(*v1beta1.ClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterStatus)(nil), (*ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(a.(*v1beta1.ClusterStatus), b.(*ClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Condition)(nil), (*v1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Condition_To_v1beta1_Condition(a.(*Condition), b.(*v1beta1.Condition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Condition)(nil), (*Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Condition_To_v1alpha4_Condition(a.(*v1beta1.Condition), b.(*Condition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlPlaneClass)(nil), (*v1beta1.ControlPlaneClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ControlPlaneClass_To_v1beta1_ControlPlaneClass(a.(*ControlPlaneClass), b.(*v1beta1.ControlPlaneClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ControlPlaneClass)(nil), (*ControlPlaneClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlPlaneClass_To_v1alpha4_ControlPlaneClass(a.(*v1beta1.ControlPlaneClass), b.(*ControlPlaneClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlPlaneTopology)(nil), (*v1beta1.ControlPlaneTopology)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ControlPlaneTopology_To_v1beta1_ControlPlaneTopology(a.(*ControlPlaneTopology), b.(*v1beta1.ControlPlaneTopology), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ControlPlaneTopology)(nil), (*ControlPlaneTopology)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlPlaneTopology_To_v1alpha4_ControlPlaneTopology(a.(*v1beta1.ControlPlaneTopology), b.(*ControlPlaneTopology), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FailureDomainSpec)(nil), (*v1beta1.FailureDomainSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_FailureDomainSpec_To_v1beta1_FailureDomainSpec(a.(*FailureDomainSpec), b.(*v1beta1.FailureDomainSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.FailureDomainSpec)(nil), (*FailureDomainSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(a.(*v1beta1.FailureDomainSpec), b.(*FailureDomainSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LocalObjectTemplate)(nil), (*v1beta1.LocalObjectTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_LocalObjectTemplate_To_v1beta1_LocalObjectTemplate(a.(*LocalObjectTemplate), b.(*v1beta1.LocalObjectTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.LocalObjectTemplate)(nil), (*LocalObjectTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_LocalObjectTemplate_To_v1alpha4_LocalObjectTemplate(a.(*v1beta1.LocalObjectTemplate), b.(*LocalObjectTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Machine)(nil), (*v1beta1.Machine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Machine_To_v1beta1_Machine(a.(*Machine), b.(*v1beta1.Machine), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Machine)(nil), (*Machine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Machine_To_v1alpha4_Machine(a.(*v1beta1.Machine), b.(*Machine), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineAddress)(nil), (*v1beta1.MachineAddress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineAddress_To_v1beta1_MachineAddress(a.(*MachineAddress), b.(*v1beta1.MachineAddress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineAddress)(nil), (*MachineAddress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineAddress_To_v1alpha4_MachineAddress(a.(*v1beta1.MachineAddress), b.(*MachineAddress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineDeployment)(nil), (*v1beta1.MachineDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineDeployment_To_v1beta1_MachineDeployment(a.(*MachineDeployment), b.(*v1beta1.MachineDeployment), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeployment)(nil), (*MachineDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeployment_To_v1alpha4_MachineDeployment(a.(*v1beta1.MachineDeployment), b.(*MachineDeployment), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineDeploymentClass)(nil), (*v1beta1.MachineDeploymentClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineDeploymentClass_To_v1beta1_MachineDeploymentClass(a.(*MachineDeploymentClass), b.(*v1beta1.MachineDeploymentClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeploymentClass)(nil), (*MachineDeploymentClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentClass_To_v1alpha4_MachineDeploymentClass(a.(*v1beta1.MachineDeploymentClass), b.(*MachineDeploymentClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineDeploymentClassTemplate)(nil), (*v1beta1.MachineDeploymentClassTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineDeploymentClassTemplate_To_v1beta1_MachineDeploymentClassTemplate(a.(*MachineDeploymentClassTemplate), b.(*v1beta1.MachineDeploymentClassTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeploymentClassTemplate)(nil), (*MachineDeploymentClassTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentClassTemplate_To_v1alpha4_MachineDeploymentClassTemplate(a.(*v1beta1.MachineDeploymentClassTemplate), b.(*MachineDeploymentClassTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineDeploymentList)(nil), (*v1beta1.MachineDeploymentList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineDeploymentList_To_v1beta1_MachineDeploymentList(a.(*MachineDeploymentList), b.(*v1beta1.MachineDeploymentList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeploymentList)(nil), (*MachineDeploymentList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentList_To_v1alpha4_MachineDeploymentList(a.(*v1beta1.MachineDeploymentList), b.(*MachineDeploymentList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineDeploymentSpec)(nil), (*v1beta1.MachineDeploymentSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec(a.(*MachineDeploymentSpec), b.(*v1beta1.MachineDeploymentSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeploymentSpec)(nil), (*MachineDeploymentSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec(a.(*v1beta1.MachineDeploymentSpec), b.(*MachineDeploymentSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineDeploymentStatus)(nil), (*v1beta1.MachineDeploymentStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(a.(*MachineDeploymentStatus), b.(*v1beta1.MachineDeploymentStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeploymentStatus)(nil), (*MachineDeploymentStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus(a.(*v1beta1.MachineDeploymentStatus), b.(*MachineDeploymentStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineDeploymentStrategy)(nil), (*v1beta1.MachineDeploymentStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy(a.(*MachineDeploymentStrategy), b.(*v1beta1.MachineDeploymentStrategy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeploymentStrategy)(nil), (*MachineDeploymentStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy(a.(*v1beta1.MachineDeploymentStrategy), b.(*MachineDeploymentStrategy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineDeploymentTopology)(nil), (*v1beta1.MachineDeploymentTopology)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineDeploymentTopology_To_v1beta1_MachineDeploymentTopology(a.(*MachineDeploymentTopology), b.(*v1beta1.MachineDeploymentTopology), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineDeploymentTopology)(nil), (*MachineDeploymentTopology)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineDeploymentTopology_To_v1alpha4_MachineDeploymentTopology(a.(*v1beta1.MachineDeploymentTopology), b.(*MachineDeploymentTopology), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineHealthCheck)(nil), (*v1beta1.MachineHealthCheck)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineHealthCheck_To_v1beta1_MachineHealthCheck(a.(*MachineHealthCheck), b.(*v1beta1.MachineHealthCheck), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineHealthCheck)(nil), (*MachineHealthCheck)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(a.(*v1beta1.MachineHealthCheck), b.(*MachineHealthCheck), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineHealthCheckList)(nil), (*v1beta1.MachineHealthCheckList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList(a.(*MachineHealthCheckList), b.(*v1beta1.MachineHealthCheckList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineHealthCheckList)(nil), (*MachineHealthCheckList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList(a.(*v1beta1.MachineHealthCheckList), b.(*MachineHealthCheckList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineHealthCheckSpec)(nil), (*v1beta1.MachineHealthCheckSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(a.(*MachineHealthCheckSpec), b.(*v1beta1.MachineHealthCheckSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineHealthCheckSpec)(nil), (*MachineHealthCheckSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec(a.(*v1beta1.MachineHealthCheckSpec), b.(*MachineHealthCheckSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineHealthCheckStatus)(nil), (*v1beta1.MachineHealthCheckStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(a.(*MachineHealthCheckStatus), b.(*v1beta1.MachineHealthCheckStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineHealthCheckStatus)(nil), (*MachineHealthCheckStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus(a.(*v1beta1.MachineHealthCheckStatus), b.(*MachineHealthCheckStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineList)(nil), (*v1beta1.MachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineList_To_v1beta1_MachineList(a.(*MachineList), b.(*v1beta1.MachineList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineList)(nil), (*MachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineList_To_v1alpha4_MachineList(a.(*v1beta1.MachineList), b.(*MachineList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineRollingUpdateDeployment)(nil), (*v1beta1.MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(a.(*MachineRollingUpdateDeployment), b.(*v1beta1.MachineRollingUpdateDeployment), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineRollingUpdateDeployment)(nil), (*MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(a.(*v1beta1.MachineRollingUpdateDeployment), b.(*MachineRollingUpdateDeployment), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineSet)(nil), (*v1beta1.MachineSet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineSet_To_v1beta1_MachineSet(a.(*MachineSet), b.(*v1beta1.MachineSet), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineSet)(nil), (*MachineSet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineSet_To_v1alpha4_MachineSet(a.(*v1beta1.MachineSet), b.(*MachineSet), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineSetList)(nil), (*v1beta1.MachineSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineSetList_To_v1beta1_MachineSetList(a.(*MachineSetList), b.(*v1beta1.MachineSetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineSetList)(nil), (*MachineSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineSetList_To_v1alpha4_MachineSetList(a.(*v1beta1.MachineSetList), b.(*MachineSetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineSetSpec)(nil), (*v1beta1.MachineSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineSetSpec_To_v1beta1_MachineSetSpec(a.(*MachineSetSpec), b.(*v1beta1.MachineSetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineSetSpec)(nil), (*MachineSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineSetSpec_To_v1alpha4_MachineSetSpec(a.(*v1beta1.MachineSetSpec), b.(*MachineSetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineSetStatus)(nil), (*v1beta1.MachineSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineSetStatus_To_v1beta1_MachineSetStatus(a.(*MachineSetStatus), b.(*v1beta1.MachineSetStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineSetStatus)(nil), (*MachineSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineSetStatus_To_v1alpha4_MachineSetStatus(a.(*v1beta1.MachineSetStatus), b.(*MachineSetStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineSpec)(nil), (*v1beta1.MachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineSpec_To_v1beta1_MachineSpec(a.(*MachineSpec), b.(*v1beta1.MachineSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineSpec)(nil), (*MachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineSpec_To_v1alpha4_MachineSpec(a.(*v1beta1.MachineSpec), b.(*MachineSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineStatus)(nil), (*v1beta1.MachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineStatus_To_v1beta1_MachineStatus(a.(*MachineStatus), b.(*v1beta1.MachineStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineStatus)(nil), (*MachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineStatus_To_v1alpha4_MachineStatus(a.(*v1beta1.MachineStatus), b.(*MachineStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachineTemplateSpec)(nil), (*v1beta1.MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(a.(*MachineTemplateSpec), b.(*v1beta1.MachineTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.MachineTemplateSpec)(nil), (*MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(a.(*v1beta1.MachineTemplateSpec), b.(*MachineTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NetworkRanges)(nil), (*v1beta1.NetworkRanges)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NetworkRanges_To_v1beta1_NetworkRanges(a.(*NetworkRanges), b.(*v1beta1.NetworkRanges), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.NetworkRanges)(nil), (*NetworkRanges)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NetworkRanges_To_v1alpha4_NetworkRanges(a.(*v1beta1.NetworkRanges), b.(*NetworkRanges), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ObjectMeta)(nil), (*v1beta1.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(a.(*ObjectMeta), b.(*v1beta1.ObjectMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ObjectMeta)(nil), (*ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(a.(*v1beta1.ObjectMeta), b.(*ObjectMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Topology)(nil), (*v1beta1.Topology)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Topology_To_v1beta1_Topology(a.(*Topology), b.(*v1beta1.Topology), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Topology)(nil), (*Topology)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Topology_To_v1alpha4_Topology(a.(*v1beta1.Topology), b.(*Topology), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*UnhealthyCondition)(nil), (*v1beta1.UnhealthyCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_UnhealthyCondition_To_v1beta1_UnhealthyCondition(a.(*UnhealthyCondition), b.(*v1beta1.UnhealthyCondition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.UnhealthyCondition)(nil), (*UnhealthyCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_UnhealthyCondition_To_v1alpha4_UnhealthyCondition(a.(*v1beta1.UnhealthyCondition), b.(*UnhealthyCondition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*WorkersClass)(nil), (*v1beta1.WorkersClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_WorkersClass_To_v1beta1_WorkersClass(a.(*WorkersClass), b.(*v1beta1.WorkersClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.WorkersClass)(nil), (*WorkersClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_WorkersClass_To_v1alpha4_WorkersClass(a.(*v1beta1.WorkersClass), b.(*WorkersClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*WorkersTopology)(nil), (*v1beta1.WorkersTopology)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_WorkersTopology_To_v1beta1_WorkersTopology(a.(*WorkersTopology), b.(*v1beta1.WorkersTopology), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.WorkersTopology)(nil), (*WorkersTopology)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_WorkersTopology_To_v1alpha4_WorkersTopology(a.(*v1beta1.WorkersTopology), b.(*WorkersTopology), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + out.Host = in.Host + out.Port = in.Port + return nil +} + +// Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. +func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + return autoConvert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) +} + +func autoConvert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + out.Host = in.Host + out.Port = in.Port + return nil +} + +// Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint is an autogenerated conversion function. +func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + return autoConvert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) +} + +func autoConvert_v1alpha4_Bootstrap_To_v1beta1_Bootstrap(in *Bootstrap, out *v1beta1.Bootstrap, s conversion.Scope) error { + out.ConfigRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigRef)) + out.DataSecretName = (*string)(unsafe.Pointer(in.DataSecretName)) + return nil +} + +// Convert_v1alpha4_Bootstrap_To_v1beta1_Bootstrap is an autogenerated conversion function. +func Convert_v1alpha4_Bootstrap_To_v1beta1_Bootstrap(in *Bootstrap, out *v1beta1.Bootstrap, s conversion.Scope) error { + return autoConvert_v1alpha4_Bootstrap_To_v1beta1_Bootstrap(in, out, s) +} + +func autoConvert_v1beta1_Bootstrap_To_v1alpha4_Bootstrap(in *v1beta1.Bootstrap, out *Bootstrap, s conversion.Scope) error { + out.ConfigRef = (*v1.ObjectReference)(unsafe.Pointer(in.ConfigRef)) + out.DataSecretName = (*string)(unsafe.Pointer(in.DataSecretName)) + return nil +} + +// Convert_v1beta1_Bootstrap_To_v1alpha4_Bootstrap is an autogenerated conversion function. +func Convert_v1beta1_Bootstrap_To_v1alpha4_Bootstrap(in *v1beta1.Bootstrap, out *Bootstrap, s conversion.Scope) error { + return autoConvert_v1beta1_Bootstrap_To_v1alpha4_Bootstrap(in, out, s) +} + +func autoConvert_v1alpha4_Cluster_To_v1beta1_Cluster(in *Cluster, out *v1beta1.Cluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_ClusterSpec_To_v1beta1_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_Cluster_To_v1beta1_Cluster is an autogenerated conversion function. +func Convert_v1alpha4_Cluster_To_v1beta1_Cluster(in *Cluster, out *v1beta1.Cluster, s conversion.Scope) error { + return autoConvert_v1alpha4_Cluster_To_v1beta1_Cluster(in, out, s) +} + +func autoConvert_v1beta1_Cluster_To_v1alpha4_Cluster(in *v1beta1.Cluster, out *Cluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_ClusterSpec_To_v1alpha4_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_Cluster_To_v1alpha4_Cluster is an autogenerated conversion function. +func Convert_v1beta1_Cluster_To_v1alpha4_Cluster(in *v1beta1.Cluster, out *Cluster, s conversion.Scope) error { + return autoConvert_v1beta1_Cluster_To_v1alpha4_Cluster(in, out, s) +} + +func autoConvert_v1alpha4_ClusterClass_To_v1beta1_ClusterClass(in *ClusterClass, out *v1beta1.ClusterClass, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_ClusterClassSpec_To_v1beta1_ClusterClassSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_ClusterClass_To_v1beta1_ClusterClass is an autogenerated conversion function. +func Convert_v1alpha4_ClusterClass_To_v1beta1_ClusterClass(in *ClusterClass, out *v1beta1.ClusterClass, s conversion.Scope) error { + return autoConvert_v1alpha4_ClusterClass_To_v1beta1_ClusterClass(in, out, s) +} + +func autoConvert_v1beta1_ClusterClass_To_v1alpha4_ClusterClass(in *v1beta1.ClusterClass, out *ClusterClass, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_ClusterClassSpec_To_v1alpha4_ClusterClassSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_ClusterClass_To_v1alpha4_ClusterClass is an autogenerated conversion function. +func Convert_v1beta1_ClusterClass_To_v1alpha4_ClusterClass(in *v1beta1.ClusterClass, out *ClusterClass, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterClass_To_v1alpha4_ClusterClass(in, out, s) +} + +func autoConvert_v1alpha4_ClusterClassList_To_v1beta1_ClusterClassList(in *ClusterClassList, out *v1beta1.ClusterClassList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.ClusterClass)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_ClusterClassList_To_v1beta1_ClusterClassList is an autogenerated conversion function. +func Convert_v1alpha4_ClusterClassList_To_v1beta1_ClusterClassList(in *ClusterClassList, out *v1beta1.ClusterClassList, s conversion.Scope) error { + return autoConvert_v1alpha4_ClusterClassList_To_v1beta1_ClusterClassList(in, out, s) +} + +func autoConvert_v1beta1_ClusterClassList_To_v1alpha4_ClusterClassList(in *v1beta1.ClusterClassList, out *ClusterClassList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterClass)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_ClusterClassList_To_v1alpha4_ClusterClassList is an autogenerated conversion function. +func Convert_v1beta1_ClusterClassList_To_v1alpha4_ClusterClassList(in *v1beta1.ClusterClassList, out *ClusterClassList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterClassList_To_v1alpha4_ClusterClassList(in, out, s) +} + +func autoConvert_v1alpha4_ClusterClassSpec_To_v1beta1_ClusterClassSpec(in *ClusterClassSpec, out *v1beta1.ClusterClassSpec, s conversion.Scope) error { + if err := Convert_v1alpha4_LocalObjectTemplate_To_v1beta1_LocalObjectTemplate(&in.Infrastructure, &out.Infrastructure, s); err != nil { + return err + } + if err := Convert_v1alpha4_ControlPlaneClass_To_v1beta1_ControlPlaneClass(&in.ControlPlane, &out.ControlPlane, s); err != nil { + return err + } + if err := Convert_v1alpha4_WorkersClass_To_v1beta1_WorkersClass(&in.Workers, &out.Workers, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_ClusterClassSpec_To_v1beta1_ClusterClassSpec is an autogenerated conversion function. +func Convert_v1alpha4_ClusterClassSpec_To_v1beta1_ClusterClassSpec(in *ClusterClassSpec, out *v1beta1.ClusterClassSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_ClusterClassSpec_To_v1beta1_ClusterClassSpec(in, out, s) +} + +func autoConvert_v1beta1_ClusterClassSpec_To_v1alpha4_ClusterClassSpec(in *v1beta1.ClusterClassSpec, out *ClusterClassSpec, s conversion.Scope) error { + if err := Convert_v1beta1_LocalObjectTemplate_To_v1alpha4_LocalObjectTemplate(&in.Infrastructure, &out.Infrastructure, s); err != nil { + return err + } + if err := Convert_v1beta1_ControlPlaneClass_To_v1alpha4_ControlPlaneClass(&in.ControlPlane, &out.ControlPlane, s); err != nil { + return err + } + if err := Convert_v1beta1_WorkersClass_To_v1alpha4_WorkersClass(&in.Workers, &out.Workers, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_ClusterClassSpec_To_v1alpha4_ClusterClassSpec is an autogenerated conversion function. +func Convert_v1beta1_ClusterClassSpec_To_v1alpha4_ClusterClassSpec(in *v1beta1.ClusterClassSpec, out *ClusterClassSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterClassSpec_To_v1alpha4_ClusterClassSpec(in, out, s) +} + +func autoConvert_v1alpha4_ClusterList_To_v1beta1_ClusterList(in *ClusterList, out *v1beta1.ClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.Cluster)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_ClusterList_To_v1beta1_ClusterList is an autogenerated conversion function. +func Convert_v1alpha4_ClusterList_To_v1beta1_ClusterList(in *ClusterList, out *v1beta1.ClusterList, s conversion.Scope) error { + return autoConvert_v1alpha4_ClusterList_To_v1beta1_ClusterList(in, out, s) +} + +func autoConvert_v1beta1_ClusterList_To_v1alpha4_ClusterList(in *v1beta1.ClusterList, out *ClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Cluster)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_ClusterList_To_v1alpha4_ClusterList is an autogenerated conversion function. +func Convert_v1beta1_ClusterList_To_v1alpha4_ClusterList(in *v1beta1.ClusterList, out *ClusterList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterList_To_v1alpha4_ClusterList(in, out, s) +} + +func autoConvert_v1alpha4_ClusterNetwork_To_v1beta1_ClusterNetwork(in *ClusterNetwork, out *v1beta1.ClusterNetwork, s conversion.Scope) error { + out.APIServerPort = (*int32)(unsafe.Pointer(in.APIServerPort)) + out.Services = (*v1beta1.NetworkRanges)(unsafe.Pointer(in.Services)) + out.Pods = (*v1beta1.NetworkRanges)(unsafe.Pointer(in.Pods)) + out.ServiceDomain = in.ServiceDomain + return nil +} + +// Convert_v1alpha4_ClusterNetwork_To_v1beta1_ClusterNetwork is an autogenerated conversion function. +func Convert_v1alpha4_ClusterNetwork_To_v1beta1_ClusterNetwork(in *ClusterNetwork, out *v1beta1.ClusterNetwork, s conversion.Scope) error { + return autoConvert_v1alpha4_ClusterNetwork_To_v1beta1_ClusterNetwork(in, out, s) +} + +func autoConvert_v1beta1_ClusterNetwork_To_v1alpha4_ClusterNetwork(in *v1beta1.ClusterNetwork, out *ClusterNetwork, s conversion.Scope) error { + out.APIServerPort = (*int32)(unsafe.Pointer(in.APIServerPort)) + out.Services = (*NetworkRanges)(unsafe.Pointer(in.Services)) + out.Pods = (*NetworkRanges)(unsafe.Pointer(in.Pods)) + out.ServiceDomain = in.ServiceDomain + return nil +} + +// Convert_v1beta1_ClusterNetwork_To_v1alpha4_ClusterNetwork is an autogenerated conversion function. +func Convert_v1beta1_ClusterNetwork_To_v1alpha4_ClusterNetwork(in *v1beta1.ClusterNetwork, out *ClusterNetwork, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterNetwork_To_v1alpha4_ClusterNetwork(in, out, s) +} + +func autoConvert_v1alpha4_ClusterSpec_To_v1beta1_ClusterSpec(in *ClusterSpec, out *v1beta1.ClusterSpec, s conversion.Scope) error { + out.Paused = in.Paused + out.ClusterNetwork = (*v1beta1.ClusterNetwork)(unsafe.Pointer(in.ClusterNetwork)) + if err := Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { + return err + } + out.ControlPlaneRef = (*v1.ObjectReference)(unsafe.Pointer(in.ControlPlaneRef)) + out.InfrastructureRef = (*v1.ObjectReference)(unsafe.Pointer(in.InfrastructureRef)) + out.Topology = (*v1beta1.Topology)(unsafe.Pointer(in.Topology)) + return nil +} + +// Convert_v1alpha4_ClusterSpec_To_v1beta1_ClusterSpec is an autogenerated conversion function. +func Convert_v1alpha4_ClusterSpec_To_v1beta1_ClusterSpec(in *ClusterSpec, out *v1beta1.ClusterSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_ClusterSpec_To_v1beta1_ClusterSpec(in, out, s) +} + +func autoConvert_v1beta1_ClusterSpec_To_v1alpha4_ClusterSpec(in *v1beta1.ClusterSpec, out *ClusterSpec, s conversion.Scope) error { + out.Paused = in.Paused + out.ClusterNetwork = (*ClusterNetwork)(unsafe.Pointer(in.ClusterNetwork)) + if err := Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { + return err + } + out.ControlPlaneRef = (*v1.ObjectReference)(unsafe.Pointer(in.ControlPlaneRef)) + out.InfrastructureRef = (*v1.ObjectReference)(unsafe.Pointer(in.InfrastructureRef)) + out.Topology = (*Topology)(unsafe.Pointer(in.Topology)) + return nil +} + +// Convert_v1beta1_ClusterSpec_To_v1alpha4_ClusterSpec is an autogenerated conversion function. +func Convert_v1beta1_ClusterSpec_To_v1alpha4_ClusterSpec(in *v1beta1.ClusterSpec, out *ClusterSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterSpec_To_v1alpha4_ClusterSpec(in, out, s) +} + +func autoConvert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { + out.FailureDomains = *(*v1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) + out.FailureReason = (*errors.ClusterStatusError)(unsafe.Pointer(in.FailureReason)) + out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) + out.Phase = in.Phase + out.InfrastructureReady = in.InfrastructureReady + out.ControlPlaneReady = in.ControlPlaneReady + out.Conditions = *(*v1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus is an autogenerated conversion function. +func Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in, out, s) +} + +func autoConvert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in *v1beta1.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + out.FailureDomains = *(*FailureDomains)(unsafe.Pointer(&in.FailureDomains)) + out.FailureReason = (*errors.ClusterStatusError)(unsafe.Pointer(in.FailureReason)) + out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) + out.Phase = in.Phase + out.InfrastructureReady = in.InfrastructureReady + out.ControlPlaneReady = in.ControlPlaneReady + out.Conditions = *(*Conditions)(unsafe.Pointer(&in.Conditions)) + out.ObservedGeneration = in.ObservedGeneration + return nil +} + +// Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus is an autogenerated conversion function. +func Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in *v1beta1.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in, out, s) +} + +func autoConvert_v1alpha4_Condition_To_v1beta1_Condition(in *Condition, out *v1beta1.Condition, s conversion.Scope) error { + out.Type = v1beta1.ConditionType(in.Type) + out.Status = v1.ConditionStatus(in.Status) + out.Severity = v1beta1.ConditionSeverity(in.Severity) + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +// Convert_v1alpha4_Condition_To_v1beta1_Condition is an autogenerated conversion function. +func Convert_v1alpha4_Condition_To_v1beta1_Condition(in *Condition, out *v1beta1.Condition, s conversion.Scope) error { + return autoConvert_v1alpha4_Condition_To_v1beta1_Condition(in, out, s) +} + +func autoConvert_v1beta1_Condition_To_v1alpha4_Condition(in *v1beta1.Condition, out *Condition, s conversion.Scope) error { + out.Type = ConditionType(in.Type) + out.Status = v1.ConditionStatus(in.Status) + out.Severity = ConditionSeverity(in.Severity) + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +// Convert_v1beta1_Condition_To_v1alpha4_Condition is an autogenerated conversion function. +func Convert_v1beta1_Condition_To_v1alpha4_Condition(in *v1beta1.Condition, out *Condition, s conversion.Scope) error { + return autoConvert_v1beta1_Condition_To_v1alpha4_Condition(in, out, s) +} + +func autoConvert_v1alpha4_ControlPlaneClass_To_v1beta1_ControlPlaneClass(in *ControlPlaneClass, out *v1beta1.ControlPlaneClass, s conversion.Scope) error { + if err := Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(&in.Metadata, &out.Metadata, s); err != nil { + return err + } + if err := Convert_v1alpha4_LocalObjectTemplate_To_v1beta1_LocalObjectTemplate(&in.LocalObjectTemplate, &out.LocalObjectTemplate, s); err != nil { + return err + } + out.MachineInfrastructure = (*v1beta1.LocalObjectTemplate)(unsafe.Pointer(in.MachineInfrastructure)) + return nil +} + +// Convert_v1alpha4_ControlPlaneClass_To_v1beta1_ControlPlaneClass is an autogenerated conversion function. +func Convert_v1alpha4_ControlPlaneClass_To_v1beta1_ControlPlaneClass(in *ControlPlaneClass, out *v1beta1.ControlPlaneClass, s conversion.Scope) error { + return autoConvert_v1alpha4_ControlPlaneClass_To_v1beta1_ControlPlaneClass(in, out, s) +} + +func autoConvert_v1beta1_ControlPlaneClass_To_v1alpha4_ControlPlaneClass(in *v1beta1.ControlPlaneClass, out *ControlPlaneClass, s conversion.Scope) error { + if err := Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(&in.Metadata, &out.Metadata, s); err != nil { + return err + } + if err := Convert_v1beta1_LocalObjectTemplate_To_v1alpha4_LocalObjectTemplate(&in.LocalObjectTemplate, &out.LocalObjectTemplate, s); err != nil { + return err + } + out.MachineInfrastructure = (*LocalObjectTemplate)(unsafe.Pointer(in.MachineInfrastructure)) + return nil +} + +// Convert_v1beta1_ControlPlaneClass_To_v1alpha4_ControlPlaneClass is an autogenerated conversion function. +func Convert_v1beta1_ControlPlaneClass_To_v1alpha4_ControlPlaneClass(in *v1beta1.ControlPlaneClass, out *ControlPlaneClass, s conversion.Scope) error { + return autoConvert_v1beta1_ControlPlaneClass_To_v1alpha4_ControlPlaneClass(in, out, s) +} + +func autoConvert_v1alpha4_ControlPlaneTopology_To_v1beta1_ControlPlaneTopology(in *ControlPlaneTopology, out *v1beta1.ControlPlaneTopology, s conversion.Scope) error { + if err := Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(&in.Metadata, &out.Metadata, s); err != nil { + return err + } + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + return nil +} + +// Convert_v1alpha4_ControlPlaneTopology_To_v1beta1_ControlPlaneTopology is an autogenerated conversion function. +func Convert_v1alpha4_ControlPlaneTopology_To_v1beta1_ControlPlaneTopology(in *ControlPlaneTopology, out *v1beta1.ControlPlaneTopology, s conversion.Scope) error { + return autoConvert_v1alpha4_ControlPlaneTopology_To_v1beta1_ControlPlaneTopology(in, out, s) +} + +func autoConvert_v1beta1_ControlPlaneTopology_To_v1alpha4_ControlPlaneTopology(in *v1beta1.ControlPlaneTopology, out *ControlPlaneTopology, s conversion.Scope) error { + if err := Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(&in.Metadata, &out.Metadata, s); err != nil { + return err + } + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + return nil +} + +// Convert_v1beta1_ControlPlaneTopology_To_v1alpha4_ControlPlaneTopology is an autogenerated conversion function. +func Convert_v1beta1_ControlPlaneTopology_To_v1alpha4_ControlPlaneTopology(in *v1beta1.ControlPlaneTopology, out *ControlPlaneTopology, s conversion.Scope) error { + return autoConvert_v1beta1_ControlPlaneTopology_To_v1alpha4_ControlPlaneTopology(in, out, s) +} + +func autoConvert_v1alpha4_FailureDomainSpec_To_v1beta1_FailureDomainSpec(in *FailureDomainSpec, out *v1beta1.FailureDomainSpec, s conversion.Scope) error { + out.ControlPlane = in.ControlPlane + out.Attributes = *(*map[string]string)(unsafe.Pointer(&in.Attributes)) + return nil +} + +// Convert_v1alpha4_FailureDomainSpec_To_v1beta1_FailureDomainSpec is an autogenerated conversion function. +func Convert_v1alpha4_FailureDomainSpec_To_v1beta1_FailureDomainSpec(in *FailureDomainSpec, out *v1beta1.FailureDomainSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_FailureDomainSpec_To_v1beta1_FailureDomainSpec(in, out, s) +} + +func autoConvert_v1beta1_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(in *v1beta1.FailureDomainSpec, out *FailureDomainSpec, s conversion.Scope) error { + out.ControlPlane = in.ControlPlane + out.Attributes = *(*map[string]string)(unsafe.Pointer(&in.Attributes)) + return nil +} + +// Convert_v1beta1_FailureDomainSpec_To_v1alpha4_FailureDomainSpec is an autogenerated conversion function. +func Convert_v1beta1_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(in *v1beta1.FailureDomainSpec, out *FailureDomainSpec, s conversion.Scope) error { + return autoConvert_v1beta1_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(in, out, s) +} + +func autoConvert_v1alpha4_LocalObjectTemplate_To_v1beta1_LocalObjectTemplate(in *LocalObjectTemplate, out *v1beta1.LocalObjectTemplate, s conversion.Scope) error { + out.Ref = (*v1.ObjectReference)(unsafe.Pointer(in.Ref)) + return nil +} + +// Convert_v1alpha4_LocalObjectTemplate_To_v1beta1_LocalObjectTemplate is an autogenerated conversion function. +func Convert_v1alpha4_LocalObjectTemplate_To_v1beta1_LocalObjectTemplate(in *LocalObjectTemplate, out *v1beta1.LocalObjectTemplate, s conversion.Scope) error { + return autoConvert_v1alpha4_LocalObjectTemplate_To_v1beta1_LocalObjectTemplate(in, out, s) +} + +func autoConvert_v1beta1_LocalObjectTemplate_To_v1alpha4_LocalObjectTemplate(in *v1beta1.LocalObjectTemplate, out *LocalObjectTemplate, s conversion.Scope) error { + out.Ref = (*v1.ObjectReference)(unsafe.Pointer(in.Ref)) + return nil +} + +// Convert_v1beta1_LocalObjectTemplate_To_v1alpha4_LocalObjectTemplate is an autogenerated conversion function. +func Convert_v1beta1_LocalObjectTemplate_To_v1alpha4_LocalObjectTemplate(in *v1beta1.LocalObjectTemplate, out *LocalObjectTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_LocalObjectTemplate_To_v1alpha4_LocalObjectTemplate(in, out, s) +} + +func autoConvert_v1alpha4_Machine_To_v1beta1_Machine(in *Machine, out *v1beta1.Machine, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_MachineSpec_To_v1beta1_MachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_MachineStatus_To_v1beta1_MachineStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_Machine_To_v1beta1_Machine is an autogenerated conversion function. +func Convert_v1alpha4_Machine_To_v1beta1_Machine(in *Machine, out *v1beta1.Machine, s conversion.Scope) error { + return autoConvert_v1alpha4_Machine_To_v1beta1_Machine(in, out, s) +} + +func autoConvert_v1beta1_Machine_To_v1alpha4_Machine(in *v1beta1.Machine, out *Machine, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_MachineSpec_To_v1alpha4_MachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_MachineStatus_To_v1alpha4_MachineStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_Machine_To_v1alpha4_Machine is an autogenerated conversion function. +func Convert_v1beta1_Machine_To_v1alpha4_Machine(in *v1beta1.Machine, out *Machine, s conversion.Scope) error { + return autoConvert_v1beta1_Machine_To_v1alpha4_Machine(in, out, s) +} + +func autoConvert_v1alpha4_MachineAddress_To_v1beta1_MachineAddress(in *MachineAddress, out *v1beta1.MachineAddress, s conversion.Scope) error { + out.Type = v1beta1.MachineAddressType(in.Type) + out.Address = in.Address + return nil +} + +// Convert_v1alpha4_MachineAddress_To_v1beta1_MachineAddress is an autogenerated conversion function. +func Convert_v1alpha4_MachineAddress_To_v1beta1_MachineAddress(in *MachineAddress, out *v1beta1.MachineAddress, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineAddress_To_v1beta1_MachineAddress(in, out, s) +} + +func autoConvert_v1beta1_MachineAddress_To_v1alpha4_MachineAddress(in *v1beta1.MachineAddress, out *MachineAddress, s conversion.Scope) error { + out.Type = MachineAddressType(in.Type) + out.Address = in.Address + return nil +} + +// Convert_v1beta1_MachineAddress_To_v1alpha4_MachineAddress is an autogenerated conversion function. +func Convert_v1beta1_MachineAddress_To_v1alpha4_MachineAddress(in *v1beta1.MachineAddress, out *MachineAddress, s conversion.Scope) error { + return autoConvert_v1beta1_MachineAddress_To_v1alpha4_MachineAddress(in, out, s) +} + +func autoConvert_v1alpha4_MachineDeployment_To_v1beta1_MachineDeployment(in *MachineDeployment, out *v1beta1.MachineDeployment, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_MachineDeployment_To_v1beta1_MachineDeployment is an autogenerated conversion function. +func Convert_v1alpha4_MachineDeployment_To_v1beta1_MachineDeployment(in *MachineDeployment, out *v1beta1.MachineDeployment, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineDeployment_To_v1beta1_MachineDeployment(in, out, s) +} + +func autoConvert_v1beta1_MachineDeployment_To_v1alpha4_MachineDeployment(in *v1beta1.MachineDeployment, out *MachineDeployment, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_MachineDeployment_To_v1alpha4_MachineDeployment is an autogenerated conversion function. +func Convert_v1beta1_MachineDeployment_To_v1alpha4_MachineDeployment(in *v1beta1.MachineDeployment, out *MachineDeployment, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeployment_To_v1alpha4_MachineDeployment(in, out, s) +} + +func autoConvert_v1alpha4_MachineDeploymentClass_To_v1beta1_MachineDeploymentClass(in *MachineDeploymentClass, out *v1beta1.MachineDeploymentClass, s conversion.Scope) error { + out.Class = in.Class + if err := Convert_v1alpha4_MachineDeploymentClassTemplate_To_v1beta1_MachineDeploymentClassTemplate(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_MachineDeploymentClass_To_v1beta1_MachineDeploymentClass is an autogenerated conversion function. +func Convert_v1alpha4_MachineDeploymentClass_To_v1beta1_MachineDeploymentClass(in *MachineDeploymentClass, out *v1beta1.MachineDeploymentClass, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineDeploymentClass_To_v1beta1_MachineDeploymentClass(in, out, s) +} + +func autoConvert_v1beta1_MachineDeploymentClass_To_v1alpha4_MachineDeploymentClass(in *v1beta1.MachineDeploymentClass, out *MachineDeploymentClass, s conversion.Scope) error { + out.Class = in.Class + if err := Convert_v1beta1_MachineDeploymentClassTemplate_To_v1alpha4_MachineDeploymentClassTemplate(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_MachineDeploymentClass_To_v1alpha4_MachineDeploymentClass is an autogenerated conversion function. +func Convert_v1beta1_MachineDeploymentClass_To_v1alpha4_MachineDeploymentClass(in *v1beta1.MachineDeploymentClass, out *MachineDeploymentClass, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentClass_To_v1alpha4_MachineDeploymentClass(in, out, s) +} + +func autoConvert_v1alpha4_MachineDeploymentClassTemplate_To_v1beta1_MachineDeploymentClassTemplate(in *MachineDeploymentClassTemplate, out *v1beta1.MachineDeploymentClassTemplate, s conversion.Scope) error { + if err := Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(&in.Metadata, &out.Metadata, s); err != nil { + return err + } + if err := Convert_v1alpha4_LocalObjectTemplate_To_v1beta1_LocalObjectTemplate(&in.Bootstrap, &out.Bootstrap, s); err != nil { + return err + } + if err := Convert_v1alpha4_LocalObjectTemplate_To_v1beta1_LocalObjectTemplate(&in.Infrastructure, &out.Infrastructure, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_MachineDeploymentClassTemplate_To_v1beta1_MachineDeploymentClassTemplate is an autogenerated conversion function. +func Convert_v1alpha4_MachineDeploymentClassTemplate_To_v1beta1_MachineDeploymentClassTemplate(in *MachineDeploymentClassTemplate, out *v1beta1.MachineDeploymentClassTemplate, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineDeploymentClassTemplate_To_v1beta1_MachineDeploymentClassTemplate(in, out, s) +} + +func autoConvert_v1beta1_MachineDeploymentClassTemplate_To_v1alpha4_MachineDeploymentClassTemplate(in *v1beta1.MachineDeploymentClassTemplate, out *MachineDeploymentClassTemplate, s conversion.Scope) error { + if err := Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(&in.Metadata, &out.Metadata, s); err != nil { + return err + } + if err := Convert_v1beta1_LocalObjectTemplate_To_v1alpha4_LocalObjectTemplate(&in.Bootstrap, &out.Bootstrap, s); err != nil { + return err + } + if err := Convert_v1beta1_LocalObjectTemplate_To_v1alpha4_LocalObjectTemplate(&in.Infrastructure, &out.Infrastructure, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_MachineDeploymentClassTemplate_To_v1alpha4_MachineDeploymentClassTemplate is an autogenerated conversion function. +func Convert_v1beta1_MachineDeploymentClassTemplate_To_v1alpha4_MachineDeploymentClassTemplate(in *v1beta1.MachineDeploymentClassTemplate, out *MachineDeploymentClassTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentClassTemplate_To_v1alpha4_MachineDeploymentClassTemplate(in, out, s) +} + +func autoConvert_v1alpha4_MachineDeploymentList_To_v1beta1_MachineDeploymentList(in *MachineDeploymentList, out *v1beta1.MachineDeploymentList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.MachineDeployment)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_MachineDeploymentList_To_v1beta1_MachineDeploymentList is an autogenerated conversion function. +func Convert_v1alpha4_MachineDeploymentList_To_v1beta1_MachineDeploymentList(in *MachineDeploymentList, out *v1beta1.MachineDeploymentList, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineDeploymentList_To_v1beta1_MachineDeploymentList(in, out, s) +} + +func autoConvert_v1beta1_MachineDeploymentList_To_v1alpha4_MachineDeploymentList(in *v1beta1.MachineDeploymentList, out *MachineDeploymentList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]MachineDeployment)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_MachineDeploymentList_To_v1alpha4_MachineDeploymentList is an autogenerated conversion function. +func Convert_v1beta1_MachineDeploymentList_To_v1alpha4_MachineDeploymentList(in *v1beta1.MachineDeploymentList, out *MachineDeploymentList, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentList_To_v1alpha4_MachineDeploymentList(in, out, s) +} + +func autoConvert_v1alpha4_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec(in *MachineDeploymentSpec, out *v1beta1.MachineDeploymentSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + out.Selector = in.Selector + if err := Convert_v1alpha4_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + out.Strategy = (*v1beta1.MachineDeploymentStrategy)(unsafe.Pointer(in.Strategy)) + out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds)) + out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) + out.Paused = in.Paused + out.ProgressDeadlineSeconds = (*int32)(unsafe.Pointer(in.ProgressDeadlineSeconds)) + return nil +} + +// Convert_v1alpha4_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec is an autogenerated conversion function. +func Convert_v1alpha4_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec(in *MachineDeploymentSpec, out *v1beta1.MachineDeploymentSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineDeploymentSpec_To_v1beta1_MachineDeploymentSpec(in, out, s) +} + +func autoConvert_v1beta1_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec(in *v1beta1.MachineDeploymentSpec, out *MachineDeploymentSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + out.Selector = in.Selector + if err := Convert_v1beta1_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + out.Strategy = (*MachineDeploymentStrategy)(unsafe.Pointer(in.Strategy)) + out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds)) + out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) + out.Paused = in.Paused + out.ProgressDeadlineSeconds = (*int32)(unsafe.Pointer(in.ProgressDeadlineSeconds)) + return nil +} + +// Convert_v1beta1_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec is an autogenerated conversion function. +func Convert_v1beta1_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec(in *v1beta1.MachineDeploymentSpec, out *MachineDeploymentSpec, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentSpec_To_v1alpha4_MachineDeploymentSpec(in, out, s) +} + +func autoConvert_v1alpha4_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(in *MachineDeploymentStatus, out *v1beta1.MachineDeploymentStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.Selector = in.Selector + out.Replicas = in.Replicas + out.UpdatedReplicas = in.UpdatedReplicas + out.ReadyReplicas = in.ReadyReplicas + out.AvailableReplicas = in.AvailableReplicas + out.UnavailableReplicas = in.UnavailableReplicas + out.Phase = in.Phase + out.Conditions = *(*v1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1alpha4_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus is an autogenerated conversion function. +func Convert_v1alpha4_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(in *MachineDeploymentStatus, out *v1beta1.MachineDeploymentStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(in, out, s) +} + +func autoConvert_v1beta1_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus(in *v1beta1.MachineDeploymentStatus, out *MachineDeploymentStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.Selector = in.Selector + out.Replicas = in.Replicas + out.UpdatedReplicas = in.UpdatedReplicas + out.ReadyReplicas = in.ReadyReplicas + out.AvailableReplicas = in.AvailableReplicas + out.UnavailableReplicas = in.UnavailableReplicas + out.Phase = in.Phase + out.Conditions = *(*Conditions)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1beta1_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus is an autogenerated conversion function. +func Convert_v1beta1_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus(in *v1beta1.MachineDeploymentStatus, out *MachineDeploymentStatus, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentStatus_To_v1alpha4_MachineDeploymentStatus(in, out, s) +} + +func autoConvert_v1alpha4_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy(in *MachineDeploymentStrategy, out *v1beta1.MachineDeploymentStrategy, s conversion.Scope) error { + out.Type = v1beta1.MachineDeploymentStrategyType(in.Type) + out.RollingUpdate = (*v1beta1.MachineRollingUpdateDeployment)(unsafe.Pointer(in.RollingUpdate)) + return nil +} + +// Convert_v1alpha4_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy is an autogenerated conversion function. +func Convert_v1alpha4_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy(in *MachineDeploymentStrategy, out *v1beta1.MachineDeploymentStrategy, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineDeploymentStrategy_To_v1beta1_MachineDeploymentStrategy(in, out, s) +} + +func autoConvert_v1beta1_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy(in *v1beta1.MachineDeploymentStrategy, out *MachineDeploymentStrategy, s conversion.Scope) error { + out.Type = MachineDeploymentStrategyType(in.Type) + out.RollingUpdate = (*MachineRollingUpdateDeployment)(unsafe.Pointer(in.RollingUpdate)) + return nil +} + +// Convert_v1beta1_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy is an autogenerated conversion function. +func Convert_v1beta1_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy(in *v1beta1.MachineDeploymentStrategy, out *MachineDeploymentStrategy, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentStrategy_To_v1alpha4_MachineDeploymentStrategy(in, out, s) +} + +func autoConvert_v1alpha4_MachineDeploymentTopology_To_v1beta1_MachineDeploymentTopology(in *MachineDeploymentTopology, out *v1beta1.MachineDeploymentTopology, s conversion.Scope) error { + if err := Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(&in.Metadata, &out.Metadata, s); err != nil { + return err + } + out.Class = in.Class + out.Name = in.Name + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + return nil +} + +// Convert_v1alpha4_MachineDeploymentTopology_To_v1beta1_MachineDeploymentTopology is an autogenerated conversion function. +func Convert_v1alpha4_MachineDeploymentTopology_To_v1beta1_MachineDeploymentTopology(in *MachineDeploymentTopology, out *v1beta1.MachineDeploymentTopology, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineDeploymentTopology_To_v1beta1_MachineDeploymentTopology(in, out, s) +} + +func autoConvert_v1beta1_MachineDeploymentTopology_To_v1alpha4_MachineDeploymentTopology(in *v1beta1.MachineDeploymentTopology, out *MachineDeploymentTopology, s conversion.Scope) error { + if err := Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(&in.Metadata, &out.Metadata, s); err != nil { + return err + } + out.Class = in.Class + out.Name = in.Name + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + return nil +} + +// Convert_v1beta1_MachineDeploymentTopology_To_v1alpha4_MachineDeploymentTopology is an autogenerated conversion function. +func Convert_v1beta1_MachineDeploymentTopology_To_v1alpha4_MachineDeploymentTopology(in *v1beta1.MachineDeploymentTopology, out *MachineDeploymentTopology, s conversion.Scope) error { + return autoConvert_v1beta1_MachineDeploymentTopology_To_v1alpha4_MachineDeploymentTopology(in, out, s) +} + +func autoConvert_v1alpha4_MachineHealthCheck_To_v1beta1_MachineHealthCheck(in *MachineHealthCheck, out *v1beta1.MachineHealthCheck, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_MachineHealthCheck_To_v1beta1_MachineHealthCheck is an autogenerated conversion function. +func Convert_v1alpha4_MachineHealthCheck_To_v1beta1_MachineHealthCheck(in *MachineHealthCheck, out *v1beta1.MachineHealthCheck, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineHealthCheck_To_v1beta1_MachineHealthCheck(in, out, s) +} + +func autoConvert_v1beta1_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(in *v1beta1.MachineHealthCheck, out *MachineHealthCheck, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_MachineHealthCheck_To_v1alpha4_MachineHealthCheck is an autogenerated conversion function. +func Convert_v1beta1_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(in *v1beta1.MachineHealthCheck, out *MachineHealthCheck, s conversion.Scope) error { + return autoConvert_v1beta1_MachineHealthCheck_To_v1alpha4_MachineHealthCheck(in, out, s) +} + +func autoConvert_v1alpha4_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList(in *MachineHealthCheckList, out *v1beta1.MachineHealthCheckList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.MachineHealthCheck)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList is an autogenerated conversion function. +func Convert_v1alpha4_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList(in *MachineHealthCheckList, out *v1beta1.MachineHealthCheckList, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineHealthCheckList_To_v1beta1_MachineHealthCheckList(in, out, s) +} + +func autoConvert_v1beta1_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList(in *v1beta1.MachineHealthCheckList, out *MachineHealthCheckList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]MachineHealthCheck)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList is an autogenerated conversion function. +func Convert_v1beta1_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList(in *v1beta1.MachineHealthCheckList, out *MachineHealthCheckList, s conversion.Scope) error { + return autoConvert_v1beta1_MachineHealthCheckList_To_v1alpha4_MachineHealthCheckList(in, out, s) +} + +func autoConvert_v1alpha4_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(in *MachineHealthCheckSpec, out *v1beta1.MachineHealthCheckSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Selector = in.Selector + out.UnhealthyConditions = *(*[]v1beta1.UnhealthyCondition)(unsafe.Pointer(&in.UnhealthyConditions)) + out.MaxUnhealthy = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnhealthy)) + out.UnhealthyRange = (*string)(unsafe.Pointer(in.UnhealthyRange)) + out.NodeStartupTimeout = (*metav1.Duration)(unsafe.Pointer(in.NodeStartupTimeout)) + out.RemediationTemplate = (*v1.ObjectReference)(unsafe.Pointer(in.RemediationTemplate)) + return nil +} + +// Convert_v1alpha4_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec is an autogenerated conversion function. +func Convert_v1alpha4_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(in *MachineHealthCheckSpec, out *v1beta1.MachineHealthCheckSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(in, out, s) +} + +func autoConvert_v1beta1_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec(in *v1beta1.MachineHealthCheckSpec, out *MachineHealthCheckSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Selector = in.Selector + out.UnhealthyConditions = *(*[]UnhealthyCondition)(unsafe.Pointer(&in.UnhealthyConditions)) + out.MaxUnhealthy = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnhealthy)) + out.UnhealthyRange = (*string)(unsafe.Pointer(in.UnhealthyRange)) + out.NodeStartupTimeout = (*metav1.Duration)(unsafe.Pointer(in.NodeStartupTimeout)) + out.RemediationTemplate = (*v1.ObjectReference)(unsafe.Pointer(in.RemediationTemplate)) + return nil +} + +// Convert_v1beta1_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec is an autogenerated conversion function. +func Convert_v1beta1_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec(in *v1beta1.MachineHealthCheckSpec, out *MachineHealthCheckSpec, s conversion.Scope) error { + return autoConvert_v1beta1_MachineHealthCheckSpec_To_v1alpha4_MachineHealthCheckSpec(in, out, s) +} + +func autoConvert_v1alpha4_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(in *MachineHealthCheckStatus, out *v1beta1.MachineHealthCheckStatus, s conversion.Scope) error { + out.ExpectedMachines = in.ExpectedMachines + out.CurrentHealthy = in.CurrentHealthy + out.RemediationsAllowed = in.RemediationsAllowed + out.ObservedGeneration = in.ObservedGeneration + out.Targets = *(*[]string)(unsafe.Pointer(&in.Targets)) + out.Conditions = *(*v1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1alpha4_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus is an autogenerated conversion function. +func Convert_v1alpha4_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(in *MachineHealthCheckStatus, out *v1beta1.MachineHealthCheckStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(in, out, s) +} + +func autoConvert_v1beta1_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus(in *v1beta1.MachineHealthCheckStatus, out *MachineHealthCheckStatus, s conversion.Scope) error { + out.ExpectedMachines = in.ExpectedMachines + out.CurrentHealthy = in.CurrentHealthy + out.RemediationsAllowed = in.RemediationsAllowed + out.ObservedGeneration = in.ObservedGeneration + out.Targets = *(*[]string)(unsafe.Pointer(&in.Targets)) + out.Conditions = *(*Conditions)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1beta1_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus is an autogenerated conversion function. +func Convert_v1beta1_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus(in *v1beta1.MachineHealthCheckStatus, out *MachineHealthCheckStatus, s conversion.Scope) error { + return autoConvert_v1beta1_MachineHealthCheckStatus_To_v1alpha4_MachineHealthCheckStatus(in, out, s) +} + +func autoConvert_v1alpha4_MachineList_To_v1beta1_MachineList(in *MachineList, out *v1beta1.MachineList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.Machine)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_MachineList_To_v1beta1_MachineList is an autogenerated conversion function. +func Convert_v1alpha4_MachineList_To_v1beta1_MachineList(in *MachineList, out *v1beta1.MachineList, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineList_To_v1beta1_MachineList(in, out, s) +} + +func autoConvert_v1beta1_MachineList_To_v1alpha4_MachineList(in *v1beta1.MachineList, out *MachineList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Machine)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_MachineList_To_v1alpha4_MachineList is an autogenerated conversion function. +func Convert_v1beta1_MachineList_To_v1alpha4_MachineList(in *v1beta1.MachineList, out *MachineList, s conversion.Scope) error { + return autoConvert_v1beta1_MachineList_To_v1alpha4_MachineList(in, out, s) +} + +func autoConvert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(in *MachineRollingUpdateDeployment, out *v1beta1.MachineRollingUpdateDeployment, s conversion.Scope) error { + out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) + out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) + out.DeletePolicy = (*string)(unsafe.Pointer(in.DeletePolicy)) + return nil +} + +// Convert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment is an autogenerated conversion function. +func Convert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(in *MachineRollingUpdateDeployment, out *v1beta1.MachineRollingUpdateDeployment, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(in, out, s) +} + +func autoConvert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(in *v1beta1.MachineRollingUpdateDeployment, out *MachineRollingUpdateDeployment, s conversion.Scope) error { + out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) + out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) + out.DeletePolicy = (*string)(unsafe.Pointer(in.DeletePolicy)) + return nil +} + +// Convert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment is an autogenerated conversion function. +func Convert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(in *v1beta1.MachineRollingUpdateDeployment, out *MachineRollingUpdateDeployment, s conversion.Scope) error { + return autoConvert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(in, out, s) +} + +func autoConvert_v1alpha4_MachineSet_To_v1beta1_MachineSet(in *MachineSet, out *v1beta1.MachineSet, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_MachineSetSpec_To_v1beta1_MachineSetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_MachineSetStatus_To_v1beta1_MachineSetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_MachineSet_To_v1beta1_MachineSet is an autogenerated conversion function. +func Convert_v1alpha4_MachineSet_To_v1beta1_MachineSet(in *MachineSet, out *v1beta1.MachineSet, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineSet_To_v1beta1_MachineSet(in, out, s) +} + +func autoConvert_v1beta1_MachineSet_To_v1alpha4_MachineSet(in *v1beta1.MachineSet, out *MachineSet, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_MachineSetSpec_To_v1alpha4_MachineSetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_MachineSetStatus_To_v1alpha4_MachineSetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_MachineSet_To_v1alpha4_MachineSet is an autogenerated conversion function. +func Convert_v1beta1_MachineSet_To_v1alpha4_MachineSet(in *v1beta1.MachineSet, out *MachineSet, s conversion.Scope) error { + return autoConvert_v1beta1_MachineSet_To_v1alpha4_MachineSet(in, out, s) +} + +func autoConvert_v1alpha4_MachineSetList_To_v1beta1_MachineSetList(in *MachineSetList, out *v1beta1.MachineSetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.MachineSet)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_MachineSetList_To_v1beta1_MachineSetList is an autogenerated conversion function. +func Convert_v1alpha4_MachineSetList_To_v1beta1_MachineSetList(in *MachineSetList, out *v1beta1.MachineSetList, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineSetList_To_v1beta1_MachineSetList(in, out, s) +} + +func autoConvert_v1beta1_MachineSetList_To_v1alpha4_MachineSetList(in *v1beta1.MachineSetList, out *MachineSetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]MachineSet)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_MachineSetList_To_v1alpha4_MachineSetList is an autogenerated conversion function. +func Convert_v1beta1_MachineSetList_To_v1alpha4_MachineSetList(in *v1beta1.MachineSetList, out *MachineSetList, s conversion.Scope) error { + return autoConvert_v1beta1_MachineSetList_To_v1alpha4_MachineSetList(in, out, s) +} + +func autoConvert_v1alpha4_MachineSetSpec_To_v1beta1_MachineSetSpec(in *MachineSetSpec, out *v1beta1.MachineSetSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + out.MinReadySeconds = in.MinReadySeconds + out.DeletePolicy = in.DeletePolicy + out.Selector = in.Selector + if err := Convert_v1alpha4_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_MachineSetSpec_To_v1beta1_MachineSetSpec is an autogenerated conversion function. +func Convert_v1alpha4_MachineSetSpec_To_v1beta1_MachineSetSpec(in *MachineSetSpec, out *v1beta1.MachineSetSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineSetSpec_To_v1beta1_MachineSetSpec(in, out, s) +} + +func autoConvert_v1beta1_MachineSetSpec_To_v1alpha4_MachineSetSpec(in *v1beta1.MachineSetSpec, out *MachineSetSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + out.MinReadySeconds = in.MinReadySeconds + out.DeletePolicy = in.DeletePolicy + out.Selector = in.Selector + if err := Convert_v1beta1_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_MachineSetSpec_To_v1alpha4_MachineSetSpec is an autogenerated conversion function. +func Convert_v1beta1_MachineSetSpec_To_v1alpha4_MachineSetSpec(in *v1beta1.MachineSetSpec, out *MachineSetSpec, s conversion.Scope) error { + return autoConvert_v1beta1_MachineSetSpec_To_v1alpha4_MachineSetSpec(in, out, s) +} + +func autoConvert_v1alpha4_MachineSetStatus_To_v1beta1_MachineSetStatus(in *MachineSetStatus, out *v1beta1.MachineSetStatus, s conversion.Scope) error { + out.Selector = in.Selector + out.Replicas = in.Replicas + out.FullyLabeledReplicas = in.FullyLabeledReplicas + out.ReadyReplicas = in.ReadyReplicas + out.AvailableReplicas = in.AvailableReplicas + out.ObservedGeneration = in.ObservedGeneration + out.FailureReason = (*errors.MachineSetStatusError)(unsafe.Pointer(in.FailureReason)) + out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) + return nil +} + +// Convert_v1alpha4_MachineSetStatus_To_v1beta1_MachineSetStatus is an autogenerated conversion function. +func Convert_v1alpha4_MachineSetStatus_To_v1beta1_MachineSetStatus(in *MachineSetStatus, out *v1beta1.MachineSetStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineSetStatus_To_v1beta1_MachineSetStatus(in, out, s) +} + +func autoConvert_v1beta1_MachineSetStatus_To_v1alpha4_MachineSetStatus(in *v1beta1.MachineSetStatus, out *MachineSetStatus, s conversion.Scope) error { + out.Selector = in.Selector + out.Replicas = in.Replicas + out.FullyLabeledReplicas = in.FullyLabeledReplicas + out.ReadyReplicas = in.ReadyReplicas + out.AvailableReplicas = in.AvailableReplicas + out.ObservedGeneration = in.ObservedGeneration + out.FailureReason = (*errors.MachineSetStatusError)(unsafe.Pointer(in.FailureReason)) + out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) + return nil +} + +// Convert_v1beta1_MachineSetStatus_To_v1alpha4_MachineSetStatus is an autogenerated conversion function. +func Convert_v1beta1_MachineSetStatus_To_v1alpha4_MachineSetStatus(in *v1beta1.MachineSetStatus, out *MachineSetStatus, s conversion.Scope) error { + return autoConvert_v1beta1_MachineSetStatus_To_v1alpha4_MachineSetStatus(in, out, s) +} + +func autoConvert_v1alpha4_MachineSpec_To_v1beta1_MachineSpec(in *MachineSpec, out *v1beta1.MachineSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + if err := Convert_v1alpha4_Bootstrap_To_v1beta1_Bootstrap(&in.Bootstrap, &out.Bootstrap, s); err != nil { + return err + } + out.InfrastructureRef = in.InfrastructureRef + out.Version = (*string)(unsafe.Pointer(in.Version)) + out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) + out.FailureDomain = (*string)(unsafe.Pointer(in.FailureDomain)) + out.NodeDrainTimeout = (*metav1.Duration)(unsafe.Pointer(in.NodeDrainTimeout)) + return nil +} + +// Convert_v1alpha4_MachineSpec_To_v1beta1_MachineSpec is an autogenerated conversion function. +func Convert_v1alpha4_MachineSpec_To_v1beta1_MachineSpec(in *MachineSpec, out *v1beta1.MachineSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineSpec_To_v1beta1_MachineSpec(in, out, s) +} + +func autoConvert_v1beta1_MachineSpec_To_v1alpha4_MachineSpec(in *v1beta1.MachineSpec, out *MachineSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + if err := Convert_v1beta1_Bootstrap_To_v1alpha4_Bootstrap(&in.Bootstrap, &out.Bootstrap, s); err != nil { + return err + } + out.InfrastructureRef = in.InfrastructureRef + out.Version = (*string)(unsafe.Pointer(in.Version)) + out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) + out.FailureDomain = (*string)(unsafe.Pointer(in.FailureDomain)) + out.NodeDrainTimeout = (*metav1.Duration)(unsafe.Pointer(in.NodeDrainTimeout)) + return nil +} + +// Convert_v1beta1_MachineSpec_To_v1alpha4_MachineSpec is an autogenerated conversion function. +func Convert_v1beta1_MachineSpec_To_v1alpha4_MachineSpec(in *v1beta1.MachineSpec, out *MachineSpec, s conversion.Scope) error { + return autoConvert_v1beta1_MachineSpec_To_v1alpha4_MachineSpec(in, out, s) +} + +func autoConvert_v1alpha4_MachineStatus_To_v1beta1_MachineStatus(in *MachineStatus, out *v1beta1.MachineStatus, s conversion.Scope) error { + out.NodeRef = (*v1.ObjectReference)(unsafe.Pointer(in.NodeRef)) + out.NodeInfo = (*v1.NodeSystemInfo)(unsafe.Pointer(in.NodeInfo)) + out.LastUpdated = (*metav1.Time)(unsafe.Pointer(in.LastUpdated)) + out.Version = (*string)(unsafe.Pointer(in.Version)) + out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) + out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) + out.Addresses = *(*v1beta1.MachineAddresses)(unsafe.Pointer(&in.Addresses)) + out.Phase = in.Phase + out.BootstrapReady = in.BootstrapReady + out.InfrastructureReady = in.InfrastructureReady + out.ObservedGeneration = in.ObservedGeneration + out.Conditions = *(*v1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1alpha4_MachineStatus_To_v1beta1_MachineStatus is an autogenerated conversion function. +func Convert_v1alpha4_MachineStatus_To_v1beta1_MachineStatus(in *MachineStatus, out *v1beta1.MachineStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineStatus_To_v1beta1_MachineStatus(in, out, s) +} + +func autoConvert_v1beta1_MachineStatus_To_v1alpha4_MachineStatus(in *v1beta1.MachineStatus, out *MachineStatus, s conversion.Scope) error { + out.NodeRef = (*v1.ObjectReference)(unsafe.Pointer(in.NodeRef)) + out.NodeInfo = (*v1.NodeSystemInfo)(unsafe.Pointer(in.NodeInfo)) + out.LastUpdated = (*metav1.Time)(unsafe.Pointer(in.LastUpdated)) + out.Version = (*string)(unsafe.Pointer(in.Version)) + out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) + out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) + out.Addresses = *(*MachineAddresses)(unsafe.Pointer(&in.Addresses)) + out.Phase = in.Phase + out.BootstrapReady = in.BootstrapReady + out.InfrastructureReady = in.InfrastructureReady + out.ObservedGeneration = in.ObservedGeneration + out.Conditions = *(*Conditions)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1beta1_MachineStatus_To_v1alpha4_MachineStatus is an autogenerated conversion function. +func Convert_v1beta1_MachineStatus_To_v1alpha4_MachineStatus(in *v1beta1.MachineStatus, out *MachineStatus, s conversion.Scope) error { + return autoConvert_v1beta1_MachineStatus_To_v1alpha4_MachineStatus(in, out, s) +} + +func autoConvert_v1alpha4_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(in *MachineTemplateSpec, out *v1beta1.MachineTemplateSpec, s conversion.Scope) error { + if err := Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_v1alpha4_MachineSpec_To_v1beta1_MachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec is an autogenerated conversion function. +func Convert_v1alpha4_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(in *MachineTemplateSpec, out *v1beta1.MachineTemplateSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(in, out, s) +} + +func autoConvert_v1beta1_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(in *v1beta1.MachineTemplateSpec, out *MachineTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + if err := Convert_v1beta1_MachineSpec_To_v1alpha4_MachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec is an autogenerated conversion function. +func Convert_v1beta1_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(in *v1beta1.MachineTemplateSpec, out *MachineTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta1_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(in, out, s) +} + +func autoConvert_v1alpha4_NetworkRanges_To_v1beta1_NetworkRanges(in *NetworkRanges, out *v1beta1.NetworkRanges, s conversion.Scope) error { + out.CIDRBlocks = *(*[]string)(unsafe.Pointer(&in.CIDRBlocks)) + return nil +} + +// Convert_v1alpha4_NetworkRanges_To_v1beta1_NetworkRanges is an autogenerated conversion function. +func Convert_v1alpha4_NetworkRanges_To_v1beta1_NetworkRanges(in *NetworkRanges, out *v1beta1.NetworkRanges, s conversion.Scope) error { + return autoConvert_v1alpha4_NetworkRanges_To_v1beta1_NetworkRanges(in, out, s) +} + +func autoConvert_v1beta1_NetworkRanges_To_v1alpha4_NetworkRanges(in *v1beta1.NetworkRanges, out *NetworkRanges, s conversion.Scope) error { + out.CIDRBlocks = *(*[]string)(unsafe.Pointer(&in.CIDRBlocks)) + return nil +} + +// Convert_v1beta1_NetworkRanges_To_v1alpha4_NetworkRanges is an autogenerated conversion function. +func Convert_v1beta1_NetworkRanges_To_v1alpha4_NetworkRanges(in *v1beta1.NetworkRanges, out *NetworkRanges, s conversion.Scope) error { + return autoConvert_v1beta1_NetworkRanges_To_v1alpha4_NetworkRanges(in, out, s) +} + +func autoConvert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(in *ObjectMeta, out *v1beta1.ObjectMeta, s conversion.Scope) error { + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + return nil +} + +// Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta is an autogenerated conversion function. +func Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(in *ObjectMeta, out *v1beta1.ObjectMeta, s conversion.Scope) error { + return autoConvert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(in, out, s) +} + +func autoConvert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(in *v1beta1.ObjectMeta, out *ObjectMeta, s conversion.Scope) error { + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + return nil +} + +// Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta is an autogenerated conversion function. +func Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(in *v1beta1.ObjectMeta, out *ObjectMeta, s conversion.Scope) error { + return autoConvert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(in, out, s) +} + +func autoConvert_v1alpha4_Topology_To_v1beta1_Topology(in *Topology, out *v1beta1.Topology, s conversion.Scope) error { + out.Class = in.Class + out.Version = in.Version + out.RolloutAfter = (*metav1.Time)(unsafe.Pointer(in.RolloutAfter)) + if err := Convert_v1alpha4_ControlPlaneTopology_To_v1beta1_ControlPlaneTopology(&in.ControlPlane, &out.ControlPlane, s); err != nil { + return err + } + out.Workers = (*v1beta1.WorkersTopology)(unsafe.Pointer(in.Workers)) + return nil +} + +// Convert_v1alpha4_Topology_To_v1beta1_Topology is an autogenerated conversion function. +func Convert_v1alpha4_Topology_To_v1beta1_Topology(in *Topology, out *v1beta1.Topology, s conversion.Scope) error { + return autoConvert_v1alpha4_Topology_To_v1beta1_Topology(in, out, s) +} + +func autoConvert_v1beta1_Topology_To_v1alpha4_Topology(in *v1beta1.Topology, out *Topology, s conversion.Scope) error { + out.Class = in.Class + out.Version = in.Version + out.RolloutAfter = (*metav1.Time)(unsafe.Pointer(in.RolloutAfter)) + if err := Convert_v1beta1_ControlPlaneTopology_To_v1alpha4_ControlPlaneTopology(&in.ControlPlane, &out.ControlPlane, s); err != nil { + return err + } + out.Workers = (*WorkersTopology)(unsafe.Pointer(in.Workers)) + return nil +} + +// Convert_v1beta1_Topology_To_v1alpha4_Topology is an autogenerated conversion function. +func Convert_v1beta1_Topology_To_v1alpha4_Topology(in *v1beta1.Topology, out *Topology, s conversion.Scope) error { + return autoConvert_v1beta1_Topology_To_v1alpha4_Topology(in, out, s) +} + +func autoConvert_v1alpha4_UnhealthyCondition_To_v1beta1_UnhealthyCondition(in *UnhealthyCondition, out *v1beta1.UnhealthyCondition, s conversion.Scope) error { + out.Type = v1.NodeConditionType(in.Type) + out.Status = v1.ConditionStatus(in.Status) + out.Timeout = in.Timeout + return nil +} + +// Convert_v1alpha4_UnhealthyCondition_To_v1beta1_UnhealthyCondition is an autogenerated conversion function. +func Convert_v1alpha4_UnhealthyCondition_To_v1beta1_UnhealthyCondition(in *UnhealthyCondition, out *v1beta1.UnhealthyCondition, s conversion.Scope) error { + return autoConvert_v1alpha4_UnhealthyCondition_To_v1beta1_UnhealthyCondition(in, out, s) +} + +func autoConvert_v1beta1_UnhealthyCondition_To_v1alpha4_UnhealthyCondition(in *v1beta1.UnhealthyCondition, out *UnhealthyCondition, s conversion.Scope) error { + out.Type = v1.NodeConditionType(in.Type) + out.Status = v1.ConditionStatus(in.Status) + out.Timeout = in.Timeout + return nil +} + +// Convert_v1beta1_UnhealthyCondition_To_v1alpha4_UnhealthyCondition is an autogenerated conversion function. +func Convert_v1beta1_UnhealthyCondition_To_v1alpha4_UnhealthyCondition(in *v1beta1.UnhealthyCondition, out *UnhealthyCondition, s conversion.Scope) error { + return autoConvert_v1beta1_UnhealthyCondition_To_v1alpha4_UnhealthyCondition(in, out, s) +} + +func autoConvert_v1alpha4_WorkersClass_To_v1beta1_WorkersClass(in *WorkersClass, out *v1beta1.WorkersClass, s conversion.Scope) error { + out.MachineDeployments = *(*[]v1beta1.MachineDeploymentClass)(unsafe.Pointer(&in.MachineDeployments)) + return nil +} + +// Convert_v1alpha4_WorkersClass_To_v1beta1_WorkersClass is an autogenerated conversion function. +func Convert_v1alpha4_WorkersClass_To_v1beta1_WorkersClass(in *WorkersClass, out *v1beta1.WorkersClass, s conversion.Scope) error { + return autoConvert_v1alpha4_WorkersClass_To_v1beta1_WorkersClass(in, out, s) +} + +func autoConvert_v1beta1_WorkersClass_To_v1alpha4_WorkersClass(in *v1beta1.WorkersClass, out *WorkersClass, s conversion.Scope) error { + out.MachineDeployments = *(*[]MachineDeploymentClass)(unsafe.Pointer(&in.MachineDeployments)) + return nil +} + +// Convert_v1beta1_WorkersClass_To_v1alpha4_WorkersClass is an autogenerated conversion function. +func Convert_v1beta1_WorkersClass_To_v1alpha4_WorkersClass(in *v1beta1.WorkersClass, out *WorkersClass, s conversion.Scope) error { + return autoConvert_v1beta1_WorkersClass_To_v1alpha4_WorkersClass(in, out, s) +} + +func autoConvert_v1alpha4_WorkersTopology_To_v1beta1_WorkersTopology(in *WorkersTopology, out *v1beta1.WorkersTopology, s conversion.Scope) error { + out.MachineDeployments = *(*[]v1beta1.MachineDeploymentTopology)(unsafe.Pointer(&in.MachineDeployments)) + return nil +} + +// Convert_v1alpha4_WorkersTopology_To_v1beta1_WorkersTopology is an autogenerated conversion function. +func Convert_v1alpha4_WorkersTopology_To_v1beta1_WorkersTopology(in *WorkersTopology, out *v1beta1.WorkersTopology, s conversion.Scope) error { + return autoConvert_v1alpha4_WorkersTopology_To_v1beta1_WorkersTopology(in, out, s) +} + +func autoConvert_v1beta1_WorkersTopology_To_v1alpha4_WorkersTopology(in *v1beta1.WorkersTopology, out *WorkersTopology, s conversion.Scope) error { + out.MachineDeployments = *(*[]MachineDeploymentTopology)(unsafe.Pointer(&in.MachineDeployments)) + return nil +} + +// Convert_v1beta1_WorkersTopology_To_v1alpha4_WorkersTopology is an autogenerated conversion function. +func Convert_v1beta1_WorkersTopology_To_v1alpha4_WorkersTopology(in *v1beta1.WorkersTopology, out *WorkersTopology, s conversion.Scope) error { + return autoConvert_v1beta1_WorkersTopology_To_v1alpha4_WorkersTopology(in, out, s) +} diff --git a/api/v1beta1/cluster_phase_types.go b/api/v1beta1/cluster_phase_types.go new file mode 100644 index 000000000000..afcd872456d6 --- /dev/null +++ b/api/v1beta1/cluster_phase_types.go @@ -0,0 +1,55 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 + +// ClusterPhase is a string representation of a Cluster Phase. +// +// This type is a high-level indicator of the status of the Cluster as it is provisioned, +// from the API user’s perspective. +// +// The value should not be interpreted by any software components as a reliable indication +// of the actual state of the Cluster, and controllers should not use the Cluster Phase field +// value when making decisions about what action to take. +// +// Controllers should always look at the actual state of the Cluster’s fields to make those decisions. +type ClusterPhase string + +const ( + // ClusterPhasePending is the first state a Cluster is assigned by + // Cluster API Cluster controller after being created. + ClusterPhasePending = ClusterPhase("Pending") + + // ClusterPhaseProvisioning is the state when the Cluster has a provider infrastructure + // object associated and can start provisioning. + ClusterPhaseProvisioning = ClusterPhase("Provisioning") + + // ClusterPhaseProvisioned is the state when its + // infrastructure has been created and configured. + ClusterPhaseProvisioned = ClusterPhase("Provisioned") + + // ClusterPhaseDeleting is the Cluster state when a delete + // request has been sent to the API Server, + // but its infrastructure has not yet been fully deleted. + ClusterPhaseDeleting = ClusterPhase("Deleting") + + // ClusterPhaseFailed is the Cluster state when the system + // might require user intervention. + ClusterPhaseFailed = ClusterPhase("Failed") + + // ClusterPhaseUnknown is returned if the Cluster state cannot be determined. + ClusterPhaseUnknown = ClusterPhase("Unknown") +) diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go new file mode 100644 index 000000000000..1279ed49bc7a --- /dev/null +++ b/api/v1beta1/cluster_types.go @@ -0,0 +1,435 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + "net" + "strings" + + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/utils/pointer" + + capierrors "sigs.k8s.io/cluster-api/errors" +) + +const ( + // ClusterFinalizer is the finalizer used by the cluster controller to + // cleanup the cluster resources when a Cluster is being deleted. + ClusterFinalizer = "cluster.cluster.x-k8s.io" +) + +// ANCHOR: ClusterSpec + +// ClusterSpec defines the desired state of Cluster. +type ClusterSpec struct { + // Paused can be used to prevent controllers from processing the Cluster and all its associated objects. + // +optional + Paused bool `json:"paused,omitempty"` + + // Cluster network configuration. + // +optional + ClusterNetwork *ClusterNetwork `json:"clusterNetwork,omitempty"` + + // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + // +optional + ControlPlaneEndpoint APIEndpoint `json:"controlPlaneEndpoint"` + + // ControlPlaneRef is an optional reference to a provider-specific resource that holds + // the details for provisioning the Control Plane for a Cluster. + // +optional + ControlPlaneRef *corev1.ObjectReference `json:"controlPlaneRef,omitempty"` + + // InfrastructureRef is a reference to a provider-specific resource that holds the details + // for provisioning infrastructure for a cluster in said provider. + // +optional + InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef,omitempty"` + + // This encapsulates the topology for the cluster. + // NOTE: It is required to enable the ClusterTopology + // feature gate flag to activate managed topologies support; + // this feature is highly experimental, and parts of it might still be not implemented. + // +optional + Topology *Topology `json:"topology,omitempty"` +} + +// Topology encapsulates the information of the managed resources. +type Topology struct { + // The name of the ClusterClass object to create the topology. + Class string `json:"class"` + + // The Kubernetes version of the cluster. + Version string `json:"version"` + + // RolloutAfter performs a rollout of the entire cluster one component at a time, + // control plane first and then machine deployments. + // +optional + RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"` + + // ControlPlane describes the cluster control plane. + // +optional + ControlPlane ControlPlaneTopology `json:"controlPlane"` + + // Workers encapsulates the different constructs that form the worker nodes + // for the cluster. + // +optional + Workers *WorkersTopology `json:"workers,omitempty"` +} + +// ControlPlaneTopology specifies the parameters for the control plane nodes in the cluster. +type ControlPlaneTopology struct { + // Metadata is the metadata applied to the machines of the ControlPlane. + // At runtime this metadata is merged with the corresponding metadata from the ClusterClass. + // + // This field is supported if and only if the control plane provider template + // referenced in the ClusterClass is Machine based. + Metadata ObjectMeta `json:"metadata,omitempty"` + + // Replicas is the number of control plane nodes. + // If the value is nil, the ControlPlane object is created without the number of Replicas + // and it's assumed that the control plane controller does not implement support for this field. + // When specified against a control plane provider that lacks support for this field, this value will be ignored. + // +optional + Replicas *int32 `json:"replicas,omitempty"` +} + +// WorkersTopology represents the different sets of worker nodes in the cluster. +type WorkersTopology struct { + // MachineDeployments is a list of machine deployments in the cluster. + MachineDeployments []MachineDeploymentTopology `json:"machineDeployments,omitempty"` +} + +// MachineDeploymentTopology specifies the different parameters for a set of worker nodes in the topology. +// This set of nodes is managed by a MachineDeployment object whose lifecycle is managed by the Cluster controller. +type MachineDeploymentTopology struct { + // Metadata is the metadata applied to the machines of the MachineDeployment. + // At runtime this metadata is merged with the corresponding metadata from the ClusterClass. + Metadata ObjectMeta `json:"metadata,omitempty"` + + // Class is the name of the MachineDeploymentClass used to create the set of worker nodes. + // This should match one of the deployment classes defined in the ClusterClass object + // mentioned in the `Cluster.Spec.Class` field. + Class string `json:"class"` + + // Name is the unique identifier for this MachineDeploymentTopology. + // The value is used with other unique identifiers to create a MachineDeployment's Name + // (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, + // the values are hashed together. + Name string `json:"name"` + + // Replicas is the number of worker nodes belonging to this set. + // If the value is nil, the MachineDeployment is created without the number of Replicas (defaulting to zero) + // and it's assumed that an external entity (like cluster autoscaler) is responsible for the management + // of this value. + // +optional + Replicas *int32 `json:"replicas,omitempty"` +} + +// ANCHOR_END: ClusterSpec + +// ANCHOR: ClusterNetwork + +// ClusterNetwork specifies the different networking +// parameters for a cluster. +type ClusterNetwork struct { + // APIServerPort specifies the port the API Server should bind to. + // Defaults to 6443. + // +optional + APIServerPort *int32 `json:"apiServerPort,omitempty"` + + // The network ranges from which service VIPs are allocated. + // +optional + Services *NetworkRanges `json:"services,omitempty"` + + // The network ranges from which Pod networks are allocated. + // +optional + Pods *NetworkRanges `json:"pods,omitempty"` + + // Domain name for services. + // +optional + ServiceDomain string `json:"serviceDomain,omitempty"` +} + +// ANCHOR_END: ClusterNetwork + +// ANCHOR: NetworkRanges + +// NetworkRanges represents ranges of network addresses. +type NetworkRanges struct { + CIDRBlocks []string `json:"cidrBlocks"` +} + +func (n *NetworkRanges) String() string { + if n == nil { + return "" + } + return strings.Join(n.CIDRBlocks, ",") +} + +// ANCHOR_END: NetworkRanges + +// ANCHOR: ClusterStatus + +// ClusterStatus defines the observed state of Cluster. +type ClusterStatus struct { + // FailureDomains is a slice of failure domain objects synced from the infrastructure provider. + FailureDomains FailureDomains `json:"failureDomains,omitempty"` + + // FailureReason indicates that there is a fatal problem reconciling the + // state, and will be set to a token value suitable for + // programmatic interpretation. + // +optional + FailureReason *capierrors.ClusterStatusError `json:"failureReason,omitempty"` + + // FailureMessage indicates that there is a fatal problem reconciling the + // state, and will be set to a descriptive error message. + // +optional + FailureMessage *string `json:"failureMessage,omitempty"` + + // Phase represents the current phase of cluster actuation. + // E.g. Pending, Running, Terminating, Failed etc. + // +optional + Phase string `json:"phase,omitempty"` + + // InfrastructureReady is the state of the infrastructure provider. + // +optional + InfrastructureReady bool `json:"infrastructureReady"` + + // ControlPlaneReady defines if the control plane is ready. + // +optional + ControlPlaneReady bool `json:"controlPlaneReady,omitempty"` + + // Conditions defines current service state of the cluster. + // +optional + Conditions Conditions `json:"conditions,omitempty"` + + // ObservedGeneration is the latest generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` +} + +// ANCHOR_END: ClusterStatus + +// SetTypedPhase sets the Phase field to the string representation of ClusterPhase. +func (c *ClusterStatus) SetTypedPhase(p ClusterPhase) { + c.Phase = string(p) +} + +// GetTypedPhase attempts to parse the Phase field and return +// the typed ClusterPhase representation as described in `machine_phase_types.go`. +func (c *ClusterStatus) GetTypedPhase() ClusterPhase { + switch phase := ClusterPhase(c.Phase); phase { + case + ClusterPhasePending, + ClusterPhaseProvisioning, + ClusterPhaseProvisioned, + ClusterPhaseDeleting, + ClusterPhaseFailed: + return phase + default: + return ClusterPhaseUnknown + } +} + +// ANCHOR: APIEndpoint + +// APIEndpoint represents a reachable Kubernetes API endpoint. +type APIEndpoint struct { + // The hostname on which the API server is serving. + Host string `json:"host"` + + // The port on which the API server is serving. + Port int32 `json:"port"` +} + +// IsZero returns true if both host and port are zero values. +func (v APIEndpoint) IsZero() bool { + return v.Host == "" && v.Port == 0 +} + +// IsValid returns true if both host and port are non-zero values. +func (v APIEndpoint) IsValid() bool { + return v.Host != "" && v.Port != 0 +} + +// String returns a formatted version HOST:PORT of this APIEndpoint. +func (v APIEndpoint) String() string { + return net.JoinHostPort(v.Host, fmt.Sprintf("%d", v.Port)) +} + +// ANCHOR_END: APIEndpoint + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=clusters,shortName=cl,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Cluster" +// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed" + +// Cluster is the Schema for the clusters API. +type Cluster struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterSpec `json:"spec,omitempty"` + Status ClusterStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (c *Cluster) GetConditions() Conditions { + return c.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (c *Cluster) SetConditions(conditions Conditions) { + c.Status.Conditions = conditions +} + +// GetIPFamily returns a ClusterIPFamily from the configuration provided. +func (c *Cluster) GetIPFamily() (ClusterIPFamily, error) { + var podCIDRs, serviceCIDRs []string + if c.Spec.ClusterNetwork != nil { + if c.Spec.ClusterNetwork.Pods != nil { + podCIDRs = c.Spec.ClusterNetwork.Pods.CIDRBlocks + } + if c.Spec.ClusterNetwork.Services != nil { + serviceCIDRs = c.Spec.ClusterNetwork.Services.CIDRBlocks + } + } + if len(podCIDRs) == 0 && len(serviceCIDRs) == 0 { + return IPv4IPFamily, nil + } + + podsIPFamily, err := ipFamilyForCIDRStrings(podCIDRs) + if err != nil { + return InvalidIPFamily, fmt.Errorf("pods: %s", err) + } + if len(serviceCIDRs) == 0 { + return podsIPFamily, nil + } + + servicesIPFamily, err := ipFamilyForCIDRStrings(serviceCIDRs) + if err != nil { + return InvalidIPFamily, fmt.Errorf("services: %s", err) + } + if len(podCIDRs) == 0 { + return servicesIPFamily, nil + } + + if podsIPFamily == DualStackIPFamily { + return DualStackIPFamily, nil + } else if podsIPFamily != servicesIPFamily { + return InvalidIPFamily, errors.New("pods and services IP family mismatch") + } + + return podsIPFamily, nil +} + +func ipFamilyForCIDRStrings(cidrs []string) (ClusterIPFamily, error) { + if len(cidrs) > 2 { + return InvalidIPFamily, errors.New("too many CIDRs specified") + } + var foundIPv4 bool + var foundIPv6 bool + for _, cidr := range cidrs { + ip, _, err := net.ParseCIDR(cidr) + if err != nil { + return InvalidIPFamily, fmt.Errorf("could not parse CIDR: %s", err) + } + if ip.To4() != nil { + foundIPv4 = true + } else { + foundIPv6 = true + } + } + switch { + case foundIPv4 && foundIPv6: + return DualStackIPFamily, nil + case foundIPv4: + return IPv4IPFamily, nil + case foundIPv6: + return IPv6IPFamily, nil + default: + return InvalidIPFamily, nil + } +} + +// ClusterIPFamily defines the types of supported IP families. +type ClusterIPFamily int + +// Define the ClusterIPFamily constants. +const ( + InvalidIPFamily ClusterIPFamily = iota + IPv4IPFamily + IPv6IPFamily + DualStackIPFamily +) + +func (f ClusterIPFamily) String() string { + return [...]string{"InvalidIPFamily", "IPv4IPFamily", "IPv6IPFamily", "DualStackIPFamily"}[f] +} + +// +kubebuilder:object:root=true + +// ClusterList contains a list of Cluster. +type ClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Cluster `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Cluster{}, &ClusterList{}) +} + +// FailureDomains is a slice of FailureDomains. +type FailureDomains map[string]FailureDomainSpec + +// FilterControlPlane returns a FailureDomain slice containing only the domains suitable to be used +// for control plane nodes. +func (in FailureDomains) FilterControlPlane() FailureDomains { + res := make(FailureDomains) + for id, spec := range in { + if spec.ControlPlane { + res[id] = spec + } + } + return res +} + +// GetIDs returns a slice containing the ids for failure domains. +func (in FailureDomains) GetIDs() []*string { + ids := make([]*string, 0, len(in)) + for id := range in { + ids = append(ids, pointer.StringPtr(id)) + } + return ids +} + +// FailureDomainSpec is the Schema for Cluster API failure domains. +// It allows controllers to understand how many failure domains a cluster can optionally span across. +type FailureDomainSpec struct { + // ControlPlane determines if this failure domain is suitable for use by control plane machines. + // +optional + ControlPlane bool `json:"controlPlane"` + + // Attributes is a free form map of attributes an infrastructure provider might use or require. + // +optional + Attributes map[string]string `json:"attributes,omitempty"` +} diff --git a/api/v1beta1/cluster_types_test.go b/api/v1beta1/cluster_types_test.go new file mode 100644 index 000000000000..e1893918f444 --- /dev/null +++ b/api/v1beta1/cluster_types_test.go @@ -0,0 +1,197 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 ( + "testing" + + . "github.com/onsi/gomega" +) + +func TestClusterIPFamily(t *testing.T) { + clusterWithNetwork := func(podCIDRs, serviceCIDRs []string) *Cluster { + return &Cluster{ + Spec: ClusterSpec{ + ClusterNetwork: &ClusterNetwork{ + Pods: &NetworkRanges{ + CIDRBlocks: podCIDRs, + }, + Services: &NetworkRanges{ + CIDRBlocks: serviceCIDRs, + }, + }, + }, + } + } + + validAndUnambiguous := []struct { + name string + expectRes ClusterIPFamily + c *Cluster + }{ + { + name: "pods: ipv4, services: ipv4", + expectRes: IPv4IPFamily, + c: clusterWithNetwork([]string{"192.168.0.0/16"}, []string{"10.128.0.0/12"}), + }, + { + name: "pods: ipv4, services: nil", + expectRes: IPv4IPFamily, + c: clusterWithNetwork([]string{"192.168.0.0/16"}, nil), + }, + { + name: "pods: ipv6, services: nil", + expectRes: IPv6IPFamily, + c: clusterWithNetwork([]string{"fd00:100:96::/48"}, nil), + }, + { + name: "pods: ipv6, services: ipv6", + expectRes: IPv6IPFamily, + c: clusterWithNetwork([]string{"fd00:100:96::/48"}, []string{"fd00:100:64::/108"}), + }, + { + name: "pods: dual-stack, services: nil", + expectRes: DualStackIPFamily, + c: clusterWithNetwork([]string{"192.168.0.0/16", "fd00:100:96::/48"}, nil), + }, + { + name: "pods: dual-stack, services: ipv4", + expectRes: DualStackIPFamily, + c: clusterWithNetwork([]string{"192.168.0.0/16", "fd00:100:96::/48"}, []string{"10.128.0.0/12"}), + }, + { + name: "pods: dual-stack, services: ipv6", + expectRes: DualStackIPFamily, + c: clusterWithNetwork([]string{"192.168.0.0/16", "fd00:100:96::/48"}, []string{"fd00:100:64::/108"}), + }, + { + name: "pods: dual-stack, services: dual-stack", + expectRes: DualStackIPFamily, + c: clusterWithNetwork([]string{"192.168.0.0/16", "fd00:100:96::/48"}, []string{"10.128.0.0/12", "fd00:100:64::/108"}), + }, + { + name: "pods: nil, services: dual-stack", + expectRes: DualStackIPFamily, + c: clusterWithNetwork(nil, []string{"10.128.0.0/12", "fd00:100:64::/108"}), + }, + } + + for _, tt := range validAndUnambiguous { + t.Run(tt.name, func(t *testing.T) { + g := NewWithT(t) + ipFamily, err := tt.c.GetIPFamily() + g.Expect(ipFamily).To(Equal(tt.expectRes)) + g.Expect(err).NotTo(HaveOccurred()) + }) + } + + validButAmbiguous := []struct { + name string + expectRes ClusterIPFamily + c *Cluster + }{ + { + name: "pods: nil, services: nil", + // this could be ipv4, ipv6, or dual-stack; assume ipv4 for now though + expectRes: IPv4IPFamily, + c: clusterWithNetwork(nil, nil), + }, + { + name: "pods: nil, services: ipv4", + // this could be a dual-stack; assume ipv4 for now though + expectRes: IPv4IPFamily, + c: clusterWithNetwork(nil, []string{"10.128.0.0/12"}), + }, + { + name: "pods: nil, services: ipv6", + // this could be dual-stack; assume ipv6 for now though + expectRes: IPv6IPFamily, + c: clusterWithNetwork(nil, []string{"fd00:100:64::/108"}), + }, + } + + for _, tt := range validButAmbiguous { + t.Run(tt.name, func(t *testing.T) { + g := NewWithT(t) + ipFamily, err := tt.c.GetIPFamily() + g.Expect(ipFamily).To(Equal(tt.expectRes)) + g.Expect(err).NotTo(HaveOccurred()) + }) + } + + invalid := []struct { + name string + expectErr string + c *Cluster + }{ + { + name: "pods: ipv4, services: ipv6", + expectErr: "pods and services IP family mismatch", + c: clusterWithNetwork([]string{"192.168.0.0/16"}, []string{"fd00:100:64::/108"}), + }, + { + name: "pods: ipv6, services: ipv4", + expectErr: "pods and services IP family mismatch", + c: clusterWithNetwork([]string{"fd00:100:96::/48"}, []string{"10.128.0.0/12"}), + }, + { + name: "pods: ipv6, services: dual-stack", + expectErr: "pods and services IP family mismatch", + c: clusterWithNetwork([]string{"fd00:100:96::/48"}, []string{"10.128.0.0/12", "fd00:100:64::/108"}), + }, + { + name: "pods: ipv4, services: dual-stack", + expectErr: "pods and services IP family mismatch", + c: clusterWithNetwork([]string{"192.168.0.0/16"}, []string{"10.128.0.0/12", "fd00:100:64::/108"}), + }, + { + name: "pods: ipv4, services: dual-stack", + expectErr: "pods and services IP family mismatch", + c: clusterWithNetwork([]string{"192.168.0.0/16"}, []string{"10.128.0.0/12", "fd00:100:64::/108"}), + }, + { + name: "pods: bad cidr", + expectErr: "pods: could not parse CIDR", + c: clusterWithNetwork([]string{"foo"}, nil), + }, + { + name: "services: bad cidr", + expectErr: "services: could not parse CIDR", + c: clusterWithNetwork([]string{"192.168.0.0/16"}, []string{"foo"}), + }, + { + name: "pods: too many cidrs", + expectErr: "pods: too many CIDRs specified", + c: clusterWithNetwork([]string{"192.168.0.0/16", "fd00:100:96::/48", "10.128.0.0/12"}, nil), + }, + { + name: "services: too many cidrs", + expectErr: "services: too many CIDRs specified", + c: clusterWithNetwork(nil, []string{"192.168.0.0/16", "fd00:100:96::/48", "10.128.0.0/12"}), + }, + } + + for _, tt := range invalid { + t.Run(tt.name, func(t *testing.T) { + g := NewWithT(t) + ipFamily, err := tt.c.GetIPFamily() + g.Expect(err).To(HaveOccurred()) + g.Expect(err).To(MatchError(ContainSubstring(tt.expectErr))) + g.Expect(ipFamily).To(Equal(InvalidIPFamily)) + }) + } +} diff --git a/api/v1alpha4/cluster_webhook.go b/api/v1beta1/cluster_webhook.go similarity index 92% rename from api/v1alpha4/cluster_webhook.go rename to api/v1beta1/cluster_webhook.go index ee76957dc3ac..240abe65eae5 100644 --- a/api/v1alpha4/cluster_webhook.go +++ b/api/v1beta1/cluster_webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -37,8 +37,8 @@ func (c *Cluster) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1alpha4-cluster,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=clusters,versions=v1alpha4,name=validation.cluster.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1alpha4-cluster,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=clusters,versions=v1alpha4,name=default.cluster.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1beta1-cluster,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=clusters,versions=v1beta1,name=validation.cluster.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1beta1-cluster,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=clusters,versions=v1beta1,name=default.cluster.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &Cluster{} var _ webhook.Validator = &Cluster{} diff --git a/api/v1alpha4/cluster_webhook_test.go b/api/v1beta1/cluster_webhook_test.go similarity index 99% rename from api/v1alpha4/cluster_webhook_test.go rename to api/v1beta1/cluster_webhook_test.go index 9f147b92e382..799041a82c4f 100644 --- a/api/v1alpha4/cluster_webhook_test.go +++ b/api/v1beta1/cluster_webhook_test.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/api/v1beta1/clusterclass_types.go b/api/v1beta1/clusterclass_types.go new file mode 100644 index 000000000000..60b1b861cd4e --- /dev/null +++ b/api/v1beta1/clusterclass_types.go @@ -0,0 +1,133 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" +) + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=clusterclasses,shortName=cc,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ClusterClass" + +// ClusterClass is a template which can be used to create managed topologies. +type ClusterClass struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterClassSpec `json:"spec,omitempty"` +} + +// ClusterClassSpec describes the desired state of the ClusterClass. +type ClusterClassSpec struct { + // Infrastructure is a reference to a provider-specific template that holds + // the details for provisioning infrastructure specific cluster + // for the underlying provider. + // The underlying provider is responsible for the implementation + // of the template to an infrastructure cluster. + Infrastructure LocalObjectTemplate `json:"infrastructure,omitempty"` + + // ControlPlane is a reference to a local struct that holds the details + // for provisioning the Control Plane for the Cluster. + ControlPlane ControlPlaneClass `json:"controlPlane,omitempty"` + + // Workers describes the worker nodes for the cluster. + // It is a collection of node types which can be used to create + // the worker nodes of the cluster. + // +optional + Workers WorkersClass `json:"workers,omitempty"` +} + +// ControlPlaneClass defines the class for the control plane. +type ControlPlaneClass struct { + // Metadata is the metadata applied to the machines of the ControlPlane. + // At runtime this metadata is merged with the corresponding metadata from the topology. + // + // This field is supported if and only if the control plane provider template + // referenced is Machine based. + Metadata ObjectMeta `json:"metadata,omitempty"` + + // LocalObjectTemplate contains the reference to the control plane provider. + LocalObjectTemplate `json:",inline"` + + // MachineTemplate defines the metadata and infrastructure information + // for control plane machines. + // + // This field is supported if and only if the control plane provider template + // referenced above is Machine based and supports setting replicas. + // + // +optional + MachineInfrastructure *LocalObjectTemplate `json:"machineInfrastructure,omitempty"` +} + +// WorkersClass is a collection of deployment classes. +type WorkersClass struct { + // MachineDeployments is a list of machine deployment classes that can be used to create + // a set of worker nodes. + MachineDeployments []MachineDeploymentClass `json:"machineDeployments,omitempty"` +} + +// MachineDeploymentClass serves as a template to define a set of worker nodes of the cluster +// provisioned using the `ClusterClass`. +type MachineDeploymentClass struct { + // Class denotes a type of worker node present in the cluster, + // this name MUST be unique within a ClusterClass and can be referenced + // in the Cluster to create a managed MachineDeployment. + Class string `json:"class"` + + // Template is a local struct containing a collection of templates for creation of + // MachineDeployment objects representing a set of worker nodes. + Template MachineDeploymentClassTemplate `json:"template"` +} + +// MachineDeploymentClassTemplate defines how a MachineDeployment generated from a MachineDeploymentClass +// should look like. +type MachineDeploymentClassTemplate struct { + // Metadata is the metadata applied to the machines of the MachineDeployment. + // At runtime this metadata is merged with the corresponding metadata from the topology. + Metadata ObjectMeta `json:"metadata,omitempty"` + + // Bootstrap contains the bootstrap template reference to be used + // for the creation of worker Machines. + Bootstrap LocalObjectTemplate `json:"bootstrap"` + + // Infrastructure contains the infrastructure template reference to be used + // for the creation of worker Machines. + Infrastructure LocalObjectTemplate `json:"infrastructure"` +} + +// LocalObjectTemplate defines a template for a topology Class. +type LocalObjectTemplate struct { + // Ref is a required reference to a custom resource + // offered by a provider. + Ref *corev1.ObjectReference `json:"ref"` +} + +// +kubebuilder:object:root=true + +// ClusterClassList contains a list of Cluster. +type ClusterClassList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterClass `json:"items"` +} + +func init() { + SchemeBuilder.Register(&ClusterClass{}, &ClusterClassList{}) +} diff --git a/api/v1alpha4/clusterclass_webhook.go b/api/v1beta1/clusterclass_webhook.go similarity index 95% rename from api/v1alpha4/clusterclass_webhook.go rename to api/v1beta1/clusterclass_webhook.go index 08f7ad7ffc64..9c4928c8dcd0 100644 --- a/api/v1alpha4/clusterclass_webhook.go +++ b/api/v1beta1/clusterclass_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -37,8 +37,8 @@ func (in *ClusterClass) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1alpha4-clusterclass,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=clusterclasses,versions=v1alpha4,name=validation.clusterclass.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1alpha4-clusterclass,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=clusterclasses,versions=v1alpha4,name=default.clusterclass.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1beta1-clusterclass,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=clusterclasses,versions=v1beta1,name=validation.clusterclass.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1beta1-clusterclass,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=clusterclasses,versions=v1beta1,name=default.clusterclass.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Validator = &ClusterClass{} var _ webhook.Defaulter = &ClusterClass{} diff --git a/api/v1alpha4/clusterclass_webhook_test.go b/api/v1beta1/clusterclass_webhook_test.go similarity index 99% rename from api/v1alpha4/clusterclass_webhook_test.go rename to api/v1beta1/clusterclass_webhook_test.go index f81997463634..1cef05d83509 100644 --- a/api/v1alpha4/clusterclass_webhook_test.go +++ b/api/v1beta1/clusterclass_webhook_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/api/v1beta1/common_types.go b/api/v1beta1/common_types.go new file mode 100644 index 000000000000..bb63c88a0518 --- /dev/null +++ b/api/v1beta1/common_types.go @@ -0,0 +1,188 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" +) + +const ( + // ClusterLabelName is the label set on machines linked to a cluster and + // external objects(bootstrap and infrastructure providers). + ClusterLabelName = "cluster.x-k8s.io/cluster-name" + + // ClusterTopologyLabelName is the label set on all the object which are managed as part of a ClusterTopology. + // Deprecated: use ClusterTopologyOwnedLabel instead. + ClusterTopologyLabelName = "cluster.x-k8s.io/topology" + + // ClusterTopologyOwnedLabel is the label set on all the object which are managed as part of a ClusterTopology. + ClusterTopologyOwnedLabel = "topology.cluster.x-k8s.io/owned" + + // ClusterTopologyMachineDeploymentLabelName is the label set on the generated MachineDeployment objects + // to track the name of the MachineDeployment topology it represents. + ClusterTopologyMachineDeploymentLabelName = "topology.cluster.x-k8s.io/deployment-name" + + // ProviderLabelName is the label set on components in the provider manifest. + // This label allows to easily identify all the components belonging to a provider; the clusterctl + // tool uses this label for implementing provider's lifecycle operations. + ProviderLabelName = "cluster.x-k8s.io/provider" + + // ClusterNameAnnotation is the annotation set on nodes identifying the name of the cluster the node belongs to. + ClusterNameAnnotation = "cluster.x-k8s.io/cluster-name" + + // ClusterNamespaceAnnotation is the annotation set on nodes identifying the namespace of the cluster the node belongs to. + ClusterNamespaceAnnotation = "cluster.x-k8s.io/cluster-namespace" + + // MachineAnnotation is the annotation set on nodes identifying the machine the node belongs to. + MachineAnnotation = "cluster.x-k8s.io/machine" + + // OwnerKindAnnotation is the annotation set on nodes identifying the owner kind. + OwnerKindAnnotation = "cluster.x-k8s.io/owner-kind" + + // OwnerNameAnnotation is the annotation set on nodes identifying the owner name. + OwnerNameAnnotation = "cluster.x-k8s.io/owner-name" + + // PausedAnnotation is an annotation that can be applied to any Cluster API + // object to prevent a controller from processing a resource. + // + // Controllers working with Cluster API objects must check the existence of this annotation + // on the reconciled object. + PausedAnnotation = "cluster.x-k8s.io/paused" + + // DisableMachineCreate is an annotation that can be used to signal a MachineSet to stop creating new machines. + // It is utilized in the OnDelete MachineDeploymentStrategy to allow the MachineDeployment controller to scale down + // older MachineSets when Machines are deleted and add the new replicas to the latest MachineSet. + DisableMachineCreate = "cluster.x-k8s.io/disable-machine-create" + + // WatchLabel is a label othat can be applied to any Cluster API object. + // + // Controllers which allow for selective reconciliation may check this label and proceed + // with reconciliation of the object only if this label and a configured value is present. + WatchLabel = "cluster.x-k8s.io/watch-filter" + + // DeleteMachineAnnotation marks control plane and worker nodes that will be given priority for deletion + // when KCP or a machineset scales down. This annotation is given top priority on all delete policies. + DeleteMachineAnnotation = "cluster.x-k8s.io/delete-machine" + + // TemplateClonedFromNameAnnotation is the infrastructure machine annotation that stores the name of the infrastructure template resource + // that was cloned for the machine. This annotation is set only during cloning a template. Older/adopted machines will not have this annotation. + TemplateClonedFromNameAnnotation = "cluster.x-k8s.io/cloned-from-name" + + // TemplateClonedFromGroupKindAnnotation is the infrastructure machine annotation that stores the group-kind of the infrastructure template resource + // that was cloned for the machine. This annotation is set only during cloning a template. Older/adopted machines will not have this annotation. + TemplateClonedFromGroupKindAnnotation = "cluster.x-k8s.io/cloned-from-groupkind" + + // MachineSkipRemediationAnnotation is the annotation used to mark the machines that should not be considered for remediation by MachineHealthCheck reconciler. + MachineSkipRemediationAnnotation = "cluster.x-k8s.io/skip-remediation" + + // ClusterSecretType defines the type of secret created by core components. + ClusterSecretType corev1.SecretType = "cluster.x-k8s.io/secret" //nolint:gosec + + // InterruptibleLabel is the label used to mark the nodes that run on interruptible instances. + InterruptibleLabel = "cluster.x-k8s.io/interruptible" + + // ManagedByAnnotation is an annotation that can be applied to InfraCluster resources to signify that + // some external system is managing the cluster infrastructure. + // + // Provider InfraCluster controllers will ignore resources with this annotation. + // An external controller must fulfill the contract of the InfraCluster resource. + // External infrastructure providers should ensure that the annotation, once set, cannot be removed. + ManagedByAnnotation = "cluster.x-k8s.io/managed-by" +) + +const ( + // TemplateSuffix is the object kind suffix used by template types. + TemplateSuffix = "Template" +) + +var ( + // ZeroDuration is a zero value of the metav1.Duration type. + ZeroDuration = metav1.Duration{} +) + +const ( + // MachineNodeNameIndex is used by the Machine Controller to index Machines by Node name, and add a watch on Nodes. + // Deprecated: Use api/v1beta1/index.MachineNodeNameField instead. + MachineNodeNameIndex = "status.nodeRef.name" + + // MachineProviderIDIndex is used to index Machines by ProviderID. It's useful to find Machines + // in a management cluster from Nodes in a workload cluster. + // Deprecated: Use api/v1beta1/index.MachineProviderIDField instead. + MachineProviderIDIndex = "spec.providerID" +) + +// MachineAddressType describes a valid MachineAddress type. +type MachineAddressType string + +// Define the MachineAddressType constants. +const ( + MachineHostName MachineAddressType = "Hostname" + MachineExternalIP MachineAddressType = "ExternalIP" + MachineInternalIP MachineAddressType = "InternalIP" + MachineExternalDNS MachineAddressType = "ExternalDNS" + MachineInternalDNS MachineAddressType = "InternalDNS" +) + +// MachineAddress contains information for the node's address. +type MachineAddress struct { + // Machine address type, one of Hostname, ExternalIP or InternalIP. + Type MachineAddressType `json:"type"` + + // The machine address. + Address string `json:"address"` +} + +// MachineAddresses is a slice of MachineAddress items to be used by infrastructure providers. +type MachineAddresses []MachineAddress + +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. This is a copy of customizable fields from metav1.ObjectMeta. +// +// ObjectMeta is embedded in `Machine.Spec`, `MachineDeployment.Template` and `MachineSet.Template`, +// which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases +// and read-only fields which end up in the generated CRD validation, having it as a subset simplifies +// the API and some issues that can impact user experience. +// +// During the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054) +// for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, +// specifically `spec.metadata.creationTimestamp in body must be of type string: "null"`. +// The investigation showed that `controller-tools@v2` behaves differently than its previous version +// when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1) package. +// +// In more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta` +// had validation properties, including for `creationTimestamp` (metav1.Time). +// The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null` +// which breaks validation because the field isn't marked as nullable. +// +// In future versions, controller-tools@v2 might allow overriding the type and validation for embedded +// types. When that happens, this hack should be revisited. +type ObjectMeta struct { + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + Labels map[string]string `json:"labels,omitempty"` + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + Annotations map[string]string `json:"annotations,omitempty"` +} diff --git a/api/v1beta1/condition_consts.go b/api/v1beta1/condition_consts.go new file mode 100644 index 000000000000..d4e6799c935d --- /dev/null +++ b/api/v1beta1/condition_consts.go @@ -0,0 +1,220 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 + +// ANCHOR: CommonConditions + +// Common ConditionTypes used by Cluster API objects. +const ( + // ReadyCondition defines the Ready condition type that summarizes the operational state of a Cluster API object. + ReadyCondition ConditionType = "Ready" +) + +// Common ConditionReason used by Cluster API objects. +const ( + // DeletingReason (Severity=Info) documents an condition not in Status=True because the underlying object it is currently being deleted. + DeletingReason = "Deleting" + + // DeletionFailedReason (Severity=Warning) documents an condition not in Status=True because the underlying object + // encountered problems during deletion. This is a warning because the reconciler will retry deletion. + DeletionFailedReason = "DeletionFailed" + + // DeletedReason (Severity=Info) documents an condition not in Status=True because the underlying object was deleted. + DeletedReason = "Deleted" + + // IncorrectExternalRefReason (Severity=Error) documents a CAPI object with an incorrect external object reference. + IncorrectExternalRefReason = "IncorrectExternalRef" +) + +const ( + // InfrastructureReadyCondition reports a summary of current status of the infrastructure object defined for this cluster/machine/machinepool. + // This condition is mirrored from the Ready condition in the infrastructure ref object, and + // the absence of this condition might signal problems in the reconcile external loops or the fact that + // the infrastructure provider does not implement the Ready condition yet. + InfrastructureReadyCondition ConditionType = "InfrastructureReady" + + // WaitingForInfrastructureFallbackReason (Severity=Info) documents a cluster/machine/machinepool waiting for the underlying infrastructure + // to be available. + // NOTE: This reason is used only as a fallback when the infrastructure object is not reporting its own ready condition. + WaitingForInfrastructureFallbackReason = "WaitingForInfrastructure" +) + +// ANCHOR_END: CommonConditions + +// Conditions and condition Reasons for the Cluster object + +const ( + // ControlPlaneInitializedCondition reports if the cluster's control plane has been initialized such that the + // cluster's apiserver is reachable and at least one control plane Machine has a node reference. Once this + // condition is marked true, its value is never changed. See the ControlPlaneReady condition for an indication of + // the current readiness of the cluster's control plane. + ControlPlaneInitializedCondition ConditionType = "ControlPlaneInitialized" + + // MissingNodeRefReason (Severity=Info) documents a cluster waiting for at least one control plane Machine to have + // its node reference populated. + MissingNodeRefReason = "MissingNodeRef" + + // WaitingForControlPlaneProviderInitializedReason (Severity=Info) documents a cluster waiting for the control plane + // provider to report successful control plane initialization. + WaitingForControlPlaneProviderInitializedReason = "WaitingForControlPlaneProviderInitialized" + + // ControlPlaneReadyCondition reports the ready condition from the control plane object defined for this cluster. + // This condition is mirrored from the Ready condition in the control plane ref object, and + // the absence of this condition might signal problems in the reconcile external loops or the fact that + // the control plane provider does not not implements the Ready condition yet. + ControlPlaneReadyCondition ConditionType = "ControlPlaneReady" + + // WaitingForControlPlaneFallbackReason (Severity=Info) documents a cluster waiting for the control plane + // to be available. + // NOTE: This reason is used only as a fallback when the control plane object is not reporting its own ready condition. + WaitingForControlPlaneFallbackReason = "WaitingForControlPlane" + + // WaitingForControlPlaneAvailableReason (Severity=Info) documents a Cluster API object + // waiting for the control plane machine to be available. + // + // NOTE: Having the control plane machine available is a pre-condition for joining additional control planes + // or workers nodes. + WaitingForControlPlaneAvailableReason = "WaitingForControlPlaneAvailable" +) + +// Conditions and condition Reasons for the Machine object + +const ( + // BootstrapReadyCondition reports a summary of current status of the bootstrap object defined for this machine. + // This condition is mirrored from the Ready condition in the bootstrap ref object, and + // the absence of this condition might signal problems in the reconcile external loops or the fact that + // the bootstrap provider does not implement the Ready condition yet. + BootstrapReadyCondition ConditionType = "BootstrapReady" + + // WaitingForDataSecretFallbackReason (Severity=Info) documents a machine waiting for the bootstrap data secret + // to be available. + // NOTE: This reason is used only as a fallback when the bootstrap object is not reporting its own ready condition. + WaitingForDataSecretFallbackReason = "WaitingForDataSecret" + + // DrainingSucceededCondition provide evidence of the status of the node drain operation which happens during the machine + // deletion process. + DrainingSucceededCondition ConditionType = "DrainingSucceeded" + + // DrainingReason (Severity=Info) documents a machine node being drained. + DrainingReason = "Draining" + + // DrainingFailedReason (Severity=Warning) documents a machine node drain operation failed. + DrainingFailedReason = "DrainingFailed" + + // PreDrainDeleteHookSucceededCondition reports a machine waiting for a PreDrainDeleteHook before being delete. + PreDrainDeleteHookSucceededCondition ConditionType = "PreDrainDeleteHookSucceeded" + + // PreTerminateDeleteHookSucceededCondition reports a machine waiting for a PreDrainDeleteHook before being delete. + PreTerminateDeleteHookSucceededCondition ConditionType = "PreTerminateDeleteHookSucceeded" + + // WaitingExternalHookReason (Severity=Info) provide evidence that we are waiting for an external hook to complete. + WaitingExternalHookReason = "WaitingExternalHook" + + // VolumeDetachSucceededCondition reports a machine waiting for volumes to be detached. + VolumeDetachSucceededCondition ConditionType = "VolumeDetachSucceeded" + + // WaitingForVolumeDetachReason (Severity=Info) provide evidence that a machine node waiting for volumes to be attached. + WaitingForVolumeDetachReason = "WaitingForVolumeDetach" +) + +const ( + // MachineHealthCheckSuccededCondition is set on machines that have passed a healthcheck by the MachineHealthCheck controller. + // In the event that the health check fails it will be set to False. + MachineHealthCheckSuccededCondition ConditionType = "HealthCheckSucceeded" + + // MachineHasFailureReason is the reason used when a machine has either a FailureReason or a FailureMessage set on its status. + MachineHasFailureReason = "MachineHasFailure" + + // NodeStartupTimeoutReason is the reason used when a machine's node does not appear within the specified timeout. + NodeStartupTimeoutReason = "NodeStartupTimeout" + + // UnhealthyNodeConditionReason is the reason used when a machine's node has one of the MachineHealthCheck's unhealthy conditions. + UnhealthyNodeConditionReason = "UnhealthyNode" +) + +const ( + // MachineOwnerRemediatedCondition is set on machines that have failed a healthcheck by the MachineHealthCheck controller. + // MachineOwnerRemediatedCondition is set to False after a health check fails, but should be changed to True by the owning controller after remediation succeeds. + MachineOwnerRemediatedCondition ConditionType = "OwnerRemediated" + + // WaitingForRemediationReason is the reason used when a machine fails a health check and remediation is needed. + WaitingForRemediationReason = "WaitingForRemediation" + + // RemediationFailedReason is the reason used when a remediation owner fails to remediate an unhealthy machine. + RemediationFailedReason = "RemediationFailed" + + // RemediationInProgressReason is the reason used when an unhealthy machine is being remediated by the remediation owner. + RemediationInProgressReason = "RemediationInProgress" + + // ExternalRemediationTemplateAvailable is set on machinehealthchecks when MachineHealthCheck controller uses external remediation. + // ExternalRemediationTemplateAvailable is set to false if external remediation template is not found. + ExternalRemediationTemplateAvailable ConditionType = "ExternalRemediationTemplateAvailable" + + // ExternalRemediationTemplateNotFound is the reason used when a machine health check fails to find external remediation template. + ExternalRemediationTemplateNotFound = "ExternalRemediationTemplateNotFound" + + // ExternalRemediationRequestAvailable is set on machinehealthchecks when MachineHealthCheck controller uses external remediation. + // ExternalRemediationRequestAvailable is set to false if creating external remediation request fails. + ExternalRemediationRequestAvailable ConditionType = "ExternalRemediationRequestAvailable" + + // ExternalRemediationRequestCreationFailed is the reason used when a machine health check fails to create external remediation request. + ExternalRemediationRequestCreationFailed = "ExternalRemediationRequestCreationFailed" +) + +// Conditions and condition Reasons for the Machine's Node object. +const ( + // MachineNodeHealthyCondition provides info about the operational state of the Kubernetes node hosted on the machine by summarizing node conditions. + // If the conditions defined in a Kubernetes node (i.e., NodeReady, NodeMemoryPressure, NodeDiskPressure, NodePIDPressure, and NodeNetworkUnavailable) are in a healthy state, it will be set to True. + MachineNodeHealthyCondition ConditionType = "NodeHealthy" + + // WaitingForNodeRefReason (Severity=Info) documents a machine.spec.providerId is not assigned yet. + WaitingForNodeRefReason = "WaitingForNodeRef" + + // NodeProvisioningReason (Severity=Info) documents machine in the process of provisioning a node. + // NB. provisioning --> NodeRef == "". + NodeProvisioningReason = "NodeProvisioning" + + // NodeNotFoundReason (Severity=Error) documents a machine's node has previously been observed but is now gone. + // NB. provisioned --> NodeRef != "". + NodeNotFoundReason = "NodeNotFound" + + // NodeConditionsFailedReason (Severity=Warning) documents a node is not in a healthy state due to the failed state of at least 1 Kubelet condition. + NodeConditionsFailedReason = "NodeConditionsFailed" +) + +// Conditions and condition Reasons for the MachineHealthCheck object + +const ( + // RemediationAllowedCondition is set on MachineHealthChecks to show the status of whether the MachineHealthCheck is + // allowed to remediate any Machines or whether it is blocked from remediating any further. + RemediationAllowedCondition ConditionType = "RemediationAllowed" + + // TooManyUnhealthyReason is the reason used when too many Machines are unhealthy and the MachineHealthCheck is blocked + // from making any further remediations. + TooManyUnhealthyReason = "TooManyUnhealthy" +) + +// Conditions and condition Reasons for MachineDeployments + +const ( + // MachineDeploymentAvailableCondition means the MachineDeployment is available, that is, at least the minimum available + // machines required (i.e. Spec.Replicas-MaxUnavailable when MachineDeploymentStrategyType = RollingUpdate) are up and running for at least minReadySeconds. + MachineDeploymentAvailableCondition ConditionType = "Available" + + // WaitingForAvailableMachinesReason (Severity=Warning) reflects the fact that the required minimum number of machines for a machinedeployment are not available. + WaitingForAvailableMachinesReason = "WaitingForAvailableMachines" +) diff --git a/api/v1beta1/condition_types.go b/api/v1beta1/condition_types.go new file mode 100644 index 000000000000..40f0660acae8 --- /dev/null +++ b/api/v1beta1/condition_types.go @@ -0,0 +1,97 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" +) + +// ANCHOR: ConditionSeverity + +// ConditionSeverity expresses the severity of a Condition Type failing. +type ConditionSeverity string + +const ( + // ConditionSeverityError specifies that a condition with `Status=False` is an error. + ConditionSeverityError ConditionSeverity = "Error" + + // ConditionSeverityWarning specifies that a condition with `Status=False` is a warning. + ConditionSeverityWarning ConditionSeverity = "Warning" + + // ConditionSeverityInfo specifies that a condition with `Status=False` is informative. + ConditionSeverityInfo ConditionSeverity = "Info" + + // ConditionSeverityNone should apply only to conditions with `Status=True`. + ConditionSeverityNone ConditionSeverity = "" +) + +// ANCHOR_END: ConditionSeverity + +// ANCHOR: ConditionType + +// ConditionType is a valid value for Condition.Type. +type ConditionType string + +// ANCHOR_END: ConditionType + +// ANCHOR: Condition + +// Condition defines an observation of a Cluster API resource operational state. +type Condition struct { + // Type of condition in CamelCase or in foo.example.com/CamelCase. + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + // can be useful (see .node.status.conditions), the ability to deconflict is important. + // +required + Type ConditionType `json:"type"` + + // Status of the condition, one of True, False, Unknown. + // +required + Status corev1.ConditionStatus `json:"status"` + + // Severity provides an explicit classification of Reason code, so the users or machines can immediately + // understand the current situation and act accordingly. + // The Severity field MUST be set only when Status=False. + // +optional + Severity ConditionSeverity `json:"severity,omitempty"` + + // Last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when + // the API field changed is acceptable. + // +required + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + + // The reason for the condition's last transition in CamelCase. + // The specific API may choose whether or not this field is considered a guaranteed API. + // This field may not be empty. + // +optional + Reason string `json:"reason,omitempty"` + + // A human readable message indicating details about the transition. + // This field may be empty. + // +optional + Message string `json:"message,omitempty"` +} + +// ANCHOR_END: Condition + +// ANCHOR: Conditions + +// Conditions provide observations of the operational state of a Cluster API resource. +type Conditions []Condition + +// ANCHOR_END: Conditions diff --git a/api/v1beta1/conversion.go b/api/v1beta1/conversion.go new file mode 100644 index 000000000000..b305ca679e49 --- /dev/null +++ b/api/v1beta1/conversion.go @@ -0,0 +1,28 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 + +func (*Cluster) Hub() {} +func (*ClusterList) Hub() {} +func (*Machine) Hub() {} +func (*MachineList) Hub() {} +func (*MachineSet) Hub() {} +func (*MachineSetList) Hub() {} +func (*MachineDeployment) Hub() {} +func (*MachineDeploymentList) Hub() {} +func (*MachineHealthCheck) Hub() {} +func (*MachineHealthCheckList) Hub() {} diff --git a/api/v1beta1/doc.go b/api/v1beta1/doc.go new file mode 100644 index 000000000000..d55ab5609a7b --- /dev/null +++ b/api/v1beta1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 diff --git a/api/v1beta1/groupversion_info.go b/api/v1beta1/groupversion_info.go new file mode 100644 index 000000000000..2d118b8de8f7 --- /dev/null +++ b/api/v1beta1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 contains API Schema definitions for the cluster v1beta1 API group +// +kubebuilder:object:generate=true +// +groupName=cluster.x-k8s.io +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects. + GroupVersion = schema.GroupVersion{Group: "cluster.x-k8s.io", Version: "v1beta1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/api/v1alpha4/index/cluster.go b/api/v1beta1/index/cluster.go similarity index 96% rename from api/v1alpha4/index/cluster.go rename to api/v1beta1/index/cluster.go index fcd895300bc2..61245a7798b5 100644 --- a/api/v1alpha4/index/cluster.go +++ b/api/v1beta1/index/cluster.go @@ -21,7 +21,7 @@ import ( "fmt" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/api/v1alpha4/index/cluster_test.go b/api/v1beta1/index/cluster_test.go similarity index 96% rename from api/v1alpha4/index/cluster_test.go rename to api/v1beta1/index/cluster_test.go index 6976e4b1f0ba..39f53fd016ba 100644 --- a/api/v1alpha4/index/cluster_test.go +++ b/api/v1beta1/index/cluster_test.go @@ -20,7 +20,7 @@ import ( "testing" . "github.com/onsi/gomega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/api/v1alpha4/index/index.go b/api/v1beta1/index/index.go similarity index 100% rename from api/v1alpha4/index/index.go rename to api/v1beta1/index/index.go diff --git a/api/v1alpha4/index/machine.go b/api/v1beta1/index/machine.go similarity index 98% rename from api/v1alpha4/index/machine.go rename to api/v1beta1/index/machine.go index 55135f6c1244..40981ce0a84a 100644 --- a/api/v1alpha4/index/machine.go +++ b/api/v1beta1/index/machine.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/noderefutil" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/api/v1alpha4/index/machine_test.go b/api/v1beta1/index/machine_test.go similarity index 98% rename from api/v1alpha4/index/machine_test.go rename to api/v1beta1/index/machine_test.go index 269c423cf258..b9f7228718f2 100644 --- a/api/v1alpha4/index/machine_test.go +++ b/api/v1beta1/index/machine_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/noderefutil" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/api/v1alpha4/index/node.go b/api/v1beta1/index/node.go similarity index 100% rename from api/v1alpha4/index/node.go rename to api/v1beta1/index/node.go diff --git a/api/v1alpha4/index/node_test.go b/api/v1beta1/index/node_test.go similarity index 100% rename from api/v1alpha4/index/node_test.go rename to api/v1beta1/index/node_test.go diff --git a/api/v1beta1/machine_phase_types.go b/api/v1beta1/machine_phase_types.go new file mode 100644 index 000000000000..10e10e246db0 --- /dev/null +++ b/api/v1beta1/machine_phase_types.go @@ -0,0 +1,64 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 + +// MachinePhase is a string representation of a Machine Phase. +// +// This type is a high-level indicator of the status of the Machine as it is provisioned, +// from the API user’s perspective. +// +// The value should not be interpreted by any software components as a reliable indication +// of the actual state of the Machine, and controllers should not use the Machine Phase field +// value when making decisions about what action to take. +// +// Controllers should always look at the actual state of the Machine’s fields to make those decisions. +type MachinePhase string + +const ( + // MachinePhasePending is the first state a Machine is assigned by + // Cluster API Machine controller after being created. + MachinePhasePending = MachinePhase("Pending") + + // MachinePhaseProvisioning is the state when the + // Machine infrastructure is being created. + MachinePhaseProvisioning = MachinePhase("Provisioning") + + // MachinePhaseProvisioned is the state when its + // infrastructure has been created and configured. + MachinePhaseProvisioned = MachinePhase("Provisioned") + + // MachinePhaseRunning is the Machine state when it has + // become a Kubernetes Node in a Ready state. + MachinePhaseRunning = MachinePhase("Running") + + // MachinePhaseDeleting is the Machine state when a delete + // request has been sent to the API Server, + // but its infrastructure has not yet been fully deleted. + MachinePhaseDeleting = MachinePhase("Deleting") + + // MachinePhaseDeleted is the Machine state when the object + // and the related infrastructure is deleted and + // ready to be garbage collected by the API Server. + MachinePhaseDeleted = MachinePhase("Deleted") + + // MachinePhaseFailed is the Machine state when the system + // might require user intervention. + MachinePhaseFailed = MachinePhase("Failed") + + // MachinePhaseUnknown is returned if the Machine state cannot be determined. + MachinePhaseUnknown = MachinePhase("Unknown") +) diff --git a/api/v1beta1/machine_types.go b/api/v1beta1/machine_types.go new file mode 100644 index 000000000000..da5b06d31498 --- /dev/null +++ b/api/v1beta1/machine_types.go @@ -0,0 +1,276 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + capierrors "sigs.k8s.io/cluster-api/errors" +) + +const ( + // MachineFinalizer is set on PrepareForCreate callback. + MachineFinalizer = "machine.cluster.x-k8s.io" + + // MachineControlPlaneLabelName is the label set on machines or related objects that are part of a control plane. + MachineControlPlaneLabelName = "cluster.x-k8s.io/control-plane" + + // ExcludeNodeDrainingAnnotation annotation explicitly skips node draining if set. + ExcludeNodeDrainingAnnotation = "machine.cluster.x-k8s.io/exclude-node-draining" + + // MachineSetLabelName is the label set on machines if they're controlled by MachineSet. + MachineSetLabelName = "cluster.x-k8s.io/set-name" + + // MachineDeploymentLabelName is the label set on machines if they're controlled by MachineDeployment. + MachineDeploymentLabelName = "cluster.x-k8s.io/deployment-name" + + // PreDrainDeleteHookAnnotationPrefix annotation specifies the prefix we + // search each annotation for during the pre-drain.delete lifecycle hook + // to pause reconciliation of deletion. These hooks will prevent removal of + // draining the associated node until all are removed. + PreDrainDeleteHookAnnotationPrefix = "pre-drain.delete.hook.machine.cluster.x-k8s.io" + + // PreTerminateDeleteHookAnnotationPrefix annotation specifies the prefix we + // search each annotation for during the pre-terminate.delete lifecycle hook + // to pause reconciliation of deletion. These hooks will prevent removal of + // an instance from an infrastructure provider until all are removed. + PreTerminateDeleteHookAnnotationPrefix = "pre-terminate.delete.hook.machine.cluster.x-k8s.io" +) + +// ANCHOR: MachineSpec + +// MachineSpec defines the desired state of Machine. +type MachineSpec struct { + // ClusterName is the name of the Cluster this object belongs to. + // +kubebuilder:validation:MinLength=1 + ClusterName string `json:"clusterName"` + + // Bootstrap is a reference to a local struct which encapsulates + // fields to configure the Machine’s bootstrapping mechanism. + Bootstrap Bootstrap `json:"bootstrap"` + + // InfrastructureRef is a required reference to a custom resource + // offered by an infrastructure provider. + InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"` + + // Version defines the desired Kubernetes version. + // This field is meant to be optionally used by bootstrap providers. + // +optional + Version *string `json:"version,omitempty"` + + // ProviderID is the identification ID of the machine provided by the provider. + // This field must match the provider ID as seen on the node object corresponding to this machine. + // This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler + // with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out + // machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a + // generic out-of-tree provider for autoscaler, this field is required by autoscaler to be + // able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver + // and then a comparison is done to find out unregistered machines and are marked for delete. + // This field will be set by the actuators and consumed by higher level entities like autoscaler that will + // be interfacing with cluster-api as generic provider. + // +optional + ProviderID *string `json:"providerID,omitempty"` + + // FailureDomain is the failure domain the machine will be created in. + // Must match a key in the FailureDomains map stored on the cluster object. + // +optional + FailureDomain *string `json:"failureDomain,omitempty"` + + // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. + // The default value is 0, meaning that the node can be drained without any time limitations. + // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` + // +optional + NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` +} + +// ANCHOR_END: MachineSpec + +// ANCHOR: MachineStatus + +// MachineStatus defines the observed state of Machine. +type MachineStatus struct { + // NodeRef will point to the corresponding Node if it exists. + // +optional + NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"` + + // NodeInfo is a set of ids/uuids to uniquely identify the node. + // More info: https://kubernetes.io/docs/concepts/nodes/node/#info + // +optional + NodeInfo *corev1.NodeSystemInfo `json:"nodeInfo,omitempty"` + + // LastUpdated identifies when the phase of the Machine last transitioned. + // +optional + LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` + + // Version specifies the current version of Kubernetes running + // on the corresponding Node. This is meant to be a means of bubbling + // up status from the Node to the Machine. + // It is entirely optional, but useful for end-user UX if it’s present. + // +optional + Version *string `json:"version,omitempty"` + + // FailureReason will be set in the event that there is a terminal problem + // reconciling the Machine and will contain a succinct value suitable + // for machine interpretation. + // + // This field should not be set for transitive errors that a controller + // faces that are expected to be fixed automatically over + // time (like service outages), but instead indicate that something is + // fundamentally wrong with the Machine's spec or the configuration of + // the controller, and that manual intervention is required. Examples + // of terminal errors would be invalid combinations of settings in the + // spec, values that are unsupported by the controller, or the + // responsible controller itself being critically misconfigured. + // + // Any transient errors that occur during the reconciliation of Machines + // can be added as events to the Machine object and/or logged in the + // controller's output. + // +optional + FailureReason *capierrors.MachineStatusError `json:"failureReason,omitempty"` + + // FailureMessage will be set in the event that there is a terminal problem + // reconciling the Machine and will contain a more verbose string suitable + // for logging and human consumption. + // + // This field should not be set for transitive errors that a controller + // faces that are expected to be fixed automatically over + // time (like service outages), but instead indicate that something is + // fundamentally wrong with the Machine's spec or the configuration of + // the controller, and that manual intervention is required. Examples + // of terminal errors would be invalid combinations of settings in the + // spec, values that are unsupported by the controller, or the + // responsible controller itself being critically misconfigured. + // + // Any transient errors that occur during the reconciliation of Machines + // can be added as events to the Machine object and/or logged in the + // controller's output. + // +optional + FailureMessage *string `json:"failureMessage,omitempty"` + + // Addresses is a list of addresses assigned to the machine. + // This field is copied from the infrastructure provider reference. + // +optional + Addresses MachineAddresses `json:"addresses,omitempty"` + + // Phase represents the current phase of machine actuation. + // E.g. Pending, Running, Terminating, Failed etc. + // +optional + Phase string `json:"phase,omitempty"` + + // BootstrapReady is the state of the bootstrap provider. + // +optional + BootstrapReady bool `json:"bootstrapReady"` + + // InfrastructureReady is the state of the infrastructure provider. + // +optional + InfrastructureReady bool `json:"infrastructureReady"` + + // ObservedGeneration is the latest generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // Conditions defines current service state of the Machine. + // +optional + Conditions Conditions `json:"conditions,omitempty"` +} + +// ANCHOR_END: MachineStatus + +// SetTypedPhase sets the Phase field to the string representation of MachinePhase. +func (m *MachineStatus) SetTypedPhase(p MachinePhase) { + m.Phase = string(p) +} + +// GetTypedPhase attempts to parse the Phase field and return +// the typed MachinePhase representation as described in `machine_phase_types.go`. +func (m *MachineStatus) GetTypedPhase() MachinePhase { + switch phase := MachinePhase(m.Phase); phase { + case + MachinePhasePending, + MachinePhaseProvisioning, + MachinePhaseProvisioned, + MachinePhaseRunning, + MachinePhaseDeleting, + MachinePhaseDeleted, + MachinePhaseFailed: + return phase + default: + return MachinePhaseUnknown + } +} + +// ANCHOR: Bootstrap + +// Bootstrap encapsulates fields to configure the Machine’s bootstrapping mechanism. +type Bootstrap struct { + // ConfigRef is a reference to a bootstrap provider-specific resource + // that holds configuration details. The reference is optional to + // allow users/operators to specify Bootstrap.DataSecretName without + // the need of a controller. + // +optional + ConfigRef *corev1.ObjectReference `json:"configRef,omitempty"` + + // DataSecretName is the name of the secret that stores the bootstrap data script. + // If nil, the Machine should remain in the Pending state. + // +optional + DataSecretName *string `json:"dataSecretName,omitempty"` +} + +// ANCHOR_END: Bootstrap + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machines,shortName=ma,scope=Namespaced,categories=cluster-api +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Machine" +// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="Provider ID" +// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Machine status such as Terminating/Pending/Running/Failed etc" +// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version",description="Kubernetes version associated with this Machine" +// +kubebuilder:printcolumn:name="NodeName",type="string",JSONPath=".status.nodeRef.name",description="Node name associated with this machine",priority=1 + +// Machine is the Schema for the machines API. +type Machine struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec MachineSpec `json:"spec,omitempty"` + Status MachineStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (m *Machine) GetConditions() Conditions { + return m.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (m *Machine) SetConditions(conditions Conditions) { + m.Status.Conditions = conditions +} + +// +kubebuilder:object:root=true + +// MachineList contains a list of Machine. +type MachineList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Machine `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Machine{}, &MachineList{}) +} diff --git a/api/v1alpha4/machine_webhook.go b/api/v1beta1/machine_webhook.go similarity index 88% rename from api/v1alpha4/machine_webhook.go rename to api/v1beta1/machine_webhook.go index 9e2430029146..cce7981ea393 100644 --- a/api/v1alpha4/machine_webhook.go +++ b/api/v1beta1/machine_webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -35,8 +35,8 @@ func (m *Machine) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1alpha4-machine,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machines,versions=v1alpha4,name=validation.machine.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1alpha4-machine,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machines,versions=v1alpha4,name=default.machine.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1beta1-machine,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machines,versions=v1beta1,name=validation.machine.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1beta1-machine,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machines,versions=v1beta1,name=default.machine.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Validator = &Machine{} var _ webhook.Defaulter = &Machine{} diff --git a/api/v1alpha4/machine_webhook_test.go b/api/v1beta1/machine_webhook_test.go similarity index 99% rename from api/v1alpha4/machine_webhook_test.go rename to api/v1beta1/machine_webhook_test.go index ce18043f4a7a..fd18f564ea82 100644 --- a/api/v1alpha4/machine_webhook_test.go +++ b/api/v1beta1/machine_webhook_test.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/api/v1beta1/machinedeployment_types.go b/api/v1beta1/machinedeployment_types.go new file mode 100644 index 000000000000..f43d2d4df5fc --- /dev/null +++ b/api/v1beta1/machinedeployment_types.go @@ -0,0 +1,311 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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/util/intstr" +) + +const ( + // MachineDeploymentTopologyFinalizer is the finalizer used by the topology MachineDeployment controller to + // clean up referenced template resources if necessary when a MachineDeployment is being deleted. + MachineDeploymentTopologyFinalizer = "machinedeployment.topology.cluster.x-k8s.io" +) + +// MachineDeploymentStrategyType defines the type of MachineDeployment rollout strategies. +type MachineDeploymentStrategyType string + +const ( + // RollingUpdateMachineDeploymentStrategyType replaces the old MachineSet by new one using rolling update + // i.e. gradually scale down the old MachineSet and scale up the new one. + RollingUpdateMachineDeploymentStrategyType MachineDeploymentStrategyType = "RollingUpdate" + + // OnDeleteMachineDeploymentStrategyType replaces old MachineSets when the deletion of the associated machines are completed. + OnDeleteMachineDeploymentStrategyType MachineDeploymentStrategyType = "OnDelete" + + // RevisionAnnotation is the revision annotation of a machine deployment's machine sets which records its rollout sequence. + RevisionAnnotation = "machinedeployment.clusters.x-k8s.io/revision" + + // RevisionHistoryAnnotation maintains the history of all old revisions that a machine set has served for a machine deployment. + RevisionHistoryAnnotation = "machinedeployment.clusters.x-k8s.io/revision-history" + + // DesiredReplicasAnnotation is the desired replicas for a machine deployment recorded as an annotation + // in its machine sets. Helps in separating scaling events from the rollout process and for + // determining if the new machine set for a deployment is really saturated. + DesiredReplicasAnnotation = "machinedeployment.clusters.x-k8s.io/desired-replicas" + + // MaxReplicasAnnotation is the maximum replicas a deployment can have at a given point, which + // is machinedeployment.spec.replicas + maxSurge. Used by the underlying machine sets to estimate their + // proportions in case the deployment has surge replicas. + MaxReplicasAnnotation = "machinedeployment.clusters.x-k8s.io/max-replicas" +) + +// ANCHOR: MachineDeploymentSpec + +// MachineDeploymentSpec defines the desired state of MachineDeployment. +type MachineDeploymentSpec struct { + // ClusterName is the name of the Cluster this object belongs to. + // +kubebuilder:validation:MinLength=1 + ClusterName string `json:"clusterName"` + + // Number of desired machines. Defaults to 1. + // This is a pointer to distinguish between explicit zero and not specified. + // +optional + // +kubebuilder:default=1 + Replicas *int32 `json:"replicas,omitempty"` + + // Label selector for machines. Existing MachineSets whose machines are + // selected by this will be the ones affected by this deployment. + // It must match the machine template's labels. + Selector metav1.LabelSelector `json:"selector"` + + // Template describes the machines that will be created. + Template MachineTemplateSpec `json:"template"` + + // The deployment strategy to use to replace existing machines with + // new ones. + // +optional + Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"` + + // Minimum number of seconds for which a newly created machine should + // be ready. + // Defaults to 0 (machine will be considered available as soon as it + // is ready) + // +optional + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + + // The number of old MachineSets to retain to allow rollback. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 1. + // +optional + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + + // Indicates that the deployment is paused. + // +optional + Paused bool `json:"paused,omitempty"` + + // The maximum time in seconds for a deployment to make progress before it + // is considered to be failed. The deployment controller will continue to + // process failed deployments and a condition with a ProgressDeadlineExceeded + // reason will be surfaced in the deployment status. Note that progress will + // not be estimated during the time a deployment is paused. Defaults to 600s. + ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` +} + +// ANCHOR_END: MachineDeploymentSpec + +// ANCHOR: MachineDeploymentStrategy + +// MachineDeploymentStrategy describes how to replace existing machines +// with new ones. +type MachineDeploymentStrategy struct { + // Type of deployment. + // Default is RollingUpdate. + // +kubebuilder:validation:Enum=RollingUpdate;OnDelete + // +optional + Type MachineDeploymentStrategyType `json:"type,omitempty"` + + // Rolling update config params. Present only if + // MachineDeploymentStrategyType = RollingUpdate. + // +optional + RollingUpdate *MachineRollingUpdateDeployment `json:"rollingUpdate,omitempty"` +} + +// ANCHOR_END: MachineDeploymentStrategy + +// ANCHOR: MachineRollingUpdateDeployment + +// MachineRollingUpdateDeployment is used to control the desired behavior of rolling update. +type MachineRollingUpdateDeployment struct { + // The maximum number of machines that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired + // machines (ex: 10%). + // Absolute number is calculated from percentage by rounding down. + // This can not be 0 if MaxSurge is 0. + // Defaults to 0. + // Example: when this is set to 30%, the old MachineSet can be scaled + // down to 70% of desired machines immediately when the rolling update + // starts. Once new machines are ready, old MachineSet can be scaled + // down further, followed by scaling up the new MachineSet, ensuring + // that the total number of machines available at all times + // during the update is at least 70% of desired machines. + // +optional + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + + // The maximum number of machines that can be scheduled above the + // desired number of machines. + // Value can be an absolute number (ex: 5) or a percentage of + // desired machines (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up. + // Defaults to 1. + // Example: when this is set to 30%, the new MachineSet can be scaled + // up immediately when the rolling update starts, such that the total + // number of old and new machines do not exceed 130% of desired + // machines. Once old machines have been killed, new MachineSet can + // be scaled up further, ensuring that total number of machines running + // at any time during the update is at most 130% of desired machines. + // +optional + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` + + // DeletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. + // Valid values are "Random, "Newest", "Oldest" + // When no value is supplied, the default DeletePolicy of MachineSet is used + // +kubebuilder:validation:Enum=Random;Newest;Oldest + // +optional + DeletePolicy *string `json:"deletePolicy,omitempty"` +} + +// ANCHOR_END: MachineRollingUpdateDeployment + +// ANCHOR: MachineDeploymentStatus + +// MachineDeploymentStatus defines the observed state of MachineDeployment. +type MachineDeploymentStatus struct { + // The generation observed by the deployment controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // Selector is the same as the label selector but in the string format to avoid introspection + // by clients. The string will be in the same format as the query-param syntax. + // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector string `json:"selector,omitempty"` + + // Total number of non-terminated machines targeted by this deployment + // (their labels match the selector). + // +optional + Replicas int32 `json:"replicas,omitempty"` + + // Total number of non-terminated machines targeted by this deployment + // that have the desired template spec. + // +optional + UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` + + // Total number of ready machines targeted by this deployment. + // +optional + ReadyReplicas int32 `json:"readyReplicas,omitempty"` + + // Total number of available machines (ready for at least minReadySeconds) + // targeted by this deployment. + // +optional + AvailableReplicas int32 `json:"availableReplicas,omitempty"` + + // Total number of unavailable machines targeted by this deployment. + // This is the total number of machines that are still required for + // the deployment to have 100% available capacity. They may either + // be machines that are running but not yet available or machines + // that still have not been created. + // +optional + UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` + + // Phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown). + // +optional + Phase string `json:"phase,omitempty"` + + // Conditions defines current service state of the MachineDeployment. + // +optional + Conditions Conditions `json:"conditions,omitempty"` +} + +// ANCHOR_END: MachineDeploymentStatus + +// MachineDeploymentPhase indicates the progress of the machine deployment. +type MachineDeploymentPhase string + +const ( + // MachineDeploymentPhaseScalingUp indicates the MachineDeployment is scaling up. + MachineDeploymentPhaseScalingUp = MachineDeploymentPhase("ScalingUp") + + // MachineDeploymentPhaseScalingDown indicates the MachineDeployment is scaling down. + MachineDeploymentPhaseScalingDown = MachineDeploymentPhase("ScalingDown") + + // MachineDeploymentPhaseRunning indicates scaling has completed and all Machines are running. + MachineDeploymentPhaseRunning = MachineDeploymentPhase("Running") + + // MachineDeploymentPhaseFailed indicates there was a problem scaling and user intervention might be required. + MachineDeploymentPhaseFailed = MachineDeploymentPhase("Failed") + + // MachineDeploymentPhaseUnknown indicates the state of the MachineDeployment cannot be determined. + MachineDeploymentPhaseUnknown = MachineDeploymentPhase("Unknown") +) + +// SetTypedPhase sets the Phase field to the string representation of MachineDeploymentPhase. +func (md *MachineDeploymentStatus) SetTypedPhase(p MachineDeploymentPhase) { + md.Phase = string(p) +} + +// GetTypedPhase attempts to parse the Phase field and return +// the typed MachineDeploymentPhase representation. +func (md *MachineDeploymentStatus) GetTypedPhase() MachineDeploymentPhase { + switch phase := MachineDeploymentPhase(md.Phase); phase { + case + MachineDeploymentPhaseScalingDown, + MachineDeploymentPhaseScalingUp, + MachineDeploymentPhaseRunning, + MachineDeploymentPhaseFailed: + return phase + default: + return MachineDeploymentPhaseUnknown + } +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machinedeployments,shortName=md,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector +// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachineDeployment" +// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="MachineDeployment status such as ScalingUp/ScalingDown/Running/Failed/Unknown" +// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".status.replicas",description="Total number of non-terminated machines targeted by this MachineDeployment" +// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Total number of ready machines targeted by this MachineDeployment" +// +kubebuilder:printcolumn:name="Updated",type=integer,JSONPath=".status.updatedReplicas",description="Total number of non-terminated machines targeted by this deployment that have the desired template spec" +// +kubebuilder:printcolumn:name="Unavailable",type=integer,JSONPath=".status.unavailableReplicas",description="Total number of unavailable machines targeted by this MachineDeployment" + +// MachineDeployment is the Schema for the machinedeployments API. +type MachineDeployment struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec MachineDeploymentSpec `json:"spec,omitempty"` + Status MachineDeploymentStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// MachineDeploymentList contains a list of MachineDeployment. +type MachineDeploymentList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []MachineDeployment `json:"items"` +} + +func init() { + SchemeBuilder.Register(&MachineDeployment{}, &MachineDeploymentList{}) +} + +// GetConditions returns the set of conditions for the machinedeployment. +func (m *MachineDeployment) GetConditions() Conditions { + return m.Status.Conditions +} + +// SetConditions updates the set of conditions on the machinedeployment. +func (m *MachineDeployment) SetConditions(conditions Conditions) { + m.Status.Conditions = conditions +} diff --git a/api/v1alpha4/machinedeployment_webhook.go b/api/v1beta1/machinedeployment_webhook.go similarity index 92% rename from api/v1alpha4/machinedeployment_webhook.go rename to api/v1beta1/machinedeployment_webhook.go index bec7c6d4a9d9..b9a688e59720 100644 --- a/api/v1alpha4/machinedeployment_webhook.go +++ b/api/v1beta1/machinedeployment_webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -38,8 +38,8 @@ func (m *MachineDeployment) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1alpha4-machinedeployment,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinedeployments,versions=v1alpha4,name=validation.machinedeployment.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1alpha4-machinedeployment,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinedeployments,versions=v1alpha4,name=default.machinedeployment.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1beta1-machinedeployment,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinedeployments,versions=v1beta1,name=validation.machinedeployment.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1beta1-machinedeployment,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinedeployments,versions=v1beta1,name=default.machinedeployment.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &MachineDeployment{} var _ webhook.Validator = &MachineDeployment{} diff --git a/api/v1alpha4/machinedeployment_webhook_test.go b/api/v1beta1/machinedeployment_webhook_test.go similarity index 99% rename from api/v1alpha4/machinedeployment_webhook_test.go rename to api/v1beta1/machinedeployment_webhook_test.go index 4fa91f8c032d..f997735252da 100644 --- a/api/v1alpha4/machinedeployment_webhook_test.go +++ b/api/v1beta1/machinedeployment_webhook_test.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/api/v1beta1/machinehealthcheck_types.go b/api/v1beta1/machinehealthcheck_types.go new file mode 100644 index 000000000000..e730cd55072f --- /dev/null +++ b/api/v1beta1/machinehealthcheck_types.go @@ -0,0 +1,170 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// ANCHOR: MachineHealthCheckSpec + +// MachineHealthCheckSpec defines the desired state of MachineHealthCheck. +type MachineHealthCheckSpec struct { + // ClusterName is the name of the Cluster this object belongs to. + // +kubebuilder:validation:MinLength=1 + ClusterName string `json:"clusterName"` + + // Label selector to match machines whose health will be exercised + Selector metav1.LabelSelector `json:"selector"` + + // UnhealthyConditions contains a list of the conditions that determine + // whether a node is considered unhealthy. The conditions are combined in a + // logical OR, i.e. if any of the conditions is met, the node is unhealthy. + // + // +kubebuilder:validation:MinItems=1 + UnhealthyConditions []UnhealthyCondition `json:"unhealthyConditions"` + + // Any further remediation is only allowed if at most "MaxUnhealthy" machines selected by + // "selector" are not healthy. + // +optional + MaxUnhealthy *intstr.IntOrString `json:"maxUnhealthy,omitempty"` + + // Any further remediation is only allowed if the number of machines selected by "selector" as not healthy + // is within the range of "UnhealthyRange". Takes precedence over MaxUnhealthy. + // Eg. "[3-5]" - This means that remediation will be allowed only when: + // (a) there are at least 3 unhealthy machines (and) + // (b) there are at most 5 unhealthy machines + // +optional + // +kubebuilder:validation:Pattern=^\[[0-9]+-[0-9]+\]$ + UnhealthyRange *string `json:"unhealthyRange,omitempty"` + + // Machines older than this duration without a node will be considered to have + // failed and will be remediated. + // If not set, this value is defaulted to 10 minutes. + // If you wish to disable this feature, set the value explicitly to 0. + // +optional + NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"` + + // RemediationTemplate is a reference to a remediation template + // provided by an infrastructure provider. + // + // This field is completely optional, when filled, the MachineHealthCheck controller + // creates a new object from the template referenced and hands off remediation of the machine to + // a controller that lives outside of Cluster API. + // +optional + RemediationTemplate *corev1.ObjectReference `json:"remediationTemplate,omitempty"` +} + +// ANCHOR_END: MachineHealthCHeckSpec + +// ANCHOR: UnhealthyCondition + +// UnhealthyCondition represents a Node condition type and value with a timeout +// specified as a duration. When the named condition has been in the given +// status for at least the timeout value, a node is considered unhealthy. +type UnhealthyCondition struct { + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:MinLength=1 + Type corev1.NodeConditionType `json:"type"` + + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:MinLength=1 + Status corev1.ConditionStatus `json:"status"` + + Timeout metav1.Duration `json:"timeout"` +} + +// ANCHOR_END: UnhealthyCondition + +// ANCHOR: MachineHealthCheckStatus + +// MachineHealthCheckStatus defines the observed state of MachineHealthCheck. +type MachineHealthCheckStatus struct { + // total number of machines counted by this machine health check + // +kubebuilder:validation:Minimum=0 + ExpectedMachines int32 `json:"expectedMachines,omitempty"` + + // total number of healthy machines counted by this machine health check + // +kubebuilder:validation:Minimum=0 + CurrentHealthy int32 `json:"currentHealthy,omitempty"` + + // RemediationsAllowed is the number of further remediations allowed by this machine health check before + // maxUnhealthy short circuiting will be applied + // +kubebuilder:validation:Minimum=0 + RemediationsAllowed int32 `json:"remediationsAllowed,omitempty"` + + // ObservedGeneration is the latest generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // Targets shows the current list of machines the machine health check is watching + // +optional + Targets []string `json:"targets,omitempty"` + + // Conditions defines current service state of the MachineHealthCheck. + // +optional + Conditions Conditions `json:"conditions,omitempty"` +} + +// ANCHOR_END: MachineHealthCheckStatus + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machinehealthchecks,shortName=mhc;mhcs,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachineHealthCheck" +// +kubebuilder:printcolumn:name="MaxUnhealthy",type="string",JSONPath=".spec.maxUnhealthy",description="Maximum number of unhealthy machines allowed" +// +kubebuilder:printcolumn:name="ExpectedMachines",type="integer",JSONPath=".status.expectedMachines",description="Number of machines currently monitored" +// +kubebuilder:printcolumn:name="CurrentHealthy",type="integer",JSONPath=".status.currentHealthy",description="Current observed healthy machines" + +// MachineHealthCheck is the Schema for the machinehealthchecks API. +type MachineHealthCheck struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Specification of machine health check policy + Spec MachineHealthCheckSpec `json:"spec,omitempty"` + + // Most recently observed status of MachineHealthCheck resource + Status MachineHealthCheckStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (m *MachineHealthCheck) GetConditions() Conditions { + return m.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (m *MachineHealthCheck) SetConditions(conditions Conditions) { + m.Status.Conditions = conditions +} + +// +kubebuilder:object:root=true + +// MachineHealthCheckList contains a list of MachineHealthCheck. +type MachineHealthCheckList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []MachineHealthCheck `json:"items"` +} + +func init() { + SchemeBuilder.Register(&MachineHealthCheck{}, &MachineHealthCheckList{}) +} diff --git a/api/v1alpha4/machinehealthcheck_webhook.go b/api/v1beta1/machinehealthcheck_webhook.go similarity index 90% rename from api/v1alpha4/machinehealthcheck_webhook.go rename to api/v1beta1/machinehealthcheck_webhook.go index b9cfbb2ca0f8..d8b88b5d1912 100644 --- a/api/v1alpha4/machinehealthcheck_webhook.go +++ b/api/v1beta1/machinehealthcheck_webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -56,8 +56,8 @@ func (m *MachineHealthCheck) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1alpha4-machinehealthcheck,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinehealthchecks,versions=v1alpha4,name=validation.machinehealthcheck.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1alpha4-machinehealthcheck,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinehealthchecks,versions=v1alpha4,name=default.machinehealthcheck.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1beta1-machinehealthcheck,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinehealthchecks,versions=v1beta1,name=validation.machinehealthcheck.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1beta1-machinehealthcheck,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinehealthchecks,versions=v1beta1,name=default.machinehealthcheck.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &MachineHealthCheck{} var _ webhook.Validator = &MachineHealthCheck{} diff --git a/api/v1alpha4/machinehealthcheck_webhook_test.go b/api/v1beta1/machinehealthcheck_webhook_test.go similarity index 99% rename from api/v1alpha4/machinehealthcheck_webhook_test.go rename to api/v1beta1/machinehealthcheck_webhook_test.go index 3eaa4a73e880..08e779cdd4c3 100644 --- a/api/v1alpha4/machinehealthcheck_webhook_test.go +++ b/api/v1beta1/machinehealthcheck_webhook_test.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/api/v1beta1/machineset_types.go b/api/v1beta1/machineset_types.go new file mode 100644 index 000000000000..21572ef3a76e --- /dev/null +++ b/api/v1beta1/machineset_types.go @@ -0,0 +1,224 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + metav1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/validation/field" + capierrors "sigs.k8s.io/cluster-api/errors" +) + +const ( + // MachineSetTopologyFinalizer is the finalizer used by the topology MachineDeployment controller to + // clean up referenced template resources if necessary when a MachineSet is being deleted. + MachineSetTopologyFinalizer = "machineset.topology.cluster.x-k8s.io" +) + +// ANCHOR: MachineSetSpec + +// MachineSetSpec defines the desired state of MachineSet. +type MachineSetSpec struct { + // ClusterName is the name of the Cluster this object belongs to. + // +kubebuilder:validation:MinLength=1 + ClusterName string `json:"clusterName"` + + // Replicas is the number of desired replicas. + // This is a pointer to distinguish between explicit zero and unspecified. + // Defaults to 1. + // +optional + // +kubebuilder:default=1 + Replicas *int32 `json:"replicas,omitempty"` + + // MinReadySeconds is the minimum number of seconds for which a newly created machine should be ready. + // Defaults to 0 (machine will be considered available as soon as it is ready) + // +optional + MinReadySeconds int32 `json:"minReadySeconds,omitempty"` + + // DeletePolicy defines the policy used to identify nodes to delete when downscaling. + // Defaults to "Random". Valid values are "Random, "Newest", "Oldest" + // +kubebuilder:validation:Enum=Random;Newest;Oldest + DeletePolicy string `json:"deletePolicy,omitempty"` + + // Selector is a label query over machines that should match the replica count. + // Label keys and values that must match in order to be controlled by this MachineSet. + // It must match the machine template's labels. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector metav1.LabelSelector `json:"selector"` + + // Template is the object that describes the machine that will be created if + // insufficient replicas are detected. + // Object references to custom resources resources are treated as templates. + // +optional + Template MachineTemplateSpec `json:"template,omitempty"` +} + +// ANCHOR_END: MachineSetSpec + +// ANCHOR: MachineTemplateSpec + +// MachineTemplateSpec describes the data needed to create a Machine from a template. +type MachineTemplateSpec struct { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + ObjectMeta `json:"metadata,omitempty"` + + // Specification of the desired behavior of the machine. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Spec MachineSpec `json:"spec,omitempty"` +} + +// ANCHOR_END: MachineTemplateSpec + +// MachineSetDeletePolicy defines how priority is assigned to nodes to delete when +// downscaling a MachineSet. Defaults to "Random". +type MachineSetDeletePolicy string + +const ( + // RandomMachineSetDeletePolicy prioritizes both Machines that have the annotation + // "cluster.x-k8s.io/delete-machine=yes" and Machines that are unhealthy + // (Status.FailureReason or Status.FailureMessage are set to a non-empty value). + // Finally, it picks Machines at random to delete. + RandomMachineSetDeletePolicy MachineSetDeletePolicy = "Random" + + // NewestMachineSetDeletePolicy prioritizes both Machines that have the annotation + // "cluster.x-k8s.io/delete-machine=yes" and Machines that are unhealthy + // (Status.FailureReason or Status.FailureMessage are set to a non-empty value). + // It then prioritizes the newest Machines for deletion based on the Machine's CreationTimestamp. + NewestMachineSetDeletePolicy MachineSetDeletePolicy = "Newest" + + // OldestMachineSetDeletePolicy prioritizes both Machines that have the annotation + // "cluster.x-k8s.io/delete-machine=yes" and Machines that are unhealthy + // (Status.FailureReason or Status.FailureMessage are set to a non-empty value). + // It then prioritizes the oldest Machines for deletion based on the Machine's CreationTimestamp. + OldestMachineSetDeletePolicy MachineSetDeletePolicy = "Oldest" +) + +// ANCHOR: MachineSetStatus + +// MachineSetStatus defines the observed state of MachineSet. +type MachineSetStatus struct { + // Selector is the same as the label selector but in the string format to avoid introspection + // by clients. The string will be in the same format as the query-param syntax. + // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector string `json:"selector,omitempty"` + + // Replicas is the most recently observed number of replicas. + // +optional + Replicas int32 `json:"replicas,omitempty"` + + // The number of replicas that have labels matching the labels of the machine template of the MachineSet. + // +optional + FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"` + + // The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready". + // +optional + ReadyReplicas int32 `json:"readyReplicas,omitempty"` + + // The number of available replicas (ready for at least minReadySeconds) for this MachineSet. + // +optional + AvailableReplicas int32 `json:"availableReplicas,omitempty"` + + // ObservedGeneration reflects the generation of the most recently observed MachineSet. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // In the event that there is a terminal problem reconciling the + // replicas, both FailureReason and FailureMessage will be set. FailureReason + // will be populated with a succinct value suitable for machine + // interpretation, while FailureMessage will contain a more verbose + // string suitable for logging and human consumption. + // + // These fields should not be set for transitive errors that a + // controller faces that are expected to be fixed automatically over + // time (like service outages), but instead indicate that something is + // fundamentally wrong with the MachineTemplate's spec or the configuration of + // the machine controller, and that manual intervention is required. Examples + // of terminal errors would be invalid combinations of settings in the + // spec, values that are unsupported by the machine controller, or the + // responsible machine controller itself being critically misconfigured. + // + // Any transient errors that occur during the reconciliation of Machines + // can be added as events to the MachineSet object and/or logged in the + // controller's output. + // +optional + FailureReason *capierrors.MachineSetStatusError `json:"failureReason,omitempty"` + // +optional + FailureMessage *string `json:"failureMessage,omitempty"` +} + +// ANCHOR_END: MachineSetStatus + +// Validate validates the MachineSet fields. +func (m *MachineSet) Validate() field.ErrorList { + errors := field.ErrorList{} + + // validate spec.selector and spec.template.labels + fldPath := field.NewPath("spec") + errors = append(errors, metav1validation.ValidateLabelSelector(&m.Spec.Selector, fldPath.Child("selector"))...) + if len(m.Spec.Selector.MatchLabels)+len(m.Spec.Selector.MatchExpressions) == 0 { + errors = append(errors, field.Invalid(fldPath.Child("selector"), m.Spec.Selector, "empty selector is not valid for MachineSet.")) + } + selector, err := metav1.LabelSelectorAsSelector(&m.Spec.Selector) + if err != nil { + errors = append(errors, field.Invalid(fldPath.Child("selector"), m.Spec.Selector, "invalid label selector.")) + } else { + labels := labels.Set(m.Spec.Template.Labels) + if !selector.Matches(labels) { + errors = append(errors, field.Invalid(fldPath.Child("template", "metadata", "labels"), m.Spec.Template.Labels, "`selector` does not match template `labels`")) + } + } + + return errors +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machinesets,shortName=ms,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector +// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachineSet" +// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".status.replicas",description="Total number of non-terminated machines targeted by this machineset" +// +kubebuilder:printcolumn:name="Available",type="integer",JSONPath=".status.availableReplicas",description="Total number of available machines (ready for at least minReadySeconds)" +// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Total number of ready machines targeted by this machineset." + +// MachineSet is the Schema for the machinesets API. +type MachineSet struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec MachineSetSpec `json:"spec,omitempty"` + Status MachineSetStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// MachineSetList contains a list of MachineSet. +type MachineSetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []MachineSet `json:"items"` +} + +func init() { + SchemeBuilder.Register(&MachineSet{}, &MachineSetList{}) +} diff --git a/api/v1alpha4/machineset_webhook.go b/api/v1beta1/machineset_webhook.go similarity index 86% rename from api/v1alpha4/machineset_webhook.go rename to api/v1beta1/machineset_webhook.go index fc99c2996f94..5785ef2c55c5 100644 --- a/api/v1alpha4/machineset_webhook.go +++ b/api/v1beta1/machineset_webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -34,8 +34,8 @@ func (m *MachineSet) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1alpha4-machineset,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinesets,versions=v1alpha4,name=validation.machineset.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1alpha4-machineset,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinesets,versions=v1alpha4,name=default.machineset.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1beta1-machineset,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinesets,versions=v1beta1,name=validation.machineset.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1beta1-machineset,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinesets,versions=v1beta1,name=default.machineset.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &MachineSet{} var _ webhook.Validator = &MachineSet{} diff --git a/api/v1alpha4/machineset_webhook_test.go b/api/v1beta1/machineset_webhook_test.go similarity index 98% rename from api/v1alpha4/machineset_webhook_test.go rename to api/v1beta1/machineset_webhook_test.go index 84cd7b0aa1d6..28025e17bc14 100644 --- a/api/v1alpha4/machineset_webhook_test.go +++ b/api/v1beta1/machineset_webhook_test.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000000..463e63722b80 --- /dev/null +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,1250 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" + "sigs.k8s.io/cluster-api/errors" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIEndpoint) DeepCopyInto(out *APIEndpoint) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIEndpoint. +func (in *APIEndpoint) DeepCopy() *APIEndpoint { + if in == nil { + return nil + } + out := new(APIEndpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Bootstrap) DeepCopyInto(out *Bootstrap) { + *out = *in + if in.ConfigRef != nil { + in, out := &in.ConfigRef, &out.ConfigRef + *out = new(v1.ObjectReference) + **out = **in + } + if in.DataSecretName != nil { + in, out := &in.DataSecretName, &out.DataSecretName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bootstrap. +func (in *Bootstrap) DeepCopy() *Bootstrap { + if in == nil { + return nil + } + out := new(Bootstrap) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Cluster) DeepCopyInto(out *Cluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. +func (in *Cluster) DeepCopy() *Cluster { + if in == nil { + return nil + } + out := new(Cluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Cluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterClass) DeepCopyInto(out *ClusterClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClass. +func (in *ClusterClass) DeepCopy() *ClusterClass { + if in == nil { + return nil + } + out := new(ClusterClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterClass) 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 *ClusterClassList) DeepCopyInto(out *ClusterClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassList. +func (in *ClusterClassList) DeepCopy() *ClusterClassList { + if in == nil { + return nil + } + out := new(ClusterClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterClassList) 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 *ClusterClassSpec) DeepCopyInto(out *ClusterClassSpec) { + *out = *in + in.Infrastructure.DeepCopyInto(&out.Infrastructure) + in.ControlPlane.DeepCopyInto(&out.ControlPlane) + in.Workers.DeepCopyInto(&out.Workers) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassSpec. +func (in *ClusterClassSpec) DeepCopy() *ClusterClassSpec { + if in == nil { + return nil + } + out := new(ClusterClassSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterList) DeepCopyInto(out *ClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Cluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. +func (in *ClusterList) DeepCopy() *ClusterList { + if in == nil { + return nil + } + out := new(ClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterNetwork) DeepCopyInto(out *ClusterNetwork) { + *out = *in + if in.APIServerPort != nil { + in, out := &in.APIServerPort, &out.APIServerPort + *out = new(int32) + **out = **in + } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = new(NetworkRanges) + (*in).DeepCopyInto(*out) + } + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = new(NetworkRanges) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetwork. +func (in *ClusterNetwork) DeepCopy() *ClusterNetwork { + if in == nil { + return nil + } + out := new(ClusterNetwork) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { + *out = *in + if in.ClusterNetwork != nil { + in, out := &in.ClusterNetwork, &out.ClusterNetwork + *out = new(ClusterNetwork) + (*in).DeepCopyInto(*out) + } + out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if in.ControlPlaneRef != nil { + in, out := &in.ControlPlaneRef, &out.ControlPlaneRef + *out = new(v1.ObjectReference) + **out = **in + } + if in.InfrastructureRef != nil { + in, out := &in.InfrastructureRef, &out.InfrastructureRef + *out = new(v1.ObjectReference) + **out = **in + } + if in.Topology != nil { + in, out := &in.Topology, &out.Topology + *out = new(Topology) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. +func (in *ClusterSpec) DeepCopy() *ClusterSpec { + if in == nil { + return nil + } + out := new(ClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { + *out = *in + if in.FailureDomains != nil { + in, out := &in.FailureDomains, &out.FailureDomains + *out = make(FailureDomains, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.FailureReason != nil { + in, out := &in.FailureReason, &out.FailureReason + *out = new(errors.ClusterStatusError) + **out = **in + } + if in.FailureMessage != nil { + in, out := &in.FailureMessage, &out.FailureMessage + *out = new(string) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. +func (in *ClusterStatus) DeepCopy() *ClusterStatus { + if in == nil { + return nil + } + out := new(ClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) +} + +// 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 Conditions) DeepCopyInto(out *Conditions) { + { + in := &in + *out = make(Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions. +func (in Conditions) DeepCopy() Conditions { + if in == nil { + return nil + } + out := new(Conditions) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlPlaneClass) DeepCopyInto(out *ControlPlaneClass) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + in.LocalObjectTemplate.DeepCopyInto(&out.LocalObjectTemplate) + if in.MachineInfrastructure != nil { + in, out := &in.MachineInfrastructure, &out.MachineInfrastructure + *out = new(LocalObjectTemplate) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneClass. +func (in *ControlPlaneClass) DeepCopy() *ControlPlaneClass { + if in == nil { + return nil + } + out := new(ControlPlaneClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlPlaneTopology) DeepCopyInto(out *ControlPlaneTopology) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneTopology. +func (in *ControlPlaneTopology) DeepCopy() *ControlPlaneTopology { + if in == nil { + return nil + } + out := new(ControlPlaneTopology) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FailureDomainSpec) DeepCopyInto(out *FailureDomainSpec) { + *out = *in + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureDomainSpec. +func (in *FailureDomainSpec) DeepCopy() *FailureDomainSpec { + if in == nil { + return nil + } + out := new(FailureDomainSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in FailureDomains) DeepCopyInto(out *FailureDomains) { + { + in := &in + *out = make(FailureDomains, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureDomains. +func (in FailureDomains) DeepCopy() FailureDomains { + if in == nil { + return nil + } + out := new(FailureDomains) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalObjectTemplate) DeepCopyInto(out *LocalObjectTemplate) { + *out = *in + if in.Ref != nil { + in, out := &in.Ref, &out.Ref + *out = new(v1.ObjectReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectTemplate. +func (in *LocalObjectTemplate) DeepCopy() *LocalObjectTemplate { + if in == nil { + return nil + } + out := new(LocalObjectTemplate) + 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 + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// 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 +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Machine) 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 *MachineAddress) DeepCopyInto(out *MachineAddress) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineAddress. +func (in *MachineAddress) DeepCopy() *MachineAddress { + if in == nil { + return nil + } + out := new(MachineAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in MachineAddresses) DeepCopyInto(out *MachineAddresses) { + { + in := &in + *out = make(MachineAddresses, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineAddresses. +func (in MachineAddresses) DeepCopy() MachineAddresses { + if in == nil { + return nil + } + out := new(MachineAddresses) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineDeployment) DeepCopyInto(out *MachineDeployment) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeployment. +func (in *MachineDeployment) DeepCopy() *MachineDeployment { + if in == nil { + return nil + } + out := new(MachineDeployment) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineDeployment) 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 *MachineDeploymentClass) DeepCopyInto(out *MachineDeploymentClass) { + *out = *in + in.Template.DeepCopyInto(&out.Template) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentClass. +func (in *MachineDeploymentClass) DeepCopy() *MachineDeploymentClass { + if in == nil { + return nil + } + out := new(MachineDeploymentClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineDeploymentClassTemplate) DeepCopyInto(out *MachineDeploymentClassTemplate) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + in.Bootstrap.DeepCopyInto(&out.Bootstrap) + in.Infrastructure.DeepCopyInto(&out.Infrastructure) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentClassTemplate. +func (in *MachineDeploymentClassTemplate) DeepCopy() *MachineDeploymentClassTemplate { + if in == nil { + return nil + } + out := new(MachineDeploymentClassTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineDeploymentList) DeepCopyInto(out *MachineDeploymentList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineDeployment, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentList. +func (in *MachineDeploymentList) DeepCopy() *MachineDeploymentList { + if in == nil { + return nil + } + out := new(MachineDeploymentList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineDeploymentList) 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 *MachineDeploymentSpec) DeepCopyInto(out *MachineDeploymentSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.Selector.DeepCopyInto(&out.Selector) + in.Template.DeepCopyInto(&out.Template) + if in.Strategy != nil { + in, out := &in.Strategy, &out.Strategy + *out = new(MachineDeploymentStrategy) + (*in).DeepCopyInto(*out) + } + if in.MinReadySeconds != nil { + in, out := &in.MinReadySeconds, &out.MinReadySeconds + *out = new(int32) + **out = **in + } + if in.RevisionHistoryLimit != nil { + in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit + *out = new(int32) + **out = **in + } + if in.ProgressDeadlineSeconds != nil { + in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentSpec. +func (in *MachineDeploymentSpec) DeepCopy() *MachineDeploymentSpec { + if in == nil { + return nil + } + out := new(MachineDeploymentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineDeploymentStatus) DeepCopyInto(out *MachineDeploymentStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentStatus. +func (in *MachineDeploymentStatus) DeepCopy() *MachineDeploymentStatus { + if in == nil { + return nil + } + out := new(MachineDeploymentStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineDeploymentStrategy) DeepCopyInto(out *MachineDeploymentStrategy) { + *out = *in + if in.RollingUpdate != nil { + in, out := &in.RollingUpdate, &out.RollingUpdate + *out = new(MachineRollingUpdateDeployment) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentStrategy. +func (in *MachineDeploymentStrategy) DeepCopy() *MachineDeploymentStrategy { + if in == nil { + return nil + } + out := new(MachineDeploymentStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineDeploymentTopology) DeepCopyInto(out *MachineDeploymentTopology) { + *out = *in + in.Metadata.DeepCopyInto(&out.Metadata) + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentTopology. +func (in *MachineDeploymentTopology) DeepCopy() *MachineDeploymentTopology { + if in == nil { + return nil + } + out := new(MachineDeploymentTopology) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineHealthCheck) DeepCopyInto(out *MachineHealthCheck) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheck. +func (in *MachineHealthCheck) DeepCopy() *MachineHealthCheck { + if in == nil { + return nil + } + out := new(MachineHealthCheck) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineHealthCheck) 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 *MachineHealthCheckList) DeepCopyInto(out *MachineHealthCheckList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineHealthCheck, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckList. +func (in *MachineHealthCheckList) DeepCopy() *MachineHealthCheckList { + if in == nil { + return nil + } + out := new(MachineHealthCheckList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineHealthCheckList) 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 *MachineHealthCheckSpec) DeepCopyInto(out *MachineHealthCheckSpec) { + *out = *in + in.Selector.DeepCopyInto(&out.Selector) + if in.UnhealthyConditions != nil { + in, out := &in.UnhealthyConditions, &out.UnhealthyConditions + *out = make([]UnhealthyCondition, len(*in)) + copy(*out, *in) + } + if in.MaxUnhealthy != nil { + in, out := &in.MaxUnhealthy, &out.MaxUnhealthy + *out = new(intstr.IntOrString) + **out = **in + } + if in.UnhealthyRange != nil { + in, out := &in.UnhealthyRange, &out.UnhealthyRange + *out = new(string) + **out = **in + } + if in.NodeStartupTimeout != nil { + in, out := &in.NodeStartupTimeout, &out.NodeStartupTimeout + *out = new(metav1.Duration) + **out = **in + } + if in.RemediationTemplate != nil { + in, out := &in.RemediationTemplate, &out.RemediationTemplate + *out = new(v1.ObjectReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckSpec. +func (in *MachineHealthCheckSpec) DeepCopy() *MachineHealthCheckSpec { + if in == nil { + return nil + } + out := new(MachineHealthCheckSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineHealthCheckStatus) DeepCopyInto(out *MachineHealthCheckStatus) { + *out = *in + if in.Targets != nil { + in, out := &in.Targets, &out.Targets + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckStatus. +func (in *MachineHealthCheckStatus) DeepCopy() *MachineHealthCheckStatus { + if in == nil { + return nil + } + out := new(MachineHealthCheckStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineList) DeepCopyInto(out *MachineList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Machine, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineList. +func (in *MachineList) DeepCopy() *MachineList { + if in == nil { + return nil + } + out := new(MachineList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineList) 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 *MachineRollingUpdateDeployment) DeepCopyInto(out *MachineRollingUpdateDeployment) { + *out = *in + if in.MaxUnavailable != nil { + in, out := &in.MaxUnavailable, &out.MaxUnavailable + *out = new(intstr.IntOrString) + **out = **in + } + if in.MaxSurge != nil { + in, out := &in.MaxSurge, &out.MaxSurge + *out = new(intstr.IntOrString) + **out = **in + } + if in.DeletePolicy != nil { + in, out := &in.DeletePolicy, &out.DeletePolicy + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineRollingUpdateDeployment. +func (in *MachineRollingUpdateDeployment) DeepCopy() *MachineRollingUpdateDeployment { + if in == nil { + return nil + } + out := new(MachineRollingUpdateDeployment) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineSet) DeepCopyInto(out *MachineSet) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSet. +func (in *MachineSet) DeepCopy() *MachineSet { + if in == nil { + return nil + } + out := new(MachineSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineSet) 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 *MachineSetList) DeepCopyInto(out *MachineSetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineSet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSetList. +func (in *MachineSetList) DeepCopy() *MachineSetList { + if in == nil { + return nil + } + out := new(MachineSetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineSetList) 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 *MachineSetSpec) DeepCopyInto(out *MachineSetSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.Selector.DeepCopyInto(&out.Selector) + in.Template.DeepCopyInto(&out.Template) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSetSpec. +func (in *MachineSetSpec) DeepCopy() *MachineSetSpec { + if in == nil { + return nil + } + out := new(MachineSetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineSetStatus) DeepCopyInto(out *MachineSetStatus) { + *out = *in + if in.FailureReason != nil { + in, out := &in.FailureReason, &out.FailureReason + *out = new(errors.MachineSetStatusError) + **out = **in + } + if in.FailureMessage != nil { + in, out := &in.FailureMessage, &out.FailureMessage + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSetStatus. +func (in *MachineSetStatus) DeepCopy() *MachineSetStatus { + if in == nil { + return nil + } + out := new(MachineSetStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineSpec) DeepCopyInto(out *MachineSpec) { + *out = *in + in.Bootstrap.DeepCopyInto(&out.Bootstrap) + out.InfrastructureRef = in.InfrastructureRef + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } + if in.ProviderID != nil { + in, out := &in.ProviderID, &out.ProviderID + *out = new(string) + **out = **in + } + if in.FailureDomain != nil { + in, out := &in.FailureDomain, &out.FailureDomain + *out = new(string) + **out = **in + } + if in.NodeDrainTimeout != nil { + in, out := &in.NodeDrainTimeout, &out.NodeDrainTimeout + *out = new(metav1.Duration) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSpec. +func (in *MachineSpec) DeepCopy() *MachineSpec { + if in == nil { + return nil + } + out := new(MachineSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineStatus) DeepCopyInto(out *MachineStatus) { + *out = *in + if in.NodeRef != nil { + in, out := &in.NodeRef, &out.NodeRef + *out = new(v1.ObjectReference) + **out = **in + } + if in.NodeInfo != nil { + in, out := &in.NodeInfo, &out.NodeInfo + *out = new(v1.NodeSystemInfo) + **out = **in + } + if in.LastUpdated != nil { + in, out := &in.LastUpdated, &out.LastUpdated + *out = (*in).DeepCopy() + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } + if in.FailureReason != nil { + in, out := &in.FailureReason, &out.FailureReason + *out = new(errors.MachineStatusError) + **out = **in + } + if in.FailureMessage != nil { + in, out := &in.FailureMessage, &out.FailureMessage + *out = new(string) + **out = **in + } + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make(MachineAddresses, len(*in)) + copy(*out, *in) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineStatus. +func (in *MachineStatus) DeepCopy() *MachineStatus { + if in == nil { + return nil + } + out := new(MachineStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineTemplateSpec) DeepCopyInto(out *MachineTemplateSpec) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineTemplateSpec. +func (in *MachineTemplateSpec) DeepCopy() *MachineTemplateSpec { + if in == nil { + return nil + } + out := new(MachineTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkRanges) DeepCopyInto(out *NetworkRanges) { + *out = *in + if in.CIDRBlocks != nil { + in, out := &in.CIDRBlocks, &out.CIDRBlocks + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRanges. +func (in *NetworkRanges) DeepCopy() *NetworkRanges { + if in == nil { + return nil + } + out := new(NetworkRanges) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta) { + *out = *in + 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 + } + } + 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 + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta. +func (in *ObjectMeta) DeepCopy() *ObjectMeta { + if in == nil { + return nil + } + out := new(ObjectMeta) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Topology) DeepCopyInto(out *Topology) { + *out = *in + if in.RolloutAfter != nil { + in, out := &in.RolloutAfter, &out.RolloutAfter + *out = (*in).DeepCopy() + } + in.ControlPlane.DeepCopyInto(&out.ControlPlane) + if in.Workers != nil { + in, out := &in.Workers, &out.Workers + *out = new(WorkersTopology) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topology. +func (in *Topology) DeepCopy() *Topology { + if in == nil { + return nil + } + out := new(Topology) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UnhealthyCondition) DeepCopyInto(out *UnhealthyCondition) { + *out = *in + out.Timeout = in.Timeout +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnhealthyCondition. +func (in *UnhealthyCondition) DeepCopy() *UnhealthyCondition { + if in == nil { + return nil + } + out := new(UnhealthyCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkersClass) DeepCopyInto(out *WorkersClass) { + *out = *in + if in.MachineDeployments != nil { + in, out := &in.MachineDeployments, &out.MachineDeployments + *out = make([]MachineDeploymentClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkersClass. +func (in *WorkersClass) DeepCopy() *WorkersClass { + if in == nil { + return nil + } + out := new(WorkersClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkersTopology) DeepCopyInto(out *WorkersTopology) { + *out = *in + if in.MachineDeployments != nil { + in, out := &in.MachineDeployments, &out.MachineDeployments + *out = make([]MachineDeploymentTopology, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkersTopology. +func (in *WorkersTopology) DeepCopy() *WorkersTopology { + if in == nil { + return nil + } + out := new(WorkersTopology) + in.DeepCopyInto(out) + return out +} diff --git a/bootstrap/kubeadm/api/v1alpha3/conversion.go b/bootstrap/kubeadm/api/v1alpha3/conversion.go index 028ec4d74a58..5b711c380b3a 100644 --- a/bootstrap/kubeadm/api/v1alpha3/conversion.go +++ b/bootstrap/kubeadm/api/v1alpha3/conversion.go @@ -18,36 +18,35 @@ package v1alpha3 import ( apiconversion "k8s.io/apimachinery/pkg/conversion" - kubeadmbootstrapv1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - kubeadmbootstrapv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" ) -// ConvertTo converts this KubeadmConfig to the Hub version (v1alpha4). func (src *KubeadmConfig) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*kubeadmbootstrapv1alpha4.KubeadmConfig) + dst := dstRaw.(*v1beta1.KubeadmConfig) - if err := Convert_v1alpha3_KubeadmConfig_To_v1alpha4_KubeadmConfig(src, dst, nil); err != nil { + if err := Convert_v1alpha3_KubeadmConfig_To_v1beta1_KubeadmConfig(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &kubeadmbootstrapv1alpha4.KubeadmConfig{} + restored := &v1beta1.KubeadmConfig{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } if restored.Spec.JoinConfiguration != nil && restored.Spec.JoinConfiguration.NodeRegistration.IgnorePreflightErrors != nil { if dst.Spec.JoinConfiguration == nil { - dst.Spec.JoinConfiguration = &kubeadmbootstrapv1alpha4.JoinConfiguration{} + dst.Spec.JoinConfiguration = &v1beta1.JoinConfiguration{} } dst.Spec.JoinConfiguration.NodeRegistration.IgnorePreflightErrors = restored.Spec.JoinConfiguration.NodeRegistration.IgnorePreflightErrors } if restored.Spec.InitConfiguration != nil && restored.Spec.InitConfiguration.NodeRegistration.IgnorePreflightErrors != nil { if dst.Spec.InitConfiguration == nil { - dst.Spec.InitConfiguration = &kubeadmbootstrapv1alpha4.InitConfiguration{} + dst.Spec.InitConfiguration = &v1beta1.InitConfiguration{} } dst.Spec.InitConfiguration.NodeRegistration.IgnorePreflightErrors = restored.Spec.InitConfiguration.NodeRegistration.IgnorePreflightErrors } @@ -55,11 +54,10 @@ func (src *KubeadmConfig) ConvertTo(dstRaw conversion.Hub) error { return nil } -// ConvertFrom converts from the KubeadmConfig Hub version (v1alpha4) to this version. func (dst *KubeadmConfig) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*kubeadmbootstrapv1alpha4.KubeadmConfig) + src := srcRaw.(*v1beta1.KubeadmConfig) - if err := Convert_v1alpha4_KubeadmConfig_To_v1alpha3_KubeadmConfig(src, dst, nil); err != nil { + if err := Convert_v1beta1_KubeadmConfig_To_v1alpha3_KubeadmConfig(src, dst, nil); err != nil { return err } @@ -71,42 +69,41 @@ func (dst *KubeadmConfig) ConvertFrom(srcRaw conversion.Hub) error { return nil } -// ConvertTo converts this KubeadmConfigList to the Hub version (v1alpha4). func (src *KubeadmConfigList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*kubeadmbootstrapv1alpha4.KubeadmConfigList) - return Convert_v1alpha3_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(src, dst, nil) + dst := dstRaw.(*v1beta1.KubeadmConfigList) + + return Convert_v1alpha3_KubeadmConfigList_To_v1beta1_KubeadmConfigList(src, dst, nil) } -// ConvertFrom converts from the KubeadmConfigList Hub version (v1alpha4) to this version. func (dst *KubeadmConfigList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*kubeadmbootstrapv1alpha4.KubeadmConfigList) - return Convert_v1alpha4_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(src, dst, nil) + src := srcRaw.(*v1beta1.KubeadmConfigList) + + return Convert_v1beta1_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(src, dst, nil) } -// ConvertTo converts this KubeadmConfigTemplate to the Hub version (v1alpha4). func (src *KubeadmConfigTemplate) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*kubeadmbootstrapv1alpha4.KubeadmConfigTemplate) + dst := dstRaw.(*v1beta1.KubeadmConfigTemplate) - if err := Convert_v1alpha3_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(src, dst, nil); err != nil { + if err := Convert_v1alpha3_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &kubeadmbootstrapv1alpha4.KubeadmConfigTemplate{} + restored := &v1beta1.KubeadmConfigTemplate{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } if restored.Spec.Template.Spec.JoinConfiguration != nil && restored.Spec.Template.Spec.JoinConfiguration.NodeRegistration.IgnorePreflightErrors != nil { if dst.Spec.Template.Spec.JoinConfiguration == nil { - dst.Spec.Template.Spec.JoinConfiguration = &kubeadmbootstrapv1alpha4.JoinConfiguration{} + dst.Spec.Template.Spec.JoinConfiguration = &v1beta1.JoinConfiguration{} } dst.Spec.Template.Spec.JoinConfiguration.NodeRegistration.IgnorePreflightErrors = restored.Spec.Template.Spec.JoinConfiguration.NodeRegistration.IgnorePreflightErrors } if restored.Spec.Template.Spec.InitConfiguration != nil && restored.Spec.Template.Spec.InitConfiguration.NodeRegistration.IgnorePreflightErrors != nil { if dst.Spec.Template.Spec.InitConfiguration == nil { - dst.Spec.Template.Spec.InitConfiguration = &kubeadmbootstrapv1alpha4.InitConfiguration{} + dst.Spec.Template.Spec.InitConfiguration = &v1beta1.InitConfiguration{} } dst.Spec.Template.Spec.InitConfiguration.NodeRegistration.IgnorePreflightErrors = restored.Spec.Template.Spec.InitConfiguration.NodeRegistration.IgnorePreflightErrors } @@ -114,11 +111,10 @@ func (src *KubeadmConfigTemplate) ConvertTo(dstRaw conversion.Hub) error { return nil } -// ConvertFrom converts from the KubeadmConfigTemplate Hub version (v1alpha4) to this version. func (dst *KubeadmConfigTemplate) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*kubeadmbootstrapv1alpha4.KubeadmConfigTemplate) + src := srcRaw.(*v1beta1.KubeadmConfigTemplate) - if err := Convert_v1alpha4_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(src, dst, nil); err != nil { + if err := Convert_v1beta1_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(src, dst, nil); err != nil { return err } @@ -130,54 +126,53 @@ func (dst *KubeadmConfigTemplate) ConvertFrom(srcRaw conversion.Hub) error { return nil } -// ConvertTo converts this KubeadmConfigTemplateList to the Hub version (v1alpha3). func (src *KubeadmConfigTemplateList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*kubeadmbootstrapv1alpha4.KubeadmConfigTemplateList) - return Convert_v1alpha3_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList(src, dst, nil) + dst := dstRaw.(*v1beta1.KubeadmConfigTemplateList) + + return Convert_v1alpha3_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList(src, dst, nil) } -// ConvertFrom converts from the KubeadmConfigTemplateList Hub version (v1alpha3) to this version. func (dst *KubeadmConfigTemplateList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*kubeadmbootstrapv1alpha4.KubeadmConfigTemplateList) - return Convert_v1alpha4_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList(src, dst, nil) + src := srcRaw.(*v1beta1.KubeadmConfigTemplateList) + + return Convert_v1beta1_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList(src, dst, nil) } -// Convert_v1alpha3_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(in *KubeadmConfigStatus, out *kubeadmbootstrapv1alpha4.KubeadmConfigStatus, s apiconversion.Scope) error { //nolint +func Convert_v1alpha3_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(in *KubeadmConfigStatus, out *v1beta1.KubeadmConfigStatus, s apiconversion.Scope) error { //nolint // KubeadmConfigStatus.BootstrapData has been removed in v1alpha4 because its content has been moved to the bootstrap data secret, value will be lost during conversion. - return autoConvert_v1alpha3_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(in, out, s) + return autoConvert_v1alpha3_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(in, out, s) } -func Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *kubeadmbootstrapv1alpha4.ClusterConfiguration, out *kubeadmbootstrapv1beta1.ClusterConfiguration, s apiconversion.Scope) error { +func Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *upstreamv1beta1.ClusterConfiguration, s apiconversion.Scope) error { // DNS.Type was removed in v1alpha4 because only CoreDNS is supported; the information will be left to empty (kubeadm defaults it to CoredDNS); // Existing clusters using kube-dns or other DNS solutions will continue to be managed/supported via the skip-coredns annotation. // ClusterConfiguration.UseHyperKubeImage was removed in kubeadm v1alpha4 API - return kubeadmbootstrapv1beta1.Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in, out, s) + return upstreamv1beta1.Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration(in, out, s) } -func Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *kubeadmbootstrapv1beta1.ClusterConfiguration, out *kubeadmbootstrapv1alpha4.ClusterConfiguration, s apiconversion.Scope) error { +func Convert_upstreamv1beta1_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *upstreamv1beta1.ClusterConfiguration, out *v1beta1.ClusterConfiguration, s apiconversion.Scope) error { // DNS.Type was removed in v1alpha4 because only CoreDNS is supported; the information will be left to empty (kubeadm defaults it to CoredDNS); // ClusterConfiguration.UseHyperKubeImage was removed in kubeadm v1alpha4 API - return kubeadmbootstrapv1beta1.Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in, out, s) + return upstreamv1beta1.Convert_upstreamv1beta1_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in, out, s) } -func Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(in *kubeadmbootstrapv1alpha4.InitConfiguration, out *kubeadmbootstrapv1beta1.InitConfiguration, s apiconversion.Scope) error { +func Convert_upstreamv1beta1_InitConfiguration_To_v1beta1_InitConfiguration(in *upstreamv1beta1.InitConfiguration, out *v1beta1.InitConfiguration, s apiconversion.Scope) error { // NodeRegistrationOptions.IgnorePreflightErrors does not exist in kubeadm v1beta1 API - return kubeadmbootstrapv1beta1.Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(in, out, s) + return upstreamv1beta1.Convert_upstreamv1beta1_InitConfiguration_To_v1beta1_InitConfiguration(in, out, s) } -func Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(in *kubeadmbootstrapv1beta1.InitConfiguration, out *kubeadmbootstrapv1alpha4.InitConfiguration, s apiconversion.Scope) error { +func Convert_v1beta1_InitConfiguration_To_upstreamv1beta1_InitConfiguration(in *v1beta1.InitConfiguration, out *upstreamv1beta1.InitConfiguration, s apiconversion.Scope) error { // NodeRegistrationOptions.IgnorePreflightErrors does not exist in kubeadm v1beta1 API - return kubeadmbootstrapv1beta1.Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(in, out, s) + return upstreamv1beta1.Convert_v1beta1_InitConfiguration_To_upstreamv1beta1_InitConfiguration(in, out, s) } -func Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *kubeadmbootstrapv1alpha4.JoinConfiguration, out *kubeadmbootstrapv1beta1.JoinConfiguration, s apiconversion.Scope) error { +func Convert_upstreamv1beta1_JoinConfiguration_To_v1beta1_JoinConfiguration(in *upstreamv1beta1.JoinConfiguration, out *v1beta1.JoinConfiguration, s apiconversion.Scope) error { // NodeRegistrationOptions.IgnorePreflightErrors does not exist in kubeadm v1beta1 API - return kubeadmbootstrapv1beta1.Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in, out, s) + return upstreamv1beta1.Convert_upstreamv1beta1_JoinConfiguration_To_v1beta1_JoinConfiguration(in, out, s) } -func Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *kubeadmbootstrapv1beta1.JoinConfiguration, out *kubeadmbootstrapv1alpha4.JoinConfiguration, s apiconversion.Scope) error { +func Convert_v1beta1_JoinConfiguration_To_upstreamv1beta1_JoinConfiguration(in *v1beta1.JoinConfiguration, out *upstreamv1beta1.JoinConfiguration, s apiconversion.Scope) error { // NodeRegistrationOptions.IgnorePreflightErrors does not exist in kubeadm v1beta1 API - return kubeadmbootstrapv1beta1.Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in, out, s) + return upstreamv1beta1.Convert_v1beta1_JoinConfiguration_To_upstreamv1beta1_JoinConfiguration(in, out, s) } diff --git a/bootstrap/kubeadm/api/v1alpha3/conversion_test.go b/bootstrap/kubeadm/api/v1alpha3/conversion_test.go index e416231bf42b..40a20dae029e 100644 --- a/bootstrap/kubeadm/api/v1alpha3/conversion_test.go +++ b/bootstrap/kubeadm/api/v1alpha3/conversion_test.go @@ -22,21 +22,19 @@ import ( fuzz "github.com/google/gofuzz" "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - kubeadmbootstrapv1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" - kubeadmv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + kubeadmv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) func TestFuzzyConversion(t *testing.T) { t.Run("for KubeadmConfig", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.KubeadmConfig{}, + Hub: &v1beta1.KubeadmConfig{}, Spoke: &KubeadmConfig{}, FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs}, })) t.Run("for KubeadmConfigTemplate", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.KubeadmConfigTemplate{}, + Hub: &v1beta1.KubeadmConfigTemplate{}, Spoke: &KubeadmConfigTemplate{}, FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs}, })) @@ -58,7 +56,7 @@ func fuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} { // This function effectively disables any fuzzing for the token by setting // the values for ID and Secret to working alphanumeric values. kubeadmBootstrapTokenStringFuzzerV1beta1, - kubeadmBootstrapTokenStringFuzzerV1Alpha4, + kubeadmBootstrapTokenStringFuzzerV1Beta1, } } @@ -69,14 +67,14 @@ func KubeadmConfigStatusFuzzer(obj *KubeadmConfigStatus, c fuzz.Continue) { obj.BootstrapData = nil } -func dnsFuzzer(obj *v1beta1.DNS, c fuzz.Continue) { +func dnsFuzzer(obj *kubeadmv1beta1.DNS, c fuzz.Continue) { c.FuzzNoCustom(obj) // DNS.Type does not exists in v1alpha4, so setting it to empty string in order to avoid v1alpha3 --> v1alpha4 --> v1alpha3 round trip errors. obj.Type = "" } -func clusterConfigurationFuzzer(obj *v1beta1.ClusterConfiguration, c fuzz.Continue) { +func clusterConfigurationFuzzer(obj *kubeadmv1beta1.ClusterConfiguration, c fuzz.Continue) { c.FuzzNoCustom(obj) // ClusterConfiguration.UseHyperKubeImage has been removed in v1alpha4, so setting it to false in order to avoid v1beta1 --> v1alpha4 --> v1beta1 round trip errors. @@ -88,7 +86,7 @@ func kubeadmBootstrapTokenStringFuzzerV1beta1(in *kubeadmv1beta1.BootstrapTokenS in.Secret = "abcdef0123456789" } -func kubeadmBootstrapTokenStringFuzzerV1Alpha4(in *kubeadmbootstrapv1alpha4.BootstrapTokenString, c fuzz.Continue) { +func kubeadmBootstrapTokenStringFuzzerV1Beta1(in *v1beta1.BootstrapTokenString, c fuzz.Continue) { in.ID = "abcdef" in.Secret = "abcdef0123456789" } diff --git a/bootstrap/kubeadm/api/v1alpha3/doc.go b/bootstrap/kubeadm/api/v1alpha3/doc.go index 0a44188016e0..cc3e71c666e9 100644 --- a/bootstrap/kubeadm/api/v1alpha3/doc.go +++ b/bootstrap/kubeadm/api/v1alpha3/doc.go @@ -15,5 +15,5 @@ limitations under the License. */ // Package v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 package v1alpha3 diff --git a/bootstrap/kubeadm/api/v1alpha3/kubeadmconfig_types.go b/bootstrap/kubeadm/api/v1alpha3/kubeadmconfig_types.go index 2e6d7836e7fb..940fe4ebe7a9 100644 --- a/bootstrap/kubeadm/api/v1alpha3/kubeadmconfig_types.go +++ b/bootstrap/kubeadm/api/v1alpha3/kubeadmconfig_types.go @@ -19,7 +19,7 @@ package v1alpha3 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3" - kubeadmv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" + kubeadmv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" ) // Format specifies the output format of the bootstrap data diff --git a/bootstrap/kubeadm/api/v1alpha3/webhook_test.go b/bootstrap/kubeadm/api/v1alpha3/webhook_test.go index 075071463fc6..d97cb41ce602 100644 --- a/bootstrap/kubeadm/api/v1alpha3/webhook_test.go +++ b/bootstrap/kubeadm/api/v1alpha3/webhook_test.go @@ -24,10 +24,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - "sigs.k8s.io/controller-runtime/pkg/client" - - kubeadmv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" + kubeadmv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" "sigs.k8s.io/cluster-api/util" + "sigs.k8s.io/controller-runtime/pkg/client" ) func TestKubeadmConfigConversion(t *testing.T) { diff --git a/bootstrap/kubeadm/api/v1alpha3/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha3/zz_generated.conversion.go index b20aa66189ce..f9f8e3cf096c 100644 --- a/bootstrap/kubeadm/api/v1alpha3/zz_generated.conversion.go +++ b/bootstrap/kubeadm/api/v1alpha3/zz_generated.conversion.go @@ -1,4 +1,4 @@ -// +build !ignore_autogenerated_kubeadm_bootstrap_v1alpha3 +// +build !ignore_autogenerated_kubeadm_bootstrap /* Copyright The Kubernetes Authors. @@ -26,9 +26,9 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" apiv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - v1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - v1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + v1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + upstreamv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" ) func init() { @@ -38,237 +38,237 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*DiskSetup)(nil), (*v1alpha4.DiskSetup)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DiskSetup_To_v1alpha4_DiskSetup(a.(*DiskSetup), b.(*v1alpha4.DiskSetup), scope) + if err := s.AddGeneratedConversionFunc((*DiskSetup)(nil), (*v1beta1.DiskSetup)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DiskSetup_To_v1beta1_DiskSetup(a.(*DiskSetup), b.(*v1beta1.DiskSetup), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DiskSetup)(nil), (*DiskSetup)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DiskSetup_To_v1alpha3_DiskSetup(a.(*v1alpha4.DiskSetup), b.(*DiskSetup), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DiskSetup)(nil), (*DiskSetup)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DiskSetup_To_v1alpha3_DiskSetup(a.(*v1beta1.DiskSetup), b.(*DiskSetup), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*File)(nil), (*v1alpha4.File)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_File_To_v1alpha4_File(a.(*File), b.(*v1alpha4.File), scope) + if err := s.AddGeneratedConversionFunc((*File)(nil), (*v1beta1.File)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_File_To_v1beta1_File(a.(*File), b.(*v1beta1.File), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.File)(nil), (*File)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_File_To_v1alpha3_File(a.(*v1alpha4.File), b.(*File), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.File)(nil), (*File)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_File_To_v1alpha3_File(a.(*v1beta1.File), b.(*File), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*FileSource)(nil), (*v1alpha4.FileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_FileSource_To_v1alpha4_FileSource(a.(*FileSource), b.(*v1alpha4.FileSource), scope) + if err := s.AddGeneratedConversionFunc((*FileSource)(nil), (*v1beta1.FileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_FileSource_To_v1beta1_FileSource(a.(*FileSource), b.(*v1beta1.FileSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.FileSource)(nil), (*FileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_FileSource_To_v1alpha3_FileSource(a.(*v1alpha4.FileSource), b.(*FileSource), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.FileSource)(nil), (*FileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FileSource_To_v1alpha3_FileSource(a.(*v1beta1.FileSource), b.(*FileSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*Filesystem)(nil), (*v1alpha4.Filesystem)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Filesystem_To_v1alpha4_Filesystem(a.(*Filesystem), b.(*v1alpha4.Filesystem), scope) + if err := s.AddGeneratedConversionFunc((*Filesystem)(nil), (*v1beta1.Filesystem)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_Filesystem_To_v1beta1_Filesystem(a.(*Filesystem), b.(*v1beta1.Filesystem), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Filesystem)(nil), (*Filesystem)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Filesystem_To_v1alpha3_Filesystem(a.(*v1alpha4.Filesystem), b.(*Filesystem), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.Filesystem)(nil), (*Filesystem)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Filesystem_To_v1alpha3_Filesystem(a.(*v1beta1.Filesystem), b.(*Filesystem), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeadmConfig)(nil), (*v1alpha4.KubeadmConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmConfig_To_v1alpha4_KubeadmConfig(a.(*KubeadmConfig), b.(*v1alpha4.KubeadmConfig), scope) + if err := s.AddGeneratedConversionFunc((*KubeadmConfig)(nil), (*v1beta1.KubeadmConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmConfig_To_v1beta1_KubeadmConfig(a.(*KubeadmConfig), b.(*v1beta1.KubeadmConfig), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.KubeadmConfig)(nil), (*KubeadmConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmConfig_To_v1alpha3_KubeadmConfig(a.(*v1alpha4.KubeadmConfig), b.(*KubeadmConfig), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfig)(nil), (*KubeadmConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfig_To_v1alpha3_KubeadmConfig(a.(*v1beta1.KubeadmConfig), b.(*KubeadmConfig), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeadmConfigList)(nil), (*v1alpha4.KubeadmConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(a.(*KubeadmConfigList), b.(*v1alpha4.KubeadmConfigList), scope) + if err := s.AddGeneratedConversionFunc((*KubeadmConfigList)(nil), (*v1beta1.KubeadmConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmConfigList_To_v1beta1_KubeadmConfigList(a.(*KubeadmConfigList), b.(*v1beta1.KubeadmConfigList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.KubeadmConfigList)(nil), (*KubeadmConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(a.(*v1alpha4.KubeadmConfigList), b.(*KubeadmConfigList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigList)(nil), (*KubeadmConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(a.(*v1beta1.KubeadmConfigList), b.(*KubeadmConfigList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeadmConfigSpec)(nil), (*v1alpha4.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(a.(*KubeadmConfigSpec), b.(*v1alpha4.KubeadmConfigSpec), scope) + if err := s.AddGeneratedConversionFunc((*KubeadmConfigSpec)(nil), (*v1beta1.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(a.(*KubeadmConfigSpec), b.(*v1beta1.KubeadmConfigSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.KubeadmConfigSpec)(nil), (*KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(a.(*v1alpha4.KubeadmConfigSpec), b.(*KubeadmConfigSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigSpec)(nil), (*KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(a.(*v1beta1.KubeadmConfigSpec), b.(*KubeadmConfigSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.KubeadmConfigStatus)(nil), (*KubeadmConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(a.(*v1alpha4.KubeadmConfigStatus), b.(*KubeadmConfigStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigStatus)(nil), (*KubeadmConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(a.(*v1beta1.KubeadmConfigStatus), b.(*KubeadmConfigStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplate)(nil), (*v1alpha4.KubeadmConfigTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(a.(*KubeadmConfigTemplate), b.(*v1alpha4.KubeadmConfigTemplate), scope) + if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplate)(nil), (*v1beta1.KubeadmConfigTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(a.(*KubeadmConfigTemplate), b.(*v1beta1.KubeadmConfigTemplate), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.KubeadmConfigTemplate)(nil), (*KubeadmConfigTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(a.(*v1alpha4.KubeadmConfigTemplate), b.(*KubeadmConfigTemplate), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigTemplate)(nil), (*KubeadmConfigTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(a.(*v1beta1.KubeadmConfigTemplate), b.(*KubeadmConfigTemplate), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateList)(nil), (*v1alpha4.KubeadmConfigTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList(a.(*KubeadmConfigTemplateList), b.(*v1alpha4.KubeadmConfigTemplateList), scope) + if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateList)(nil), (*v1beta1.KubeadmConfigTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList(a.(*KubeadmConfigTemplateList), b.(*v1beta1.KubeadmConfigTemplateList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.KubeadmConfigTemplateList)(nil), (*KubeadmConfigTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList(a.(*v1alpha4.KubeadmConfigTemplateList), b.(*KubeadmConfigTemplateList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigTemplateList)(nil), (*KubeadmConfigTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList(a.(*v1beta1.KubeadmConfigTemplateList), b.(*KubeadmConfigTemplateList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateResource)(nil), (*v1alpha4.KubeadmConfigTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(a.(*KubeadmConfigTemplateResource), b.(*v1alpha4.KubeadmConfigTemplateResource), scope) + if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateResource)(nil), (*v1beta1.KubeadmConfigTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(a.(*KubeadmConfigTemplateResource), b.(*v1beta1.KubeadmConfigTemplateResource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.KubeadmConfigTemplateResource)(nil), (*KubeadmConfigTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(a.(*v1alpha4.KubeadmConfigTemplateResource), b.(*KubeadmConfigTemplateResource), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigTemplateResource)(nil), (*KubeadmConfigTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(a.(*v1beta1.KubeadmConfigTemplateResource), b.(*KubeadmConfigTemplateResource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateSpec)(nil), (*v1alpha4.KubeadmConfigTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec(a.(*KubeadmConfigTemplateSpec), b.(*v1alpha4.KubeadmConfigTemplateSpec), scope) + if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateSpec)(nil), (*v1beta1.KubeadmConfigTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(a.(*KubeadmConfigTemplateSpec), b.(*v1beta1.KubeadmConfigTemplateSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.KubeadmConfigTemplateSpec)(nil), (*KubeadmConfigTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec(a.(*v1alpha4.KubeadmConfigTemplateSpec), b.(*KubeadmConfigTemplateSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigTemplateSpec)(nil), (*KubeadmConfigTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec(a.(*v1beta1.KubeadmConfigTemplateSpec), b.(*KubeadmConfigTemplateSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NTP)(nil), (*v1alpha4.NTP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NTP_To_v1alpha4_NTP(a.(*NTP), b.(*v1alpha4.NTP), scope) + if err := s.AddGeneratedConversionFunc((*NTP)(nil), (*v1beta1.NTP)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NTP_To_v1beta1_NTP(a.(*NTP), b.(*v1beta1.NTP), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.NTP)(nil), (*NTP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NTP_To_v1alpha3_NTP(a.(*v1alpha4.NTP), b.(*NTP), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.NTP)(nil), (*NTP)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NTP_To_v1alpha3_NTP(a.(*v1beta1.NTP), b.(*NTP), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*Partition)(nil), (*v1alpha4.Partition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Partition_To_v1alpha4_Partition(a.(*Partition), b.(*v1alpha4.Partition), scope) + if err := s.AddGeneratedConversionFunc((*Partition)(nil), (*v1beta1.Partition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_Partition_To_v1beta1_Partition(a.(*Partition), b.(*v1beta1.Partition), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Partition)(nil), (*Partition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Partition_To_v1alpha3_Partition(a.(*v1alpha4.Partition), b.(*Partition), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.Partition)(nil), (*Partition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Partition_To_v1alpha3_Partition(a.(*v1beta1.Partition), b.(*Partition), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*SecretFileSource)(nil), (*v1alpha4.SecretFileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_SecretFileSource_To_v1alpha4_SecretFileSource(a.(*SecretFileSource), b.(*v1alpha4.SecretFileSource), scope) + if err := s.AddGeneratedConversionFunc((*SecretFileSource)(nil), (*v1beta1.SecretFileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_SecretFileSource_To_v1beta1_SecretFileSource(a.(*SecretFileSource), b.(*v1beta1.SecretFileSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.SecretFileSource)(nil), (*SecretFileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_SecretFileSource_To_v1alpha3_SecretFileSource(a.(*v1alpha4.SecretFileSource), b.(*SecretFileSource), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.SecretFileSource)(nil), (*SecretFileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SecretFileSource_To_v1alpha3_SecretFileSource(a.(*v1beta1.SecretFileSource), b.(*SecretFileSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*User)(nil), (*v1alpha4.User)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_User_To_v1alpha4_User(a.(*User), b.(*v1alpha4.User), scope) + if err := s.AddGeneratedConversionFunc((*User)(nil), (*v1beta1.User)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_User_To_v1beta1_User(a.(*User), b.(*v1beta1.User), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.User)(nil), (*User)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_User_To_v1alpha3_User(a.(*v1alpha4.User), b.(*User), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.User)(nil), (*User)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_User_To_v1alpha3_User(a.(*v1beta1.User), b.(*User), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*KubeadmConfigStatus)(nil), (*v1alpha4.KubeadmConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(a.(*KubeadmConfigStatus), b.(*v1alpha4.KubeadmConfigStatus), scope) + if err := s.AddConversionFunc((*upstreamv1beta1.ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*upstreamv1beta1.ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*v1alpha4.ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + if err := s.AddConversionFunc((*upstreamv1beta1.InitConfiguration)(nil), (*v1beta1.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_InitConfiguration_To_v1beta1_InitConfiguration(a.(*upstreamv1beta1.InitConfiguration), b.(*v1beta1.InitConfiguration), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.InitConfiguration)(nil), (*v1beta1.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(a.(*v1alpha4.InitConfiguration), b.(*v1beta1.InitConfiguration), scope) + if err := s.AddConversionFunc((*upstreamv1beta1.JoinConfiguration)(nil), (*v1beta1.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_JoinConfiguration_To_v1beta1_JoinConfiguration(a.(*upstreamv1beta1.JoinConfiguration), b.(*v1beta1.JoinConfiguration), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.JoinConfiguration)(nil), (*v1beta1.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(a.(*v1alpha4.JoinConfiguration), b.(*v1beta1.JoinConfiguration), scope) + if err := s.AddConversionFunc((*KubeadmConfigStatus)(nil), (*v1beta1.KubeadmConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(a.(*KubeadmConfigStatus), b.(*v1beta1.KubeadmConfigStatus), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*v1alpha4.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*v1alpha4.ClusterConfiguration), scope) + if err := s.AddConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*upstreamv1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*upstreamv1beta1.ClusterConfiguration), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1beta1.InitConfiguration)(nil), (*v1alpha4.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(a.(*v1beta1.InitConfiguration), b.(*v1alpha4.InitConfiguration), scope) + if err := s.AddConversionFunc((*v1beta1.InitConfiguration)(nil), (*upstreamv1beta1.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_InitConfiguration_To_upstreamv1beta1_InitConfiguration(a.(*v1beta1.InitConfiguration), b.(*upstreamv1beta1.InitConfiguration), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1beta1.JoinConfiguration)(nil), (*v1alpha4.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(a.(*v1beta1.JoinConfiguration), b.(*v1alpha4.JoinConfiguration), scope) + if err := s.AddConversionFunc((*v1beta1.JoinConfiguration)(nil), (*upstreamv1beta1.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JoinConfiguration_To_upstreamv1beta1_JoinConfiguration(a.(*v1beta1.JoinConfiguration), b.(*upstreamv1beta1.JoinConfiguration), scope) }); err != nil { return err } return nil } -func autoConvert_v1alpha3_DiskSetup_To_v1alpha4_DiskSetup(in *DiskSetup, out *v1alpha4.DiskSetup, s conversion.Scope) error { - out.Partitions = *(*[]v1alpha4.Partition)(unsafe.Pointer(&in.Partitions)) - out.Filesystems = *(*[]v1alpha4.Filesystem)(unsafe.Pointer(&in.Filesystems)) +func autoConvert_v1alpha3_DiskSetup_To_v1beta1_DiskSetup(in *DiskSetup, out *v1beta1.DiskSetup, s conversion.Scope) error { + out.Partitions = *(*[]v1beta1.Partition)(unsafe.Pointer(&in.Partitions)) + out.Filesystems = *(*[]v1beta1.Filesystem)(unsafe.Pointer(&in.Filesystems)) return nil } -// Convert_v1alpha3_DiskSetup_To_v1alpha4_DiskSetup is an autogenerated conversion function. -func Convert_v1alpha3_DiskSetup_To_v1alpha4_DiskSetup(in *DiskSetup, out *v1alpha4.DiskSetup, s conversion.Scope) error { - return autoConvert_v1alpha3_DiskSetup_To_v1alpha4_DiskSetup(in, out, s) +// Convert_v1alpha3_DiskSetup_To_v1beta1_DiskSetup is an autogenerated conversion function. +func Convert_v1alpha3_DiskSetup_To_v1beta1_DiskSetup(in *DiskSetup, out *v1beta1.DiskSetup, s conversion.Scope) error { + return autoConvert_v1alpha3_DiskSetup_To_v1beta1_DiskSetup(in, out, s) } -func autoConvert_v1alpha4_DiskSetup_To_v1alpha3_DiskSetup(in *v1alpha4.DiskSetup, out *DiskSetup, s conversion.Scope) error { +func autoConvert_v1beta1_DiskSetup_To_v1alpha3_DiskSetup(in *v1beta1.DiskSetup, out *DiskSetup, s conversion.Scope) error { out.Partitions = *(*[]Partition)(unsafe.Pointer(&in.Partitions)) out.Filesystems = *(*[]Filesystem)(unsafe.Pointer(&in.Filesystems)) return nil } -// Convert_v1alpha4_DiskSetup_To_v1alpha3_DiskSetup is an autogenerated conversion function. -func Convert_v1alpha4_DiskSetup_To_v1alpha3_DiskSetup(in *v1alpha4.DiskSetup, out *DiskSetup, s conversion.Scope) error { - return autoConvert_v1alpha4_DiskSetup_To_v1alpha3_DiskSetup(in, out, s) +// Convert_v1beta1_DiskSetup_To_v1alpha3_DiskSetup is an autogenerated conversion function. +func Convert_v1beta1_DiskSetup_To_v1alpha3_DiskSetup(in *v1beta1.DiskSetup, out *DiskSetup, s conversion.Scope) error { + return autoConvert_v1beta1_DiskSetup_To_v1alpha3_DiskSetup(in, out, s) } -func autoConvert_v1alpha3_File_To_v1alpha4_File(in *File, out *v1alpha4.File, s conversion.Scope) error { +func autoConvert_v1alpha3_File_To_v1beta1_File(in *File, out *v1beta1.File, s conversion.Scope) error { out.Path = in.Path out.Owner = in.Owner out.Permissions = in.Permissions - out.Encoding = v1alpha4.Encoding(in.Encoding) + out.Encoding = v1beta1.Encoding(in.Encoding) out.Content = in.Content - out.ContentFrom = (*v1alpha4.FileSource)(unsafe.Pointer(in.ContentFrom)) + out.ContentFrom = (*v1beta1.FileSource)(unsafe.Pointer(in.ContentFrom)) return nil } -// Convert_v1alpha3_File_To_v1alpha4_File is an autogenerated conversion function. -func Convert_v1alpha3_File_To_v1alpha4_File(in *File, out *v1alpha4.File, s conversion.Scope) error { - return autoConvert_v1alpha3_File_To_v1alpha4_File(in, out, s) +// Convert_v1alpha3_File_To_v1beta1_File is an autogenerated conversion function. +func Convert_v1alpha3_File_To_v1beta1_File(in *File, out *v1beta1.File, s conversion.Scope) error { + return autoConvert_v1alpha3_File_To_v1beta1_File(in, out, s) } -func autoConvert_v1alpha4_File_To_v1alpha3_File(in *v1alpha4.File, out *File, s conversion.Scope) error { +func autoConvert_v1beta1_File_To_v1alpha3_File(in *v1beta1.File, out *File, s conversion.Scope) error { out.Path = in.Path out.Owner = in.Owner out.Permissions = in.Permissions @@ -278,36 +278,36 @@ func autoConvert_v1alpha4_File_To_v1alpha3_File(in *v1alpha4.File, out *File, s return nil } -// Convert_v1alpha4_File_To_v1alpha3_File is an autogenerated conversion function. -func Convert_v1alpha4_File_To_v1alpha3_File(in *v1alpha4.File, out *File, s conversion.Scope) error { - return autoConvert_v1alpha4_File_To_v1alpha3_File(in, out, s) +// Convert_v1beta1_File_To_v1alpha3_File is an autogenerated conversion function. +func Convert_v1beta1_File_To_v1alpha3_File(in *v1beta1.File, out *File, s conversion.Scope) error { + return autoConvert_v1beta1_File_To_v1alpha3_File(in, out, s) } -func autoConvert_v1alpha3_FileSource_To_v1alpha4_FileSource(in *FileSource, out *v1alpha4.FileSource, s conversion.Scope) error { - if err := Convert_v1alpha3_SecretFileSource_To_v1alpha4_SecretFileSource(&in.Secret, &out.Secret, s); err != nil { +func autoConvert_v1alpha3_FileSource_To_v1beta1_FileSource(in *FileSource, out *v1beta1.FileSource, s conversion.Scope) error { + if err := Convert_v1alpha3_SecretFileSource_To_v1beta1_SecretFileSource(&in.Secret, &out.Secret, s); err != nil { return err } return nil } -// Convert_v1alpha3_FileSource_To_v1alpha4_FileSource is an autogenerated conversion function. -func Convert_v1alpha3_FileSource_To_v1alpha4_FileSource(in *FileSource, out *v1alpha4.FileSource, s conversion.Scope) error { - return autoConvert_v1alpha3_FileSource_To_v1alpha4_FileSource(in, out, s) +// Convert_v1alpha3_FileSource_To_v1beta1_FileSource is an autogenerated conversion function. +func Convert_v1alpha3_FileSource_To_v1beta1_FileSource(in *FileSource, out *v1beta1.FileSource, s conversion.Scope) error { + return autoConvert_v1alpha3_FileSource_To_v1beta1_FileSource(in, out, s) } -func autoConvert_v1alpha4_FileSource_To_v1alpha3_FileSource(in *v1alpha4.FileSource, out *FileSource, s conversion.Scope) error { - if err := Convert_v1alpha4_SecretFileSource_To_v1alpha3_SecretFileSource(&in.Secret, &out.Secret, s); err != nil { +func autoConvert_v1beta1_FileSource_To_v1alpha3_FileSource(in *v1beta1.FileSource, out *FileSource, s conversion.Scope) error { + if err := Convert_v1beta1_SecretFileSource_To_v1alpha3_SecretFileSource(&in.Secret, &out.Secret, s); err != nil { return err } return nil } -// Convert_v1alpha4_FileSource_To_v1alpha3_FileSource is an autogenerated conversion function. -func Convert_v1alpha4_FileSource_To_v1alpha3_FileSource(in *v1alpha4.FileSource, out *FileSource, s conversion.Scope) error { - return autoConvert_v1alpha4_FileSource_To_v1alpha3_FileSource(in, out, s) +// Convert_v1beta1_FileSource_To_v1alpha3_FileSource is an autogenerated conversion function. +func Convert_v1beta1_FileSource_To_v1alpha3_FileSource(in *v1beta1.FileSource, out *FileSource, s conversion.Scope) error { + return autoConvert_v1beta1_FileSource_To_v1alpha3_FileSource(in, out, s) } -func autoConvert_v1alpha3_Filesystem_To_v1alpha4_Filesystem(in *Filesystem, out *v1alpha4.Filesystem, s conversion.Scope) error { +func autoConvert_v1alpha3_Filesystem_To_v1beta1_Filesystem(in *Filesystem, out *v1beta1.Filesystem, s conversion.Scope) error { out.Device = in.Device out.Filesystem = in.Filesystem out.Label = in.Label @@ -318,12 +318,12 @@ func autoConvert_v1alpha3_Filesystem_To_v1alpha4_Filesystem(in *Filesystem, out return nil } -// Convert_v1alpha3_Filesystem_To_v1alpha4_Filesystem is an autogenerated conversion function. -func Convert_v1alpha3_Filesystem_To_v1alpha4_Filesystem(in *Filesystem, out *v1alpha4.Filesystem, s conversion.Scope) error { - return autoConvert_v1alpha3_Filesystem_To_v1alpha4_Filesystem(in, out, s) +// Convert_v1alpha3_Filesystem_To_v1beta1_Filesystem is an autogenerated conversion function. +func Convert_v1alpha3_Filesystem_To_v1beta1_Filesystem(in *Filesystem, out *v1beta1.Filesystem, s conversion.Scope) error { + return autoConvert_v1alpha3_Filesystem_To_v1beta1_Filesystem(in, out, s) } -func autoConvert_v1alpha4_Filesystem_To_v1alpha3_Filesystem(in *v1alpha4.Filesystem, out *Filesystem, s conversion.Scope) error { +func autoConvert_v1beta1_Filesystem_To_v1alpha3_Filesystem(in *v1beta1.Filesystem, out *Filesystem, s conversion.Scope) error { out.Device = in.Device out.Filesystem = in.Filesystem out.Label = in.Label @@ -334,50 +334,50 @@ func autoConvert_v1alpha4_Filesystem_To_v1alpha3_Filesystem(in *v1alpha4.Filesys return nil } -// Convert_v1alpha4_Filesystem_To_v1alpha3_Filesystem is an autogenerated conversion function. -func Convert_v1alpha4_Filesystem_To_v1alpha3_Filesystem(in *v1alpha4.Filesystem, out *Filesystem, s conversion.Scope) error { - return autoConvert_v1alpha4_Filesystem_To_v1alpha3_Filesystem(in, out, s) +// Convert_v1beta1_Filesystem_To_v1alpha3_Filesystem is an autogenerated conversion function. +func Convert_v1beta1_Filesystem_To_v1alpha3_Filesystem(in *v1beta1.Filesystem, out *Filesystem, s conversion.Scope) error { + return autoConvert_v1beta1_Filesystem_To_v1alpha3_Filesystem(in, out, s) } -func autoConvert_v1alpha3_KubeadmConfig_To_v1alpha4_KubeadmConfig(in *KubeadmConfig, out *v1alpha4.KubeadmConfig, s conversion.Scope) error { +func autoConvert_v1alpha3_KubeadmConfig_To_v1beta1_KubeadmConfig(in *KubeadmConfig, out *v1beta1.KubeadmConfig, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_KubeadmConfig_To_v1alpha4_KubeadmConfig is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmConfig_To_v1alpha4_KubeadmConfig(in *KubeadmConfig, out *v1alpha4.KubeadmConfig, s conversion.Scope) error { - return autoConvert_v1alpha3_KubeadmConfig_To_v1alpha4_KubeadmConfig(in, out, s) +// Convert_v1alpha3_KubeadmConfig_To_v1beta1_KubeadmConfig is an autogenerated conversion function. +func Convert_v1alpha3_KubeadmConfig_To_v1beta1_KubeadmConfig(in *KubeadmConfig, out *v1beta1.KubeadmConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_KubeadmConfig_To_v1beta1_KubeadmConfig(in, out, s) } -func autoConvert_v1alpha4_KubeadmConfig_To_v1alpha3_KubeadmConfig(in *v1alpha4.KubeadmConfig, out *KubeadmConfig, s conversion.Scope) error { +func autoConvert_v1beta1_KubeadmConfig_To_v1alpha3_KubeadmConfig(in *v1beta1.KubeadmConfig, out *KubeadmConfig, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_KubeadmConfig_To_v1alpha3_KubeadmConfig is an autogenerated conversion function. -func Convert_v1alpha4_KubeadmConfig_To_v1alpha3_KubeadmConfig(in *v1alpha4.KubeadmConfig, out *KubeadmConfig, s conversion.Scope) error { - return autoConvert_v1alpha4_KubeadmConfig_To_v1alpha3_KubeadmConfig(in, out, s) +// Convert_v1beta1_KubeadmConfig_To_v1alpha3_KubeadmConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfig_To_v1alpha3_KubeadmConfig(in *v1beta1.KubeadmConfig, out *KubeadmConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfig_To_v1alpha3_KubeadmConfig(in, out, s) } -func autoConvert_v1alpha3_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in *KubeadmConfigList, out *v1alpha4.KubeadmConfigList, s conversion.Scope) error { +func autoConvert_v1alpha3_KubeadmConfigList_To_v1beta1_KubeadmConfigList(in *KubeadmConfigList, out *v1beta1.KubeadmConfigList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.KubeadmConfig, len(*in)) + *out = make([]v1beta1.KubeadmConfig, len(*in)) for i := range *in { - if err := Convert_v1alpha3_KubeadmConfig_To_v1alpha4_KubeadmConfig(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_KubeadmConfig_To_v1beta1_KubeadmConfig(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -387,18 +387,18 @@ func autoConvert_v1alpha3_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in *Ku return nil } -// Convert_v1alpha3_KubeadmConfigList_To_v1alpha4_KubeadmConfigList is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in *KubeadmConfigList, out *v1alpha4.KubeadmConfigList, s conversion.Scope) error { - return autoConvert_v1alpha3_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in, out, s) +// Convert_v1alpha3_KubeadmConfigList_To_v1beta1_KubeadmConfigList is an autogenerated conversion function. +func Convert_v1alpha3_KubeadmConfigList_To_v1beta1_KubeadmConfigList(in *KubeadmConfigList, out *v1beta1.KubeadmConfigList, s conversion.Scope) error { + return autoConvert_v1alpha3_KubeadmConfigList_To_v1beta1_KubeadmConfigList(in, out, s) } -func autoConvert_v1alpha4_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(in *v1alpha4.KubeadmConfigList, out *KubeadmConfigList, s conversion.Scope) error { +func autoConvert_v1beta1_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(in *v1beta1.KubeadmConfigList, out *KubeadmConfigList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]KubeadmConfig, len(*in)) for i := range *in { - if err := Convert_v1alpha4_KubeadmConfig_To_v1alpha3_KubeadmConfig(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_KubeadmConfig_To_v1alpha3_KubeadmConfig(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -408,16 +408,16 @@ func autoConvert_v1alpha4_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(in *v1 return nil } -// Convert_v1alpha4_KubeadmConfigList_To_v1alpha3_KubeadmConfigList is an autogenerated conversion function. -func Convert_v1alpha4_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(in *v1alpha4.KubeadmConfigList, out *KubeadmConfigList, s conversion.Scope) error { - return autoConvert_v1alpha4_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(in, out, s) +// Convert_v1beta1_KubeadmConfigList_To_v1alpha3_KubeadmConfigList is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(in *v1beta1.KubeadmConfigList, out *KubeadmConfigList, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigList_To_v1alpha3_KubeadmConfigList(in, out, s) } -func autoConvert_v1alpha3_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in *KubeadmConfigSpec, out *v1alpha4.KubeadmConfigSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *KubeadmConfigSpec, out *v1beta1.KubeadmConfigSpec, s conversion.Scope) error { if in.ClusterConfiguration != nil { in, out := &in.ClusterConfiguration, &out.ClusterConfiguration - *out = new(v1alpha4.ClusterConfiguration) - if err := Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(*in, *out, s); err != nil { + *out = new(v1beta1.ClusterConfiguration) + if err := Convert_upstreamv1beta1_ClusterConfiguration_To_v1beta1_ClusterConfiguration(*in, *out, s); err != nil { return err } } else { @@ -425,8 +425,8 @@ func autoConvert_v1alpha3_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in *Ku } if in.InitConfiguration != nil { in, out := &in.InitConfiguration, &out.InitConfiguration - *out = new(v1alpha4.InitConfiguration) - if err := Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(*in, *out, s); err != nil { + *out = new(v1beta1.InitConfiguration) + if err := Convert_upstreamv1beta1_InitConfiguration_To_v1beta1_InitConfiguration(*in, *out, s); err != nil { return err } } else { @@ -434,36 +434,36 @@ func autoConvert_v1alpha3_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in *Ku } if in.JoinConfiguration != nil { in, out := &in.JoinConfiguration, &out.JoinConfiguration - *out = new(v1alpha4.JoinConfiguration) - if err := Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(*in, *out, s); err != nil { + *out = new(v1beta1.JoinConfiguration) + if err := Convert_upstreamv1beta1_JoinConfiguration_To_v1beta1_JoinConfiguration(*in, *out, s); err != nil { return err } } else { out.JoinConfiguration = nil } - out.Files = *(*[]v1alpha4.File)(unsafe.Pointer(&in.Files)) - out.DiskSetup = (*v1alpha4.DiskSetup)(unsafe.Pointer(in.DiskSetup)) - out.Mounts = *(*[]v1alpha4.MountPoints)(unsafe.Pointer(&in.Mounts)) + out.Files = *(*[]v1beta1.File)(unsafe.Pointer(&in.Files)) + out.DiskSetup = (*v1beta1.DiskSetup)(unsafe.Pointer(in.DiskSetup)) + out.Mounts = *(*[]v1beta1.MountPoints)(unsafe.Pointer(&in.Mounts)) out.PreKubeadmCommands = *(*[]string)(unsafe.Pointer(&in.PreKubeadmCommands)) out.PostKubeadmCommands = *(*[]string)(unsafe.Pointer(&in.PostKubeadmCommands)) - out.Users = *(*[]v1alpha4.User)(unsafe.Pointer(&in.Users)) - out.NTP = (*v1alpha4.NTP)(unsafe.Pointer(in.NTP)) - out.Format = v1alpha4.Format(in.Format) + out.Users = *(*[]v1beta1.User)(unsafe.Pointer(&in.Users)) + out.NTP = (*v1beta1.NTP)(unsafe.Pointer(in.NTP)) + out.Format = v1beta1.Format(in.Format) out.Verbosity = (*int32)(unsafe.Pointer(in.Verbosity)) out.UseExperimentalRetryJoin = in.UseExperimentalRetryJoin return nil } -// Convert_v1alpha3_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in *KubeadmConfigSpec, out *v1alpha4.KubeadmConfigSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in, out, s) +// Convert_v1alpha3_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec is an autogenerated conversion function. +func Convert_v1alpha3_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *KubeadmConfigSpec, out *v1beta1.KubeadmConfigSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in, out, s) } -func autoConvert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(in *v1alpha4.KubeadmConfigSpec, out *KubeadmConfigSpec, s conversion.Scope) error { +func autoConvert_v1beta1_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(in *v1beta1.KubeadmConfigSpec, out *KubeadmConfigSpec, s conversion.Scope) error { if in.ClusterConfiguration != nil { in, out := &in.ClusterConfiguration, &out.ClusterConfiguration - *out = new(v1beta1.ClusterConfiguration) - if err := Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(*in, *out, s); err != nil { + *out = new(upstreamv1beta1.ClusterConfiguration) + if err := Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration(*in, *out, s); err != nil { return err } } else { @@ -471,8 +471,8 @@ func autoConvert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(in *v1 } if in.InitConfiguration != nil { in, out := &in.InitConfiguration, &out.InitConfiguration - *out = new(v1beta1.InitConfiguration) - if err := Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(*in, *out, s); err != nil { + *out = new(upstreamv1beta1.InitConfiguration) + if err := Convert_v1beta1_InitConfiguration_To_upstreamv1beta1_InitConfiguration(*in, *out, s); err != nil { return err } } else { @@ -480,8 +480,8 @@ func autoConvert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(in *v1 } if in.JoinConfiguration != nil { in, out := &in.JoinConfiguration, &out.JoinConfiguration - *out = new(v1beta1.JoinConfiguration) - if err := Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(*in, *out, s); err != nil { + *out = new(upstreamv1beta1.JoinConfiguration) + if err := Convert_v1beta1_JoinConfiguration_To_upstreamv1beta1_JoinConfiguration(*in, *out, s); err != nil { return err } } else { @@ -500,12 +500,12 @@ func autoConvert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(in *v1 return nil } -// Convert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec is an autogenerated conversion function. -func Convert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(in *v1alpha4.KubeadmConfigSpec, out *KubeadmConfigSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(in, out, s) +// Convert_v1beta1_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(in *v1beta1.KubeadmConfigSpec, out *KubeadmConfigSpec, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(in, out, s) } -func autoConvert_v1alpha3_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(in *KubeadmConfigStatus, out *v1alpha4.KubeadmConfigStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(in *KubeadmConfigStatus, out *v1beta1.KubeadmConfigStatus, s conversion.Scope) error { out.Ready = in.Ready out.DataSecretName = (*string)(unsafe.Pointer(in.DataSecretName)) // WARNING: in.BootstrapData requires manual conversion: does not exist in peer-type @@ -514,9 +514,9 @@ func autoConvert_v1alpha3_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(in out.ObservedGeneration = in.ObservedGeneration if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) + *out = make(apiv1beta1.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -526,7 +526,7 @@ func autoConvert_v1alpha3_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(in return nil } -func autoConvert_v1alpha4_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(in *v1alpha4.KubeadmConfigStatus, out *KubeadmConfigStatus, s conversion.Scope) error { +func autoConvert_v1beta1_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(in *v1beta1.KubeadmConfigStatus, out *KubeadmConfigStatus, s conversion.Scope) error { out.Ready = in.Ready out.DataSecretName = (*string)(unsafe.Pointer(in.DataSecretName)) out.FailureReason = in.FailureReason @@ -536,7 +536,7 @@ func autoConvert_v1alpha4_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(in in, out := &in.Conditions, &out.Conditions *out = make(apiv1alpha3.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha4_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -546,44 +546,44 @@ func autoConvert_v1alpha4_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(in return nil } -// Convert_v1alpha4_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus is an autogenerated conversion function. -func Convert_v1alpha4_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(in *v1alpha4.KubeadmConfigStatus, out *KubeadmConfigStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(in, out, s) +// Convert_v1beta1_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(in *v1beta1.KubeadmConfigStatus, out *KubeadmConfigStatus, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigStatus_To_v1alpha3_KubeadmConfigStatus(in, out, s) } -func autoConvert_v1alpha3_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(in *KubeadmConfigTemplate, out *v1alpha4.KubeadmConfigTemplate, s conversion.Scope) error { +func autoConvert_v1alpha3_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(in *KubeadmConfigTemplate, out *v1beta1.KubeadmConfigTemplate, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha3_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(in *KubeadmConfigTemplate, out *v1alpha4.KubeadmConfigTemplate, s conversion.Scope) error { - return autoConvert_v1alpha3_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(in, out, s) +// Convert_v1alpha3_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate is an autogenerated conversion function. +func Convert_v1alpha3_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(in *KubeadmConfigTemplate, out *v1beta1.KubeadmConfigTemplate, s conversion.Scope) error { + return autoConvert_v1alpha3_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(in, out, s) } -func autoConvert_v1alpha4_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(in *v1alpha4.KubeadmConfigTemplate, out *KubeadmConfigTemplate, s conversion.Scope) error { +func autoConvert_v1beta1_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(in *v1beta1.KubeadmConfigTemplate, out *KubeadmConfigTemplate, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha4_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate is an autogenerated conversion function. -func Convert_v1alpha4_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(in *v1alpha4.KubeadmConfigTemplate, out *KubeadmConfigTemplate, s conversion.Scope) error { - return autoConvert_v1alpha4_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(in, out, s) +// Convert_v1beta1_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(in *v1beta1.KubeadmConfigTemplate, out *KubeadmConfigTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(in, out, s) } -func autoConvert_v1alpha3_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList(in *KubeadmConfigTemplateList, out *v1alpha4.KubeadmConfigTemplateList, s conversion.Scope) error { +func autoConvert_v1alpha3_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList(in *KubeadmConfigTemplateList, out *v1beta1.KubeadmConfigTemplateList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.KubeadmConfigTemplate, len(*in)) + *out = make([]v1beta1.KubeadmConfigTemplate, len(*in)) for i := range *in { - if err := Convert_v1alpha3_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -593,18 +593,18 @@ func autoConvert_v1alpha3_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTem return nil } -// Convert_v1alpha3_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList(in *KubeadmConfigTemplateList, out *v1alpha4.KubeadmConfigTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha3_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList(in, out, s) +// Convert_v1alpha3_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList is an autogenerated conversion function. +func Convert_v1alpha3_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList(in *KubeadmConfigTemplateList, out *v1beta1.KubeadmConfigTemplateList, s conversion.Scope) error { + return autoConvert_v1alpha3_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList(in, out, s) } -func autoConvert_v1alpha4_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList(in *v1alpha4.KubeadmConfigTemplateList, out *KubeadmConfigTemplateList, s conversion.Scope) error { +func autoConvert_v1beta1_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList(in *v1beta1.KubeadmConfigTemplateList, out *KubeadmConfigTemplateList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]KubeadmConfigTemplate, len(*in)) for i := range *in { - if err := Convert_v1alpha4_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_KubeadmConfigTemplate_To_v1alpha3_KubeadmConfigTemplate(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -614,82 +614,82 @@ func autoConvert_v1alpha4_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTem return nil } -// Convert_v1alpha4_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList is an autogenerated conversion function. -func Convert_v1alpha4_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList(in *v1alpha4.KubeadmConfigTemplateList, out *KubeadmConfigTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha4_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList(in, out, s) +// Convert_v1beta1_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList(in *v1beta1.KubeadmConfigTemplateList, out *KubeadmConfigTemplateList, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigTemplateList_To_v1alpha3_KubeadmConfigTemplateList(in, out, s) } -func autoConvert_v1alpha3_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in *KubeadmConfigTemplateResource, out *v1alpha4.KubeadmConfigTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha3_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { +func autoConvert_v1alpha3_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(in *KubeadmConfigTemplateResource, out *v1beta1.KubeadmConfigTemplateResource, s conversion.Scope) error { + if err := Convert_v1alpha3_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha3_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in *KubeadmConfigTemplateResource, out *v1alpha4.KubeadmConfigTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha3_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in, out, s) +// Convert_v1alpha3_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource is an autogenerated conversion function. +func Convert_v1alpha3_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(in *KubeadmConfigTemplateResource, out *v1beta1.KubeadmConfigTemplateResource, s conversion.Scope) error { + return autoConvert_v1alpha3_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(in, out, s) } -func autoConvert_v1alpha4_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in *v1alpha4.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { +func autoConvert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in *v1beta1.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s conversion.Scope) error { + if err := Convert_v1beta1_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha4_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource is an autogenerated conversion function. -func Convert_v1alpha4_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in *v1alpha4.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha4_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in, out, s) +// Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in *v1beta1.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(in, out, s) } -func autoConvert_v1alpha3_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec(in *KubeadmConfigTemplateSpec, out *v1alpha4.KubeadmConfigTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(&in.Template, &out.Template, s); err != nil { +func autoConvert_v1alpha3_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(in *KubeadmConfigTemplateSpec, out *v1beta1.KubeadmConfigTemplateSpec, s conversion.Scope) error { + if err := Convert_v1alpha3_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(&in.Template, &out.Template, s); err != nil { return err } return nil } -// Convert_v1alpha3_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec(in *KubeadmConfigTemplateSpec, out *v1alpha4.KubeadmConfigTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec(in, out, s) +// Convert_v1alpha3_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec is an autogenerated conversion function. +func Convert_v1alpha3_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(in *KubeadmConfigTemplateSpec, out *v1beta1.KubeadmConfigTemplateSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(in, out, s) } -func autoConvert_v1alpha4_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec(in *v1alpha4.KubeadmConfigTemplateSpec, out *KubeadmConfigTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(&in.Template, &out.Template, s); err != nil { +func autoConvert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec(in *v1beta1.KubeadmConfigTemplateSpec, out *KubeadmConfigTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha3_KubeadmConfigTemplateResource(&in.Template, &out.Template, s); err != nil { return err } return nil } -// Convert_v1alpha4_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha4_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec(in *v1alpha4.KubeadmConfigTemplateSpec, out *KubeadmConfigTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec(in, out, s) +// Convert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec(in *v1beta1.KubeadmConfigTemplateSpec, out *KubeadmConfigTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha3_KubeadmConfigTemplateSpec(in, out, s) } -func autoConvert_v1alpha3_NTP_To_v1alpha4_NTP(in *NTP, out *v1alpha4.NTP, s conversion.Scope) error { +func autoConvert_v1alpha3_NTP_To_v1beta1_NTP(in *NTP, out *v1beta1.NTP, s conversion.Scope) error { out.Servers = *(*[]string)(unsafe.Pointer(&in.Servers)) out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) return nil } -// Convert_v1alpha3_NTP_To_v1alpha4_NTP is an autogenerated conversion function. -func Convert_v1alpha3_NTP_To_v1alpha4_NTP(in *NTP, out *v1alpha4.NTP, s conversion.Scope) error { - return autoConvert_v1alpha3_NTP_To_v1alpha4_NTP(in, out, s) +// Convert_v1alpha3_NTP_To_v1beta1_NTP is an autogenerated conversion function. +func Convert_v1alpha3_NTP_To_v1beta1_NTP(in *NTP, out *v1beta1.NTP, s conversion.Scope) error { + return autoConvert_v1alpha3_NTP_To_v1beta1_NTP(in, out, s) } -func autoConvert_v1alpha4_NTP_To_v1alpha3_NTP(in *v1alpha4.NTP, out *NTP, s conversion.Scope) error { +func autoConvert_v1beta1_NTP_To_v1alpha3_NTP(in *v1beta1.NTP, out *NTP, s conversion.Scope) error { out.Servers = *(*[]string)(unsafe.Pointer(&in.Servers)) out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) return nil } -// Convert_v1alpha4_NTP_To_v1alpha3_NTP is an autogenerated conversion function. -func Convert_v1alpha4_NTP_To_v1alpha3_NTP(in *v1alpha4.NTP, out *NTP, s conversion.Scope) error { - return autoConvert_v1alpha4_NTP_To_v1alpha3_NTP(in, out, s) +// Convert_v1beta1_NTP_To_v1alpha3_NTP is an autogenerated conversion function. +func Convert_v1beta1_NTP_To_v1alpha3_NTP(in *v1beta1.NTP, out *NTP, s conversion.Scope) error { + return autoConvert_v1beta1_NTP_To_v1alpha3_NTP(in, out, s) } -func autoConvert_v1alpha3_Partition_To_v1alpha4_Partition(in *Partition, out *v1alpha4.Partition, s conversion.Scope) error { +func autoConvert_v1alpha3_Partition_To_v1beta1_Partition(in *Partition, out *v1beta1.Partition, s conversion.Scope) error { out.Device = in.Device out.Layout = in.Layout out.Overwrite = (*bool)(unsafe.Pointer(in.Overwrite)) @@ -697,12 +697,12 @@ func autoConvert_v1alpha3_Partition_To_v1alpha4_Partition(in *Partition, out *v1 return nil } -// Convert_v1alpha3_Partition_To_v1alpha4_Partition is an autogenerated conversion function. -func Convert_v1alpha3_Partition_To_v1alpha4_Partition(in *Partition, out *v1alpha4.Partition, s conversion.Scope) error { - return autoConvert_v1alpha3_Partition_To_v1alpha4_Partition(in, out, s) +// Convert_v1alpha3_Partition_To_v1beta1_Partition is an autogenerated conversion function. +func Convert_v1alpha3_Partition_To_v1beta1_Partition(in *Partition, out *v1beta1.Partition, s conversion.Scope) error { + return autoConvert_v1alpha3_Partition_To_v1beta1_Partition(in, out, s) } -func autoConvert_v1alpha4_Partition_To_v1alpha3_Partition(in *v1alpha4.Partition, out *Partition, s conversion.Scope) error { +func autoConvert_v1beta1_Partition_To_v1alpha3_Partition(in *v1beta1.Partition, out *Partition, s conversion.Scope) error { out.Device = in.Device out.Layout = in.Layout out.Overwrite = (*bool)(unsafe.Pointer(in.Overwrite)) @@ -710,34 +710,34 @@ func autoConvert_v1alpha4_Partition_To_v1alpha3_Partition(in *v1alpha4.Partition return nil } -// Convert_v1alpha4_Partition_To_v1alpha3_Partition is an autogenerated conversion function. -func Convert_v1alpha4_Partition_To_v1alpha3_Partition(in *v1alpha4.Partition, out *Partition, s conversion.Scope) error { - return autoConvert_v1alpha4_Partition_To_v1alpha3_Partition(in, out, s) +// Convert_v1beta1_Partition_To_v1alpha3_Partition is an autogenerated conversion function. +func Convert_v1beta1_Partition_To_v1alpha3_Partition(in *v1beta1.Partition, out *Partition, s conversion.Scope) error { + return autoConvert_v1beta1_Partition_To_v1alpha3_Partition(in, out, s) } -func autoConvert_v1alpha3_SecretFileSource_To_v1alpha4_SecretFileSource(in *SecretFileSource, out *v1alpha4.SecretFileSource, s conversion.Scope) error { +func autoConvert_v1alpha3_SecretFileSource_To_v1beta1_SecretFileSource(in *SecretFileSource, out *v1beta1.SecretFileSource, s conversion.Scope) error { out.Name = in.Name out.Key = in.Key return nil } -// Convert_v1alpha3_SecretFileSource_To_v1alpha4_SecretFileSource is an autogenerated conversion function. -func Convert_v1alpha3_SecretFileSource_To_v1alpha4_SecretFileSource(in *SecretFileSource, out *v1alpha4.SecretFileSource, s conversion.Scope) error { - return autoConvert_v1alpha3_SecretFileSource_To_v1alpha4_SecretFileSource(in, out, s) +// Convert_v1alpha3_SecretFileSource_To_v1beta1_SecretFileSource is an autogenerated conversion function. +func Convert_v1alpha3_SecretFileSource_To_v1beta1_SecretFileSource(in *SecretFileSource, out *v1beta1.SecretFileSource, s conversion.Scope) error { + return autoConvert_v1alpha3_SecretFileSource_To_v1beta1_SecretFileSource(in, out, s) } -func autoConvert_v1alpha4_SecretFileSource_To_v1alpha3_SecretFileSource(in *v1alpha4.SecretFileSource, out *SecretFileSource, s conversion.Scope) error { +func autoConvert_v1beta1_SecretFileSource_To_v1alpha3_SecretFileSource(in *v1beta1.SecretFileSource, out *SecretFileSource, s conversion.Scope) error { out.Name = in.Name out.Key = in.Key return nil } -// Convert_v1alpha4_SecretFileSource_To_v1alpha3_SecretFileSource is an autogenerated conversion function. -func Convert_v1alpha4_SecretFileSource_To_v1alpha3_SecretFileSource(in *v1alpha4.SecretFileSource, out *SecretFileSource, s conversion.Scope) error { - return autoConvert_v1alpha4_SecretFileSource_To_v1alpha3_SecretFileSource(in, out, s) +// Convert_v1beta1_SecretFileSource_To_v1alpha3_SecretFileSource is an autogenerated conversion function. +func Convert_v1beta1_SecretFileSource_To_v1alpha3_SecretFileSource(in *v1beta1.SecretFileSource, out *SecretFileSource, s conversion.Scope) error { + return autoConvert_v1beta1_SecretFileSource_To_v1alpha3_SecretFileSource(in, out, s) } -func autoConvert_v1alpha3_User_To_v1alpha4_User(in *User, out *v1alpha4.User, s conversion.Scope) error { +func autoConvert_v1alpha3_User_To_v1beta1_User(in *User, out *v1beta1.User, s conversion.Scope) error { out.Name = in.Name out.Gecos = (*string)(unsafe.Pointer(in.Gecos)) out.Groups = (*string)(unsafe.Pointer(in.Groups)) @@ -752,12 +752,12 @@ func autoConvert_v1alpha3_User_To_v1alpha4_User(in *User, out *v1alpha4.User, s return nil } -// Convert_v1alpha3_User_To_v1alpha4_User is an autogenerated conversion function. -func Convert_v1alpha3_User_To_v1alpha4_User(in *User, out *v1alpha4.User, s conversion.Scope) error { - return autoConvert_v1alpha3_User_To_v1alpha4_User(in, out, s) +// Convert_v1alpha3_User_To_v1beta1_User is an autogenerated conversion function. +func Convert_v1alpha3_User_To_v1beta1_User(in *User, out *v1beta1.User, s conversion.Scope) error { + return autoConvert_v1alpha3_User_To_v1beta1_User(in, out, s) } -func autoConvert_v1alpha4_User_To_v1alpha3_User(in *v1alpha4.User, out *User, s conversion.Scope) error { +func autoConvert_v1beta1_User_To_v1alpha3_User(in *v1beta1.User, out *User, s conversion.Scope) error { out.Name = in.Name out.Gecos = (*string)(unsafe.Pointer(in.Gecos)) out.Groups = (*string)(unsafe.Pointer(in.Groups)) @@ -772,7 +772,7 @@ func autoConvert_v1alpha4_User_To_v1alpha3_User(in *v1alpha4.User, out *User, s return nil } -// Convert_v1alpha4_User_To_v1alpha3_User is an autogenerated conversion function. -func Convert_v1alpha4_User_To_v1alpha3_User(in *v1alpha4.User, out *User, s conversion.Scope) error { - return autoConvert_v1alpha4_User_To_v1alpha3_User(in, out, s) +// Convert_v1beta1_User_To_v1alpha3_User is an autogenerated conversion function. +func Convert_v1beta1_User_To_v1alpha3_User(in *v1beta1.User, out *User, s conversion.Scope) error { + return autoConvert_v1beta1_User_To_v1alpha3_User(in, out, s) } diff --git a/bootstrap/kubeadm/api/v1alpha3/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha3/zz_generated.deepcopy.go index 1f016861de1e..339adbede59c 100644 --- a/bootstrap/kubeadm/api/v1alpha3/zz_generated.deepcopy.go +++ b/bootstrap/kubeadm/api/v1alpha3/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1alpha3 import ( "k8s.io/apimachinery/pkg/runtime" apiv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -190,17 +190,17 @@ func (in *KubeadmConfigSpec) DeepCopyInto(out *KubeadmConfigSpec) { *out = *in if in.ClusterConfiguration != nil { in, out := &in.ClusterConfiguration, &out.ClusterConfiguration - *out = new(v1beta1.ClusterConfiguration) + *out = new(upstreamv1beta1.ClusterConfiguration) (*in).DeepCopyInto(*out) } if in.InitConfiguration != nil { in, out := &in.InitConfiguration, &out.InitConfiguration - *out = new(v1beta1.InitConfiguration) + *out = new(upstreamv1beta1.InitConfiguration) (*in).DeepCopyInto(*out) } if in.JoinConfiguration != nil { in, out := &in.JoinConfiguration, &out.JoinConfiguration - *out = new(v1beta1.JoinConfiguration) + *out = new(upstreamv1beta1.JoinConfiguration) (*in).DeepCopyInto(*out) } if in.Files != nil { diff --git a/bootstrap/kubeadm/api/v1alpha4/condition_consts.go b/bootstrap/kubeadm/api/v1alpha4/condition_consts.go index 6ee694b4c966..ac8d18766ce9 100644 --- a/bootstrap/kubeadm/api/v1alpha4/condition_consts.go +++ b/bootstrap/kubeadm/api/v1alpha4/condition_consts.go @@ -16,7 +16,7 @@ limitations under the License. package v1alpha4 -import clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" +import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" // Conditions and condition Reasons for the KubeadmConfig object diff --git a/bootstrap/kubeadm/api/v1alpha4/conversion.go b/bootstrap/kubeadm/api/v1alpha4/conversion.go index 388d0f96d126..46a2f3341621 100644 --- a/bootstrap/kubeadm/api/v1alpha4/conversion.go +++ b/bootstrap/kubeadm/api/v1alpha4/conversion.go @@ -16,12 +16,55 @@ limitations under the License. package v1alpha4 -func (*KubeadmConfig) Hub() {} -func (*KubeadmConfigList) Hub() {} -func (*KubeadmConfigTemplate) Hub() {} -func (*KubeadmConfigTemplateList) Hub() {} - -func (*ClusterConfiguration) Hub() {} -func (*ClusterStatus) Hub() {} -func (*InitConfiguration) Hub() {} -func (*JoinConfiguration) Hub() {} +import ( + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + "sigs.k8s.io/controller-runtime/pkg/conversion" +) + +func (src *KubeadmConfig) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.KubeadmConfig) + + return Convert_v1alpha4_KubeadmConfig_To_v1beta1_KubeadmConfig(src, dst, nil) +} + +func (dst *KubeadmConfig) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.KubeadmConfig) + + return Convert_v1beta1_KubeadmConfig_To_v1alpha4_KubeadmConfig(src, dst, nil) +} + +func (src *KubeadmConfigList) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.KubeadmConfigList) + + return Convert_v1alpha4_KubeadmConfigList_To_v1beta1_KubeadmConfigList(src, dst, nil) +} + +func (dst *KubeadmConfigList) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.KubeadmConfigList) + + return Convert_v1beta1_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(src, dst, nil) +} + +func (src *KubeadmConfigTemplate) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.KubeadmConfigTemplate) + + return Convert_v1alpha4_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(src, dst, nil) +} + +func (dst *KubeadmConfigTemplate) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.KubeadmConfigTemplate) + + return Convert_v1beta1_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(src, dst, nil) +} + +func (src *KubeadmConfigTemplateList) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.KubeadmConfigTemplateList) + + return Convert_v1alpha4_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList(src, dst, nil) +} + +func (dst *KubeadmConfigTemplateList) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.KubeadmConfigTemplateList) + + return Convert_v1beta1_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList(src, dst, nil) +} diff --git a/bootstrap/kubeadm/api/v1alpha4/doc.go b/bootstrap/kubeadm/api/v1alpha4/doc.go index b0efd4cde559..2ad83dc52654 100644 --- a/bootstrap/kubeadm/api/v1alpha4/doc.go +++ b/bootstrap/kubeadm/api/v1alpha4/doc.go @@ -14,4 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package v1alpha4 contains the v1alpha4 API implementation. +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 package v1alpha4 diff --git a/bootstrap/kubeadm/api/v1alpha4/groupversion_info.go b/bootstrap/kubeadm/api/v1alpha4/groupversion_info.go index 206d817681f9..68e2aa7ab030 100644 --- a/bootstrap/kubeadm/api/v1alpha4/groupversion_info.go +++ b/bootstrap/kubeadm/api/v1alpha4/groupversion_info.go @@ -33,4 +33,6 @@ var ( // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = SchemeBuilder.SchemeBuilder ) diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types.go index 297d0c7da836..b026200ea950 100644 --- a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types.go +++ b/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types.go @@ -18,7 +18,7 @@ package v1alpha4 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // Format specifies the output format of the bootstrap data @@ -124,7 +124,6 @@ type KubeadmConfigStatus struct { // +kubebuilder:object:root=true // +kubebuilder:resource:path=kubeadmconfigs,scope=Namespaced,categories=cluster-api -// +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmConfig" diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplate_types.go b/bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplate_types.go index 5f004faee676..335033a57a2c 100644 --- a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplate_types.go +++ b/bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplate_types.go @@ -32,7 +32,6 @@ type KubeadmConfigTemplateResource struct { // +kubebuilder:object:root=true // +kubebuilder:resource:path=kubeadmconfigtemplates,scope=Namespaced,categories=cluster-api -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmConfigTemplate" // KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates API. diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go new file mode 100644 index 000000000000..df5e93d00d46 --- /dev/null +++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.conversion.go @@ -0,0 +1,1432 @@ +// +build !ignore_autogenerated_kubeadm_bootstrap + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha4 + +import ( + unsafe "unsafe" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + v1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" +) + +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((*APIEndpoint)(nil), (*v1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(a.(*APIEndpoint), b.(*v1beta1.APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(a.(*v1beta1.APIEndpoint), b.(*APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*APIServer)(nil), (*v1beta1.APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_APIServer_To_v1beta1_APIServer(a.(*APIServer), b.(*v1beta1.APIServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.APIServer)(nil), (*APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIServer_To_v1alpha4_APIServer(a.(*v1beta1.APIServer), b.(*APIServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapToken)(nil), (*v1beta1.BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_BootstrapToken_To_v1beta1_BootstrapToken(a.(*BootstrapToken), b.(*v1beta1.BootstrapToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapToken)(nil), (*BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapToken_To_v1alpha4_BootstrapToken(a.(*v1beta1.BootstrapToken), b.(*BootstrapToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapTokenDiscovery)(nil), (*v1beta1.BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(a.(*BootstrapTokenDiscovery), b.(*v1beta1.BootstrapTokenDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapTokenDiscovery)(nil), (*BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(a.(*v1beta1.BootstrapTokenDiscovery), b.(*BootstrapTokenDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapTokenString)(nil), (*v1beta1.BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_BootstrapTokenString_To_v1beta1_BootstrapTokenString(a.(*BootstrapTokenString), b.(*v1beta1.BootstrapTokenString), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapTokenString)(nil), (*BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(a.(*v1beta1.BootstrapTokenString), b.(*BootstrapTokenString), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*ClusterConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterStatus)(nil), (*v1beta1.ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(a.(*ClusterStatus), b.(*v1beta1.ClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterStatus)(nil), (*ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(a.(*v1beta1.ClusterStatus), b.(*ClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlPlaneComponent)(nil), (*v1beta1.ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(a.(*ControlPlaneComponent), b.(*v1beta1.ControlPlaneComponent), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ControlPlaneComponent)(nil), (*ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(a.(*v1beta1.ControlPlaneComponent), b.(*ControlPlaneComponent), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNS)(nil), (*v1beta1.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DNS_To_v1beta1_DNS(a.(*DNS), b.(*v1beta1.DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNS_To_v1alpha4_DNS(a.(*v1beta1.DNS), b.(*DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Discovery)(nil), (*v1beta1.Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Discovery_To_v1beta1_Discovery(a.(*Discovery), b.(*v1beta1.Discovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Discovery)(nil), (*Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Discovery_To_v1alpha4_Discovery(a.(*v1beta1.Discovery), b.(*Discovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DiskSetup)(nil), (*v1beta1.DiskSetup)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DiskSetup_To_v1beta1_DiskSetup(a.(*DiskSetup), b.(*v1beta1.DiskSetup), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DiskSetup)(nil), (*DiskSetup)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DiskSetup_To_v1alpha4_DiskSetup(a.(*v1beta1.DiskSetup), b.(*DiskSetup), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Etcd)(nil), (*v1beta1.Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Etcd_To_v1beta1_Etcd(a.(*Etcd), b.(*v1beta1.Etcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Etcd)(nil), (*Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Etcd_To_v1alpha4_Etcd(a.(*v1beta1.Etcd), b.(*Etcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExternalEtcd)(nil), (*v1beta1.ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ExternalEtcd_To_v1beta1_ExternalEtcd(a.(*ExternalEtcd), b.(*v1beta1.ExternalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ExternalEtcd)(nil), (*ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExternalEtcd_To_v1alpha4_ExternalEtcd(a.(*v1beta1.ExternalEtcd), b.(*ExternalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*File)(nil), (*v1beta1.File)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_File_To_v1beta1_File(a.(*File), b.(*v1beta1.File), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.File)(nil), (*File)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_File_To_v1alpha4_File(a.(*v1beta1.File), b.(*File), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FileDiscovery)(nil), (*v1beta1.FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_FileDiscovery_To_v1beta1_FileDiscovery(a.(*FileDiscovery), b.(*v1beta1.FileDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.FileDiscovery)(nil), (*FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FileDiscovery_To_v1alpha4_FileDiscovery(a.(*v1beta1.FileDiscovery), b.(*FileDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FileSource)(nil), (*v1beta1.FileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_FileSource_To_v1beta1_FileSource(a.(*FileSource), b.(*v1beta1.FileSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.FileSource)(nil), (*FileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FileSource_To_v1alpha4_FileSource(a.(*v1beta1.FileSource), b.(*FileSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Filesystem)(nil), (*v1beta1.Filesystem)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Filesystem_To_v1beta1_Filesystem(a.(*Filesystem), b.(*v1beta1.Filesystem), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Filesystem)(nil), (*Filesystem)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Filesystem_To_v1alpha4_Filesystem(a.(*v1beta1.Filesystem), b.(*Filesystem), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HostPathMount)(nil), (*v1beta1.HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_HostPathMount_To_v1beta1_HostPathMount(a.(*HostPathMount), b.(*v1beta1.HostPathMount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.HostPathMount)(nil), (*HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HostPathMount_To_v1alpha4_HostPathMount(a.(*v1beta1.HostPathMount), b.(*HostPathMount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ImageMeta)(nil), (*v1beta1.ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(a.(*ImageMeta), b.(*v1beta1.ImageMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ImageMeta)(nil), (*ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(a.(*v1beta1.ImageMeta), b.(*ImageMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*InitConfiguration)(nil), (*v1beta1.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(a.(*InitConfiguration), b.(*v1beta1.InitConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.InitConfiguration)(nil), (*InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(a.(*v1beta1.InitConfiguration), b.(*InitConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*JoinConfiguration)(nil), (*v1beta1.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(a.(*JoinConfiguration), b.(*v1beta1.JoinConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.JoinConfiguration)(nil), (*JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(a.(*v1beta1.JoinConfiguration), b.(*JoinConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*JoinControlPlane)(nil), (*v1beta1.JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_JoinControlPlane_To_v1beta1_JoinControlPlane(a.(*JoinControlPlane), b.(*v1beta1.JoinControlPlane), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.JoinControlPlane)(nil), (*JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JoinControlPlane_To_v1alpha4_JoinControlPlane(a.(*v1beta1.JoinControlPlane), b.(*JoinControlPlane), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmConfig)(nil), (*v1beta1.KubeadmConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmConfig_To_v1beta1_KubeadmConfig(a.(*KubeadmConfig), b.(*v1beta1.KubeadmConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfig)(nil), (*KubeadmConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfig_To_v1alpha4_KubeadmConfig(a.(*v1beta1.KubeadmConfig), b.(*KubeadmConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmConfigList)(nil), (*v1beta1.KubeadmConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmConfigList_To_v1beta1_KubeadmConfigList(a.(*KubeadmConfigList), b.(*v1beta1.KubeadmConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigList)(nil), (*KubeadmConfigList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(a.(*v1beta1.KubeadmConfigList), b.(*KubeadmConfigList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmConfigSpec)(nil), (*v1beta1.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(a.(*KubeadmConfigSpec), b.(*v1beta1.KubeadmConfigSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigSpec)(nil), (*KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(a.(*v1beta1.KubeadmConfigSpec), b.(*KubeadmConfigSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmConfigStatus)(nil), (*v1beta1.KubeadmConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(a.(*KubeadmConfigStatus), b.(*v1beta1.KubeadmConfigStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigStatus)(nil), (*KubeadmConfigStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(a.(*v1beta1.KubeadmConfigStatus), b.(*KubeadmConfigStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplate)(nil), (*v1beta1.KubeadmConfigTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(a.(*KubeadmConfigTemplate), b.(*v1beta1.KubeadmConfigTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigTemplate)(nil), (*KubeadmConfigTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(a.(*v1beta1.KubeadmConfigTemplate), b.(*KubeadmConfigTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateList)(nil), (*v1beta1.KubeadmConfigTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList(a.(*KubeadmConfigTemplateList), b.(*v1beta1.KubeadmConfigTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigTemplateList)(nil), (*KubeadmConfigTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList(a.(*v1beta1.KubeadmConfigTemplateList), b.(*KubeadmConfigTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateResource)(nil), (*v1beta1.KubeadmConfigTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(a.(*KubeadmConfigTemplateResource), b.(*v1beta1.KubeadmConfigTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigTemplateResource)(nil), (*KubeadmConfigTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(a.(*v1beta1.KubeadmConfigTemplateResource), b.(*KubeadmConfigTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmConfigTemplateSpec)(nil), (*v1beta1.KubeadmConfigTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(a.(*KubeadmConfigTemplateSpec), b.(*v1beta1.KubeadmConfigTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmConfigTemplateSpec)(nil), (*KubeadmConfigTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec(a.(*v1beta1.KubeadmConfigTemplateSpec), b.(*KubeadmConfigTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LocalEtcd)(nil), (*v1beta1.LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_LocalEtcd_To_v1beta1_LocalEtcd(a.(*LocalEtcd), b.(*v1beta1.LocalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.LocalEtcd)(nil), (*LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(a.(*v1beta1.LocalEtcd), b.(*LocalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NTP)(nil), (*v1beta1.NTP)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NTP_To_v1beta1_NTP(a.(*NTP), b.(*v1beta1.NTP), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.NTP)(nil), (*NTP)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NTP_To_v1alpha4_NTP(a.(*v1beta1.NTP), b.(*NTP), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Networking)(nil), (*v1beta1.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Networking_To_v1beta1_Networking(a.(*Networking), b.(*v1beta1.Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Networking_To_v1alpha4_Networking(a.(*v1beta1.Networking), b.(*Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NodeRegistrationOptions)(nil), (*v1beta1.NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(a.(*NodeRegistrationOptions), b.(*v1beta1.NodeRegistrationOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.NodeRegistrationOptions)(nil), (*NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(a.(*v1beta1.NodeRegistrationOptions), b.(*NodeRegistrationOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Partition)(nil), (*v1beta1.Partition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Partition_To_v1beta1_Partition(a.(*Partition), b.(*v1beta1.Partition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Partition)(nil), (*Partition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Partition_To_v1alpha4_Partition(a.(*v1beta1.Partition), b.(*Partition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SecretFileSource)(nil), (*v1beta1.SecretFileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_SecretFileSource_To_v1beta1_SecretFileSource(a.(*SecretFileSource), b.(*v1beta1.SecretFileSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.SecretFileSource)(nil), (*SecretFileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SecretFileSource_To_v1alpha4_SecretFileSource(a.(*v1beta1.SecretFileSource), b.(*SecretFileSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*User)(nil), (*v1beta1.User)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_User_To_v1beta1_User(a.(*User), b.(*v1beta1.User), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.User)(nil), (*User)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_User_To_v1alpha4_User(a.(*v1beta1.User), b.(*User), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + out.AdvertiseAddress = in.AdvertiseAddress + out.BindPort = in.BindPort + return nil +} + +// Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. +func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + return autoConvert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) +} + +func autoConvert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + out.AdvertiseAddress = in.AdvertiseAddress + out.BindPort = in.BindPort + return nil +} + +// Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint is an autogenerated conversion function. +func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + return autoConvert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) +} + +func autoConvert_v1alpha4_APIServer_To_v1beta1_APIServer(in *APIServer, out *v1beta1.APIServer, s conversion.Scope) error { + if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { + return err + } + out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) + out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) + return nil +} + +// Convert_v1alpha4_APIServer_To_v1beta1_APIServer is an autogenerated conversion function. +func Convert_v1alpha4_APIServer_To_v1beta1_APIServer(in *APIServer, out *v1beta1.APIServer, s conversion.Scope) error { + return autoConvert_v1alpha4_APIServer_To_v1beta1_APIServer(in, out, s) +} + +func autoConvert_v1beta1_APIServer_To_v1alpha4_APIServer(in *v1beta1.APIServer, out *APIServer, s conversion.Scope) error { + if err := Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { + return err + } + out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) + out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) + return nil +} + +// Convert_v1beta1_APIServer_To_v1alpha4_APIServer is an autogenerated conversion function. +func Convert_v1beta1_APIServer_To_v1alpha4_APIServer(in *v1beta1.APIServer, out *APIServer, s conversion.Scope) error { + return autoConvert_v1beta1_APIServer_To_v1alpha4_APIServer(in, out, s) +} + +func autoConvert_v1alpha4_BootstrapToken_To_v1beta1_BootstrapToken(in *BootstrapToken, out *v1beta1.BootstrapToken, s conversion.Scope) error { + out.Token = (*v1beta1.BootstrapTokenString)(unsafe.Pointer(in.Token)) + out.Description = in.Description + out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) + out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) + out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +// Convert_v1alpha4_BootstrapToken_To_v1beta1_BootstrapToken is an autogenerated conversion function. +func Convert_v1alpha4_BootstrapToken_To_v1beta1_BootstrapToken(in *BootstrapToken, out *v1beta1.BootstrapToken, s conversion.Scope) error { + return autoConvert_v1alpha4_BootstrapToken_To_v1beta1_BootstrapToken(in, out, s) +} + +func autoConvert_v1beta1_BootstrapToken_To_v1alpha4_BootstrapToken(in *v1beta1.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { + out.Token = (*BootstrapTokenString)(unsafe.Pointer(in.Token)) + out.Description = in.Description + out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) + out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) + out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +// Convert_v1beta1_BootstrapToken_To_v1alpha4_BootstrapToken is an autogenerated conversion function. +func Convert_v1beta1_BootstrapToken_To_v1alpha4_BootstrapToken(in *v1beta1.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapToken_To_v1alpha4_BootstrapToken(in, out, s) +} + +func autoConvert_v1alpha4_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1beta1.BootstrapTokenDiscovery, s conversion.Scope) error { + out.Token = in.Token + out.APIServerEndpoint = in.APIServerEndpoint + out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) + out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification + return nil +} + +// Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery is an autogenerated conversion function. +func Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1beta1.BootstrapTokenDiscovery, s conversion.Scope) error { + return autoConvert_v1alpha4_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in, out, s) +} + +func autoConvert_v1beta1_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in *v1beta1.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { + out.Token = in.Token + out.APIServerEndpoint = in.APIServerEndpoint + out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) + out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification + return nil +} + +// Convert_v1beta1_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery is an autogenerated conversion function. +func Convert_v1beta1_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in *v1beta1.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in, out, s) +} + +func autoConvert_v1alpha4_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in *BootstrapTokenString, out *v1beta1.BootstrapTokenString, s conversion.Scope) error { + out.ID = in.ID + out.Secret = in.Secret + return nil +} + +// Convert_v1alpha4_BootstrapTokenString_To_v1beta1_BootstrapTokenString is an autogenerated conversion function. +func Convert_v1alpha4_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in *BootstrapTokenString, out *v1beta1.BootstrapTokenString, s conversion.Scope) error { + return autoConvert_v1alpha4_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in, out, s) +} + +func autoConvert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *v1beta1.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { + out.ID = in.ID + out.Secret = in.Secret + return nil +} + +// Convert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString is an autogenerated conversion function. +func Convert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *v1beta1.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in, out, s) +} + +func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { + if err := Convert_v1alpha4_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } + if err := Convert_v1alpha4_Networking_To_v1beta1_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + out.KubernetesVersion = in.KubernetesVersion + out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if err := Convert_v1alpha4_APIServer_To_v1beta1_APIServer(&in.APIServer, &out.APIServer, s); err != nil { + return err + } + if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { + return err + } + if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { + return err + } + if err := Convert_v1alpha4_DNS_To_v1beta1_DNS(&in.DNS, &out.DNS, s); err != nil { + return err + } + out.CertificatesDir = in.CertificatesDir + out.ImageRepository = in.ImageRepository + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName + return nil +} + +// Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration is an autogenerated conversion function. +func Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in, out, s) +} + +func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { + if err := Convert_v1beta1_Etcd_To_v1alpha4_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } + if err := Convert_v1beta1_Networking_To_v1alpha4_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + out.KubernetesVersion = in.KubernetesVersion + out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if err := Convert_v1beta1_APIServer_To_v1alpha4_APIServer(&in.APIServer, &out.APIServer, s); err != nil { + return err + } + if err := Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { + return err + } + if err := Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { + return err + } + if err := Convert_v1beta1_DNS_To_v1alpha4_DNS(&in.DNS, &out.DNS, s); err != nil { + return err + } + out.CertificatesDir = in.CertificatesDir + out.ImageRepository = in.ImageRepository + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName + return nil +} + +// Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration is an autogenerated conversion function. +func Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in, out, s) +} + +func autoConvert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { + out.APIEndpoints = *(*map[string]v1beta1.APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) + return nil +} + +// Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus is an autogenerated conversion function. +func Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in, out, s) +} + +func autoConvert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in *v1beta1.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + out.APIEndpoints = *(*map[string]APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) + return nil +} + +// Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus is an autogenerated conversion function. +func Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in *v1beta1.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in, out, s) +} + +func autoConvert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in *ControlPlaneComponent, out *v1beta1.ControlPlaneComponent, s conversion.Scope) error { + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ExtraVolumes = *(*[]v1beta1.HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) + return nil +} + +// Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent is an autogenerated conversion function. +func Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in *ControlPlaneComponent, out *v1beta1.ControlPlaneComponent, s conversion.Scope) error { + return autoConvert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in, out, s) +} + +func autoConvert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in *v1beta1.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ExtraVolumes = *(*[]HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) + return nil +} + +// Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent is an autogenerated conversion function. +func Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in *v1beta1.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { + return autoConvert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in, out, s) +} + +func autoConvert_v1alpha4_DNS_To_v1beta1_DNS(in *DNS, out *v1beta1.DNS, s conversion.Scope) error { + if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DNS_To_v1beta1_DNS is an autogenerated conversion function. +func Convert_v1alpha4_DNS_To_v1beta1_DNS(in *DNS, out *v1beta1.DNS, s conversion.Scope) error { + return autoConvert_v1alpha4_DNS_To_v1beta1_DNS(in, out, s) +} + +func autoConvert_v1beta1_DNS_To_v1alpha4_DNS(in *v1beta1.DNS, out *DNS, s conversion.Scope) error { + if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DNS_To_v1alpha4_DNS is an autogenerated conversion function. +func Convert_v1beta1_DNS_To_v1alpha4_DNS(in *v1beta1.DNS, out *DNS, s conversion.Scope) error { + return autoConvert_v1beta1_DNS_To_v1alpha4_DNS(in, out, s) +} + +func autoConvert_v1alpha4_Discovery_To_v1beta1_Discovery(in *Discovery, out *v1beta1.Discovery, s conversion.Scope) error { + out.BootstrapToken = (*v1beta1.BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) + out.File = (*v1beta1.FileDiscovery)(unsafe.Pointer(in.File)) + out.TLSBootstrapToken = in.TLSBootstrapToken + out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) + return nil +} + +// Convert_v1alpha4_Discovery_To_v1beta1_Discovery is an autogenerated conversion function. +func Convert_v1alpha4_Discovery_To_v1beta1_Discovery(in *Discovery, out *v1beta1.Discovery, s conversion.Scope) error { + return autoConvert_v1alpha4_Discovery_To_v1beta1_Discovery(in, out, s) +} + +func autoConvert_v1beta1_Discovery_To_v1alpha4_Discovery(in *v1beta1.Discovery, out *Discovery, s conversion.Scope) error { + out.BootstrapToken = (*BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) + out.File = (*FileDiscovery)(unsafe.Pointer(in.File)) + out.TLSBootstrapToken = in.TLSBootstrapToken + out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) + return nil +} + +// Convert_v1beta1_Discovery_To_v1alpha4_Discovery is an autogenerated conversion function. +func Convert_v1beta1_Discovery_To_v1alpha4_Discovery(in *v1beta1.Discovery, out *Discovery, s conversion.Scope) error { + return autoConvert_v1beta1_Discovery_To_v1alpha4_Discovery(in, out, s) +} + +func autoConvert_v1alpha4_DiskSetup_To_v1beta1_DiskSetup(in *DiskSetup, out *v1beta1.DiskSetup, s conversion.Scope) error { + out.Partitions = *(*[]v1beta1.Partition)(unsafe.Pointer(&in.Partitions)) + out.Filesystems = *(*[]v1beta1.Filesystem)(unsafe.Pointer(&in.Filesystems)) + return nil +} + +// Convert_v1alpha4_DiskSetup_To_v1beta1_DiskSetup is an autogenerated conversion function. +func Convert_v1alpha4_DiskSetup_To_v1beta1_DiskSetup(in *DiskSetup, out *v1beta1.DiskSetup, s conversion.Scope) error { + return autoConvert_v1alpha4_DiskSetup_To_v1beta1_DiskSetup(in, out, s) +} + +func autoConvert_v1beta1_DiskSetup_To_v1alpha4_DiskSetup(in *v1beta1.DiskSetup, out *DiskSetup, s conversion.Scope) error { + out.Partitions = *(*[]Partition)(unsafe.Pointer(&in.Partitions)) + out.Filesystems = *(*[]Filesystem)(unsafe.Pointer(&in.Filesystems)) + return nil +} + +// Convert_v1beta1_DiskSetup_To_v1alpha4_DiskSetup is an autogenerated conversion function. +func Convert_v1beta1_DiskSetup_To_v1alpha4_DiskSetup(in *v1beta1.DiskSetup, out *DiskSetup, s conversion.Scope) error { + return autoConvert_v1beta1_DiskSetup_To_v1alpha4_DiskSetup(in, out, s) +} + +func autoConvert_v1alpha4_Etcd_To_v1beta1_Etcd(in *Etcd, out *v1beta1.Etcd, s conversion.Scope) error { + out.Local = (*v1beta1.LocalEtcd)(unsafe.Pointer(in.Local)) + out.External = (*v1beta1.ExternalEtcd)(unsafe.Pointer(in.External)) + return nil +} + +// Convert_v1alpha4_Etcd_To_v1beta1_Etcd is an autogenerated conversion function. +func Convert_v1alpha4_Etcd_To_v1beta1_Etcd(in *Etcd, out *v1beta1.Etcd, s conversion.Scope) error { + return autoConvert_v1alpha4_Etcd_To_v1beta1_Etcd(in, out, s) +} + +func autoConvert_v1beta1_Etcd_To_v1alpha4_Etcd(in *v1beta1.Etcd, out *Etcd, s conversion.Scope) error { + out.Local = (*LocalEtcd)(unsafe.Pointer(in.Local)) + out.External = (*ExternalEtcd)(unsafe.Pointer(in.External)) + return nil +} + +// Convert_v1beta1_Etcd_To_v1alpha4_Etcd is an autogenerated conversion function. +func Convert_v1beta1_Etcd_To_v1alpha4_Etcd(in *v1beta1.Etcd, out *Etcd, s conversion.Scope) error { + return autoConvert_v1beta1_Etcd_To_v1alpha4_Etcd(in, out, s) +} + +func autoConvert_v1alpha4_ExternalEtcd_To_v1beta1_ExternalEtcd(in *ExternalEtcd, out *v1beta1.ExternalEtcd, s conversion.Scope) error { + out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) + out.CAFile = in.CAFile + out.CertFile = in.CertFile + out.KeyFile = in.KeyFile + return nil +} + +// Convert_v1alpha4_ExternalEtcd_To_v1beta1_ExternalEtcd is an autogenerated conversion function. +func Convert_v1alpha4_ExternalEtcd_To_v1beta1_ExternalEtcd(in *ExternalEtcd, out *v1beta1.ExternalEtcd, s conversion.Scope) error { + return autoConvert_v1alpha4_ExternalEtcd_To_v1beta1_ExternalEtcd(in, out, s) +} + +func autoConvert_v1beta1_ExternalEtcd_To_v1alpha4_ExternalEtcd(in *v1beta1.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { + out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) + out.CAFile = in.CAFile + out.CertFile = in.CertFile + out.KeyFile = in.KeyFile + return nil +} + +// Convert_v1beta1_ExternalEtcd_To_v1alpha4_ExternalEtcd is an autogenerated conversion function. +func Convert_v1beta1_ExternalEtcd_To_v1alpha4_ExternalEtcd(in *v1beta1.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { + return autoConvert_v1beta1_ExternalEtcd_To_v1alpha4_ExternalEtcd(in, out, s) +} + +func autoConvert_v1alpha4_File_To_v1beta1_File(in *File, out *v1beta1.File, s conversion.Scope) error { + out.Path = in.Path + out.Owner = in.Owner + out.Permissions = in.Permissions + out.Encoding = v1beta1.Encoding(in.Encoding) + out.Content = in.Content + out.ContentFrom = (*v1beta1.FileSource)(unsafe.Pointer(in.ContentFrom)) + return nil +} + +// Convert_v1alpha4_File_To_v1beta1_File is an autogenerated conversion function. +func Convert_v1alpha4_File_To_v1beta1_File(in *File, out *v1beta1.File, s conversion.Scope) error { + return autoConvert_v1alpha4_File_To_v1beta1_File(in, out, s) +} + +func autoConvert_v1beta1_File_To_v1alpha4_File(in *v1beta1.File, out *File, s conversion.Scope) error { + out.Path = in.Path + out.Owner = in.Owner + out.Permissions = in.Permissions + out.Encoding = Encoding(in.Encoding) + out.Content = in.Content + out.ContentFrom = (*FileSource)(unsafe.Pointer(in.ContentFrom)) + return nil +} + +// Convert_v1beta1_File_To_v1alpha4_File is an autogenerated conversion function. +func Convert_v1beta1_File_To_v1alpha4_File(in *v1beta1.File, out *File, s conversion.Scope) error { + return autoConvert_v1beta1_File_To_v1alpha4_File(in, out, s) +} + +func autoConvert_v1alpha4_FileDiscovery_To_v1beta1_FileDiscovery(in *FileDiscovery, out *v1beta1.FileDiscovery, s conversion.Scope) error { + out.KubeConfigPath = in.KubeConfigPath + return nil +} + +// Convert_v1alpha4_FileDiscovery_To_v1beta1_FileDiscovery is an autogenerated conversion function. +func Convert_v1alpha4_FileDiscovery_To_v1beta1_FileDiscovery(in *FileDiscovery, out *v1beta1.FileDiscovery, s conversion.Scope) error { + return autoConvert_v1alpha4_FileDiscovery_To_v1beta1_FileDiscovery(in, out, s) +} + +func autoConvert_v1beta1_FileDiscovery_To_v1alpha4_FileDiscovery(in *v1beta1.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { + out.KubeConfigPath = in.KubeConfigPath + return nil +} + +// Convert_v1beta1_FileDiscovery_To_v1alpha4_FileDiscovery is an autogenerated conversion function. +func Convert_v1beta1_FileDiscovery_To_v1alpha4_FileDiscovery(in *v1beta1.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { + return autoConvert_v1beta1_FileDiscovery_To_v1alpha4_FileDiscovery(in, out, s) +} + +func autoConvert_v1alpha4_FileSource_To_v1beta1_FileSource(in *FileSource, out *v1beta1.FileSource, s conversion.Scope) error { + if err := Convert_v1alpha4_SecretFileSource_To_v1beta1_SecretFileSource(&in.Secret, &out.Secret, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_FileSource_To_v1beta1_FileSource is an autogenerated conversion function. +func Convert_v1alpha4_FileSource_To_v1beta1_FileSource(in *FileSource, out *v1beta1.FileSource, s conversion.Scope) error { + return autoConvert_v1alpha4_FileSource_To_v1beta1_FileSource(in, out, s) +} + +func autoConvert_v1beta1_FileSource_To_v1alpha4_FileSource(in *v1beta1.FileSource, out *FileSource, s conversion.Scope) error { + if err := Convert_v1beta1_SecretFileSource_To_v1alpha4_SecretFileSource(&in.Secret, &out.Secret, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_FileSource_To_v1alpha4_FileSource is an autogenerated conversion function. +func Convert_v1beta1_FileSource_To_v1alpha4_FileSource(in *v1beta1.FileSource, out *FileSource, s conversion.Scope) error { + return autoConvert_v1beta1_FileSource_To_v1alpha4_FileSource(in, out, s) +} + +func autoConvert_v1alpha4_Filesystem_To_v1beta1_Filesystem(in *Filesystem, out *v1beta1.Filesystem, s conversion.Scope) error { + out.Device = in.Device + out.Filesystem = in.Filesystem + out.Label = in.Label + out.Partition = (*string)(unsafe.Pointer(in.Partition)) + out.Overwrite = (*bool)(unsafe.Pointer(in.Overwrite)) + out.ReplaceFS = (*string)(unsafe.Pointer(in.ReplaceFS)) + out.ExtraOpts = *(*[]string)(unsafe.Pointer(&in.ExtraOpts)) + return nil +} + +// Convert_v1alpha4_Filesystem_To_v1beta1_Filesystem is an autogenerated conversion function. +func Convert_v1alpha4_Filesystem_To_v1beta1_Filesystem(in *Filesystem, out *v1beta1.Filesystem, s conversion.Scope) error { + return autoConvert_v1alpha4_Filesystem_To_v1beta1_Filesystem(in, out, s) +} + +func autoConvert_v1beta1_Filesystem_To_v1alpha4_Filesystem(in *v1beta1.Filesystem, out *Filesystem, s conversion.Scope) error { + out.Device = in.Device + out.Filesystem = in.Filesystem + out.Label = in.Label + out.Partition = (*string)(unsafe.Pointer(in.Partition)) + out.Overwrite = (*bool)(unsafe.Pointer(in.Overwrite)) + out.ReplaceFS = (*string)(unsafe.Pointer(in.ReplaceFS)) + out.ExtraOpts = *(*[]string)(unsafe.Pointer(&in.ExtraOpts)) + return nil +} + +// Convert_v1beta1_Filesystem_To_v1alpha4_Filesystem is an autogenerated conversion function. +func Convert_v1beta1_Filesystem_To_v1alpha4_Filesystem(in *v1beta1.Filesystem, out *Filesystem, s conversion.Scope) error { + return autoConvert_v1beta1_Filesystem_To_v1alpha4_Filesystem(in, out, s) +} + +func autoConvert_v1alpha4_HostPathMount_To_v1beta1_HostPathMount(in *HostPathMount, out *v1beta1.HostPathMount, s conversion.Scope) error { + out.Name = in.Name + out.HostPath = in.HostPath + out.MountPath = in.MountPath + out.ReadOnly = in.ReadOnly + out.PathType = corev1.HostPathType(in.PathType) + return nil +} + +// Convert_v1alpha4_HostPathMount_To_v1beta1_HostPathMount is an autogenerated conversion function. +func Convert_v1alpha4_HostPathMount_To_v1beta1_HostPathMount(in *HostPathMount, out *v1beta1.HostPathMount, s conversion.Scope) error { + return autoConvert_v1alpha4_HostPathMount_To_v1beta1_HostPathMount(in, out, s) +} + +func autoConvert_v1beta1_HostPathMount_To_v1alpha4_HostPathMount(in *v1beta1.HostPathMount, out *HostPathMount, s conversion.Scope) error { + out.Name = in.Name + out.HostPath = in.HostPath + out.MountPath = in.MountPath + out.ReadOnly = in.ReadOnly + out.PathType = corev1.HostPathType(in.PathType) + return nil +} + +// Convert_v1beta1_HostPathMount_To_v1alpha4_HostPathMount is an autogenerated conversion function. +func Convert_v1beta1_HostPathMount_To_v1alpha4_HostPathMount(in *v1beta1.HostPathMount, out *HostPathMount, s conversion.Scope) error { + return autoConvert_v1beta1_HostPathMount_To_v1alpha4_HostPathMount(in, out, s) +} + +func autoConvert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(in *ImageMeta, out *v1beta1.ImageMeta, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta is an autogenerated conversion function. +func Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(in *ImageMeta, out *v1beta1.ImageMeta, s conversion.Scope) error { + return autoConvert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(in, out, s) +} + +func autoConvert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(in *v1beta1.ImageMeta, out *ImageMeta, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta is an autogenerated conversion function. +func Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(in *v1beta1.ImageMeta, out *ImageMeta, s conversion.Scope) error { + return autoConvert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(in, out, s) +} + +func autoConvert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(in *InitConfiguration, out *v1beta1.InitConfiguration, s conversion.Scope) error { + out.BootstrapTokens = *(*[]v1beta1.BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) + if err := Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + if err := Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration is an autogenerated conversion function. +func Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(in *InitConfiguration, out *v1beta1.InitConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(in, out, s) +} + +func autoConvert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(in *v1beta1.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { + out.BootstrapTokens = *(*[]BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) + if err := Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + if err := Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration is an autogenerated conversion function. +func Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(in *v1beta1.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(in, out, s) +} + +func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { + if err := Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + out.CACertPath = in.CACertPath + if err := Convert_v1alpha4_Discovery_To_v1beta1_Discovery(&in.Discovery, &out.Discovery, s); err != nil { + return err + } + out.ControlPlane = (*v1beta1.JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) + return nil +} + +// Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration is an autogenerated conversion function. +func Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in, out, s) +} + +func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { + if err := Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + out.CACertPath = in.CACertPath + if err := Convert_v1beta1_Discovery_To_v1alpha4_Discovery(&in.Discovery, &out.Discovery, s); err != nil { + return err + } + out.ControlPlane = (*JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) + return nil +} + +// Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration is an autogenerated conversion function. +func Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in, out, s) +} + +func autoConvert_v1alpha4_JoinControlPlane_To_v1beta1_JoinControlPlane(in *JoinControlPlane, out *v1beta1.JoinControlPlane, s conversion.Scope) error { + if err := Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_JoinControlPlane_To_v1beta1_JoinControlPlane is an autogenerated conversion function. +func Convert_v1alpha4_JoinControlPlane_To_v1beta1_JoinControlPlane(in *JoinControlPlane, out *v1beta1.JoinControlPlane, s conversion.Scope) error { + return autoConvert_v1alpha4_JoinControlPlane_To_v1beta1_JoinControlPlane(in, out, s) +} + +func autoConvert_v1beta1_JoinControlPlane_To_v1alpha4_JoinControlPlane(in *v1beta1.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { + if err := Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_JoinControlPlane_To_v1alpha4_JoinControlPlane is an autogenerated conversion function. +func Convert_v1beta1_JoinControlPlane_To_v1alpha4_JoinControlPlane(in *v1beta1.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { + return autoConvert_v1beta1_JoinControlPlane_To_v1alpha4_JoinControlPlane(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmConfig_To_v1beta1_KubeadmConfig(in *KubeadmConfig, out *v1beta1.KubeadmConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_KubeadmConfig_To_v1beta1_KubeadmConfig is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmConfig_To_v1beta1_KubeadmConfig(in *KubeadmConfig, out *v1beta1.KubeadmConfig, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmConfig_To_v1beta1_KubeadmConfig(in, out, s) +} + +func autoConvert_v1beta1_KubeadmConfig_To_v1alpha4_KubeadmConfig(in *v1beta1.KubeadmConfig, out *KubeadmConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_KubeadmConfig_To_v1alpha4_KubeadmConfig is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfig_To_v1alpha4_KubeadmConfig(in *v1beta1.KubeadmConfig, out *KubeadmConfig, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfig_To_v1alpha4_KubeadmConfig(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmConfigList_To_v1beta1_KubeadmConfigList(in *KubeadmConfigList, out *v1beta1.KubeadmConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.KubeadmConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_KubeadmConfigList_To_v1beta1_KubeadmConfigList is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmConfigList_To_v1beta1_KubeadmConfigList(in *KubeadmConfigList, out *v1beta1.KubeadmConfigList, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmConfigList_To_v1beta1_KubeadmConfigList(in, out, s) +} + +func autoConvert_v1beta1_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in *v1beta1.KubeadmConfigList, out *KubeadmConfigList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]KubeadmConfig)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_KubeadmConfigList_To_v1alpha4_KubeadmConfigList is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in *v1beta1.KubeadmConfigList, out *KubeadmConfigList, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigList_To_v1alpha4_KubeadmConfigList(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *KubeadmConfigSpec, out *v1beta1.KubeadmConfigSpec, s conversion.Scope) error { + out.ClusterConfiguration = (*v1beta1.ClusterConfiguration)(unsafe.Pointer(in.ClusterConfiguration)) + out.InitConfiguration = (*v1beta1.InitConfiguration)(unsafe.Pointer(in.InitConfiguration)) + out.JoinConfiguration = (*v1beta1.JoinConfiguration)(unsafe.Pointer(in.JoinConfiguration)) + out.Files = *(*[]v1beta1.File)(unsafe.Pointer(&in.Files)) + out.DiskSetup = (*v1beta1.DiskSetup)(unsafe.Pointer(in.DiskSetup)) + out.Mounts = *(*[]v1beta1.MountPoints)(unsafe.Pointer(&in.Mounts)) + out.PreKubeadmCommands = *(*[]string)(unsafe.Pointer(&in.PreKubeadmCommands)) + out.PostKubeadmCommands = *(*[]string)(unsafe.Pointer(&in.PostKubeadmCommands)) + out.Users = *(*[]v1beta1.User)(unsafe.Pointer(&in.Users)) + out.NTP = (*v1beta1.NTP)(unsafe.Pointer(in.NTP)) + out.Format = v1beta1.Format(in.Format) + out.Verbosity = (*int32)(unsafe.Pointer(in.Verbosity)) + out.UseExperimentalRetryJoin = in.UseExperimentalRetryJoin + return nil +} + +// Convert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in *KubeadmConfigSpec, out *v1beta1.KubeadmConfigSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(in, out, s) +} + +func autoConvert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in *v1beta1.KubeadmConfigSpec, out *KubeadmConfigSpec, s conversion.Scope) error { + out.ClusterConfiguration = (*ClusterConfiguration)(unsafe.Pointer(in.ClusterConfiguration)) + out.InitConfiguration = (*InitConfiguration)(unsafe.Pointer(in.InitConfiguration)) + out.JoinConfiguration = (*JoinConfiguration)(unsafe.Pointer(in.JoinConfiguration)) + out.Files = *(*[]File)(unsafe.Pointer(&in.Files)) + out.DiskSetup = (*DiskSetup)(unsafe.Pointer(in.DiskSetup)) + out.Mounts = *(*[]MountPoints)(unsafe.Pointer(&in.Mounts)) + out.PreKubeadmCommands = *(*[]string)(unsafe.Pointer(&in.PreKubeadmCommands)) + out.PostKubeadmCommands = *(*[]string)(unsafe.Pointer(&in.PostKubeadmCommands)) + out.Users = *(*[]User)(unsafe.Pointer(&in.Users)) + out.NTP = (*NTP)(unsafe.Pointer(in.NTP)) + out.Format = Format(in.Format) + out.Verbosity = (*int32)(unsafe.Pointer(in.Verbosity)) + out.UseExperimentalRetryJoin = in.UseExperimentalRetryJoin + return nil +} + +// Convert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in *v1beta1.KubeadmConfigSpec, out *KubeadmConfigSpec, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(in *KubeadmConfigStatus, out *v1beta1.KubeadmConfigStatus, s conversion.Scope) error { + out.Ready = in.Ready + out.DataSecretName = (*string)(unsafe.Pointer(in.DataSecretName)) + out.FailureReason = in.FailureReason + out.FailureMessage = in.FailureMessage + out.ObservedGeneration = in.ObservedGeneration + out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1alpha4_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(in *KubeadmConfigStatus, out *v1beta1.KubeadmConfigStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(in, out, s) +} + +func autoConvert_v1beta1_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(in *v1beta1.KubeadmConfigStatus, out *KubeadmConfigStatus, s conversion.Scope) error { + out.Ready = in.Ready + out.DataSecretName = (*string)(unsafe.Pointer(in.DataSecretName)) + out.FailureReason = in.FailureReason + out.FailureMessage = in.FailureMessage + out.ObservedGeneration = in.ObservedGeneration + out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1beta1_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(in *v1beta1.KubeadmConfigStatus, out *KubeadmConfigStatus, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigStatus_To_v1alpha4_KubeadmConfigStatus(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(in *KubeadmConfigTemplate, out *v1beta1.KubeadmConfigTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(in *KubeadmConfigTemplate, out *v1beta1.KubeadmConfigTemplate, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmConfigTemplate_To_v1beta1_KubeadmConfigTemplate(in, out, s) +} + +func autoConvert_v1beta1_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(in *v1beta1.KubeadmConfigTemplate, out *KubeadmConfigTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(in *v1beta1.KubeadmConfigTemplate, out *KubeadmConfigTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigTemplate_To_v1alpha4_KubeadmConfigTemplate(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList(in *KubeadmConfigTemplateList, out *v1beta1.KubeadmConfigTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.KubeadmConfigTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList(in *KubeadmConfigTemplateList, out *v1beta1.KubeadmConfigTemplateList, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmConfigTemplateList_To_v1beta1_KubeadmConfigTemplateList(in, out, s) +} + +func autoConvert_v1beta1_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList(in *v1beta1.KubeadmConfigTemplateList, out *KubeadmConfigTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]KubeadmConfigTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList(in *v1beta1.KubeadmConfigTemplateList, out *KubeadmConfigTemplateList, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigTemplateList_To_v1alpha4_KubeadmConfigTemplateList(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(in *KubeadmConfigTemplateResource, out *v1beta1.KubeadmConfigTemplateResource, s conversion.Scope) error { + if err := Convert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(in *KubeadmConfigTemplateResource, out *v1beta1.KubeadmConfigTemplateResource, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(in, out, s) +} + +func autoConvert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in *v1beta1.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s conversion.Scope) error { + if err := Convert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in *v1beta1.KubeadmConfigTemplateResource, out *KubeadmConfigTemplateResource, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(in *KubeadmConfigTemplateSpec, out *v1beta1.KubeadmConfigTemplateSpec, s conversion.Scope) error { + if err := Convert_v1alpha4_KubeadmConfigTemplateResource_To_v1beta1_KubeadmConfigTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(in *KubeadmConfigTemplateSpec, out *v1beta1.KubeadmConfigTemplateSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmConfigTemplateSpec_To_v1beta1_KubeadmConfigTemplateSpec(in, out, s) +} + +func autoConvert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec(in *v1beta1.KubeadmConfigTemplateSpec, out *KubeadmConfigTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta1_KubeadmConfigTemplateResource_To_v1alpha4_KubeadmConfigTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec is an autogenerated conversion function. +func Convert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec(in *v1beta1.KubeadmConfigTemplateSpec, out *KubeadmConfigTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmConfigTemplateSpec_To_v1alpha4_KubeadmConfigTemplateSpec(in, out, s) +} + +func autoConvert_v1alpha4_LocalEtcd_To_v1beta1_LocalEtcd(in *LocalEtcd, out *v1beta1.LocalEtcd, s conversion.Scope) error { + if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + out.DataDir = in.DataDir + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) + out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) + return nil +} + +// Convert_v1alpha4_LocalEtcd_To_v1beta1_LocalEtcd is an autogenerated conversion function. +func Convert_v1alpha4_LocalEtcd_To_v1beta1_LocalEtcd(in *LocalEtcd, out *v1beta1.LocalEtcd, s conversion.Scope) error { + return autoConvert_v1alpha4_LocalEtcd_To_v1beta1_LocalEtcd(in, out, s) +} + +func autoConvert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(in *v1beta1.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { + if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + out.DataDir = in.DataDir + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) + out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) + return nil +} + +// Convert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd is an autogenerated conversion function. +func Convert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(in *v1beta1.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { + return autoConvert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(in, out, s) +} + +func autoConvert_v1alpha4_NTP_To_v1beta1_NTP(in *NTP, out *v1beta1.NTP, s conversion.Scope) error { + out.Servers = *(*[]string)(unsafe.Pointer(&in.Servers)) + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + return nil +} + +// Convert_v1alpha4_NTP_To_v1beta1_NTP is an autogenerated conversion function. +func Convert_v1alpha4_NTP_To_v1beta1_NTP(in *NTP, out *v1beta1.NTP, s conversion.Scope) error { + return autoConvert_v1alpha4_NTP_To_v1beta1_NTP(in, out, s) +} + +func autoConvert_v1beta1_NTP_To_v1alpha4_NTP(in *v1beta1.NTP, out *NTP, s conversion.Scope) error { + out.Servers = *(*[]string)(unsafe.Pointer(&in.Servers)) + out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) + return nil +} + +// Convert_v1beta1_NTP_To_v1alpha4_NTP is an autogenerated conversion function. +func Convert_v1beta1_NTP_To_v1alpha4_NTP(in *v1beta1.NTP, out *NTP, s conversion.Scope) error { + return autoConvert_v1beta1_NTP_To_v1alpha4_NTP(in, out, s) +} + +func autoConvert_v1alpha4_Networking_To_v1beta1_Networking(in *Networking, out *v1beta1.Networking, s conversion.Scope) error { + out.ServiceSubnet = in.ServiceSubnet + out.PodSubnet = in.PodSubnet + out.DNSDomain = in.DNSDomain + return nil +} + +// Convert_v1alpha4_Networking_To_v1beta1_Networking is an autogenerated conversion function. +func Convert_v1alpha4_Networking_To_v1beta1_Networking(in *Networking, out *v1beta1.Networking, s conversion.Scope) error { + return autoConvert_v1alpha4_Networking_To_v1beta1_Networking(in, out, s) +} + +func autoConvert_v1beta1_Networking_To_v1alpha4_Networking(in *v1beta1.Networking, out *Networking, s conversion.Scope) error { + out.ServiceSubnet = in.ServiceSubnet + out.PodSubnet = in.PodSubnet + out.DNSDomain = in.DNSDomain + return nil +} + +// Convert_v1beta1_Networking_To_v1alpha4_Networking is an autogenerated conversion function. +func Convert_v1beta1_Networking_To_v1alpha4_Networking(in *v1beta1.Networking, out *Networking, s conversion.Scope) error { + return autoConvert_v1beta1_Networking_To_v1alpha4_Networking(in, out, s) +} + +func autoConvert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1beta1.NodeRegistrationOptions, s conversion.Scope) error { + out.Name = in.Name + out.CRISocket = in.CRISocket + out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) + out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) + out.IgnorePreflightErrors = *(*[]string)(unsafe.Pointer(&in.IgnorePreflightErrors)) + return nil +} + +// Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions is an autogenerated conversion function. +func Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1beta1.NodeRegistrationOptions, s conversion.Scope) error { + return autoConvert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in, out, s) +} + +func autoConvert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in *v1beta1.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { + out.Name = in.Name + out.CRISocket = in.CRISocket + out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) + out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) + out.IgnorePreflightErrors = *(*[]string)(unsafe.Pointer(&in.IgnorePreflightErrors)) + return nil +} + +// Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions is an autogenerated conversion function. +func Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in *v1beta1.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { + return autoConvert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in, out, s) +} + +func autoConvert_v1alpha4_Partition_To_v1beta1_Partition(in *Partition, out *v1beta1.Partition, s conversion.Scope) error { + out.Device = in.Device + out.Layout = in.Layout + out.Overwrite = (*bool)(unsafe.Pointer(in.Overwrite)) + out.TableType = (*string)(unsafe.Pointer(in.TableType)) + return nil +} + +// Convert_v1alpha4_Partition_To_v1beta1_Partition is an autogenerated conversion function. +func Convert_v1alpha4_Partition_To_v1beta1_Partition(in *Partition, out *v1beta1.Partition, s conversion.Scope) error { + return autoConvert_v1alpha4_Partition_To_v1beta1_Partition(in, out, s) +} + +func autoConvert_v1beta1_Partition_To_v1alpha4_Partition(in *v1beta1.Partition, out *Partition, s conversion.Scope) error { + out.Device = in.Device + out.Layout = in.Layout + out.Overwrite = (*bool)(unsafe.Pointer(in.Overwrite)) + out.TableType = (*string)(unsafe.Pointer(in.TableType)) + return nil +} + +// Convert_v1beta1_Partition_To_v1alpha4_Partition is an autogenerated conversion function. +func Convert_v1beta1_Partition_To_v1alpha4_Partition(in *v1beta1.Partition, out *Partition, s conversion.Scope) error { + return autoConvert_v1beta1_Partition_To_v1alpha4_Partition(in, out, s) +} + +func autoConvert_v1alpha4_SecretFileSource_To_v1beta1_SecretFileSource(in *SecretFileSource, out *v1beta1.SecretFileSource, s conversion.Scope) error { + out.Name = in.Name + out.Key = in.Key + return nil +} + +// Convert_v1alpha4_SecretFileSource_To_v1beta1_SecretFileSource is an autogenerated conversion function. +func Convert_v1alpha4_SecretFileSource_To_v1beta1_SecretFileSource(in *SecretFileSource, out *v1beta1.SecretFileSource, s conversion.Scope) error { + return autoConvert_v1alpha4_SecretFileSource_To_v1beta1_SecretFileSource(in, out, s) +} + +func autoConvert_v1beta1_SecretFileSource_To_v1alpha4_SecretFileSource(in *v1beta1.SecretFileSource, out *SecretFileSource, s conversion.Scope) error { + out.Name = in.Name + out.Key = in.Key + return nil +} + +// Convert_v1beta1_SecretFileSource_To_v1alpha4_SecretFileSource is an autogenerated conversion function. +func Convert_v1beta1_SecretFileSource_To_v1alpha4_SecretFileSource(in *v1beta1.SecretFileSource, out *SecretFileSource, s conversion.Scope) error { + return autoConvert_v1beta1_SecretFileSource_To_v1alpha4_SecretFileSource(in, out, s) +} + +func autoConvert_v1alpha4_User_To_v1beta1_User(in *User, out *v1beta1.User, s conversion.Scope) error { + out.Name = in.Name + out.Gecos = (*string)(unsafe.Pointer(in.Gecos)) + out.Groups = (*string)(unsafe.Pointer(in.Groups)) + out.HomeDir = (*string)(unsafe.Pointer(in.HomeDir)) + out.Inactive = (*bool)(unsafe.Pointer(in.Inactive)) + out.Shell = (*string)(unsafe.Pointer(in.Shell)) + out.Passwd = (*string)(unsafe.Pointer(in.Passwd)) + out.PrimaryGroup = (*string)(unsafe.Pointer(in.PrimaryGroup)) + out.LockPassword = (*bool)(unsafe.Pointer(in.LockPassword)) + out.Sudo = (*string)(unsafe.Pointer(in.Sudo)) + out.SSHAuthorizedKeys = *(*[]string)(unsafe.Pointer(&in.SSHAuthorizedKeys)) + return nil +} + +// Convert_v1alpha4_User_To_v1beta1_User is an autogenerated conversion function. +func Convert_v1alpha4_User_To_v1beta1_User(in *User, out *v1beta1.User, s conversion.Scope) error { + return autoConvert_v1alpha4_User_To_v1beta1_User(in, out, s) +} + +func autoConvert_v1beta1_User_To_v1alpha4_User(in *v1beta1.User, out *User, s conversion.Scope) error { + out.Name = in.Name + out.Gecos = (*string)(unsafe.Pointer(in.Gecos)) + out.Groups = (*string)(unsafe.Pointer(in.Groups)) + out.HomeDir = (*string)(unsafe.Pointer(in.HomeDir)) + out.Inactive = (*bool)(unsafe.Pointer(in.Inactive)) + out.Shell = (*string)(unsafe.Pointer(in.Shell)) + out.Passwd = (*string)(unsafe.Pointer(in.Passwd)) + out.PrimaryGroup = (*string)(unsafe.Pointer(in.PrimaryGroup)) + out.LockPassword = (*bool)(unsafe.Pointer(in.LockPassword)) + out.Sudo = (*string)(unsafe.Pointer(in.Sudo)) + out.SSHAuthorizedKeys = *(*[]string)(unsafe.Pointer(&in.SSHAuthorizedKeys)) + return nil +} + +// Convert_v1beta1_User_To_v1alpha4_User is an autogenerated conversion function. +func Convert_v1beta1_User_To_v1alpha4_User(in *v1beta1.User, out *User, s conversion.Scope) error { + return autoConvert_v1beta1_User_To_v1alpha4_User(in, out, s) +} diff --git a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go index d331cf8baff5..76c7bd429f9a 100644 --- a/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go +++ b/bootstrap/kubeadm/api/v1alpha4/zz_generated.deepcopy.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" + "sigs.k8s.io/cluster-api/api/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -702,7 +702,7 @@ func (in *KubeadmConfigStatus) DeepCopyInto(out *KubeadmConfigStatus) { } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) + *out = make(v1beta1.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/bootstrap/kubeadm/api/v1beta1/condition_consts.go b/bootstrap/kubeadm/api/v1beta1/condition_consts.go new file mode 100644 index 000000000000..da9076391a46 --- /dev/null +++ b/bootstrap/kubeadm/api/v1beta1/condition_consts.go @@ -0,0 +1,61 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + +// Conditions and condition Reasons for the KubeadmConfig object + +const ( + // DataSecretAvailableCondition documents the status of the bootstrap secret generation process. + // + // NOTE: When the DataSecret generation starts the process completes immediately and within the + // same reconciliation, so the user will always see a transition from Wait to Generated without having + // evidence that BootstrapSecret generation is started/in progress. + DataSecretAvailableCondition clusterv1.ConditionType = "DataSecretAvailable" + + // WaitingForClusterInfrastructureReason (Severity=Info) document a bootstrap secret generation process + // waiting for the cluster infrastructure to be ready. + // + // NOTE: Having the cluster infrastructure ready is a pre-condition for starting to create machines; + // the KubeadmConfig controller ensure this pre-condition is satisfied. + WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure" + + // DataSecretGenerationFailedReason (Severity=Warning) documents a KubeadmConfig controller detecting + // an error while generating a data secret; those kind of errors are usually due to misconfigurations + // and user intervention is required to get them fixed. + DataSecretGenerationFailedReason = "DataSecretGenerationFailed" +) + +const ( + // CertificatesAvailableCondition documents that cluster certificates are available. + // + // NOTE: Cluster certificates are generated only for the KubeadmConfig object linked to the initial control plane + // machine, if the cluster is not using a control plane ref object, if the certificates are not provided + // by the users. + // IMPORTANT: This condition won't be re-created after clusterctl move. + CertificatesAvailableCondition clusterv1.ConditionType = "CertificatesAvailable" + + // CertificatesGenerationFailedReason (Severity=Warning) documents a KubeadmConfig controller detecting + // an error while generating certificates; those kind of errors are usually temporary and the controller + // automatically recover from them. + CertificatesGenerationFailedReason = "CertificatesGenerationFailed" + + // CertificatesCorruptedReason (Severity=Error) documents a KubeadmConfig controller detecting + // an error while while retrieving certificates for a joining node. + CertificatesCorruptedReason = "CertificatesCorrupted" +) diff --git a/bootstrap/kubeadm/api/v1beta1/conversion.go b/bootstrap/kubeadm/api/v1beta1/conversion.go new file mode 100644 index 000000000000..7e728fd38b5b --- /dev/null +++ b/bootstrap/kubeadm/api/v1beta1/conversion.go @@ -0,0 +1,27 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 + +func (*KubeadmConfig) Hub() {} +func (*KubeadmConfigList) Hub() {} +func (*KubeadmConfigTemplate) Hub() {} +func (*KubeadmConfigTemplateList) Hub() {} + +func (*ClusterConfiguration) Hub() {} +func (*ClusterStatus) Hub() {} +func (*InitConfiguration) Hub() {} +func (*JoinConfiguration) Hub() {} diff --git a/bootstrap/kubeadm/api/v1beta1/doc.go b/bootstrap/kubeadm/api/v1beta1/doc.go new file mode 100644 index 000000000000..f8a9210a0fda --- /dev/null +++ b/bootstrap/kubeadm/api/v1beta1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 diff --git a/bootstrap/kubeadm/api/v1beta1/groupversion_info.go b/bootstrap/kubeadm/api/v1beta1/groupversion_info.go new file mode 100644 index 000000000000..198a6e970a33 --- /dev/null +++ b/bootstrap/kubeadm/api/v1beta1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 contains API Schema definitions for the kubeadm v1beta1 API group +// +kubebuilder:object:generate=true +// +groupName=bootstrap.cluster.x-k8s.io +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects. + GroupVersion = schema.GroupVersion{Group: "bootstrap.cluster.x-k8s.io", Version: "v1beta1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go new file mode 100644 index 000000000000..b0a92b063b2f --- /dev/null +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go @@ -0,0 +1,501 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + "strings" + + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + bootstrapapi "k8s.io/cluster-bootstrap/token/api" + bootstraputil "k8s.io/cluster-bootstrap/token/util" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// InitConfiguration contains a list of elements that is specific "kubeadm init"-only runtime +// information. +type InitConfiguration struct { + metav1.TypeMeta `json:",inline"` + + // BootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. + // This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature + // +optional + BootstrapTokens []BootstrapToken `json:"bootstrapTokens,omitempty"` + + // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // When used in the context of control plane nodes, NodeRegistration should remain consistent + // across both InitConfiguration and JoinConfiguration + // +optional + NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` + + // LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node + // In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint + // is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This + // configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible + // on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process + // fails you may set the desired value here. + // +optional + LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterConfiguration contains cluster-wide configuration for a kubeadm cluster. +type ClusterConfiguration struct { + metav1.TypeMeta `json:",inline"` + + // Etcd holds configuration for etcd. + // NB: This value defaults to a Local (stacked) etcd + // +optional + Etcd Etcd `json:"etcd,omitempty"` + + // Networking holds configuration for the networking topology of the cluster. + // NB: This value defaults to the Cluster object spec.clusterNetwork. + // +optional + Networking Networking `json:"networking,omitempty"` + + // KubernetesVersion is the target version of the control plane. + // NB: This value defaults to the Machine object spec.version + // +optional + KubernetesVersion string `json:"kubernetesVersion,omitempty"` + + // ControlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it + // can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. + // In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort + // are used; in case the ControlPlaneEndpoint is specified but without a TCP port, + // the BindPort is used. + // Possible usages are: + // e.g. In a cluster with more than one control plane instances, this field should be + // assigned the address of the external load balancer in front of the + // control plane instances. + // e.g. in environments with enforced node recycling, the ControlPlaneEndpoint + // could be used for assigning a stable DNS to the control plane. + // NB: This value defaults to the first value in the Cluster object status.apiEndpoints array. + // +optional + ControlPlaneEndpoint string `json:"controlPlaneEndpoint,omitempty"` + + // APIServer contains extra settings for the API server control plane component + // +optional + APIServer APIServer `json:"apiServer,omitempty"` + + // ControllerManager contains extra settings for the controller manager control plane component + // +optional + ControllerManager ControlPlaneComponent `json:"controllerManager,omitempty"` + + // Scheduler contains extra settings for the scheduler control plane component + // +optional + Scheduler ControlPlaneComponent `json:"scheduler,omitempty"` + + // DNS defines the options for the DNS add-on installed in the cluster. + // +optional + DNS DNS `json:"dns,omitempty"` + + // CertificatesDir specifies where to store or look for all required certificates. + // NB: if not provided, this will default to `/etc/kubernetes/pki` + // +optional + CertificatesDir string `json:"certificatesDir,omitempty"` + + // ImageRepository sets the container registry to pull images from. + // If empty, `k8s.gcr.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`) + // `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `k8s.gcr.io` + // will be used for all the other images. + // +optional + ImageRepository string `json:"imageRepository,omitempty"` + + // FeatureGates enabled by the user. + // +optional + FeatureGates map[string]bool `json:"featureGates,omitempty"` + + // The cluster name + // +optional + ClusterName string `json:"clusterName,omitempty"` +} + +// ControlPlaneComponent holds settings common to control plane component of the cluster. +type ControlPlaneComponent struct { + // ExtraArgs is an extra set of flags to pass to the control plane component. + // TODO: This is temporary and ideally we would like to switch all components to + // use ComponentConfig + ConfigMaps. + // +optional + ExtraArgs map[string]string `json:"extraArgs,omitempty"` + + // ExtraVolumes is an extra set of host volumes, mounted to the control plane component. + // +optional + ExtraVolumes []HostPathMount `json:"extraVolumes,omitempty"` +} + +// APIServer holds settings necessary for API server deployments in the cluster. +type APIServer struct { + ControlPlaneComponent `json:",inline"` + + // CertSANs sets extra Subject Alternative Names for the API Server signing cert. + // +optional + CertSANs []string `json:"certSANs,omitempty"` + + // TimeoutForControlPlane controls the timeout that we use for API server to appear + // +optional + TimeoutForControlPlane *metav1.Duration `json:"timeoutForControlPlane,omitempty"` +} + +// DNS defines the DNS addon that should be used in the cluster. +type DNS struct { + // ImageMeta allows to customize the image used for the DNS component + ImageMeta `json:",inline"` +} + +// ImageMeta allows to customize the image used for components that are not +// originated from the Kubernetes/Kubernetes release process. +type ImageMeta struct { + // ImageRepository sets the container registry to pull images from. + // if not set, the ImageRepository defined in ClusterConfiguration will be used instead. + // +optional + ImageRepository string `json:"imageRepository,omitempty"` + + // ImageTag allows to specify a tag for the image. + // In case this value is set, kubeadm does not change automatically the version of the above components during upgrades. + // +optional + ImageTag string `json:"imageTag,omitempty"` + + //TODO: evaluate if we need also a ImageName based on user feedbacks +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterStatus contains the cluster status. The ClusterStatus will be stored in the kubeadm-config +// ConfigMap in the cluster, and then updated by kubeadm when additional control plane instance joins or leaves the cluster. +// Deprecated: ClusterStatus has been removed from kubeadm v1beta3 API; This type is preserved only to support +// conversion to older versions of the kubeadm API. +type ClusterStatus struct { + metav1.TypeMeta `json:",inline"` + + // APIEndpoints currently available in the cluster, one for each control plane/api server instance. + // The key of the map is the IP of the host's default interface + APIEndpoints map[string]APIEndpoint `json:"apiEndpoints"` +} + +// APIEndpoint struct contains elements of API server instance deployed on a node. +type APIEndpoint struct { + // AdvertiseAddress sets the IP address for the API server to advertise. + // +optional + AdvertiseAddress string `json:"advertiseAddress,omitempty"` + + // BindPort sets the secure port for the API Server to bind to. + // Defaults to 6443. + // +optional + BindPort int32 `json:"bindPort,omitempty"` +} + +// NodeRegistrationOptions holds fields that relate to registering a new control-plane or node to the cluster, either via "kubeadm init" or "kubeadm join". +type NodeRegistrationOptions struct { + + // Name is the `.Metadata.Name` field of the Node API object that will be created in this `kubeadm init` or `kubeadm join` operation. + // This field is also used in the CommonName field of the kubelet's client certificate to the API server. + // Defaults to the hostname of the node if not provided. + // +optional + Name string `json:"name,omitempty"` + + // CRISocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use + // +optional + CRISocket string `json:"criSocket,omitempty"` + + // Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process + // it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an + // empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration. + Taints []corev1.Taint `json:"taints,omitempty"` + + // KubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file + // kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap + // Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. + // +optional + KubeletExtraArgs map[string]string `json:"kubeletExtraArgs,omitempty"` + + // IgnorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered. + // +optional + IgnorePreflightErrors []string `json:"ignorePreflightErrors,omitempty"` +} + +// Networking contains elements describing cluster's networking configuration. +type Networking struct { + // ServiceSubnet is the subnet used by k8s services. + // Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or + // to "10.96.0.0/12" if that's unset. + // +optional + ServiceSubnet string `json:"serviceSubnet,omitempty"` + // PodSubnet is the subnet used by pods. + // If unset, the API server will not allocate CIDR ranges for every node. + // Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set + // +optional + PodSubnet string `json:"podSubnet,omitempty"` + // DNSDomain is the dns domain used by k8s services. Defaults to "cluster.local". + // +optional + DNSDomain string `json:"dnsDomain,omitempty"` +} + +// BootstrapToken describes one bootstrap token, stored as a Secret in the cluster. +type BootstrapToken struct { + // Token is used for establishing bidirectional trust between nodes and control-planes. + // Used for joining nodes in the cluster. + Token *BootstrapTokenString `json:"token"` + // Description sets a human-friendly message why this token exists and what it's used + // for, so other administrators can know its purpose. + // +optional + Description string `json:"description,omitempty"` + // TTL defines the time to live for this token. Defaults to 24h. + // Expires and TTL are mutually exclusive. + // +optional + TTL *metav1.Duration `json:"ttl,omitempty"` + // Expires specifies the timestamp when this token expires. Defaults to being set + // dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive. + // +optional + Expires *metav1.Time `json:"expires,omitempty"` + // Usages describes the ways in which this token can be used. Can by default be used + // for establishing bidirectional trust, but that can be changed here. + // +optional + Usages []string `json:"usages,omitempty"` + // Groups specifies the extra groups that this token will authenticate as when/if + // used for authentication + // +optional + Groups []string `json:"groups,omitempty"` +} + +// Etcd contains elements describing Etcd configuration. +type Etcd struct { + + // Local provides configuration knobs for configuring the local etcd instance + // Local and External are mutually exclusive + // +optional + Local *LocalEtcd `json:"local,omitempty"` + + // External describes how to connect to an external etcd cluster + // Local and External are mutually exclusive + // +optional + External *ExternalEtcd `json:"external,omitempty"` +} + +// LocalEtcd describes that kubeadm should run an etcd cluster locally. +type LocalEtcd struct { + // ImageMeta allows to customize the container used for etcd + ImageMeta `json:",inline"` + + // DataDir is the directory etcd will place its data. + // Defaults to "/var/lib/etcd". + // +optional + DataDir string `json:"dataDir,omitempty"` + + // ExtraArgs are extra arguments provided to the etcd binary + // when run inside a static pod. + // +optional + ExtraArgs map[string]string `json:"extraArgs,omitempty"` + + // ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert. + // +optional + ServerCertSANs []string `json:"serverCertSANs,omitempty"` + // PeerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert. + // +optional + PeerCertSANs []string `json:"peerCertSANs,omitempty"` +} + +// ExternalEtcd describes an external etcd cluster. +// Kubeadm has no knowledge of where certificate files live and they must be supplied. +type ExternalEtcd struct { + // Endpoints of etcd members. Required for ExternalEtcd. + Endpoints []string `json:"endpoints"` + + // CAFile is an SSL Certificate Authority file used to secure etcd communication. + // Required if using a TLS connection. + CAFile string `json:"caFile"` + + // CertFile is an SSL certification file used to secure etcd communication. + // Required if using a TLS connection. + CertFile string `json:"certFile"` + + // KeyFile is an SSL key file used to secure etcd communication. + // Required if using a TLS connection. + KeyFile string `json:"keyFile"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// JoinConfiguration contains elements describing a particular node. +type JoinConfiguration struct { + metav1.TypeMeta `json:",inline"` + + // NodeRegistration holds fields that relate to registering the new control-plane node to the cluster. + // When used in the context of control plane nodes, NodeRegistration should remain consistent + // across both InitConfiguration and JoinConfiguration + // +optional + NodeRegistration NodeRegistrationOptions `json:"nodeRegistration,omitempty"` + + // CACertPath is the path to the SSL certificate authority used to + // secure comunications between node and control-plane. + // Defaults to "/etc/kubernetes/pki/ca.crt". + // +optional + // TODO: revisit when there is defaulting from k/k + CACertPath string `json:"caCertPath,omitempty"` + + // Discovery specifies the options for the kubelet to use during the TLS Bootstrap process + // +optional + // TODO: revisit when there is defaulting from k/k + Discovery Discovery `json:"discovery,omitempty"` + + // ControlPlane defines the additional control plane instance to be deployed on the joining node. + // If nil, no additional control plane instance will be deployed. + // +optional + ControlPlane *JoinControlPlane `json:"controlPlane,omitempty"` +} + +// JoinControlPlane contains elements describing an additional control plane instance to be deployed on the joining node. +type JoinControlPlane struct { + // LocalAPIEndpoint represents the endpoint of the API server instance to be deployed on this node. + // +optional + LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` +} + +// Discovery specifies the options for the kubelet to use during the TLS Bootstrap process. +type Discovery struct { + // BootstrapToken is used to set the options for bootstrap token based discovery + // BootstrapToken and File are mutually exclusive + // +optional + BootstrapToken *BootstrapTokenDiscovery `json:"bootstrapToken,omitempty"` + + // File is used to specify a file or URL to a kubeconfig file from which to load cluster information + // BootstrapToken and File are mutually exclusive + // +optional + File *FileDiscovery `json:"file,omitempty"` + + // TLSBootstrapToken is a token used for TLS bootstrapping. + // If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. + // If .File is set, this field **must be set** in case the KubeConfigFile does not contain any other authentication information + // +optional + TLSBootstrapToken string `json:"tlsBootstrapToken,omitempty"` + + // Timeout modifies the discovery timeout + // +optional + Timeout *metav1.Duration `json:"timeout,omitempty"` +} + +// BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery. +type BootstrapTokenDiscovery struct { + // Token is a token used to validate cluster information + // fetched from the control-plane. + Token string `json:"token"` + + // APIServerEndpoint is an IP or domain name to the API server from which info will be fetched. + // +optional + APIServerEndpoint string `json:"apiServerEndpoint,omitempty"` + + // CACertHashes specifies a set of public key pins to verify + // when token-based discovery is used. The root CA found during discovery + // must match one of these values. Specifying an empty set disables root CA + // pinning, which can be unsafe. Each hash is specified as ":", + // where the only currently supported type is "sha256". This is a hex-encoded + // SHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded + // ASN.1. These hashes can be calculated using, for example, OpenSSL: + // openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex + // +optional + CACertHashes []string `json:"caCertHashes,omitempty"` + + // UnsafeSkipCAVerification allows token-based discovery + // without CA verification via CACertHashes. This can weaken + // the security of kubeadm since other nodes can impersonate the control-plane. + // +optional + UnsafeSkipCAVerification bool `json:"unsafeSkipCAVerification,omitempty"` +} + +// FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load cluster information. +type FileDiscovery struct { + // KubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information + KubeConfigPath string `json:"kubeConfigPath"` +} + +// HostPathMount contains elements describing volumes that are mounted from the +// host. +type HostPathMount struct { + // Name of the volume inside the pod template. + Name string `json:"name"` + // HostPath is the path in the host that will be mounted inside + // the pod. + HostPath string `json:"hostPath"` + // MountPath is the path inside the pod where hostPath will be mounted. + MountPath string `json:"mountPath"` + // ReadOnly controls write access to the volume + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + // PathType is the type of the HostPath. + // +optional + PathType corev1.HostPathType `json:"pathType,omitempty"` +} + +// BootstrapTokenString is a token of the format abcdef.abcdef0123456789 that is used +// for both validation of the practically of the API server from a joining node's point +// of view and as an authentication method for the node in the bootstrap phase of +// "kubeadm join". This token is and should be short-lived. +// +// +kubebuilder:validation:Type=string +type BootstrapTokenString struct { + ID string `json:"-"` + Secret string `json:"-"` +} + +// MarshalJSON implements the json.Marshaler interface. +func (bts BootstrapTokenString) MarshalJSON() ([]byte, error) { + return []byte(fmt.Sprintf(`"%s"`, bts.String())), nil +} + +// UnmarshalJSON implements the json.Unmarshaller interface. +func (bts *BootstrapTokenString) UnmarshalJSON(b []byte) error { + // If the token is represented as "", just return quickly without an error + if len(b) == 0 { + return nil + } + + // Remove unnecessary " characters coming from the JSON parser + token := strings.ReplaceAll(string(b), `"`, ``) + // Convert the string Token to a BootstrapTokenString object + newbts, err := NewBootstrapTokenString(token) + if err != nil { + return err + } + bts.ID = newbts.ID + bts.Secret = newbts.Secret + return nil +} + +// String returns the string representation of the BootstrapTokenString. +func (bts BootstrapTokenString) String() string { + if len(bts.ID) > 0 && len(bts.Secret) > 0 { + return bootstraputil.TokenFromIDAndSecret(bts.ID, bts.Secret) + } + return "" +} + +// NewBootstrapTokenString converts the given Bootstrap Token as a string +// to the BootstrapTokenString object used for serialization/deserialization +// and internal usage. It also automatically validates that the given token +// is of the right format. +func NewBootstrapTokenString(token string) (*BootstrapTokenString, error) { + substrs := bootstraputil.BootstrapTokenRegexp.FindStringSubmatch(token) + // TODO: Add a constant for the 3 value here, and explain better why it's needed (other than because how the regexp parsin works) + if len(substrs) != 3 { + return nil, errors.Errorf("the bootstrap token %q was not of the form %q", token, bootstrapapi.BootstrapTokenPattern) + } + + return &BootstrapTokenString{ID: substrs[1], Secret: substrs[2]}, nil +} diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types_test.go b/bootstrap/kubeadm/api/v1beta1/kubeadm_types_test.go new file mode 100644 index 000000000000..50cb79095ec0 --- /dev/null +++ b/bootstrap/kubeadm/api/v1beta1/kubeadm_types_test.go @@ -0,0 +1,188 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + "reflect" + "testing" + + . "github.com/onsi/gomega" + + "github.com/pkg/errors" +) + +func TestMarshalJSON(t *testing.T) { + var tests = []struct { + bts BootstrapTokenString + expected string + }{ + {BootstrapTokenString{ID: "abcdef", Secret: "abcdef0123456789"}, `"abcdef.abcdef0123456789"`}, + {BootstrapTokenString{ID: "foo", Secret: "bar"}, `"foo.bar"`}, + {BootstrapTokenString{ID: "h", Secret: "b"}, `"h.b"`}, + } + for _, rt := range tests { + t.Run(rt.bts.ID, func(t *testing.T) { + g := NewWithT(t) + + b, err := json.Marshal(rt.bts) + g.Expect(err).NotTo(HaveOccurred()) + g.Expect(string(b)).To(Equal(rt.expected)) + }) + } +} + +func TestUnmarshalJSON(t *testing.T) { + var tests = []struct { + input string + bts *BootstrapTokenString + expectedError bool + }{ + {`"f.s"`, &BootstrapTokenString{}, true}, + {`"abcdef."`, &BootstrapTokenString{}, true}, + {`"abcdef:abcdef0123456789"`, &BootstrapTokenString{}, true}, + {`abcdef.abcdef0123456789`, &BootstrapTokenString{}, true}, + {`"abcdef.abcdef0123456789`, &BootstrapTokenString{}, true}, + {`"abcdef.ABCDEF0123456789"`, &BootstrapTokenString{}, true}, + {`"abcdef.abcdef0123456789"`, &BootstrapTokenString{ID: "abcdef", Secret: "abcdef0123456789"}, false}, + {`"123456.aabbccddeeffgghh"`, &BootstrapTokenString{ID: "123456", Secret: "aabbccddeeffgghh"}, false}, + } + for _, rt := range tests { + t.Run(rt.input, func(t *testing.T) { + g := NewWithT(t) + + newbts := &BootstrapTokenString{} + err := json.Unmarshal([]byte(rt.input), newbts) + if rt.expectedError { + g.Expect(err).To(HaveOccurred()) + } else { + g.Expect(err).NotTo(HaveOccurred()) + } + g.Expect(newbts).To(Equal(rt.bts)) + }) + } +} + +func TestJSONRoundtrip(t *testing.T) { + var tests = []struct { + input string + bts *BootstrapTokenString + }{ + {`"abcdef.abcdef0123456789"`, nil}, + {"", &BootstrapTokenString{ID: "abcdef", Secret: "abcdef0123456789"}}, + } + for _, rt := range tests { + t.Run(rt.input, func(t *testing.T) { + g := NewWithT(t) + + g.Expect(roundtrip(rt.input, rt.bts)).To(Succeed()) + }) + } +} + +func roundtrip(input string, bts *BootstrapTokenString) error { + var b []byte + var err error + newbts := &BootstrapTokenString{} + // If string input was specified, roundtrip like this: string -> (unmarshal) -> object -> (marshal) -> string + if len(input) > 0 { + if err := json.Unmarshal([]byte(input), newbts); err != nil { + return errors.Wrap(err, "expected no unmarshal error, got error") + } + if b, err = json.Marshal(newbts); err != nil { + return errors.Wrap(err, "expected no marshal error, got error") + } + if input != string(b) { + return errors.Errorf( + "expected token: %s\n\t actual: %s", + input, + string(b), + ) + } + } else { // Otherwise, roundtrip like this: object -> (marshal) -> string -> (unmarshal) -> object + if b, err = json.Marshal(bts); err != nil { + return errors.Wrap(err, "expected no marshal error, got error") + } + if err := json.Unmarshal(b, newbts); err != nil { + return errors.Wrap(err, "expected no unmarshal error, got error") + } + if !reflect.DeepEqual(bts, newbts) { + return errors.Errorf( + "expected object: %v\n\t actual: %v", + bts, + newbts, + ) + } + } + return nil +} + +func TestTokenFromIDAndSecret(t *testing.T) { + var tests = []struct { + bts BootstrapTokenString + expected string + }{ + {BootstrapTokenString{ID: "foo", Secret: "bar"}, "foo.bar"}, + {BootstrapTokenString{ID: "abcdef", Secret: "abcdef0123456789"}, "abcdef.abcdef0123456789"}, + {BootstrapTokenString{ID: "h", Secret: "b"}, "h.b"}, + } + for _, rt := range tests { + t.Run(rt.bts.ID, func(t *testing.T) { + g := NewWithT(t) + + g.Expect(rt.bts.String()).To(Equal(rt.expected)) + }) + } +} + +func TestNewBootstrapTokenString(t *testing.T) { + var tests = []struct { + token string + expectedError bool + bts *BootstrapTokenString + }{ + {token: "", expectedError: true, bts: nil}, + {token: ".", expectedError: true, bts: nil}, + {token: "1234567890123456789012", expectedError: true, bts: nil}, // invalid parcel size + {token: "12345.1234567890123456", expectedError: true, bts: nil}, // invalid parcel size + {token: ".1234567890123456", expectedError: true, bts: nil}, // invalid parcel size + {token: "123456.", expectedError: true, bts: nil}, // invalid parcel size + {token: "123456:1234567890.123456", expectedError: true, bts: nil}, // invalid separation + {token: "abcdef:1234567890123456", expectedError: true, bts: nil}, // invalid separation + {token: "Abcdef.1234567890123456", expectedError: true, bts: nil}, // invalid token id + {token: "123456.AABBCCDDEEFFGGHH", expectedError: true, bts: nil}, // invalid token secret + {token: "123456.AABBCCD-EEFFGGHH", expectedError: true, bts: nil}, // invalid character + {token: "abc*ef.1234567890123456", expectedError: true, bts: nil}, // invalid character + {token: "abcdef.1234567890123456", expectedError: false, bts: &BootstrapTokenString{ID: "abcdef", Secret: "1234567890123456"}}, + {token: "123456.aabbccddeeffgghh", expectedError: false, bts: &BootstrapTokenString{ID: "123456", Secret: "aabbccddeeffgghh"}}, + {token: "abcdef.abcdef0123456789", expectedError: false, bts: &BootstrapTokenString{ID: "abcdef", Secret: "abcdef0123456789"}}, + {token: "123456.1234560123456789", expectedError: false, bts: &BootstrapTokenString{ID: "123456", Secret: "1234560123456789"}}, + } + for _, rt := range tests { + t.Run(rt.token, func(t *testing.T) { + g := NewWithT(t) + + actual, err := NewBootstrapTokenString(rt.token) + if rt.expectedError { + g.Expect(err).To(HaveOccurred()) + } else { + g.Expect(err).NotTo(HaveOccurred()) + } + g.Expect(actual).To(Equal(rt.bts)) + }) + } +} diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go new file mode 100644 index 000000000000..e917c80f36b2 --- /dev/null +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go @@ -0,0 +1,331 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" +) + +// Format specifies the output format of the bootstrap data +// +kubebuilder:validation:Enum=cloud-config +type Format string + +const ( + // CloudConfig make the bootstrap data to be of cloud-config format. + CloudConfig Format = "cloud-config" +) + +// KubeadmConfigSpec defines the desired state of KubeadmConfig. +// Either ClusterConfiguration and InitConfiguration should be defined or the JoinConfiguration should be defined. +type KubeadmConfigSpec struct { + // ClusterConfiguration along with InitConfiguration are the configurations necessary for the init command + // +optional + ClusterConfiguration *ClusterConfiguration `json:"clusterConfiguration,omitempty"` + + // InitConfiguration along with ClusterConfiguration are the configurations necessary for the init command + // +optional + InitConfiguration *InitConfiguration `json:"initConfiguration,omitempty"` + + // JoinConfiguration is the kubeadm configuration for the join command + // +optional + JoinConfiguration *JoinConfiguration `json:"joinConfiguration,omitempty"` + + // Files specifies extra files to be passed to user_data upon creation. + // +optional + Files []File `json:"files,omitempty"` + + // DiskSetup specifies options for the creation of partition tables and file systems on devices. + // +optional + DiskSetup *DiskSetup `json:"diskSetup,omitempty"` + + // Mounts specifies a list of mount points to be setup. + // +optional + Mounts []MountPoints `json:"mounts,omitempty"` + + // PreKubeadmCommands specifies extra commands to run before kubeadm runs + // +optional + PreKubeadmCommands []string `json:"preKubeadmCommands,omitempty"` + + // PostKubeadmCommands specifies extra commands to run after kubeadm runs + // +optional + PostKubeadmCommands []string `json:"postKubeadmCommands,omitempty"` + + // Users specifies extra users to add + // +optional + Users []User `json:"users,omitempty"` + + // NTP specifies NTP configuration + // +optional + NTP *NTP `json:"ntp,omitempty"` + + // Format specifies the output format of the bootstrap data + // +optional + Format Format `json:"format,omitempty"` + + // Verbosity is the number for the kubeadm log level verbosity. + // It overrides the `--v` flag in kubeadm commands. + // +optional + Verbosity *int32 `json:"verbosity,omitempty"` + + // UseExperimentalRetryJoin replaces a basic kubeadm command with a shell + // script with retries for joins. + // + // This is meant to be an experimental temporary workaround on some environments + // where joins fail due to timing (and other issues). The long term goal is to add retries to + // kubeadm proper and use that functionality. + // + // This will add about 40KB to userdata + // + // For more information, refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055. + // +optional + UseExperimentalRetryJoin bool `json:"useExperimentalRetryJoin,omitempty"` +} + +// KubeadmConfigStatus defines the observed state of KubeadmConfig. +type KubeadmConfigStatus struct { + // Ready indicates the BootstrapData field is ready to be consumed + Ready bool `json:"ready,omitempty"` + + // DataSecretName is the name of the secret that stores the bootstrap data script. + // +optional + DataSecretName *string `json:"dataSecretName,omitempty"` + + // FailureReason will be set on non-retryable errors + // +optional + FailureReason string `json:"failureReason,omitempty"` + + // FailureMessage will be set on non-retryable errors + // +optional + FailureMessage string `json:"failureMessage,omitempty"` + + // ObservedGeneration is the latest generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // Conditions defines current service state of the KubeadmConfig. + // +optional + Conditions clusterv1.Conditions `json:"conditions,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=kubeadmconfigs,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmConfig" + +// KubeadmConfig is the Schema for the kubeadmconfigs API. +type KubeadmConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec KubeadmConfigSpec `json:"spec,omitempty"` + Status KubeadmConfigStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (c *KubeadmConfig) GetConditions() clusterv1.Conditions { + return c.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (c *KubeadmConfig) SetConditions(conditions clusterv1.Conditions) { + c.Status.Conditions = conditions +} + +// +kubebuilder:object:root=true + +// KubeadmConfigList contains a list of KubeadmConfig. +type KubeadmConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []KubeadmConfig `json:"items"` +} + +func init() { + SchemeBuilder.Register(&KubeadmConfig{}, &KubeadmConfigList{}) +} + +// Encoding specifies the cloud-init file encoding. +// +kubebuilder:validation:Enum=base64;gzip;gzip+base64 +type Encoding string + +const ( + // Base64 implies the contents of the file are encoded as base64. + Base64 Encoding = "base64" + // Gzip implies the contents of the file are encoded with gzip. + Gzip Encoding = "gzip" + // GzipBase64 implies the contents of the file are first base64 encoded and then gzip encoded. + GzipBase64 Encoding = "gzip+base64" +) + +// File defines the input for generating write_files in cloud-init. +type File struct { + // Path specifies the full path on disk where to store the file. + Path string `json:"path"` + + // Owner specifies the ownership of the file, e.g. "root:root". + // +optional + Owner string `json:"owner,omitempty"` + + // Permissions specifies the permissions to assign to the file, e.g. "0640". + // +optional + Permissions string `json:"permissions,omitempty"` + + // Encoding specifies the encoding of the file contents. + // +optional + Encoding Encoding `json:"encoding,omitempty"` + + // Content is the actual content of the file. + // +optional + Content string `json:"content,omitempty"` + + // ContentFrom is a referenced source of content to populate the file. + // +optional + ContentFrom *FileSource `json:"contentFrom,omitempty"` +} + +// FileSource is a union of all possible external source types for file data. +// Only one field may be populated in any given instance. Developers adding new +// sources of data for target systems should add them here. +type FileSource struct { + // Secret represents a secret that should populate this file. + Secret SecretFileSource `json:"secret"` +} + +// SecretFileSource adapts a Secret into a FileSource. +// +// The contents of the target Secret's Data field will be presented +// as files using the keys in the Data field as the file names. +type SecretFileSource struct { + // Name of the secret in the KubeadmBootstrapConfig's namespace to use. + Name string `json:"name"` + + // Key is the key in the secret's data map for this value. + Key string `json:"key"` +} + +// User defines the input for a generated user in cloud-init. +type User struct { + // Name specifies the user name + Name string `json:"name"` + + // Gecos specifies the gecos to use for the user + // +optional + Gecos *string `json:"gecos,omitempty"` + + // Groups specifies the additional groups for the user + // +optional + Groups *string `json:"groups,omitempty"` + + // HomeDir specifies the home directory to use for the user + // +optional + HomeDir *string `json:"homeDir,omitempty"` + + // Inactive specifies whether to mark the user as inactive + // +optional + Inactive *bool `json:"inactive,omitempty"` + + // Shell specifies the user's shell + // +optional + Shell *string `json:"shell,omitempty"` + + // Passwd specifies a hashed password for the user + // +optional + Passwd *string `json:"passwd,omitempty"` + + // PrimaryGroup specifies the primary group for the user + // +optional + PrimaryGroup *string `json:"primaryGroup,omitempty"` + + // LockPassword specifies if password login should be disabled + // +optional + LockPassword *bool `json:"lockPassword,omitempty"` + + // Sudo specifies a sudo role for the user + // +optional + Sudo *string `json:"sudo,omitempty"` + + // SSHAuthorizedKeys specifies a list of ssh authorized keys for the user + // +optional + SSHAuthorizedKeys []string `json:"sshAuthorizedKeys,omitempty"` +} + +// NTP defines input for generated ntp in cloud-init. +type NTP struct { + // Servers specifies which NTP servers to use + // +optional + Servers []string `json:"servers,omitempty"` + + // Enabled specifies whether NTP should be enabled + // +optional + Enabled *bool `json:"enabled,omitempty"` +} + +// DiskSetup defines input for generated disk_setup and fs_setup in cloud-init. +type DiskSetup struct { + // Partitions specifies the list of the partitions to setup. + Partitions []Partition `json:"partitions,omitempty"` + // Filesystems specifies the list of file systems to setup. + Filesystems []Filesystem `json:"filesystems,omitempty"` +} + +// Partition defines how to create and layout a partition. +type Partition struct { + // Device is the name of the device. + Device string `json:"device"` + // Layout specifies the device layout. + // If it is true, a single partition will be created for the entire device. + // When layout is false, it means don't partition or ignore existing partitioning. + Layout bool `json:"layout"` + // Overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. + // Use with caution. Default is 'false'. + // +optional + Overwrite *bool `json:"overwrite,omitempty"` + // TableType specifies the tupe of partition table. The following are supported: + // 'mbr': default and setups a MS-DOS partition table + // 'gpt': setups a GPT partition table + // +optional + TableType *string `json:"tableType,omitempty"` +} + +// Filesystem defines the file systems to be created. +type Filesystem struct { + // Device specifies the device name + Device string `json:"device"` + // Filesystem specifies the file system type. + Filesystem string `json:"filesystem"` + // Label specifies the file system label to be used. If set to None, no label is used. + Label string `json:"label"` + // Partition specifies the partition to use. The valid options are: "auto|any", "auto", "any", "none", and , where NUM is the actual partition number. + // +optional + Partition *string `json:"partition,omitempty"` + // Overwrite defines whether or not to overwrite any existing filesystem. + // If true, any pre-existing file system will be destroyed. Use with Caution. + // +optional + Overwrite *bool `json:"overwrite,omitempty"` + // ReplaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . + // NOTE: unless you define a label, this requires the use of the 'any' partition directive. + // +optional + ReplaceFS *string `json:"replaceFS,omitempty"` + // ExtraOpts defined extra options to add to the command for creating the file system. + // +optional + ExtraOpts []string `json:"extraOpts,omitempty"` +} + +// MountPoints defines input for generated mounts in cloud-init. +type MountPoints []string diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types_test.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types_test.go similarity index 99% rename from bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types_test.go rename to bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types_test.go index 2667aec12a19..4dde8d232c22 100644 --- a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types_test.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_webhook.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_webhook.go similarity index 91% rename from bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_webhook.go rename to bootstrap/kubeadm/api/v1beta1/kubeadmconfig_webhook.go index 0310629833cf..938222c9e242 100644 --- a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_webhook.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -37,7 +37,7 @@ func (c *KubeadmConfig) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/validate-bootstrap-cluster-x-k8s-io-v1alpha4-kubeadmconfig,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=bootstrap.cluster.x-k8s.io,resources=kubeadmconfigs,versions=v1alpha4,name=validation.kubeadmconfig.bootstrap.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-bootstrap-cluster-x-k8s-io-v1beta1-kubeadmconfig,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=bootstrap.cluster.x-k8s.io,resources=kubeadmconfigs,versions=v1beta1,name=validation.kubeadmconfig.bootstrap.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Validator = &KubeadmConfig{} diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfiglist_webhook.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfiglist_webhook.go similarity index 97% rename from bootstrap/kubeadm/api/v1alpha4/kubeadmconfiglist_webhook.go rename to bootstrap/kubeadm/api/v1beta1/kubeadmconfiglist_webhook.go index 23fa080f52f2..513bb9d6fdc8 100644 --- a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfiglist_webhook.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfiglist_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go new file mode 100644 index 000000000000..bda561eb3f31 --- /dev/null +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go @@ -0,0 +1,57 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" +) + +// KubeadmConfigTemplateSpec defines the desired state of KubeadmConfigTemplate. +type KubeadmConfigTemplateSpec struct { + Template KubeadmConfigTemplateResource `json:"template"` +} + +// KubeadmConfigTemplateResource defines the Template structure. +type KubeadmConfigTemplateResource struct { + Spec KubeadmConfigSpec `json:"spec,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=kubeadmconfigtemplates,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmConfigTemplate" + +// KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates API. +type KubeadmConfigTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec KubeadmConfigTemplateSpec `json:"spec,omitempty"` +} + +// +kubebuilder:object:root=true + +// KubeadmConfigTemplateList contains a list of KubeadmConfigTemplate. +type KubeadmConfigTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []KubeadmConfigTemplate `json:"items"` +} + +func init() { + SchemeBuilder.Register(&KubeadmConfigTemplate{}, &KubeadmConfigTemplateList{}) +} diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplate_webhook.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_webhook.go similarity index 97% rename from bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplate_webhook.go rename to bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_webhook.go index e28cfe7b5a4d..a04adebcadd1 100644 --- a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplate_webhook.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplatelist_webhook.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplatelist_webhook.go similarity index 97% rename from bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplatelist_webhook.go rename to bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplatelist_webhook.go index 107535a7232c..8c8e96738dba 100644 --- a/bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplatelist_webhook.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplatelist_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go b/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000000..595979446d4b --- /dev/null +++ b/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,1041 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIEndpoint) DeepCopyInto(out *APIEndpoint) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIEndpoint. +func (in *APIEndpoint) DeepCopy() *APIEndpoint { + if in == nil { + return nil + } + out := new(APIEndpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIServer) DeepCopyInto(out *APIServer) { + *out = *in + in.ControlPlaneComponent.DeepCopyInto(&out.ControlPlaneComponent) + if in.CertSANs != nil { + in, out := &in.CertSANs, &out.CertSANs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.TimeoutForControlPlane != nil { + in, out := &in.TimeoutForControlPlane, &out.TimeoutForControlPlane + *out = new(v1.Duration) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServer. +func (in *APIServer) DeepCopy() *APIServer { + if in == nil { + return nil + } + out := new(APIServer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BootstrapToken) DeepCopyInto(out *BootstrapToken) { + *out = *in + if in.Token != nil { + in, out := &in.Token, &out.Token + *out = new(BootstrapTokenString) + **out = **in + } + if in.TTL != nil { + in, out := &in.TTL, &out.TTL + *out = new(v1.Duration) + **out = **in + } + if in.Expires != nil { + in, out := &in.Expires, &out.Expires + *out = (*in).DeepCopy() + } + if in.Usages != nil { + in, out := &in.Usages, &out.Usages + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapToken. +func (in *BootstrapToken) DeepCopy() *BootstrapToken { + if in == nil { + return nil + } + out := new(BootstrapToken) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BootstrapTokenDiscovery) DeepCopyInto(out *BootstrapTokenDiscovery) { + *out = *in + if in.CACertHashes != nil { + in, out := &in.CACertHashes, &out.CACertHashes + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapTokenDiscovery. +func (in *BootstrapTokenDiscovery) DeepCopy() *BootstrapTokenDiscovery { + if in == nil { + return nil + } + out := new(BootstrapTokenDiscovery) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BootstrapTokenString) DeepCopyInto(out *BootstrapTokenString) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapTokenString. +func (in *BootstrapTokenString) DeepCopy() *BootstrapTokenString { + if in == nil { + return nil + } + out := new(BootstrapTokenString) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + in.Etcd.DeepCopyInto(&out.Etcd) + out.Networking = in.Networking + in.APIServer.DeepCopyInto(&out.APIServer) + in.ControllerManager.DeepCopyInto(&out.ControllerManager) + in.Scheduler.DeepCopyInto(&out.Scheduler) + out.DNS = in.DNS + 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 + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration. +func (in *ClusterConfiguration) DeepCopy() *ClusterConfiguration { + if in == nil { + return nil + } + out := new(ClusterConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterConfiguration) 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 *ClusterStatus) DeepCopyInto(out *ClusterStatus) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.APIEndpoints != nil { + in, out := &in.APIEndpoints, &out.APIEndpoints + *out = make(map[string]APIEndpoint, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. +func (in *ClusterStatus) DeepCopy() *ClusterStatus { + if in == nil { + return nil + } + out := new(ClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterStatus) 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 *ControlPlaneComponent) DeepCopyInto(out *ControlPlaneComponent) { + *out = *in + if in.ExtraArgs != nil { + in, out := &in.ExtraArgs, &out.ExtraArgs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ExtraVolumes != nil { + in, out := &in.ExtraVolumes, &out.ExtraVolumes + *out = make([]HostPathMount, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneComponent. +func (in *ControlPlaneComponent) DeepCopy() *ControlPlaneComponent { + if in == nil { + return nil + } + out := new(ControlPlaneComponent) + 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 + out.ImageMeta = in.ImageMeta +} + +// 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 *Discovery) DeepCopyInto(out *Discovery) { + *out = *in + if in.BootstrapToken != nil { + in, out := &in.BootstrapToken, &out.BootstrapToken + *out = new(BootstrapTokenDiscovery) + (*in).DeepCopyInto(*out) + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(FileDiscovery) + **out = **in + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(v1.Duration) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Discovery. +func (in *Discovery) DeepCopy() *Discovery { + if in == nil { + return nil + } + out := new(Discovery) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskSetup) DeepCopyInto(out *DiskSetup) { + *out = *in + if in.Partitions != nil { + in, out := &in.Partitions, &out.Partitions + *out = make([]Partition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Filesystems != nil { + in, out := &in.Filesystems, &out.Filesystems + *out = make([]Filesystem, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskSetup. +func (in *DiskSetup) DeepCopy() *DiskSetup { + if in == nil { + return nil + } + out := new(DiskSetup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Etcd) DeepCopyInto(out *Etcd) { + *out = *in + if in.Local != nil { + in, out := &in.Local, &out.Local + *out = new(LocalEtcd) + (*in).DeepCopyInto(*out) + } + if in.External != nil { + in, out := &in.External, &out.External + *out = new(ExternalEtcd) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Etcd. +func (in *Etcd) DeepCopy() *Etcd { + if in == nil { + return nil + } + out := new(Etcd) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalEtcd) DeepCopyInto(out *ExternalEtcd) { + *out = *in + if in.Endpoints != nil { + in, out := &in.Endpoints, &out.Endpoints + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalEtcd. +func (in *ExternalEtcd) DeepCopy() *ExternalEtcd { + if in == nil { + return nil + } + out := new(ExternalEtcd) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *File) DeepCopyInto(out *File) { + *out = *in + if in.ContentFrom != nil { + in, out := &in.ContentFrom, &out.ContentFrom + *out = new(FileSource) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new File. +func (in *File) DeepCopy() *File { + if in == nil { + return nil + } + out := new(File) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FileDiscovery) DeepCopyInto(out *FileDiscovery) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileDiscovery. +func (in *FileDiscovery) DeepCopy() *FileDiscovery { + if in == nil { + return nil + } + out := new(FileDiscovery) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FileSource) DeepCopyInto(out *FileSource) { + *out = *in + out.Secret = in.Secret +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileSource. +func (in *FileSource) DeepCopy() *FileSource { + if in == nil { + return nil + } + out := new(FileSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Filesystem) DeepCopyInto(out *Filesystem) { + *out = *in + if in.Partition != nil { + in, out := &in.Partition, &out.Partition + *out = new(string) + **out = **in + } + if in.Overwrite != nil { + in, out := &in.Overwrite, &out.Overwrite + *out = new(bool) + **out = **in + } + if in.ReplaceFS != nil { + in, out := &in.ReplaceFS, &out.ReplaceFS + *out = new(string) + **out = **in + } + if in.ExtraOpts != nil { + in, out := &in.ExtraOpts, &out.ExtraOpts + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filesystem. +func (in *Filesystem) DeepCopy() *Filesystem { + if in == nil { + return nil + } + out := new(Filesystem) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HostPathMount) DeepCopyInto(out *HostPathMount) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPathMount. +func (in *HostPathMount) DeepCopy() *HostPathMount { + if in == nil { + return nil + } + out := new(HostPathMount) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageMeta) DeepCopyInto(out *ImageMeta) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageMeta. +func (in *ImageMeta) DeepCopy() *ImageMeta { + if in == nil { + return nil + } + out := new(ImageMeta) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InitConfiguration) DeepCopyInto(out *InitConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.BootstrapTokens != nil { + in, out := &in.BootstrapTokens, &out.BootstrapTokens + *out = make([]BootstrapToken, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) + out.LocalAPIEndpoint = in.LocalAPIEndpoint +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitConfiguration. +func (in *InitConfiguration) DeepCopy() *InitConfiguration { + if in == nil { + return nil + } + out := new(InitConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InitConfiguration) 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 *JoinConfiguration) DeepCopyInto(out *JoinConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + in.NodeRegistration.DeepCopyInto(&out.NodeRegistration) + in.Discovery.DeepCopyInto(&out.Discovery) + if in.ControlPlane != nil { + in, out := &in.ControlPlane, &out.ControlPlane + *out = new(JoinControlPlane) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinConfiguration. +func (in *JoinConfiguration) DeepCopy() *JoinConfiguration { + if in == nil { + return nil + } + out := new(JoinConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *JoinConfiguration) 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 *JoinControlPlane) DeepCopyInto(out *JoinControlPlane) { + *out = *in + out.LocalAPIEndpoint = in.LocalAPIEndpoint +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JoinControlPlane. +func (in *JoinControlPlane) DeepCopy() *JoinControlPlane { + if in == nil { + return nil + } + out := new(JoinControlPlane) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeadmConfig) DeepCopyInto(out *KubeadmConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmConfig. +func (in *KubeadmConfig) DeepCopy() *KubeadmConfig { + if in == nil { + return nil + } + out := new(KubeadmConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeadmConfig) 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 *KubeadmConfigList) DeepCopyInto(out *KubeadmConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KubeadmConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmConfigList. +func (in *KubeadmConfigList) DeepCopy() *KubeadmConfigList { + if in == nil { + return nil + } + out := new(KubeadmConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeadmConfigList) 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 *KubeadmConfigSpec) DeepCopyInto(out *KubeadmConfigSpec) { + *out = *in + if in.ClusterConfiguration != nil { + in, out := &in.ClusterConfiguration, &out.ClusterConfiguration + *out = new(ClusterConfiguration) + (*in).DeepCopyInto(*out) + } + if in.InitConfiguration != nil { + in, out := &in.InitConfiguration, &out.InitConfiguration + *out = new(InitConfiguration) + (*in).DeepCopyInto(*out) + } + if in.JoinConfiguration != nil { + in, out := &in.JoinConfiguration, &out.JoinConfiguration + *out = new(JoinConfiguration) + (*in).DeepCopyInto(*out) + } + if in.Files != nil { + in, out := &in.Files, &out.Files + *out = make([]File, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DiskSetup != nil { + in, out := &in.DiskSetup, &out.DiskSetup + *out = new(DiskSetup) + (*in).DeepCopyInto(*out) + } + if in.Mounts != nil { + in, out := &in.Mounts, &out.Mounts + *out = make([]MountPoints, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = make(MountPoints, len(*in)) + copy(*out, *in) + } + } + } + if in.PreKubeadmCommands != nil { + in, out := &in.PreKubeadmCommands, &out.PreKubeadmCommands + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PostKubeadmCommands != nil { + in, out := &in.PostKubeadmCommands, &out.PostKubeadmCommands + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]User, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NTP != nil { + in, out := &in.NTP, &out.NTP + *out = new(NTP) + (*in).DeepCopyInto(*out) + } + if in.Verbosity != nil { + in, out := &in.Verbosity, &out.Verbosity + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmConfigSpec. +func (in *KubeadmConfigSpec) DeepCopy() *KubeadmConfigSpec { + if in == nil { + return nil + } + out := new(KubeadmConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeadmConfigStatus) DeepCopyInto(out *KubeadmConfigStatus) { + *out = *in + if in.DataSecretName != nil { + in, out := &in.DataSecretName, &out.DataSecretName + *out = new(string) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1beta1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmConfigStatus. +func (in *KubeadmConfigStatus) DeepCopy() *KubeadmConfigStatus { + if in == nil { + return nil + } + out := new(KubeadmConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeadmConfigTemplate) DeepCopyInto(out *KubeadmConfigTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmConfigTemplate. +func (in *KubeadmConfigTemplate) DeepCopy() *KubeadmConfigTemplate { + if in == nil { + return nil + } + out := new(KubeadmConfigTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeadmConfigTemplate) 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 *KubeadmConfigTemplateList) DeepCopyInto(out *KubeadmConfigTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KubeadmConfigTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmConfigTemplateList. +func (in *KubeadmConfigTemplateList) DeepCopy() *KubeadmConfigTemplateList { + if in == nil { + return nil + } + out := new(KubeadmConfigTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeadmConfigTemplateList) 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 *KubeadmConfigTemplateResource) DeepCopyInto(out *KubeadmConfigTemplateResource) { + *out = *in + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmConfigTemplateResource. +func (in *KubeadmConfigTemplateResource) DeepCopy() *KubeadmConfigTemplateResource { + if in == nil { + return nil + } + out := new(KubeadmConfigTemplateResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeadmConfigTemplateSpec) DeepCopyInto(out *KubeadmConfigTemplateSpec) { + *out = *in + in.Template.DeepCopyInto(&out.Template) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmConfigTemplateSpec. +func (in *KubeadmConfigTemplateSpec) DeepCopy() *KubeadmConfigTemplateSpec { + if in == nil { + return nil + } + out := new(KubeadmConfigTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalEtcd) DeepCopyInto(out *LocalEtcd) { + *out = *in + out.ImageMeta = in.ImageMeta + if in.ExtraArgs != nil { + in, out := &in.ExtraArgs, &out.ExtraArgs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ServerCertSANs != nil { + in, out := &in.ServerCertSANs, &out.ServerCertSANs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PeerCertSANs != nil { + in, out := &in.PeerCertSANs, &out.PeerCertSANs + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalEtcd. +func (in *LocalEtcd) DeepCopy() *LocalEtcd { + if in == nil { + return nil + } + out := new(LocalEtcd) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in MountPoints) DeepCopyInto(out *MountPoints) { + { + in := &in + *out = make(MountPoints, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MountPoints. +func (in MountPoints) DeepCopy() MountPoints { + if in == nil { + return nil + } + out := new(MountPoints) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NTP) DeepCopyInto(out *NTP) { + *out = *in + if in.Servers != nil { + in, out := &in.Servers, &out.Servers + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NTP. +func (in *NTP) DeepCopy() *NTP { + if in == nil { + return nil + } + out := new(NTP) + 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 +} + +// 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 *NodeRegistrationOptions) DeepCopyInto(out *NodeRegistrationOptions) { + *out = *in + if in.Taints != nil { + in, out := &in.Taints, &out.Taints + *out = make([]corev1.Taint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.KubeletExtraArgs != nil { + in, out := &in.KubeletExtraArgs, &out.KubeletExtraArgs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.IgnorePreflightErrors != nil { + in, out := &in.IgnorePreflightErrors, &out.IgnorePreflightErrors + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRegistrationOptions. +func (in *NodeRegistrationOptions) DeepCopy() *NodeRegistrationOptions { + if in == nil { + return nil + } + out := new(NodeRegistrationOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Partition) DeepCopyInto(out *Partition) { + *out = *in + if in.Overwrite != nil { + in, out := &in.Overwrite, &out.Overwrite + *out = new(bool) + **out = **in + } + if in.TableType != nil { + in, out := &in.TableType, &out.TableType + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Partition. +func (in *Partition) DeepCopy() *Partition { + if in == nil { + return nil + } + out := new(Partition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretFileSource) DeepCopyInto(out *SecretFileSource) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretFileSource. +func (in *SecretFileSource) DeepCopy() *SecretFileSource { + if in == nil { + return nil + } + out := new(SecretFileSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *User) DeepCopyInto(out *User) { + *out = *in + if in.Gecos != nil { + in, out := &in.Gecos, &out.Gecos + *out = new(string) + **out = **in + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = new(string) + **out = **in + } + if in.HomeDir != nil { + in, out := &in.HomeDir, &out.HomeDir + *out = new(string) + **out = **in + } + if in.Inactive != nil { + in, out := &in.Inactive, &out.Inactive + *out = new(bool) + **out = **in + } + if in.Shell != nil { + in, out := &in.Shell, &out.Shell + *out = new(string) + **out = **in + } + if in.Passwd != nil { + in, out := &in.Passwd, &out.Passwd + *out = new(string) + **out = **in + } + if in.PrimaryGroup != nil { + in, out := &in.PrimaryGroup, &out.PrimaryGroup + *out = new(string) + **out = **in + } + if in.LockPassword != nil { + in, out := &in.LockPassword, &out.LockPassword + *out = new(bool) + **out = **in + } + if in.Sudo != nil { + in, out := &in.Sudo, &out.Sudo + *out = new(string) + **out = **in + } + if in.SSHAuthorizedKeys != nil { + in, out := &in.SSHAuthorizedKeys, &out.SSHAuthorizedKeys + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User. +func (in *User) DeepCopy() *User { + if in == nil { + return nil + } + out := new(User) + in.DeepCopyInto(out) + return out +} diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml index d4183e88b0e5..daff0b3ccb63 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml @@ -1987,6 +1987,990 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Time duration since creation of KubeadmConfig + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: KubeadmConfig is the Schema for the kubeadmconfigs API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: KubeadmConfigSpec defines the desired state of KubeadmConfig. + Either ClusterConfiguration and InitConfiguration should be defined + or the JoinConfiguration should be defined. + properties: + clusterConfiguration: + description: ClusterConfiguration along with InitConfiguration are + the configurations necessary for the init command + properties: + apiServer: + description: APIServer contains extra settings for the API server + control plane component + properties: + certSANs: + description: CertSANs sets extra Subject Alternative Names + for the API Server signing cert. + items: + type: string + type: array + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags to pass to + the control plane component. TODO: This is temporary and + ideally we would like to switch all components to use ComponentConfig + + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host volumes, + mounted to the control plane component. + items: + description: HostPathMount contains elements describing + volumes that are mounted from the host. + properties: + hostPath: + description: HostPath is the path in the host that will + be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside the pod where + hostPath will be mounted. + type: string + name: + description: Name of the volume inside the pod template. + type: string + pathType: + description: PathType is the type of the HostPath. + type: string + readOnly: + description: ReadOnly controls write access to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + timeoutForControlPlane: + description: TimeoutForControlPlane controls the timeout that + we use for API server to appear + type: string + type: object + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + certificatesDir: + description: 'CertificatesDir specifies where to store or look + for all required certificates. NB: if not provided, this will + default to `/etc/kubernetes/pki`' + type: string + clusterName: + description: The cluster name + type: string + controlPlaneEndpoint: + description: 'ControlPlaneEndpoint sets a stable IP address or + DNS name for the control plane; it can be a valid IP address + or a RFC-1123 DNS subdomain, both with optional TCP port. In + case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + + BindPort are used; in case the ControlPlaneEndpoint is specified + but without a TCP port, the BindPort is used. Possible usages + are: e.g. In a cluster with more than one control plane instances, + this field should be assigned the address of the external load + balancer in front of the control plane instances. e.g. in environments + with enforced node recycling, the ControlPlaneEndpoint could + be used for assigning a stable DNS to the control plane. NB: + This value defaults to the first value in the Cluster object + status.apiEndpoints array.' + type: string + controllerManager: + description: ControllerManager contains extra settings for the + controller manager control plane component + properties: + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags to pass to + the control plane component. TODO: This is temporary and + ideally we would like to switch all components to use ComponentConfig + + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host volumes, + mounted to the control plane component. + items: + description: HostPathMount contains elements describing + volumes that are mounted from the host. + properties: + hostPath: + description: HostPath is the path in the host that will + be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside the pod where + hostPath will be mounted. + type: string + name: + description: Name of the volume inside the pod template. + type: string + pathType: + description: PathType is the type of the HostPath. + type: string + readOnly: + description: ReadOnly controls write access to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + type: object + dns: + description: DNS defines the options for the DNS add-on installed + in the cluster. + properties: + imageRepository: + description: ImageRepository sets the container registry to + pull images from. if not set, the ImageRepository defined + in ClusterConfiguration will be used instead. + type: string + imageTag: + description: ImageTag allows to specify a tag for the image. + In case this value is set, kubeadm does not change automatically + the version of the above components during upgrades. + type: string + type: object + etcd: + description: 'Etcd holds configuration for etcd. NB: This value + defaults to a Local (stacked) etcd' + properties: + external: + description: External describes how to connect to an external + etcd cluster Local and External are mutually exclusive + properties: + caFile: + description: CAFile is an SSL Certificate Authority file + used to secure etcd communication. Required if using + a TLS connection. + type: string + certFile: + description: CertFile is an SSL certification file used + to secure etcd communication. Required if using a TLS + connection. + type: string + endpoints: + description: Endpoints of etcd members. Required for ExternalEtcd. + items: + type: string + type: array + keyFile: + description: KeyFile is an SSL key file used to secure + etcd communication. Required if using a TLS connection. + type: string + required: + - caFile + - certFile + - endpoints + - keyFile + type: object + local: + description: Local provides configuration knobs for configuring + the local etcd instance Local and External are mutually + exclusive + properties: + dataDir: + description: DataDir is the directory etcd will place + its data. Defaults to "/var/lib/etcd". + type: string + extraArgs: + additionalProperties: + type: string + description: ExtraArgs are extra arguments provided to + the etcd binary when run inside a static pod. + type: object + imageRepository: + description: ImageRepository sets the container registry + to pull images from. if not set, the ImageRepository + defined in ClusterConfiguration will be used instead. + type: string + imageTag: + description: ImageTag allows to specify a tag for the + image. In case this value is set, kubeadm does not change + automatically the version of the above components during + upgrades. + type: string + peerCertSANs: + description: PeerCertSANs sets extra Subject Alternative + Names for the etcd peer signing cert. + items: + type: string + type: array + serverCertSANs: + description: ServerCertSANs sets extra Subject Alternative + Names for the etcd server signing cert. + items: + type: string + type: array + type: object + type: object + featureGates: + additionalProperties: + type: boolean + description: FeatureGates enabled by the user. + type: object + imageRepository: + description: ImageRepository sets the container registry to pull + images from. If empty, `k8s.gcr.io` will be used by default; + in case of kubernetes version is a CI build (kubernetes version + starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images` + will be used as a default for control plane components and for + kube-proxy, while `k8s.gcr.io` will be used for all the other + images. + type: string + kind: + description: 'Kind is a string value representing the REST resource + this object represents. Servers may infer this from the endpoint + the client submits requests to. Cannot be updated. In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + kubernetesVersion: + description: 'KubernetesVersion is the target version of the control + plane. NB: This value defaults to the Machine object spec.version' + type: string + networking: + description: 'Networking holds configuration for the networking + topology of the cluster. NB: This value defaults to the Cluster + object spec.clusterNetwork.' + properties: + dnsDomain: + description: DNSDomain is the dns domain used by k8s services. + Defaults to "cluster.local". + type: string + podSubnet: + description: PodSubnet is the subnet used by pods. If unset, + the API server will not allocate CIDR ranges for every node. + Defaults to a comma-delimited string of the Cluster object's + spec.clusterNetwork.services.cidrBlocks if that is set + type: string + serviceSubnet: + description: ServiceSubnet is the subnet used by k8s services. + Defaults to a comma-delimited string of the Cluster object's + spec.clusterNetwork.pods.cidrBlocks, or to "10.96.0.0/12" + if that's unset. + type: string + type: object + scheduler: + description: Scheduler contains extra settings for the scheduler + control plane component + properties: + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags to pass to + the control plane component. TODO: This is temporary and + ideally we would like to switch all components to use ComponentConfig + + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host volumes, + mounted to the control plane component. + items: + description: HostPathMount contains elements describing + volumes that are mounted from the host. + properties: + hostPath: + description: HostPath is the path in the host that will + be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside the pod where + hostPath will be mounted. + type: string + name: + description: Name of the volume inside the pod template. + type: string + pathType: + description: PathType is the type of the HostPath. + type: string + readOnly: + description: ReadOnly controls write access to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + type: object + type: object + diskSetup: + description: DiskSetup specifies options for the creation of partition + tables and file systems on devices. + properties: + filesystems: + description: Filesystems specifies the list of file systems to + setup. + items: + description: Filesystem defines the file systems to be created. + properties: + device: + description: Device specifies the device name + type: string + extraOpts: + description: ExtraOpts defined extra options to add to the + command for creating the file system. + items: + type: string + type: array + filesystem: + description: Filesystem specifies the file system type. + type: string + label: + description: Label specifies the file system label to be + used. If set to None, no label is used. + type: string + overwrite: + description: Overwrite defines whether or not to overwrite + any existing filesystem. If true, any pre-existing file + system will be destroyed. Use with Caution. + type: boolean + partition: + description: 'Partition specifies the partition to use. + The valid options are: "auto|any", "auto", "any", "none", + and , where NUM is the actual partition number.' + type: string + replaceFS: + description: 'ReplaceFS is a special directive, used for + Microsoft Azure that instructs cloud-init to replace a + file system of . NOTE: unless you define a label, + this requires the use of the ''any'' partition directive.' + type: string + required: + - device + - filesystem + - label + type: object + type: array + partitions: + description: Partitions specifies the list of the partitions to + setup. + items: + description: Partition defines how to create and layout a partition. + properties: + device: + description: Device is the name of the device. + type: string + layout: + description: Layout specifies the device layout. If it is + true, a single partition will be created for the entire + device. When layout is false, it means don't partition + or ignore existing partitioning. + type: boolean + overwrite: + description: Overwrite describes whether to skip checks + and create the partition if a partition or filesystem + is found on the device. Use with caution. Default is 'false'. + type: boolean + tableType: + description: 'TableType specifies the tupe of partition + table. The following are supported: ''mbr'': default and + setups a MS-DOS partition table ''gpt'': setups a GPT + partition table' + type: string + required: + - device + - layout + type: object + type: array + type: object + files: + description: Files specifies extra files to be passed to user_data + upon creation. + items: + description: File defines the input for generating write_files in + cloud-init. + properties: + content: + description: Content is the actual content of the file. + type: string + contentFrom: + description: ContentFrom is a referenced source of content to + populate the file. + properties: + secret: + description: Secret represents a secret that should populate + this file. + properties: + key: + description: Key is the key in the secret's data map + for this value. + type: string + name: + description: Name of the secret in the KubeadmBootstrapConfig's + namespace to use. + type: string + required: + - key + - name + type: object + required: + - secret + type: object + encoding: + description: Encoding specifies the encoding of the file contents. + enum: + - base64 + - gzip + - gzip+base64 + type: string + owner: + description: Owner specifies the ownership of the file, e.g. + "root:root". + type: string + path: + description: Path specifies the full path on disk where to store + the file. + type: string + permissions: + description: Permissions specifies the permissions to assign + to the file, e.g. "0640". + type: string + required: + - path + type: object + type: array + format: + description: Format specifies the output format of the bootstrap data + enum: + - cloud-config + type: string + initConfiguration: + description: InitConfiguration along with ClusterConfiguration are + the configurations necessary for the init command + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + bootstrapTokens: + description: BootstrapTokens is respected at `kubeadm init` time + and describes a set of Bootstrap Tokens to create. This information + IS NOT uploaded to the kubeadm cluster configmap, partly because + of its sensitive nature + items: + description: BootstrapToken describes one bootstrap token, stored + as a Secret in the cluster. + properties: + description: + description: Description sets a human-friendly message why + this token exists and what it's used for, so other administrators + can know its purpose. + type: string + expires: + description: Expires specifies the timestamp when this token + expires. Defaults to being set dynamically at runtime + based on the TTL. Expires and TTL are mutually exclusive. + format: date-time + type: string + groups: + description: Groups specifies the extra groups that this + token will authenticate as when/if used for authentication + items: + type: string + type: array + token: + description: Token is used for establishing bidirectional + trust between nodes and control-planes. Used for joining + nodes in the cluster. + type: string + ttl: + description: TTL defines the time to live for this token. + Defaults to 24h. Expires and TTL are mutually exclusive. + type: string + usages: + description: Usages describes the ways in which this token + can be used. Can by default be used for establishing bidirectional + trust, but that can be changed here. + items: + type: string + type: array + required: + - token + type: object + type: array + kind: + description: 'Kind is a string value representing the REST resource + this object represents. Servers may infer this from the endpoint + the client submits requests to. Cannot be updated. In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + localAPIEndpoint: + description: LocalAPIEndpoint represents the endpoint of the API + server instance that's deployed on this control plane node In + HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint + in the sense that ControlPlaneEndpoint is the global endpoint + for the cluster, which then loadbalances the requests to each + individual API server. This configuration object lets you customize + what IP/DNS name and port the local API server advertises it's + accessible on. By default, kubeadm tries to auto-detect the + IP of the default interface and use that, but in case that process + fails you may set the desired value here. + properties: + advertiseAddress: + description: AdvertiseAddress sets the IP address for the + API server to advertise. + type: string + bindPort: + description: BindPort sets the secure port for the API Server + to bind to. Defaults to 6443. + format: int32 + type: integer + type: object + nodeRegistration: + description: NodeRegistration holds fields that relate to registering + the new control-plane node to the cluster. When used in the + context of control plane nodes, NodeRegistration should remain + consistent across both InitConfiguration and JoinConfiguration + properties: + criSocket: + description: CRISocket is used to retrieve container runtime + info. This information will be annotated to the Node API + object, for later re-use + type: string + ignorePreflightErrors: + description: IgnorePreflightErrors provides a slice of pre-flight + errors to be ignored when the current node is registered. + items: + type: string + type: array + kubeletExtraArgs: + additionalProperties: + type: string + description: KubeletExtraArgs passes through extra arguments + to the kubelet. The arguments here are passed to the kubelet + command line via the environment file kubeadm writes at + runtime for the kubelet to source. This overrides the generic + base-level configuration in the kubelet-config-1.X ConfigMap + Flags have higher priority when parsing. These values are + local and specific to the node kubeadm is executing on. + type: object + name: + description: Name is the `.Metadata.Name` field of the Node + API object that will be created in this `kubeadm init` or + `kubeadm join` operation. This field is also used in the + CommonName field of the kubelet's client certificate to + the API server. Defaults to the hostname of the node if + not provided. + type: string + taints: + description: 'Taints specifies the taints the Node API object + should be registered with. If this field is unset, i.e. + nil, in the `kubeadm init` process it will be defaulted + to []v1.Taint{''node-role.kubernetes.io/master=""''}. If + you don''t want to taint your control-plane node, set this + field to an empty slice, i.e. `taints: {}` in the YAML file. + This field is solely used for Node registration.' + items: + description: The node this Taint is attached to has the + "effect" on any pod that does not tolerate the Taint. + properties: + effect: + description: Required. The effect of the taint on pods + that do not tolerate the taint. Valid effects are + NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Required. The taint key to be applied to + a node. + type: string + timeAdded: + description: TimeAdded represents the time at which + the taint was added. It is only written for NoExecute + taints. + format: date-time + type: string + value: + description: The taint value corresponding to the taint + key. + type: string + required: + - effect + - key + type: object + type: array + type: object + type: object + joinConfiguration: + description: JoinConfiguration is the kubeadm configuration for the + join command + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + caCertPath: + description: 'CACertPath is the path to the SSL certificate authority + used to secure comunications between node and control-plane. + Defaults to "/etc/kubernetes/pki/ca.crt". TODO: revisit when + there is defaulting from k/k' + type: string + controlPlane: + description: ControlPlane defines the additional control plane + instance to be deployed on the joining node. If nil, no additional + control plane instance will be deployed. + properties: + localAPIEndpoint: + description: LocalAPIEndpoint represents the endpoint of the + API server instance to be deployed on this node. + properties: + advertiseAddress: + description: AdvertiseAddress sets the IP address for + the API server to advertise. + type: string + bindPort: + description: BindPort sets the secure port for the API + Server to bind to. Defaults to 6443. + format: int32 + type: integer + type: object + type: object + discovery: + description: 'Discovery specifies the options for the kubelet + to use during the TLS Bootstrap process TODO: revisit when there + is defaulting from k/k' + properties: + bootstrapToken: + description: BootstrapToken is used to set the options for + bootstrap token based discovery BootstrapToken and File + are mutually exclusive + properties: + apiServerEndpoint: + description: APIServerEndpoint is an IP or domain name + to the API server from which info will be fetched. + type: string + caCertHashes: + description: 'CACertHashes specifies a set of public key + pins to verify when token-based discovery is used. The + root CA found during discovery must match one of these + values. Specifying an empty set disables root CA pinning, + which can be unsafe. Each hash is specified as ":", + where the only currently supported type is "sha256". + This is a hex-encoded SHA-256 hash of the Subject Public + Key Info (SPKI) object in DER-encoded ASN.1. These hashes + can be calculated using, for example, OpenSSL: openssl + x509 -pubkey -in ca.crt openssl rsa -pubin -outform + der 2>&/dev/null | openssl dgst -sha256 -hex' + items: + type: string + type: array + token: + description: Token is a token used to validate cluster + information fetched from the control-plane. + type: string + unsafeSkipCAVerification: + description: UnsafeSkipCAVerification allows token-based + discovery without CA verification via CACertHashes. + This can weaken the security of kubeadm since other + nodes can impersonate the control-plane. + type: boolean + required: + - token + type: object + file: + description: File is used to specify a file or URL to a kubeconfig + file from which to load cluster information BootstrapToken + and File are mutually exclusive + properties: + kubeConfigPath: + description: KubeConfigPath is used to specify the actual + file path or URL to the kubeconfig file from which to + load cluster information + type: string + required: + - kubeConfigPath + type: object + timeout: + description: Timeout modifies the discovery timeout + type: string + tlsBootstrapToken: + description: TLSBootstrapToken is a token used for TLS bootstrapping. + If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, + but can be overridden. If .File is set, this field **must + be set** in case the KubeConfigFile does not contain any + other authentication information + type: string + type: object + kind: + description: 'Kind is a string value representing the REST resource + this object represents. Servers may infer this from the endpoint + the client submits requests to. Cannot be updated. In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + nodeRegistration: + description: NodeRegistration holds fields that relate to registering + the new control-plane node to the cluster. When used in the + context of control plane nodes, NodeRegistration should remain + consistent across both InitConfiguration and JoinConfiguration + properties: + criSocket: + description: CRISocket is used to retrieve container runtime + info. This information will be annotated to the Node API + object, for later re-use + type: string + ignorePreflightErrors: + description: IgnorePreflightErrors provides a slice of pre-flight + errors to be ignored when the current node is registered. + items: + type: string + type: array + kubeletExtraArgs: + additionalProperties: + type: string + description: KubeletExtraArgs passes through extra arguments + to the kubelet. The arguments here are passed to the kubelet + command line via the environment file kubeadm writes at + runtime for the kubelet to source. This overrides the generic + base-level configuration in the kubelet-config-1.X ConfigMap + Flags have higher priority when parsing. These values are + local and specific to the node kubeadm is executing on. + type: object + name: + description: Name is the `.Metadata.Name` field of the Node + API object that will be created in this `kubeadm init` or + `kubeadm join` operation. This field is also used in the + CommonName field of the kubelet's client certificate to + the API server. Defaults to the hostname of the node if + not provided. + type: string + taints: + description: 'Taints specifies the taints the Node API object + should be registered with. If this field is unset, i.e. + nil, in the `kubeadm init` process it will be defaulted + to []v1.Taint{''node-role.kubernetes.io/master=""''}. If + you don''t want to taint your control-plane node, set this + field to an empty slice, i.e. `taints: {}` in the YAML file. + This field is solely used for Node registration.' + items: + description: The node this Taint is attached to has the + "effect" on any pod that does not tolerate the Taint. + properties: + effect: + description: Required. The effect of the taint on pods + that do not tolerate the taint. Valid effects are + NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Required. The taint key to be applied to + a node. + type: string + timeAdded: + description: TimeAdded represents the time at which + the taint was added. It is only written for NoExecute + taints. + format: date-time + type: string + value: + description: The taint value corresponding to the taint + key. + type: string + required: + - effect + - key + type: object + type: array + type: object + type: object + mounts: + description: Mounts specifies a list of mount points to be setup. + items: + description: MountPoints defines input for generated mounts in cloud-init. + items: + type: string + type: array + type: array + ntp: + description: NTP specifies NTP configuration + properties: + enabled: + description: Enabled specifies whether NTP should be enabled + type: boolean + servers: + description: Servers specifies which NTP servers to use + items: + type: string + type: array + type: object + postKubeadmCommands: + description: PostKubeadmCommands specifies extra commands to run after + kubeadm runs + items: + type: string + type: array + preKubeadmCommands: + description: PreKubeadmCommands specifies extra commands to run before + kubeadm runs + items: + type: string + type: array + useExperimentalRetryJoin: + description: "UseExperimentalRetryJoin replaces a basic kubeadm command + with a shell script with retries for joins. \n This is meant to + be an experimental temporary workaround on some environments where + joins fail due to timing (and other issues). The long term goal + is to add retries to kubeadm proper and use that functionality. + \n This will add about 40KB to userdata \n For more information, + refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055." + type: boolean + users: + description: Users specifies extra users to add + items: + description: User defines the input for a generated user in cloud-init. + properties: + gecos: + description: Gecos specifies the gecos to use for the user + type: string + groups: + description: Groups specifies the additional groups for the + user + type: string + homeDir: + description: HomeDir specifies the home directory to use for + the user + type: string + inactive: + description: Inactive specifies whether to mark the user as + inactive + type: boolean + lockPassword: + description: LockPassword specifies if password login should + be disabled + type: boolean + name: + description: Name specifies the user name + type: string + passwd: + description: Passwd specifies a hashed password for the user + type: string + primaryGroup: + description: PrimaryGroup specifies the primary group for the + user + type: string + shell: + description: Shell specifies the user's shell + type: string + sshAuthorizedKeys: + description: SSHAuthorizedKeys specifies a list of ssh authorized + keys for the user + items: + type: string + type: array + sudo: + description: Sudo specifies a sudo role for the user + type: string + required: + - name + type: object + type: array + verbosity: + description: Verbosity is the number for the kubeadm log level verbosity. + It overrides the `--v` flag in kubeadm commands. + format: int32 + type: integer + type: object + status: + description: KubeadmConfigStatus defines the observed state of KubeadmConfig. + properties: + conditions: + description: Conditions defines current service state of the KubeadmConfig. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + dataSecretName: + description: DataSecretName is the name of the secret that stores + the bootstrap data script. + type: string + failureMessage: + description: FailureMessage will be set on non-retryable errors + type: string + failureReason: + description: FailureReason will be set on non-retryable errors + type: string + observedGeneration: + description: ObservedGeneration is the latest generation observed + by the controller. + format: int64 + type: integer + ready: + description: Ready indicates the BootstrapData field is ready to be + consumed + type: boolean + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml index 1ac19a7c2a0a..8ffad774a94d 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml @@ -1974,6 +1974,987 @@ spec: type: object type: object served: true + storage: false + subresources: {} + - additionalPrinterColumns: + - description: Time duration since creation of KubeadmConfigTemplate + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates + API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: KubeadmConfigTemplateSpec defines the desired state of KubeadmConfigTemplate. + properties: + template: + description: KubeadmConfigTemplateResource defines the Template structure. + properties: + spec: + description: KubeadmConfigSpec defines the desired state of KubeadmConfig. + Either ClusterConfiguration and InitConfiguration should be + defined or the JoinConfiguration should be defined. + properties: + clusterConfiguration: + description: ClusterConfiguration along with InitConfiguration + are the configurations necessary for the init command + properties: + apiServer: + description: APIServer contains extra settings for the + API server control plane component + properties: + certSANs: + description: CertSANs sets extra Subject Alternative + Names for the API Server signing cert. + items: + type: string + type: array + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags to + pass to the control plane component. TODO: This + is temporary and ideally we would like to switch + all components to use ComponentConfig + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host + volumes, mounted to the control plane component. + items: + description: HostPathMount contains elements describing + volumes that are mounted from the host. + properties: + hostPath: + description: HostPath is the path in the host + that will be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside the + pod where hostPath will be mounted. + type: string + name: + description: Name of the volume inside the pod + template. + type: string + pathType: + description: PathType is the type of the HostPath. + type: string + readOnly: + description: ReadOnly controls write access + to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + timeoutForControlPlane: + description: TimeoutForControlPlane controls the timeout + that we use for API server to appear + type: string + type: object + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal value, + and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + certificatesDir: + description: 'CertificatesDir specifies where to store + or look for all required certificates. NB: if not provided, + this will default to `/etc/kubernetes/pki`' + type: string + clusterName: + description: The cluster name + type: string + controlPlaneEndpoint: + description: 'ControlPlaneEndpoint sets a stable IP address + or DNS name for the control plane; it can be a valid + IP address or a RFC-1123 DNS subdomain, both with optional + TCP port. In case the ControlPlaneEndpoint is not specified, + the AdvertiseAddress + BindPort are used; in case the + ControlPlaneEndpoint is specified but without a TCP + port, the BindPort is used. Possible usages are: e.g. + In a cluster with more than one control plane instances, + this field should be assigned the address of the external + load balancer in front of the control plane instances. + e.g. in environments with enforced node recycling, + the ControlPlaneEndpoint could be used for assigning + a stable DNS to the control plane. NB: This value defaults + to the first value in the Cluster object status.apiEndpoints + array.' + type: string + controllerManager: + description: ControllerManager contains extra settings + for the controller manager control plane component + properties: + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags to + pass to the control plane component. TODO: This + is temporary and ideally we would like to switch + all components to use ComponentConfig + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host + volumes, mounted to the control plane component. + items: + description: HostPathMount contains elements describing + volumes that are mounted from the host. + properties: + hostPath: + description: HostPath is the path in the host + that will be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside the + pod where hostPath will be mounted. + type: string + name: + description: Name of the volume inside the pod + template. + type: string + pathType: + description: PathType is the type of the HostPath. + type: string + readOnly: + description: ReadOnly controls write access + to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + type: object + dns: + description: DNS defines the options for the DNS add-on + installed in the cluster. + properties: + imageRepository: + description: ImageRepository sets the container registry + to pull images from. if not set, the ImageRepository + defined in ClusterConfiguration will be used instead. + type: string + imageTag: + description: ImageTag allows to specify a tag for + the image. In case this value is set, kubeadm does + not change automatically the version of the above + components during upgrades. + type: string + type: object + etcd: + description: 'Etcd holds configuration for etcd. NB: This + value defaults to a Local (stacked) etcd' + properties: + external: + description: External describes how to connect to + an external etcd cluster Local and External are + mutually exclusive + properties: + caFile: + description: CAFile is an SSL Certificate Authority + file used to secure etcd communication. Required + if using a TLS connection. + type: string + certFile: + description: CertFile is an SSL certification + file used to secure etcd communication. Required + if using a TLS connection. + type: string + endpoints: + description: Endpoints of etcd members. Required + for ExternalEtcd. + items: + type: string + type: array + keyFile: + description: KeyFile is an SSL key file used to + secure etcd communication. Required if using + a TLS connection. + type: string + required: + - caFile + - certFile + - endpoints + - keyFile + type: object + local: + description: Local provides configuration knobs for + configuring the local etcd instance Local and External + are mutually exclusive + properties: + dataDir: + description: DataDir is the directory etcd will + place its data. Defaults to "/var/lib/etcd". + type: string + extraArgs: + additionalProperties: + type: string + description: ExtraArgs are extra arguments provided + to the etcd binary when run inside a static + pod. + type: object + imageRepository: + description: ImageRepository sets the container + registry to pull images from. if not set, the + ImageRepository defined in ClusterConfiguration + will be used instead. + type: string + imageTag: + description: ImageTag allows to specify a tag + for the image. In case this value is set, kubeadm + does not change automatically the version of + the above components during upgrades. + type: string + peerCertSANs: + description: PeerCertSANs sets extra Subject Alternative + Names for the etcd peer signing cert. + items: + type: string + type: array + serverCertSANs: + description: ServerCertSANs sets extra Subject + Alternative Names for the etcd server signing + cert. + items: + type: string + type: array + type: object + type: object + featureGates: + additionalProperties: + type: boolean + description: FeatureGates enabled by the user. + type: object + imageRepository: + description: ImageRepository sets the container registry + to pull images from. If empty, `k8s.gcr.io` will be + used by default; in case of kubernetes version is a + CI build (kubernetes version starts with `ci/` or `ci-cross/`) + `gcr.io/k8s-staging-ci-images` will be used as a default + for control plane components and for kube-proxy, while + `k8s.gcr.io` will be used for all the other images. + type: string + kind: + description: 'Kind is a string value representing the + REST resource this object represents. Servers may infer + this from the endpoint the client submits requests to. + Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + kubernetesVersion: + description: 'KubernetesVersion is the target version + of the control plane. NB: This value defaults to the + Machine object spec.version' + type: string + networking: + description: 'Networking holds configuration for the networking + topology of the cluster. NB: This value defaults to + the Cluster object spec.clusterNetwork.' + properties: + dnsDomain: + description: DNSDomain is the dns domain used by k8s + services. Defaults to "cluster.local". + type: string + podSubnet: + description: PodSubnet is the subnet used by pods. + If unset, the API server will not allocate CIDR + ranges for every node. Defaults to a comma-delimited + string of the Cluster object's spec.clusterNetwork.services.cidrBlocks + if that is set + type: string + serviceSubnet: + description: ServiceSubnet is the subnet used by k8s + services. Defaults to a comma-delimited string of + the Cluster object's spec.clusterNetwork.pods.cidrBlocks, + or to "10.96.0.0/12" if that's unset. + type: string + type: object + scheduler: + description: Scheduler contains extra settings for the + scheduler control plane component + properties: + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags to + pass to the control plane component. TODO: This + is temporary and ideally we would like to switch + all components to use ComponentConfig + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host + volumes, mounted to the control plane component. + items: + description: HostPathMount contains elements describing + volumes that are mounted from the host. + properties: + hostPath: + description: HostPath is the path in the host + that will be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside the + pod where hostPath will be mounted. + type: string + name: + description: Name of the volume inside the pod + template. + type: string + pathType: + description: PathType is the type of the HostPath. + type: string + readOnly: + description: ReadOnly controls write access + to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + type: object + type: object + diskSetup: + description: DiskSetup specifies options for the creation + of partition tables and file systems on devices. + properties: + filesystems: + description: Filesystems specifies the list of file systems + to setup. + items: + description: Filesystem defines the file systems to + be created. + properties: + device: + description: Device specifies the device name + type: string + extraOpts: + description: ExtraOpts defined extra options to + add to the command for creating the file system. + items: + type: string + type: array + filesystem: + description: Filesystem specifies the file system + type. + type: string + label: + description: Label specifies the file system label + to be used. If set to None, no label is used. + type: string + overwrite: + description: Overwrite defines whether or not to + overwrite any existing filesystem. If true, any + pre-existing file system will be destroyed. Use + with Caution. + type: boolean + partition: + description: 'Partition specifies the partition + to use. The valid options are: "auto|any", "auto", + "any", "none", and , where NUM is the actual + partition number.' + type: string + replaceFS: + description: 'ReplaceFS is a special directive, + used for Microsoft Azure that instructs cloud-init + to replace a file system of . NOTE: unless + you define a label, this requires the use of the + ''any'' partition directive.' + type: string + required: + - device + - filesystem + - label + type: object + type: array + partitions: + description: Partitions specifies the list of the partitions + to setup. + items: + description: Partition defines how to create and layout + a partition. + properties: + device: + description: Device is the name of the device. + type: string + layout: + description: Layout specifies the device layout. + If it is true, a single partition will be created + for the entire device. When layout is false, it + means don't partition or ignore existing partitioning. + type: boolean + overwrite: + description: Overwrite describes whether to skip + checks and create the partition if a partition + or filesystem is found on the device. Use with + caution. Default is 'false'. + type: boolean + tableType: + description: 'TableType specifies the tupe of partition + table. The following are supported: ''mbr'': default + and setups a MS-DOS partition table ''gpt'': setups + a GPT partition table' + type: string + required: + - device + - layout + type: object + type: array + type: object + files: + description: Files specifies extra files to be passed to user_data + upon creation. + items: + description: File defines the input for generating write_files + in cloud-init. + properties: + content: + description: Content is the actual content of the file. + type: string + contentFrom: + description: ContentFrom is a referenced source of content + to populate the file. + properties: + secret: + description: Secret represents a secret that should + populate this file. + properties: + key: + description: Key is the key in the secret's + data map for this value. + type: string + name: + description: Name of the secret in the KubeadmBootstrapConfig's + namespace to use. + type: string + required: + - key + - name + type: object + required: + - secret + type: object + encoding: + description: Encoding specifies the encoding of the + file contents. + enum: + - base64 + - gzip + - gzip+base64 + type: string + owner: + description: Owner specifies the ownership of the file, + e.g. "root:root". + type: string + path: + description: Path specifies the full path on disk where + to store the file. + type: string + permissions: + description: Permissions specifies the permissions to + assign to the file, e.g. "0640". + type: string + required: + - path + type: object + type: array + format: + description: Format specifies the output format of the bootstrap + data + enum: + - cloud-config + type: string + initConfiguration: + description: InitConfiguration along with ClusterConfiguration + are the configurations necessary for the init command + properties: + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal value, + and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + bootstrapTokens: + description: BootstrapTokens is respected at `kubeadm + init` time and describes a set of Bootstrap Tokens to + create. This information IS NOT uploaded to the kubeadm + cluster configmap, partly because of its sensitive nature + items: + description: BootstrapToken describes one bootstrap + token, stored as a Secret in the cluster. + properties: + description: + description: Description sets a human-friendly message + why this token exists and what it's used for, + so other administrators can know its purpose. + type: string + expires: + description: Expires specifies the timestamp when + this token expires. Defaults to being set dynamically + at runtime based on the TTL. Expires and TTL are + mutually exclusive. + format: date-time + type: string + groups: + description: Groups specifies the extra groups that + this token will authenticate as when/if used for + authentication + items: + type: string + type: array + token: + description: Token is used for establishing bidirectional + trust between nodes and control-planes. Used for + joining nodes in the cluster. + type: string + ttl: + description: TTL defines the time to live for this + token. Defaults to 24h. Expires and TTL are mutually + exclusive. + type: string + usages: + description: Usages describes the ways in which + this token can be used. Can by default be used + for establishing bidirectional trust, but that + can be changed here. + items: + type: string + type: array + required: + - token + type: object + type: array + kind: + description: 'Kind is a string value representing the + REST resource this object represents. Servers may infer + this from the endpoint the client submits requests to. + Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + localAPIEndpoint: + description: LocalAPIEndpoint represents the endpoint + of the API server instance that's deployed on this control + plane node In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint + in the sense that ControlPlaneEndpoint is the global + endpoint for the cluster, which then loadbalances the + requests to each individual API server. This configuration + object lets you customize what IP/DNS name and port + the local API server advertises it's accessible on. + By default, kubeadm tries to auto-detect the IP of the + default interface and use that, but in case that process + fails you may set the desired value here. + properties: + advertiseAddress: + description: AdvertiseAddress sets the IP address + for the API server to advertise. + type: string + bindPort: + description: BindPort sets the secure port for the + API Server to bind to. Defaults to 6443. + format: int32 + type: integer + type: object + nodeRegistration: + description: NodeRegistration holds fields that relate + to registering the new control-plane node to the cluster. + When used in the context of control plane nodes, NodeRegistration + should remain consistent across both InitConfiguration + and JoinConfiguration + properties: + criSocket: + description: CRISocket is used to retrieve container + runtime info. This information will be annotated + to the Node API object, for later re-use + type: string + ignorePreflightErrors: + description: IgnorePreflightErrors provides a slice + of pre-flight errors to be ignored when the current + node is registered. + items: + type: string + type: array + kubeletExtraArgs: + additionalProperties: + type: string + description: KubeletExtraArgs passes through extra + arguments to the kubelet. The arguments here are + passed to the kubelet command line via the environment + file kubeadm writes at runtime for the kubelet to + source. This overrides the generic base-level configuration + in the kubelet-config-1.X ConfigMap Flags have higher + priority when parsing. These values are local and + specific to the node kubeadm is executing on. + type: object + name: + description: Name is the `.Metadata.Name` field of + the Node API object that will be created in this + `kubeadm init` or `kubeadm join` operation. This + field is also used in the CommonName field of the + kubelet's client certificate to the API server. + Defaults to the hostname of the node if not provided. + type: string + taints: + description: 'Taints specifies the taints the Node + API object should be registered with. If this field + is unset, i.e. nil, in the `kubeadm init` process + it will be defaulted to []v1.Taint{''node-role.kubernetes.io/master=""''}. + If you don''t want to taint your control-plane node, + set this field to an empty slice, i.e. `taints: + {}` in the YAML file. This field is solely used + for Node registration.' + items: + description: The node this Taint is attached to + has the "effect" on any pod that does not tolerate + the Taint. + properties: + effect: + description: Required. The effect of the taint + on pods that do not tolerate the taint. Valid + effects are NoSchedule, PreferNoSchedule and + NoExecute. + type: string + key: + description: Required. The taint key to be applied + to a node. + type: string + timeAdded: + description: TimeAdded represents the time at + which the taint was added. It is only written + for NoExecute taints. + format: date-time + type: string + value: + description: The taint value corresponding to + the taint key. + type: string + required: + - effect + - key + type: object + type: array + type: object + type: object + joinConfiguration: + description: JoinConfiguration is the kubeadm configuration + for the join command + properties: + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal value, + and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + caCertPath: + description: 'CACertPath is the path to the SSL certificate + authority used to secure comunications between node + and control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k' + type: string + controlPlane: + description: ControlPlane defines the additional control + plane instance to be deployed on the joining node. If + nil, no additional control plane instance will be deployed. + properties: + localAPIEndpoint: + description: LocalAPIEndpoint represents the endpoint + of the API server instance to be deployed on this + node. + properties: + advertiseAddress: + description: AdvertiseAddress sets the IP address + for the API server to advertise. + type: string + bindPort: + description: BindPort sets the secure port for + the API Server to bind to. Defaults to 6443. + format: int32 + type: integer + type: object + type: object + discovery: + description: 'Discovery specifies the options for the + kubelet to use during the TLS Bootstrap process TODO: + revisit when there is defaulting from k/k' + properties: + bootstrapToken: + description: BootstrapToken is used to set the options + for bootstrap token based discovery BootstrapToken + and File are mutually exclusive + properties: + apiServerEndpoint: + description: APIServerEndpoint is an IP or domain + name to the API server from which info will + be fetched. + type: string + caCertHashes: + description: 'CACertHashes specifies a set of + public key pins to verify when token-based discovery + is used. The root CA found during discovery + must match one of these values. Specifying an + empty set disables root CA pinning, which can + be unsafe. Each hash is specified as ":", + where the only currently supported type is "sha256". + This is a hex-encoded SHA-256 hash of the Subject + Public Key Info (SPKI) object in DER-encoded + ASN.1. These hashes can be calculated using, + for example, OpenSSL: openssl x509 -pubkey -in + ca.crt openssl rsa -pubin -outform der 2>&/dev/null + | openssl dgst -sha256 -hex' + items: + type: string + type: array + token: + description: Token is a token used to validate + cluster information fetched from the control-plane. + type: string + unsafeSkipCAVerification: + description: UnsafeSkipCAVerification allows token-based + discovery without CA verification via CACertHashes. + This can weaken the security of kubeadm since + other nodes can impersonate the control-plane. + type: boolean + required: + - token + type: object + file: + description: File is used to specify a file or URL + to a kubeconfig file from which to load cluster + information BootstrapToken and File are mutually + exclusive + properties: + kubeConfigPath: + description: KubeConfigPath is used to specify + the actual file path or URL to the kubeconfig + file from which to load cluster information + type: string + required: + - kubeConfigPath + type: object + timeout: + description: Timeout modifies the discovery timeout + type: string + tlsBootstrapToken: + description: TLSBootstrapToken is a token used for + TLS bootstrapping. If .BootstrapToken is set, this + field is defaulted to .BootstrapToken.Token, but + can be overridden. If .File is set, this field **must + be set** in case the KubeConfigFile does not contain + any other authentication information + type: string + type: object + kind: + description: 'Kind is a string value representing the + REST resource this object represents. Servers may infer + this from the endpoint the client submits requests to. + Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + nodeRegistration: + description: NodeRegistration holds fields that relate + to registering the new control-plane node to the cluster. + When used in the context of control plane nodes, NodeRegistration + should remain consistent across both InitConfiguration + and JoinConfiguration + properties: + criSocket: + description: CRISocket is used to retrieve container + runtime info. This information will be annotated + to the Node API object, for later re-use + type: string + ignorePreflightErrors: + description: IgnorePreflightErrors provides a slice + of pre-flight errors to be ignored when the current + node is registered. + items: + type: string + type: array + kubeletExtraArgs: + additionalProperties: + type: string + description: KubeletExtraArgs passes through extra + arguments to the kubelet. The arguments here are + passed to the kubelet command line via the environment + file kubeadm writes at runtime for the kubelet to + source. This overrides the generic base-level configuration + in the kubelet-config-1.X ConfigMap Flags have higher + priority when parsing. These values are local and + specific to the node kubeadm is executing on. + type: object + name: + description: Name is the `.Metadata.Name` field of + the Node API object that will be created in this + `kubeadm init` or `kubeadm join` operation. This + field is also used in the CommonName field of the + kubelet's client certificate to the API server. + Defaults to the hostname of the node if not provided. + type: string + taints: + description: 'Taints specifies the taints the Node + API object should be registered with. If this field + is unset, i.e. nil, in the `kubeadm init` process + it will be defaulted to []v1.Taint{''node-role.kubernetes.io/master=""''}. + If you don''t want to taint your control-plane node, + set this field to an empty slice, i.e. `taints: + {}` in the YAML file. This field is solely used + for Node registration.' + items: + description: The node this Taint is attached to + has the "effect" on any pod that does not tolerate + the Taint. + properties: + effect: + description: Required. The effect of the taint + on pods that do not tolerate the taint. Valid + effects are NoSchedule, PreferNoSchedule and + NoExecute. + type: string + key: + description: Required. The taint key to be applied + to a node. + type: string + timeAdded: + description: TimeAdded represents the time at + which the taint was added. It is only written + for NoExecute taints. + format: date-time + type: string + value: + description: The taint value corresponding to + the taint key. + type: string + required: + - effect + - key + type: object + type: array + type: object + type: object + mounts: + description: Mounts specifies a list of mount points to be + setup. + items: + description: MountPoints defines input for generated mounts + in cloud-init. + items: + type: string + type: array + type: array + ntp: + description: NTP specifies NTP configuration + properties: + enabled: + description: Enabled specifies whether NTP should be enabled + type: boolean + servers: + description: Servers specifies which NTP servers to use + items: + type: string + type: array + type: object + postKubeadmCommands: + description: PostKubeadmCommands specifies extra commands + to run after kubeadm runs + items: + type: string + type: array + preKubeadmCommands: + description: PreKubeadmCommands specifies extra commands to + run before kubeadm runs + items: + type: string + type: array + useExperimentalRetryJoin: + description: "UseExperimentalRetryJoin replaces a basic kubeadm + command with a shell script with retries for joins. \n This + is meant to be an experimental temporary workaround on some + environments where joins fail due to timing (and other issues). + The long term goal is to add retries to kubeadm proper and + use that functionality. \n This will add about 40KB to userdata + \n For more information, refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055." + type: boolean + users: + description: Users specifies extra users to add + items: + description: User defines the input for a generated user + in cloud-init. + properties: + gecos: + description: Gecos specifies the gecos to use for the + user + type: string + groups: + description: Groups specifies the additional groups + for the user + type: string + homeDir: + description: HomeDir specifies the home directory to + use for the user + type: string + inactive: + description: Inactive specifies whether to mark the + user as inactive + type: boolean + lockPassword: + description: LockPassword specifies if password login + should be disabled + type: boolean + name: + description: Name specifies the user name + type: string + passwd: + description: Passwd specifies a hashed password for + the user + type: string + primaryGroup: + description: PrimaryGroup specifies the primary group + for the user + type: string + shell: + description: Shell specifies the user's shell + type: string + sshAuthorizedKeys: + description: SSHAuthorizedKeys specifies a list of ssh + authorized keys for the user + items: + type: string + type: array + sudo: + description: Sudo specifies a sudo role for the user + type: string + required: + - name + type: object + type: array + verbosity: + description: Verbosity is the number for the kubeadm log level + verbosity. It overrides the `--v` flag in kubeadm commands. + format: int32 + type: integer + type: object + type: object + required: + - template + type: object + type: object + served: true storage: true subresources: {} status: diff --git a/bootstrap/kubeadm/config/webhook/manifests.yaml b/bootstrap/kubeadm/config/webhook/manifests.yaml index 62ad48ec58a5..1a3a58c7e13c 100644 --- a/bootstrap/kubeadm/config/webhook/manifests.yaml +++ b/bootstrap/kubeadm/config/webhook/manifests.yaml @@ -13,7 +13,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-bootstrap-cluster-x-k8s-io-v1alpha4-kubeadmconfig + path: /validate-bootstrap-cluster-x-k8s-io-v1beta1-kubeadmconfig failurePolicy: Fail matchPolicy: Equivalent name: validation.kubeadmconfig.bootstrap.cluster.x-k8s.io @@ -21,7 +21,7 @@ webhooks: - apiGroups: - bootstrap.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE diff --git a/bootstrap/kubeadm/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/controllers/kubeadmconfig_controller.go index 9672f65317cd..d0829c066813 100644 --- a/bootstrap/kubeadm/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/controllers/kubeadmconfig_controller.go @@ -32,14 +32,14 @@ import ( "k8s.io/apimachinery/pkg/types" kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/cloudinit" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/locking" kubeadmtypes "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types" bsutil "sigs.k8s.io/cluster-api/bootstrap/util" "sigs.k8s.io/cluster-api/controllers/remote" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" diff --git a/bootstrap/kubeadm/controllers/kubeadmconfig_controller_reconciler_test.go b/bootstrap/kubeadm/controllers/kubeadmconfig_controller_reconciler_test.go index b3713e5d3691..9ee8bb7d1260 100644 --- a/bootstrap/kubeadm/controllers/kubeadmconfig_controller_reconciler_test.go +++ b/bootstrap/kubeadm/controllers/kubeadmconfig_controller_reconciler_test.go @@ -24,7 +24,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" ) func TestKubeadmConfigReconciler(t *testing.T) { diff --git a/bootstrap/kubeadm/controllers/kubeadmconfig_controller_test.go b/bootstrap/kubeadm/controllers/kubeadmconfig_controller_test.go index 2e56ac0081b8..949ca90e5102 100644 --- a/bootstrap/kubeadm/controllers/kubeadmconfig_controller_test.go +++ b/bootstrap/kubeadm/controllers/kubeadmconfig_controller_test.go @@ -35,10 +35,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" fakeremote "sigs.k8s.io/cluster-api/controllers/remote/fake" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/bootstrap/kubeadm/internal/cloudinit/cloudinit.go b/bootstrap/kubeadm/internal/cloudinit/cloudinit.go index 5dafd59d6b61..027df98b5f6b 100644 --- a/bootstrap/kubeadm/internal/cloudinit/cloudinit.go +++ b/bootstrap/kubeadm/internal/cloudinit/cloudinit.go @@ -23,7 +23,7 @@ import ( "text/template" "github.com/pkg/errors" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" ) const ( diff --git a/bootstrap/kubeadm/internal/cloudinit/cloudinit_test.go b/bootstrap/kubeadm/internal/cloudinit/cloudinit_test.go index 039c9b06c49c..43717c307c5f 100644 --- a/bootstrap/kubeadm/internal/cloudinit/cloudinit_test.go +++ b/bootstrap/kubeadm/internal/cloudinit/cloudinit_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" "k8s.io/utils/pointer" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util/certs" "sigs.k8s.io/cluster-api/util/secret" ) diff --git a/bootstrap/kubeadm/internal/cloudinit/node_test.go b/bootstrap/kubeadm/internal/cloudinit/node_test.go index e66ca70679cc..d35171694ec9 100644 --- a/bootstrap/kubeadm/internal/cloudinit/node_test.go +++ b/bootstrap/kubeadm/internal/cloudinit/node_test.go @@ -20,7 +20,7 @@ import ( "fmt" "testing" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/yaml" ) diff --git a/bootstrap/kubeadm/internal/locking/control_plane_init_mutex.go b/bootstrap/kubeadm/internal/locking/control_plane_init_mutex.go index 55895b2543da..777e140556da 100644 --- a/bootstrap/kubeadm/internal/locking/control_plane_init_mutex.go +++ b/bootstrap/kubeadm/internal/locking/control_plane_init_mutex.go @@ -27,7 +27,7 @@ import ( corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/bootstrap/kubeadm/internal/locking/control_plane_init_mutex_test.go b/bootstrap/kubeadm/internal/locking/control_plane_init_mutex_test.go index 220041464171..53a30c04a25c 100644 --- a/bootstrap/kubeadm/internal/locking/control_plane_init_mutex_test.go +++ b/bootstrap/kubeadm/internal/locking/control_plane_init_mutex_test.go @@ -32,7 +32,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" diff --git a/bootstrap/kubeadm/main.go b/bootstrap/kubeadm/main.go index 45fe41ad8ee7..127d69cef487 100644 --- a/bootstrap/kubeadm/main.go +++ b/bootstrap/kubeadm/main.go @@ -33,12 +33,13 @@ import ( cliflag "k8s.io/component-base/cli/flag" "k8s.io/klog/v2" "k8s.io/klog/v2/klogr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - kubeadmbootstrapv1old "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3" - kubeadmbootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + kubeadmbootstrapv1alpha3 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3" + kubeadmbootstrapv1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + kubeadmbootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" kubeadmbootstrapcontrollers "sigs.k8s.io/cluster-api/bootstrap/kubeadm/controllers" "sigs.k8s.io/cluster-api/controllers/remote" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/version" ctrl "sigs.k8s.io/controller-runtime" @@ -58,7 +59,8 @@ func init() { _ = clientgoscheme.AddToScheme(scheme) _ = clusterv1.AddToScheme(scheme) _ = expv1.AddToScheme(scheme) - _ = kubeadmbootstrapv1old.AddToScheme(scheme) + _ = kubeadmbootstrapv1alpha3.AddToScheme(scheme) + _ = kubeadmbootstrapv1alpha4.AddToScheme(scheme) _ = kubeadmbootstrapv1.AddToScheme(scheme) // +kubebuilder:scaffold:scheme } diff --git a/bootstrap/kubeadm/types/v1beta1/bootstraptokenstring.go b/bootstrap/kubeadm/types/upstreamv1beta1/bootstraptokenstring.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta1/bootstraptokenstring.go rename to bootstrap/kubeadm/types/upstreamv1beta1/bootstraptokenstring.go index ab57e71b7576..70b0831178af 100644 --- a/bootstrap/kubeadm/types/v1beta1/bootstraptokenstring.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/bootstraptokenstring.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta1 +package upstreamv1beta1 import ( "fmt" diff --git a/bootstrap/kubeadm/types/v1beta1/bootstraptokenstring_test.go b/bootstrap/kubeadm/types/upstreamv1beta1/bootstraptokenstring_test.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta1/bootstraptokenstring_test.go rename to bootstrap/kubeadm/types/upstreamv1beta1/bootstraptokenstring_test.go index c8adfdf5f234..1beb31526404 100644 --- a/bootstrap/kubeadm/types/v1beta1/bootstraptokenstring_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/bootstraptokenstring_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta1 +package upstreamv1beta1 import ( "encoding/json" diff --git a/bootstrap/kubeadm/types/v1beta1/conversion.go b/bootstrap/kubeadm/types/upstreamv1beta1/conversion.go similarity index 60% rename from bootstrap/kubeadm/types/v1beta1/conversion.go rename to bootstrap/kubeadm/types/upstreamv1beta1/conversion.go index 83a186703b39..d5ff2eb56473 100644 --- a/bootstrap/kubeadm/types/v1beta1/conversion.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/conversion.go @@ -14,74 +14,74 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta1 +package upstreamv1beta1 import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - v1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/conversion" ) // ConvertTo converts this ClusterConfiguration to the Hub version (v1alpha4). func (src *ClusterConfiguration) ConvertTo(dstRaw conversion.Hub) error { dst := dstRaw.(*bootstrapv1.ClusterConfiguration) - return Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(src, dst, nil) + return Convert_upstreamv1beta1_ClusterConfiguration_To_v1beta1_ClusterConfiguration(src, dst, nil) } // ConvertFrom converts from the ClusterConfiguration Hub version (v1alpha4) to this version. func (dst *ClusterConfiguration) ConvertFrom(srcRaw conversion.Hub) error { src := srcRaw.(*bootstrapv1.ClusterConfiguration) - return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(src, dst, nil) + return Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration(src, dst, nil) } // ConvertTo converts this ClusterStatus to the Hub version (v1alpha4). func (src *ClusterStatus) ConvertTo(dstRaw conversion.Hub) error { dst := dstRaw.(*bootstrapv1.ClusterStatus) - return Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(src, dst, nil) + return Convert_upstreamv1beta1_ClusterStatus_To_v1beta1_ClusterStatus(src, dst, nil) } // ConvertFrom converts from the ClusterStatus Hub version (v1alpha4) to this version. func (dst *ClusterStatus) ConvertFrom(srcRaw conversion.Hub) error { src := srcRaw.(*bootstrapv1.ClusterStatus) - return Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(src, dst, nil) + return Convert_v1beta1_ClusterStatus_To_upstreamv1beta1_ClusterStatus(src, dst, nil) } // ConvertTo converts this InitConfiguration to the Hub version (v1alpha4). func (src *InitConfiguration) ConvertTo(dstRaw conversion.Hub) error { dst := dstRaw.(*bootstrapv1.InitConfiguration) - return Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(src, dst, nil) + return Convert_upstreamv1beta1_InitConfiguration_To_v1beta1_InitConfiguration(src, dst, nil) } // ConvertFrom converts from the InitConfiguration Hub version (v1alpha4) to this version. func (dst *InitConfiguration) ConvertFrom(srcRaw conversion.Hub) error { src := srcRaw.(*bootstrapv1.InitConfiguration) - return Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(src, dst, nil) + return Convert_v1beta1_InitConfiguration_To_upstreamv1beta1_InitConfiguration(src, dst, nil) } // ConvertTo converts this JoinConfiguration to the Hub version (v1alpha4). func (src *JoinConfiguration) ConvertTo(dstRaw conversion.Hub) error { dst := dstRaw.(*bootstrapv1.JoinConfiguration) - return Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(src, dst, nil) + return Convert_upstreamv1beta1_JoinConfiguration_To_v1beta1_JoinConfiguration(src, dst, nil) } // ConvertFrom converts from the JoinConfiguration Hub version (v1alpha4) to this version. func (dst *JoinConfiguration) ConvertFrom(srcRaw conversion.Hub) error { src := srcRaw.(*bootstrapv1.JoinConfiguration) - return Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(src, dst, nil) + return Convert_v1beta1_JoinConfiguration_To_upstreamv1beta1_JoinConfiguration(src, dst, nil) } -func Convert_v1beta1_DNS_To_v1alpha4_DNS(in *DNS, out *bootstrapv1.DNS, s apimachineryconversion.Scope) error { +func Convert_upstreamv1beta1_DNS_To_v1beta1_DNS(in *DNS, out *bootstrapv1.DNS, s apimachineryconversion.Scope) error { // DNS.Type was removed in v1alpha4 because only CoreDNS is supported, dropping this info. - return autoConvert_v1beta1_DNS_To_v1alpha4_DNS(in, out, s) + return autoConvert_upstreamv1beta1_DNS_To_v1beta1_DNS(in, out, s) } -func Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *ClusterConfiguration, out *bootstrapv1.ClusterConfiguration, s apimachineryconversion.Scope) error { +func Convert_upstreamv1beta1_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *bootstrapv1.ClusterConfiguration, s apimachineryconversion.Scope) error { // ClusterConfiguration.UseHyperKubeImage was removed in kubeadm v1alpha4 API - return autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in, out, s) + return autoConvert_upstreamv1beta1_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in, out, s) } -func Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in *v1alpha4.NodeRegistrationOptions, out *NodeRegistrationOptions, s apimachineryconversion.Scope) error { +func Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta1_NodeRegistrationOptions(in *v1beta1.NodeRegistrationOptions, out *NodeRegistrationOptions, s apimachineryconversion.Scope) error { // NodeRegistrationOptions.IgnorePreflightErrors does not exist in kubeadm v1beta1 API - return autoConvert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in, out, s) + return autoConvert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta1_NodeRegistrationOptions(in, out, s) } diff --git a/bootstrap/kubeadm/types/v1beta1/conversion_test.go b/bootstrap/kubeadm/types/upstreamv1beta1/conversion_test.go similarity index 88% rename from bootstrap/kubeadm/types/v1beta1/conversion_test.go rename to bootstrap/kubeadm/types/upstreamv1beta1/conversion_test.go index 8302224b6ec5..92c78c412104 100644 --- a/bootstrap/kubeadm/types/v1beta1/conversion_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/conversion_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta1 +package upstreamv1beta1 import ( "testing" @@ -22,35 +22,34 @@ import ( fuzz "github.com/google/gofuzz" "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - kubeadmbootstrapv1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) func TestFuzzyConversion(t *testing.T) { t.Run("for ClusterConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.ClusterConfiguration{}, + Hub: &v1beta1.ClusterConfiguration{}, Spoke: &ClusterConfiguration{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs}, })) t.Run("for ClusterStatus", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.ClusterStatus{}, + Hub: &v1beta1.ClusterStatus{}, Spoke: &ClusterStatus{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs}, })) t.Run("for InitConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.InitConfiguration{}, + Hub: &v1beta1.InitConfiguration{}, Spoke: &InitConfiguration{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs}, })) t.Run("for JoinConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.JoinConfiguration{}, + Hub: &v1beta1.JoinConfiguration{}, Spoke: &JoinConfiguration{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, @@ -80,7 +79,7 @@ func clusterConfigurationFuzzer(obj *ClusterConfiguration, c fuzz.Continue) { obj.UseHyperKubeImage = false } -func kubeadmNodeRegistrationOptionsFuzzer(obj *kubeadmbootstrapv1alpha4.NodeRegistrationOptions, c fuzz.Continue) { +func kubeadmNodeRegistrationOptionsFuzzer(obj *v1beta1.NodeRegistrationOptions, c fuzz.Continue) { c.FuzzNoCustom(obj) // NodeRegistrationOptions.IgnorePreflightErrors does not exist in kubeadm v1beta1 API, so setting it to nil in order to avoid diff --git a/bootstrap/kubeadm/types/v1beta1/doc.go b/bootstrap/kubeadm/types/upstreamv1beta1/doc.go similarity index 78% rename from bootstrap/kubeadm/types/v1beta1/doc.go rename to bootstrap/kubeadm/types/upstreamv1beta1/doc.go index d77d1926ea95..97d1211d0e5e 100644 --- a/bootstrap/kubeadm/types/v1beta1/doc.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/doc.go @@ -14,11 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1beta1 contains a mirror of kubeadm API v1beta1 API, required because it is not possible to import k/K. +// Package upstreamv1beta1 contains a mirror of kubeadm API v1beta1 API, required because it is not possible to import k/K. // // IMPORTANT: Do not change these files! // IMPORTANT: only for KubeadmConfig serialization/deserialization, and should not be used for other purposes. // -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 // +k8s:deepcopy-gen=package -package v1beta1 // import "sigs.k8s.io/cluster-api/bootstrap/kubeadm/kubeadm/v1beta1" +package upstreamv1beta1 // import "sigs.k8s.io/cluster-api/bootstrap/kubeadm/kubeadm/v1beta1" diff --git a/bootstrap/kubeadm/types/v1beta1/groupversion_info.go b/bootstrap/kubeadm/types/upstreamv1beta1/groupversion_info.go similarity index 97% rename from bootstrap/kubeadm/types/v1beta1/groupversion_info.go rename to bootstrap/kubeadm/types/upstreamv1beta1/groupversion_info.go index 926e347f6da0..8cb7be6e0fb8 100644 --- a/bootstrap/kubeadm/types/v1beta1/groupversion_info.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/groupversion_info.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta1 +package upstreamv1beta1 import ( "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/bootstrap/kubeadm/types/v1beta1/types.go b/bootstrap/kubeadm/types/upstreamv1beta1/types.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta1/types.go rename to bootstrap/kubeadm/types/upstreamv1beta1/types.go index cba37ccbc236..3f90b4611fcc 100644 --- a/bootstrap/kubeadm/types/v1beta1/types.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta1 +package upstreamv1beta1 import ( corev1 "k8s.io/api/core/v1" diff --git a/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.conversion.go new file mode 100644 index 000000000000..40758b24969b --- /dev/null +++ b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.conversion.go @@ -0,0 +1,815 @@ +// +build !ignore_autogenerated_kubeadm_types + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package upstreamv1beta1 + +import ( + unsafe "unsafe" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + v1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" +) + +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((*APIEndpoint)(nil), (*v1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_APIEndpoint_To_v1beta1_APIEndpoint(a.(*APIEndpoint), b.(*v1beta1.APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIEndpoint_To_upstreamv1beta1_APIEndpoint(a.(*v1beta1.APIEndpoint), b.(*APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*APIServer)(nil), (*v1beta1.APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_APIServer_To_v1beta1_APIServer(a.(*APIServer), b.(*v1beta1.APIServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.APIServer)(nil), (*APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIServer_To_upstreamv1beta1_APIServer(a.(*v1beta1.APIServer), b.(*APIServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapToken)(nil), (*v1beta1.BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_BootstrapToken_To_v1beta1_BootstrapToken(a.(*BootstrapToken), b.(*v1beta1.BootstrapToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapToken)(nil), (*BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapToken_To_upstreamv1beta1_BootstrapToken(a.(*v1beta1.BootstrapToken), b.(*BootstrapToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapTokenDiscovery)(nil), (*v1beta1.BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(a.(*BootstrapTokenDiscovery), b.(*v1beta1.BootstrapTokenDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapTokenDiscovery)(nil), (*BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta1_BootstrapTokenDiscovery(a.(*v1beta1.BootstrapTokenDiscovery), b.(*BootstrapTokenDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapTokenString)(nil), (*v1beta1.BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_BootstrapTokenString_To_v1beta1_BootstrapTokenString(a.(*BootstrapTokenString), b.(*v1beta1.BootstrapTokenString), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapTokenString)(nil), (*BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta1_BootstrapTokenString(a.(*v1beta1.BootstrapTokenString), b.(*BootstrapTokenString), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*ClusterConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterStatus)(nil), (*v1beta1.ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_ClusterStatus_To_v1beta1_ClusterStatus(a.(*ClusterStatus), b.(*v1beta1.ClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterStatus)(nil), (*ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterStatus_To_upstreamv1beta1_ClusterStatus(a.(*v1beta1.ClusterStatus), b.(*ClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlPlaneComponent)(nil), (*v1beta1.ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(a.(*ControlPlaneComponent), b.(*v1beta1.ControlPlaneComponent), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ControlPlaneComponent)(nil), (*ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta1_ControlPlaneComponent(a.(*v1beta1.ControlPlaneComponent), b.(*ControlPlaneComponent), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNS_To_upstreamv1beta1_DNS(a.(*v1beta1.DNS), b.(*DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Discovery)(nil), (*v1beta1.Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_Discovery_To_v1beta1_Discovery(a.(*Discovery), b.(*v1beta1.Discovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Discovery)(nil), (*Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Discovery_To_upstreamv1beta1_Discovery(a.(*v1beta1.Discovery), b.(*Discovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Etcd)(nil), (*v1beta1.Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_Etcd_To_v1beta1_Etcd(a.(*Etcd), b.(*v1beta1.Etcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Etcd)(nil), (*Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Etcd_To_upstreamv1beta1_Etcd(a.(*v1beta1.Etcd), b.(*Etcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExternalEtcd)(nil), (*v1beta1.ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_ExternalEtcd_To_v1beta1_ExternalEtcd(a.(*ExternalEtcd), b.(*v1beta1.ExternalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ExternalEtcd)(nil), (*ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExternalEtcd_To_upstreamv1beta1_ExternalEtcd(a.(*v1beta1.ExternalEtcd), b.(*ExternalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FileDiscovery)(nil), (*v1beta1.FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_FileDiscovery_To_v1beta1_FileDiscovery(a.(*FileDiscovery), b.(*v1beta1.FileDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.FileDiscovery)(nil), (*FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FileDiscovery_To_upstreamv1beta1_FileDiscovery(a.(*v1beta1.FileDiscovery), b.(*FileDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HostPathMount)(nil), (*v1beta1.HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_HostPathMount_To_v1beta1_HostPathMount(a.(*HostPathMount), b.(*v1beta1.HostPathMount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.HostPathMount)(nil), (*HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HostPathMount_To_upstreamv1beta1_HostPathMount(a.(*v1beta1.HostPathMount), b.(*HostPathMount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ImageMeta)(nil), (*v1beta1.ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_ImageMeta_To_v1beta1_ImageMeta(a.(*ImageMeta), b.(*v1beta1.ImageMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ImageMeta)(nil), (*ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ImageMeta_To_upstreamv1beta1_ImageMeta(a.(*v1beta1.ImageMeta), b.(*ImageMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*InitConfiguration)(nil), (*v1beta1.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_InitConfiguration_To_v1beta1_InitConfiguration(a.(*InitConfiguration), b.(*v1beta1.InitConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.InitConfiguration)(nil), (*InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_InitConfiguration_To_upstreamv1beta1_InitConfiguration(a.(*v1beta1.InitConfiguration), b.(*InitConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*JoinConfiguration)(nil), (*v1beta1.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_JoinConfiguration_To_v1beta1_JoinConfiguration(a.(*JoinConfiguration), b.(*v1beta1.JoinConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.JoinConfiguration)(nil), (*JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JoinConfiguration_To_upstreamv1beta1_JoinConfiguration(a.(*v1beta1.JoinConfiguration), b.(*JoinConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*JoinControlPlane)(nil), (*v1beta1.JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_JoinControlPlane_To_v1beta1_JoinControlPlane(a.(*JoinControlPlane), b.(*v1beta1.JoinControlPlane), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.JoinControlPlane)(nil), (*JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JoinControlPlane_To_upstreamv1beta1_JoinControlPlane(a.(*v1beta1.JoinControlPlane), b.(*JoinControlPlane), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LocalEtcd)(nil), (*v1beta1.LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_LocalEtcd_To_v1beta1_LocalEtcd(a.(*LocalEtcd), b.(*v1beta1.LocalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.LocalEtcd)(nil), (*LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_LocalEtcd_To_upstreamv1beta1_LocalEtcd(a.(*v1beta1.LocalEtcd), b.(*LocalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Networking)(nil), (*v1beta1.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_Networking_To_v1beta1_Networking(a.(*Networking), b.(*v1beta1.Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Networking_To_upstreamv1beta1_Networking(a.(*v1beta1.Networking), b.(*Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NodeRegistrationOptions)(nil), (*v1beta1.NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(a.(*NodeRegistrationOptions), b.(*v1beta1.NodeRegistrationOptions), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*DNS)(nil), (*v1beta1.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta1_DNS_To_v1beta1_DNS(a.(*DNS), b.(*v1beta1.DNS), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta1.NodeRegistrationOptions)(nil), (*NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta1_NodeRegistrationOptions(a.(*v1beta1.NodeRegistrationOptions), b.(*NodeRegistrationOptions), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_upstreamv1beta1_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + out.AdvertiseAddress = in.AdvertiseAddress + out.BindPort = in.BindPort + return nil +} + +// Convert_upstreamv1beta1_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. +func Convert_upstreamv1beta1_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) +} + +func autoConvert_v1beta1_APIEndpoint_To_upstreamv1beta1_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + out.AdvertiseAddress = in.AdvertiseAddress + out.BindPort = in.BindPort + return nil +} + +// Convert_v1beta1_APIEndpoint_To_upstreamv1beta1_APIEndpoint is an autogenerated conversion function. +func Convert_v1beta1_APIEndpoint_To_upstreamv1beta1_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + return autoConvert_v1beta1_APIEndpoint_To_upstreamv1beta1_APIEndpoint(in, out, s) +} + +func autoConvert_upstreamv1beta1_APIServer_To_v1beta1_APIServer(in *APIServer, out *v1beta1.APIServer, s conversion.Scope) error { + if err := Convert_upstreamv1beta1_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { + return err + } + out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) + out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) + return nil +} + +// Convert_upstreamv1beta1_APIServer_To_v1beta1_APIServer is an autogenerated conversion function. +func Convert_upstreamv1beta1_APIServer_To_v1beta1_APIServer(in *APIServer, out *v1beta1.APIServer, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_APIServer_To_v1beta1_APIServer(in, out, s) +} + +func autoConvert_v1beta1_APIServer_To_upstreamv1beta1_APIServer(in *v1beta1.APIServer, out *APIServer, s conversion.Scope) error { + if err := Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta1_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { + return err + } + out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) + out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) + return nil +} + +// Convert_v1beta1_APIServer_To_upstreamv1beta1_APIServer is an autogenerated conversion function. +func Convert_v1beta1_APIServer_To_upstreamv1beta1_APIServer(in *v1beta1.APIServer, out *APIServer, s conversion.Scope) error { + return autoConvert_v1beta1_APIServer_To_upstreamv1beta1_APIServer(in, out, s) +} + +func autoConvert_upstreamv1beta1_BootstrapToken_To_v1beta1_BootstrapToken(in *BootstrapToken, out *v1beta1.BootstrapToken, s conversion.Scope) error { + out.Token = (*v1beta1.BootstrapTokenString)(unsafe.Pointer(in.Token)) + out.Description = in.Description + out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) + out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) + out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +// Convert_upstreamv1beta1_BootstrapToken_To_v1beta1_BootstrapToken is an autogenerated conversion function. +func Convert_upstreamv1beta1_BootstrapToken_To_v1beta1_BootstrapToken(in *BootstrapToken, out *v1beta1.BootstrapToken, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_BootstrapToken_To_v1beta1_BootstrapToken(in, out, s) +} + +func autoConvert_v1beta1_BootstrapToken_To_upstreamv1beta1_BootstrapToken(in *v1beta1.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { + out.Token = (*BootstrapTokenString)(unsafe.Pointer(in.Token)) + out.Description = in.Description + out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) + out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) + out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +// Convert_v1beta1_BootstrapToken_To_upstreamv1beta1_BootstrapToken is an autogenerated conversion function. +func Convert_v1beta1_BootstrapToken_To_upstreamv1beta1_BootstrapToken(in *v1beta1.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapToken_To_upstreamv1beta1_BootstrapToken(in, out, s) +} + +func autoConvert_upstreamv1beta1_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1beta1.BootstrapTokenDiscovery, s conversion.Scope) error { + out.Token = in.Token + out.APIServerEndpoint = in.APIServerEndpoint + out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) + out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification + return nil +} + +// Convert_upstreamv1beta1_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery is an autogenerated conversion function. +func Convert_upstreamv1beta1_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1beta1.BootstrapTokenDiscovery, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in, out, s) +} + +func autoConvert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta1_BootstrapTokenDiscovery(in *v1beta1.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { + out.Token = in.Token + out.APIServerEndpoint = in.APIServerEndpoint + out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) + out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification + return nil +} + +// Convert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta1_BootstrapTokenDiscovery is an autogenerated conversion function. +func Convert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta1_BootstrapTokenDiscovery(in *v1beta1.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta1_BootstrapTokenDiscovery(in, out, s) +} + +func autoConvert_upstreamv1beta1_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in *BootstrapTokenString, out *v1beta1.BootstrapTokenString, s conversion.Scope) error { + out.ID = in.ID + out.Secret = in.Secret + return nil +} + +// Convert_upstreamv1beta1_BootstrapTokenString_To_v1beta1_BootstrapTokenString is an autogenerated conversion function. +func Convert_upstreamv1beta1_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in *BootstrapTokenString, out *v1beta1.BootstrapTokenString, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in, out, s) +} + +func autoConvert_v1beta1_BootstrapTokenString_To_upstreamv1beta1_BootstrapTokenString(in *v1beta1.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { + out.ID = in.ID + out.Secret = in.Secret + return nil +} + +// Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta1_BootstrapTokenString is an autogenerated conversion function. +func Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta1_BootstrapTokenString(in *v1beta1.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapTokenString_To_upstreamv1beta1_BootstrapTokenString(in, out, s) +} + +func autoConvert_upstreamv1beta1_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { + if err := Convert_upstreamv1beta1_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } + if err := Convert_upstreamv1beta1_Networking_To_v1beta1_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + out.KubernetesVersion = in.KubernetesVersion + out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if err := Convert_upstreamv1beta1_APIServer_To_v1beta1_APIServer(&in.APIServer, &out.APIServer, s); err != nil { + return err + } + if err := Convert_upstreamv1beta1_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { + return err + } + if err := Convert_upstreamv1beta1_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { + return err + } + if err := Convert_upstreamv1beta1_DNS_To_v1beta1_DNS(&in.DNS, &out.DNS, s); err != nil { + return err + } + out.CertificatesDir = in.CertificatesDir + out.ImageRepository = in.ImageRepository + // WARNING: in.UseHyperKubeImage requires manual conversion: does not exist in peer-type + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName + return nil +} + +func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { + if err := Convert_v1beta1_Etcd_To_upstreamv1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } + if err := Convert_v1beta1_Networking_To_upstreamv1beta1_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + out.KubernetesVersion = in.KubernetesVersion + out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if err := Convert_v1beta1_APIServer_To_upstreamv1beta1_APIServer(&in.APIServer, &out.APIServer, s); err != nil { + return err + } + if err := Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta1_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { + return err + } + if err := Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta1_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { + return err + } + if err := Convert_v1beta1_DNS_To_upstreamv1beta1_DNS(&in.DNS, &out.DNS, s); err != nil { + return err + } + out.CertificatesDir = in.CertificatesDir + out.ImageRepository = in.ImageRepository + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName + return nil +} + +// Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration is an autogenerated conversion function. +func Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration(in, out, s) +} + +func autoConvert_upstreamv1beta1_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { + out.APIEndpoints = *(*map[string]v1beta1.APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) + return nil +} + +// Convert_upstreamv1beta1_ClusterStatus_To_v1beta1_ClusterStatus is an autogenerated conversion function. +func Convert_upstreamv1beta1_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_ClusterStatus_To_v1beta1_ClusterStatus(in, out, s) +} + +func autoConvert_v1beta1_ClusterStatus_To_upstreamv1beta1_ClusterStatus(in *v1beta1.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + out.APIEndpoints = *(*map[string]APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) + return nil +} + +// Convert_v1beta1_ClusterStatus_To_upstreamv1beta1_ClusterStatus is an autogenerated conversion function. +func Convert_v1beta1_ClusterStatus_To_upstreamv1beta1_ClusterStatus(in *v1beta1.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterStatus_To_upstreamv1beta1_ClusterStatus(in, out, s) +} + +func autoConvert_upstreamv1beta1_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in *ControlPlaneComponent, out *v1beta1.ControlPlaneComponent, s conversion.Scope) error { + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ExtraVolumes = *(*[]v1beta1.HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) + return nil +} + +// Convert_upstreamv1beta1_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent is an autogenerated conversion function. +func Convert_upstreamv1beta1_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in *ControlPlaneComponent, out *v1beta1.ControlPlaneComponent, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in, out, s) +} + +func autoConvert_v1beta1_ControlPlaneComponent_To_upstreamv1beta1_ControlPlaneComponent(in *v1beta1.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ExtraVolumes = *(*[]HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) + return nil +} + +// Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta1_ControlPlaneComponent is an autogenerated conversion function. +func Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta1_ControlPlaneComponent(in *v1beta1.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { + return autoConvert_v1beta1_ControlPlaneComponent_To_upstreamv1beta1_ControlPlaneComponent(in, out, s) +} + +func autoConvert_upstreamv1beta1_DNS_To_v1beta1_DNS(in *DNS, out *v1beta1.DNS, s conversion.Scope) error { + // WARNING: in.Type requires manual conversion: does not exist in peer-type + if err := Convert_upstreamv1beta1_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_DNS_To_upstreamv1beta1_DNS(in *v1beta1.DNS, out *DNS, s conversion.Scope) error { + if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DNS_To_upstreamv1beta1_DNS is an autogenerated conversion function. +func Convert_v1beta1_DNS_To_upstreamv1beta1_DNS(in *v1beta1.DNS, out *DNS, s conversion.Scope) error { + return autoConvert_v1beta1_DNS_To_upstreamv1beta1_DNS(in, out, s) +} + +func autoConvert_upstreamv1beta1_Discovery_To_v1beta1_Discovery(in *Discovery, out *v1beta1.Discovery, s conversion.Scope) error { + out.BootstrapToken = (*v1beta1.BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) + out.File = (*v1beta1.FileDiscovery)(unsafe.Pointer(in.File)) + out.TLSBootstrapToken = in.TLSBootstrapToken + out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) + return nil +} + +// Convert_upstreamv1beta1_Discovery_To_v1beta1_Discovery is an autogenerated conversion function. +func Convert_upstreamv1beta1_Discovery_To_v1beta1_Discovery(in *Discovery, out *v1beta1.Discovery, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_Discovery_To_v1beta1_Discovery(in, out, s) +} + +func autoConvert_v1beta1_Discovery_To_upstreamv1beta1_Discovery(in *v1beta1.Discovery, out *Discovery, s conversion.Scope) error { + out.BootstrapToken = (*BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) + out.File = (*FileDiscovery)(unsafe.Pointer(in.File)) + out.TLSBootstrapToken = in.TLSBootstrapToken + out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) + return nil +} + +// Convert_v1beta1_Discovery_To_upstreamv1beta1_Discovery is an autogenerated conversion function. +func Convert_v1beta1_Discovery_To_upstreamv1beta1_Discovery(in *v1beta1.Discovery, out *Discovery, s conversion.Scope) error { + return autoConvert_v1beta1_Discovery_To_upstreamv1beta1_Discovery(in, out, s) +} + +func autoConvert_upstreamv1beta1_Etcd_To_v1beta1_Etcd(in *Etcd, out *v1beta1.Etcd, s conversion.Scope) error { + out.Local = (*v1beta1.LocalEtcd)(unsafe.Pointer(in.Local)) + out.External = (*v1beta1.ExternalEtcd)(unsafe.Pointer(in.External)) + return nil +} + +// Convert_upstreamv1beta1_Etcd_To_v1beta1_Etcd is an autogenerated conversion function. +func Convert_upstreamv1beta1_Etcd_To_v1beta1_Etcd(in *Etcd, out *v1beta1.Etcd, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_Etcd_To_v1beta1_Etcd(in, out, s) +} + +func autoConvert_v1beta1_Etcd_To_upstreamv1beta1_Etcd(in *v1beta1.Etcd, out *Etcd, s conversion.Scope) error { + out.Local = (*LocalEtcd)(unsafe.Pointer(in.Local)) + out.External = (*ExternalEtcd)(unsafe.Pointer(in.External)) + return nil +} + +// Convert_v1beta1_Etcd_To_upstreamv1beta1_Etcd is an autogenerated conversion function. +func Convert_v1beta1_Etcd_To_upstreamv1beta1_Etcd(in *v1beta1.Etcd, out *Etcd, s conversion.Scope) error { + return autoConvert_v1beta1_Etcd_To_upstreamv1beta1_Etcd(in, out, s) +} + +func autoConvert_upstreamv1beta1_ExternalEtcd_To_v1beta1_ExternalEtcd(in *ExternalEtcd, out *v1beta1.ExternalEtcd, s conversion.Scope) error { + out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) + out.CAFile = in.CAFile + out.CertFile = in.CertFile + out.KeyFile = in.KeyFile + return nil +} + +// Convert_upstreamv1beta1_ExternalEtcd_To_v1beta1_ExternalEtcd is an autogenerated conversion function. +func Convert_upstreamv1beta1_ExternalEtcd_To_v1beta1_ExternalEtcd(in *ExternalEtcd, out *v1beta1.ExternalEtcd, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_ExternalEtcd_To_v1beta1_ExternalEtcd(in, out, s) +} + +func autoConvert_v1beta1_ExternalEtcd_To_upstreamv1beta1_ExternalEtcd(in *v1beta1.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { + out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) + out.CAFile = in.CAFile + out.CertFile = in.CertFile + out.KeyFile = in.KeyFile + return nil +} + +// Convert_v1beta1_ExternalEtcd_To_upstreamv1beta1_ExternalEtcd is an autogenerated conversion function. +func Convert_v1beta1_ExternalEtcd_To_upstreamv1beta1_ExternalEtcd(in *v1beta1.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { + return autoConvert_v1beta1_ExternalEtcd_To_upstreamv1beta1_ExternalEtcd(in, out, s) +} + +func autoConvert_upstreamv1beta1_FileDiscovery_To_v1beta1_FileDiscovery(in *FileDiscovery, out *v1beta1.FileDiscovery, s conversion.Scope) error { + out.KubeConfigPath = in.KubeConfigPath + return nil +} + +// Convert_upstreamv1beta1_FileDiscovery_To_v1beta1_FileDiscovery is an autogenerated conversion function. +func Convert_upstreamv1beta1_FileDiscovery_To_v1beta1_FileDiscovery(in *FileDiscovery, out *v1beta1.FileDiscovery, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_FileDiscovery_To_v1beta1_FileDiscovery(in, out, s) +} + +func autoConvert_v1beta1_FileDiscovery_To_upstreamv1beta1_FileDiscovery(in *v1beta1.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { + out.KubeConfigPath = in.KubeConfigPath + return nil +} + +// Convert_v1beta1_FileDiscovery_To_upstreamv1beta1_FileDiscovery is an autogenerated conversion function. +func Convert_v1beta1_FileDiscovery_To_upstreamv1beta1_FileDiscovery(in *v1beta1.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { + return autoConvert_v1beta1_FileDiscovery_To_upstreamv1beta1_FileDiscovery(in, out, s) +} + +func autoConvert_upstreamv1beta1_HostPathMount_To_v1beta1_HostPathMount(in *HostPathMount, out *v1beta1.HostPathMount, s conversion.Scope) error { + out.Name = in.Name + out.HostPath = in.HostPath + out.MountPath = in.MountPath + out.ReadOnly = in.ReadOnly + out.PathType = corev1.HostPathType(in.PathType) + return nil +} + +// Convert_upstreamv1beta1_HostPathMount_To_v1beta1_HostPathMount is an autogenerated conversion function. +func Convert_upstreamv1beta1_HostPathMount_To_v1beta1_HostPathMount(in *HostPathMount, out *v1beta1.HostPathMount, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_HostPathMount_To_v1beta1_HostPathMount(in, out, s) +} + +func autoConvert_v1beta1_HostPathMount_To_upstreamv1beta1_HostPathMount(in *v1beta1.HostPathMount, out *HostPathMount, s conversion.Scope) error { + out.Name = in.Name + out.HostPath = in.HostPath + out.MountPath = in.MountPath + out.ReadOnly = in.ReadOnly + out.PathType = corev1.HostPathType(in.PathType) + return nil +} + +// Convert_v1beta1_HostPathMount_To_upstreamv1beta1_HostPathMount is an autogenerated conversion function. +func Convert_v1beta1_HostPathMount_To_upstreamv1beta1_HostPathMount(in *v1beta1.HostPathMount, out *HostPathMount, s conversion.Scope) error { + return autoConvert_v1beta1_HostPathMount_To_upstreamv1beta1_HostPathMount(in, out, s) +} + +func autoConvert_upstreamv1beta1_ImageMeta_To_v1beta1_ImageMeta(in *ImageMeta, out *v1beta1.ImageMeta, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_upstreamv1beta1_ImageMeta_To_v1beta1_ImageMeta is an autogenerated conversion function. +func Convert_upstreamv1beta1_ImageMeta_To_v1beta1_ImageMeta(in *ImageMeta, out *v1beta1.ImageMeta, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_ImageMeta_To_v1beta1_ImageMeta(in, out, s) +} + +func autoConvert_v1beta1_ImageMeta_To_upstreamv1beta1_ImageMeta(in *v1beta1.ImageMeta, out *ImageMeta, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_v1beta1_ImageMeta_To_upstreamv1beta1_ImageMeta is an autogenerated conversion function. +func Convert_v1beta1_ImageMeta_To_upstreamv1beta1_ImageMeta(in *v1beta1.ImageMeta, out *ImageMeta, s conversion.Scope) error { + return autoConvert_v1beta1_ImageMeta_To_upstreamv1beta1_ImageMeta(in, out, s) +} + +func autoConvert_upstreamv1beta1_InitConfiguration_To_v1beta1_InitConfiguration(in *InitConfiguration, out *v1beta1.InitConfiguration, s conversion.Scope) error { + out.BootstrapTokens = *(*[]v1beta1.BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) + if err := Convert_upstreamv1beta1_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + if err := Convert_upstreamv1beta1_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_upstreamv1beta1_InitConfiguration_To_v1beta1_InitConfiguration is an autogenerated conversion function. +func Convert_upstreamv1beta1_InitConfiguration_To_v1beta1_InitConfiguration(in *InitConfiguration, out *v1beta1.InitConfiguration, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_InitConfiguration_To_v1beta1_InitConfiguration(in, out, s) +} + +func autoConvert_v1beta1_InitConfiguration_To_upstreamv1beta1_InitConfiguration(in *v1beta1.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { + out.BootstrapTokens = *(*[]BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + if err := Convert_v1beta1_APIEndpoint_To_upstreamv1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_InitConfiguration_To_upstreamv1beta1_InitConfiguration is an autogenerated conversion function. +func Convert_v1beta1_InitConfiguration_To_upstreamv1beta1_InitConfiguration(in *v1beta1.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_InitConfiguration_To_upstreamv1beta1_InitConfiguration(in, out, s) +} + +func autoConvert_upstreamv1beta1_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { + if err := Convert_upstreamv1beta1_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + out.CACertPath = in.CACertPath + if err := Convert_upstreamv1beta1_Discovery_To_v1beta1_Discovery(&in.Discovery, &out.Discovery, s); err != nil { + return err + } + out.ControlPlane = (*v1beta1.JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) + return nil +} + +// Convert_upstreamv1beta1_JoinConfiguration_To_v1beta1_JoinConfiguration is an autogenerated conversion function. +func Convert_upstreamv1beta1_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_JoinConfiguration_To_v1beta1_JoinConfiguration(in, out, s) +} + +func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta1_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + out.CACertPath = in.CACertPath + if err := Convert_v1beta1_Discovery_To_upstreamv1beta1_Discovery(&in.Discovery, &out.Discovery, s); err != nil { + return err + } + out.ControlPlane = (*JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) + return nil +} + +// Convert_v1beta1_JoinConfiguration_To_upstreamv1beta1_JoinConfiguration is an autogenerated conversion function. +func Convert_v1beta1_JoinConfiguration_To_upstreamv1beta1_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta1_JoinConfiguration(in, out, s) +} + +func autoConvert_upstreamv1beta1_JoinControlPlane_To_v1beta1_JoinControlPlane(in *JoinControlPlane, out *v1beta1.JoinControlPlane, s conversion.Scope) error { + if err := Convert_upstreamv1beta1_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_upstreamv1beta1_JoinControlPlane_To_v1beta1_JoinControlPlane is an autogenerated conversion function. +func Convert_upstreamv1beta1_JoinControlPlane_To_v1beta1_JoinControlPlane(in *JoinControlPlane, out *v1beta1.JoinControlPlane, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_JoinControlPlane_To_v1beta1_JoinControlPlane(in, out, s) +} + +func autoConvert_v1beta1_JoinControlPlane_To_upstreamv1beta1_JoinControlPlane(in *v1beta1.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { + if err := Convert_v1beta1_APIEndpoint_To_upstreamv1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_JoinControlPlane_To_upstreamv1beta1_JoinControlPlane is an autogenerated conversion function. +func Convert_v1beta1_JoinControlPlane_To_upstreamv1beta1_JoinControlPlane(in *v1beta1.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { + return autoConvert_v1beta1_JoinControlPlane_To_upstreamv1beta1_JoinControlPlane(in, out, s) +} + +func autoConvert_upstreamv1beta1_LocalEtcd_To_v1beta1_LocalEtcd(in *LocalEtcd, out *v1beta1.LocalEtcd, s conversion.Scope) error { + if err := Convert_upstreamv1beta1_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + out.DataDir = in.DataDir + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) + out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) + return nil +} + +// Convert_upstreamv1beta1_LocalEtcd_To_v1beta1_LocalEtcd is an autogenerated conversion function. +func Convert_upstreamv1beta1_LocalEtcd_To_v1beta1_LocalEtcd(in *LocalEtcd, out *v1beta1.LocalEtcd, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_LocalEtcd_To_v1beta1_LocalEtcd(in, out, s) +} + +func autoConvert_v1beta1_LocalEtcd_To_upstreamv1beta1_LocalEtcd(in *v1beta1.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { + if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + out.DataDir = in.DataDir + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) + out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) + return nil +} + +// Convert_v1beta1_LocalEtcd_To_upstreamv1beta1_LocalEtcd is an autogenerated conversion function. +func Convert_v1beta1_LocalEtcd_To_upstreamv1beta1_LocalEtcd(in *v1beta1.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { + return autoConvert_v1beta1_LocalEtcd_To_upstreamv1beta1_LocalEtcd(in, out, s) +} + +func autoConvert_upstreamv1beta1_Networking_To_v1beta1_Networking(in *Networking, out *v1beta1.Networking, s conversion.Scope) error { + out.ServiceSubnet = in.ServiceSubnet + out.PodSubnet = in.PodSubnet + out.DNSDomain = in.DNSDomain + return nil +} + +// Convert_upstreamv1beta1_Networking_To_v1beta1_Networking is an autogenerated conversion function. +func Convert_upstreamv1beta1_Networking_To_v1beta1_Networking(in *Networking, out *v1beta1.Networking, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_Networking_To_v1beta1_Networking(in, out, s) +} + +func autoConvert_v1beta1_Networking_To_upstreamv1beta1_Networking(in *v1beta1.Networking, out *Networking, s conversion.Scope) error { + out.ServiceSubnet = in.ServiceSubnet + out.PodSubnet = in.PodSubnet + out.DNSDomain = in.DNSDomain + return nil +} + +// Convert_v1beta1_Networking_To_upstreamv1beta1_Networking is an autogenerated conversion function. +func Convert_v1beta1_Networking_To_upstreamv1beta1_Networking(in *v1beta1.Networking, out *Networking, s conversion.Scope) error { + return autoConvert_v1beta1_Networking_To_upstreamv1beta1_Networking(in, out, s) +} + +func autoConvert_upstreamv1beta1_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1beta1.NodeRegistrationOptions, s conversion.Scope) error { + out.Name = in.Name + out.CRISocket = in.CRISocket + out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) + out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) + return nil +} + +// Convert_upstreamv1beta1_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions is an autogenerated conversion function. +func Convert_upstreamv1beta1_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1beta1.NodeRegistrationOptions, s conversion.Scope) error { + return autoConvert_upstreamv1beta1_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in, out, s) +} + +func autoConvert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta1_NodeRegistrationOptions(in *v1beta1.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { + out.Name = in.Name + out.CRISocket = in.CRISocket + out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) + out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) + // WARNING: in.IgnorePreflightErrors requires manual conversion: does not exist in peer-type + return nil +} diff --git a/bootstrap/kubeadm/types/v1beta1/zz_generated.deepcopy.go b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta1/zz_generated.deepcopy.go rename to bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go index 622c19612172..3085ae800c95 100644 --- a/bootstrap/kubeadm/types/v1beta1/zz_generated.deepcopy.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go @@ -18,7 +18,7 @@ limitations under the License. // Code generated by controller-gen. DO NOT EDIT. -package v1beta1 +package upstreamv1beta1 import ( corev1 "k8s.io/api/core/v1" diff --git a/bootstrap/kubeadm/types/v1beta2/bootstraptokenstring.go b/bootstrap/kubeadm/types/upstreamv1beta2/bootstraptokenstring.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta2/bootstraptokenstring.go rename to bootstrap/kubeadm/types/upstreamv1beta2/bootstraptokenstring.go index 7efbf59c241e..83ff743a07b0 100644 --- a/bootstrap/kubeadm/types/v1beta2/bootstraptokenstring.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/bootstraptokenstring.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta2 +package upstreamv1beta2 import ( "fmt" diff --git a/bootstrap/kubeadm/types/v1beta2/bootstraptokenstring_test.go b/bootstrap/kubeadm/types/upstreamv1beta2/bootstraptokenstring_test.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta2/bootstraptokenstring_test.go rename to bootstrap/kubeadm/types/upstreamv1beta2/bootstraptokenstring_test.go index 67f2a0e4093d..45de0b2bc1f0 100644 --- a/bootstrap/kubeadm/types/v1beta2/bootstraptokenstring_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/bootstraptokenstring_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta2 +package upstreamv1beta2 import ( "encoding/json" diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/conversion.go b/bootstrap/kubeadm/types/upstreamv1beta2/conversion.go new file mode 100644 index 000000000000..97229decc32e --- /dev/null +++ b/bootstrap/kubeadm/types/upstreamv1beta2/conversion.go @@ -0,0 +1,83 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package upstreamv1beta2 + +import ( + apimachineryconversion "k8s.io/apimachinery/pkg/conversion" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + "sigs.k8s.io/controller-runtime/pkg/conversion" +) + +func (src *ClusterConfiguration) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*bootstrapv1.ClusterConfiguration) + return Convert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfiguration(src, dst, nil) +} + +func (dst *ClusterConfiguration) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*bootstrapv1.ClusterConfiguration) + return Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(src, dst, nil) +} + +func (src *ClusterStatus) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*bootstrapv1.ClusterStatus) + return Convert_upstreamv1beta2_ClusterStatus_To_v1beta1_ClusterStatus(src, dst, nil) +} + +func (dst *ClusterStatus) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*bootstrapv1.ClusterStatus) + return Convert_v1beta1_ClusterStatus_To_upstreamv1beta2_ClusterStatus(src, dst, nil) +} + +func (src *InitConfiguration) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*bootstrapv1.InitConfiguration) + return Convert_upstreamv1beta2_InitConfiguration_To_v1beta1_InitConfiguration(src, dst, nil) +} + +func (dst *InitConfiguration) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*bootstrapv1.InitConfiguration) + return Convert_v1beta1_InitConfiguration_To_upstreamv1beta2_InitConfiguration(src, dst, nil) +} + +func (src *JoinConfiguration) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*bootstrapv1.JoinConfiguration) + return Convert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration(src, dst, nil) +} + +func (dst *JoinConfiguration) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*bootstrapv1.JoinConfiguration) + return Convert_v1beta1_JoinConfiguration_To_upstreamv1beta2_JoinConfiguration(src, dst, nil) +} + +func Convert_upstreamv1beta2_InitConfiguration_To_v1beta1_InitConfiguration(in *InitConfiguration, out *bootstrapv1.InitConfiguration, s apimachineryconversion.Scope) error { + // InitConfiguration.CertificateKey exists in v1beta2 types but not in bootstrapv1.InitConfiguration (Cluster API does not uses automatic copy certs). Ignoring when converting. + return autoConvert_upstreamv1beta2_InitConfiguration_To_v1beta1_InitConfiguration(in, out, s) +} + +func Convert_upstreamv1beta2_JoinControlPlane_To_v1beta1_JoinControlPlane(in *JoinControlPlane, out *bootstrapv1.JoinControlPlane, s apimachineryconversion.Scope) error { + // JoinControlPlane.CertificateKey exists in v1beta2 types but not in bootstrapv1.JoinControlPlane (Cluster API does not uses automatic copy certs). Ignoring when converting. + return autoConvert_upstreamv1beta2_JoinControlPlane_To_v1beta1_JoinControlPlane(in, out, s) +} + +func Convert_upstreamv1beta2_DNS_To_v1beta1_DNS(in *DNS, out *bootstrapv1.DNS, s apimachineryconversion.Scope) error { + // DNS.Type was removed in v1alpha4 because only CoreDNS is supported, dropping this info. + return autoConvert_upstreamv1beta2_DNS_To_v1beta1_DNS(in, out, s) +} + +func Convert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *bootstrapv1.ClusterConfiguration, s apimachineryconversion.Scope) error { + // ClusterConfiguration.UseHyperKubeImage was removed in kubeadm v1alpha4 API + return autoConvert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in, out, s) +} diff --git a/bootstrap/kubeadm/types/v1beta2/conversion_test.go b/bootstrap/kubeadm/types/upstreamv1beta2/conversion_test.go similarity index 93% rename from bootstrap/kubeadm/types/v1beta2/conversion_test.go rename to bootstrap/kubeadm/types/upstreamv1beta2/conversion_test.go index 82e99e8264db..44b5e756af68 100644 --- a/bootstrap/kubeadm/types/v1beta2/conversion_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/conversion_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta2 +package upstreamv1beta2 import ( "testing" @@ -22,35 +22,34 @@ import ( fuzz "github.com/google/gofuzz" "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) func TestFuzzyConversion(t *testing.T) { t.Run("for ClusterConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.ClusterConfiguration{}, + Hub: &v1beta1.ClusterConfiguration{}, Spoke: &ClusterConfiguration{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs}, })) t.Run("for ClusterStatus", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.ClusterStatus{}, + Hub: &v1beta1.ClusterStatus{}, Spoke: &ClusterStatus{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs}, })) t.Run("for InitConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.InitConfiguration{}, + Hub: &v1beta1.InitConfiguration{}, Spoke: &InitConfiguration{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs}, })) t.Run("for JoinConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.JoinConfiguration{}, + Hub: &v1beta1.JoinConfiguration{}, Spoke: &JoinConfiguration{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, diff --git a/bootstrap/kubeadm/types/v1beta2/doc.go b/bootstrap/kubeadm/types/upstreamv1beta2/doc.go similarity index 77% rename from bootstrap/kubeadm/types/v1beta2/doc.go rename to bootstrap/kubeadm/types/upstreamv1beta2/doc.go index 8b905003f3d6..99ee65a15836 100644 --- a/bootstrap/kubeadm/types/v1beta2/doc.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/doc.go @@ -14,11 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1beta2 contains a mirror of kubeadm API v1beta2 API, required because it is not possible to import k/K. +// Package upstreamv1beta2 contains a mirror of kubeadm API v1beta2 API, required because it is not possible to import k/K. // // IMPORTANT: Do not change these files! // IMPORTANT: only for KubeadmConfig serialization/deserialization, and should not be used for other purposes. // -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 // +k8s:deepcopy-gen=package -package v1beta2 // import "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta2" +package upstreamv1beta2 // import "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta2" diff --git a/bootstrap/kubeadm/types/v1beta2/groupversion_info.go b/bootstrap/kubeadm/types/upstreamv1beta2/groupversion_info.go similarity index 97% rename from bootstrap/kubeadm/types/v1beta2/groupversion_info.go rename to bootstrap/kubeadm/types/upstreamv1beta2/groupversion_info.go index c5516fee8424..ff5cd0acbada 100644 --- a/bootstrap/kubeadm/types/v1beta2/groupversion_info.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/groupversion_info.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta2 +package upstreamv1beta2 import ( "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/bootstrap/kubeadm/types/v1beta2/types.go b/bootstrap/kubeadm/types/upstreamv1beta2/types.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta2/types.go rename to bootstrap/kubeadm/types/upstreamv1beta2/types.go index 58490deee74a..96b684a3bd47 100644 --- a/bootstrap/kubeadm/types/v1beta2/types.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta2 +package upstreamv1beta2 import ( corev1 "k8s.io/api/core/v1" diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go new file mode 100644 index 000000000000..bfe2cf9c2996 --- /dev/null +++ b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go @@ -0,0 +1,829 @@ +// +build !ignore_autogenerated_kubeadm_types + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package upstreamv1beta2 + +import ( + unsafe "unsafe" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + v1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" +) + +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((*APIEndpoint)(nil), (*v1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_APIEndpoint_To_v1beta1_APIEndpoint(a.(*APIEndpoint), b.(*v1beta1.APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIEndpoint_To_upstreamv1beta2_APIEndpoint(a.(*v1beta1.APIEndpoint), b.(*APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*APIServer)(nil), (*v1beta1.APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_APIServer_To_v1beta1_APIServer(a.(*APIServer), b.(*v1beta1.APIServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.APIServer)(nil), (*APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIServer_To_upstreamv1beta2_APIServer(a.(*v1beta1.APIServer), b.(*APIServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapToken)(nil), (*v1beta1.BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_BootstrapToken_To_v1beta1_BootstrapToken(a.(*BootstrapToken), b.(*v1beta1.BootstrapToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapToken)(nil), (*BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapToken_To_upstreamv1beta2_BootstrapToken(a.(*v1beta1.BootstrapToken), b.(*BootstrapToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapTokenDiscovery)(nil), (*v1beta1.BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(a.(*BootstrapTokenDiscovery), b.(*v1beta1.BootstrapTokenDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapTokenDiscovery)(nil), (*BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta2_BootstrapTokenDiscovery(a.(*v1beta1.BootstrapTokenDiscovery), b.(*BootstrapTokenDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapTokenString)(nil), (*v1beta1.BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_BootstrapTokenString_To_v1beta1_BootstrapTokenString(a.(*BootstrapTokenString), b.(*v1beta1.BootstrapTokenString), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapTokenString)(nil), (*BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta2_BootstrapTokenString(a.(*v1beta1.BootstrapTokenString), b.(*BootstrapTokenString), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*ClusterConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterStatus)(nil), (*v1beta1.ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_ClusterStatus_To_v1beta1_ClusterStatus(a.(*ClusterStatus), b.(*v1beta1.ClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterStatus)(nil), (*ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterStatus_To_upstreamv1beta2_ClusterStatus(a.(*v1beta1.ClusterStatus), b.(*ClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlPlaneComponent)(nil), (*v1beta1.ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(a.(*ControlPlaneComponent), b.(*v1beta1.ControlPlaneComponent), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ControlPlaneComponent)(nil), (*ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta2_ControlPlaneComponent(a.(*v1beta1.ControlPlaneComponent), b.(*ControlPlaneComponent), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNS_To_upstreamv1beta2_DNS(a.(*v1beta1.DNS), b.(*DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Discovery)(nil), (*v1beta1.Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_Discovery_To_v1beta1_Discovery(a.(*Discovery), b.(*v1beta1.Discovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Discovery)(nil), (*Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Discovery_To_upstreamv1beta2_Discovery(a.(*v1beta1.Discovery), b.(*Discovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Etcd)(nil), (*v1beta1.Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_Etcd_To_v1beta1_Etcd(a.(*Etcd), b.(*v1beta1.Etcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Etcd)(nil), (*Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Etcd_To_upstreamv1beta2_Etcd(a.(*v1beta1.Etcd), b.(*Etcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExternalEtcd)(nil), (*v1beta1.ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_ExternalEtcd_To_v1beta1_ExternalEtcd(a.(*ExternalEtcd), b.(*v1beta1.ExternalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ExternalEtcd)(nil), (*ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExternalEtcd_To_upstreamv1beta2_ExternalEtcd(a.(*v1beta1.ExternalEtcd), b.(*ExternalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FileDiscovery)(nil), (*v1beta1.FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_FileDiscovery_To_v1beta1_FileDiscovery(a.(*FileDiscovery), b.(*v1beta1.FileDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.FileDiscovery)(nil), (*FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FileDiscovery_To_upstreamv1beta2_FileDiscovery(a.(*v1beta1.FileDiscovery), b.(*FileDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HostPathMount)(nil), (*v1beta1.HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_HostPathMount_To_v1beta1_HostPathMount(a.(*HostPathMount), b.(*v1beta1.HostPathMount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.HostPathMount)(nil), (*HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HostPathMount_To_upstreamv1beta2_HostPathMount(a.(*v1beta1.HostPathMount), b.(*HostPathMount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ImageMeta)(nil), (*v1beta1.ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta(a.(*ImageMeta), b.(*v1beta1.ImageMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ImageMeta)(nil), (*ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta(a.(*v1beta1.ImageMeta), b.(*ImageMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.InitConfiguration)(nil), (*InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_InitConfiguration_To_upstreamv1beta2_InitConfiguration(a.(*v1beta1.InitConfiguration), b.(*InitConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*JoinConfiguration)(nil), (*v1beta1.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration(a.(*JoinConfiguration), b.(*v1beta1.JoinConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.JoinConfiguration)(nil), (*JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JoinConfiguration_To_upstreamv1beta2_JoinConfiguration(a.(*v1beta1.JoinConfiguration), b.(*JoinConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.JoinControlPlane)(nil), (*JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JoinControlPlane_To_upstreamv1beta2_JoinControlPlane(a.(*v1beta1.JoinControlPlane), b.(*JoinControlPlane), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LocalEtcd)(nil), (*v1beta1.LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_LocalEtcd_To_v1beta1_LocalEtcd(a.(*LocalEtcd), b.(*v1beta1.LocalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.LocalEtcd)(nil), (*LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_LocalEtcd_To_upstreamv1beta2_LocalEtcd(a.(*v1beta1.LocalEtcd), b.(*LocalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Networking)(nil), (*v1beta1.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_Networking_To_v1beta1_Networking(a.(*Networking), b.(*v1beta1.Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Networking_To_upstreamv1beta2_Networking(a.(*v1beta1.Networking), b.(*Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NodeRegistrationOptions)(nil), (*v1beta1.NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(a.(*NodeRegistrationOptions), b.(*v1beta1.NodeRegistrationOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.NodeRegistrationOptions)(nil), (*NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions(a.(*v1beta1.NodeRegistrationOptions), b.(*NodeRegistrationOptions), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*DNS)(nil), (*v1beta1.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_DNS_To_v1beta1_DNS(a.(*DNS), b.(*v1beta1.DNS), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*InitConfiguration)(nil), (*v1beta1.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_InitConfiguration_To_v1beta1_InitConfiguration(a.(*InitConfiguration), b.(*v1beta1.InitConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*JoinControlPlane)(nil), (*v1beta1.JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta2_JoinControlPlane_To_v1beta1_JoinControlPlane(a.(*JoinControlPlane), b.(*v1beta1.JoinControlPlane), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_upstreamv1beta2_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + out.AdvertiseAddress = in.AdvertiseAddress + out.BindPort = in.BindPort + return nil +} + +// Convert_upstreamv1beta2_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. +func Convert_upstreamv1beta2_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) +} + +func autoConvert_v1beta1_APIEndpoint_To_upstreamv1beta2_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + out.AdvertiseAddress = in.AdvertiseAddress + out.BindPort = in.BindPort + return nil +} + +// Convert_v1beta1_APIEndpoint_To_upstreamv1beta2_APIEndpoint is an autogenerated conversion function. +func Convert_v1beta1_APIEndpoint_To_upstreamv1beta2_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + return autoConvert_v1beta1_APIEndpoint_To_upstreamv1beta2_APIEndpoint(in, out, s) +} + +func autoConvert_upstreamv1beta2_APIServer_To_v1beta1_APIServer(in *APIServer, out *v1beta1.APIServer, s conversion.Scope) error { + if err := Convert_upstreamv1beta2_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { + return err + } + out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) + out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) + return nil +} + +// Convert_upstreamv1beta2_APIServer_To_v1beta1_APIServer is an autogenerated conversion function. +func Convert_upstreamv1beta2_APIServer_To_v1beta1_APIServer(in *APIServer, out *v1beta1.APIServer, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_APIServer_To_v1beta1_APIServer(in, out, s) +} + +func autoConvert_v1beta1_APIServer_To_upstreamv1beta2_APIServer(in *v1beta1.APIServer, out *APIServer, s conversion.Scope) error { + if err := Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta2_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { + return err + } + out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) + out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) + return nil +} + +// Convert_v1beta1_APIServer_To_upstreamv1beta2_APIServer is an autogenerated conversion function. +func Convert_v1beta1_APIServer_To_upstreamv1beta2_APIServer(in *v1beta1.APIServer, out *APIServer, s conversion.Scope) error { + return autoConvert_v1beta1_APIServer_To_upstreamv1beta2_APIServer(in, out, s) +} + +func autoConvert_upstreamv1beta2_BootstrapToken_To_v1beta1_BootstrapToken(in *BootstrapToken, out *v1beta1.BootstrapToken, s conversion.Scope) error { + out.Token = (*v1beta1.BootstrapTokenString)(unsafe.Pointer(in.Token)) + out.Description = in.Description + out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) + out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) + out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +// Convert_upstreamv1beta2_BootstrapToken_To_v1beta1_BootstrapToken is an autogenerated conversion function. +func Convert_upstreamv1beta2_BootstrapToken_To_v1beta1_BootstrapToken(in *BootstrapToken, out *v1beta1.BootstrapToken, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_BootstrapToken_To_v1beta1_BootstrapToken(in, out, s) +} + +func autoConvert_v1beta1_BootstrapToken_To_upstreamv1beta2_BootstrapToken(in *v1beta1.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { + out.Token = (*BootstrapTokenString)(unsafe.Pointer(in.Token)) + out.Description = in.Description + out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) + out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) + out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +// Convert_v1beta1_BootstrapToken_To_upstreamv1beta2_BootstrapToken is an autogenerated conversion function. +func Convert_v1beta1_BootstrapToken_To_upstreamv1beta2_BootstrapToken(in *v1beta1.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapToken_To_upstreamv1beta2_BootstrapToken(in, out, s) +} + +func autoConvert_upstreamv1beta2_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1beta1.BootstrapTokenDiscovery, s conversion.Scope) error { + out.Token = in.Token + out.APIServerEndpoint = in.APIServerEndpoint + out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) + out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification + return nil +} + +// Convert_upstreamv1beta2_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery is an autogenerated conversion function. +func Convert_upstreamv1beta2_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1beta1.BootstrapTokenDiscovery, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in, out, s) +} + +func autoConvert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta2_BootstrapTokenDiscovery(in *v1beta1.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { + out.Token = in.Token + out.APIServerEndpoint = in.APIServerEndpoint + out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) + out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification + return nil +} + +// Convert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta2_BootstrapTokenDiscovery is an autogenerated conversion function. +func Convert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta2_BootstrapTokenDiscovery(in *v1beta1.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta2_BootstrapTokenDiscovery(in, out, s) +} + +func autoConvert_upstreamv1beta2_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in *BootstrapTokenString, out *v1beta1.BootstrapTokenString, s conversion.Scope) error { + out.ID = in.ID + out.Secret = in.Secret + return nil +} + +// Convert_upstreamv1beta2_BootstrapTokenString_To_v1beta1_BootstrapTokenString is an autogenerated conversion function. +func Convert_upstreamv1beta2_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in *BootstrapTokenString, out *v1beta1.BootstrapTokenString, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in, out, s) +} + +func autoConvert_v1beta1_BootstrapTokenString_To_upstreamv1beta2_BootstrapTokenString(in *v1beta1.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { + out.ID = in.ID + out.Secret = in.Secret + return nil +} + +// Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta2_BootstrapTokenString is an autogenerated conversion function. +func Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta2_BootstrapTokenString(in *v1beta1.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapTokenString_To_upstreamv1beta2_BootstrapTokenString(in, out, s) +} + +func autoConvert_upstreamv1beta2_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { + if err := Convert_upstreamv1beta2_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } + if err := Convert_upstreamv1beta2_Networking_To_v1beta1_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + out.KubernetesVersion = in.KubernetesVersion + out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if err := Convert_upstreamv1beta2_APIServer_To_v1beta1_APIServer(&in.APIServer, &out.APIServer, s); err != nil { + return err + } + if err := Convert_upstreamv1beta2_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { + return err + } + if err := Convert_upstreamv1beta2_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { + return err + } + if err := Convert_upstreamv1beta2_DNS_To_v1beta1_DNS(&in.DNS, &out.DNS, s); err != nil { + return err + } + out.CertificatesDir = in.CertificatesDir + out.ImageRepository = in.ImageRepository + // WARNING: in.UseHyperKubeImage requires manual conversion: does not exist in peer-type + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName + return nil +} + +func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { + if err := Convert_v1beta1_Etcd_To_upstreamv1beta2_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } + if err := Convert_v1beta1_Networking_To_upstreamv1beta2_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + out.KubernetesVersion = in.KubernetesVersion + out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if err := Convert_v1beta1_APIServer_To_upstreamv1beta2_APIServer(&in.APIServer, &out.APIServer, s); err != nil { + return err + } + if err := Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta2_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { + return err + } + if err := Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta2_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { + return err + } + if err := Convert_v1beta1_DNS_To_upstreamv1beta2_DNS(&in.DNS, &out.DNS, s); err != nil { + return err + } + out.CertificatesDir = in.CertificatesDir + out.ImageRepository = in.ImageRepository + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName + return nil +} + +// Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration is an autogenerated conversion function. +func Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(in, out, s) +} + +func autoConvert_upstreamv1beta2_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { + out.APIEndpoints = *(*map[string]v1beta1.APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) + return nil +} + +// Convert_upstreamv1beta2_ClusterStatus_To_v1beta1_ClusterStatus is an autogenerated conversion function. +func Convert_upstreamv1beta2_ClusterStatus_To_v1beta1_ClusterStatus(in *ClusterStatus, out *v1beta1.ClusterStatus, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_ClusterStatus_To_v1beta1_ClusterStatus(in, out, s) +} + +func autoConvert_v1beta1_ClusterStatus_To_upstreamv1beta2_ClusterStatus(in *v1beta1.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + out.APIEndpoints = *(*map[string]APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) + return nil +} + +// Convert_v1beta1_ClusterStatus_To_upstreamv1beta2_ClusterStatus is an autogenerated conversion function. +func Convert_v1beta1_ClusterStatus_To_upstreamv1beta2_ClusterStatus(in *v1beta1.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterStatus_To_upstreamv1beta2_ClusterStatus(in, out, s) +} + +func autoConvert_upstreamv1beta2_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in *ControlPlaneComponent, out *v1beta1.ControlPlaneComponent, s conversion.Scope) error { + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ExtraVolumes = *(*[]v1beta1.HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) + return nil +} + +// Convert_upstreamv1beta2_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent is an autogenerated conversion function. +func Convert_upstreamv1beta2_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in *ControlPlaneComponent, out *v1beta1.ControlPlaneComponent, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in, out, s) +} + +func autoConvert_v1beta1_ControlPlaneComponent_To_upstreamv1beta2_ControlPlaneComponent(in *v1beta1.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ExtraVolumes = *(*[]HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) + return nil +} + +// Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta2_ControlPlaneComponent is an autogenerated conversion function. +func Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta2_ControlPlaneComponent(in *v1beta1.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { + return autoConvert_v1beta1_ControlPlaneComponent_To_upstreamv1beta2_ControlPlaneComponent(in, out, s) +} + +func autoConvert_upstreamv1beta2_DNS_To_v1beta1_DNS(in *DNS, out *v1beta1.DNS, s conversion.Scope) error { + // WARNING: in.Type requires manual conversion: does not exist in peer-type + if err := Convert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_DNS_To_upstreamv1beta2_DNS(in *v1beta1.DNS, out *DNS, s conversion.Scope) error { + if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DNS_To_upstreamv1beta2_DNS is an autogenerated conversion function. +func Convert_v1beta1_DNS_To_upstreamv1beta2_DNS(in *v1beta1.DNS, out *DNS, s conversion.Scope) error { + return autoConvert_v1beta1_DNS_To_upstreamv1beta2_DNS(in, out, s) +} + +func autoConvert_upstreamv1beta2_Discovery_To_v1beta1_Discovery(in *Discovery, out *v1beta1.Discovery, s conversion.Scope) error { + out.BootstrapToken = (*v1beta1.BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) + out.File = (*v1beta1.FileDiscovery)(unsafe.Pointer(in.File)) + out.TLSBootstrapToken = in.TLSBootstrapToken + out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) + return nil +} + +// Convert_upstreamv1beta2_Discovery_To_v1beta1_Discovery is an autogenerated conversion function. +func Convert_upstreamv1beta2_Discovery_To_v1beta1_Discovery(in *Discovery, out *v1beta1.Discovery, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_Discovery_To_v1beta1_Discovery(in, out, s) +} + +func autoConvert_v1beta1_Discovery_To_upstreamv1beta2_Discovery(in *v1beta1.Discovery, out *Discovery, s conversion.Scope) error { + out.BootstrapToken = (*BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) + out.File = (*FileDiscovery)(unsafe.Pointer(in.File)) + out.TLSBootstrapToken = in.TLSBootstrapToken + out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) + return nil +} + +// Convert_v1beta1_Discovery_To_upstreamv1beta2_Discovery is an autogenerated conversion function. +func Convert_v1beta1_Discovery_To_upstreamv1beta2_Discovery(in *v1beta1.Discovery, out *Discovery, s conversion.Scope) error { + return autoConvert_v1beta1_Discovery_To_upstreamv1beta2_Discovery(in, out, s) +} + +func autoConvert_upstreamv1beta2_Etcd_To_v1beta1_Etcd(in *Etcd, out *v1beta1.Etcd, s conversion.Scope) error { + out.Local = (*v1beta1.LocalEtcd)(unsafe.Pointer(in.Local)) + out.External = (*v1beta1.ExternalEtcd)(unsafe.Pointer(in.External)) + return nil +} + +// Convert_upstreamv1beta2_Etcd_To_v1beta1_Etcd is an autogenerated conversion function. +func Convert_upstreamv1beta2_Etcd_To_v1beta1_Etcd(in *Etcd, out *v1beta1.Etcd, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_Etcd_To_v1beta1_Etcd(in, out, s) +} + +func autoConvert_v1beta1_Etcd_To_upstreamv1beta2_Etcd(in *v1beta1.Etcd, out *Etcd, s conversion.Scope) error { + out.Local = (*LocalEtcd)(unsafe.Pointer(in.Local)) + out.External = (*ExternalEtcd)(unsafe.Pointer(in.External)) + return nil +} + +// Convert_v1beta1_Etcd_To_upstreamv1beta2_Etcd is an autogenerated conversion function. +func Convert_v1beta1_Etcd_To_upstreamv1beta2_Etcd(in *v1beta1.Etcd, out *Etcd, s conversion.Scope) error { + return autoConvert_v1beta1_Etcd_To_upstreamv1beta2_Etcd(in, out, s) +} + +func autoConvert_upstreamv1beta2_ExternalEtcd_To_v1beta1_ExternalEtcd(in *ExternalEtcd, out *v1beta1.ExternalEtcd, s conversion.Scope) error { + out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) + out.CAFile = in.CAFile + out.CertFile = in.CertFile + out.KeyFile = in.KeyFile + return nil +} + +// Convert_upstreamv1beta2_ExternalEtcd_To_v1beta1_ExternalEtcd is an autogenerated conversion function. +func Convert_upstreamv1beta2_ExternalEtcd_To_v1beta1_ExternalEtcd(in *ExternalEtcd, out *v1beta1.ExternalEtcd, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_ExternalEtcd_To_v1beta1_ExternalEtcd(in, out, s) +} + +func autoConvert_v1beta1_ExternalEtcd_To_upstreamv1beta2_ExternalEtcd(in *v1beta1.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { + out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) + out.CAFile = in.CAFile + out.CertFile = in.CertFile + out.KeyFile = in.KeyFile + return nil +} + +// Convert_v1beta1_ExternalEtcd_To_upstreamv1beta2_ExternalEtcd is an autogenerated conversion function. +func Convert_v1beta1_ExternalEtcd_To_upstreamv1beta2_ExternalEtcd(in *v1beta1.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { + return autoConvert_v1beta1_ExternalEtcd_To_upstreamv1beta2_ExternalEtcd(in, out, s) +} + +func autoConvert_upstreamv1beta2_FileDiscovery_To_v1beta1_FileDiscovery(in *FileDiscovery, out *v1beta1.FileDiscovery, s conversion.Scope) error { + out.KubeConfigPath = in.KubeConfigPath + return nil +} + +// Convert_upstreamv1beta2_FileDiscovery_To_v1beta1_FileDiscovery is an autogenerated conversion function. +func Convert_upstreamv1beta2_FileDiscovery_To_v1beta1_FileDiscovery(in *FileDiscovery, out *v1beta1.FileDiscovery, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_FileDiscovery_To_v1beta1_FileDiscovery(in, out, s) +} + +func autoConvert_v1beta1_FileDiscovery_To_upstreamv1beta2_FileDiscovery(in *v1beta1.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { + out.KubeConfigPath = in.KubeConfigPath + return nil +} + +// Convert_v1beta1_FileDiscovery_To_upstreamv1beta2_FileDiscovery is an autogenerated conversion function. +func Convert_v1beta1_FileDiscovery_To_upstreamv1beta2_FileDiscovery(in *v1beta1.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { + return autoConvert_v1beta1_FileDiscovery_To_upstreamv1beta2_FileDiscovery(in, out, s) +} + +func autoConvert_upstreamv1beta2_HostPathMount_To_v1beta1_HostPathMount(in *HostPathMount, out *v1beta1.HostPathMount, s conversion.Scope) error { + out.Name = in.Name + out.HostPath = in.HostPath + out.MountPath = in.MountPath + out.ReadOnly = in.ReadOnly + out.PathType = corev1.HostPathType(in.PathType) + return nil +} + +// Convert_upstreamv1beta2_HostPathMount_To_v1beta1_HostPathMount is an autogenerated conversion function. +func Convert_upstreamv1beta2_HostPathMount_To_v1beta1_HostPathMount(in *HostPathMount, out *v1beta1.HostPathMount, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_HostPathMount_To_v1beta1_HostPathMount(in, out, s) +} + +func autoConvert_v1beta1_HostPathMount_To_upstreamv1beta2_HostPathMount(in *v1beta1.HostPathMount, out *HostPathMount, s conversion.Scope) error { + out.Name = in.Name + out.HostPath = in.HostPath + out.MountPath = in.MountPath + out.ReadOnly = in.ReadOnly + out.PathType = corev1.HostPathType(in.PathType) + return nil +} + +// Convert_v1beta1_HostPathMount_To_upstreamv1beta2_HostPathMount is an autogenerated conversion function. +func Convert_v1beta1_HostPathMount_To_upstreamv1beta2_HostPathMount(in *v1beta1.HostPathMount, out *HostPathMount, s conversion.Scope) error { + return autoConvert_v1beta1_HostPathMount_To_upstreamv1beta2_HostPathMount(in, out, s) +} + +func autoConvert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta(in *ImageMeta, out *v1beta1.ImageMeta, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta is an autogenerated conversion function. +func Convert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta(in *ImageMeta, out *v1beta1.ImageMeta, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta(in, out, s) +} + +func autoConvert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta(in *v1beta1.ImageMeta, out *ImageMeta, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta is an autogenerated conversion function. +func Convert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta(in *v1beta1.ImageMeta, out *ImageMeta, s conversion.Scope) error { + return autoConvert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta(in, out, s) +} + +func autoConvert_upstreamv1beta2_InitConfiguration_To_v1beta1_InitConfiguration(in *InitConfiguration, out *v1beta1.InitConfiguration, s conversion.Scope) error { + out.BootstrapTokens = *(*[]v1beta1.BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) + if err := Convert_upstreamv1beta2_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + if err := Convert_upstreamv1beta2_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + // WARNING: in.CertificateKey requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_InitConfiguration_To_upstreamv1beta2_InitConfiguration(in *v1beta1.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { + out.BootstrapTokens = *(*[]BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + if err := Convert_v1beta1_APIEndpoint_To_upstreamv1beta2_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_InitConfiguration_To_upstreamv1beta2_InitConfiguration is an autogenerated conversion function. +func Convert_v1beta1_InitConfiguration_To_upstreamv1beta2_InitConfiguration(in *v1beta1.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_InitConfiguration_To_upstreamv1beta2_InitConfiguration(in, out, s) +} + +func autoConvert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { + if err := Convert_upstreamv1beta2_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + out.CACertPath = in.CACertPath + if err := Convert_upstreamv1beta2_Discovery_To_v1beta1_Discovery(&in.Discovery, &out.Discovery, s); err != nil { + return err + } + if in.ControlPlane != nil { + in, out := &in.ControlPlane, &out.ControlPlane + *out = new(v1beta1.JoinControlPlane) + if err := Convert_upstreamv1beta2_JoinControlPlane_To_v1beta1_JoinControlPlane(*in, *out, s); err != nil { + return err + } + } else { + out.ControlPlane = nil + } + return nil +} + +// Convert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration is an autogenerated conversion function. +func Convert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_JoinConfiguration_To_v1beta1_JoinConfiguration(in, out, s) +} + +func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta2_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + out.CACertPath = in.CACertPath + if err := Convert_v1beta1_Discovery_To_upstreamv1beta2_Discovery(&in.Discovery, &out.Discovery, s); err != nil { + return err + } + if in.ControlPlane != nil { + in, out := &in.ControlPlane, &out.ControlPlane + *out = new(JoinControlPlane) + if err := Convert_v1beta1_JoinControlPlane_To_upstreamv1beta2_JoinControlPlane(*in, *out, s); err != nil { + return err + } + } else { + out.ControlPlane = nil + } + return nil +} + +// Convert_v1beta1_JoinConfiguration_To_upstreamv1beta2_JoinConfiguration is an autogenerated conversion function. +func Convert_v1beta1_JoinConfiguration_To_upstreamv1beta2_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta2_JoinConfiguration(in, out, s) +} + +func autoConvert_upstreamv1beta2_JoinControlPlane_To_v1beta1_JoinControlPlane(in *JoinControlPlane, out *v1beta1.JoinControlPlane, s conversion.Scope) error { + if err := Convert_upstreamv1beta2_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + // WARNING: in.CertificateKey requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_JoinControlPlane_To_upstreamv1beta2_JoinControlPlane(in *v1beta1.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { + if err := Convert_v1beta1_APIEndpoint_To_upstreamv1beta2_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_JoinControlPlane_To_upstreamv1beta2_JoinControlPlane is an autogenerated conversion function. +func Convert_v1beta1_JoinControlPlane_To_upstreamv1beta2_JoinControlPlane(in *v1beta1.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { + return autoConvert_v1beta1_JoinControlPlane_To_upstreamv1beta2_JoinControlPlane(in, out, s) +} + +func autoConvert_upstreamv1beta2_LocalEtcd_To_v1beta1_LocalEtcd(in *LocalEtcd, out *v1beta1.LocalEtcd, s conversion.Scope) error { + if err := Convert_upstreamv1beta2_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + out.DataDir = in.DataDir + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) + out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) + return nil +} + +// Convert_upstreamv1beta2_LocalEtcd_To_v1beta1_LocalEtcd is an autogenerated conversion function. +func Convert_upstreamv1beta2_LocalEtcd_To_v1beta1_LocalEtcd(in *LocalEtcd, out *v1beta1.LocalEtcd, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_LocalEtcd_To_v1beta1_LocalEtcd(in, out, s) +} + +func autoConvert_v1beta1_LocalEtcd_To_upstreamv1beta2_LocalEtcd(in *v1beta1.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { + if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta2_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + out.DataDir = in.DataDir + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) + out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) + return nil +} + +// Convert_v1beta1_LocalEtcd_To_upstreamv1beta2_LocalEtcd is an autogenerated conversion function. +func Convert_v1beta1_LocalEtcd_To_upstreamv1beta2_LocalEtcd(in *v1beta1.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { + return autoConvert_v1beta1_LocalEtcd_To_upstreamv1beta2_LocalEtcd(in, out, s) +} + +func autoConvert_upstreamv1beta2_Networking_To_v1beta1_Networking(in *Networking, out *v1beta1.Networking, s conversion.Scope) error { + out.ServiceSubnet = in.ServiceSubnet + out.PodSubnet = in.PodSubnet + out.DNSDomain = in.DNSDomain + return nil +} + +// Convert_upstreamv1beta2_Networking_To_v1beta1_Networking is an autogenerated conversion function. +func Convert_upstreamv1beta2_Networking_To_v1beta1_Networking(in *Networking, out *v1beta1.Networking, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_Networking_To_v1beta1_Networking(in, out, s) +} + +func autoConvert_v1beta1_Networking_To_upstreamv1beta2_Networking(in *v1beta1.Networking, out *Networking, s conversion.Scope) error { + out.ServiceSubnet = in.ServiceSubnet + out.PodSubnet = in.PodSubnet + out.DNSDomain = in.DNSDomain + return nil +} + +// Convert_v1beta1_Networking_To_upstreamv1beta2_Networking is an autogenerated conversion function. +func Convert_v1beta1_Networking_To_upstreamv1beta2_Networking(in *v1beta1.Networking, out *Networking, s conversion.Scope) error { + return autoConvert_v1beta1_Networking_To_upstreamv1beta2_Networking(in, out, s) +} + +func autoConvert_upstreamv1beta2_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1beta1.NodeRegistrationOptions, s conversion.Scope) error { + out.Name = in.Name + out.CRISocket = in.CRISocket + out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) + out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) + out.IgnorePreflightErrors = *(*[]string)(unsafe.Pointer(&in.IgnorePreflightErrors)) + return nil +} + +// Convert_upstreamv1beta2_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions is an autogenerated conversion function. +func Convert_upstreamv1beta2_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1beta1.NodeRegistrationOptions, s conversion.Scope) error { + return autoConvert_upstreamv1beta2_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in, out, s) +} + +func autoConvert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions(in *v1beta1.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { + out.Name = in.Name + out.CRISocket = in.CRISocket + out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) + out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) + out.IgnorePreflightErrors = *(*[]string)(unsafe.Pointer(&in.IgnorePreflightErrors)) + return nil +} + +// Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions is an autogenerated conversion function. +func Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions(in *v1beta1.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { + return autoConvert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta2_NodeRegistrationOptions(in, out, s) +} diff --git a/bootstrap/kubeadm/types/v1beta2/zz_generated.deepcopy.go b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta2/zz_generated.deepcopy.go rename to bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go index 0702cd7abcbd..edc4c7b8cc59 100644 --- a/bootstrap/kubeadm/types/v1beta2/zz_generated.deepcopy.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go @@ -18,7 +18,7 @@ limitations under the License. // Code generated by controller-gen. DO NOT EDIT. -package v1beta2 +package upstreamv1beta2 import ( corev1 "k8s.io/api/core/v1" diff --git a/bootstrap/kubeadm/types/v1beta3/bootstraptokenstring.go b/bootstrap/kubeadm/types/upstreamv1beta3/bootstraptokenstring.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta3/bootstraptokenstring.go rename to bootstrap/kubeadm/types/upstreamv1beta3/bootstraptokenstring.go index fb3f7b037e2f..d59295bab921 100644 --- a/bootstrap/kubeadm/types/v1beta3/bootstraptokenstring.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/bootstraptokenstring.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta3 +package upstreamv1beta3 import ( "fmt" diff --git a/bootstrap/kubeadm/types/v1beta3/bootstraptokenstring_test.go b/bootstrap/kubeadm/types/upstreamv1beta3/bootstraptokenstring_test.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta3/bootstraptokenstring_test.go rename to bootstrap/kubeadm/types/upstreamv1beta3/bootstraptokenstring_test.go index 9426c1922fde..b19e652b0671 100644 --- a/bootstrap/kubeadm/types/v1beta3/bootstraptokenstring_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/bootstraptokenstring_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta3 +package upstreamv1beta3 import ( "encoding/json" diff --git a/bootstrap/kubeadm/types/v1beta3/conversion.go b/bootstrap/kubeadm/types/upstreamv1beta3/conversion.go similarity index 60% rename from bootstrap/kubeadm/types/v1beta3/conversion.go rename to bootstrap/kubeadm/types/upstreamv1beta3/conversion.go index 22f872bdd582..1e50a529c69a 100644 --- a/bootstrap/kubeadm/types/v1beta3/conversion.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/conversion.go @@ -14,66 +14,66 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta3 +package upstreamv1beta3 import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/conversion" ) // ConvertTo converts this ClusterConfiguration to the Hub version (v1alpha4). func (src *ClusterConfiguration) ConvertTo(dstRaw conversion.Hub) error { dst := dstRaw.(*bootstrapv1.ClusterConfiguration) - return Convert_v1beta3_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(src, dst, nil) + return Convert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguration(src, dst, nil) } // ConvertFrom converts from the ClusterConfiguration Hub version (v1alpha4) to this version. func (dst *ClusterConfiguration) ConvertFrom(srcRaw conversion.Hub) error { src := srcRaw.(*bootstrapv1.ClusterConfiguration) - return Convert_v1alpha4_ClusterConfiguration_To_v1beta3_ClusterConfiguration(src, dst, nil) + return Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration(src, dst, nil) } // ConvertTo converts this InitConfiguration to the Hub version (v1alpha4). func (src *InitConfiguration) ConvertTo(dstRaw conversion.Hub) error { dst := dstRaw.(*bootstrapv1.InitConfiguration) - return Convert_v1beta3_InitConfiguration_To_v1alpha4_InitConfiguration(src, dst, nil) + return Convert_upstreamv1beta3_InitConfiguration_To_v1beta1_InitConfiguration(src, dst, nil) } // ConvertFrom converts from the InitConfiguration Hub version (v1alpha4) to this version. func (dst *InitConfiguration) ConvertFrom(srcRaw conversion.Hub) error { src := srcRaw.(*bootstrapv1.InitConfiguration) - return Convert_v1alpha4_InitConfiguration_To_v1beta3_InitConfiguration(src, dst, nil) + return Convert_v1beta1_InitConfiguration_To_upstreamv1beta3_InitConfiguration(src, dst, nil) } // ConvertTo converts this JoinConfiguration to the Hub version (v1alpha4). func (src *JoinConfiguration) ConvertTo(dstRaw conversion.Hub) error { dst := dstRaw.(*bootstrapv1.JoinConfiguration) - return Convert_v1beta3_JoinConfiguration_To_v1alpha4_JoinConfiguration(src, dst, nil) + return Convert_upstreamv1beta3_JoinConfiguration_To_v1beta1_JoinConfiguration(src, dst, nil) } // ConvertFrom converts from the JoinConfiguration Hub version (v1alpha4) to this version. func (dst *JoinConfiguration) ConvertFrom(srcRaw conversion.Hub) error { src := srcRaw.(*bootstrapv1.JoinConfiguration) - return Convert_v1alpha4_JoinConfiguration_To_v1beta3_JoinConfiguration(src, dst, nil) + return Convert_v1beta1_JoinConfiguration_To_upstreamv1beta3_JoinConfiguration(src, dst, nil) } -func Convert_v1beta3_InitConfiguration_To_v1alpha4_InitConfiguration(in *InitConfiguration, out *bootstrapv1.InitConfiguration, s apimachineryconversion.Scope) error { +func Convert_upstreamv1beta3_InitConfiguration_To_v1beta1_InitConfiguration(in *InitConfiguration, out *bootstrapv1.InitConfiguration, s apimachineryconversion.Scope) error { // InitConfiguration.CertificateKey and SkipPhases exists in v1beta3 types but not in bootstrapv1.InitConfiguration (Cluster API does not uses automatic copy certs or does not support SkipPhases for now)). Ignoring when converting. - return autoConvert_v1beta3_InitConfiguration_To_v1alpha4_InitConfiguration(in, out, s) + return autoConvert_upstreamv1beta3_InitConfiguration_To_v1beta1_InitConfiguration(in, out, s) } -func Convert_v1beta3_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *JoinConfiguration, out *bootstrapv1.JoinConfiguration, s apimachineryconversion.Scope) error { +func Convert_upstreamv1beta3_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *bootstrapv1.JoinConfiguration, s apimachineryconversion.Scope) error { // JoinConfiguration.SkipPhases exists in v1beta3 types but not in bootstrapv1.JoinConfiguration (Cluster API does not support SkipPhases for now). Ignoring when converting. - return autoConvert_v1beta3_JoinConfiguration_To_v1alpha4_JoinConfiguration(in, out, s) + return autoConvert_upstreamv1beta3_JoinConfiguration_To_v1beta1_JoinConfiguration(in, out, s) } -func Convert_v1beta3_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in *NodeRegistrationOptions, out *bootstrapv1.NodeRegistrationOptions, s apimachineryconversion.Scope) error { +func Convert_upstreamv1beta3_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in *NodeRegistrationOptions, out *bootstrapv1.NodeRegistrationOptions, s apimachineryconversion.Scope) error { // NodeRegistrationOptions.IgnorePreflightErrors exists in v1beta3 types but not in bootstrapv1.NodeRegistrationOptions (Cluster API does not support it for now). Ignoring when converting. - return autoConvert_v1beta3_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in, out, s) + return autoConvert_upstreamv1beta3_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in, out, s) } -func Convert_v1beta3_JoinControlPlane_To_v1alpha4_JoinControlPlane(in *JoinControlPlane, out *bootstrapv1.JoinControlPlane, s apimachineryconversion.Scope) error { +func Convert_upstreamv1beta3_JoinControlPlane_To_v1beta1_JoinControlPlane(in *JoinControlPlane, out *bootstrapv1.JoinControlPlane, s apimachineryconversion.Scope) error { // JoinControlPlane.CertificateKey exists in v1beta3 types but not in bootstrapv1.JoinControlPlane (Cluster API does not uses automatic copy certs). Ignoring when converting. - return autoConvert_v1beta3_JoinControlPlane_To_v1alpha4_JoinControlPlane(in, out, s) + return autoConvert_upstreamv1beta3_JoinControlPlane_To_v1beta1_JoinControlPlane(in, out, s) } diff --git a/bootstrap/kubeadm/types/v1beta3/conversion_test.go b/bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go similarity index 93% rename from bootstrap/kubeadm/types/v1beta3/conversion_test.go rename to bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go index 9b7c27a4bdbe..10ae782ac116 100644 --- a/bootstrap/kubeadm/types/v1beta3/conversion_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta3 +package upstreamv1beta3 import ( "testing" @@ -25,7 +25,7 @@ import ( runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) @@ -33,11 +33,11 @@ func TestFuzzyConversion(t *testing.T) { g := NewWithT(t) scheme := runtime.NewScheme() g.Expect(AddToScheme(scheme)).To(Succeed()) - g.Expect(v1alpha4.AddToScheme(scheme)).To(Succeed()) + g.Expect(v1beta1.AddToScheme(scheme)).To(Succeed()) t.Run("for ClusterConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ Scheme: scheme, - Hub: &v1alpha4.ClusterConfiguration{}, + Hub: &v1beta1.ClusterConfiguration{}, Spoke: &ClusterConfiguration{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, @@ -45,7 +45,7 @@ func TestFuzzyConversion(t *testing.T) { })) t.Run("for InitConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ Scheme: scheme, - Hub: &v1alpha4.InitConfiguration{}, + Hub: &v1beta1.InitConfiguration{}, Spoke: &InitConfiguration{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, @@ -53,7 +53,7 @@ func TestFuzzyConversion(t *testing.T) { })) t.Run("for JoinConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ Scheme: scheme, - Hub: &v1alpha4.JoinConfiguration{}, + Hub: &v1beta1.JoinConfiguration{}, Spoke: &JoinConfiguration{}, // NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test. SkipSpokeAnnotationCleanup: true, diff --git a/bootstrap/kubeadm/types/v1beta3/doc.go b/bootstrap/kubeadm/types/upstreamv1beta3/doc.go similarity index 77% rename from bootstrap/kubeadm/types/v1beta3/doc.go rename to bootstrap/kubeadm/types/upstreamv1beta3/doc.go index 12acfbd1dead..2eca77f593fd 100644 --- a/bootstrap/kubeadm/types/v1beta3/doc.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/doc.go @@ -14,11 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1beta3 contains a mirror of kubeadm API v1beta3 API, required because it is not possible to import k/K. +// Package upstreamv1beta3 contains a mirror of kubeadm API v1beta3 API, required because it is not possible to import k/K. // // IMPORTANT: Do not change these files! // IMPORTANT: only for KubeadmConfig serialization/deserialization, and should not be used for other purposes. // -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 // +k8s:deepcopy-gen=package -package v1beta3 // import "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta3" +package upstreamv1beta3 // import "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta3" diff --git a/bootstrap/kubeadm/types/v1beta3/groupversion_info.go b/bootstrap/kubeadm/types/upstreamv1beta3/groupversion_info.go similarity index 97% rename from bootstrap/kubeadm/types/v1beta3/groupversion_info.go rename to bootstrap/kubeadm/types/upstreamv1beta3/groupversion_info.go index 0dde34b559eb..9b684760d7bd 100644 --- a/bootstrap/kubeadm/types/v1beta3/groupversion_info.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/groupversion_info.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta3 +package upstreamv1beta3 import ( "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/bootstrap/kubeadm/types/v1beta3/types.go b/bootstrap/kubeadm/types/upstreamv1beta3/types.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta3/types.go rename to bootstrap/kubeadm/types/upstreamv1beta3/types.go index bfb344122912..151ea7830758 100644 --- a/bootstrap/kubeadm/types/v1beta3/types.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1beta3 +package upstreamv1beta3 import ( corev1 "k8s.io/api/core/v1" diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go new file mode 100644 index 000000000000..36337d945940 --- /dev/null +++ b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go @@ -0,0 +1,799 @@ +// +build !ignore_autogenerated_kubeadm_types + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package upstreamv1beta3 + +import ( + unsafe "unsafe" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + v1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" +) + +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((*APIEndpoint)(nil), (*v1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_APIEndpoint_To_v1beta1_APIEndpoint(a.(*APIEndpoint), b.(*v1beta1.APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIEndpoint_To_upstreamv1beta3_APIEndpoint(a.(*v1beta1.APIEndpoint), b.(*APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*APIServer)(nil), (*v1beta1.APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_APIServer_To_v1beta1_APIServer(a.(*APIServer), b.(*v1beta1.APIServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.APIServer)(nil), (*APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIServer_To_upstreamv1beta3_APIServer(a.(*v1beta1.APIServer), b.(*APIServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapToken)(nil), (*v1beta1.BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_BootstrapToken_To_v1beta1_BootstrapToken(a.(*BootstrapToken), b.(*v1beta1.BootstrapToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapToken)(nil), (*BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapToken_To_upstreamv1beta3_BootstrapToken(a.(*v1beta1.BootstrapToken), b.(*BootstrapToken), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapTokenDiscovery)(nil), (*v1beta1.BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(a.(*BootstrapTokenDiscovery), b.(*v1beta1.BootstrapTokenDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapTokenDiscovery)(nil), (*BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta3_BootstrapTokenDiscovery(a.(*v1beta1.BootstrapTokenDiscovery), b.(*BootstrapTokenDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BootstrapTokenString)(nil), (*v1beta1.BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_BootstrapTokenString_To_v1beta1_BootstrapTokenString(a.(*BootstrapTokenString), b.(*v1beta1.BootstrapTokenString), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.BootstrapTokenString)(nil), (*BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta3_BootstrapTokenString(a.(*v1beta1.BootstrapTokenString), b.(*BootstrapTokenString), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1beta1.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1beta1.ClusterConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration(a.(*v1beta1.ClusterConfiguration), b.(*ClusterConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ControlPlaneComponent)(nil), (*v1beta1.ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(a.(*ControlPlaneComponent), b.(*v1beta1.ControlPlaneComponent), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ControlPlaneComponent)(nil), (*ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta3_ControlPlaneComponent(a.(*v1beta1.ControlPlaneComponent), b.(*ControlPlaneComponent), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DNS)(nil), (*v1beta1.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_DNS_To_v1beta1_DNS(a.(*DNS), b.(*v1beta1.DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DNS_To_upstreamv1beta3_DNS(a.(*v1beta1.DNS), b.(*DNS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Discovery)(nil), (*v1beta1.Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_Discovery_To_v1beta1_Discovery(a.(*Discovery), b.(*v1beta1.Discovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Discovery)(nil), (*Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Discovery_To_upstreamv1beta3_Discovery(a.(*v1beta1.Discovery), b.(*Discovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Etcd)(nil), (*v1beta1.Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_Etcd_To_v1beta1_Etcd(a.(*Etcd), b.(*v1beta1.Etcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Etcd)(nil), (*Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Etcd_To_upstreamv1beta3_Etcd(a.(*v1beta1.Etcd), b.(*Etcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExternalEtcd)(nil), (*v1beta1.ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_ExternalEtcd_To_v1beta1_ExternalEtcd(a.(*ExternalEtcd), b.(*v1beta1.ExternalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ExternalEtcd)(nil), (*ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExternalEtcd_To_upstreamv1beta3_ExternalEtcd(a.(*v1beta1.ExternalEtcd), b.(*ExternalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*FileDiscovery)(nil), (*v1beta1.FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_FileDiscovery_To_v1beta1_FileDiscovery(a.(*FileDiscovery), b.(*v1beta1.FileDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.FileDiscovery)(nil), (*FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_FileDiscovery_To_upstreamv1beta3_FileDiscovery(a.(*v1beta1.FileDiscovery), b.(*FileDiscovery), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*HostPathMount)(nil), (*v1beta1.HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_HostPathMount_To_v1beta1_HostPathMount(a.(*HostPathMount), b.(*v1beta1.HostPathMount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.HostPathMount)(nil), (*HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HostPathMount_To_upstreamv1beta3_HostPathMount(a.(*v1beta1.HostPathMount), b.(*HostPathMount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ImageMeta)(nil), (*v1beta1.ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta(a.(*ImageMeta), b.(*v1beta1.ImageMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ImageMeta)(nil), (*ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta(a.(*v1beta1.ImageMeta), b.(*ImageMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.InitConfiguration)(nil), (*InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_InitConfiguration_To_upstreamv1beta3_InitConfiguration(a.(*v1beta1.InitConfiguration), b.(*InitConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.JoinConfiguration)(nil), (*JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JoinConfiguration_To_upstreamv1beta3_JoinConfiguration(a.(*v1beta1.JoinConfiguration), b.(*JoinConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.JoinControlPlane)(nil), (*JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JoinControlPlane_To_upstreamv1beta3_JoinControlPlane(a.(*v1beta1.JoinControlPlane), b.(*JoinControlPlane), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*LocalEtcd)(nil), (*v1beta1.LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_LocalEtcd_To_v1beta1_LocalEtcd(a.(*LocalEtcd), b.(*v1beta1.LocalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.LocalEtcd)(nil), (*LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_LocalEtcd_To_upstreamv1beta3_LocalEtcd(a.(*v1beta1.LocalEtcd), b.(*LocalEtcd), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Networking)(nil), (*v1beta1.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_Networking_To_v1beta1_Networking(a.(*Networking), b.(*v1beta1.Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Networking_To_upstreamv1beta3_Networking(a.(*v1beta1.Networking), b.(*Networking), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.NodeRegistrationOptions)(nil), (*NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions(a.(*v1beta1.NodeRegistrationOptions), b.(*NodeRegistrationOptions), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*InitConfiguration)(nil), (*v1beta1.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_InitConfiguration_To_v1beta1_InitConfiguration(a.(*InitConfiguration), b.(*v1beta1.InitConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*JoinConfiguration)(nil), (*v1beta1.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_JoinConfiguration_To_v1beta1_JoinConfiguration(a.(*JoinConfiguration), b.(*v1beta1.JoinConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*JoinControlPlane)(nil), (*v1beta1.JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_JoinControlPlane_To_v1beta1_JoinControlPlane(a.(*JoinControlPlane), b.(*v1beta1.JoinControlPlane), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*NodeRegistrationOptions)(nil), (*v1beta1.NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_upstreamv1beta3_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(a.(*NodeRegistrationOptions), b.(*v1beta1.NodeRegistrationOptions), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_upstreamv1beta3_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + out.AdvertiseAddress = in.AdvertiseAddress + out.BindPort = in.BindPort + return nil +} + +// Convert_upstreamv1beta3_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. +func Convert_upstreamv1beta3_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) +} + +func autoConvert_v1beta1_APIEndpoint_To_upstreamv1beta3_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + out.AdvertiseAddress = in.AdvertiseAddress + out.BindPort = in.BindPort + return nil +} + +// Convert_v1beta1_APIEndpoint_To_upstreamv1beta3_APIEndpoint is an autogenerated conversion function. +func Convert_v1beta1_APIEndpoint_To_upstreamv1beta3_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + return autoConvert_v1beta1_APIEndpoint_To_upstreamv1beta3_APIEndpoint(in, out, s) +} + +func autoConvert_upstreamv1beta3_APIServer_To_v1beta1_APIServer(in *APIServer, out *v1beta1.APIServer, s conversion.Scope) error { + if err := Convert_upstreamv1beta3_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { + return err + } + out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) + out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) + return nil +} + +// Convert_upstreamv1beta3_APIServer_To_v1beta1_APIServer is an autogenerated conversion function. +func Convert_upstreamv1beta3_APIServer_To_v1beta1_APIServer(in *APIServer, out *v1beta1.APIServer, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_APIServer_To_v1beta1_APIServer(in, out, s) +} + +func autoConvert_v1beta1_APIServer_To_upstreamv1beta3_APIServer(in *v1beta1.APIServer, out *APIServer, s conversion.Scope) error { + if err := Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta3_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { + return err + } + out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) + out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) + return nil +} + +// Convert_v1beta1_APIServer_To_upstreamv1beta3_APIServer is an autogenerated conversion function. +func Convert_v1beta1_APIServer_To_upstreamv1beta3_APIServer(in *v1beta1.APIServer, out *APIServer, s conversion.Scope) error { + return autoConvert_v1beta1_APIServer_To_upstreamv1beta3_APIServer(in, out, s) +} + +func autoConvert_upstreamv1beta3_BootstrapToken_To_v1beta1_BootstrapToken(in *BootstrapToken, out *v1beta1.BootstrapToken, s conversion.Scope) error { + out.Token = (*v1beta1.BootstrapTokenString)(unsafe.Pointer(in.Token)) + out.Description = in.Description + out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) + out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) + out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +// Convert_upstreamv1beta3_BootstrapToken_To_v1beta1_BootstrapToken is an autogenerated conversion function. +func Convert_upstreamv1beta3_BootstrapToken_To_v1beta1_BootstrapToken(in *BootstrapToken, out *v1beta1.BootstrapToken, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_BootstrapToken_To_v1beta1_BootstrapToken(in, out, s) +} + +func autoConvert_v1beta1_BootstrapToken_To_upstreamv1beta3_BootstrapToken(in *v1beta1.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { + out.Token = (*BootstrapTokenString)(unsafe.Pointer(in.Token)) + out.Description = in.Description + out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) + out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) + out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +// Convert_v1beta1_BootstrapToken_To_upstreamv1beta3_BootstrapToken is an autogenerated conversion function. +func Convert_v1beta1_BootstrapToken_To_upstreamv1beta3_BootstrapToken(in *v1beta1.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapToken_To_upstreamv1beta3_BootstrapToken(in, out, s) +} + +func autoConvert_upstreamv1beta3_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1beta1.BootstrapTokenDiscovery, s conversion.Scope) error { + out.Token = in.Token + out.APIServerEndpoint = in.APIServerEndpoint + out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) + out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification + return nil +} + +// Convert_upstreamv1beta3_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery is an autogenerated conversion function. +func Convert_upstreamv1beta3_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1beta1.BootstrapTokenDiscovery, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in, out, s) +} + +func autoConvert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta3_BootstrapTokenDiscovery(in *v1beta1.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { + out.Token = in.Token + out.APIServerEndpoint = in.APIServerEndpoint + out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) + out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification + return nil +} + +// Convert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta3_BootstrapTokenDiscovery is an autogenerated conversion function. +func Convert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta3_BootstrapTokenDiscovery(in *v1beta1.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapTokenDiscovery_To_upstreamv1beta3_BootstrapTokenDiscovery(in, out, s) +} + +func autoConvert_upstreamv1beta3_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in *BootstrapTokenString, out *v1beta1.BootstrapTokenString, s conversion.Scope) error { + out.ID = in.ID + out.Secret = in.Secret + return nil +} + +// Convert_upstreamv1beta3_BootstrapTokenString_To_v1beta1_BootstrapTokenString is an autogenerated conversion function. +func Convert_upstreamv1beta3_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in *BootstrapTokenString, out *v1beta1.BootstrapTokenString, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in, out, s) +} + +func autoConvert_v1beta1_BootstrapTokenString_To_upstreamv1beta3_BootstrapTokenString(in *v1beta1.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { + out.ID = in.ID + out.Secret = in.Secret + return nil +} + +// Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta3_BootstrapTokenString is an autogenerated conversion function. +func Convert_v1beta1_BootstrapTokenString_To_upstreamv1beta3_BootstrapTokenString(in *v1beta1.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { + return autoConvert_v1beta1_BootstrapTokenString_To_upstreamv1beta3_BootstrapTokenString(in, out, s) +} + +func autoConvert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { + if err := Convert_upstreamv1beta3_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } + if err := Convert_upstreamv1beta3_Networking_To_v1beta1_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + out.KubernetesVersion = in.KubernetesVersion + out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if err := Convert_upstreamv1beta3_APIServer_To_v1beta1_APIServer(&in.APIServer, &out.APIServer, s); err != nil { + return err + } + if err := Convert_upstreamv1beta3_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { + return err + } + if err := Convert_upstreamv1beta3_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { + return err + } + if err := Convert_upstreamv1beta3_DNS_To_v1beta1_DNS(&in.DNS, &out.DNS, s); err != nil { + return err + } + out.CertificatesDir = in.CertificatesDir + out.ImageRepository = in.ImageRepository + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName + return nil +} + +// Convert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguration is an autogenerated conversion function. +func Convert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *ClusterConfiguration, out *v1beta1.ClusterConfiguration, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in, out, s) +} + +func autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { + if err := Convert_v1beta1_Etcd_To_upstreamv1beta3_Etcd(&in.Etcd, &out.Etcd, s); err != nil { + return err + } + if err := Convert_v1beta1_Networking_To_upstreamv1beta3_Networking(&in.Networking, &out.Networking, s); err != nil { + return err + } + out.KubernetesVersion = in.KubernetesVersion + out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if err := Convert_v1beta1_APIServer_To_upstreamv1beta3_APIServer(&in.APIServer, &out.APIServer, s); err != nil { + return err + } + if err := Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta3_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { + return err + } + if err := Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta3_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { + return err + } + if err := Convert_v1beta1_DNS_To_upstreamv1beta3_DNS(&in.DNS, &out.DNS, s); err != nil { + return err + } + out.CertificatesDir = in.CertificatesDir + out.ImageRepository = in.ImageRepository + out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) + out.ClusterName = in.ClusterName + return nil +} + +// Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration is an autogenerated conversion function. +func Convert_v1beta1_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration(in *v1beta1.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration(in, out, s) +} + +func autoConvert_upstreamv1beta3_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in *ControlPlaneComponent, out *v1beta1.ControlPlaneComponent, s conversion.Scope) error { + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ExtraVolumes = *(*[]v1beta1.HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) + return nil +} + +// Convert_upstreamv1beta3_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent is an autogenerated conversion function. +func Convert_upstreamv1beta3_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in *ControlPlaneComponent, out *v1beta1.ControlPlaneComponent, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in, out, s) +} + +func autoConvert_v1beta1_ControlPlaneComponent_To_upstreamv1beta3_ControlPlaneComponent(in *v1beta1.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ExtraVolumes = *(*[]HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) + return nil +} + +// Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta3_ControlPlaneComponent is an autogenerated conversion function. +func Convert_v1beta1_ControlPlaneComponent_To_upstreamv1beta3_ControlPlaneComponent(in *v1beta1.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { + return autoConvert_v1beta1_ControlPlaneComponent_To_upstreamv1beta3_ControlPlaneComponent(in, out, s) +} + +func autoConvert_upstreamv1beta3_DNS_To_v1beta1_DNS(in *DNS, out *v1beta1.DNS, s conversion.Scope) error { + if err := Convert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + +// Convert_upstreamv1beta3_DNS_To_v1beta1_DNS is an autogenerated conversion function. +func Convert_upstreamv1beta3_DNS_To_v1beta1_DNS(in *DNS, out *v1beta1.DNS, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_DNS_To_v1beta1_DNS(in, out, s) +} + +func autoConvert_v1beta1_DNS_To_upstreamv1beta3_DNS(in *v1beta1.DNS, out *DNS, s conversion.Scope) error { + if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DNS_To_upstreamv1beta3_DNS is an autogenerated conversion function. +func Convert_v1beta1_DNS_To_upstreamv1beta3_DNS(in *v1beta1.DNS, out *DNS, s conversion.Scope) error { + return autoConvert_v1beta1_DNS_To_upstreamv1beta3_DNS(in, out, s) +} + +func autoConvert_upstreamv1beta3_Discovery_To_v1beta1_Discovery(in *Discovery, out *v1beta1.Discovery, s conversion.Scope) error { + out.BootstrapToken = (*v1beta1.BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) + out.File = (*v1beta1.FileDiscovery)(unsafe.Pointer(in.File)) + out.TLSBootstrapToken = in.TLSBootstrapToken + out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) + return nil +} + +// Convert_upstreamv1beta3_Discovery_To_v1beta1_Discovery is an autogenerated conversion function. +func Convert_upstreamv1beta3_Discovery_To_v1beta1_Discovery(in *Discovery, out *v1beta1.Discovery, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_Discovery_To_v1beta1_Discovery(in, out, s) +} + +func autoConvert_v1beta1_Discovery_To_upstreamv1beta3_Discovery(in *v1beta1.Discovery, out *Discovery, s conversion.Scope) error { + out.BootstrapToken = (*BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) + out.File = (*FileDiscovery)(unsafe.Pointer(in.File)) + out.TLSBootstrapToken = in.TLSBootstrapToken + out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) + return nil +} + +// Convert_v1beta1_Discovery_To_upstreamv1beta3_Discovery is an autogenerated conversion function. +func Convert_v1beta1_Discovery_To_upstreamv1beta3_Discovery(in *v1beta1.Discovery, out *Discovery, s conversion.Scope) error { + return autoConvert_v1beta1_Discovery_To_upstreamv1beta3_Discovery(in, out, s) +} + +func autoConvert_upstreamv1beta3_Etcd_To_v1beta1_Etcd(in *Etcd, out *v1beta1.Etcd, s conversion.Scope) error { + out.Local = (*v1beta1.LocalEtcd)(unsafe.Pointer(in.Local)) + out.External = (*v1beta1.ExternalEtcd)(unsafe.Pointer(in.External)) + return nil +} + +// Convert_upstreamv1beta3_Etcd_To_v1beta1_Etcd is an autogenerated conversion function. +func Convert_upstreamv1beta3_Etcd_To_v1beta1_Etcd(in *Etcd, out *v1beta1.Etcd, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_Etcd_To_v1beta1_Etcd(in, out, s) +} + +func autoConvert_v1beta1_Etcd_To_upstreamv1beta3_Etcd(in *v1beta1.Etcd, out *Etcd, s conversion.Scope) error { + out.Local = (*LocalEtcd)(unsafe.Pointer(in.Local)) + out.External = (*ExternalEtcd)(unsafe.Pointer(in.External)) + return nil +} + +// Convert_v1beta1_Etcd_To_upstreamv1beta3_Etcd is an autogenerated conversion function. +func Convert_v1beta1_Etcd_To_upstreamv1beta3_Etcd(in *v1beta1.Etcd, out *Etcd, s conversion.Scope) error { + return autoConvert_v1beta1_Etcd_To_upstreamv1beta3_Etcd(in, out, s) +} + +func autoConvert_upstreamv1beta3_ExternalEtcd_To_v1beta1_ExternalEtcd(in *ExternalEtcd, out *v1beta1.ExternalEtcd, s conversion.Scope) error { + out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) + out.CAFile = in.CAFile + out.CertFile = in.CertFile + out.KeyFile = in.KeyFile + return nil +} + +// Convert_upstreamv1beta3_ExternalEtcd_To_v1beta1_ExternalEtcd is an autogenerated conversion function. +func Convert_upstreamv1beta3_ExternalEtcd_To_v1beta1_ExternalEtcd(in *ExternalEtcd, out *v1beta1.ExternalEtcd, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_ExternalEtcd_To_v1beta1_ExternalEtcd(in, out, s) +} + +func autoConvert_v1beta1_ExternalEtcd_To_upstreamv1beta3_ExternalEtcd(in *v1beta1.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { + out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) + out.CAFile = in.CAFile + out.CertFile = in.CertFile + out.KeyFile = in.KeyFile + return nil +} + +// Convert_v1beta1_ExternalEtcd_To_upstreamv1beta3_ExternalEtcd is an autogenerated conversion function. +func Convert_v1beta1_ExternalEtcd_To_upstreamv1beta3_ExternalEtcd(in *v1beta1.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { + return autoConvert_v1beta1_ExternalEtcd_To_upstreamv1beta3_ExternalEtcd(in, out, s) +} + +func autoConvert_upstreamv1beta3_FileDiscovery_To_v1beta1_FileDiscovery(in *FileDiscovery, out *v1beta1.FileDiscovery, s conversion.Scope) error { + out.KubeConfigPath = in.KubeConfigPath + return nil +} + +// Convert_upstreamv1beta3_FileDiscovery_To_v1beta1_FileDiscovery is an autogenerated conversion function. +func Convert_upstreamv1beta3_FileDiscovery_To_v1beta1_FileDiscovery(in *FileDiscovery, out *v1beta1.FileDiscovery, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_FileDiscovery_To_v1beta1_FileDiscovery(in, out, s) +} + +func autoConvert_v1beta1_FileDiscovery_To_upstreamv1beta3_FileDiscovery(in *v1beta1.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { + out.KubeConfigPath = in.KubeConfigPath + return nil +} + +// Convert_v1beta1_FileDiscovery_To_upstreamv1beta3_FileDiscovery is an autogenerated conversion function. +func Convert_v1beta1_FileDiscovery_To_upstreamv1beta3_FileDiscovery(in *v1beta1.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { + return autoConvert_v1beta1_FileDiscovery_To_upstreamv1beta3_FileDiscovery(in, out, s) +} + +func autoConvert_upstreamv1beta3_HostPathMount_To_v1beta1_HostPathMount(in *HostPathMount, out *v1beta1.HostPathMount, s conversion.Scope) error { + out.Name = in.Name + out.HostPath = in.HostPath + out.MountPath = in.MountPath + out.ReadOnly = in.ReadOnly + out.PathType = corev1.HostPathType(in.PathType) + return nil +} + +// Convert_upstreamv1beta3_HostPathMount_To_v1beta1_HostPathMount is an autogenerated conversion function. +func Convert_upstreamv1beta3_HostPathMount_To_v1beta1_HostPathMount(in *HostPathMount, out *v1beta1.HostPathMount, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_HostPathMount_To_v1beta1_HostPathMount(in, out, s) +} + +func autoConvert_v1beta1_HostPathMount_To_upstreamv1beta3_HostPathMount(in *v1beta1.HostPathMount, out *HostPathMount, s conversion.Scope) error { + out.Name = in.Name + out.HostPath = in.HostPath + out.MountPath = in.MountPath + out.ReadOnly = in.ReadOnly + out.PathType = corev1.HostPathType(in.PathType) + return nil +} + +// Convert_v1beta1_HostPathMount_To_upstreamv1beta3_HostPathMount is an autogenerated conversion function. +func Convert_v1beta1_HostPathMount_To_upstreamv1beta3_HostPathMount(in *v1beta1.HostPathMount, out *HostPathMount, s conversion.Scope) error { + return autoConvert_v1beta1_HostPathMount_To_upstreamv1beta3_HostPathMount(in, out, s) +} + +func autoConvert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta(in *ImageMeta, out *v1beta1.ImageMeta, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta is an autogenerated conversion function. +func Convert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta(in *ImageMeta, out *v1beta1.ImageMeta, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta(in, out, s) +} + +func autoConvert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta(in *v1beta1.ImageMeta, out *ImageMeta, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta is an autogenerated conversion function. +func Convert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta(in *v1beta1.ImageMeta, out *ImageMeta, s conversion.Scope) error { + return autoConvert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta(in, out, s) +} + +func autoConvert_upstreamv1beta3_InitConfiguration_To_v1beta1_InitConfiguration(in *InitConfiguration, out *v1beta1.InitConfiguration, s conversion.Scope) error { + out.BootstrapTokens = *(*[]v1beta1.BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) + if err := Convert_upstreamv1beta3_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + if err := Convert_upstreamv1beta3_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + // WARNING: in.CertificateKey requires manual conversion: does not exist in peer-type + // WARNING: in.SkipPhases requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_InitConfiguration_To_upstreamv1beta3_InitConfiguration(in *v1beta1.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { + out.BootstrapTokens = *(*[]BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + if err := Convert_v1beta1_APIEndpoint_To_upstreamv1beta3_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_InitConfiguration_To_upstreamv1beta3_InitConfiguration is an autogenerated conversion function. +func Convert_v1beta1_InitConfiguration_To_upstreamv1beta3_InitConfiguration(in *v1beta1.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_InitConfiguration_To_upstreamv1beta3_InitConfiguration(in, out, s) +} + +func autoConvert_upstreamv1beta3_JoinConfiguration_To_v1beta1_JoinConfiguration(in *JoinConfiguration, out *v1beta1.JoinConfiguration, s conversion.Scope) error { + if err := Convert_upstreamv1beta3_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + out.CACertPath = in.CACertPath + if err := Convert_upstreamv1beta3_Discovery_To_v1beta1_Discovery(&in.Discovery, &out.Discovery, s); err != nil { + return err + } + if in.ControlPlane != nil { + in, out := &in.ControlPlane, &out.ControlPlane + *out = new(v1beta1.JoinControlPlane) + if err := Convert_upstreamv1beta3_JoinControlPlane_To_v1beta1_JoinControlPlane(*in, *out, s); err != nil { + return err + } + } else { + out.ControlPlane = nil + } + // WARNING: in.SkipPhases requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta3_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { + if err := Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { + return err + } + out.CACertPath = in.CACertPath + if err := Convert_v1beta1_Discovery_To_upstreamv1beta3_Discovery(&in.Discovery, &out.Discovery, s); err != nil { + return err + } + if in.ControlPlane != nil { + in, out := &in.ControlPlane, &out.ControlPlane + *out = new(JoinControlPlane) + if err := Convert_v1beta1_JoinControlPlane_To_upstreamv1beta3_JoinControlPlane(*in, *out, s); err != nil { + return err + } + } else { + out.ControlPlane = nil + } + return nil +} + +// Convert_v1beta1_JoinConfiguration_To_upstreamv1beta3_JoinConfiguration is an autogenerated conversion function. +func Convert_v1beta1_JoinConfiguration_To_upstreamv1beta3_JoinConfiguration(in *v1beta1.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { + return autoConvert_v1beta1_JoinConfiguration_To_upstreamv1beta3_JoinConfiguration(in, out, s) +} + +func autoConvert_upstreamv1beta3_JoinControlPlane_To_v1beta1_JoinControlPlane(in *JoinControlPlane, out *v1beta1.JoinControlPlane, s conversion.Scope) error { + if err := Convert_upstreamv1beta3_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + // WARNING: in.CertificateKey requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_JoinControlPlane_To_upstreamv1beta3_JoinControlPlane(in *v1beta1.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { + if err := Convert_v1beta1_APIEndpoint_To_upstreamv1beta3_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_JoinControlPlane_To_upstreamv1beta3_JoinControlPlane is an autogenerated conversion function. +func Convert_v1beta1_JoinControlPlane_To_upstreamv1beta3_JoinControlPlane(in *v1beta1.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { + return autoConvert_v1beta1_JoinControlPlane_To_upstreamv1beta3_JoinControlPlane(in, out, s) +} + +func autoConvert_upstreamv1beta3_LocalEtcd_To_v1beta1_LocalEtcd(in *LocalEtcd, out *v1beta1.LocalEtcd, s conversion.Scope) error { + if err := Convert_upstreamv1beta3_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + out.DataDir = in.DataDir + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) + out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) + return nil +} + +// Convert_upstreamv1beta3_LocalEtcd_To_v1beta1_LocalEtcd is an autogenerated conversion function. +func Convert_upstreamv1beta3_LocalEtcd_To_v1beta1_LocalEtcd(in *LocalEtcd, out *v1beta1.LocalEtcd, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_LocalEtcd_To_v1beta1_LocalEtcd(in, out, s) +} + +func autoConvert_v1beta1_LocalEtcd_To_upstreamv1beta3_LocalEtcd(in *v1beta1.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { + if err := Convert_v1beta1_ImageMeta_To_upstreamv1beta3_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + out.DataDir = in.DataDir + out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) + out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) + out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) + return nil +} + +// Convert_v1beta1_LocalEtcd_To_upstreamv1beta3_LocalEtcd is an autogenerated conversion function. +func Convert_v1beta1_LocalEtcd_To_upstreamv1beta3_LocalEtcd(in *v1beta1.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { + return autoConvert_v1beta1_LocalEtcd_To_upstreamv1beta3_LocalEtcd(in, out, s) +} + +func autoConvert_upstreamv1beta3_Networking_To_v1beta1_Networking(in *Networking, out *v1beta1.Networking, s conversion.Scope) error { + out.ServiceSubnet = in.ServiceSubnet + out.PodSubnet = in.PodSubnet + out.DNSDomain = in.DNSDomain + return nil +} + +// Convert_upstreamv1beta3_Networking_To_v1beta1_Networking is an autogenerated conversion function. +func Convert_upstreamv1beta3_Networking_To_v1beta1_Networking(in *Networking, out *v1beta1.Networking, s conversion.Scope) error { + return autoConvert_upstreamv1beta3_Networking_To_v1beta1_Networking(in, out, s) +} + +func autoConvert_v1beta1_Networking_To_upstreamv1beta3_Networking(in *v1beta1.Networking, out *Networking, s conversion.Scope) error { + out.ServiceSubnet = in.ServiceSubnet + out.PodSubnet = in.PodSubnet + out.DNSDomain = in.DNSDomain + return nil +} + +// Convert_v1beta1_Networking_To_upstreamv1beta3_Networking is an autogenerated conversion function. +func Convert_v1beta1_Networking_To_upstreamv1beta3_Networking(in *v1beta1.Networking, out *Networking, s conversion.Scope) error { + return autoConvert_v1beta1_Networking_To_upstreamv1beta3_Networking(in, out, s) +} + +func autoConvert_upstreamv1beta3_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1beta1.NodeRegistrationOptions, s conversion.Scope) error { + out.Name = in.Name + out.CRISocket = in.CRISocket + out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) + out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) + out.IgnorePreflightErrors = *(*[]string)(unsafe.Pointer(&in.IgnorePreflightErrors)) + return nil +} + +func autoConvert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions(in *v1beta1.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { + out.Name = in.Name + out.CRISocket = in.CRISocket + out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) + out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) + out.IgnorePreflightErrors = *(*[]string)(unsafe.Pointer(&in.IgnorePreflightErrors)) + return nil +} + +// Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions is an autogenerated conversion function. +func Convert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions(in *v1beta1.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { + return autoConvert_v1beta1_NodeRegistrationOptions_To_upstreamv1beta3_NodeRegistrationOptions(in, out, s) +} diff --git a/bootstrap/kubeadm/types/v1beta3/zz_generated.deepcopy.go b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go similarity index 99% rename from bootstrap/kubeadm/types/v1beta3/zz_generated.deepcopy.go rename to bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go index 6d65c51997fa..91c6de85745a 100644 --- a/bootstrap/kubeadm/types/v1beta3/zz_generated.deepcopy.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.deepcopy.go @@ -18,7 +18,7 @@ limitations under the License. // Code generated by controller-gen. DO NOT EDIT. -package v1beta3 +package upstreamv1beta3 import ( corev1 "k8s.io/api/core/v1" diff --git a/bootstrap/kubeadm/types/utils.go b/bootstrap/kubeadm/types/utils.go index 023a91d8051d..99582b488305 100644 --- a/bootstrap/kubeadm/types/utils.go +++ b/bootstrap/kubeadm/types/utils.go @@ -23,10 +23,10 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta2" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta3" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta2" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta3" "sigs.k8s.io/controller-runtime/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/scheme" ) @@ -37,27 +37,27 @@ var ( v1beta3KubeadmVersion = semver.MustParse("1.22.0") clusterConfigurationVersionTypeMap = map[schema.GroupVersion]conversion.Convertible{ - v1beta3.GroupVersion: &v1beta3.ClusterConfiguration{}, - v1beta2.GroupVersion: &v1beta2.ClusterConfiguration{}, - v1beta1.GroupVersion: &v1beta1.ClusterConfiguration{}, + upstreamv1beta3.GroupVersion: &upstreamv1beta3.ClusterConfiguration{}, + upstreamv1beta2.GroupVersion: &upstreamv1beta2.ClusterConfiguration{}, + upstreamv1beta1.GroupVersion: &upstreamv1beta1.ClusterConfiguration{}, } clusterStatusVersionTypeMap = map[schema.GroupVersion]conversion.Convertible{ // ClusterStatus has been removed in v1beta3, so we don't need an entry for v1beta3 - v1beta2.GroupVersion: &v1beta2.ClusterStatus{}, - v1beta1.GroupVersion: &v1beta1.ClusterStatus{}, + upstreamv1beta2.GroupVersion: &upstreamv1beta2.ClusterStatus{}, + upstreamv1beta1.GroupVersion: &upstreamv1beta1.ClusterStatus{}, } initConfigurationVersionTypeMap = map[schema.GroupVersion]conversion.Convertible{ - v1beta3.GroupVersion: &v1beta3.InitConfiguration{}, - v1beta2.GroupVersion: &v1beta2.InitConfiguration{}, - v1beta1.GroupVersion: &v1beta1.InitConfiguration{}, + upstreamv1beta3.GroupVersion: &upstreamv1beta3.InitConfiguration{}, + upstreamv1beta2.GroupVersion: &upstreamv1beta2.InitConfiguration{}, + upstreamv1beta1.GroupVersion: &upstreamv1beta1.InitConfiguration{}, } joinConfigurationVersionTypeMap = map[schema.GroupVersion]conversion.Convertible{ - v1beta3.GroupVersion: &v1beta3.JoinConfiguration{}, - v1beta2.GroupVersion: &v1beta2.JoinConfiguration{}, - v1beta1.GroupVersion: &v1beta1.JoinConfiguration{}, + upstreamv1beta3.GroupVersion: &upstreamv1beta3.JoinConfiguration{}, + upstreamv1beta2.GroupVersion: &upstreamv1beta2.JoinConfiguration{}, + upstreamv1beta1.GroupVersion: &upstreamv1beta1.JoinConfiguration{}, } ) @@ -68,10 +68,10 @@ func KubeVersionToKubeadmAPIGroupVersion(version semver.Version) (schema.GroupVe return schema.GroupVersion{}, errors.New("the bootstrap provider for kubeadm doesn't support Kubernetes version lower than v1.13.0") case version.LT(v1beta2KubeadmVersion): // NOTE: All the Kubernetes version >= v1.13 and < v1.15 should use the kubeadm API version v1beta1 - return v1beta1.GroupVersion, nil + return upstreamv1beta1.GroupVersion, nil case version.LT(v1beta3KubeadmVersion): // NOTE: All the Kubernetes version >= v1.15 and < v1.22 should use the kubeadm API version v1beta2 - return v1beta2.GroupVersion, nil + return upstreamv1beta2.GroupVersion, nil default: // NOTE: All the Kubernetes version greater or equal to v1.22 should use the kubeadm API version v1beta3. // Also future Kubernetes versions (not yet released at the time of writing this code) are going to use v1beta3, @@ -79,7 +79,7 @@ func KubeVersionToKubeadmAPIGroupVersion(version semver.Version) (schema.GroupVe // This is acceptable because v1beta3 will be supported by kubeadm until the deprecation cycle completes // (9 months minimum after the deprecation date, not yet announced now); this gives Cluster API project time to // introduce support for newer releases without blocking users to deploy newer version of Kubernetes. - return v1beta3.GroupVersion, nil + return upstreamv1beta3.GroupVersion, nil } } diff --git a/bootstrap/kubeadm/types/utils_test.go b/bootstrap/kubeadm/types/utils_test.go index aec57ed083a9..d65407fef16c 100644 --- a/bootstrap/kubeadm/types/utils_test.go +++ b/bootstrap/kubeadm/types/utils_test.go @@ -21,10 +21,10 @@ import ( "github.com/google/go-cmp/cmp" . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/runtime/schema" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta2" - "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta3" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta2" + "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta3" "testing" ) @@ -52,7 +52,7 @@ func TestKubeVersionToKubeadmAPIGroupVersion(t *testing.T) { args: args{ version: semver.MustParse("1.13.0"), }, - want: v1beta1.GroupVersion, + want: upstreamv1beta1.GroupVersion, wantErr: false, }, { @@ -60,7 +60,7 @@ func TestKubeVersionToKubeadmAPIGroupVersion(t *testing.T) { args: args{ version: semver.MustParse("1.14.99"), }, - want: v1beta1.GroupVersion, + want: upstreamv1beta1.GroupVersion, wantErr: false, }, { @@ -68,7 +68,7 @@ func TestKubeVersionToKubeadmAPIGroupVersion(t *testing.T) { args: args{ version: semver.MustParse("1.15.0"), }, - want: v1beta2.GroupVersion, + want: upstreamv1beta2.GroupVersion, wantErr: false, }, { @@ -76,7 +76,7 @@ func TestKubeVersionToKubeadmAPIGroupVersion(t *testing.T) { args: args{ version: semver.MustParse("1.20.99"), }, - want: v1beta2.GroupVersion, + want: upstreamv1beta2.GroupVersion, wantErr: false, }, { @@ -84,7 +84,7 @@ func TestKubeVersionToKubeadmAPIGroupVersion(t *testing.T) { args: args{ version: semver.MustParse("1.22.0"), }, - want: v1beta3.GroupVersion, + want: upstreamv1beta3.GroupVersion, wantErr: false, }, { @@ -92,7 +92,7 @@ func TestKubeVersionToKubeadmAPIGroupVersion(t *testing.T) { args: args{ version: semver.MustParse("1.23.99"), }, - want: v1beta3.GroupVersion, + want: upstreamv1beta3.GroupVersion, wantErr: false, }, { @@ -100,7 +100,7 @@ func TestKubeVersionToKubeadmAPIGroupVersion(t *testing.T) { args: args{ version: semver.MustParse("99.99.99"), }, - want: v1beta3.GroupVersion, + want: upstreamv1beta3.GroupVersion, wantErr: false, }, } diff --git a/bootstrap/kubeadm/types/v1beta1/zz_generated.conversion.go b/bootstrap/kubeadm/types/v1beta1/zz_generated.conversion.go deleted file mode 100644 index 18104e8ad5af..000000000000 --- a/bootstrap/kubeadm/types/v1beta1/zz_generated.conversion.go +++ /dev/null @@ -1,815 +0,0 @@ -// +build !ignore_autogenerated_kubeadm_bootstrap_v1alpha3 - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1beta1 - -import ( - unsafe "unsafe" - - corev1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - v1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" -) - -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((*APIEndpoint)(nil), (*v1alpha4.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(a.(*APIEndpoint), b.(*v1alpha4.APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(a.(*v1alpha4.APIEndpoint), b.(*APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServer)(nil), (*v1alpha4.APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIServer_To_v1alpha4_APIServer(a.(*APIServer), b.(*v1alpha4.APIServer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.APIServer)(nil), (*APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIServer_To_v1beta1_APIServer(a.(*v1alpha4.APIServer), b.(*APIServer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BootstrapToken)(nil), (*v1alpha4.BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_BootstrapToken_To_v1alpha4_BootstrapToken(a.(*BootstrapToken), b.(*v1alpha4.BootstrapToken), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.BootstrapToken)(nil), (*BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BootstrapToken_To_v1beta1_BootstrapToken(a.(*v1alpha4.BootstrapToken), b.(*BootstrapToken), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BootstrapTokenDiscovery)(nil), (*v1alpha4.BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(a.(*BootstrapTokenDiscovery), b.(*v1alpha4.BootstrapTokenDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.BootstrapTokenDiscovery)(nil), (*BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(a.(*v1alpha4.BootstrapTokenDiscovery), b.(*BootstrapTokenDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BootstrapTokenString)(nil), (*v1alpha4.BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(a.(*BootstrapTokenString), b.(*v1alpha4.BootstrapTokenString), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.BootstrapTokenString)(nil), (*BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BootstrapTokenString_To_v1beta1_BootstrapTokenString(a.(*v1alpha4.BootstrapTokenString), b.(*BootstrapTokenString), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(a.(*v1alpha4.ClusterConfiguration), b.(*ClusterConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClusterStatus)(nil), (*v1alpha4.ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(a.(*ClusterStatus), b.(*v1alpha4.ClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterStatus)(nil), (*ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(a.(*v1alpha4.ClusterStatus), b.(*ClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ControlPlaneComponent)(nil), (*v1alpha4.ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(a.(*ControlPlaneComponent), b.(*v1alpha4.ControlPlaneComponent), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ControlPlaneComponent)(nil), (*ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(a.(*v1alpha4.ControlPlaneComponent), b.(*ControlPlaneComponent), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DNS_To_v1beta1_DNS(a.(*v1alpha4.DNS), b.(*DNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Discovery)(nil), (*v1alpha4.Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Discovery_To_v1alpha4_Discovery(a.(*Discovery), b.(*v1alpha4.Discovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Discovery)(nil), (*Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Discovery_To_v1beta1_Discovery(a.(*v1alpha4.Discovery), b.(*Discovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Etcd)(nil), (*v1alpha4.Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Etcd_To_v1alpha4_Etcd(a.(*Etcd), b.(*v1alpha4.Etcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Etcd)(nil), (*Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Etcd_To_v1beta1_Etcd(a.(*v1alpha4.Etcd), b.(*Etcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ExternalEtcd)(nil), (*v1alpha4.ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ExternalEtcd_To_v1alpha4_ExternalEtcd(a.(*ExternalEtcd), b.(*v1alpha4.ExternalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ExternalEtcd)(nil), (*ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ExternalEtcd_To_v1beta1_ExternalEtcd(a.(*v1alpha4.ExternalEtcd), b.(*ExternalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FileDiscovery)(nil), (*v1alpha4.FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FileDiscovery_To_v1alpha4_FileDiscovery(a.(*FileDiscovery), b.(*v1alpha4.FileDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.FileDiscovery)(nil), (*FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_FileDiscovery_To_v1beta1_FileDiscovery(a.(*v1alpha4.FileDiscovery), b.(*FileDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*HostPathMount)(nil), (*v1alpha4.HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_HostPathMount_To_v1alpha4_HostPathMount(a.(*HostPathMount), b.(*v1alpha4.HostPathMount), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.HostPathMount)(nil), (*HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_HostPathMount_To_v1beta1_HostPathMount(a.(*v1alpha4.HostPathMount), b.(*HostPathMount), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ImageMeta)(nil), (*v1alpha4.ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(a.(*ImageMeta), b.(*v1alpha4.ImageMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ImageMeta)(nil), (*ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(a.(*v1alpha4.ImageMeta), b.(*ImageMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*InitConfiguration)(nil), (*v1alpha4.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(a.(*InitConfiguration), b.(*v1alpha4.InitConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.InitConfiguration)(nil), (*InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(a.(*v1alpha4.InitConfiguration), b.(*InitConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JoinConfiguration)(nil), (*v1alpha4.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(a.(*JoinConfiguration), b.(*v1alpha4.JoinConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.JoinConfiguration)(nil), (*JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(a.(*v1alpha4.JoinConfiguration), b.(*JoinConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JoinControlPlane)(nil), (*v1alpha4.JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_JoinControlPlane_To_v1alpha4_JoinControlPlane(a.(*JoinControlPlane), b.(*v1alpha4.JoinControlPlane), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.JoinControlPlane)(nil), (*JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_JoinControlPlane_To_v1beta1_JoinControlPlane(a.(*v1alpha4.JoinControlPlane), b.(*JoinControlPlane), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*LocalEtcd)(nil), (*v1alpha4.LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(a.(*LocalEtcd), b.(*v1alpha4.LocalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.LocalEtcd)(nil), (*LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_LocalEtcd_To_v1beta1_LocalEtcd(a.(*v1alpha4.LocalEtcd), b.(*LocalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Networking)(nil), (*v1alpha4.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Networking_To_v1alpha4_Networking(a.(*Networking), b.(*v1alpha4.Networking), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Networking_To_v1beta1_Networking(a.(*v1alpha4.Networking), b.(*Networking), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NodeRegistrationOptions)(nil), (*v1alpha4.NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(a.(*NodeRegistrationOptions), b.(*v1alpha4.NodeRegistrationOptions), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1alpha4.NodeRegistrationOptions)(nil), (*NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(a.(*v1alpha4.NodeRegistrationOptions), b.(*NodeRegistrationOptions), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*ClusterConfiguration)(nil), (*v1alpha4.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1alpha4.ClusterConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*DNS)(nil), (*v1alpha4.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DNS_To_v1alpha4_DNS(a.(*DNS), b.(*v1alpha4.DNS), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *APIEndpoint, out *v1alpha4.APIEndpoint, s conversion.Scope) error { - out.AdvertiseAddress = in.AdvertiseAddress - out.BindPort = in.BindPort - return nil -} - -// Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint is an autogenerated conversion function. -func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *APIEndpoint, out *v1alpha4.APIEndpoint, s conversion.Scope) error { - return autoConvert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) -} - -func autoConvert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *v1alpha4.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - out.AdvertiseAddress = in.AdvertiseAddress - out.BindPort = in.BindPort - return nil -} - -// Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *v1alpha4.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - return autoConvert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) -} - -func autoConvert_v1beta1_APIServer_To_v1alpha4_APIServer(in *APIServer, out *v1alpha4.APIServer, s conversion.Scope) error { - if err := Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { - return err - } - out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) - out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) - return nil -} - -// Convert_v1beta1_APIServer_To_v1alpha4_APIServer is an autogenerated conversion function. -func Convert_v1beta1_APIServer_To_v1alpha4_APIServer(in *APIServer, out *v1alpha4.APIServer, s conversion.Scope) error { - return autoConvert_v1beta1_APIServer_To_v1alpha4_APIServer(in, out, s) -} - -func autoConvert_v1alpha4_APIServer_To_v1beta1_APIServer(in *v1alpha4.APIServer, out *APIServer, s conversion.Scope) error { - if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { - return err - } - out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) - out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) - return nil -} - -// Convert_v1alpha4_APIServer_To_v1beta1_APIServer is an autogenerated conversion function. -func Convert_v1alpha4_APIServer_To_v1beta1_APIServer(in *v1alpha4.APIServer, out *APIServer, s conversion.Scope) error { - return autoConvert_v1alpha4_APIServer_To_v1beta1_APIServer(in, out, s) -} - -func autoConvert_v1beta1_BootstrapToken_To_v1alpha4_BootstrapToken(in *BootstrapToken, out *v1alpha4.BootstrapToken, s conversion.Scope) error { - out.Token = (*v1alpha4.BootstrapTokenString)(unsafe.Pointer(in.Token)) - out.Description = in.Description - out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) - out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) - out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - return nil -} - -// Convert_v1beta1_BootstrapToken_To_v1alpha4_BootstrapToken is an autogenerated conversion function. -func Convert_v1beta1_BootstrapToken_To_v1alpha4_BootstrapToken(in *BootstrapToken, out *v1alpha4.BootstrapToken, s conversion.Scope) error { - return autoConvert_v1beta1_BootstrapToken_To_v1alpha4_BootstrapToken(in, out, s) -} - -func autoConvert_v1alpha4_BootstrapToken_To_v1beta1_BootstrapToken(in *v1alpha4.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { - out.Token = (*BootstrapTokenString)(unsafe.Pointer(in.Token)) - out.Description = in.Description - out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) - out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) - out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - return nil -} - -// Convert_v1alpha4_BootstrapToken_To_v1beta1_BootstrapToken is an autogenerated conversion function. -func Convert_v1alpha4_BootstrapToken_To_v1beta1_BootstrapToken(in *v1alpha4.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { - return autoConvert_v1alpha4_BootstrapToken_To_v1beta1_BootstrapToken(in, out, s) -} - -func autoConvert_v1beta1_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1alpha4.BootstrapTokenDiscovery, s conversion.Scope) error { - out.Token = in.Token - out.APIServerEndpoint = in.APIServerEndpoint - out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) - out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification - return nil -} - -// Convert_v1beta1_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery is an autogenerated conversion function. -func Convert_v1beta1_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1alpha4.BootstrapTokenDiscovery, s conversion.Scope) error { - return autoConvert_v1beta1_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in, out, s) -} - -func autoConvert_v1alpha4_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in *v1alpha4.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { - out.Token = in.Token - out.APIServerEndpoint = in.APIServerEndpoint - out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) - out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification - return nil -} - -// Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery is an autogenerated conversion function. -func Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in *v1alpha4.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { - return autoConvert_v1alpha4_BootstrapTokenDiscovery_To_v1beta1_BootstrapTokenDiscovery(in, out, s) -} - -func autoConvert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *BootstrapTokenString, out *v1alpha4.BootstrapTokenString, s conversion.Scope) error { - out.ID = in.ID - out.Secret = in.Secret - return nil -} - -// Convert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString is an autogenerated conversion function. -func Convert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *BootstrapTokenString, out *v1alpha4.BootstrapTokenString, s conversion.Scope) error { - return autoConvert_v1beta1_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in, out, s) -} - -func autoConvert_v1alpha4_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in *v1alpha4.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { - out.ID = in.ID - out.Secret = in.Secret - return nil -} - -// Convert_v1alpha4_BootstrapTokenString_To_v1beta1_BootstrapTokenString is an autogenerated conversion function. -func Convert_v1alpha4_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in *v1alpha4.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { - return autoConvert_v1alpha4_BootstrapTokenString_To_v1beta1_BootstrapTokenString(in, out, s) -} - -func autoConvert_v1beta1_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *ClusterConfiguration, out *v1alpha4.ClusterConfiguration, s conversion.Scope) error { - if err := Convert_v1beta1_Etcd_To_v1alpha4_Etcd(&in.Etcd, &out.Etcd, s); err != nil { - return err - } - if err := Convert_v1beta1_Networking_To_v1alpha4_Networking(&in.Networking, &out.Networking, s); err != nil { - return err - } - out.KubernetesVersion = in.KubernetesVersion - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if err := Convert_v1beta1_APIServer_To_v1alpha4_APIServer(&in.APIServer, &out.APIServer, s); err != nil { - return err - } - if err := Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { - return err - } - if err := Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { - return err - } - if err := Convert_v1beta1_DNS_To_v1alpha4_DNS(&in.DNS, &out.DNS, s); err != nil { - return err - } - out.CertificatesDir = in.CertificatesDir - out.ImageRepository = in.ImageRepository - // WARNING: in.UseHyperKubeImage requires manual conversion: does not exist in peer-type - out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) - out.ClusterName = in.ClusterName - return nil -} - -func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *v1alpha4.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha4_Etcd_To_v1beta1_Etcd(&in.Etcd, &out.Etcd, s); err != nil { - return err - } - if err := Convert_v1alpha4_Networking_To_v1beta1_Networking(&in.Networking, &out.Networking, s); err != nil { - return err - } - out.KubernetesVersion = in.KubernetesVersion - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if err := Convert_v1alpha4_APIServer_To_v1beta1_APIServer(&in.APIServer, &out.APIServer, s); err != nil { - return err - } - if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { - return err - } - if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { - return err - } - if err := Convert_v1alpha4_DNS_To_v1beta1_DNS(&in.DNS, &out.DNS, s); err != nil { - return err - } - out.CertificatesDir = in.CertificatesDir - out.ImageRepository = in.ImageRepository - out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) - out.ClusterName = in.ClusterName - return nil -} - -// Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration is an autogenerated conversion function. -func Convert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in *v1alpha4.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterConfiguration_To_v1beta1_ClusterConfiguration(in, out, s) -} - -func autoConvert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in *ClusterStatus, out *v1alpha4.ClusterStatus, s conversion.Scope) error { - out.APIEndpoints = *(*map[string]v1alpha4.APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) - return nil -} - -// Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus is an autogenerated conversion function. -func Convert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in *ClusterStatus, out *v1alpha4.ClusterStatus, s conversion.Scope) error { - return autoConvert_v1beta1_ClusterStatus_To_v1alpha4_ClusterStatus(in, out, s) -} - -func autoConvert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in *v1alpha4.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { - out.APIEndpoints = *(*map[string]APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) - return nil -} - -// Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus is an autogenerated conversion function. -func Convert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in *v1alpha4.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterStatus_To_v1beta1_ClusterStatus(in, out, s) -} - -func autoConvert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in *ControlPlaneComponent, out *v1alpha4.ControlPlaneComponent, s conversion.Scope) error { - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ExtraVolumes = *(*[]v1alpha4.HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) - return nil -} - -// Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent is an autogenerated conversion function. -func Convert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in *ControlPlaneComponent, out *v1alpha4.ControlPlaneComponent, s conversion.Scope) error { - return autoConvert_v1beta1_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in, out, s) -} - -func autoConvert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in *v1alpha4.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ExtraVolumes = *(*[]HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) - return nil -} - -// Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent is an autogenerated conversion function. -func Convert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in *v1alpha4.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { - return autoConvert_v1alpha4_ControlPlaneComponent_To_v1beta1_ControlPlaneComponent(in, out, s) -} - -func autoConvert_v1beta1_DNS_To_v1alpha4_DNS(in *DNS, out *v1alpha4.DNS, s conversion.Scope) error { - // WARNING: in.Type requires manual conversion: does not exist in peer-type - if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha4_DNS_To_v1beta1_DNS(in *v1alpha4.DNS, out *DNS, s conversion.Scope) error { - if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_DNS_To_v1beta1_DNS is an autogenerated conversion function. -func Convert_v1alpha4_DNS_To_v1beta1_DNS(in *v1alpha4.DNS, out *DNS, s conversion.Scope) error { - return autoConvert_v1alpha4_DNS_To_v1beta1_DNS(in, out, s) -} - -func autoConvert_v1beta1_Discovery_To_v1alpha4_Discovery(in *Discovery, out *v1alpha4.Discovery, s conversion.Scope) error { - out.BootstrapToken = (*v1alpha4.BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) - out.File = (*v1alpha4.FileDiscovery)(unsafe.Pointer(in.File)) - out.TLSBootstrapToken = in.TLSBootstrapToken - out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) - return nil -} - -// Convert_v1beta1_Discovery_To_v1alpha4_Discovery is an autogenerated conversion function. -func Convert_v1beta1_Discovery_To_v1alpha4_Discovery(in *Discovery, out *v1alpha4.Discovery, s conversion.Scope) error { - return autoConvert_v1beta1_Discovery_To_v1alpha4_Discovery(in, out, s) -} - -func autoConvert_v1alpha4_Discovery_To_v1beta1_Discovery(in *v1alpha4.Discovery, out *Discovery, s conversion.Scope) error { - out.BootstrapToken = (*BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) - out.File = (*FileDiscovery)(unsafe.Pointer(in.File)) - out.TLSBootstrapToken = in.TLSBootstrapToken - out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) - return nil -} - -// Convert_v1alpha4_Discovery_To_v1beta1_Discovery is an autogenerated conversion function. -func Convert_v1alpha4_Discovery_To_v1beta1_Discovery(in *v1alpha4.Discovery, out *Discovery, s conversion.Scope) error { - return autoConvert_v1alpha4_Discovery_To_v1beta1_Discovery(in, out, s) -} - -func autoConvert_v1beta1_Etcd_To_v1alpha4_Etcd(in *Etcd, out *v1alpha4.Etcd, s conversion.Scope) error { - out.Local = (*v1alpha4.LocalEtcd)(unsafe.Pointer(in.Local)) - out.External = (*v1alpha4.ExternalEtcd)(unsafe.Pointer(in.External)) - return nil -} - -// Convert_v1beta1_Etcd_To_v1alpha4_Etcd is an autogenerated conversion function. -func Convert_v1beta1_Etcd_To_v1alpha4_Etcd(in *Etcd, out *v1alpha4.Etcd, s conversion.Scope) error { - return autoConvert_v1beta1_Etcd_To_v1alpha4_Etcd(in, out, s) -} - -func autoConvert_v1alpha4_Etcd_To_v1beta1_Etcd(in *v1alpha4.Etcd, out *Etcd, s conversion.Scope) error { - out.Local = (*LocalEtcd)(unsafe.Pointer(in.Local)) - out.External = (*ExternalEtcd)(unsafe.Pointer(in.External)) - return nil -} - -// Convert_v1alpha4_Etcd_To_v1beta1_Etcd is an autogenerated conversion function. -func Convert_v1alpha4_Etcd_To_v1beta1_Etcd(in *v1alpha4.Etcd, out *Etcd, s conversion.Scope) error { - return autoConvert_v1alpha4_Etcd_To_v1beta1_Etcd(in, out, s) -} - -func autoConvert_v1beta1_ExternalEtcd_To_v1alpha4_ExternalEtcd(in *ExternalEtcd, out *v1alpha4.ExternalEtcd, s conversion.Scope) error { - out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) - out.CAFile = in.CAFile - out.CertFile = in.CertFile - out.KeyFile = in.KeyFile - return nil -} - -// Convert_v1beta1_ExternalEtcd_To_v1alpha4_ExternalEtcd is an autogenerated conversion function. -func Convert_v1beta1_ExternalEtcd_To_v1alpha4_ExternalEtcd(in *ExternalEtcd, out *v1alpha4.ExternalEtcd, s conversion.Scope) error { - return autoConvert_v1beta1_ExternalEtcd_To_v1alpha4_ExternalEtcd(in, out, s) -} - -func autoConvert_v1alpha4_ExternalEtcd_To_v1beta1_ExternalEtcd(in *v1alpha4.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { - out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) - out.CAFile = in.CAFile - out.CertFile = in.CertFile - out.KeyFile = in.KeyFile - return nil -} - -// Convert_v1alpha4_ExternalEtcd_To_v1beta1_ExternalEtcd is an autogenerated conversion function. -func Convert_v1alpha4_ExternalEtcd_To_v1beta1_ExternalEtcd(in *v1alpha4.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { - return autoConvert_v1alpha4_ExternalEtcd_To_v1beta1_ExternalEtcd(in, out, s) -} - -func autoConvert_v1beta1_FileDiscovery_To_v1alpha4_FileDiscovery(in *FileDiscovery, out *v1alpha4.FileDiscovery, s conversion.Scope) error { - out.KubeConfigPath = in.KubeConfigPath - return nil -} - -// Convert_v1beta1_FileDiscovery_To_v1alpha4_FileDiscovery is an autogenerated conversion function. -func Convert_v1beta1_FileDiscovery_To_v1alpha4_FileDiscovery(in *FileDiscovery, out *v1alpha4.FileDiscovery, s conversion.Scope) error { - return autoConvert_v1beta1_FileDiscovery_To_v1alpha4_FileDiscovery(in, out, s) -} - -func autoConvert_v1alpha4_FileDiscovery_To_v1beta1_FileDiscovery(in *v1alpha4.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { - out.KubeConfigPath = in.KubeConfigPath - return nil -} - -// Convert_v1alpha4_FileDiscovery_To_v1beta1_FileDiscovery is an autogenerated conversion function. -func Convert_v1alpha4_FileDiscovery_To_v1beta1_FileDiscovery(in *v1alpha4.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { - return autoConvert_v1alpha4_FileDiscovery_To_v1beta1_FileDiscovery(in, out, s) -} - -func autoConvert_v1beta1_HostPathMount_To_v1alpha4_HostPathMount(in *HostPathMount, out *v1alpha4.HostPathMount, s conversion.Scope) error { - out.Name = in.Name - out.HostPath = in.HostPath - out.MountPath = in.MountPath - out.ReadOnly = in.ReadOnly - out.PathType = corev1.HostPathType(in.PathType) - return nil -} - -// Convert_v1beta1_HostPathMount_To_v1alpha4_HostPathMount is an autogenerated conversion function. -func Convert_v1beta1_HostPathMount_To_v1alpha4_HostPathMount(in *HostPathMount, out *v1alpha4.HostPathMount, s conversion.Scope) error { - return autoConvert_v1beta1_HostPathMount_To_v1alpha4_HostPathMount(in, out, s) -} - -func autoConvert_v1alpha4_HostPathMount_To_v1beta1_HostPathMount(in *v1alpha4.HostPathMount, out *HostPathMount, s conversion.Scope) error { - out.Name = in.Name - out.HostPath = in.HostPath - out.MountPath = in.MountPath - out.ReadOnly = in.ReadOnly - out.PathType = corev1.HostPathType(in.PathType) - return nil -} - -// Convert_v1alpha4_HostPathMount_To_v1beta1_HostPathMount is an autogenerated conversion function. -func Convert_v1alpha4_HostPathMount_To_v1beta1_HostPathMount(in *v1alpha4.HostPathMount, out *HostPathMount, s conversion.Scope) error { - return autoConvert_v1alpha4_HostPathMount_To_v1beta1_HostPathMount(in, out, s) -} - -func autoConvert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(in *ImageMeta, out *v1alpha4.ImageMeta, s conversion.Scope) error { - out.ImageRepository = in.ImageRepository - out.ImageTag = in.ImageTag - return nil -} - -// Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta is an autogenerated conversion function. -func Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(in *ImageMeta, out *v1alpha4.ImageMeta, s conversion.Scope) error { - return autoConvert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(in, out, s) -} - -func autoConvert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(in *v1alpha4.ImageMeta, out *ImageMeta, s conversion.Scope) error { - out.ImageRepository = in.ImageRepository - out.ImageTag = in.ImageTag - return nil -} - -// Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta is an autogenerated conversion function. -func Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(in *v1alpha4.ImageMeta, out *ImageMeta, s conversion.Scope) error { - return autoConvert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(in, out, s) -} - -func autoConvert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(in *InitConfiguration, out *v1alpha4.InitConfiguration, s conversion.Scope) error { - out.BootstrapTokens = *(*[]v1alpha4.BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) - if err := Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - if err := Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration is an autogenerated conversion function. -func Convert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(in *InitConfiguration, out *v1alpha4.InitConfiguration, s conversion.Scope) error { - return autoConvert_v1beta1_InitConfiguration_To_v1alpha4_InitConfiguration(in, out, s) -} - -func autoConvert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(in *v1alpha4.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { - out.BootstrapTokens = *(*[]BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) - if err := Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - if err := Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration is an autogenerated conversion function. -func Convert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(in *v1alpha4.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha4_InitConfiguration_To_v1beta1_InitConfiguration(in, out, s) -} - -func autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *JoinConfiguration, out *v1alpha4.JoinConfiguration, s conversion.Scope) error { - if err := Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - out.CACertPath = in.CACertPath - if err := Convert_v1beta1_Discovery_To_v1alpha4_Discovery(&in.Discovery, &out.Discovery, s); err != nil { - return err - } - out.ControlPlane = (*v1alpha4.JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) - return nil -} - -// Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration is an autogenerated conversion function. -func Convert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *JoinConfiguration, out *v1alpha4.JoinConfiguration, s conversion.Scope) error { - return autoConvert_v1beta1_JoinConfiguration_To_v1alpha4_JoinConfiguration(in, out, s) -} - -func autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *v1alpha4.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - out.CACertPath = in.CACertPath - if err := Convert_v1alpha4_Discovery_To_v1beta1_Discovery(&in.Discovery, &out.Discovery, s); err != nil { - return err - } - out.ControlPlane = (*JoinControlPlane)(unsafe.Pointer(in.ControlPlane)) - return nil -} - -// Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration is an autogenerated conversion function. -func Convert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in *v1alpha4.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha4_JoinConfiguration_To_v1beta1_JoinConfiguration(in, out, s) -} - -func autoConvert_v1beta1_JoinControlPlane_To_v1alpha4_JoinControlPlane(in *JoinControlPlane, out *v1alpha4.JoinControlPlane, s conversion.Scope) error { - if err := Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_JoinControlPlane_To_v1alpha4_JoinControlPlane is an autogenerated conversion function. -func Convert_v1beta1_JoinControlPlane_To_v1alpha4_JoinControlPlane(in *JoinControlPlane, out *v1alpha4.JoinControlPlane, s conversion.Scope) error { - return autoConvert_v1beta1_JoinControlPlane_To_v1alpha4_JoinControlPlane(in, out, s) -} - -func autoConvert_v1alpha4_JoinControlPlane_To_v1beta1_JoinControlPlane(in *v1alpha4.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { - if err := Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_JoinControlPlane_To_v1beta1_JoinControlPlane is an autogenerated conversion function. -func Convert_v1alpha4_JoinControlPlane_To_v1beta1_JoinControlPlane(in *v1alpha4.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { - return autoConvert_v1alpha4_JoinControlPlane_To_v1beta1_JoinControlPlane(in, out, s) -} - -func autoConvert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(in *LocalEtcd, out *v1alpha4.LocalEtcd, s conversion.Scope) error { - if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - out.DataDir = in.DataDir - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) - out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) - return nil -} - -// Convert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd is an autogenerated conversion function. -func Convert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(in *LocalEtcd, out *v1alpha4.LocalEtcd, s conversion.Scope) error { - return autoConvert_v1beta1_LocalEtcd_To_v1alpha4_LocalEtcd(in, out, s) -} - -func autoConvert_v1alpha4_LocalEtcd_To_v1beta1_LocalEtcd(in *v1alpha4.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { - if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - out.DataDir = in.DataDir - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) - out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) - return nil -} - -// Convert_v1alpha4_LocalEtcd_To_v1beta1_LocalEtcd is an autogenerated conversion function. -func Convert_v1alpha4_LocalEtcd_To_v1beta1_LocalEtcd(in *v1alpha4.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { - return autoConvert_v1alpha4_LocalEtcd_To_v1beta1_LocalEtcd(in, out, s) -} - -func autoConvert_v1beta1_Networking_To_v1alpha4_Networking(in *Networking, out *v1alpha4.Networking, s conversion.Scope) error { - out.ServiceSubnet = in.ServiceSubnet - out.PodSubnet = in.PodSubnet - out.DNSDomain = in.DNSDomain - return nil -} - -// Convert_v1beta1_Networking_To_v1alpha4_Networking is an autogenerated conversion function. -func Convert_v1beta1_Networking_To_v1alpha4_Networking(in *Networking, out *v1alpha4.Networking, s conversion.Scope) error { - return autoConvert_v1beta1_Networking_To_v1alpha4_Networking(in, out, s) -} - -func autoConvert_v1alpha4_Networking_To_v1beta1_Networking(in *v1alpha4.Networking, out *Networking, s conversion.Scope) error { - out.ServiceSubnet = in.ServiceSubnet - out.PodSubnet = in.PodSubnet - out.DNSDomain = in.DNSDomain - return nil -} - -// Convert_v1alpha4_Networking_To_v1beta1_Networking is an autogenerated conversion function. -func Convert_v1alpha4_Networking_To_v1beta1_Networking(in *v1alpha4.Networking, out *Networking, s conversion.Scope) error { - return autoConvert_v1alpha4_Networking_To_v1beta1_Networking(in, out, s) -} - -func autoConvert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1alpha4.NodeRegistrationOptions, s conversion.Scope) error { - out.Name = in.Name - out.CRISocket = in.CRISocket - out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) - out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) - return nil -} - -// Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions is an autogenerated conversion function. -func Convert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1alpha4.NodeRegistrationOptions, s conversion.Scope) error { - return autoConvert_v1beta1_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in, out, s) -} - -func autoConvert_v1alpha4_NodeRegistrationOptions_To_v1beta1_NodeRegistrationOptions(in *v1alpha4.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { - out.Name = in.Name - out.CRISocket = in.CRISocket - out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) - out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) - // WARNING: in.IgnorePreflightErrors requires manual conversion: does not exist in peer-type - return nil -} diff --git a/bootstrap/kubeadm/types/v1beta2/conversion.go b/bootstrap/kubeadm/types/v1beta2/conversion.go deleted file mode 100644 index 966a7b708247..000000000000 --- a/bootstrap/kubeadm/types/v1beta2/conversion.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1beta2 - -import ( - apimachineryconversion "k8s.io/apimachinery/pkg/conversion" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this ClusterConfiguration to the Hub version (v1alpha4). -func (src *ClusterConfiguration) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*bootstrapv1.ClusterConfiguration) - return Convert_v1beta2_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(src, dst, nil) -} - -// ConvertFrom converts from the ClusterConfiguration Hub version (v1alpha4) to this version. -func (dst *ClusterConfiguration) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*bootstrapv1.ClusterConfiguration) - return Convert_v1alpha4_ClusterConfiguration_To_v1beta2_ClusterConfiguration(src, dst, nil) -} - -// ConvertTo converts this ClusterStatus to the Hub version (v1alpha4). -func (src *ClusterStatus) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*bootstrapv1.ClusterStatus) - return Convert_v1beta2_ClusterStatus_To_v1alpha4_ClusterStatus(src, dst, nil) -} - -// ConvertFrom converts from the ClusterStatus Hub version (v1alpha4) to this version. -func (dst *ClusterStatus) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*bootstrapv1.ClusterStatus) - return Convert_v1alpha4_ClusterStatus_To_v1beta2_ClusterStatus(src, dst, nil) -} - -// ConvertTo converts this InitConfiguration to the Hub version (v1alpha4). -func (src *InitConfiguration) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*bootstrapv1.InitConfiguration) - return Convert_v1beta2_InitConfiguration_To_v1alpha4_InitConfiguration(src, dst, nil) -} - -// ConvertFrom converts from the InitConfiguration Hub version (v1alpha4) to this version. -func (dst *InitConfiguration) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*bootstrapv1.InitConfiguration) - return Convert_v1alpha4_InitConfiguration_To_v1beta2_InitConfiguration(src, dst, nil) -} - -// ConvertTo converts this JoinConfiguration to the Hub version (v1alpha4). -func (src *JoinConfiguration) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*bootstrapv1.JoinConfiguration) - return Convert_v1beta2_JoinConfiguration_To_v1alpha4_JoinConfiguration(src, dst, nil) -} - -// ConvertFrom converts from the JoinConfiguration Hub version (v1alpha4) to this version. -func (dst *JoinConfiguration) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*bootstrapv1.JoinConfiguration) - return Convert_v1alpha4_JoinConfiguration_To_v1beta2_JoinConfiguration(src, dst, nil) -} - -func Convert_v1beta2_InitConfiguration_To_v1alpha4_InitConfiguration(in *InitConfiguration, out *bootstrapv1.InitConfiguration, s apimachineryconversion.Scope) error { - // InitConfiguration.CertificateKey exists in v1beta2 types but not in bootstrapv1.InitConfiguration (Cluster API does not uses automatic copy certs). Ignoring when converting. - return autoConvert_v1beta2_InitConfiguration_To_v1alpha4_InitConfiguration(in, out, s) -} - -func Convert_v1beta2_JoinControlPlane_To_v1alpha4_JoinControlPlane(in *JoinControlPlane, out *bootstrapv1.JoinControlPlane, s apimachineryconversion.Scope) error { - // JoinControlPlane.CertificateKey exists in v1beta2 types but not in bootstrapv1.JoinControlPlane (Cluster API does not uses automatic copy certs). Ignoring when converting. - return autoConvert_v1beta2_JoinControlPlane_To_v1alpha4_JoinControlPlane(in, out, s) -} - -func Convert_v1beta2_DNS_To_v1alpha4_DNS(in *DNS, out *bootstrapv1.DNS, s apimachineryconversion.Scope) error { - // DNS.Type was removed in v1alpha4 because only CoreDNS is supported, dropping this info. - return autoConvert_v1beta2_DNS_To_v1alpha4_DNS(in, out, s) -} - -func Convert_v1beta2_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *ClusterConfiguration, out *bootstrapv1.ClusterConfiguration, s apimachineryconversion.Scope) error { - // ClusterConfiguration.UseHyperKubeImage was removed in kubeadm v1alpha4 API - return autoConvert_v1beta2_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in, out, s) -} diff --git a/bootstrap/kubeadm/types/v1beta2/zz_generated.conversion.go b/bootstrap/kubeadm/types/v1beta2/zz_generated.conversion.go deleted file mode 100644 index 91f87e6a52e7..000000000000 --- a/bootstrap/kubeadm/types/v1beta2/zz_generated.conversion.go +++ /dev/null @@ -1,829 +0,0 @@ -// +build !ignore_autogenerated_kubeadm_bootstrap_v1alpha3 - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1beta2 - -import ( - unsafe "unsafe" - - corev1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - v1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" -) - -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((*APIEndpoint)(nil), (*v1alpha4.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_APIEndpoint_To_v1alpha4_APIEndpoint(a.(*APIEndpoint), b.(*v1alpha4.APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIEndpoint_To_v1beta2_APIEndpoint(a.(*v1alpha4.APIEndpoint), b.(*APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServer)(nil), (*v1alpha4.APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_APIServer_To_v1alpha4_APIServer(a.(*APIServer), b.(*v1alpha4.APIServer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.APIServer)(nil), (*APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIServer_To_v1beta2_APIServer(a.(*v1alpha4.APIServer), b.(*APIServer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BootstrapToken)(nil), (*v1alpha4.BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_BootstrapToken_To_v1alpha4_BootstrapToken(a.(*BootstrapToken), b.(*v1alpha4.BootstrapToken), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.BootstrapToken)(nil), (*BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BootstrapToken_To_v1beta2_BootstrapToken(a.(*v1alpha4.BootstrapToken), b.(*BootstrapToken), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BootstrapTokenDiscovery)(nil), (*v1alpha4.BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(a.(*BootstrapTokenDiscovery), b.(*v1alpha4.BootstrapTokenDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.BootstrapTokenDiscovery)(nil), (*BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta2_BootstrapTokenDiscovery(a.(*v1alpha4.BootstrapTokenDiscovery), b.(*BootstrapTokenDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BootstrapTokenString)(nil), (*v1alpha4.BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(a.(*BootstrapTokenString), b.(*v1alpha4.BootstrapTokenString), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.BootstrapTokenString)(nil), (*BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BootstrapTokenString_To_v1beta2_BootstrapTokenString(a.(*v1alpha4.BootstrapTokenString), b.(*BootstrapTokenString), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterConfiguration_To_v1beta2_ClusterConfiguration(a.(*v1alpha4.ClusterConfiguration), b.(*ClusterConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClusterStatus)(nil), (*v1alpha4.ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_ClusterStatus_To_v1alpha4_ClusterStatus(a.(*ClusterStatus), b.(*v1alpha4.ClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterStatus)(nil), (*ClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterStatus_To_v1beta2_ClusterStatus(a.(*v1alpha4.ClusterStatus), b.(*ClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ControlPlaneComponent)(nil), (*v1alpha4.ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(a.(*ControlPlaneComponent), b.(*v1alpha4.ControlPlaneComponent), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ControlPlaneComponent)(nil), (*ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ControlPlaneComponent_To_v1beta2_ControlPlaneComponent(a.(*v1alpha4.ControlPlaneComponent), b.(*ControlPlaneComponent), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DNS_To_v1beta2_DNS(a.(*v1alpha4.DNS), b.(*DNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Discovery)(nil), (*v1alpha4.Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_Discovery_To_v1alpha4_Discovery(a.(*Discovery), b.(*v1alpha4.Discovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Discovery)(nil), (*Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Discovery_To_v1beta2_Discovery(a.(*v1alpha4.Discovery), b.(*Discovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Etcd)(nil), (*v1alpha4.Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_Etcd_To_v1alpha4_Etcd(a.(*Etcd), b.(*v1alpha4.Etcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Etcd)(nil), (*Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Etcd_To_v1beta2_Etcd(a.(*v1alpha4.Etcd), b.(*Etcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ExternalEtcd)(nil), (*v1alpha4.ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_ExternalEtcd_To_v1alpha4_ExternalEtcd(a.(*ExternalEtcd), b.(*v1alpha4.ExternalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ExternalEtcd)(nil), (*ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ExternalEtcd_To_v1beta2_ExternalEtcd(a.(*v1alpha4.ExternalEtcd), b.(*ExternalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FileDiscovery)(nil), (*v1alpha4.FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_FileDiscovery_To_v1alpha4_FileDiscovery(a.(*FileDiscovery), b.(*v1alpha4.FileDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.FileDiscovery)(nil), (*FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_FileDiscovery_To_v1beta2_FileDiscovery(a.(*v1alpha4.FileDiscovery), b.(*FileDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*HostPathMount)(nil), (*v1alpha4.HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_HostPathMount_To_v1alpha4_HostPathMount(a.(*HostPathMount), b.(*v1alpha4.HostPathMount), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.HostPathMount)(nil), (*HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_HostPathMount_To_v1beta2_HostPathMount(a.(*v1alpha4.HostPathMount), b.(*HostPathMount), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ImageMeta)(nil), (*v1alpha4.ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_ImageMeta_To_v1alpha4_ImageMeta(a.(*ImageMeta), b.(*v1alpha4.ImageMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ImageMeta)(nil), (*ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ImageMeta_To_v1beta2_ImageMeta(a.(*v1alpha4.ImageMeta), b.(*ImageMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.InitConfiguration)(nil), (*InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_InitConfiguration_To_v1beta2_InitConfiguration(a.(*v1alpha4.InitConfiguration), b.(*InitConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JoinConfiguration)(nil), (*v1alpha4.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_JoinConfiguration_To_v1alpha4_JoinConfiguration(a.(*JoinConfiguration), b.(*v1alpha4.JoinConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.JoinConfiguration)(nil), (*JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_JoinConfiguration_To_v1beta2_JoinConfiguration(a.(*v1alpha4.JoinConfiguration), b.(*JoinConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.JoinControlPlane)(nil), (*JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_JoinControlPlane_To_v1beta2_JoinControlPlane(a.(*v1alpha4.JoinControlPlane), b.(*JoinControlPlane), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*LocalEtcd)(nil), (*v1alpha4.LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_LocalEtcd_To_v1alpha4_LocalEtcd(a.(*LocalEtcd), b.(*v1alpha4.LocalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.LocalEtcd)(nil), (*LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_LocalEtcd_To_v1beta2_LocalEtcd(a.(*v1alpha4.LocalEtcd), b.(*LocalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Networking)(nil), (*v1alpha4.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_Networking_To_v1alpha4_Networking(a.(*Networking), b.(*v1alpha4.Networking), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Networking_To_v1beta2_Networking(a.(*v1alpha4.Networking), b.(*Networking), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NodeRegistrationOptions)(nil), (*v1alpha4.NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(a.(*NodeRegistrationOptions), b.(*v1alpha4.NodeRegistrationOptions), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.NodeRegistrationOptions)(nil), (*NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NodeRegistrationOptions_To_v1beta2_NodeRegistrationOptions(a.(*v1alpha4.NodeRegistrationOptions), b.(*NodeRegistrationOptions), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*ClusterConfiguration)(nil), (*v1alpha4.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1alpha4.ClusterConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*DNS)(nil), (*v1alpha4.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_DNS_To_v1alpha4_DNS(a.(*DNS), b.(*v1alpha4.DNS), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*InitConfiguration)(nil), (*v1alpha4.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_InitConfiguration_To_v1alpha4_InitConfiguration(a.(*InitConfiguration), b.(*v1alpha4.InitConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*JoinControlPlane)(nil), (*v1alpha4.JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_JoinControlPlane_To_v1alpha4_JoinControlPlane(a.(*JoinControlPlane), b.(*v1alpha4.JoinControlPlane), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta2_APIEndpoint_To_v1alpha4_APIEndpoint(in *APIEndpoint, out *v1alpha4.APIEndpoint, s conversion.Scope) error { - out.AdvertiseAddress = in.AdvertiseAddress - out.BindPort = in.BindPort - return nil -} - -// Convert_v1beta2_APIEndpoint_To_v1alpha4_APIEndpoint is an autogenerated conversion function. -func Convert_v1beta2_APIEndpoint_To_v1alpha4_APIEndpoint(in *APIEndpoint, out *v1alpha4.APIEndpoint, s conversion.Scope) error { - return autoConvert_v1beta2_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) -} - -func autoConvert_v1alpha4_APIEndpoint_To_v1beta2_APIEndpoint(in *v1alpha4.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - out.AdvertiseAddress = in.AdvertiseAddress - out.BindPort = in.BindPort - return nil -} - -// Convert_v1alpha4_APIEndpoint_To_v1beta2_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha4_APIEndpoint_To_v1beta2_APIEndpoint(in *v1alpha4.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - return autoConvert_v1alpha4_APIEndpoint_To_v1beta2_APIEndpoint(in, out, s) -} - -func autoConvert_v1beta2_APIServer_To_v1alpha4_APIServer(in *APIServer, out *v1alpha4.APIServer, s conversion.Scope) error { - if err := Convert_v1beta2_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { - return err - } - out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) - out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) - return nil -} - -// Convert_v1beta2_APIServer_To_v1alpha4_APIServer is an autogenerated conversion function. -func Convert_v1beta2_APIServer_To_v1alpha4_APIServer(in *APIServer, out *v1alpha4.APIServer, s conversion.Scope) error { - return autoConvert_v1beta2_APIServer_To_v1alpha4_APIServer(in, out, s) -} - -func autoConvert_v1alpha4_APIServer_To_v1beta2_APIServer(in *v1alpha4.APIServer, out *APIServer, s conversion.Scope) error { - if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta2_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { - return err - } - out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) - out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) - return nil -} - -// Convert_v1alpha4_APIServer_To_v1beta2_APIServer is an autogenerated conversion function. -func Convert_v1alpha4_APIServer_To_v1beta2_APIServer(in *v1alpha4.APIServer, out *APIServer, s conversion.Scope) error { - return autoConvert_v1alpha4_APIServer_To_v1beta2_APIServer(in, out, s) -} - -func autoConvert_v1beta2_BootstrapToken_To_v1alpha4_BootstrapToken(in *BootstrapToken, out *v1alpha4.BootstrapToken, s conversion.Scope) error { - out.Token = (*v1alpha4.BootstrapTokenString)(unsafe.Pointer(in.Token)) - out.Description = in.Description - out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) - out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) - out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - return nil -} - -// Convert_v1beta2_BootstrapToken_To_v1alpha4_BootstrapToken is an autogenerated conversion function. -func Convert_v1beta2_BootstrapToken_To_v1alpha4_BootstrapToken(in *BootstrapToken, out *v1alpha4.BootstrapToken, s conversion.Scope) error { - return autoConvert_v1beta2_BootstrapToken_To_v1alpha4_BootstrapToken(in, out, s) -} - -func autoConvert_v1alpha4_BootstrapToken_To_v1beta2_BootstrapToken(in *v1alpha4.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { - out.Token = (*BootstrapTokenString)(unsafe.Pointer(in.Token)) - out.Description = in.Description - out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) - out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) - out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - return nil -} - -// Convert_v1alpha4_BootstrapToken_To_v1beta2_BootstrapToken is an autogenerated conversion function. -func Convert_v1alpha4_BootstrapToken_To_v1beta2_BootstrapToken(in *v1alpha4.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { - return autoConvert_v1alpha4_BootstrapToken_To_v1beta2_BootstrapToken(in, out, s) -} - -func autoConvert_v1beta2_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1alpha4.BootstrapTokenDiscovery, s conversion.Scope) error { - out.Token = in.Token - out.APIServerEndpoint = in.APIServerEndpoint - out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) - out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification - return nil -} - -// Convert_v1beta2_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery is an autogenerated conversion function. -func Convert_v1beta2_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1alpha4.BootstrapTokenDiscovery, s conversion.Scope) error { - return autoConvert_v1beta2_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in, out, s) -} - -func autoConvert_v1alpha4_BootstrapTokenDiscovery_To_v1beta2_BootstrapTokenDiscovery(in *v1alpha4.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { - out.Token = in.Token - out.APIServerEndpoint = in.APIServerEndpoint - out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) - out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification - return nil -} - -// Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta2_BootstrapTokenDiscovery is an autogenerated conversion function. -func Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta2_BootstrapTokenDiscovery(in *v1alpha4.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { - return autoConvert_v1alpha4_BootstrapTokenDiscovery_To_v1beta2_BootstrapTokenDiscovery(in, out, s) -} - -func autoConvert_v1beta2_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *BootstrapTokenString, out *v1alpha4.BootstrapTokenString, s conversion.Scope) error { - out.ID = in.ID - out.Secret = in.Secret - return nil -} - -// Convert_v1beta2_BootstrapTokenString_To_v1alpha4_BootstrapTokenString is an autogenerated conversion function. -func Convert_v1beta2_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *BootstrapTokenString, out *v1alpha4.BootstrapTokenString, s conversion.Scope) error { - return autoConvert_v1beta2_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in, out, s) -} - -func autoConvert_v1alpha4_BootstrapTokenString_To_v1beta2_BootstrapTokenString(in *v1alpha4.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { - out.ID = in.ID - out.Secret = in.Secret - return nil -} - -// Convert_v1alpha4_BootstrapTokenString_To_v1beta2_BootstrapTokenString is an autogenerated conversion function. -func Convert_v1alpha4_BootstrapTokenString_To_v1beta2_BootstrapTokenString(in *v1alpha4.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { - return autoConvert_v1alpha4_BootstrapTokenString_To_v1beta2_BootstrapTokenString(in, out, s) -} - -func autoConvert_v1beta2_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *ClusterConfiguration, out *v1alpha4.ClusterConfiguration, s conversion.Scope) error { - if err := Convert_v1beta2_Etcd_To_v1alpha4_Etcd(&in.Etcd, &out.Etcd, s); err != nil { - return err - } - if err := Convert_v1beta2_Networking_To_v1alpha4_Networking(&in.Networking, &out.Networking, s); err != nil { - return err - } - out.KubernetesVersion = in.KubernetesVersion - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if err := Convert_v1beta2_APIServer_To_v1alpha4_APIServer(&in.APIServer, &out.APIServer, s); err != nil { - return err - } - if err := Convert_v1beta2_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { - return err - } - if err := Convert_v1beta2_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { - return err - } - if err := Convert_v1beta2_DNS_To_v1alpha4_DNS(&in.DNS, &out.DNS, s); err != nil { - return err - } - out.CertificatesDir = in.CertificatesDir - out.ImageRepository = in.ImageRepository - // WARNING: in.UseHyperKubeImage requires manual conversion: does not exist in peer-type - out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) - out.ClusterName = in.ClusterName - return nil -} - -func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta2_ClusterConfiguration(in *v1alpha4.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha4_Etcd_To_v1beta2_Etcd(&in.Etcd, &out.Etcd, s); err != nil { - return err - } - if err := Convert_v1alpha4_Networking_To_v1beta2_Networking(&in.Networking, &out.Networking, s); err != nil { - return err - } - out.KubernetesVersion = in.KubernetesVersion - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if err := Convert_v1alpha4_APIServer_To_v1beta2_APIServer(&in.APIServer, &out.APIServer, s); err != nil { - return err - } - if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta2_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { - return err - } - if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta2_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { - return err - } - if err := Convert_v1alpha4_DNS_To_v1beta2_DNS(&in.DNS, &out.DNS, s); err != nil { - return err - } - out.CertificatesDir = in.CertificatesDir - out.ImageRepository = in.ImageRepository - out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) - out.ClusterName = in.ClusterName - return nil -} - -// Convert_v1alpha4_ClusterConfiguration_To_v1beta2_ClusterConfiguration is an autogenerated conversion function. -func Convert_v1alpha4_ClusterConfiguration_To_v1beta2_ClusterConfiguration(in *v1alpha4.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterConfiguration_To_v1beta2_ClusterConfiguration(in, out, s) -} - -func autoConvert_v1beta2_ClusterStatus_To_v1alpha4_ClusterStatus(in *ClusterStatus, out *v1alpha4.ClusterStatus, s conversion.Scope) error { - out.APIEndpoints = *(*map[string]v1alpha4.APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) - return nil -} - -// Convert_v1beta2_ClusterStatus_To_v1alpha4_ClusterStatus is an autogenerated conversion function. -func Convert_v1beta2_ClusterStatus_To_v1alpha4_ClusterStatus(in *ClusterStatus, out *v1alpha4.ClusterStatus, s conversion.Scope) error { - return autoConvert_v1beta2_ClusterStatus_To_v1alpha4_ClusterStatus(in, out, s) -} - -func autoConvert_v1alpha4_ClusterStatus_To_v1beta2_ClusterStatus(in *v1alpha4.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { - out.APIEndpoints = *(*map[string]APIEndpoint)(unsafe.Pointer(&in.APIEndpoints)) - return nil -} - -// Convert_v1alpha4_ClusterStatus_To_v1beta2_ClusterStatus is an autogenerated conversion function. -func Convert_v1alpha4_ClusterStatus_To_v1beta2_ClusterStatus(in *v1alpha4.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterStatus_To_v1beta2_ClusterStatus(in, out, s) -} - -func autoConvert_v1beta2_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in *ControlPlaneComponent, out *v1alpha4.ControlPlaneComponent, s conversion.Scope) error { - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ExtraVolumes = *(*[]v1alpha4.HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) - return nil -} - -// Convert_v1beta2_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent is an autogenerated conversion function. -func Convert_v1beta2_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in *ControlPlaneComponent, out *v1alpha4.ControlPlaneComponent, s conversion.Scope) error { - return autoConvert_v1beta2_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in, out, s) -} - -func autoConvert_v1alpha4_ControlPlaneComponent_To_v1beta2_ControlPlaneComponent(in *v1alpha4.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ExtraVolumes = *(*[]HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) - return nil -} - -// Convert_v1alpha4_ControlPlaneComponent_To_v1beta2_ControlPlaneComponent is an autogenerated conversion function. -func Convert_v1alpha4_ControlPlaneComponent_To_v1beta2_ControlPlaneComponent(in *v1alpha4.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { - return autoConvert_v1alpha4_ControlPlaneComponent_To_v1beta2_ControlPlaneComponent(in, out, s) -} - -func autoConvert_v1beta2_DNS_To_v1alpha4_DNS(in *DNS, out *v1alpha4.DNS, s conversion.Scope) error { - // WARNING: in.Type requires manual conversion: does not exist in peer-type - if err := Convert_v1beta2_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha4_DNS_To_v1beta2_DNS(in *v1alpha4.DNS, out *DNS, s conversion.Scope) error { - if err := Convert_v1alpha4_ImageMeta_To_v1beta2_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_DNS_To_v1beta2_DNS is an autogenerated conversion function. -func Convert_v1alpha4_DNS_To_v1beta2_DNS(in *v1alpha4.DNS, out *DNS, s conversion.Scope) error { - return autoConvert_v1alpha4_DNS_To_v1beta2_DNS(in, out, s) -} - -func autoConvert_v1beta2_Discovery_To_v1alpha4_Discovery(in *Discovery, out *v1alpha4.Discovery, s conversion.Scope) error { - out.BootstrapToken = (*v1alpha4.BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) - out.File = (*v1alpha4.FileDiscovery)(unsafe.Pointer(in.File)) - out.TLSBootstrapToken = in.TLSBootstrapToken - out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) - return nil -} - -// Convert_v1beta2_Discovery_To_v1alpha4_Discovery is an autogenerated conversion function. -func Convert_v1beta2_Discovery_To_v1alpha4_Discovery(in *Discovery, out *v1alpha4.Discovery, s conversion.Scope) error { - return autoConvert_v1beta2_Discovery_To_v1alpha4_Discovery(in, out, s) -} - -func autoConvert_v1alpha4_Discovery_To_v1beta2_Discovery(in *v1alpha4.Discovery, out *Discovery, s conversion.Scope) error { - out.BootstrapToken = (*BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) - out.File = (*FileDiscovery)(unsafe.Pointer(in.File)) - out.TLSBootstrapToken = in.TLSBootstrapToken - out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) - return nil -} - -// Convert_v1alpha4_Discovery_To_v1beta2_Discovery is an autogenerated conversion function. -func Convert_v1alpha4_Discovery_To_v1beta2_Discovery(in *v1alpha4.Discovery, out *Discovery, s conversion.Scope) error { - return autoConvert_v1alpha4_Discovery_To_v1beta2_Discovery(in, out, s) -} - -func autoConvert_v1beta2_Etcd_To_v1alpha4_Etcd(in *Etcd, out *v1alpha4.Etcd, s conversion.Scope) error { - out.Local = (*v1alpha4.LocalEtcd)(unsafe.Pointer(in.Local)) - out.External = (*v1alpha4.ExternalEtcd)(unsafe.Pointer(in.External)) - return nil -} - -// Convert_v1beta2_Etcd_To_v1alpha4_Etcd is an autogenerated conversion function. -func Convert_v1beta2_Etcd_To_v1alpha4_Etcd(in *Etcd, out *v1alpha4.Etcd, s conversion.Scope) error { - return autoConvert_v1beta2_Etcd_To_v1alpha4_Etcd(in, out, s) -} - -func autoConvert_v1alpha4_Etcd_To_v1beta2_Etcd(in *v1alpha4.Etcd, out *Etcd, s conversion.Scope) error { - out.Local = (*LocalEtcd)(unsafe.Pointer(in.Local)) - out.External = (*ExternalEtcd)(unsafe.Pointer(in.External)) - return nil -} - -// Convert_v1alpha4_Etcd_To_v1beta2_Etcd is an autogenerated conversion function. -func Convert_v1alpha4_Etcd_To_v1beta2_Etcd(in *v1alpha4.Etcd, out *Etcd, s conversion.Scope) error { - return autoConvert_v1alpha4_Etcd_To_v1beta2_Etcd(in, out, s) -} - -func autoConvert_v1beta2_ExternalEtcd_To_v1alpha4_ExternalEtcd(in *ExternalEtcd, out *v1alpha4.ExternalEtcd, s conversion.Scope) error { - out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) - out.CAFile = in.CAFile - out.CertFile = in.CertFile - out.KeyFile = in.KeyFile - return nil -} - -// Convert_v1beta2_ExternalEtcd_To_v1alpha4_ExternalEtcd is an autogenerated conversion function. -func Convert_v1beta2_ExternalEtcd_To_v1alpha4_ExternalEtcd(in *ExternalEtcd, out *v1alpha4.ExternalEtcd, s conversion.Scope) error { - return autoConvert_v1beta2_ExternalEtcd_To_v1alpha4_ExternalEtcd(in, out, s) -} - -func autoConvert_v1alpha4_ExternalEtcd_To_v1beta2_ExternalEtcd(in *v1alpha4.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { - out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) - out.CAFile = in.CAFile - out.CertFile = in.CertFile - out.KeyFile = in.KeyFile - return nil -} - -// Convert_v1alpha4_ExternalEtcd_To_v1beta2_ExternalEtcd is an autogenerated conversion function. -func Convert_v1alpha4_ExternalEtcd_To_v1beta2_ExternalEtcd(in *v1alpha4.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { - return autoConvert_v1alpha4_ExternalEtcd_To_v1beta2_ExternalEtcd(in, out, s) -} - -func autoConvert_v1beta2_FileDiscovery_To_v1alpha4_FileDiscovery(in *FileDiscovery, out *v1alpha4.FileDiscovery, s conversion.Scope) error { - out.KubeConfigPath = in.KubeConfigPath - return nil -} - -// Convert_v1beta2_FileDiscovery_To_v1alpha4_FileDiscovery is an autogenerated conversion function. -func Convert_v1beta2_FileDiscovery_To_v1alpha4_FileDiscovery(in *FileDiscovery, out *v1alpha4.FileDiscovery, s conversion.Scope) error { - return autoConvert_v1beta2_FileDiscovery_To_v1alpha4_FileDiscovery(in, out, s) -} - -func autoConvert_v1alpha4_FileDiscovery_To_v1beta2_FileDiscovery(in *v1alpha4.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { - out.KubeConfigPath = in.KubeConfigPath - return nil -} - -// Convert_v1alpha4_FileDiscovery_To_v1beta2_FileDiscovery is an autogenerated conversion function. -func Convert_v1alpha4_FileDiscovery_To_v1beta2_FileDiscovery(in *v1alpha4.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { - return autoConvert_v1alpha4_FileDiscovery_To_v1beta2_FileDiscovery(in, out, s) -} - -func autoConvert_v1beta2_HostPathMount_To_v1alpha4_HostPathMount(in *HostPathMount, out *v1alpha4.HostPathMount, s conversion.Scope) error { - out.Name = in.Name - out.HostPath = in.HostPath - out.MountPath = in.MountPath - out.ReadOnly = in.ReadOnly - out.PathType = corev1.HostPathType(in.PathType) - return nil -} - -// Convert_v1beta2_HostPathMount_To_v1alpha4_HostPathMount is an autogenerated conversion function. -func Convert_v1beta2_HostPathMount_To_v1alpha4_HostPathMount(in *HostPathMount, out *v1alpha4.HostPathMount, s conversion.Scope) error { - return autoConvert_v1beta2_HostPathMount_To_v1alpha4_HostPathMount(in, out, s) -} - -func autoConvert_v1alpha4_HostPathMount_To_v1beta2_HostPathMount(in *v1alpha4.HostPathMount, out *HostPathMount, s conversion.Scope) error { - out.Name = in.Name - out.HostPath = in.HostPath - out.MountPath = in.MountPath - out.ReadOnly = in.ReadOnly - out.PathType = corev1.HostPathType(in.PathType) - return nil -} - -// Convert_v1alpha4_HostPathMount_To_v1beta2_HostPathMount is an autogenerated conversion function. -func Convert_v1alpha4_HostPathMount_To_v1beta2_HostPathMount(in *v1alpha4.HostPathMount, out *HostPathMount, s conversion.Scope) error { - return autoConvert_v1alpha4_HostPathMount_To_v1beta2_HostPathMount(in, out, s) -} - -func autoConvert_v1beta2_ImageMeta_To_v1alpha4_ImageMeta(in *ImageMeta, out *v1alpha4.ImageMeta, s conversion.Scope) error { - out.ImageRepository = in.ImageRepository - out.ImageTag = in.ImageTag - return nil -} - -// Convert_v1beta2_ImageMeta_To_v1alpha4_ImageMeta is an autogenerated conversion function. -func Convert_v1beta2_ImageMeta_To_v1alpha4_ImageMeta(in *ImageMeta, out *v1alpha4.ImageMeta, s conversion.Scope) error { - return autoConvert_v1beta2_ImageMeta_To_v1alpha4_ImageMeta(in, out, s) -} - -func autoConvert_v1alpha4_ImageMeta_To_v1beta2_ImageMeta(in *v1alpha4.ImageMeta, out *ImageMeta, s conversion.Scope) error { - out.ImageRepository = in.ImageRepository - out.ImageTag = in.ImageTag - return nil -} - -// Convert_v1alpha4_ImageMeta_To_v1beta2_ImageMeta is an autogenerated conversion function. -func Convert_v1alpha4_ImageMeta_To_v1beta2_ImageMeta(in *v1alpha4.ImageMeta, out *ImageMeta, s conversion.Scope) error { - return autoConvert_v1alpha4_ImageMeta_To_v1beta2_ImageMeta(in, out, s) -} - -func autoConvert_v1beta2_InitConfiguration_To_v1alpha4_InitConfiguration(in *InitConfiguration, out *v1alpha4.InitConfiguration, s conversion.Scope) error { - out.BootstrapTokens = *(*[]v1alpha4.BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) - if err := Convert_v1beta2_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - if err := Convert_v1beta2_APIEndpoint_To_v1alpha4_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - // WARNING: in.CertificateKey requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_InitConfiguration_To_v1beta2_InitConfiguration(in *v1alpha4.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { - out.BootstrapTokens = *(*[]BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) - if err := Convert_v1alpha4_NodeRegistrationOptions_To_v1beta2_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - if err := Convert_v1alpha4_APIEndpoint_To_v1beta2_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_InitConfiguration_To_v1beta2_InitConfiguration is an autogenerated conversion function. -func Convert_v1alpha4_InitConfiguration_To_v1beta2_InitConfiguration(in *v1alpha4.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha4_InitConfiguration_To_v1beta2_InitConfiguration(in, out, s) -} - -func autoConvert_v1beta2_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *JoinConfiguration, out *v1alpha4.JoinConfiguration, s conversion.Scope) error { - if err := Convert_v1beta2_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - out.CACertPath = in.CACertPath - if err := Convert_v1beta2_Discovery_To_v1alpha4_Discovery(&in.Discovery, &out.Discovery, s); err != nil { - return err - } - if in.ControlPlane != nil { - in, out := &in.ControlPlane, &out.ControlPlane - *out = new(v1alpha4.JoinControlPlane) - if err := Convert_v1beta2_JoinControlPlane_To_v1alpha4_JoinControlPlane(*in, *out, s); err != nil { - return err - } - } else { - out.ControlPlane = nil - } - return nil -} - -// Convert_v1beta2_JoinConfiguration_To_v1alpha4_JoinConfiguration is an autogenerated conversion function. -func Convert_v1beta2_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *JoinConfiguration, out *v1alpha4.JoinConfiguration, s conversion.Scope) error { - return autoConvert_v1beta2_JoinConfiguration_To_v1alpha4_JoinConfiguration(in, out, s) -} - -func autoConvert_v1alpha4_JoinConfiguration_To_v1beta2_JoinConfiguration(in *v1alpha4.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha4_NodeRegistrationOptions_To_v1beta2_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - out.CACertPath = in.CACertPath - if err := Convert_v1alpha4_Discovery_To_v1beta2_Discovery(&in.Discovery, &out.Discovery, s); err != nil { - return err - } - if in.ControlPlane != nil { - in, out := &in.ControlPlane, &out.ControlPlane - *out = new(JoinControlPlane) - if err := Convert_v1alpha4_JoinControlPlane_To_v1beta2_JoinControlPlane(*in, *out, s); err != nil { - return err - } - } else { - out.ControlPlane = nil - } - return nil -} - -// Convert_v1alpha4_JoinConfiguration_To_v1beta2_JoinConfiguration is an autogenerated conversion function. -func Convert_v1alpha4_JoinConfiguration_To_v1beta2_JoinConfiguration(in *v1alpha4.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha4_JoinConfiguration_To_v1beta2_JoinConfiguration(in, out, s) -} - -func autoConvert_v1beta2_JoinControlPlane_To_v1alpha4_JoinControlPlane(in *JoinControlPlane, out *v1alpha4.JoinControlPlane, s conversion.Scope) error { - if err := Convert_v1beta2_APIEndpoint_To_v1alpha4_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - // WARNING: in.CertificateKey requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_JoinControlPlane_To_v1beta2_JoinControlPlane(in *v1alpha4.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { - if err := Convert_v1alpha4_APIEndpoint_To_v1beta2_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_JoinControlPlane_To_v1beta2_JoinControlPlane is an autogenerated conversion function. -func Convert_v1alpha4_JoinControlPlane_To_v1beta2_JoinControlPlane(in *v1alpha4.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { - return autoConvert_v1alpha4_JoinControlPlane_To_v1beta2_JoinControlPlane(in, out, s) -} - -func autoConvert_v1beta2_LocalEtcd_To_v1alpha4_LocalEtcd(in *LocalEtcd, out *v1alpha4.LocalEtcd, s conversion.Scope) error { - if err := Convert_v1beta2_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - out.DataDir = in.DataDir - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) - out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) - return nil -} - -// Convert_v1beta2_LocalEtcd_To_v1alpha4_LocalEtcd is an autogenerated conversion function. -func Convert_v1beta2_LocalEtcd_To_v1alpha4_LocalEtcd(in *LocalEtcd, out *v1alpha4.LocalEtcd, s conversion.Scope) error { - return autoConvert_v1beta2_LocalEtcd_To_v1alpha4_LocalEtcd(in, out, s) -} - -func autoConvert_v1alpha4_LocalEtcd_To_v1beta2_LocalEtcd(in *v1alpha4.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { - if err := Convert_v1alpha4_ImageMeta_To_v1beta2_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - out.DataDir = in.DataDir - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) - out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) - return nil -} - -// Convert_v1alpha4_LocalEtcd_To_v1beta2_LocalEtcd is an autogenerated conversion function. -func Convert_v1alpha4_LocalEtcd_To_v1beta2_LocalEtcd(in *v1alpha4.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { - return autoConvert_v1alpha4_LocalEtcd_To_v1beta2_LocalEtcd(in, out, s) -} - -func autoConvert_v1beta2_Networking_To_v1alpha4_Networking(in *Networking, out *v1alpha4.Networking, s conversion.Scope) error { - out.ServiceSubnet = in.ServiceSubnet - out.PodSubnet = in.PodSubnet - out.DNSDomain = in.DNSDomain - return nil -} - -// Convert_v1beta2_Networking_To_v1alpha4_Networking is an autogenerated conversion function. -func Convert_v1beta2_Networking_To_v1alpha4_Networking(in *Networking, out *v1alpha4.Networking, s conversion.Scope) error { - return autoConvert_v1beta2_Networking_To_v1alpha4_Networking(in, out, s) -} - -func autoConvert_v1alpha4_Networking_To_v1beta2_Networking(in *v1alpha4.Networking, out *Networking, s conversion.Scope) error { - out.ServiceSubnet = in.ServiceSubnet - out.PodSubnet = in.PodSubnet - out.DNSDomain = in.DNSDomain - return nil -} - -// Convert_v1alpha4_Networking_To_v1beta2_Networking is an autogenerated conversion function. -func Convert_v1alpha4_Networking_To_v1beta2_Networking(in *v1alpha4.Networking, out *Networking, s conversion.Scope) error { - return autoConvert_v1alpha4_Networking_To_v1beta2_Networking(in, out, s) -} - -func autoConvert_v1beta2_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1alpha4.NodeRegistrationOptions, s conversion.Scope) error { - out.Name = in.Name - out.CRISocket = in.CRISocket - out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) - out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) - out.IgnorePreflightErrors = *(*[]string)(unsafe.Pointer(&in.IgnorePreflightErrors)) - return nil -} - -// Convert_v1beta2_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions is an autogenerated conversion function. -func Convert_v1beta2_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1alpha4.NodeRegistrationOptions, s conversion.Scope) error { - return autoConvert_v1beta2_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in, out, s) -} - -func autoConvert_v1alpha4_NodeRegistrationOptions_To_v1beta2_NodeRegistrationOptions(in *v1alpha4.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { - out.Name = in.Name - out.CRISocket = in.CRISocket - out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) - out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) - out.IgnorePreflightErrors = *(*[]string)(unsafe.Pointer(&in.IgnorePreflightErrors)) - return nil -} - -// Convert_v1alpha4_NodeRegistrationOptions_To_v1beta2_NodeRegistrationOptions is an autogenerated conversion function. -func Convert_v1alpha4_NodeRegistrationOptions_To_v1beta2_NodeRegistrationOptions(in *v1alpha4.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { - return autoConvert_v1alpha4_NodeRegistrationOptions_To_v1beta2_NodeRegistrationOptions(in, out, s) -} diff --git a/bootstrap/kubeadm/types/v1beta3/zz_generated.conversion.go b/bootstrap/kubeadm/types/v1beta3/zz_generated.conversion.go deleted file mode 100644 index 610fe377a435..000000000000 --- a/bootstrap/kubeadm/types/v1beta3/zz_generated.conversion.go +++ /dev/null @@ -1,799 +0,0 @@ -// +build !ignore_autogenerated_kubeadm_bootstrap_v1alpha3 - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1beta3 - -import ( - unsafe "unsafe" - - corev1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - v1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" -) - -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((*APIEndpoint)(nil), (*v1alpha4.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_APIEndpoint_To_v1alpha4_APIEndpoint(a.(*APIEndpoint), b.(*v1alpha4.APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIEndpoint_To_v1beta3_APIEndpoint(a.(*v1alpha4.APIEndpoint), b.(*APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServer)(nil), (*v1alpha4.APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_APIServer_To_v1alpha4_APIServer(a.(*APIServer), b.(*v1alpha4.APIServer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.APIServer)(nil), (*APIServer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIServer_To_v1beta3_APIServer(a.(*v1alpha4.APIServer), b.(*APIServer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BootstrapToken)(nil), (*v1alpha4.BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_BootstrapToken_To_v1alpha4_BootstrapToken(a.(*BootstrapToken), b.(*v1alpha4.BootstrapToken), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.BootstrapToken)(nil), (*BootstrapToken)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BootstrapToken_To_v1beta3_BootstrapToken(a.(*v1alpha4.BootstrapToken), b.(*BootstrapToken), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BootstrapTokenDiscovery)(nil), (*v1alpha4.BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(a.(*BootstrapTokenDiscovery), b.(*v1alpha4.BootstrapTokenDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.BootstrapTokenDiscovery)(nil), (*BootstrapTokenDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta3_BootstrapTokenDiscovery(a.(*v1alpha4.BootstrapTokenDiscovery), b.(*BootstrapTokenDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BootstrapTokenString)(nil), (*v1alpha4.BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(a.(*BootstrapTokenString), b.(*v1alpha4.BootstrapTokenString), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.BootstrapTokenString)(nil), (*BootstrapTokenString)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BootstrapTokenString_To_v1beta3_BootstrapTokenString(a.(*v1alpha4.BootstrapTokenString), b.(*BootstrapTokenString), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClusterConfiguration)(nil), (*v1alpha4.ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(a.(*ClusterConfiguration), b.(*v1alpha4.ClusterConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterConfiguration)(nil), (*ClusterConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterConfiguration_To_v1beta3_ClusterConfiguration(a.(*v1alpha4.ClusterConfiguration), b.(*ClusterConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ControlPlaneComponent)(nil), (*v1alpha4.ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(a.(*ControlPlaneComponent), b.(*v1alpha4.ControlPlaneComponent), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ControlPlaneComponent)(nil), (*ControlPlaneComponent)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ControlPlaneComponent_To_v1beta3_ControlPlaneComponent(a.(*v1alpha4.ControlPlaneComponent), b.(*ControlPlaneComponent), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DNS)(nil), (*v1alpha4.DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_DNS_To_v1alpha4_DNS(a.(*DNS), b.(*v1alpha4.DNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DNS)(nil), (*DNS)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DNS_To_v1beta3_DNS(a.(*v1alpha4.DNS), b.(*DNS), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Discovery)(nil), (*v1alpha4.Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_Discovery_To_v1alpha4_Discovery(a.(*Discovery), b.(*v1alpha4.Discovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Discovery)(nil), (*Discovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Discovery_To_v1beta3_Discovery(a.(*v1alpha4.Discovery), b.(*Discovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Etcd)(nil), (*v1alpha4.Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_Etcd_To_v1alpha4_Etcd(a.(*Etcd), b.(*v1alpha4.Etcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Etcd)(nil), (*Etcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Etcd_To_v1beta3_Etcd(a.(*v1alpha4.Etcd), b.(*Etcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ExternalEtcd)(nil), (*v1alpha4.ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_ExternalEtcd_To_v1alpha4_ExternalEtcd(a.(*ExternalEtcd), b.(*v1alpha4.ExternalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ExternalEtcd)(nil), (*ExternalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ExternalEtcd_To_v1beta3_ExternalEtcd(a.(*v1alpha4.ExternalEtcd), b.(*ExternalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FileDiscovery)(nil), (*v1alpha4.FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_FileDiscovery_To_v1alpha4_FileDiscovery(a.(*FileDiscovery), b.(*v1alpha4.FileDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.FileDiscovery)(nil), (*FileDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_FileDiscovery_To_v1beta3_FileDiscovery(a.(*v1alpha4.FileDiscovery), b.(*FileDiscovery), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*HostPathMount)(nil), (*v1alpha4.HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_HostPathMount_To_v1alpha4_HostPathMount(a.(*HostPathMount), b.(*v1alpha4.HostPathMount), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.HostPathMount)(nil), (*HostPathMount)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_HostPathMount_To_v1beta3_HostPathMount(a.(*v1alpha4.HostPathMount), b.(*HostPathMount), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ImageMeta)(nil), (*v1alpha4.ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_ImageMeta_To_v1alpha4_ImageMeta(a.(*ImageMeta), b.(*v1alpha4.ImageMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ImageMeta)(nil), (*ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ImageMeta_To_v1beta3_ImageMeta(a.(*v1alpha4.ImageMeta), b.(*ImageMeta), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.InitConfiguration)(nil), (*InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_InitConfiguration_To_v1beta3_InitConfiguration(a.(*v1alpha4.InitConfiguration), b.(*InitConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.JoinConfiguration)(nil), (*JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_JoinConfiguration_To_v1beta3_JoinConfiguration(a.(*v1alpha4.JoinConfiguration), b.(*JoinConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.JoinControlPlane)(nil), (*JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_JoinControlPlane_To_v1beta3_JoinControlPlane(a.(*v1alpha4.JoinControlPlane), b.(*JoinControlPlane), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*LocalEtcd)(nil), (*v1alpha4.LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_LocalEtcd_To_v1alpha4_LocalEtcd(a.(*LocalEtcd), b.(*v1alpha4.LocalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.LocalEtcd)(nil), (*LocalEtcd)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_LocalEtcd_To_v1beta3_LocalEtcd(a.(*v1alpha4.LocalEtcd), b.(*LocalEtcd), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Networking)(nil), (*v1alpha4.Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_Networking_To_v1alpha4_Networking(a.(*Networking), b.(*v1alpha4.Networking), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Networking)(nil), (*Networking)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Networking_To_v1beta3_Networking(a.(*v1alpha4.Networking), b.(*Networking), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha4.NodeRegistrationOptions)(nil), (*NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NodeRegistrationOptions_To_v1beta3_NodeRegistrationOptions(a.(*v1alpha4.NodeRegistrationOptions), b.(*NodeRegistrationOptions), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*InitConfiguration)(nil), (*v1alpha4.InitConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_InitConfiguration_To_v1alpha4_InitConfiguration(a.(*InitConfiguration), b.(*v1alpha4.InitConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*JoinConfiguration)(nil), (*v1alpha4.JoinConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_JoinConfiguration_To_v1alpha4_JoinConfiguration(a.(*JoinConfiguration), b.(*v1alpha4.JoinConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*JoinControlPlane)(nil), (*v1alpha4.JoinControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_JoinControlPlane_To_v1alpha4_JoinControlPlane(a.(*JoinControlPlane), b.(*v1alpha4.JoinControlPlane), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*NodeRegistrationOptions)(nil), (*v1alpha4.NodeRegistrationOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta3_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(a.(*NodeRegistrationOptions), b.(*v1alpha4.NodeRegistrationOptions), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta3_APIEndpoint_To_v1alpha4_APIEndpoint(in *APIEndpoint, out *v1alpha4.APIEndpoint, s conversion.Scope) error { - out.AdvertiseAddress = in.AdvertiseAddress - out.BindPort = in.BindPort - return nil -} - -// Convert_v1beta3_APIEndpoint_To_v1alpha4_APIEndpoint is an autogenerated conversion function. -func Convert_v1beta3_APIEndpoint_To_v1alpha4_APIEndpoint(in *APIEndpoint, out *v1alpha4.APIEndpoint, s conversion.Scope) error { - return autoConvert_v1beta3_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) -} - -func autoConvert_v1alpha4_APIEndpoint_To_v1beta3_APIEndpoint(in *v1alpha4.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - out.AdvertiseAddress = in.AdvertiseAddress - out.BindPort = in.BindPort - return nil -} - -// Convert_v1alpha4_APIEndpoint_To_v1beta3_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha4_APIEndpoint_To_v1beta3_APIEndpoint(in *v1alpha4.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - return autoConvert_v1alpha4_APIEndpoint_To_v1beta3_APIEndpoint(in, out, s) -} - -func autoConvert_v1beta3_APIServer_To_v1alpha4_APIServer(in *APIServer, out *v1alpha4.APIServer, s conversion.Scope) error { - if err := Convert_v1beta3_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { - return err - } - out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) - out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) - return nil -} - -// Convert_v1beta3_APIServer_To_v1alpha4_APIServer is an autogenerated conversion function. -func Convert_v1beta3_APIServer_To_v1alpha4_APIServer(in *APIServer, out *v1alpha4.APIServer, s conversion.Scope) error { - return autoConvert_v1beta3_APIServer_To_v1alpha4_APIServer(in, out, s) -} - -func autoConvert_v1alpha4_APIServer_To_v1beta3_APIServer(in *v1alpha4.APIServer, out *APIServer, s conversion.Scope) error { - if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta3_ControlPlaneComponent(&in.ControlPlaneComponent, &out.ControlPlaneComponent, s); err != nil { - return err - } - out.CertSANs = *(*[]string)(unsafe.Pointer(&in.CertSANs)) - out.TimeoutForControlPlane = (*v1.Duration)(unsafe.Pointer(in.TimeoutForControlPlane)) - return nil -} - -// Convert_v1alpha4_APIServer_To_v1beta3_APIServer is an autogenerated conversion function. -func Convert_v1alpha4_APIServer_To_v1beta3_APIServer(in *v1alpha4.APIServer, out *APIServer, s conversion.Scope) error { - return autoConvert_v1alpha4_APIServer_To_v1beta3_APIServer(in, out, s) -} - -func autoConvert_v1beta3_BootstrapToken_To_v1alpha4_BootstrapToken(in *BootstrapToken, out *v1alpha4.BootstrapToken, s conversion.Scope) error { - out.Token = (*v1alpha4.BootstrapTokenString)(unsafe.Pointer(in.Token)) - out.Description = in.Description - out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) - out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) - out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - return nil -} - -// Convert_v1beta3_BootstrapToken_To_v1alpha4_BootstrapToken is an autogenerated conversion function. -func Convert_v1beta3_BootstrapToken_To_v1alpha4_BootstrapToken(in *BootstrapToken, out *v1alpha4.BootstrapToken, s conversion.Scope) error { - return autoConvert_v1beta3_BootstrapToken_To_v1alpha4_BootstrapToken(in, out, s) -} - -func autoConvert_v1alpha4_BootstrapToken_To_v1beta3_BootstrapToken(in *v1alpha4.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { - out.Token = (*BootstrapTokenString)(unsafe.Pointer(in.Token)) - out.Description = in.Description - out.TTL = (*v1.Duration)(unsafe.Pointer(in.TTL)) - out.Expires = (*v1.Time)(unsafe.Pointer(in.Expires)) - out.Usages = *(*[]string)(unsafe.Pointer(&in.Usages)) - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - return nil -} - -// Convert_v1alpha4_BootstrapToken_To_v1beta3_BootstrapToken is an autogenerated conversion function. -func Convert_v1alpha4_BootstrapToken_To_v1beta3_BootstrapToken(in *v1alpha4.BootstrapToken, out *BootstrapToken, s conversion.Scope) error { - return autoConvert_v1alpha4_BootstrapToken_To_v1beta3_BootstrapToken(in, out, s) -} - -func autoConvert_v1beta3_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1alpha4.BootstrapTokenDiscovery, s conversion.Scope) error { - out.Token = in.Token - out.APIServerEndpoint = in.APIServerEndpoint - out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) - out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification - return nil -} - -// Convert_v1beta3_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery is an autogenerated conversion function. -func Convert_v1beta3_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in *BootstrapTokenDiscovery, out *v1alpha4.BootstrapTokenDiscovery, s conversion.Scope) error { - return autoConvert_v1beta3_BootstrapTokenDiscovery_To_v1alpha4_BootstrapTokenDiscovery(in, out, s) -} - -func autoConvert_v1alpha4_BootstrapTokenDiscovery_To_v1beta3_BootstrapTokenDiscovery(in *v1alpha4.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { - out.Token = in.Token - out.APIServerEndpoint = in.APIServerEndpoint - out.CACertHashes = *(*[]string)(unsafe.Pointer(&in.CACertHashes)) - out.UnsafeSkipCAVerification = in.UnsafeSkipCAVerification - return nil -} - -// Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta3_BootstrapTokenDiscovery is an autogenerated conversion function. -func Convert_v1alpha4_BootstrapTokenDiscovery_To_v1beta3_BootstrapTokenDiscovery(in *v1alpha4.BootstrapTokenDiscovery, out *BootstrapTokenDiscovery, s conversion.Scope) error { - return autoConvert_v1alpha4_BootstrapTokenDiscovery_To_v1beta3_BootstrapTokenDiscovery(in, out, s) -} - -func autoConvert_v1beta3_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *BootstrapTokenString, out *v1alpha4.BootstrapTokenString, s conversion.Scope) error { - out.ID = in.ID - out.Secret = in.Secret - return nil -} - -// Convert_v1beta3_BootstrapTokenString_To_v1alpha4_BootstrapTokenString is an autogenerated conversion function. -func Convert_v1beta3_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in *BootstrapTokenString, out *v1alpha4.BootstrapTokenString, s conversion.Scope) error { - return autoConvert_v1beta3_BootstrapTokenString_To_v1alpha4_BootstrapTokenString(in, out, s) -} - -func autoConvert_v1alpha4_BootstrapTokenString_To_v1beta3_BootstrapTokenString(in *v1alpha4.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { - out.ID = in.ID - out.Secret = in.Secret - return nil -} - -// Convert_v1alpha4_BootstrapTokenString_To_v1beta3_BootstrapTokenString is an autogenerated conversion function. -func Convert_v1alpha4_BootstrapTokenString_To_v1beta3_BootstrapTokenString(in *v1alpha4.BootstrapTokenString, out *BootstrapTokenString, s conversion.Scope) error { - return autoConvert_v1alpha4_BootstrapTokenString_To_v1beta3_BootstrapTokenString(in, out, s) -} - -func autoConvert_v1beta3_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *ClusterConfiguration, out *v1alpha4.ClusterConfiguration, s conversion.Scope) error { - if err := Convert_v1beta3_Etcd_To_v1alpha4_Etcd(&in.Etcd, &out.Etcd, s); err != nil { - return err - } - if err := Convert_v1beta3_Networking_To_v1alpha4_Networking(&in.Networking, &out.Networking, s); err != nil { - return err - } - out.KubernetesVersion = in.KubernetesVersion - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if err := Convert_v1beta3_APIServer_To_v1alpha4_APIServer(&in.APIServer, &out.APIServer, s); err != nil { - return err - } - if err := Convert_v1beta3_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { - return err - } - if err := Convert_v1beta3_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { - return err - } - if err := Convert_v1beta3_DNS_To_v1alpha4_DNS(&in.DNS, &out.DNS, s); err != nil { - return err - } - out.CertificatesDir = in.CertificatesDir - out.ImageRepository = in.ImageRepository - out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) - out.ClusterName = in.ClusterName - return nil -} - -// Convert_v1beta3_ClusterConfiguration_To_v1alpha4_ClusterConfiguration is an autogenerated conversion function. -func Convert_v1beta3_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in *ClusterConfiguration, out *v1alpha4.ClusterConfiguration, s conversion.Scope) error { - return autoConvert_v1beta3_ClusterConfiguration_To_v1alpha4_ClusterConfiguration(in, out, s) -} - -func autoConvert_v1alpha4_ClusterConfiguration_To_v1beta3_ClusterConfiguration(in *v1alpha4.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha4_Etcd_To_v1beta3_Etcd(&in.Etcd, &out.Etcd, s); err != nil { - return err - } - if err := Convert_v1alpha4_Networking_To_v1beta3_Networking(&in.Networking, &out.Networking, s); err != nil { - return err - } - out.KubernetesVersion = in.KubernetesVersion - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if err := Convert_v1alpha4_APIServer_To_v1beta3_APIServer(&in.APIServer, &out.APIServer, s); err != nil { - return err - } - if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta3_ControlPlaneComponent(&in.ControllerManager, &out.ControllerManager, s); err != nil { - return err - } - if err := Convert_v1alpha4_ControlPlaneComponent_To_v1beta3_ControlPlaneComponent(&in.Scheduler, &out.Scheduler, s); err != nil { - return err - } - if err := Convert_v1alpha4_DNS_To_v1beta3_DNS(&in.DNS, &out.DNS, s); err != nil { - return err - } - out.CertificatesDir = in.CertificatesDir - out.ImageRepository = in.ImageRepository - out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) - out.ClusterName = in.ClusterName - return nil -} - -// Convert_v1alpha4_ClusterConfiguration_To_v1beta3_ClusterConfiguration is an autogenerated conversion function. -func Convert_v1alpha4_ClusterConfiguration_To_v1beta3_ClusterConfiguration(in *v1alpha4.ClusterConfiguration, out *ClusterConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterConfiguration_To_v1beta3_ClusterConfiguration(in, out, s) -} - -func autoConvert_v1beta3_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in *ControlPlaneComponent, out *v1alpha4.ControlPlaneComponent, s conversion.Scope) error { - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ExtraVolumes = *(*[]v1alpha4.HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) - return nil -} - -// Convert_v1beta3_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent is an autogenerated conversion function. -func Convert_v1beta3_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in *ControlPlaneComponent, out *v1alpha4.ControlPlaneComponent, s conversion.Scope) error { - return autoConvert_v1beta3_ControlPlaneComponent_To_v1alpha4_ControlPlaneComponent(in, out, s) -} - -func autoConvert_v1alpha4_ControlPlaneComponent_To_v1beta3_ControlPlaneComponent(in *v1alpha4.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ExtraVolumes = *(*[]HostPathMount)(unsafe.Pointer(&in.ExtraVolumes)) - return nil -} - -// Convert_v1alpha4_ControlPlaneComponent_To_v1beta3_ControlPlaneComponent is an autogenerated conversion function. -func Convert_v1alpha4_ControlPlaneComponent_To_v1beta3_ControlPlaneComponent(in *v1alpha4.ControlPlaneComponent, out *ControlPlaneComponent, s conversion.Scope) error { - return autoConvert_v1alpha4_ControlPlaneComponent_To_v1beta3_ControlPlaneComponent(in, out, s) -} - -func autoConvert_v1beta3_DNS_To_v1alpha4_DNS(in *DNS, out *v1alpha4.DNS, s conversion.Scope) error { - if err := Convert_v1beta3_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta3_DNS_To_v1alpha4_DNS is an autogenerated conversion function. -func Convert_v1beta3_DNS_To_v1alpha4_DNS(in *DNS, out *v1alpha4.DNS, s conversion.Scope) error { - return autoConvert_v1beta3_DNS_To_v1alpha4_DNS(in, out, s) -} - -func autoConvert_v1alpha4_DNS_To_v1beta3_DNS(in *v1alpha4.DNS, out *DNS, s conversion.Scope) error { - if err := Convert_v1alpha4_ImageMeta_To_v1beta3_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_DNS_To_v1beta3_DNS is an autogenerated conversion function. -func Convert_v1alpha4_DNS_To_v1beta3_DNS(in *v1alpha4.DNS, out *DNS, s conversion.Scope) error { - return autoConvert_v1alpha4_DNS_To_v1beta3_DNS(in, out, s) -} - -func autoConvert_v1beta3_Discovery_To_v1alpha4_Discovery(in *Discovery, out *v1alpha4.Discovery, s conversion.Scope) error { - out.BootstrapToken = (*v1alpha4.BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) - out.File = (*v1alpha4.FileDiscovery)(unsafe.Pointer(in.File)) - out.TLSBootstrapToken = in.TLSBootstrapToken - out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) - return nil -} - -// Convert_v1beta3_Discovery_To_v1alpha4_Discovery is an autogenerated conversion function. -func Convert_v1beta3_Discovery_To_v1alpha4_Discovery(in *Discovery, out *v1alpha4.Discovery, s conversion.Scope) error { - return autoConvert_v1beta3_Discovery_To_v1alpha4_Discovery(in, out, s) -} - -func autoConvert_v1alpha4_Discovery_To_v1beta3_Discovery(in *v1alpha4.Discovery, out *Discovery, s conversion.Scope) error { - out.BootstrapToken = (*BootstrapTokenDiscovery)(unsafe.Pointer(in.BootstrapToken)) - out.File = (*FileDiscovery)(unsafe.Pointer(in.File)) - out.TLSBootstrapToken = in.TLSBootstrapToken - out.Timeout = (*v1.Duration)(unsafe.Pointer(in.Timeout)) - return nil -} - -// Convert_v1alpha4_Discovery_To_v1beta3_Discovery is an autogenerated conversion function. -func Convert_v1alpha4_Discovery_To_v1beta3_Discovery(in *v1alpha4.Discovery, out *Discovery, s conversion.Scope) error { - return autoConvert_v1alpha4_Discovery_To_v1beta3_Discovery(in, out, s) -} - -func autoConvert_v1beta3_Etcd_To_v1alpha4_Etcd(in *Etcd, out *v1alpha4.Etcd, s conversion.Scope) error { - out.Local = (*v1alpha4.LocalEtcd)(unsafe.Pointer(in.Local)) - out.External = (*v1alpha4.ExternalEtcd)(unsafe.Pointer(in.External)) - return nil -} - -// Convert_v1beta3_Etcd_To_v1alpha4_Etcd is an autogenerated conversion function. -func Convert_v1beta3_Etcd_To_v1alpha4_Etcd(in *Etcd, out *v1alpha4.Etcd, s conversion.Scope) error { - return autoConvert_v1beta3_Etcd_To_v1alpha4_Etcd(in, out, s) -} - -func autoConvert_v1alpha4_Etcd_To_v1beta3_Etcd(in *v1alpha4.Etcd, out *Etcd, s conversion.Scope) error { - out.Local = (*LocalEtcd)(unsafe.Pointer(in.Local)) - out.External = (*ExternalEtcd)(unsafe.Pointer(in.External)) - return nil -} - -// Convert_v1alpha4_Etcd_To_v1beta3_Etcd is an autogenerated conversion function. -func Convert_v1alpha4_Etcd_To_v1beta3_Etcd(in *v1alpha4.Etcd, out *Etcd, s conversion.Scope) error { - return autoConvert_v1alpha4_Etcd_To_v1beta3_Etcd(in, out, s) -} - -func autoConvert_v1beta3_ExternalEtcd_To_v1alpha4_ExternalEtcd(in *ExternalEtcd, out *v1alpha4.ExternalEtcd, s conversion.Scope) error { - out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) - out.CAFile = in.CAFile - out.CertFile = in.CertFile - out.KeyFile = in.KeyFile - return nil -} - -// Convert_v1beta3_ExternalEtcd_To_v1alpha4_ExternalEtcd is an autogenerated conversion function. -func Convert_v1beta3_ExternalEtcd_To_v1alpha4_ExternalEtcd(in *ExternalEtcd, out *v1alpha4.ExternalEtcd, s conversion.Scope) error { - return autoConvert_v1beta3_ExternalEtcd_To_v1alpha4_ExternalEtcd(in, out, s) -} - -func autoConvert_v1alpha4_ExternalEtcd_To_v1beta3_ExternalEtcd(in *v1alpha4.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { - out.Endpoints = *(*[]string)(unsafe.Pointer(&in.Endpoints)) - out.CAFile = in.CAFile - out.CertFile = in.CertFile - out.KeyFile = in.KeyFile - return nil -} - -// Convert_v1alpha4_ExternalEtcd_To_v1beta3_ExternalEtcd is an autogenerated conversion function. -func Convert_v1alpha4_ExternalEtcd_To_v1beta3_ExternalEtcd(in *v1alpha4.ExternalEtcd, out *ExternalEtcd, s conversion.Scope) error { - return autoConvert_v1alpha4_ExternalEtcd_To_v1beta3_ExternalEtcd(in, out, s) -} - -func autoConvert_v1beta3_FileDiscovery_To_v1alpha4_FileDiscovery(in *FileDiscovery, out *v1alpha4.FileDiscovery, s conversion.Scope) error { - out.KubeConfigPath = in.KubeConfigPath - return nil -} - -// Convert_v1beta3_FileDiscovery_To_v1alpha4_FileDiscovery is an autogenerated conversion function. -func Convert_v1beta3_FileDiscovery_To_v1alpha4_FileDiscovery(in *FileDiscovery, out *v1alpha4.FileDiscovery, s conversion.Scope) error { - return autoConvert_v1beta3_FileDiscovery_To_v1alpha4_FileDiscovery(in, out, s) -} - -func autoConvert_v1alpha4_FileDiscovery_To_v1beta3_FileDiscovery(in *v1alpha4.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { - out.KubeConfigPath = in.KubeConfigPath - return nil -} - -// Convert_v1alpha4_FileDiscovery_To_v1beta3_FileDiscovery is an autogenerated conversion function. -func Convert_v1alpha4_FileDiscovery_To_v1beta3_FileDiscovery(in *v1alpha4.FileDiscovery, out *FileDiscovery, s conversion.Scope) error { - return autoConvert_v1alpha4_FileDiscovery_To_v1beta3_FileDiscovery(in, out, s) -} - -func autoConvert_v1beta3_HostPathMount_To_v1alpha4_HostPathMount(in *HostPathMount, out *v1alpha4.HostPathMount, s conversion.Scope) error { - out.Name = in.Name - out.HostPath = in.HostPath - out.MountPath = in.MountPath - out.ReadOnly = in.ReadOnly - out.PathType = corev1.HostPathType(in.PathType) - return nil -} - -// Convert_v1beta3_HostPathMount_To_v1alpha4_HostPathMount is an autogenerated conversion function. -func Convert_v1beta3_HostPathMount_To_v1alpha4_HostPathMount(in *HostPathMount, out *v1alpha4.HostPathMount, s conversion.Scope) error { - return autoConvert_v1beta3_HostPathMount_To_v1alpha4_HostPathMount(in, out, s) -} - -func autoConvert_v1alpha4_HostPathMount_To_v1beta3_HostPathMount(in *v1alpha4.HostPathMount, out *HostPathMount, s conversion.Scope) error { - out.Name = in.Name - out.HostPath = in.HostPath - out.MountPath = in.MountPath - out.ReadOnly = in.ReadOnly - out.PathType = corev1.HostPathType(in.PathType) - return nil -} - -// Convert_v1alpha4_HostPathMount_To_v1beta3_HostPathMount is an autogenerated conversion function. -func Convert_v1alpha4_HostPathMount_To_v1beta3_HostPathMount(in *v1alpha4.HostPathMount, out *HostPathMount, s conversion.Scope) error { - return autoConvert_v1alpha4_HostPathMount_To_v1beta3_HostPathMount(in, out, s) -} - -func autoConvert_v1beta3_ImageMeta_To_v1alpha4_ImageMeta(in *ImageMeta, out *v1alpha4.ImageMeta, s conversion.Scope) error { - out.ImageRepository = in.ImageRepository - out.ImageTag = in.ImageTag - return nil -} - -// Convert_v1beta3_ImageMeta_To_v1alpha4_ImageMeta is an autogenerated conversion function. -func Convert_v1beta3_ImageMeta_To_v1alpha4_ImageMeta(in *ImageMeta, out *v1alpha4.ImageMeta, s conversion.Scope) error { - return autoConvert_v1beta3_ImageMeta_To_v1alpha4_ImageMeta(in, out, s) -} - -func autoConvert_v1alpha4_ImageMeta_To_v1beta3_ImageMeta(in *v1alpha4.ImageMeta, out *ImageMeta, s conversion.Scope) error { - out.ImageRepository = in.ImageRepository - out.ImageTag = in.ImageTag - return nil -} - -// Convert_v1alpha4_ImageMeta_To_v1beta3_ImageMeta is an autogenerated conversion function. -func Convert_v1alpha4_ImageMeta_To_v1beta3_ImageMeta(in *v1alpha4.ImageMeta, out *ImageMeta, s conversion.Scope) error { - return autoConvert_v1alpha4_ImageMeta_To_v1beta3_ImageMeta(in, out, s) -} - -func autoConvert_v1beta3_InitConfiguration_To_v1alpha4_InitConfiguration(in *InitConfiguration, out *v1alpha4.InitConfiguration, s conversion.Scope) error { - out.BootstrapTokens = *(*[]v1alpha4.BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) - if err := Convert_v1beta3_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - if err := Convert_v1beta3_APIEndpoint_To_v1alpha4_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - // WARNING: in.CertificateKey requires manual conversion: does not exist in peer-type - // WARNING: in.SkipPhases requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_InitConfiguration_To_v1beta3_InitConfiguration(in *v1alpha4.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { - out.BootstrapTokens = *(*[]BootstrapToken)(unsafe.Pointer(&in.BootstrapTokens)) - if err := Convert_v1alpha4_NodeRegistrationOptions_To_v1beta3_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - if err := Convert_v1alpha4_APIEndpoint_To_v1beta3_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_InitConfiguration_To_v1beta3_InitConfiguration is an autogenerated conversion function. -func Convert_v1alpha4_InitConfiguration_To_v1beta3_InitConfiguration(in *v1alpha4.InitConfiguration, out *InitConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha4_InitConfiguration_To_v1beta3_InitConfiguration(in, out, s) -} - -func autoConvert_v1beta3_JoinConfiguration_To_v1alpha4_JoinConfiguration(in *JoinConfiguration, out *v1alpha4.JoinConfiguration, s conversion.Scope) error { - if err := Convert_v1beta3_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - out.CACertPath = in.CACertPath - if err := Convert_v1beta3_Discovery_To_v1alpha4_Discovery(&in.Discovery, &out.Discovery, s); err != nil { - return err - } - if in.ControlPlane != nil { - in, out := &in.ControlPlane, &out.ControlPlane - *out = new(v1alpha4.JoinControlPlane) - if err := Convert_v1beta3_JoinControlPlane_To_v1alpha4_JoinControlPlane(*in, *out, s); err != nil { - return err - } - } else { - out.ControlPlane = nil - } - // WARNING: in.SkipPhases requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_JoinConfiguration_To_v1beta3_JoinConfiguration(in *v1alpha4.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha4_NodeRegistrationOptions_To_v1beta3_NodeRegistrationOptions(&in.NodeRegistration, &out.NodeRegistration, s); err != nil { - return err - } - out.CACertPath = in.CACertPath - if err := Convert_v1alpha4_Discovery_To_v1beta3_Discovery(&in.Discovery, &out.Discovery, s); err != nil { - return err - } - if in.ControlPlane != nil { - in, out := &in.ControlPlane, &out.ControlPlane - *out = new(JoinControlPlane) - if err := Convert_v1alpha4_JoinControlPlane_To_v1beta3_JoinControlPlane(*in, *out, s); err != nil { - return err - } - } else { - out.ControlPlane = nil - } - return nil -} - -// Convert_v1alpha4_JoinConfiguration_To_v1beta3_JoinConfiguration is an autogenerated conversion function. -func Convert_v1alpha4_JoinConfiguration_To_v1beta3_JoinConfiguration(in *v1alpha4.JoinConfiguration, out *JoinConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha4_JoinConfiguration_To_v1beta3_JoinConfiguration(in, out, s) -} - -func autoConvert_v1beta3_JoinControlPlane_To_v1alpha4_JoinControlPlane(in *JoinControlPlane, out *v1alpha4.JoinControlPlane, s conversion.Scope) error { - if err := Convert_v1beta3_APIEndpoint_To_v1alpha4_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - // WARNING: in.CertificateKey requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_JoinControlPlane_To_v1beta3_JoinControlPlane(in *v1alpha4.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { - if err := Convert_v1alpha4_APIEndpoint_To_v1beta3_APIEndpoint(&in.LocalAPIEndpoint, &out.LocalAPIEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_JoinControlPlane_To_v1beta3_JoinControlPlane is an autogenerated conversion function. -func Convert_v1alpha4_JoinControlPlane_To_v1beta3_JoinControlPlane(in *v1alpha4.JoinControlPlane, out *JoinControlPlane, s conversion.Scope) error { - return autoConvert_v1alpha4_JoinControlPlane_To_v1beta3_JoinControlPlane(in, out, s) -} - -func autoConvert_v1beta3_LocalEtcd_To_v1alpha4_LocalEtcd(in *LocalEtcd, out *v1alpha4.LocalEtcd, s conversion.Scope) error { - if err := Convert_v1beta3_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - out.DataDir = in.DataDir - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) - out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) - return nil -} - -// Convert_v1beta3_LocalEtcd_To_v1alpha4_LocalEtcd is an autogenerated conversion function. -func Convert_v1beta3_LocalEtcd_To_v1alpha4_LocalEtcd(in *LocalEtcd, out *v1alpha4.LocalEtcd, s conversion.Scope) error { - return autoConvert_v1beta3_LocalEtcd_To_v1alpha4_LocalEtcd(in, out, s) -} - -func autoConvert_v1alpha4_LocalEtcd_To_v1beta3_LocalEtcd(in *v1alpha4.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { - if err := Convert_v1alpha4_ImageMeta_To_v1beta3_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { - return err - } - out.DataDir = in.DataDir - out.ExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.ExtraArgs)) - out.ServerCertSANs = *(*[]string)(unsafe.Pointer(&in.ServerCertSANs)) - out.PeerCertSANs = *(*[]string)(unsafe.Pointer(&in.PeerCertSANs)) - return nil -} - -// Convert_v1alpha4_LocalEtcd_To_v1beta3_LocalEtcd is an autogenerated conversion function. -func Convert_v1alpha4_LocalEtcd_To_v1beta3_LocalEtcd(in *v1alpha4.LocalEtcd, out *LocalEtcd, s conversion.Scope) error { - return autoConvert_v1alpha4_LocalEtcd_To_v1beta3_LocalEtcd(in, out, s) -} - -func autoConvert_v1beta3_Networking_To_v1alpha4_Networking(in *Networking, out *v1alpha4.Networking, s conversion.Scope) error { - out.ServiceSubnet = in.ServiceSubnet - out.PodSubnet = in.PodSubnet - out.DNSDomain = in.DNSDomain - return nil -} - -// Convert_v1beta3_Networking_To_v1alpha4_Networking is an autogenerated conversion function. -func Convert_v1beta3_Networking_To_v1alpha4_Networking(in *Networking, out *v1alpha4.Networking, s conversion.Scope) error { - return autoConvert_v1beta3_Networking_To_v1alpha4_Networking(in, out, s) -} - -func autoConvert_v1alpha4_Networking_To_v1beta3_Networking(in *v1alpha4.Networking, out *Networking, s conversion.Scope) error { - out.ServiceSubnet = in.ServiceSubnet - out.PodSubnet = in.PodSubnet - out.DNSDomain = in.DNSDomain - return nil -} - -// Convert_v1alpha4_Networking_To_v1beta3_Networking is an autogenerated conversion function. -func Convert_v1alpha4_Networking_To_v1beta3_Networking(in *v1alpha4.Networking, out *Networking, s conversion.Scope) error { - return autoConvert_v1alpha4_Networking_To_v1beta3_Networking(in, out, s) -} - -func autoConvert_v1beta3_NodeRegistrationOptions_To_v1alpha4_NodeRegistrationOptions(in *NodeRegistrationOptions, out *v1alpha4.NodeRegistrationOptions, s conversion.Scope) error { - out.Name = in.Name - out.CRISocket = in.CRISocket - out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) - out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) - out.IgnorePreflightErrors = *(*[]string)(unsafe.Pointer(&in.IgnorePreflightErrors)) - return nil -} - -func autoConvert_v1alpha4_NodeRegistrationOptions_To_v1beta3_NodeRegistrationOptions(in *v1alpha4.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { - out.Name = in.Name - out.CRISocket = in.CRISocket - out.Taints = *(*[]corev1.Taint)(unsafe.Pointer(&in.Taints)) - out.KubeletExtraArgs = *(*map[string]string)(unsafe.Pointer(&in.KubeletExtraArgs)) - out.IgnorePreflightErrors = *(*[]string)(unsafe.Pointer(&in.IgnorePreflightErrors)) - return nil -} - -// Convert_v1alpha4_NodeRegistrationOptions_To_v1beta3_NodeRegistrationOptions is an autogenerated conversion function. -func Convert_v1alpha4_NodeRegistrationOptions_To_v1beta3_NodeRegistrationOptions(in *v1alpha4.NodeRegistrationOptions, out *NodeRegistrationOptions, s conversion.Scope) error { - return autoConvert_v1alpha4_NodeRegistrationOptions_To_v1beta3_NodeRegistrationOptions(in, out, s) -} diff --git a/bootstrap/util/configowner.go b/bootstrap/util/configowner.go index ec524cdaf86f..2c2ec71274c3 100644 --- a/bootstrap/util/configowner.go +++ b/bootstrap/util/configowner.go @@ -25,9 +25,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/bootstrap/util/configowner_test.go b/bootstrap/util/configowner_test.go index e034df329310..44e49c44eede 100644 --- a/bootstrap/util/configowner_test.go +++ b/bootstrap/util/configowner_test.go @@ -23,9 +23,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/controller-runtime/pkg/client/fake" ) diff --git a/cmd/clusterctl/client/alpha/machinedeployment.go b/cmd/clusterctl/client/alpha/machinedeployment.go index 5fadcce50231..15d6ad98a7b3 100644 --- a/cmd/clusterctl/client/alpha/machinedeployment.go +++ b/cmd/clusterctl/client/alpha/machinedeployment.go @@ -20,7 +20,7 @@ import ( "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" "sigs.k8s.io/cluster-api/controllers/mdutil" diff --git a/cmd/clusterctl/client/alpha/rollout_pauser_test.go b/cmd/clusterctl/client/alpha/rollout_pauser_test.go index 3fa8e29b44f4..7cccf749c445 100644 --- a/cmd/clusterctl/client/alpha/rollout_pauser_test.go +++ b/cmd/clusterctl/client/alpha/rollout_pauser_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/cmd/clusterctl/client/alpha/rollout_restarter_test.go b/cmd/clusterctl/client/alpha/rollout_restarter_test.go index 928dddb2c62d..db98c1dc8b08 100644 --- a/cmd/clusterctl/client/alpha/rollout_restarter_test.go +++ b/cmd/clusterctl/client/alpha/rollout_restarter_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -46,7 +46,7 @@ func Test_ObjectRestarter(t *testing.T) { &clusterv1.MachineDeployment{ TypeMeta: metav1.TypeMeta{ Kind: "MachineDeployment", - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", }, ObjectMeta: metav1.ObjectMeta{ Namespace: "default", @@ -70,7 +70,7 @@ func Test_ObjectRestarter(t *testing.T) { &clusterv1.MachineDeployment{ TypeMeta: metav1.TypeMeta{ Kind: "MachineDeployment", - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", }, ObjectMeta: metav1.ObjectMeta{ Namespace: "default", diff --git a/cmd/clusterctl/client/alpha/rollout_resumer_test.go b/cmd/clusterctl/client/alpha/rollout_resumer_test.go index 603dc21495c8..e86b200a9ee3 100644 --- a/cmd/clusterctl/client/alpha/rollout_resumer_test.go +++ b/cmd/clusterctl/client/alpha/rollout_resumer_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/cmd/clusterctl/client/alpha/rollout_rollbacker.go b/cmd/clusterctl/client/alpha/rollout_rollbacker.go index 0f0b8a56f725..09fb382df545 100644 --- a/cmd/clusterctl/client/alpha/rollout_rollbacker.go +++ b/cmd/clusterctl/client/alpha/rollout_rollbacker.go @@ -19,7 +19,7 @@ package alpha import ( "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" "sigs.k8s.io/cluster-api/controllers/mdutil" diff --git a/cmd/clusterctl/client/alpha/rollout_rollbacker_test.go b/cmd/clusterctl/client/alpha/rollout_rollbacker_test.go index 11a8a42026b7..4bcb6cd4c8a5 100644 --- a/cmd/clusterctl/client/alpha/rollout_rollbacker_test.go +++ b/cmd/clusterctl/client/alpha/rollout_rollbacker_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -65,7 +65,7 @@ func Test_ObjectRollbacker(t *testing.T) { ClusterName: "test", Version: ¤tVersion, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureMachineTemplate", Name: "md-template", }, @@ -144,7 +144,7 @@ func Test_ObjectRollbacker(t *testing.T) { ClusterName: "test", Version: &rollbackVersion, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureMachineTemplate", Name: "md-template-rollback", }, diff --git a/cmd/clusterctl/client/cluster/components.go b/cmd/clusterctl/client/cluster/components.go index ce4788691372..2556c9ad2d01 100644 --- a/cmd/clusterctl/client/cluster/components.go +++ b/cmd/clusterctl/client/cluster/components.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/util" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" diff --git a/cmd/clusterctl/client/cluster/components_test.go b/cmd/clusterctl/client/cluster/components_test.go index cda8af22c25a..f54ce836c350 100644 --- a/cmd/clusterctl/client/cluster/components_test.go +++ b/cmd/clusterctl/client/cluster/components_test.go @@ -26,7 +26,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/cmd/clusterctl/client/cluster/installer.go b/cmd/clusterctl/client/cluster/installer.go index d82ae87f1c0e..c15a55beb5cc 100644 --- a/cmd/clusterctl/client/cluster/installer.go +++ b/cmd/clusterctl/client/cluster/installer.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/util/wait" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/repository" diff --git a/cmd/clusterctl/client/cluster/inventory.go b/cmd/clusterctl/client/cluster/inventory.go index 95345f34b295..06525a0d2f86 100644 --- a/cmd/clusterctl/client/cluster/inventory.go +++ b/cmd/clusterctl/client/cluster/inventory.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/types" kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/config" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" diff --git a/cmd/clusterctl/client/cluster/mover.go b/cmd/clusterctl/client/cluster/mover.go index 07330b0f6b76..682eff8e6be3 100644 --- a/cmd/clusterctl/client/cluster/mover.go +++ b/cmd/clusterctl/client/cluster/mover.go @@ -31,7 +31,7 @@ import ( kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/version" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/yaml" diff --git a/cmd/clusterctl/client/cluster/mover_test.go b/cmd/clusterctl/client/cluster/mover_test.go index 578c0e670fa7..74625f27a952 100644 --- a/cmd/clusterctl/client/cluster/mover_test.go +++ b/cmd/clusterctl/client/cluster/mover_test.go @@ -31,7 +31,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test/providers/infrastructure" @@ -56,13 +56,13 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters "/v1, Kind=Secret, ns1/foo-ca", "/v1, Kind=Secret, ns1/foo-kubeconfig", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/foo", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/foo", }, }, wantErr: false, @@ -74,7 +74,7 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo", // objects with force move flag "/v1, Kind=Secret, ns1/foo-cloud-config", }, @@ -82,7 +82,7 @@ var moveTests = []struct { // owned by Clusters "/v1, Kind=Secret, ns1/foo-ca", "/v1, Kind=Secret, ns1/foo-kubeconfig", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/foo", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/foo", }, }, wantErr: false, @@ -98,22 +98,22 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters "/v1, Kind=Secret, ns1/cluster1-kubeconfig", "/v1, Kind=Secret, ns1/cluster1-ca", - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m2", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m2", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", }, { // group 3 (objects with ownerReferences in group 1,2) // owned by Machines - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m2", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m2", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m2", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m2", }, { // group 4 (objects with ownerReferences in group 1,2,3) // owned by GenericBootstrapConfigs @@ -138,28 +138,28 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters "/v1, Kind=Secret, ns1/cluster1-ca", "/v1, Kind=Secret, ns1/cluster1-kubeconfig", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/ms1", - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/ms1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/ms1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/ms1", + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/ms1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/ms1", }, { // group 3 (objects with ownerReferences in group 1,2) // owned by MachineSets - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m2", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m2", }, { // group 4 (objects with ownerReferences in group 1,2,3) // owned by Machines - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m2", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m2", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m2", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m2", }, { // group 5 (objects with ownerReferences in group 1,2,3,4) // owned by GenericBootstrapConfigs @@ -186,32 +186,32 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters "/v1, Kind=Secret, ns1/cluster1-ca", "/v1, Kind=Secret, ns1/cluster1-kubeconfig", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/md1", - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/md1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/md1", + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/md1", }, { // group 3 (objects with ownerReferences in group 1,2) // owned by MachineDeployments - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/ms1", + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/ms1", }, { // group 4 (objects with ownerReferences in group 1,2,3) // owned by MachineSets - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m2", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m2", }, { // group 5 (objects with ownerReferences in group 1,2,3,4) // owned by Machines - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m2", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m2", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m2", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m2", }, { // group 6 (objects with ownerReferences in group 1,2,3,5,6) // owned by GenericBootstrapConfigs @@ -235,27 +235,27 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters "/v1, Kind=Secret, ns1/cluster1-ca", - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/cp1", + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/cp1", }, { // group 3 (objects with ownerReferences in group 1,2) "/v1, Kind=Secret, ns1/cluster1-kubeconfig", "/v1, Kind=Secret, ns1/cluster1-sa", - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m2", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m2", }, { // group 4 (objects with ownerReferences in group 1,2,3) // owned by Machines - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m2", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m2", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m2", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m2", }, { // group 5 (objects with ownerReferences in group 1,2,3,4) // owned by GenericBootstrapConfigs @@ -275,16 +275,16 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters "/v1, Kind=Secret, ns1/cluster1-ca", "/v1, Kind=Secret, ns1/cluster1-kubeconfig", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/mp1", - "cluster.x-k8s.io/v1alpha4, Kind=MachinePool, ns1/mp1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/mp1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/mp1", + "cluster.x-k8s.io/v1beta1, Kind=MachinePool, ns1/mp1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/mp1", }, }, wantErr: false, @@ -301,17 +301,17 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo", - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/bar", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/bar", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters "/v1, Kind=Secret, ns1/foo-ca", "/v1, Kind=Secret, ns1/foo-kubeconfig", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/foo", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/foo", "/v1, Kind=Secret, ns1/bar-ca", "/v1, Kind=Secret, ns1/bar-kubeconfig", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/bar", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/bar", }, }, }, @@ -348,34 +348,34 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters "/v1, Kind=Secret, ns1/cluster1-ca", "/v1, Kind=Secret, ns1/cluster1-kubeconfig", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/cluster1-ms1", - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/cluster1-ms1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/cluster1-ms1", + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/cluster1-ms1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", "/v1, Kind=Secret, ns1/cluster2-ca", "/v1, Kind=Secret, ns1/cluster2-kubeconfig", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/cluster2-ms1", - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/cluster2-ms1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster2", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/shared", // shared object + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/cluster2-ms1", + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/cluster2-ms1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster2", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/shared", // shared object }, { // group 3 (objects with ownerReferences in group 1,2) // owned by MachineSets - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cluster1-m1", - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cluster2-m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cluster1-m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cluster2-m1", }, { // group 4 (objects with ownerReferences in group 1,2,3) // owned by Machines - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/cluster1-m1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/cluster1-m1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/cluster2-m1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/cluster2-m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/cluster1-m1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/cluster1-m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/cluster2-m1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/cluster2-m1", }, { // group 5 (objects with ownerReferences in group 1,2,3,4) // owned by GenericBootstrapConfigs @@ -403,20 +403,20 @@ var moveTests = []struct { wantMoveGroups: [][]string{ { // group 1 // Cluster - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // ClusterResourceSet - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1", + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters "/v1, Kind=Secret, ns1/cluster1-ca", "/v1, Kind=Secret, ns1/cluster1-kubeconfig", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", // owned by ClusterResourceSet "/v1, Kind=Secret, ns1/resource-s1", "/v1, Kind=ConfigMap, ns1/resource-c1", // owned by ClusterResourceSet & Cluster - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSetBinding, ns1/cluster1", + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSetBinding, ns1/cluster1", }, }, }, @@ -428,7 +428,7 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group1 - "external.cluster.x-k8s.io/v1alpha4, Kind=GenericExternalObject, ns1/externalObject1", + "external.cluster.x-k8s.io/v1beta1, Kind=GenericExternalObject, ns1/externalObject1", }, }, wantErr: false, @@ -441,7 +441,7 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group1 - "external.cluster.x-k8s.io/v1alpha4, Kind=GenericClusterExternalObject, /externalObject1", + "external.cluster.x-k8s.io/v1beta1, Kind=GenericClusterExternalObject, /externalObject1", }, }, wantErr: false, @@ -454,14 +454,14 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters "/v1, Kind=Secret, ns1/foo-ca", "/v1, Kind=Secret, ns1/foo-credentials", "/v1, Kind=Secret, ns1/foo-kubeconfig", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/foo", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/foo", }, }, wantErr: false, @@ -475,7 +475,7 @@ var moveTests = []struct { }, wantMoveGroups: [][]string{ { // group 1 - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericClusterInfrastructureIdentity, /infra1-identity", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericClusterInfrastructureIdentity, /infra1-identity", }, { // group 2 (objects with ownerReferences in group 1) // owned by Clusters @@ -498,10 +498,10 @@ var backupRestoreTests = []struct { objs: test.NewFakeCluster("ns1", "foo").Objs(), }, files: map[string]string{ - "Cluster_ns1_foo.yaml": `{"apiVersion":"cluster.x-k8s.io/v1alpha4","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo"},"spec":{"controlPlaneEndpoint":{"host":"","port":0},"infrastructureRef":{"apiVersion":"infrastructure.cluster.x-k8s.io/v1alpha4","kind":"GenericInfrastructureCluster","name":"foo","namespace":"ns1"}},"status":{"infrastructureReady":false}}` + "\n", - "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1alpha4","kind":"Cluster","name":"foo","uid":"cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n", + "Cluster_ns1_foo.yaml": `{"apiVersion":"cluster.x-k8s.io/v1beta1","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo"},"spec":{"controlPlaneEndpoint":{"host":"","port":0},"infrastructureRef":{"apiVersion":"infrastructure.cluster.x-k8s.io/v1beta1","kind":"GenericInfrastructureCluster","name":"foo","namespace":"ns1"}},"status":{"infrastructureReady":false}}` + "\n", + "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1beta1","kind":"Cluster","name":"foo","uid":"cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n", "Secret_ns1_foo-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-ca","namespace":"ns1","resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-ca"}}` + "\n", - "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"infrastructure.cluster.x-k8s.io/v1alpha4","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1alpha4","kind":"Cluster","name":"foo","uid":"cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n", + "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"infrastructure.cluster.x-k8s.io/v1beta1","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1beta1","kind":"Cluster","name":"foo","uid":"cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n", }, wantErr: false, }, @@ -516,14 +516,14 @@ var backupRestoreTests = []struct { }(), }, files: map[string]string{ - "Cluster_ns1_foo.yaml": `{"apiVersion":"cluster.x-k8s.io/v1alpha4","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo"},"spec":{"controlPlaneEndpoint":{"host":"","port":0},"infrastructureRef":{"apiVersion":"infrastructure.cluster.x-k8s.io/v1alpha4","kind":"GenericInfrastructureCluster","name":"foo","namespace":"ns1"}},"status":{"infrastructureReady":false}}` + "\n", - "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1alpha4","kind":"Cluster","name":"foo","uid":"cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n", + "Cluster_ns1_foo.yaml": `{"apiVersion":"cluster.x-k8s.io/v1beta1","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo"},"spec":{"controlPlaneEndpoint":{"host":"","port":0},"infrastructureRef":{"apiVersion":"infrastructure.cluster.x-k8s.io/v1beta1","kind":"GenericInfrastructureCluster","name":"foo","namespace":"ns1"}},"status":{"infrastructureReady":false}}` + "\n", + "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1beta1","kind":"Cluster","name":"foo","uid":"cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n", "Secret_ns1_foo-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-ca","namespace":"ns1","resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-ca"}}` + "\n", - "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"infrastructure.cluster.x-k8s.io/v1alpha4","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1alpha4","kind":"Cluster","name":"foo","uid":"cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n", - "Cluster_ns2_bar.yaml": `{"apiVersion":"cluster.x-k8s.io/v1alpha4","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"bar","namespace":"ns2","resourceVersion":"999","uid":"cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns2/bar"},"spec":{"controlPlaneEndpoint":{"host":"","port":0},"infrastructureRef":{"apiVersion":"infrastructure.cluster.x-k8s.io/v1alpha4","kind":"GenericInfrastructureCluster","name":"bar","namespace":"ns2"}},"status":{"infrastructureReady":false}}` + "\n", - "Secret_ns2_bar-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"bar-kubeconfig","namespace":"ns2","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1alpha4","kind":"Cluster","name":"bar","uid":"cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-kubeconfig"}}` + "\n", + "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"infrastructure.cluster.x-k8s.io/v1beta1","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1beta1","kind":"Cluster","name":"foo","uid":"cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n", + "Cluster_ns2_bar.yaml": `{"apiVersion":"cluster.x-k8s.io/v1beta1","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"bar","namespace":"ns2","resourceVersion":"999","uid":"cluster.x-k8s.io/v1beta1, Kind=Cluster, ns2/bar"},"spec":{"controlPlaneEndpoint":{"host":"","port":0},"infrastructureRef":{"apiVersion":"infrastructure.cluster.x-k8s.io/v1beta1","kind":"GenericInfrastructureCluster","name":"bar","namespace":"ns2"}},"status":{"infrastructureReady":false}}` + "\n", + "Secret_ns2_bar-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"bar-kubeconfig","namespace":"ns2","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1beta1","kind":"Cluster","name":"bar","uid":"cluster.x-k8s.io/v1beta1, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-kubeconfig"}}` + "\n", "Secret_ns2_bar-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"bar-ca","namespace":"ns2","resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-ca"}}` + "\n", - "GenericInfrastructureCluster_ns2_bar.yaml": `{"apiVersion":"infrastructure.cluster.x-k8s.io/v1alpha4","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"bar"},"name":"bar","namespace":"ns2","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1alpha4","kind":"Cluster","name":"bar","uid":"cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns2/bar"}}` + "\n", + "GenericInfrastructureCluster_ns2_bar.yaml": `{"apiVersion":"infrastructure.cluster.x-k8s.io/v1beta1","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"bar"},"name":"bar","namespace":"ns2","ownerReferences":[{"apiVersion":"cluster.x-k8s.io/v1beta1","kind":"Cluster","name":"bar","uid":"cluster.x-k8s.io/v1beta1, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns2/bar"}}` + "\n", }, wantErr: false, }, @@ -1637,7 +1637,7 @@ func Test_createTargetObject(t *testing.T) { Kind: "Cluster", Namespace: "ns1", Name: "foo", - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", }, }, }, @@ -1660,7 +1660,7 @@ func Test_createTargetObject(t *testing.T) { Kind: "Cluster", Namespace: "ns1", Name: "foo", - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", }, owners: map[*node]ownerReferenceAttributes{ { @@ -1668,7 +1668,7 @@ func Test_createTargetObject(t *testing.T) { Kind: "Something", Namespace: "ns1", Name: "bar", - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", }, }: { Controller: pointer.BoolPtr(true), @@ -1712,7 +1712,7 @@ func Test_createTargetObject(t *testing.T) { Kind: "Cluster", Namespace: "ns1", Name: "foo", - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", }, }, }, @@ -1748,7 +1748,7 @@ func Test_createTargetObject(t *testing.T) { identity: corev1.ObjectReference{ Kind: "GenericClusterInfrastructureIdentity", Name: "foo", - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", }, isGlobal: true, }, @@ -1847,7 +1847,7 @@ func Test_deleteSourceObject(t *testing.T) { Kind: "Cluster", Namespace: "ns1", Name: "foo", - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", }, }, }, @@ -1876,7 +1876,7 @@ func Test_deleteSourceObject(t *testing.T) { Kind: "Cluster", Namespace: "ns1", Name: "foo", - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", }, }, }, @@ -1903,7 +1903,7 @@ func Test_deleteSourceObject(t *testing.T) { identity: corev1.ObjectReference{ Kind: "GenericClusterInfrastructureIdentity", Name: "foo", - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", }, isGlobal: true, }, diff --git a/cmd/clusterctl/client/cluster/objectgraph.go b/cmd/clusterctl/client/cluster/objectgraph.go index 39a052f4f5ca..0ea957e59478 100644 --- a/cmd/clusterctl/client/cluster/objectgraph.go +++ b/cmd/clusterctl/client/cluster/objectgraph.go @@ -27,10 +27,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" secretutil "sigs.k8s.io/cluster-api/util/secret" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/cmd/clusterctl/client/cluster/objectgraph_test.go b/cmd/clusterctl/client/cluster/objectgraph_test.go index e411fe7bacb2..afd7106aeaa6 100644 --- a/cmd/clusterctl/client/cluster/objectgraph_test.go +++ b/cmd/clusterctl/client/cluster/objectgraph_test.go @@ -83,19 +83,19 @@ func TestObjectGraph_getDiscoveryTypeMetaList(t *testing.T) { fields: fields{ proxy: test.NewFakeProxy(). WithObjs( - test.FakeNamespacedCustomResourceDefinition("cluster.x-k8s.io", "Cluster", "v1alpha4"), - test.FakeNamespacedCustomResourceDefinition("addons.cluster.x-k8s.io", "ClusterResourceSet", "v1alpha4"), + test.FakeNamespacedCustomResourceDefinition("cluster.x-k8s.io", "Cluster", "v1beta1"), + test.FakeNamespacedCustomResourceDefinition("addons.cluster.x-k8s.io", "ClusterResourceSet", "v1beta1"), ), }, want: map[string]*discoveryTypeInfo{ "clusters.cluster.x-k8s.io": { - typeMeta: metav1.TypeMeta{Kind: "Cluster", APIVersion: "cluster.x-k8s.io/v1alpha4"}, + typeMeta: metav1.TypeMeta{Kind: "Cluster", APIVersion: "cluster.x-k8s.io/v1beta1"}, forceMove: true, forceMoveHierarchy: true, scope: "Namespaced", }, "clusterresourcesets.addons.cluster.x-k8s.io": { - typeMeta: metav1.TypeMeta{Kind: "ClusterResourceSet", APIVersion: "addons.cluster.x-k8s.io/v1alpha4"}, + typeMeta: metav1.TypeMeta{Kind: "ClusterResourceSet", APIVersion: "addons.cluster.x-k8s.io/v1beta1"}, forceMove: true, forceMoveHierarchy: true, scope: "Namespaced", @@ -120,12 +120,12 @@ func TestObjectGraph_getDiscoveryTypeMetaList(t *testing.T) { fields: fields{ proxy: test.NewFakeProxy(). WithObjs( - test.FakeClusterCustomResourceDefinition("infrastructure.cluster.x-k8s.io", "GenericClusterInfrastructureIdentity", "v1alpha4"), + test.FakeClusterCustomResourceDefinition("infrastructure.cluster.x-k8s.io", "GenericClusterInfrastructureIdentity", "v1beta1"), ), }, want: map[string]*discoveryTypeInfo{ "genericclusterinfrastructureidentitys.infrastructure.cluster.x-k8s.io": { - typeMeta: metav1.TypeMeta{Kind: "GenericClusterInfrastructureIdentity", APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4"}, + typeMeta: metav1.TypeMeta{Kind: "GenericClusterInfrastructureIdentity", APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1"}, forceMove: false, forceMoveHierarchy: false, scope: "Cluster", @@ -488,23 +488,23 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, }, @@ -518,23 +518,23 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-cloud-config": { @@ -555,42 +555,42 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster2": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster2": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, }, "/v1, Kind=Secret, ns1/cluster2-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster2-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, }, }, @@ -606,49 +606,49 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", }, }, "/v1, Kind=Secret, ns1/m1": { owners: []string{ - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1", }, }, "/v1, Kind=Secret, ns1/cluster1-sa": { owners: []string{ - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1", }, }, }, @@ -665,60 +665,60 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/ms1": { + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/ms1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/ms1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/ms1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/ms1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/ms1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/ms1", + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/ms1", }, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", }, }, "/v1, Kind=Secret, ns1/m1": { owners: []string{ - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1", }, }, }, @@ -740,66 +740,66 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1": { + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/md1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/md1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/md1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/md1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/ms1": { + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/ms1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1", + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/ms1", + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/ms1", }, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", }, }, "/v1, Kind=Secret, ns1/m1": { owners: []string{ - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1", }, }, }, @@ -818,60 +818,60 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp1": { + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/cp1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/cp1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-sa": { owners: []string{ - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp1", + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp1", }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp1", + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1": { owners: []string{ - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp1", + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp1", }, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", }, }, "/v1, Kind=Secret, ns1/m1": { owners: []string{ - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1", }, }, }, @@ -887,39 +887,39 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=MachinePool, ns1/mp1": { + "cluster.x-k8s.io/v1beta1, Kind=MachinePool, ns1/mp1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/mp1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/mp1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/mp1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/mp1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, }, @@ -959,113 +959,113 @@ var objectGraphsTests = []struct { want: wantGraph{ nodes: map[string]wantGraphItem{ - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/shared": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/shared": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/cluster1-ms1": { + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/cluster1-ms1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/cluster1-ms1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/cluster1-ms1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cluster1-m1": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cluster1-m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/cluster1-ms1", + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/cluster1-ms1", }, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/cluster1-m1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/cluster1-m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cluster1-m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cluster1-m1", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/cluster1-m1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/cluster1-m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cluster1-m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cluster1-m1", }, }, "/v1, Kind=Secret, ns1/cluster1-m1": { owners: []string{ - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/cluster1-m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/cluster1-m1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster2": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster2": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, }, "/v1, Kind=Secret, ns1/cluster2-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster2-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/cluster2-ms1": { + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/cluster2-ms1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/cluster2-ms1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/cluster2-ms1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cluster2-m1": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cluster2-m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/cluster2-ms1", + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/cluster2-ms1", }, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/cluster2-m1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/cluster2-m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cluster2-m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cluster2-m1", }, }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/cluster2-m1": { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/cluster2-m1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cluster2-m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cluster2-m1", }, }, "/v1, Kind=Secret, ns1/cluster2-m1": { owners: []string{ - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/cluster2-m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/cluster2-m1", }, }, }, @@ -1089,43 +1089,43 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1": { + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1": { forceMove: true, forceMoveHierarchy: true, }, - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSetBinding, ns1/cluster1": { + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSetBinding, ns1/cluster1": { owners: []string{ - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1", - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/resource-s1": { owners: []string{ - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1", + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1", }, }, "/v1, Kind=ConfigMap, ns1/resource-c1": { owners: []string{ - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1", + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1", }, }, }, @@ -1151,68 +1151,68 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster2": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster2": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, }, "/v1, Kind=Secret, ns1/cluster2-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster2-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, }, - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1": { + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1": { forceMove: true, forceMoveHierarchy: true, }, - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSetBinding, ns1/cluster1": { + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSetBinding, ns1/cluster1": { owners: []string{ - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1", - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSetBinding, ns1/cluster2": { + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSetBinding, ns1/cluster2": { owners: []string{ - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1", - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", }, }, "/v1, Kind=Secret, ns1/resource-s1": { owners: []string{ - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1", + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1", }, }, "/v1, Kind=ConfigMap, ns1/resource-c1": { owners: []string{ - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1", + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1", }, }, }, @@ -1226,7 +1226,7 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "external.cluster.x-k8s.io/v1alpha4, Kind=GenericExternalObject, ns1/externalObject1": { + "external.cluster.x-k8s.io/v1beta1, Kind=GenericExternalObject, ns1/externalObject1": { forceMove: true, }, }, @@ -1240,7 +1240,7 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "external.cluster.x-k8s.io/v1alpha4, Kind=GenericClusterExternalObject, /externalObject1": { + "external.cluster.x-k8s.io/v1beta1, Kind=GenericClusterExternalObject, /externalObject1": { forceMove: true, isGlobal: true, }, @@ -1269,28 +1269,28 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-credentials": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, }, @@ -1305,14 +1305,14 @@ var objectGraphsTests = []struct { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericClusterInfrastructureIdentity, /infra1-identity": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericClusterInfrastructureIdentity, /infra1-identity": { isGlobal: true, forceMove: true, forceMoveHierarchy: true, }, "/v1, Kind=Secret, infra1-system/infra1-identity-credentials": { owners: []string{ - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericClusterInfrastructureIdentity, /infra1-identity", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericClusterInfrastructureIdentity, /infra1-identity", }, }, }, @@ -1460,42 +1460,42 @@ func TestObjectGraph_DiscoveryByNamespace(t *testing.T) { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns2/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns2/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns2/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns2/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns2/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns2/cluster1", }, }, "/v1, Kind=Secret, ns2/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns2/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns2/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns2/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns2/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns2/cluster1", }, }, }, @@ -1514,23 +1514,23 @@ func TestObjectGraph_DiscoveryByNamespace(t *testing.T) { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { forceMove: true, forceMoveHierarchy: true, }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, "/v1, Kind=Secret, ns1/cluster1-ca": { softOwners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // NB. this secret is not linked to the cluster through owner ref }, }, "/v1, Kind=Secret, ns1/cluster1-kubeconfig": { owners: []string{ - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", }, }, }, @@ -1545,7 +1545,7 @@ func TestObjectGraph_DiscoveryByNamespace(t *testing.T) { }, want: wantGraph{ nodes: map[string]wantGraphItem{ - "external.cluster.x-k8s.io/v1alpha4, Kind=GenericExternalObject, ns1/externalObject1": { + "external.cluster.x-k8s.io/v1beta1, Kind=GenericExternalObject, ns1/externalObject1": { forceMove: true, }, }, @@ -1608,7 +1608,7 @@ func Test_objectGraph_setSoftOwnership(t *testing.T) { }, wantSecrets: map[string][]string{ // wantSecrets is a map[node UID] --> list of soft owner UIDs "/v1, Kind=Secret, ns1/foo-ca": { // the ca secret has no explicit OwnerRef to the cluster, so it should be identified as a soft ownership - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo", }, "/v1, Kind=Secret, ns1/foo-kubeconfig": {}, // the kubeconfig secret has explicit OwnerRef to the cluster, so it should NOT be identified as a soft ownership }, @@ -1620,7 +1620,7 @@ func Test_objectGraph_setSoftOwnership(t *testing.T) { }, wantSecrets: map[string][]string{ // wantSecrets is a map[node UID] --> list of soft owner UIDs "/v1, Kind=Secret, ns1/foo-bar-ca": { // the ca secret has no explicit OwnerRef to the cluster, so it should be identified as a soft ownership - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo-bar", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo-bar", }, "/v1, Kind=Secret, ns1/foo-bar-kubeconfig": {}, // the kubeconfig secret has explicit OwnerRef to the cluster, so it should NOT be identified as a soft ownership }, @@ -1668,9 +1668,9 @@ func Test_objectGraph_setClusterTenants(t *testing.T) { objs: test.NewFakeCluster("ns1", "foo").Objs(), }, wantClusters: map[string][]string{ // wantClusters is a map[Cluster.UID] --> list of UIDs - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo": { - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo", // the cluster should be tenant of itself - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/foo", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo", // the cluster should be tenant of itself + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/foo", "/v1, Kind=Secret, ns1/foo-ca", // the ca secret is a soft owned "/v1, Kind=Secret, ns1/foo-kubeconfig", }, @@ -1687,9 +1687,9 @@ func Test_objectGraph_setClusterTenants(t *testing.T) { }(), }, wantClusters: map[string][]string{ // wantClusters is a map[Cluster.UID] --> list of UIDs - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo": { - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo", // the cluster should be tenant of itself - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/foo", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo", // the cluster should be tenant of itself + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/foo", "/v1, Kind=Secret, ns1/foo-ca", // the ca secret is a soft owned "/v1, Kind=Secret, ns1/foo-kubeconfig", }, @@ -1706,15 +1706,15 @@ func Test_objectGraph_setClusterTenants(t *testing.T) { }(), }, wantClusters: map[string][]string{ // wantClusters is a map[Cluster.UID] --> list of UIDs - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo": { - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/foo", // the cluster should be tenant of itself - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/foo", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/foo", // the cluster should be tenant of itself + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/foo", "/v1, Kind=Secret, ns1/foo-ca", // the ca secret is a soft owned "/v1, Kind=Secret, ns1/foo-kubeconfig", }, - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/bar": { - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/bar", // the cluster should be tenant of itself - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/bar", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/bar": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/bar", // the cluster should be tenant of itself + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/bar", "/v1, Kind=Secret, ns1/bar-ca", // the ca secret is a soft owned "/v1, Kind=Secret, ns1/bar-kubeconfig", }, @@ -1752,30 +1752,30 @@ func Test_objectGraph_setClusterTenants(t *testing.T) { }(), }, wantClusters: map[string][]string{ // wantClusters is a map[Cluster.UID] --> list of UIDs - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/shared", // the shared object should be in both lists - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // the cluster should be tenant of itself - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/shared", // the shared object should be in both lists + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // the cluster should be tenant of itself + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", "/v1, Kind=Secret, ns1/cluster1-ca", // the ca secret is a soft owned "/v1, Kind=Secret, ns1/cluster1-kubeconfig", - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/cluster1-ms1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/cluster1-ms1", - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cluster1-m1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/cluster1-m1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/cluster1-m1", + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/cluster1-ms1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/cluster1-ms1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cluster1-m1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/cluster1-m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/cluster1-m1", "/v1, Kind=Secret, ns1/cluster1-m1", }, - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2": { - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachineTemplate, ns1/shared", // the shared object should be in both lists - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", // the cluster should be tenant of itself - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachineTemplate, ns1/shared", // the shared object should be in both lists + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", // the cluster should be tenant of itself + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster2", "/v1, Kind=Secret, ns1/cluster2-ca", // the ca secret is a soft owned "/v1, Kind=Secret, ns1/cluster2-kubeconfig", - "cluster.x-k8s.io/v1alpha4, Kind=MachineSet, ns1/cluster2-ms1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfigTemplate, ns1/cluster2-ms1", - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cluster2-m1", - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/cluster2-m1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/cluster2-m1", + "cluster.x-k8s.io/v1beta1, Kind=MachineSet, ns1/cluster2-ms1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfigTemplate, ns1/cluster2-ms1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cluster2-m1", + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/cluster2-m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/cluster2-m1", "/v1, Kind=Secret, ns1/cluster2-m1", }, }, @@ -1797,12 +1797,12 @@ func Test_objectGraph_setClusterTenants(t *testing.T) { }(), }, wantClusters: map[string][]string{ // wantClusters is a map[Cluster.UID] --> list of UIDs - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // the cluster should be tenant of itself - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // the cluster should be tenant of itself + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", "/v1, Kind=Secret, ns1/cluster1-ca", // the ca secret is a soft owned "/v1, Kind=Secret, ns1/cluster1-kubeconfig", - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSetBinding, ns1/cluster1", // ClusterResourceSetBinding are owned by the cluster + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSetBinding, ns1/cluster1", // ClusterResourceSetBinding are owned by the cluster }, }, }, @@ -1825,19 +1825,19 @@ func Test_objectGraph_setClusterTenants(t *testing.T) { }(), }, wantClusters: map[string][]string{ // wantClusters is a map[Cluster.UID] --> list of UIDs - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1", // the cluster should be tenant of itself - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1", // the cluster should be tenant of itself + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", "/v1, Kind=Secret, ns1/cluster1-ca", // the ca secret is a soft owned "/v1, Kind=Secret, ns1/cluster1-kubeconfig", - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSetBinding, ns1/cluster1", // ClusterResourceSetBinding are owned by the cluster + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSetBinding, ns1/cluster1", // ClusterResourceSetBinding are owned by the cluster }, - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2": { - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster2", // the cluster should be tenant of itself - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster2", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2": { + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster2", // the cluster should be tenant of itself + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster2", "/v1, Kind=Secret, ns1/cluster2-ca", // the ca secret is a soft owned "/v1, Kind=Secret, ns1/cluster2-kubeconfig", - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSetBinding, ns1/cluster2", // ClusterResourceSetBinding are owned by the cluster + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSetBinding, ns1/cluster2", // ClusterResourceSetBinding are owned by the cluster }, }, }, @@ -1908,11 +1908,11 @@ func Test_objectGraph_setCRSTenants(t *testing.T) { }(), }, wantCRSs: map[string][]string{ // wantCRDs is a map[ClusterResourceSet.UID] --> list of UIDs - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1": { - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1", // the ClusterResourceSet should be tenant of itself - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSetBinding, ns1/cluster1", // ClusterResourceSetBinding are owned by ClusterResourceSet - "/v1, Kind=Secret, ns1/resource-s1", // resource are owned by ClusterResourceSet - "/v1, Kind=ConfigMap, ns1/resource-c1", // resource are owned by ClusterResourceSet + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1": { + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1", // the ClusterResourceSet should be tenant of itself + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSetBinding, ns1/cluster1", // ClusterResourceSetBinding are owned by ClusterResourceSet + "/v1, Kind=Secret, ns1/resource-s1", // resource are owned by ClusterResourceSet + "/v1, Kind=ConfigMap, ns1/resource-c1", // resource are owned by ClusterResourceSet }, }, }, @@ -1935,12 +1935,12 @@ func Test_objectGraph_setCRSTenants(t *testing.T) { }(), }, wantCRSs: map[string][]string{ // wantCRDs is a map[ClusterResourceSet.UID] --> list of UIDs - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1": { - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSet, ns1/crs1", // the ClusterResourceSet should be tenant of itself - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSetBinding, ns1/cluster1", // ClusterResourceSetBinding are owned by ClusterResourceSet - "addons.cluster.x-k8s.io/v1alpha4, Kind=ClusterResourceSetBinding, ns1/cluster2", // ClusterResourceSetBinding are owned by ClusterResourceSet - "/v1, Kind=Secret, ns1/resource-s1", // resource are owned by ClusterResourceSet - "/v1, Kind=ConfigMap, ns1/resource-c1", // resource are owned by ClusterResourceSet + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1": { + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSet, ns1/crs1", // the ClusterResourceSet should be tenant of itself + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSetBinding, ns1/cluster1", // ClusterResourceSetBinding are owned by ClusterResourceSet + "addons.cluster.x-k8s.io/v1beta1, Kind=ClusterResourceSetBinding, ns1/cluster2", // ClusterResourceSetBinding are owned by ClusterResourceSet + "/v1, Kind=Secret, ns1/resource-s1", // resource are owned by ClusterResourceSet + "/v1, Kind=ConfigMap, ns1/resource-c1", // resource are owned by ClusterResourceSet }, }, }, @@ -1998,8 +1998,8 @@ func Test_objectGraph_setGlobalIdentityTenants(t *testing.T) { Objs(), }, wantIdentity: map[string][]string{ // wantCRDs is a map[ClusterResourceSet.UID] --> list of UIDs - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericClusterInfrastructureIdentity, /infra1-identity": { - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericClusterInfrastructureIdentity, /infra1-identity", // the global identity should be tenant of itself + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericClusterInfrastructureIdentity, /infra1-identity": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericClusterInfrastructureIdentity, /infra1-identity", // the global identity should be tenant of itself "/v1, Kind=Secret, infra1-system/infra1-identity-credentials", }, }, diff --git a/cmd/clusterctl/client/cluster/template_test.go b/cmd/clusterctl/client/cluster/template_test.go index 33f49e4d4a99..73eb2d92f516 100644 --- a/cmd/clusterctl/client/cluster/template_test.go +++ b/cmd/clusterctl/client/cluster/template_test.go @@ -36,10 +36,10 @@ import ( "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" ) -var template = `apiVersion: cluster.x-k8s.io/v1alpha4 +var template = `apiVersion: cluster.x-k8s.io/v1beta1 kind: Cluster --- -apiVersion: cluster.x-k8s.io/v1alpha4 +apiVersion: cluster.x-k8s.io/v1beta1 kind: Machine` func Test_templateClient_GetFromConfigMap(t *testing.T) { diff --git a/cmd/clusterctl/client/cluster/upgrader.go b/cmd/clusterctl/client/cluster/upgrader.go index 70ea9dac2753..9ccd1b0083bd 100644 --- a/cmd/clusterctl/client/cluster/upgrader.go +++ b/cmd/clusterctl/client/cluster/upgrader.go @@ -20,7 +20,7 @@ import ( "github.com/pkg/errors" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/version" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/repository" diff --git a/cmd/clusterctl/client/cluster/upgrader_info_test.go b/cmd/clusterctl/client/cluster/upgrader_info_test.go index dd290e1ea2d4..a8804366f8b4 100644 --- a/cmd/clusterctl/client/cluster/upgrader_info_test.go +++ b/cmd/clusterctl/client/cluster/upgrader_info_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/version" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/repository" diff --git a/cmd/clusterctl/client/cluster/workload_cluster_test.go b/cmd/clusterctl/client/cluster/workload_cluster_test.go index 82e20ac6e618..1bec2cdb5de2 100644 --- a/cmd/clusterctl/client/cluster/workload_cluster_test.go +++ b/cmd/clusterctl/client/cluster/workload_cluster_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" "sigs.k8s.io/cluster-api/util/secret" ) diff --git a/cmd/clusterctl/client/repository/components.go b/cmd/clusterctl/client/repository/components.go index 92efe7a9a1de..0e284256b626 100644 --- a/cmd/clusterctl/client/repository/components.go +++ b/cmd/clusterctl/client/repository/components.go @@ -28,7 +28,7 @@ import ( apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" yaml "sigs.k8s.io/cluster-api/cmd/clusterctl/client/yamlprocessor" diff --git a/cmd/clusterctl/client/repository/components_client_test.go b/cmd/clusterctl/client/repository/components_client_test.go index d5d3626ca8e6..4ac5ab34bfe4 100644 --- a/cmd/clusterctl/client/repository/components_client_test.go +++ b/cmd/clusterctl/client/repository/components_client_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" yaml "sigs.k8s.io/cluster-api/cmd/clusterctl/client/yamlprocessor" diff --git a/cmd/clusterctl/client/repository/components_test.go b/cmd/clusterctl/client/repository/components_test.go index 50fc48a5f716..a051ec2be8d0 100644 --- a/cmd/clusterctl/client/repository/components_test.go +++ b/cmd/clusterctl/client/repository/components_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" ) diff --git a/cmd/clusterctl/client/repository/repository_github.go b/cmd/clusterctl/client/repository/repository_github.go index 803712d4e618..441e92be3bb9 100644 --- a/cmd/clusterctl/client/repository/repository_github.go +++ b/cmd/clusterctl/client/repository/repository_github.go @@ -25,7 +25,7 @@ import ( "path/filepath" "strings" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "github.com/google/go-github/v33/github" "github.com/pkg/errors" diff --git a/cmd/clusterctl/client/repository/repository_local.go b/cmd/clusterctl/client/repository/repository_local.go index 6e353fd66db8..4dee68aedd4e 100644 --- a/cmd/clusterctl/client/repository/repository_local.go +++ b/cmd/clusterctl/client/repository/repository_local.go @@ -23,7 +23,7 @@ import ( "runtime" "strings" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "github.com/pkg/errors" "k8s.io/apimachinery/pkg/util/version" diff --git a/cmd/clusterctl/client/repository/repository_memory.go b/cmd/clusterctl/client/repository/repository_memory.go index 237ae7255a14..ac50e2d3cf43 100644 --- a/cmd/clusterctl/client/repository/repository_memory.go +++ b/cmd/clusterctl/client/repository/repository_memory.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/scheme" ) diff --git a/cmd/clusterctl/client/rollout_test.go b/cmd/clusterctl/client/rollout_test.go index 308de2c84c3a..44151b8e90ca 100644 --- a/cmd/clusterctl/client/rollout_test.go +++ b/cmd/clusterctl/client/rollout_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" @@ -107,7 +107,7 @@ func fakeClientForRollout() *fakeClient { md1 := &clusterv1.MachineDeployment{ TypeMeta: metav1.TypeMeta{ Kind: "MachineDeployment", - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", }, ObjectMeta: metav1.ObjectMeta{ Namespace: "default", @@ -117,7 +117,7 @@ func fakeClientForRollout() *fakeClient { md2 := &clusterv1.MachineDeployment{ TypeMeta: metav1.TypeMeta{ Kind: "MachineDeployment", - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", }, ObjectMeta: metav1.ObjectMeta{ Namespace: "default", diff --git a/cmd/clusterctl/client/tree/discovery.go b/cmd/clusterctl/client/tree/discovery.go index 4e5b14e9e0a0..50d6638bb0fa 100644 --- a/cmd/clusterctl/client/tree/discovery.go +++ b/cmd/clusterctl/client/tree/discovery.go @@ -19,7 +19,7 @@ package tree import ( "context" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/cmd/clusterctl/client/tree/discovery_test.go b/cmd/clusterctl/client/tree/discovery_test.go index 4171a0e9908e..ec93e5288c45 100644 --- a/cmd/clusterctl/client/tree/discovery_test.go +++ b/cmd/clusterctl/client/tree/discovery_test.go @@ -64,44 +64,44 @@ func Test_Discovery(t *testing.T) { }, wantTree: map[string][]string{ // Cluster should be parent of InfrastructureCluster, ControlPlane, and WorkerNodes - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp", - "virtual.cluster.x-k8s.io/v1alpha4, ns1/Workers", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp", + "virtual.cluster.x-k8s.io/v1beta1, ns1/Workers", }, // InfrastructureCluster should be leaf - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": {}, + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": {}, // ControlPlane should have a machine - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp": { - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cp1", + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cp1", }, // Machine should be leaf (no echo) - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cp1": {}, + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cp1": {}, // Workers should have a machine deployment - "virtual.cluster.x-k8s.io/v1alpha4, ns1/Workers": { - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1", + "virtual.cluster.x-k8s.io/v1beta1, ns1/Workers": { + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1", }, // Machine deployment should have a group of machines (grouping) - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1": { - "virtual.cluster.x-k8s.io/v1alpha4, ns1/zzz_", + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1": { + "virtual.cluster.x-k8s.io/v1beta1, ns1/zzz_", }, }, wantNodeCheck: map[string]nodeCheck{ // InfrastructureCluster should have a meta name - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": func(g *WithT, obj client.Object) { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": func(g *WithT, obj client.Object) { g.Expect(GetMetaName(obj)).To(Equal("ClusterInfrastructure")) }, // ControlPlane should have a meta name, be a grouping object - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp": func(g *WithT, obj client.Object) { + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp": func(g *WithT, obj client.Object) { g.Expect(GetMetaName(obj)).To(Equal("ControlPlane")) g.Expect(IsGroupingObject(obj)).To(BeTrue()) }, // Workers should be a virtual node - "virtual.cluster.x-k8s.io/v1alpha4, ns1/Workers": func(g *WithT, obj client.Object) { + "virtual.cluster.x-k8s.io/v1beta1, ns1/Workers": func(g *WithT, obj client.Object) { g.Expect(IsVirtualObject(obj)).To(BeTrue()) }, // Machine deployment should be a grouping object - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1": func(g *WithT, obj client.Object) { + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1": func(g *WithT, obj client.Object) { g.Expect(IsGroupingObject(obj)).To(BeTrue()) }, }, @@ -133,47 +133,47 @@ func Test_Discovery(t *testing.T) { }, wantTree: map[string][]string{ // Cluster should be parent of InfrastructureCluster, ControlPlane, and WorkerNodes - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp", - "virtual.cluster.x-k8s.io/v1alpha4, ns1/Workers", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp", + "virtual.cluster.x-k8s.io/v1beta1, ns1/Workers", }, // InfrastructureCluster should be leaf - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": {}, + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": {}, // ControlPlane should have a machine - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp": { - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cp1", + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cp1", }, // Workers should have a machine deployment - "virtual.cluster.x-k8s.io/v1alpha4, ns1/Workers": { - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1", + "virtual.cluster.x-k8s.io/v1beta1, ns1/Workers": { + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1", }, // Machine deployment should have a group of machines - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1": { - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m2", + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m2", }, // Machine should be leaf (no echo) - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cp1": {}, - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1": {}, - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m2": {}, + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cp1": {}, + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1": {}, + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m2": {}, }, wantNodeCheck: map[string]nodeCheck{ // InfrastructureCluster should have a meta name - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": func(g *WithT, obj client.Object) { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": func(g *WithT, obj client.Object) { g.Expect(GetMetaName(obj)).To(Equal("ClusterInfrastructure")) }, // ControlPlane should have a meta name, should NOT be a grouping object - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp": func(g *WithT, obj client.Object) { + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp": func(g *WithT, obj client.Object) { g.Expect(GetMetaName(obj)).To(Equal("ControlPlane")) g.Expect(IsGroupingObject(obj)).To(BeFalse()) }, // Workers should be a virtual node - "virtual.cluster.x-k8s.io/v1alpha4, ns1/Workers": func(g *WithT, obj client.Object) { + "virtual.cluster.x-k8s.io/v1beta1, ns1/Workers": func(g *WithT, obj client.Object) { g.Expect(IsVirtualObject(obj)).To(BeTrue()) }, // Machine deployment should NOT be a grouping object - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1": func(g *WithT, obj client.Object) { + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1": func(g *WithT, obj client.Object) { g.Expect(IsGroupingObject(obj)).To(BeFalse()) }, }, @@ -205,65 +205,65 @@ func Test_Discovery(t *testing.T) { }, wantTree: map[string][]string{ // Cluster should be parent of InfrastructureCluster, ControlPlane, and WorkerNodes - "cluster.x-k8s.io/v1alpha4, Kind=Cluster, ns1/cluster1": { - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1", - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp", - "virtual.cluster.x-k8s.io/v1alpha4, ns1/Workers", + "cluster.x-k8s.io/v1beta1, Kind=Cluster, ns1/cluster1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1", + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp", + "virtual.cluster.x-k8s.io/v1beta1, ns1/Workers", }, // InfrastructureCluster should be leaf - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": {}, + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": {}, // ControlPlane should have a machine - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp": { - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cp1", + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cp1", }, // Machine should have infra machine and bootstrap (echo) - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/cp1": { - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/cp1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/cp1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/cp1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/cp1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/cp1", }, // Workers should have a machine deployment - "virtual.cluster.x-k8s.io/v1alpha4, ns1/Workers": { - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1", + "virtual.cluster.x-k8s.io/v1beta1, ns1/Workers": { + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1", }, // Machine deployment should have a group of machines - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1": { - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1": { + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1", }, // Machine should have infra machine and bootstrap (echo) - "cluster.x-k8s.io/v1alpha4, Kind=Machine, ns1/m1": { - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m1", - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1", + "cluster.x-k8s.io/v1beta1, Kind=Machine, ns1/m1": { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m1", + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1", }, }, wantNodeCheck: map[string]nodeCheck{ // InfrastructureCluster should have a meta name - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureCluster, ns1/cluster1": func(g *WithT, obj client.Object) { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureCluster, ns1/cluster1": func(g *WithT, obj client.Object) { g.Expect(GetMetaName(obj)).To(Equal("ClusterInfrastructure")) }, // ControlPlane should have a meta name, should NOT be a grouping object - "controlplane.cluster.x-k8s.io/v1alpha4, Kind=GenericControlPlane, ns1/cp": func(g *WithT, obj client.Object) { + "controlplane.cluster.x-k8s.io/v1beta1, Kind=GenericControlPlane, ns1/cp": func(g *WithT, obj client.Object) { g.Expect(GetMetaName(obj)).To(Equal("ControlPlane")) g.Expect(IsGroupingObject(obj)).To(BeFalse()) }, // Workers should be a virtual node - "virtual.cluster.x-k8s.io/v1alpha4, ns1/Workers": func(g *WithT, obj client.Object) { + "virtual.cluster.x-k8s.io/v1beta1, ns1/Workers": func(g *WithT, obj client.Object) { g.Expect(IsVirtualObject(obj)).To(BeTrue()) }, // Machine deployment should NOT be a grouping object - "cluster.x-k8s.io/v1alpha4, Kind=MachineDeployment, ns1/md1": func(g *WithT, obj client.Object) { + "cluster.x-k8s.io/v1beta1, Kind=MachineDeployment, ns1/md1": func(g *WithT, obj client.Object) { g.Expect(IsGroupingObject(obj)).To(BeFalse()) }, // infra machines and boostrap should have meta names - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/cp1": func(g *WithT, obj client.Object) { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/cp1": func(g *WithT, obj client.Object) { g.Expect(GetMetaName(obj)).To(Equal("MachineInfrastructure")) }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/cp1": func(g *WithT, obj client.Object) { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/cp1": func(g *WithT, obj client.Object) { g.Expect(GetMetaName(obj)).To(Equal("BootstrapConfig")) }, - "infrastructure.cluster.x-k8s.io/v1alpha4, Kind=GenericInfrastructureMachine, ns1/m1": func(g *WithT, obj client.Object) { + "infrastructure.cluster.x-k8s.io/v1beta1, Kind=GenericInfrastructureMachine, ns1/m1": func(g *WithT, obj client.Object) { g.Expect(GetMetaName(obj)).To(Equal("MachineInfrastructure")) }, - "bootstrap.cluster.x-k8s.io/v1alpha4, Kind=GenericBootstrapConfig, ns1/m1": func(g *WithT, obj client.Object) { + "bootstrap.cluster.x-k8s.io/v1beta1, Kind=GenericBootstrapConfig, ns1/m1": func(g *WithT, obj client.Object) { g.Expect(GetMetaName(obj)).To(Equal("BootstrapConfig")) }, }, diff --git a/cmd/clusterctl/client/tree/tree.go b/cmd/clusterctl/client/tree/tree.go index 3c75ecf903de..f6b8d66e329f 100644 --- a/cmd/clusterctl/client/tree/tree.go +++ b/cmd/clusterctl/client/tree/tree.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/cmd/clusterctl/client/tree/tree_test.go b/cmd/clusterctl/client/tree/tree_test.go index ca043944f070..72924cc6b09d 100644 --- a/cmd/clusterctl/client/tree/tree_test.go +++ b/cmd/clusterctl/client/tree/tree_test.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/conditions" ) @@ -257,7 +257,7 @@ func Test_createGroupNode(t *testing.T) { want := &unstructured.Unstructured{ Object: map[string]interface{}{ - "apiVersion": "virtual.cluster.x-k8s.io/v1alpha4", + "apiVersion": "virtual.cluster.x-k8s.io/v1beta1", "kind": "MachineGroup", "metadata": map[string]interface{}{ "namespace": "ns", @@ -297,7 +297,7 @@ func Test_updateGroupNode(t *testing.T) { group := &unstructured.Unstructured{ Object: map[string]interface{}{ - "apiVersion": "virtual.cluster.x-k8s.io/v1alpha4", + "apiVersion": "virtual.cluster.x-k8s.io/v1beta1", "kind": "MachineGroup", "metadata": map[string]interface{}{ "namespace": "ns", @@ -338,7 +338,7 @@ func Test_updateGroupNode(t *testing.T) { want := &unstructured.Unstructured{ Object: map[string]interface{}{ - "apiVersion": "virtual.cluster.x-k8s.io/v1alpha4", + "apiVersion": "virtual.cluster.x-k8s.io/v1beta1", "kind": "MachineGroup", "metadata": map[string]interface{}{ "namespace": "ns", diff --git a/cmd/clusterctl/client/tree/util.go b/cmd/clusterctl/client/tree/util.go index 05d24b40bd5d..e821fa1b6c18 100644 --- a/cmd/clusterctl/client/tree/util.go +++ b/cmd/clusterctl/client/tree/util.go @@ -21,7 +21,7 @@ import ( "sort" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -90,7 +90,7 @@ func objToSetter(obj client.Object) conditions.Setter { // VirtualObject return a new virtual object. func VirtualObject(namespace, kind, name string) *unstructured.Unstructured { - gk := "virtual.cluster.x-k8s.io/v1alpha4" + gk := "virtual.cluster.x-k8s.io/v1beta1" return &unstructured.Unstructured{ Object: map[string]interface{}{ "apiVersion": gk, diff --git a/cmd/clusterctl/client/upgrade.go b/cmd/clusterctl/client/upgrade.go index 784454b326c0..4f7d4134557d 100644 --- a/cmd/clusterctl/client/upgrade.go +++ b/cmd/clusterctl/client/upgrade.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clusterv1old "sigs.k8s.io/cluster-api/api/v1alpha3" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" ) diff --git a/cmd/clusterctl/client/upgrade_test.go b/cmd/clusterctl/client/upgrade_test.go index 70c573cb8920..34f18b1230cf 100644 --- a/cmd/clusterctl/client/upgrade_test.go +++ b/cmd/clusterctl/client/upgrade_test.go @@ -24,7 +24,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" diff --git a/cmd/clusterctl/cmd/describe_cluster.go b/cmd/clusterctl/cmd/describe_cluster.go index 872a7b350620..422bf4591942 100644 --- a/cmd/clusterctl/cmd/describe_cluster.go +++ b/cmd/clusterctl/cmd/describe_cluster.go @@ -28,7 +28,7 @@ import ( "github.com/spf13/cobra" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/duration" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/client" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/tree" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" @@ -80,11 +80,11 @@ var describeClusterClusterCmd = &cobra.Command{ # Describe the cluster named test-1 showing all the conditions for a specific machine. clusterctl describe cluster test-1 --show-conditions Machine/m1 - # Describe the cluster named test-1 disabling automatic grouping of objects with the same ready condition + # Describe the cluster named test-1 disabling automatic grouping of objects with the same ready condition # e.g. un-group all the machines with Ready=true instead of showing a single group node. clusterctl describe cluster test-1 --disable-grouping - # Describe the cluster named test-1 disabling automatic echo suppression + # Describe the cluster named test-1 disabling automatic echo suppression # e.g. show the infrastructure machine objects, no matter if the current state is already reported by the machine's Ready condition. clusterctl describe cluster test-1`), diff --git a/cmd/clusterctl/cmd/describe_cluster_test.go b/cmd/clusterctl/cmd/describe_cluster_test.go index 46f982fe62ff..0932c3c14ff3 100644 --- a/cmd/clusterctl/cmd/describe_cluster_test.go +++ b/cmd/clusterctl/cmd/describe_cluster_test.go @@ -28,7 +28,7 @@ import ( "github.com/fatih/color" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/tree" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/cmd/clusterctl/cmd/upgrade_plan.go b/cmd/clusterctl/cmd/upgrade_plan.go index eb486778e5e5..0cc0173499b6 100644 --- a/cmd/clusterctl/cmd/upgrade_plan.go +++ b/cmd/clusterctl/cmd/upgrade_plan.go @@ -22,7 +22,7 @@ import ( "text/tabwriter" "github.com/spf13/cobra" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/client" ) diff --git a/cmd/clusterctl/internal/scheme/scheme.go b/cmd/clusterctl/internal/scheme/scheme.go index af77caa20c07..3a6747e6f001 100644 --- a/cmd/clusterctl/internal/scheme/scheme.go +++ b/cmd/clusterctl/internal/scheme/scheme.go @@ -24,9 +24,9 @@ import ( apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" "k8s.io/apimachinery/pkg/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" ) var ( diff --git a/cmd/clusterctl/internal/test/contracts.go b/cmd/clusterctl/internal/test/contracts.go index b49b86bea07a..b3144a651ff9 100644 --- a/cmd/clusterctl/internal/test/contracts.go +++ b/cmd/clusterctl/internal/test/contracts.go @@ -18,7 +18,7 @@ package test import ( clusterv1old "sigs.k8s.io/cluster-api/api/v1alpha3" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // PreviousCAPIContractNotSupported define the previous Cluster API contract, not supported by this release of clusterctl. diff --git a/cmd/clusterctl/internal/test/fake_objects.go b/cmd/clusterctl/internal/test/fake_objects.go index 9f840f5855eb..bfd9500585a6 100644 --- a/cmd/clusterctl/internal/test/fake_objects.go +++ b/cmd/clusterctl/internal/test/fake_objects.go @@ -25,14 +25,14 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" fakebootstrap "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test/providers/bootstrap" fakecontrolplane "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test/providers/controlplane" fakeexternal "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test/providers/external" fakeinfrastructure "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test/providers/infrastructure" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/cmd/clusterctl/internal/test/fake_proxy.go b/cmd/clusterctl/internal/test/fake_proxy.go index 47da497e81f6..b996e43e6b75 100644 --- a/cmd/clusterctl/internal/test/fake_proxy.go +++ b/cmd/clusterctl/internal/test/fake_proxy.go @@ -23,14 +23,14 @@ import ( "k8s.io/apimachinery/pkg/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" fakebootstrap "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test/providers/bootstrap" fakecontrolplane "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test/providers/controlplane" fakeexternal "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test/providers/external" fakeinfrastructure "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test/providers/infrastructure" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" ) diff --git a/cmd/clusterctl/internal/test/providers/bootstrap/groupversion_info.go b/cmd/clusterctl/internal/test/providers/bootstrap/groupversion_info.go index d801afb617ff..c4dab630fab4 100644 --- a/cmd/clusterctl/internal/test/providers/bootstrap/groupversion_info.go +++ b/cmd/clusterctl/internal/test/providers/bootstrap/groupversion_info.go @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "bootstrap.cluster.x-k8s.io", Version: "v1alpha4"} + GroupVersion = schema.GroupVersion{Group: "bootstrap.cluster.x-k8s.io", Version: "v1beta1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/cmd/clusterctl/internal/test/providers/controlplane/groupversion_info.go b/cmd/clusterctl/internal/test/providers/controlplane/groupversion_info.go index 382448a2f776..5586f446ad1a 100644 --- a/cmd/clusterctl/internal/test/providers/controlplane/groupversion_info.go +++ b/cmd/clusterctl/internal/test/providers/controlplane/groupversion_info.go @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "controlplane.cluster.x-k8s.io", Version: "v1alpha4"} + GroupVersion = schema.GroupVersion{Group: "controlplane.cluster.x-k8s.io", Version: "v1beta1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/cmd/clusterctl/internal/test/providers/external/groupversion_info.go b/cmd/clusterctl/internal/test/providers/external/groupversion_info.go index 333a7ca092f8..5d691485acb2 100644 --- a/cmd/clusterctl/internal/test/providers/external/groupversion_info.go +++ b/cmd/clusterctl/internal/test/providers/external/groupversion_info.go @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "external.cluster.x-k8s.io", Version: "v1alpha4"} + GroupVersion = schema.GroupVersion{Group: "external.cluster.x-k8s.io", Version: "v1beta1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/cmd/clusterctl/internal/test/providers/infrastructure/groupversion_info.go b/cmd/clusterctl/internal/test/providers/infrastructure/groupversion_info.go index d39aaaf26777..b701ed3e2162 100644 --- a/cmd/clusterctl/internal/test/providers/infrastructure/groupversion_info.go +++ b/cmd/clusterctl/internal/test/providers/infrastructure/groupversion_info.go @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha4"} + GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1beta1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml index fd325dcc6d69..f34be0309e65 100644 --- a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml +++ b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml @@ -186,6 +186,94 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Time duration since creation of ClusterResourceSetBinding + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: ClusterResourceSetBinding lists all matching ClusterResourceSets + with the cluster it belongs to. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: ClusterResourceSetBindingSpec defines the desired state of + ClusterResourceSetBinding. + properties: + bindings: + description: Bindings is a list of ClusterResourceSets and their resources. + items: + description: ResourceSetBinding keeps info on all of the resources + in a ClusterResourceSet. + properties: + clusterResourceSetName: + description: ClusterResourceSetName is the name of the ClusterResourceSet + that is applied to the owner cluster of the binding. + type: string + resources: + description: Resources is a list of resources that the ClusterResourceSet + has. + items: + description: ResourceBinding shows the status of a resource + that belongs to a ClusterResourceSet matched by the owner + cluster of the ClusterResourceSetBinding object. + properties: + applied: + description: Applied is to track if a resource is applied + to the cluster or not. + type: boolean + hash: + description: Hash is the hash of a resource's data. This + can be used to decide if a resource is changed. For + "ApplyOnce" ClusterResourceSet.spec.strategy, this is + no-op as that strategy does not act on change. + type: string + kind: + description: 'Kind of the resource. Supported kinds are: + Secrets and ConfigMaps.' + enum: + - Secret + - ConfigMap + type: string + lastAppliedTime: + description: LastAppliedTime identifies when this resource + was last applied to the cluster. + format: date-time + type: string + name: + description: Name of the resource that is in the same + namespace with ClusterResourceSet object. + minLength: 1 + type: string + required: + - applied + - kind + - name + type: object + type: array + required: + - clusterResourceSetName + type: object + type: array + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml index 3f3e30dc25fa..07c539859e80 100644 --- a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml +++ b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml @@ -335,6 +335,169 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Time duration since creation of ClusterResourceSet + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: ClusterResourceSet is the Schema for the clusterresourcesets + API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: ClusterResourceSetSpec defines the desired state of ClusterResourceSet. + properties: + clusterSelector: + description: Label selector for Clusters. The Clusters that are selected + by this will be the ones affected by this ClusterResourceSet. It + must match the Cluster labels. This field is immutable. Label selector + cannot be empty. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement is a selector that + contains values, a key, and an operator that relates the key + and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship to + a set of values. Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of string values. If the + operator is In or NotIn, the values array must be non-empty. + If the operator is Exists or DoesNotExist, the values + array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single + {key,value} in the matchLabels map is equivalent to an element + of matchExpressions, whose key field is "key", the operator + is "In", and the values array contains only "value". The requirements + are ANDed. + type: object + type: object + resources: + description: Resources is a list of Secrets/ConfigMaps where each + contains 1 or more resources to be applied to remote clusters. + items: + description: ResourceRef specifies a resource. + properties: + kind: + description: 'Kind of the resource. Supported kinds are: Secrets + and ConfigMaps.' + enum: + - Secret + - ConfigMap + type: string + name: + description: Name of the resource that is in the same namespace + with ClusterResourceSet object. + minLength: 1 + type: string + required: + - kind + - name + type: object + type: array + strategy: + description: Strategy is the strategy to be used during applying resources. + Defaults to ApplyOnce. This field is immutable. + enum: + - ApplyOnce + type: string + required: + - clusterSelector + type: object + status: + description: ClusterResourceSetStatus defines the observed state of ClusterResourceSet. + properties: + conditions: + description: Conditions defines current state of the ClusterResourceSet. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: ObservedGeneration reflects the generation of the most + recently observed ClusterResourceSet. + format: int64 + type: integer + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml index 52bb039a26e4..00ad547d51f6 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml @@ -377,6 +377,365 @@ spec: type: object type: object served: true + storage: false + subresources: {} + - additionalPrinterColumns: + - description: Time duration since creation of ClusterClass + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: ClusterClass is a template which can be used to create managed + topologies. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: ClusterClassSpec describes the desired state of the ClusterClass. + properties: + controlPlane: + description: ControlPlane is a reference to a local struct that holds + the details for provisioning the Control Plane for the Cluster. + properties: + machineInfrastructure: + description: "MachineTemplate defines the metadata and infrastructure + information for control plane machines. \n This field is supported + if and only if the control plane provider template referenced + above is Machine based and supports setting replicas." + properties: + ref: + description: Ref is a required reference to a custom resource + offered by a provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this + pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design + is not final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + required: + - ref + type: object + metadata: + description: "Metadata is the metadata applied to the machines + of the ControlPlane. At runtime this metadata is merged with + the corresponding metadata from the topology. \n This field + is supported if and only if the control plane provider template + referenced is Machine based." + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map + stored with a resource that may be set by external tools + to store and retrieve arbitrary metadata. They are not queryable + and should be preserved when modifying objects. More info: + http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used + to organize and categorize (scope and select) objects. May + match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object + ref: + description: Ref is a required reference to a custom resource + offered by a provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part + of an object. TODO: this design is not final and this field + is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + required: + - ref + type: object + infrastructure: + description: Infrastructure is a reference to a provider-specific + template that holds the details for provisioning infrastructure + specific cluster for the underlying provider. The underlying provider + is responsible for the implementation of the template to an infrastructure + cluster. + properties: + ref: + description: Ref is a required reference to a custom resource + offered by a provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part + of an object. TODO: this design is not final and this field + is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + required: + - ref + type: object + workers: + description: Workers describes the worker nodes for the cluster. It + is a collection of node types which can be used to create the worker + nodes of the cluster. + properties: + machineDeployments: + description: MachineDeployments is a list of machine deployment + classes that can be used to create a set of worker nodes. + items: + description: MachineDeploymentClass serves as a template to + define a set of worker nodes of the cluster provisioned using + the `ClusterClass`. + properties: + class: + description: Class denotes a type of worker node present + in the cluster, this name MUST be unique within a ClusterClass + and can be referenced in the Cluster to create a managed + MachineDeployment. + type: string + template: + description: Template is a local struct containing a collection + of templates for creation of MachineDeployment objects + representing a set of worker nodes. + properties: + bootstrap: + description: Bootstrap contains the bootstrap template + reference to be used for the creation of worker Machines. + properties: + ref: + description: Ref is a required reference to a custom + resource offered by a provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an + object instead of an entire object, this string + should contain a valid JSON/Go field access + statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to + a container within a pod, this would take + on a value like: "spec.containers{name}" (where + "name" refers to the name of the container + that triggered the event) or if no container + name is specified "spec.containers[2]" (container + with index 2 in this pod). This syntax is + chosen only to have some well-defined way + of referencing a part of an object. TODO: + this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which + this reference is made, if any. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + required: + - ref + type: object + infrastructure: + description: Infrastructure contains the infrastructure + template reference to be used for the creation of + worker Machines. + properties: + ref: + description: Ref is a required reference to a custom + resource offered by a provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an + object instead of an entire object, this string + should contain a valid JSON/Go field access + statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to + a container within a pod, this would take + on a value like: "spec.containers{name}" (where + "name" refers to the name of the container + that triggered the event) or if no container + name is specified "spec.containers[2]" (container + with index 2 in this pod). This syntax is + chosen only to have some well-defined way + of referencing a part of an object. TODO: + this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which + this reference is made, if any. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + required: + - ref + type: object + metadata: + description: Metadata is the metadata applied to the + machines of the MachineDeployment. At runtime this + metadata is merged with the corresponding metadata + from the topology. + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key + value map stored with a resource that may be set + by external tools to store and retrieve arbitrary + metadata. They are not queryable and should be + preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that + can be used to organize and categorize (scope + and select) objects. May match selectors of replication + controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object + required: + - bootstrap + - infrastructure + type: object + required: + - class + - template + type: object + type: array + type: object + type: object + type: object + served: true storage: true subresources: {} status: diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml index e9d5a2331c73..dce1f25211af 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml @@ -656,6 +656,390 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Time duration since creation of Cluster + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed + jsonPath: .status.phase + name: Phase + type: string + name: v1beta1 + schema: + openAPIV3Schema: + description: Cluster is the Schema for the clusters API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: ClusterSpec defines the desired state of Cluster. + properties: + clusterNetwork: + description: Cluster network configuration. + properties: + apiServerPort: + description: APIServerPort specifies the port the API Server should + bind to. Defaults to 6443. + format: int32 + type: integer + pods: + description: The network ranges from which Pod networks are allocated. + properties: + cidrBlocks: + items: + type: string + type: array + required: + - cidrBlocks + type: object + serviceDomain: + description: Domain name for services. + type: string + services: + description: The network ranges from which service VIPs are allocated. + properties: + cidrBlocks: + items: + type: string + type: array + required: + - cidrBlocks + type: object + type: object + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint used to + communicate with the control plane. + properties: + host: + description: The hostname on which the API server is serving. + type: string + port: + description: The port on which the API server is serving. + format: int32 + type: integer + required: + - host + - port + type: object + controlPlaneRef: + description: ControlPlaneRef is an optional reference to a provider-specific + resource that holds the details for provisioning the Control Plane + for a Cluster. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + infrastructureRef: + description: InfrastructureRef is a reference to a provider-specific + resource that holds the details for provisioning infrastructure + for a cluster in said provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + paused: + description: Paused can be used to prevent controllers from processing + the Cluster and all its associated objects. + type: boolean + topology: + description: 'This encapsulates the topology for the cluster. NOTE: + It is required to enable the ClusterTopology feature gate flag to + activate managed topologies support; this feature is highly experimental, + and parts of it might still be not implemented.' + properties: + class: + description: The name of the ClusterClass object to create the + topology. + type: string + controlPlane: + description: ControlPlane describes the cluster control plane. + properties: + metadata: + description: "Metadata is the metadata applied to the machines + of the ControlPlane. At runtime this metadata is merged + with the corresponding metadata from the ClusterClass. \n + This field is supported if and only if the control plane + provider template referenced in the ClusterClass is Machine + based." + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value + map stored with a resource that may be set by external + tools to store and retrieve arbitrary metadata. They + are not queryable and should be preserved when modifying + objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be + used to organize and categorize (scope and select) objects. + May match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object + replicas: + description: Replicas is the number of control plane nodes. + If the value is nil, the ControlPlane object is created + without the number of Replicas and it's assumed that the + control plane controller does not implement support for + this field. When specified against a control plane provider + that lacks support for this field, this value will be ignored. + format: int32 + type: integer + type: object + rolloutAfter: + description: RolloutAfter performs a rollout of the entire cluster + one component at a time, control plane first and then machine + deployments. + format: date-time + type: string + version: + description: The Kubernetes version of the cluster. + type: string + workers: + description: Workers encapsulates the different constructs that + form the worker nodes for the cluster. + properties: + machineDeployments: + description: MachineDeployments is a list of machine deployments + in the cluster. + items: + description: MachineDeploymentTopology specifies the different + parameters for a set of worker nodes in the topology. + This set of nodes is managed by a MachineDeployment object + whose lifecycle is managed by the Cluster controller. + properties: + class: + description: Class is the name of the MachineDeploymentClass + used to create the set of worker nodes. This should + match one of the deployment classes defined in the + ClusterClass object mentioned in the `Cluster.Spec.Class` + field. + type: string + metadata: + description: Metadata is the metadata applied to the + machines of the MachineDeployment. At runtime this + metadata is merged with the corresponding metadata + from the ClusterClass. + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key + value map stored with a resource that may be set + by external tools to store and retrieve arbitrary + metadata. They are not queryable and should be + preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that + can be used to organize and categorize (scope + and select) objects. May match selectors of replication + controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object + name: + description: Name is the unique identifier for this + MachineDeploymentTopology. The value is used with + other unique identifiers to create a MachineDeployment's + Name (e.g. cluster's name, etc). In case the name + is greater than the allowed maximum length, the values + are hashed together. + type: string + replicas: + description: Replicas is the number of worker nodes + belonging to this set. If the value is nil, the MachineDeployment + is created without the number of Replicas (defaulting + to zero) and it's assumed that an external entity + (like cluster autoscaler) is responsible for the management + of this value. + format: int32 + type: integer + required: + - class + - name + type: object + type: array + type: object + required: + - class + - version + type: object + type: object + status: + description: ClusterStatus defines the observed state of Cluster. + properties: + conditions: + description: Conditions defines current service state of the cluster. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + controlPlaneReady: + description: ControlPlaneReady defines if the control plane is ready. + type: boolean + failureDomains: + additionalProperties: + description: FailureDomainSpec is the Schema for Cluster API failure + domains. It allows controllers to understand how many failure + domains a cluster can optionally span across. + properties: + attributes: + additionalProperties: + type: string + description: Attributes is a free form map of attributes an + infrastructure provider might use or require. + type: object + controlPlane: + description: ControlPlane determines if this failure domain + is suitable for use by control plane machines. + type: boolean + type: object + description: FailureDomains is a slice of failure domain objects synced + from the infrastructure provider. + type: object + failureMessage: + description: FailureMessage indicates that there is a fatal problem + reconciling the state, and will be set to a descriptive error message. + type: string + failureReason: + description: FailureReason indicates that there is a fatal problem + reconciling the state, and will be set to a token value suitable + for programmatic interpretation. + type: string + infrastructureReady: + description: InfrastructureReady is the state of the infrastructure + provider. + type: boolean + observedGeneration: + description: ObservedGeneration is the latest generation observed + by the controller. + format: int64 + type: integer + phase: + description: Phase represents the current phase of cluster actuation. + E.g. Pending, Running, Terminating, Failed etc. + type: string + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml index 88bbe8daca61..b50417f7e826 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml @@ -955,6 +955,464 @@ spec: type: object type: object served: true + storage: false + subresources: + scale: + labelSelectorPath: .status.selector + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .spec.clusterName + name: Cluster + type: string + - description: Time duration since creation of MachineDeployment + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: MachineDeployment status such as ScalingUp/ScalingDown/Running/Failed/Unknown + jsonPath: .status.phase + name: Phase + type: string + - description: Total number of non-terminated machines targeted by this MachineDeployment + jsonPath: .status.replicas + name: Replicas + type: integer + - description: Total number of ready machines targeted by this MachineDeployment + jsonPath: .status.readyReplicas + name: Ready + type: integer + - description: Total number of non-terminated machines targeted by this deployment + that have the desired template spec + jsonPath: .status.updatedReplicas + name: Updated + type: integer + - description: Total number of unavailable machines targeted by this MachineDeployment + jsonPath: .status.unavailableReplicas + name: Unavailable + type: integer + name: v1beta1 + schema: + openAPIV3Schema: + description: MachineDeployment is the Schema for the machinedeployments API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: MachineDeploymentSpec defines the desired state of MachineDeployment. + properties: + clusterName: + description: ClusterName is the name of the Cluster this object belongs + to. + minLength: 1 + type: string + minReadySeconds: + description: Minimum number of seconds for which a newly created machine + should be ready. Defaults to 0 (machine will be considered available + as soon as it is ready) + format: int32 + type: integer + paused: + description: Indicates that the deployment is paused. + type: boolean + progressDeadlineSeconds: + description: The maximum time in seconds for a deployment to make + progress before it is considered to be failed. The deployment controller + will continue to process failed deployments and a condition with + a ProgressDeadlineExceeded reason will be surfaced in the deployment + status. Note that progress will not be estimated during the time + a deployment is paused. Defaults to 600s. + format: int32 + type: integer + replicas: + default: 1 + description: Number of desired machines. Defaults to 1. This is a + pointer to distinguish between explicit zero and not specified. + format: int32 + type: integer + revisionHistoryLimit: + description: The number of old MachineSets to retain to allow rollback. + This is a pointer to distinguish between explicit zero and not specified. + Defaults to 1. + format: int32 + type: integer + selector: + description: Label selector for machines. Existing MachineSets whose + machines are selected by this will be the ones affected by this + deployment. It must match the machine template's labels. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement is a selector that + contains values, a key, and an operator that relates the key + and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship to + a set of values. Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of string values. If the + operator is In or NotIn, the values array must be non-empty. + If the operator is Exists or DoesNotExist, the values + array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single + {key,value} in the matchLabels map is equivalent to an element + of matchExpressions, whose key field is "key", the operator + is "In", and the values array contains only "value". The requirements + are ANDed. + type: object + type: object + strategy: + description: The deployment strategy to use to replace existing machines + with new ones. + properties: + rollingUpdate: + description: Rolling update config params. Present only if MachineDeploymentStrategyType + = RollingUpdate. + properties: + deletePolicy: + description: DeletePolicy defines the policy used by the MachineDeployment + to identify nodes to delete when downscaling. Valid values + are "Random, "Newest", "Oldest" When no value is supplied, + the default DeletePolicy of MachineSet is used + enum: + - Random + - Newest + - Oldest + type: string + maxSurge: + anyOf: + - type: integer + - type: string + description: 'The maximum number of machines that can be scheduled + above the desired number of machines. Value can be an absolute + number (ex: 5) or a percentage of desired machines (ex: + 10%). This can not be 0 if MaxUnavailable is 0. Absolute + number is calculated from percentage by rounding up. Defaults + to 1. Example: when this is set to 30%, the new MachineSet + can be scaled up immediately when the rolling update starts, + such that the total number of old and new machines do not + exceed 130% of desired machines. Once old machines have + been killed, new MachineSet can be scaled up further, ensuring + that total number of machines running at any time during + the update is at most 130% of desired machines.' + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + description: 'The maximum number of machines that can be unavailable + during the update. Value can be an absolute number (ex: + 5) or a percentage of desired machines (ex: 10%). Absolute + number is calculated from percentage by rounding down. This + can not be 0 if MaxSurge is 0. Defaults to 0. Example: when + this is set to 30%, the old MachineSet can be scaled down + to 70% of desired machines immediately when the rolling + update starts. Once new machines are ready, old MachineSet + can be scaled down further, followed by scaling up the new + MachineSet, ensuring that the total number of machines available + at all times during the update is at least 70% of desired + machines.' + x-kubernetes-int-or-string: true + type: object + type: + description: Type of deployment. Default is RollingUpdate. + enum: + - RollingUpdate + - OnDelete + type: string + type: object + template: + description: Template describes the machines that will be created. + properties: + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map + stored with a resource that may be set by external tools + to store and retrieve arbitrary metadata. They are not queryable + and should be preserved when modifying objects. More info: + http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used + to organize and categorize (scope and select) objects. May + match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object + spec: + description: 'Specification of the desired behavior of the machine. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + properties: + bootstrap: + description: Bootstrap is a reference to a local struct which + encapsulates fields to configure the Machine’s bootstrapping + mechanism. + properties: + configRef: + description: ConfigRef is a reference to a bootstrap provider-specific + resource that holds configuration details. The reference + is optional to allow users/operators to specify Bootstrap.DataSecretName + without the need of a controller. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object + instead of an entire object, this string should + contain a valid JSON/Go field access statement, + such as desiredState.manifest.containers[2]. For + example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container + that triggered the event) or if no container name + is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only + to have some well-defined way of referencing a part + of an object. TODO: this design is not final and + this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this + reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + dataSecretName: + description: DataSecretName is the name of the secret + that stores the bootstrap data script. If nil, the Machine + should remain in the Pending state. + type: string + type: object + clusterName: + description: ClusterName is the name of the Cluster this object + belongs to. + minLength: 1 + type: string + failureDomain: + description: FailureDomain is the failure domain the machine + will be created in. Must match a key in the FailureDomains + map stored on the cluster object. + type: string + infrastructureRef: + description: InfrastructureRef is a required reference to + a custom resource offered by an infrastructure provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this + pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design + is not final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + nodeDrainTimeout: + description: 'NodeDrainTimeout is the total amount of time + that the controller will spend on draining a node. The default + value is 0, meaning that the node can be drained without + any time limitations. NOTE: NodeDrainTimeout is different + from `kubectl drain --timeout`' + type: string + providerID: + description: ProviderID is the identification ID of the machine + provided by the provider. This field must match the provider + ID as seen on the node object corresponding to this machine. + This field is required by higher level consumers of cluster-api. + Example use case is cluster autoscaler with cluster-api + as provider. Clean-up logic in the autoscaler compares machines + to nodes to find out machines at provider which could not + get registered as Kubernetes nodes. With cluster-api as + a generic out-of-tree provider for autoscaler, this field + is required by autoscaler to be able to have a provider + view of the list of machines. Another list of nodes is queried + from the k8s apiserver and then a comparison is done to + find out unregistered machines and are marked for delete. + This field will be set by the actuators and consumed by + higher level entities like autoscaler that will be interfacing + with cluster-api as generic provider. + type: string + version: + description: Version defines the desired Kubernetes version. + This field is meant to be optionally used by bootstrap providers. + type: string + required: + - bootstrap + - clusterName + - infrastructureRef + type: object + type: object + required: + - clusterName + - selector + - template + type: object + status: + description: MachineDeploymentStatus defines the observed state of MachineDeployment. + properties: + availableReplicas: + description: Total number of available machines (ready for at least + minReadySeconds) targeted by this deployment. + format: int32 + type: integer + conditions: + description: Conditions defines current service state of the MachineDeployment. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: The generation observed by the deployment controller. + format: int64 + type: integer + phase: + description: Phase represents the current phase of a MachineDeployment + (ScalingUp, ScalingDown, Running, Failed, or Unknown). + type: string + readyReplicas: + description: Total number of ready machines targeted by this deployment. + format: int32 + type: integer + replicas: + description: Total number of non-terminated machines targeted by this + deployment (their labels match the selector). + format: int32 + type: integer + selector: + description: 'Selector is the same as the label selector but in the + string format to avoid introspection by clients. The string will + be in the same format as the query-param syntax. More info about + label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors' + type: string + unavailableReplicas: + description: Total number of unavailable machines targeted by this + deployment. This is the total number of machines that are still + required for the deployment to have 100% available capacity. They + may either be machines that are running but not yet available or + machines that still have not been created. + format: int32 + type: integer + updatedReplicas: + description: Total number of non-terminated machines targeted by this + deployment that have the desired template spec. + format: int32 + type: integer + type: object + type: object + served: true storage: true subresources: scale: diff --git a/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml b/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml index cbe1fbf93f93..b17c19603ee7 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml @@ -537,6 +537,275 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .spec.clusterName + name: Cluster + type: string + - description: Time duration since creation of MachineHealthCheck + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Maximum number of unhealthy machines allowed + jsonPath: .spec.maxUnhealthy + name: MaxUnhealthy + type: string + - description: Number of machines currently monitored + jsonPath: .status.expectedMachines + name: ExpectedMachines + type: integer + - description: Current observed healthy machines + jsonPath: .status.currentHealthy + name: CurrentHealthy + type: integer + name: v1beta1 + schema: + openAPIV3Schema: + description: MachineHealthCheck is the Schema for the machinehealthchecks + API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Specification of machine health check policy + properties: + clusterName: + description: ClusterName is the name of the Cluster this object belongs + to. + minLength: 1 + type: string + maxUnhealthy: + anyOf: + - type: integer + - type: string + description: Any further remediation is only allowed if at most "MaxUnhealthy" + machines selected by "selector" are not healthy. + x-kubernetes-int-or-string: true + nodeStartupTimeout: + description: Machines older than this duration without a node will + be considered to have failed and will be remediated. If not set, + this value is defaulted to 10 minutes. If you wish to disable this + feature, set the value explicitly to 0. + type: string + remediationTemplate: + description: "RemediationTemplate is a reference to a remediation + template provided by an infrastructure provider. \n This field is + completely optional, when filled, the MachineHealthCheck controller + creates a new object from the template referenced and hands off + remediation of the machine to a controller that lives outside of + Cluster API." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + selector: + description: Label selector to match machines whose health will be + exercised + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement is a selector that + contains values, a key, and an operator that relates the key + and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship to + a set of values. Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of string values. If the + operator is In or NotIn, the values array must be non-empty. + If the operator is Exists or DoesNotExist, the values + array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single + {key,value} in the matchLabels map is equivalent to an element + of matchExpressions, whose key field is "key", the operator + is "In", and the values array contains only "value". The requirements + are ANDed. + type: object + type: object + unhealthyConditions: + description: UnhealthyConditions contains a list of the conditions + that determine whether a node is considered unhealthy. The conditions + are combined in a logical OR, i.e. if any of the conditions is met, + the node is unhealthy. + items: + description: UnhealthyCondition represents a Node condition type + and value with a timeout specified as a duration. When the named + condition has been in the given status for at least the timeout + value, a node is considered unhealthy. + properties: + status: + minLength: 1 + type: string + timeout: + type: string + type: + minLength: 1 + type: string + required: + - status + - timeout + - type + type: object + minItems: 1 + type: array + unhealthyRange: + description: 'Any further remediation is only allowed if the number + of machines selected by "selector" as not healthy is within the + range of "UnhealthyRange". Takes precedence over MaxUnhealthy. Eg. + "[3-5]" - This means that remediation will be allowed only when: + (a) there are at least 3 unhealthy machines (and) (b) there are + at most 5 unhealthy machines' + pattern: ^\[[0-9]+-[0-9]+\]$ + type: string + required: + - clusterName + - selector + - unhealthyConditions + type: object + status: + description: Most recently observed status of MachineHealthCheck resource + properties: + conditions: + description: Conditions defines current service state of the MachineHealthCheck. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + currentHealthy: + description: total number of healthy machines counted by this machine + health check + format: int32 + minimum: 0 + type: integer + expectedMachines: + description: total number of machines counted by this machine health + check + format: int32 + minimum: 0 + type: integer + observedGeneration: + description: ObservedGeneration is the latest generation observed + by the controller. + format: int64 + type: integer + remediationsAllowed: + description: RemediationsAllowed is the number of further remediations + allowed by this machine health check before maxUnhealthy short circuiting + will be applied + format: int32 + minimum: 0 + type: integer + targets: + description: Targets shows the current list of machines the machine + health check is watching + items: + type: string + type: array + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml index d84812a97f85..05339859f0d3 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml @@ -959,6 +959,411 @@ spec: type: object type: object served: true + storage: false + subresources: + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} + - additionalPrinterColumns: + - description: Time duration since creation of MachinePool + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: MachinePool replicas count + jsonPath: .status.replicas + name: Replicas + type: string + - description: MachinePool status such as Terminating/Pending/Provisioning/Running/Failed + etc + jsonPath: .status.phase + name: Phase + type: string + - description: Kubernetes version associated with this MachinePool + jsonPath: .spec.template.spec.version + name: Version + type: string + name: v1beta1 + schema: + openAPIV3Schema: + description: MachinePool is the Schema for the machinepools API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: MachinePoolSpec defines the desired state of MachinePool. + properties: + clusterName: + description: ClusterName is the name of the Cluster this object belongs + to. + minLength: 1 + type: string + failureDomains: + description: FailureDomains is the list of failure domains this MachinePool + should be attached to. + items: + type: string + type: array + minReadySeconds: + description: Minimum number of seconds for which a newly created machine + instances should be ready. Defaults to 0 (machine instance will + be considered available as soon as it is ready) + format: int32 + type: integer + providerIDList: + description: ProviderIDList are the identification IDs of machine + instances provided by the provider. This field must match the provider + IDs as seen on the node objects corresponding to a machine pool's + machine instances. + items: + type: string + type: array + replicas: + description: Number of desired machines. Defaults to 1. This is a + pointer to distinguish between explicit zero and not specified. + format: int32 + type: integer + template: + description: Template describes the machines that will be created. + properties: + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map + stored with a resource that may be set by external tools + to store and retrieve arbitrary metadata. They are not queryable + and should be preserved when modifying objects. More info: + http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used + to organize and categorize (scope and select) objects. May + match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object + spec: + description: 'Specification of the desired behavior of the machine. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + properties: + bootstrap: + description: Bootstrap is a reference to a local struct which + encapsulates fields to configure the Machine’s bootstrapping + mechanism. + properties: + configRef: + description: ConfigRef is a reference to a bootstrap provider-specific + resource that holds configuration details. The reference + is optional to allow users/operators to specify Bootstrap.DataSecretName + without the need of a controller. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object + instead of an entire object, this string should + contain a valid JSON/Go field access statement, + such as desiredState.manifest.containers[2]. For + example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container + that triggered the event) or if no container name + is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only + to have some well-defined way of referencing a part + of an object. TODO: this design is not final and + this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this + reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + dataSecretName: + description: DataSecretName is the name of the secret + that stores the bootstrap data script. If nil, the Machine + should remain in the Pending state. + type: string + type: object + clusterName: + description: ClusterName is the name of the Cluster this object + belongs to. + minLength: 1 + type: string + failureDomain: + description: FailureDomain is the failure domain the machine + will be created in. Must match a key in the FailureDomains + map stored on the cluster object. + type: string + infrastructureRef: + description: InfrastructureRef is a required reference to + a custom resource offered by an infrastructure provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this + pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design + is not final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + nodeDrainTimeout: + description: 'NodeDrainTimeout is the total amount of time + that the controller will spend on draining a node. The default + value is 0, meaning that the node can be drained without + any time limitations. NOTE: NodeDrainTimeout is different + from `kubectl drain --timeout`' + type: string + providerID: + description: ProviderID is the identification ID of the machine + provided by the provider. This field must match the provider + ID as seen on the node object corresponding to this machine. + This field is required by higher level consumers of cluster-api. + Example use case is cluster autoscaler with cluster-api + as provider. Clean-up logic in the autoscaler compares machines + to nodes to find out machines at provider which could not + get registered as Kubernetes nodes. With cluster-api as + a generic out-of-tree provider for autoscaler, this field + is required by autoscaler to be able to have a provider + view of the list of machines. Another list of nodes is queried + from the k8s apiserver and then a comparison is done to + find out unregistered machines and are marked for delete. + This field will be set by the actuators and consumed by + higher level entities like autoscaler that will be interfacing + with cluster-api as generic provider. + type: string + version: + description: Version defines the desired Kubernetes version. + This field is meant to be optionally used by bootstrap providers. + type: string + required: + - bootstrap + - clusterName + - infrastructureRef + type: object + type: object + required: + - clusterName + - template + type: object + status: + description: MachinePoolStatus defines the observed state of MachinePool. + properties: + availableReplicas: + description: The number of available replicas (ready for at least + minReadySeconds) for this MachinePool. + format: int32 + type: integer + bootstrapReady: + description: BootstrapReady is the state of the bootstrap provider. + type: boolean + conditions: + description: Conditions define the current service state of the MachinePool. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + failureMessage: + description: FailureMessage indicates that there is a problem reconciling + the state, and will be set to a descriptive error message. + type: string + failureReason: + description: FailureReason indicates that there is a problem reconciling + the state, and will be set to a token value suitable for programmatic + interpretation. + type: string + infrastructureReady: + description: InfrastructureReady is the state of the infrastructure + provider. + type: boolean + nodeRefs: + description: NodeRefs will point to the corresponding Nodes if it + they exist. + items: + description: 'ObjectReference contains enough information to let + you inspect or modify the referred object. --- New uses of this + type are discouraged because of difficulty describing its usage + when embedded in APIs. 1. Ignored fields. It includes many fields + which are not generally honored. For instance, ResourceVersion + and FieldPath are both very rarely valid in actual usage. 2. + Invalid usage help. It is impossible to add specific help for + individual usage. In most embedded usages, there are particular restrictions + like, "must refer only to types A and B" or "UID not honored" + or "name must be restricted". Those cannot be well described + when embedded. 3. Inconsistent validation. Because the usages + are different, the validation rules are different by usage, which + makes it hard for users to predict what will happen. 4. The fields + are both imprecise and overly precise. Kind is not a precise + mapping to a URL. This can produce ambiguity during interpretation + and require a REST mapping. In most cases, the dependency is + on the group,resource tuple and the version of the actual + struct is irrelevant. 5. We cannot easily change it. Because + this type is embedded in many locations, updates to this type will + affect numerous schemas. Don''t make new APIs embed an underspecified + API type they do not control. Instead of using this type, create + a locally provided and used type that is well-focused on your + reference. For example, ServiceReferences for admission registration: + https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + .' + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + type: array + observedGeneration: + description: ObservedGeneration is the latest generation observed + by the controller. + format: int64 + type: integer + phase: + description: Phase represents the current phase of cluster actuation. + E.g. Pending, Running, Terminating, Failed etc. + type: string + readyReplicas: + description: The number of ready replicas for this MachinePool. A + machine is considered ready when the node has been created and is + "Ready". + format: int32 + type: integer + replicas: + description: Replicas is the most recently observed number of replicas. + format: int32 + type: integer + unavailableReplicas: + description: Total number of unavailable machine instances targeted + by this machine pool. This is the total number of machine instances + that are still required for the machine pool to have 100% available + capacity. They may either be machine instances that are running + but not yet available or machine instances that still have not been + created. + format: int32 + type: integer + type: object + type: object + served: true storage: true subresources: scale: diff --git a/config/crd/bases/cluster.x-k8s.io_machines.yaml b/config/crd/bases/cluster.x-k8s.io_machines.yaml index 74782e015acc..a8507c61c993 100644 --- a/config/crd/bases/cluster.x-k8s.io_machines.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machines.yaml @@ -743,6 +743,397 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .spec.clusterName + name: Cluster + type: string + - description: Time duration since creation of Machine + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Provider ID + jsonPath: .spec.providerID + name: ProviderID + type: string + - description: Machine status such as Terminating/Pending/Running/Failed etc + jsonPath: .status.phase + name: Phase + type: string + - description: Kubernetes version associated with this Machine + jsonPath: .spec.version + name: Version + type: string + - description: Node name associated with this machine + jsonPath: .status.nodeRef.name + name: NodeName + priority: 1 + type: string + name: v1beta1 + schema: + openAPIV3Schema: + description: Machine is the Schema for the machines API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: MachineSpec defines the desired state of Machine. + properties: + bootstrap: + description: Bootstrap is a reference to a local struct which encapsulates + fields to configure the Machine’s bootstrapping mechanism. + properties: + configRef: + description: ConfigRef is a reference to a bootstrap provider-specific + resource that holds configuration details. The reference is + optional to allow users/operators to specify Bootstrap.DataSecretName + without the need of a controller. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part + of an object. TODO: this design is not final and this field + is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + dataSecretName: + description: DataSecretName is the name of the secret that stores + the bootstrap data script. If nil, the Machine should remain + in the Pending state. + type: string + type: object + clusterName: + description: ClusterName is the name of the Cluster this object belongs + to. + minLength: 1 + type: string + failureDomain: + description: FailureDomain is the failure domain the machine will + be created in. Must match a key in the FailureDomains map stored + on the cluster object. + type: string + infrastructureRef: + description: InfrastructureRef is a required reference to a custom + resource offered by an infrastructure provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + nodeDrainTimeout: + description: 'NodeDrainTimeout is the total amount of time that the + controller will spend on draining a node. The default value is 0, + meaning that the node can be drained without any time limitations. + NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`' + type: string + providerID: + description: ProviderID is the identification ID of the machine provided + by the provider. This field must match the provider ID as seen on + the node object corresponding to this machine. This field is required + by higher level consumers of cluster-api. Example use case is cluster + autoscaler with cluster-api as provider. Clean-up logic in the autoscaler + compares machines to nodes to find out machines at provider which + could not get registered as Kubernetes nodes. With cluster-api as + a generic out-of-tree provider for autoscaler, this field is required + by autoscaler to be able to have a provider view of the list of + machines. Another list of nodes is queried from the k8s apiserver + and then a comparison is done to find out unregistered machines + and are marked for delete. This field will be set by the actuators + and consumed by higher level entities like autoscaler that will + be interfacing with cluster-api as generic provider. + type: string + version: + description: Version defines the desired Kubernetes version. This + field is meant to be optionally used by bootstrap providers. + type: string + required: + - bootstrap + - clusterName + - infrastructureRef + type: object + status: + description: MachineStatus defines the observed state of Machine. + properties: + addresses: + description: Addresses is a list of addresses assigned to the machine. + This field is copied from the infrastructure provider reference. + items: + description: MachineAddress contains information for the node's + address. + properties: + address: + description: The machine address. + type: string + type: + description: Machine address type, one of Hostname, ExternalIP + or InternalIP. + type: string + required: + - address + - type + type: object + type: array + bootstrapReady: + description: BootstrapReady is the state of the bootstrap provider. + type: boolean + conditions: + description: Conditions defines current service state of the Machine. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + failureMessage: + description: "FailureMessage will be set in the event that there is + a terminal problem reconciling the Machine and will contain a more + verbose string suitable for logging and human consumption. \n This + field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over time (like + service outages), but instead indicate that something is fundamentally + wrong with the Machine's spec or the configuration of the controller, + and that manual intervention is required. Examples of terminal errors + would be invalid combinations of settings in the spec, values that + are unsupported by the controller, or the responsible controller + itself being critically misconfigured. \n Any transient errors that + occur during the reconciliation of Machines can be added as events + to the Machine object and/or logged in the controller's output." + type: string + failureReason: + description: "FailureReason will be set in the event that there is + a terminal problem reconciling the Machine and will contain a succinct + value suitable for machine interpretation. \n This field should + not be set for transitive errors that a controller faces that are + expected to be fixed automatically over time (like service outages), + but instead indicate that something is fundamentally wrong with + the Machine's spec or the configuration of the controller, and that + manual intervention is required. Examples of terminal errors would + be invalid combinations of settings in the spec, values that are + unsupported by the controller, or the responsible controller itself + being critically misconfigured. \n Any transient errors that occur + during the reconciliation of Machines can be added as events to + the Machine object and/or logged in the controller's output." + type: string + infrastructureReady: + description: InfrastructureReady is the state of the infrastructure + provider. + type: boolean + lastUpdated: + description: LastUpdated identifies when the phase of the Machine + last transitioned. + format: date-time + type: string + nodeInfo: + description: 'NodeInfo is a set of ids/uuids to uniquely identify + the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info' + properties: + architecture: + description: The Architecture reported by the node + type: string + bootID: + description: Boot ID reported by the node. + type: string + containerRuntimeVersion: + description: ContainerRuntime Version reported by the node through + runtime remote API (e.g. docker://1.5.0). + type: string + kernelVersion: + description: Kernel Version reported by the node from 'uname -r' + (e.g. 3.16.0-0.bpo.4-amd64). + type: string + kubeProxyVersion: + description: KubeProxy Version reported by the node. + type: string + kubeletVersion: + description: Kubelet Version reported by the node. + type: string + machineID: + description: 'MachineID reported by the node. For unique machine + identification in the cluster this field is preferred. Learn + more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html' + type: string + operatingSystem: + description: The Operating System reported by the node + type: string + osImage: + description: OS Image reported by the node from /etc/os-release + (e.g. Debian GNU/Linux 7 (wheezy)). + type: string + systemUUID: + description: SystemUUID reported by the node. For unique machine + identification MachineID is preferred. This field is specific + to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid + type: string + required: + - architecture + - bootID + - containerRuntimeVersion + - kernelVersion + - kubeProxyVersion + - kubeletVersion + - machineID + - operatingSystem + - osImage + - systemUUID + type: object + nodeRef: + description: NodeRef will point to the corresponding Node if it exists. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + observedGeneration: + description: ObservedGeneration is the latest generation observed + by the controller. + format: int64 + type: integer + phase: + description: Phase represents the current phase of machine actuation. + E.g. Pending, Running, Terminating, Failed etc. + type: string + version: + description: Version specifies the current version of Kubernetes running + on the corresponding Node. This is meant to be a means of bubbling + up status from the Node to the Machine. It is entirely optional, + but useful for end-user UX if it’s present. + type: string + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml index 84369660617f..5261454054c7 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml @@ -791,6 +791,354 @@ spec: type: object type: object served: true + storage: false + subresources: + scale: + labelSelectorPath: .status.selector + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} + - additionalPrinterColumns: + - description: Cluster + jsonPath: .spec.clusterName + name: Cluster + type: string + - description: Time duration since creation of MachineSet + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Total number of non-terminated machines targeted by this machineset + jsonPath: .status.replicas + name: Replicas + type: integer + - description: Total number of available machines (ready for at least minReadySeconds) + jsonPath: .status.availableReplicas + name: Available + type: integer + - description: Total number of ready machines targeted by this machineset. + jsonPath: .status.readyReplicas + name: Ready + type: integer + name: v1beta1 + schema: + openAPIV3Schema: + description: MachineSet is the Schema for the machinesets API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: MachineSetSpec defines the desired state of MachineSet. + properties: + clusterName: + description: ClusterName is the name of the Cluster this object belongs + to. + minLength: 1 + type: string + deletePolicy: + description: DeletePolicy defines the policy used to identify nodes + to delete when downscaling. Defaults to "Random". Valid values + are "Random, "Newest", "Oldest" + enum: + - Random + - Newest + - Oldest + type: string + minReadySeconds: + description: MinReadySeconds is the minimum number of seconds for + which a newly created machine should be ready. Defaults to 0 (machine + will be considered available as soon as it is ready) + format: int32 + type: integer + replicas: + default: 1 + description: Replicas is the number of desired replicas. This is a + pointer to distinguish between explicit zero and unspecified. Defaults + to 1. + format: int32 + type: integer + selector: + description: 'Selector is a label query over machines that should + match the replica count. Label keys and values that must match in + order to be controlled by this MachineSet. It must match the machine + template''s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors' + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement is a selector that + contains values, a key, and an operator that relates the key + and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship to + a set of values. Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of string values. If the + operator is In or NotIn, the values array must be non-empty. + If the operator is Exists or DoesNotExist, the values + array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single + {key,value} in the matchLabels map is equivalent to an element + of matchExpressions, whose key field is "key", the operator + is "In", and the values array contains only "value". The requirements + are ANDed. + type: object + type: object + template: + description: Template is the object that describes the machine that + will be created if insufficient replicas are detected. Object references + to custom resources resources are treated as templates. + properties: + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map + stored with a resource that may be set by external tools + to store and retrieve arbitrary metadata. They are not queryable + and should be preserved when modifying objects. More info: + http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used + to organize and categorize (scope and select) objects. May + match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object + spec: + description: 'Specification of the desired behavior of the machine. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + properties: + bootstrap: + description: Bootstrap is a reference to a local struct which + encapsulates fields to configure the Machine’s bootstrapping + mechanism. + properties: + configRef: + description: ConfigRef is a reference to a bootstrap provider-specific + resource that holds configuration details. The reference + is optional to allow users/operators to specify Bootstrap.DataSecretName + without the need of a controller. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object + instead of an entire object, this string should + contain a valid JSON/Go field access statement, + such as desiredState.manifest.containers[2]. For + example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container + that triggered the event) or if no container name + is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only + to have some well-defined way of referencing a part + of an object. TODO: this design is not final and + this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this + reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + dataSecretName: + description: DataSecretName is the name of the secret + that stores the bootstrap data script. If nil, the Machine + should remain in the Pending state. + type: string + type: object + clusterName: + description: ClusterName is the name of the Cluster this object + belongs to. + minLength: 1 + type: string + failureDomain: + description: FailureDomain is the failure domain the machine + will be created in. Must match a key in the FailureDomains + map stored on the cluster object. + type: string + infrastructureRef: + description: InfrastructureRef is a required reference to + a custom resource offered by an infrastructure provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this + pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design + is not final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + nodeDrainTimeout: + description: 'NodeDrainTimeout is the total amount of time + that the controller will spend on draining a node. The default + value is 0, meaning that the node can be drained without + any time limitations. NOTE: NodeDrainTimeout is different + from `kubectl drain --timeout`' + type: string + providerID: + description: ProviderID is the identification ID of the machine + provided by the provider. This field must match the provider + ID as seen on the node object corresponding to this machine. + This field is required by higher level consumers of cluster-api. + Example use case is cluster autoscaler with cluster-api + as provider. Clean-up logic in the autoscaler compares machines + to nodes to find out machines at provider which could not + get registered as Kubernetes nodes. With cluster-api as + a generic out-of-tree provider for autoscaler, this field + is required by autoscaler to be able to have a provider + view of the list of machines. Another list of nodes is queried + from the k8s apiserver and then a comparison is done to + find out unregistered machines and are marked for delete. + This field will be set by the actuators and consumed by + higher level entities like autoscaler that will be interfacing + with cluster-api as generic provider. + type: string + version: + description: Version defines the desired Kubernetes version. + This field is meant to be optionally used by bootstrap providers. + type: string + required: + - bootstrap + - clusterName + - infrastructureRef + type: object + type: object + required: + - clusterName + - selector + type: object + status: + description: MachineSetStatus defines the observed state of MachineSet. + properties: + availableReplicas: + description: The number of available replicas (ready for at least + minReadySeconds) for this MachineSet. + format: int32 + type: integer + failureMessage: + type: string + failureReason: + description: "In the event that there is a terminal problem reconciling + the replicas, both FailureReason and FailureMessage will be set. + FailureReason will be populated with a succinct value suitable for + machine interpretation, while FailureMessage will contain a more + verbose string suitable for logging and human consumption. \n These + fields should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over time (like + service outages), but instead indicate that something is fundamentally + wrong with the MachineTemplate's spec or the configuration of the + machine controller, and that manual intervention is required. Examples + of terminal errors would be invalid combinations of settings in + the spec, values that are unsupported by the machine controller, + or the responsible machine controller itself being critically misconfigured. + \n Any transient errors that occur during the reconciliation of + Machines can be added as events to the MachineSet object and/or + logged in the controller's output." + type: string + fullyLabeledReplicas: + description: The number of replicas that have labels matching the + labels of the machine template of the MachineSet. + format: int32 + type: integer + observedGeneration: + description: ObservedGeneration reflects the generation of the most + recently observed MachineSet. + format: int64 + type: integer + readyReplicas: + description: The number of ready replicas for this MachineSet. A machine + is considered ready when the node has been created and is "Ready". + format: int32 + type: integer + replicas: + description: Replicas is the most recently observed number of replicas. + format: int32 + type: integer + selector: + description: 'Selector is the same as the label selector but in the + string format to avoid introspection by clients. The string will + be in the same format as the query-param syntax. More info about + label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors' + type: string + type: object + type: object + served: true storage: true subresources: scale: diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 6fb10574b395..0ac270fc58af 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -13,7 +13,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cluster-x-k8s-io-v1alpha4-cluster + path: /mutate-cluster-x-k8s-io-v1beta1-cluster failurePolicy: Fail matchPolicy: Equivalent name: default.cluster.cluster.x-k8s.io @@ -21,7 +21,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -35,7 +35,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cluster-x-k8s-io-v1alpha4-clusterclass + path: /mutate-cluster-x-k8s-io-v1beta1-clusterclass failurePolicy: Fail matchPolicy: Equivalent name: default.clusterclass.cluster.x-k8s.io @@ -43,7 +43,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -57,7 +57,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cluster-x-k8s-io-v1alpha4-machine + path: /mutate-cluster-x-k8s-io-v1beta1-machine failurePolicy: Fail matchPolicy: Equivalent name: default.machine.cluster.x-k8s.io @@ -65,7 +65,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -79,7 +79,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cluster-x-k8s-io-v1alpha4-machinedeployment + path: /mutate-cluster-x-k8s-io-v1beta1-machinedeployment failurePolicy: Fail matchPolicy: Equivalent name: default.machinedeployment.cluster.x-k8s.io @@ -87,7 +87,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -101,7 +101,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cluster-x-k8s-io-v1alpha4-machinehealthcheck + path: /mutate-cluster-x-k8s-io-v1beta1-machinehealthcheck failurePolicy: Fail matchPolicy: Equivalent name: default.machinehealthcheck.cluster.x-k8s.io @@ -109,7 +109,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -123,7 +123,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cluster-x-k8s-io-v1alpha4-machineset + path: /mutate-cluster-x-k8s-io-v1beta1-machineset failurePolicy: Fail matchPolicy: Equivalent name: default.machineset.cluster.x-k8s.io @@ -131,7 +131,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -145,7 +145,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cluster-x-k8s-io-v1alpha4-machinepool + path: /mutate-cluster-x-k8s-io-v1beta1-machinepool failurePolicy: Fail matchPolicy: Equivalent name: default.machinepool.cluster.x-k8s.io @@ -153,7 +153,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -167,7 +167,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-addons-cluster-x-k8s-io-v1alpha4-clusterresourceset + path: /mutate-addons-cluster-x-k8s-io-v1beta1-clusterresourceset failurePolicy: Fail matchPolicy: Equivalent name: default.clusterresourceset.addons.cluster.x-k8s.io @@ -175,7 +175,7 @@ webhooks: - apiGroups: - addons.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -197,7 +197,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cluster-x-k8s-io-v1alpha4-cluster + path: /validate-cluster-x-k8s-io-v1beta1-cluster failurePolicy: Fail matchPolicy: Equivalent name: validation.cluster.cluster.x-k8s.io @@ -205,7 +205,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -219,7 +219,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cluster-x-k8s-io-v1alpha4-clusterclass + path: /validate-cluster-x-k8s-io-v1beta1-clusterclass failurePolicy: Fail matchPolicy: Equivalent name: validation.clusterclass.cluster.x-k8s.io @@ -227,7 +227,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -241,7 +241,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cluster-x-k8s-io-v1alpha4-machine + path: /validate-cluster-x-k8s-io-v1beta1-machine failurePolicy: Fail matchPolicy: Equivalent name: validation.machine.cluster.x-k8s.io @@ -249,7 +249,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -263,7 +263,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cluster-x-k8s-io-v1alpha4-machinedeployment + path: /validate-cluster-x-k8s-io-v1beta1-machinedeployment failurePolicy: Fail matchPolicy: Equivalent name: validation.machinedeployment.cluster.x-k8s.io @@ -271,7 +271,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -285,7 +285,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cluster-x-k8s-io-v1alpha4-machinehealthcheck + path: /validate-cluster-x-k8s-io-v1beta1-machinehealthcheck failurePolicy: Fail matchPolicy: Equivalent name: validation.machinehealthcheck.cluster.x-k8s.io @@ -293,7 +293,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -307,7 +307,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cluster-x-k8s-io-v1alpha4-machineset + path: /validate-cluster-x-k8s-io-v1beta1-machineset failurePolicy: Fail matchPolicy: Equivalent name: validation.machineset.cluster.x-k8s.io @@ -315,7 +315,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -329,7 +329,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cluster-x-k8s-io-v1alpha4-machinepool + path: /validate-cluster-x-k8s-io-v1beta1-machinepool failurePolicy: Fail matchPolicy: Equivalent name: validation.machinepool.cluster.x-k8s.io @@ -337,7 +337,7 @@ webhooks: - apiGroups: - cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -351,7 +351,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-addons-cluster-x-k8s-io-v1alpha4-clusterresourceset + path: /validate-addons-cluster-x-k8s-io-v1beta1-clusterresourceset failurePolicy: Fail matchPolicy: Equivalent name: validation.clusterresourceset.addons.cluster.x-k8s.io @@ -359,7 +359,7 @@ webhooks: - apiGroups: - addons.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE diff --git a/controllers/cluster_controller.go b/controllers/cluster_controller.go index d8a31f43f19c..85851d146b82 100644 --- a/controllers/cluster_controller.go +++ b/controllers/cluster_controller.go @@ -31,9 +31,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/tools/record" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" diff --git a/controllers/cluster_controller_phases.go b/controllers/cluster_controller_phases.go index 21359c5bd22d..a2388a27f364 100644 --- a/controllers/cluster_controller_phases.go +++ b/controllers/cluster_controller_phases.go @@ -25,7 +25,7 @@ import ( corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" capierrors "sigs.k8s.io/cluster-api/errors" "sigs.k8s.io/cluster-api/util" diff --git a/controllers/cluster_controller_phases_test.go b/controllers/cluster_controller_phases_test.go index dbb23fccbfed..76986bf7cb08 100644 --- a/controllers/cluster_controller_phases_test.go +++ b/controllers/cluster_controller_phases_test.go @@ -25,7 +25,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" capierrors "sigs.k8s.io/cluster-api/errors" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -50,7 +50,7 @@ func TestClusterReconcilePhases(t *testing.T) { Port: 8443, }, InfrastructureRef: &corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "test", }, @@ -80,7 +80,7 @@ func TestClusterReconcilePhases(t *testing.T) { cluster: cluster, infraRef: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "test", "namespace": "test-namespace", @@ -94,7 +94,7 @@ func TestClusterReconcilePhases(t *testing.T) { cluster: cluster, infraRef: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "test", "namespace": "test-namespace", @@ -108,7 +108,7 @@ func TestClusterReconcilePhases(t *testing.T) { cluster: cluster, infraRef: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "test", "namespace": "test-namespace", diff --git a/controllers/cluster_controller_test.go b/controllers/cluster_controller_test.go index c026d68dc2dd..2dd3199a365a 100644 --- a/controllers/cluster_controller_test.go +++ b/controllers/cluster_controller_test.go @@ -27,8 +27,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/controllers/external/testing.go b/controllers/external/testing.go index 225ae0906722..c2d07f9acc8b 100644 --- a/controllers/external/testing.go +++ b/controllers/external/testing.go @@ -20,7 +20,7 @@ import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) var ( diff --git a/controllers/external/tracker_test.go b/controllers/external/tracker_test.go index 9d3ef6c24624..7026b4c5a815 100644 --- a/controllers/external/tracker_test.go +++ b/controllers/external/tracker_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/log" diff --git a/controllers/external/util.go b/controllers/external/util.go index 783108fd1b8a..bbb55542dc0d 100644 --- a/controllers/external/util.go +++ b/controllers/external/util.go @@ -27,7 +27,7 @@ import ( "k8s.io/apiserver/pkg/storage/names" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) const ( diff --git a/controllers/external/util_test.go b/controllers/external/util_test.go index 8e85596c0b23..8a61a3d24176 100644 --- a/controllers/external/util_test.go +++ b/controllers/external/util_test.go @@ -26,7 +26,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" diff --git a/controllers/machine_controller.go b/controllers/machine_controller.go index 12254060feb1..fa7535b8f8c7 100644 --- a/controllers/machine_controller.go +++ b/controllers/machine_controller.go @@ -32,8 +32,8 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/record" "k8s.io/klog/v2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/api/v1alpha4/index" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/v1beta1/index" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/controllers/noderefutil" "sigs.k8s.io/cluster-api/controllers/remote" diff --git a/controllers/machine_controller_node_labels.go b/controllers/machine_controller_node_labels.go index f085e648af20..dddcfc917aa3 100644 --- a/controllers/machine_controller_node_labels.go +++ b/controllers/machine_controller_node_labels.go @@ -21,7 +21,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/patch" diff --git a/controllers/machine_controller_node_labels_test.go b/controllers/machine_controller_node_labels_test.go index fcbf7cb0cfcd..8ae78937d5b3 100644 --- a/controllers/machine_controller_node_labels_test.go +++ b/controllers/machine_controller_node_labels_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/record" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/util/patch" "sigs.k8s.io/controller-runtime/pkg/client" @@ -45,7 +45,7 @@ func TestReconcileInterruptibleNodeLabel(t *testing.T) { infraMachine := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": ns.Name, @@ -77,14 +77,14 @@ func TestReconcileInterruptibleNodeLabel(t *testing.T) { Spec: clusterv1.MachineSpec{ ClusterName: cluster.Name, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", Namespace: ns.Name, }, Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "BootstrapMachine", Name: "bootstrap-config1", }, diff --git a/controllers/machine_controller_noderef.go b/controllers/machine_controller_noderef.go index 8c7536e69538..cdf7c7694822 100644 --- a/controllers/machine_controller_noderef.go +++ b/controllers/machine_controller_noderef.go @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/api/v1alpha4/index" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/v1beta1/index" "sigs.k8s.io/cluster-api/controllers/noderefutil" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" diff --git a/controllers/machine_controller_noderef_test.go b/controllers/machine_controller_noderef_test.go index 74c8cb230139..1e73f3fc21cd 100644 --- a/controllers/machine_controller_noderef_test.go +++ b/controllers/machine_controller_noderef_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/noderefutil" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/util" diff --git a/controllers/machine_controller_phases.go b/controllers/machine_controller_phases.go index 41ec4a1326f6..1f6d73d109a1 100644 --- a/controllers/machine_controller_phases.go +++ b/controllers/machine_controller_phases.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" capierrors "sigs.k8s.io/cluster-api/errors" "sigs.k8s.io/cluster-api/util" diff --git a/controllers/machine_controller_phases_test.go b/controllers/machine_controller_phases_test.go index e7cc0a0db3d2..47657f05fd84 100644 --- a/controllers/machine_controller_phases_test.go +++ b/controllers/machine_controller_phases_test.go @@ -35,7 +35,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/log" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/internal/testtypes" "sigs.k8s.io/cluster-api/util/conditions" @@ -69,13 +69,13 @@ func TestReconcileMachinePhases(t *testing.T) { ClusterName: defaultCluster.Name, Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config1", }, }, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, @@ -85,7 +85,7 @@ func TestReconcileMachinePhases(t *testing.T) { defaultBootstrap := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -98,7 +98,7 @@ func TestReconcileMachinePhases(t *testing.T) { defaultInfra := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": metav1.NamespaceDefault, @@ -602,7 +602,7 @@ func TestReconcileBootstrap(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config1", }, @@ -629,7 +629,7 @@ func TestReconcileBootstrap(t *testing.T) { name: "new machine, bootstrap config ready with data", bootstrapConfig: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -652,7 +652,7 @@ func TestReconcileBootstrap(t *testing.T) { name: "new machine, bootstrap config ready with no data", bootstrapConfig: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -673,7 +673,7 @@ func TestReconcileBootstrap(t *testing.T) { name: "new machine, bootstrap config not ready", bootstrapConfig: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -691,7 +691,7 @@ func TestReconcileBootstrap(t *testing.T) { name: "new machine, bootstrap config is not found", bootstrapConfig: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": "wrong-namespace", @@ -709,7 +709,7 @@ func TestReconcileBootstrap(t *testing.T) { name: "new machine, no bootstrap config or data", bootstrapConfig: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": "wrong-namespace", @@ -724,7 +724,7 @@ func TestReconcileBootstrap(t *testing.T) { name: "existing machine, bootstrap data should not change", bootstrapConfig: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -743,7 +743,7 @@ func TestReconcileBootstrap(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config1", }, @@ -765,7 +765,7 @@ func TestReconcileBootstrap(t *testing.T) { name: "existing machine, bootstrap provider is not ready, and ownerref updated", bootstrapConfig: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -792,7 +792,7 @@ func TestReconcileBootstrap(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config1", }, @@ -812,7 +812,7 @@ func TestReconcileBootstrap(t *testing.T) { name: "existing machine, machineset owner and version v1alpha2, and ownerref updated", bootstrapConfig: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -902,13 +902,13 @@ func TestReconcileInfrastructure(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config1", }, }, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, @@ -936,7 +936,7 @@ func TestReconcileInfrastructure(t *testing.T) { name: "new machine, infrastructure config ready", infraConfig: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": metav1.NamespaceDefault, @@ -985,13 +985,13 @@ func TestReconcileInfrastructure(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config1", }, }, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, @@ -1004,7 +1004,7 @@ func TestReconcileInfrastructure(t *testing.T) { }, bootstrapConfig: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -1017,7 +1017,7 @@ func TestReconcileInfrastructure(t *testing.T) { }, infraConfig: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{}, }, expectResult: ctrl.Result{}, @@ -1033,7 +1033,7 @@ func TestReconcileInfrastructure(t *testing.T) { name: "infrastructure ref is paused", infraConfig: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": metav1.NamespaceDefault, diff --git a/controllers/machine_controller_test.go b/controllers/machine_controller_test.go index a2958367bbad..d74a2b0707bf 100644 --- a/controllers/machine_controller_test.go +++ b/controllers/machine_controller_test.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/internal/testtypes" "sigs.k8s.io/cluster-api/util" @@ -50,7 +50,7 @@ func TestWatches(t *testing.T) { infraMachine := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": ns.Name, @@ -73,7 +73,7 @@ func TestWatches(t *testing.T) { defaultBootstrap := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config-machinereconcile", "namespace": ns.Name, @@ -134,13 +134,13 @@ func TestWatches(t *testing.T) { Spec: clusterv1.MachineSpec{ ClusterName: testCluster.Name, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config-machinereconcile", }, @@ -186,7 +186,7 @@ func TestMachine_Reconcile(t *testing.T) { infraMachine := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": ns.Name, @@ -200,7 +200,7 @@ func TestMachine_Reconcile(t *testing.T) { defaultBootstrap := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config-machinereconcile", "namespace": ns.Name, @@ -234,13 +234,13 @@ func TestMachine_Reconcile(t *testing.T) { Spec: clusterv1.MachineSpec{ ClusterName: testCluster.Name, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config-machinereconcile", }, @@ -578,7 +578,7 @@ func TestReconcileRequest(t *testing.T) { infraConfig := unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": metav1.NamespaceDefault, @@ -633,7 +633,7 @@ func TestReconcileRequest(t *testing.T) { Spec: clusterv1.MachineSpec{ ClusterName: "test-cluster", InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, @@ -661,7 +661,7 @@ func TestReconcileRequest(t *testing.T) { Spec: clusterv1.MachineSpec{ ClusterName: "test-cluster", InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, @@ -693,7 +693,7 @@ func TestReconcileRequest(t *testing.T) { Spec: clusterv1.MachineSpec{ ClusterName: "test-cluster", InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, @@ -741,7 +741,7 @@ func TestMachineConditions(t *testing.T) { return &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": metav1.NamespaceDefault, @@ -772,7 +772,7 @@ func TestMachineConditions(t *testing.T) { return &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -802,13 +802,13 @@ func TestMachineConditions(t *testing.T) { ProviderID: pointer.StringPtr("test://id-1"), ClusterName: "test-cluster", InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config1", }, @@ -988,7 +988,7 @@ func TestReconcileDeleteExternal(t *testing.T) { bootstrapConfig := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "delete-bootstrap", "namespace": metav1.NamespaceDefault, @@ -1005,7 +1005,7 @@ func TestReconcileDeleteExternal(t *testing.T) { ClusterName: "test-cluster", Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "BootstrapConfig", Name: "delete-bootstrap", }, @@ -1024,7 +1024,7 @@ func TestReconcileDeleteExternal(t *testing.T) { bootstrapExists: true, expected: &unstructured.Unstructured{ Object: map[string]interface{}{ - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "kind": "BootstrapConfig", "metadata": map[string]interface{}{ "name": "delete-bootstrap", @@ -1087,7 +1087,7 @@ func TestRemoveMachineFinalizerAfterDeleteReconcile(t *testing.T) { Spec: clusterv1.MachineSpec{ ClusterName: "test-cluster", InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, @@ -1379,7 +1379,7 @@ func TestIsDeleteNodeAllowed(t *testing.T) { }, Spec: clusterv1.ClusterSpec{ ControlPlaneRef: &corev1.ObjectReference{ - APIVersion: "controlplane.cluster.x-k8s.io/v1alpha4", + APIVersion: "controlplane.cluster.x-k8s.io/v1beta1", Kind: "AWSManagedControlPlane", Name: "test-cluster", Namespace: "test-cluster", @@ -1417,7 +1417,7 @@ func TestIsDeleteNodeAllowed(t *testing.T) { }, Spec: clusterv1.ClusterSpec{ ControlPlaneRef: &corev1.ObjectReference{ - APIVersion: "controlplane.cluster.x-k8s.io/v1alpha4", + APIVersion: "controlplane.cluster.x-k8s.io/v1beta1", Kind: "AWSManagedControlPlane", Name: "test-cluster-2", Namespace: "test-cluster", @@ -1455,7 +1455,7 @@ func TestIsDeleteNodeAllowed(t *testing.T) { }, Spec: clusterv1.ClusterSpec{ ControlPlaneRef: &corev1.ObjectReference{ - APIVersion: "controlplane.cluster.x-k8s.io/v1alpha4", + APIVersion: "controlplane.cluster.x-k8s.io/v1beta1", Kind: "AWSManagedControlPlane", Name: "test-cluster-3", Namespace: "test-cluster", @@ -1493,7 +1493,7 @@ func TestIsDeleteNodeAllowed(t *testing.T) { }, }, } - emp.SetAPIVersion("controlplane.cluster.x-k8s.io/v1alpha4") + emp.SetAPIVersion("controlplane.cluster.x-k8s.io/v1beta1") emp.SetKind("AWSManagedControlPlane") emp.SetName("test-cluster") emp.SetNamespace("test-cluster") @@ -1501,7 +1501,7 @@ func TestIsDeleteNodeAllowed(t *testing.T) { mcpBeingDeleted := &unstructured.Unstructured{ Object: map[string]interface{}{}, } - mcpBeingDeleted.SetAPIVersion("controlplane.cluster.x-k8s.io/v1alpha4") + mcpBeingDeleted.SetAPIVersion("controlplane.cluster.x-k8s.io/v1beta1") mcpBeingDeleted.SetKind("AWSManagedControlPlane") mcpBeingDeleted.SetName("test-cluster-2") mcpBeingDeleted.SetNamespace("test-cluster") @@ -1514,7 +1514,7 @@ func TestIsDeleteNodeAllowed(t *testing.T) { }, }, } - empBeingDeleted.SetAPIVersion("controlplane.cluster.x-k8s.io/v1alpha4") + empBeingDeleted.SetAPIVersion("controlplane.cluster.x-k8s.io/v1beta1") empBeingDeleted.SetKind("AWSManagedControlPlane") empBeingDeleted.SetName("test-cluster-3") empBeingDeleted.SetNamespace("test-cluster") @@ -1601,7 +1601,7 @@ func TestNodeToMachine(t *testing.T) { infraMachine := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": ns.Name, @@ -1624,7 +1624,7 @@ func TestNodeToMachine(t *testing.T) { infraMachine2 := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config2", "namespace": ns.Name, @@ -1647,7 +1647,7 @@ func TestNodeToMachine(t *testing.T) { defaultBootstrap := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config-machinereconcile", "namespace": ns.Name, @@ -1724,13 +1724,13 @@ func TestNodeToMachine(t *testing.T) { Spec: clusterv1.MachineSpec{ ClusterName: testCluster.Name, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config1", }, Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config-machinereconcile", }, @@ -1763,13 +1763,13 @@ func TestNodeToMachine(t *testing.T) { Spec: clusterv1.MachineSpec{ ClusterName: testCluster.Name, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachine", Name: "infra-config2", }, Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfig", Name: "bootstrap-config-machinereconcile", }, diff --git a/controllers/machinedeployment_controller.go b/controllers/machinedeployment_controller.go index b11e6162ca16..b6118c0dcb1f 100644 --- a/controllers/machinedeployment_controller.go +++ b/controllers/machinedeployment_controller.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/labels" kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/tools/record" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/controllers/machinedeployment_controller_test.go b/controllers/machinedeployment_controller_test.go index cbbdce5bf54f..3361e3558c9c 100644 --- a/controllers/machinedeployment_controller_test.go +++ b/controllers/machinedeployment_controller_test.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" @@ -113,7 +113,7 @@ func TestMachineDeploymentReconciler(t *testing.T) { ClusterName: testCluster.Name, Version: &version, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachineTemplate", Name: "md-template", }, @@ -132,7 +132,7 @@ func TestMachineDeploymentReconciler(t *testing.T) { // Create infrastructure template resource. infraResource := map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{}, "spec": map[string]interface{}{ "size": "3xlarge", @@ -146,7 +146,7 @@ func TestMachineDeploymentReconciler(t *testing.T) { }, } infraTmpl.SetKind("GenericInfrastructureMachineTemplate") - infraTmpl.SetAPIVersion("infrastructure.cluster.x-k8s.io/v1alpha4") + infraTmpl.SetAPIVersion("infrastructure.cluster.x-k8s.io/v1beta1") infraTmpl.SetName("md-template") infraTmpl.SetNamespace(namespace.Name) t.Log("Creating the infrastructure template") diff --git a/controllers/machinedeployment_rolling.go b/controllers/machinedeployment_rolling.go index a86bd01af91e..726a47957b43 100644 --- a/controllers/machinedeployment_rolling.go +++ b/controllers/machinedeployment_rolling.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "k8s.io/utils/integer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/mdutil" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controllers/machinedeployment_rolling_test.go b/controllers/machinedeployment_rolling_test.go index 6aa0332cc2db..0425d56978fc 100644 --- a/controllers/machinedeployment_rolling_test.go +++ b/controllers/machinedeployment_rolling_test.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/mdutil" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" diff --git a/controllers/machinedeployment_rollout_ondelete.go b/controllers/machinedeployment_rollout_ondelete.go index 3363414453b1..4cdfd75ee0dd 100644 --- a/controllers/machinedeployment_rollout_ondelete.go +++ b/controllers/machinedeployment_rollout_ondelete.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/mdutil" "sigs.k8s.io/cluster-api/util/patch" ctrl "sigs.k8s.io/controller-runtime" diff --git a/controllers/machinedeployment_sync.go b/controllers/machinedeployment_sync.go index c3264ff7a00f..032a6f4f49bc 100644 --- a/controllers/machinedeployment_sync.go +++ b/controllers/machinedeployment_sync.go @@ -29,7 +29,7 @@ import ( apirand "k8s.io/apimachinery/pkg/util/rand" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/util/retry" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/mdutil" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util" diff --git a/controllers/machinedeployment_sync_test.go b/controllers/machinedeployment_sync_test.go index 7f97e355d1ed..73366f8ecb61 100644 --- a/controllers/machinedeployment_sync_test.go +++ b/controllers/machinedeployment_sync_test.go @@ -27,7 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/mdutil" capierrors "sigs.k8s.io/cluster-api/errors" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controllers/machinehealthcheck_controller.go b/controllers/machinehealthcheck_controller.go index 699b86729b5c..14c1a8f34c34 100644 --- a/controllers/machinehealthcheck_controller.go +++ b/controllers/machinehealthcheck_controller.go @@ -35,8 +35,8 @@ import ( kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/api/v1alpha4/index" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/v1beta1/index" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/util" diff --git a/controllers/machinehealthcheck_controller_test.go b/controllers/machinehealthcheck_controller_test.go index 3363e78afef9..9651893a6594 100644 --- a/controllers/machinehealthcheck_controller_test.go +++ b/controllers/machinehealthcheck_controller_test.go @@ -41,7 +41,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" capierrors "sigs.k8s.io/cluster-api/errors" "sigs.k8s.io/cluster-api/util" @@ -1199,7 +1199,7 @@ func TestMachineHealthCheck_Reconcile(t *testing.T) { // Create infrastructure template resource. infraResource := map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{}, "spec": map[string]interface{}{ "size": "3xlarge", @@ -1213,7 +1213,7 @@ func TestMachineHealthCheck_Reconcile(t *testing.T) { }, } infraTmpl.SetKind("GenericInfrastructureMachineTemplate") - infraTmpl.SetAPIVersion("infrastructure.cluster.x-k8s.io/v1alpha4") + infraTmpl.SetAPIVersion("infrastructure.cluster.x-k8s.io/v1beta1") infraTmpl.SetGenerateName("mhc-ms-template-") infraTmpl.SetNamespace(mhc.Namespace) @@ -1238,7 +1238,7 @@ func TestMachineHealthCheck_Reconcile(t *testing.T) { DataSecretName: pointer.StringPtr("test-data-secret-name"), }, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachineTemplate", Name: infraTmpl.GetName(), }, @@ -2320,7 +2320,7 @@ func newInfraMachine(machine *clusterv1.Machine) (*unstructured.Unstructured, st providerID := fmt.Sprintf("test:////%v", uuid.NewUUID()) return &unstructured.Unstructured{ Object: map[string]interface{}{ - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "kind": "GenericInfrastructureMachine", "metadata": map[string]interface{}{ "generateName": "test-mhc-machine-infra-", diff --git a/controllers/machinehealthcheck_status_matcher_test.go b/controllers/machinehealthcheck_status_matcher_test.go index 63bcc3e92089..73d5c08f288a 100644 --- a/controllers/machinehealthcheck_status_matcher_test.go +++ b/controllers/machinehealthcheck_status_matcher_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/gomega" "github.com/onsi/gomega/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/controllers/machinehealthcheck_targets.go b/controllers/machinehealthcheck_targets.go index c103a9847ab1..f7907b1685a1 100644 --- a/controllers/machinehealthcheck_targets.go +++ b/controllers/machinehealthcheck_targets.go @@ -27,7 +27,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" diff --git a/controllers/machinehealthcheck_targets_test.go b/controllers/machinehealthcheck_targets_test.go index 331b897a15be..d7e776ad395a 100644 --- a/controllers/machinehealthcheck_targets_test.go +++ b/controllers/machinehealthcheck_targets_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" ctrl "sigs.k8s.io/controller-runtime" diff --git a/controllers/machineset_controller.go b/controllers/machineset_controller.go index 39d043641617..c8a4adcfc37b 100644 --- a/controllers/machineset_controller.go +++ b/controllers/machineset_controller.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/labels" kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/tools/record" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/controllers/noderefutil" "sigs.k8s.io/cluster-api/controllers/remote" diff --git a/controllers/machineset_controller_test.go b/controllers/machineset_controller_test.go index 4adcf127c991..5bec4d58fafc 100644 --- a/controllers/machineset_controller_test.go +++ b/controllers/machineset_controller_test.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/util" ) @@ -103,13 +103,13 @@ func TestMachineSetReconciler(t *testing.T) { Version: &version, Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "GenericBootstrapConfigTemplate", Name: "ms-template", }, }, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "GenericInfrastructureMachineTemplate", Name: "ms-template", }, @@ -121,7 +121,7 @@ func TestMachineSetReconciler(t *testing.T) { // Create bootstrap template resource. bootstrapResource := map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{}, } bootstrapTmpl := &unstructured.Unstructured{ @@ -132,7 +132,7 @@ func TestMachineSetReconciler(t *testing.T) { }, } bootstrapTmpl.SetKind("GenericBootstrapConfigTemplate") - bootstrapTmpl.SetAPIVersion("bootstrap.cluster.x-k8s.io/v1alpha4") + bootstrapTmpl.SetAPIVersion("bootstrap.cluster.x-k8s.io/v1beta1") bootstrapTmpl.SetName("ms-template") bootstrapTmpl.SetNamespace(namespace.Name) g.Expect(env.Create(ctx, bootstrapTmpl)).To(Succeed()) @@ -140,7 +140,7 @@ func TestMachineSetReconciler(t *testing.T) { // Create infrastructure template resource. infraResource := map[string]interface{}{ "kind": "GenericInfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "annotations": map[string]interface{}{ "precedence": "GenericInfrastructureMachineTemplate", @@ -158,7 +158,7 @@ func TestMachineSetReconciler(t *testing.T) { }, } infraTmpl.SetKind("GenericInfrastructureMachineTemplate") - infraTmpl.SetAPIVersion("infrastructure.cluster.x-k8s.io/v1alpha4") + infraTmpl.SetAPIVersion("infrastructure.cluster.x-k8s.io/v1beta1") infraTmpl.SetName("ms-template") infraTmpl.SetNamespace(namespace.Name) g.Expect(env.Create(ctx, infraTmpl)).To(Succeed()) @@ -211,7 +211,7 @@ func TestMachineSetReconciler(t *testing.T) { t.Log("Creating a InfrastructureMachine for each Machine") infraMachines := &unstructured.UnstructuredList{} - infraMachines.SetAPIVersion("infrastructure.cluster.x-k8s.io/v1alpha4") + infraMachines.SetAPIVersion("infrastructure.cluster.x-k8s.io/v1beta1") infraMachines.SetKind("GenericInfrastructureMachine") g.Eventually(func() int { if err := env.List(ctx, infraMachines, client.InNamespace(namespace.Name)); err != nil { diff --git a/controllers/machineset_delete_policy.go b/controllers/machineset_delete_policy.go index 1b705ad6af89..9d52bfd28077 100644 --- a/controllers/machineset_delete_policy.go +++ b/controllers/machineset_delete_policy.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) type ( diff --git a/controllers/machineset_delete_policy_test.go b/controllers/machineset_delete_policy_test.go index ccc9565b2a22..126cecd7794e 100644 --- a/controllers/machineset_delete_policy_test.go +++ b/controllers/machineset_delete_policy_test.go @@ -23,7 +23,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" capierrors "sigs.k8s.io/cluster-api/errors" ) diff --git a/controllers/mdutil/util.go b/controllers/mdutil/util.go index 0388989dc5d3..c9358e778bfc 100644 --- a/controllers/mdutil/util.go +++ b/controllers/mdutil/util.go @@ -34,7 +34,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" intstrutil "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/utils/integer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/controllers/mdutil/util_test.go b/controllers/mdutil/util_test.go index f6b038fbfebb..ece993de2fb8 100644 --- a/controllers/mdutil/util_test.go +++ b/controllers/mdutil/util_test.go @@ -31,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apiserver/pkg/storage/names" "k8s.io/klog/v2/klogr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func newDControllerRef(d *clusterv1.MachineDeployment) *metav1.OwnerReference { @@ -196,12 +196,12 @@ func TestEqualMachineTemplate(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "MachineBootstrap", }, }, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "MachineInfrastructure", }, }, @@ -234,12 +234,12 @@ func TestEqualMachineTemplate(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "MachineBootstrap2", }, }, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "MachineInfrastructure", }, }, diff --git a/controllers/noderefutil/indexer.go b/controllers/noderefutil/indexer.go index d2fe60006d69..3176154b1292 100644 --- a/controllers/noderefutil/indexer.go +++ b/controllers/noderefutil/indexer.go @@ -21,7 +21,7 @@ import ( "fmt" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/controllers/noderefutil/machine.go b/controllers/noderefutil/machine.go index e0845a01b873..c3cf28f883fc 100644 --- a/controllers/noderefutil/machine.go +++ b/controllers/noderefutil/machine.go @@ -20,7 +20,7 @@ import ( "context" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/controllers/remote/cluster_cache.go b/controllers/remote/cluster_cache.go index 3b884be02f84..3245ad35656a 100644 --- a/controllers/remote/cluster_cache.go +++ b/controllers/remote/cluster_cache.go @@ -32,7 +32,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/conditions" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" diff --git a/controllers/remote/cluster_cache_healthcheck_test.go b/controllers/remote/cluster_cache_healthcheck_test.go index 259f1269053d..42ec9b573c22 100644 --- a/controllers/remote/cluster_cache_healthcheck_test.go +++ b/controllers/remote/cluster_cache_healthcheck_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" "k8s.io/klog/v2/klogr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controllers/remote/cluster_cache_reconciler.go b/controllers/remote/cluster_cache_reconciler.go index a665bab39336..c1138d7c3684 100644 --- a/controllers/remote/cluster_cache_reconciler.go +++ b/controllers/remote/cluster_cache_reconciler.go @@ -22,7 +22,7 @@ import ( "github.com/go-logr/logr" "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/predicates" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controllers/remote/cluster_cache_reconciler_test.go b/controllers/remote/cluster_cache_reconciler_test.go index cc0ddb3fa1b8..df1028fa55c1 100644 --- a/controllers/remote/cluster_cache_reconciler_test.go +++ b/controllers/remote/cluster_cache_reconciler_test.go @@ -25,7 +25,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" diff --git a/controllers/remote/cluster_cache_tracker_test.go b/controllers/remote/cluster_cache_tracker_test.go index 8eb2c302f86a..5507106a6d35 100644 --- a/controllers/remote/cluster_cache_tracker_test.go +++ b/controllers/remote/cluster_cache_tracker_test.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" ctrl "sigs.k8s.io/controller-runtime" diff --git a/controllers/remote/index.go b/controllers/remote/index.go index 7ed25a431e65..e7a13442cdc7 100644 --- a/controllers/remote/index.go +++ b/controllers/remote/index.go @@ -18,7 +18,7 @@ package remote import ( corev1 "k8s.io/api/core/v1" - "sigs.k8s.io/cluster-api/api/v1alpha4/index" + "sigs.k8s.io/cluster-api/api/v1beta1/index" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/controllers/schema_test.go b/controllers/schema_test.go index ac6bcec533ee..e9f244fa8331 100644 --- a/controllers/schema_test.go +++ b/controllers/schema_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/controllers/suite_test.go b/controllers/suite_test.go index d5db30f5c335..a501eec06fdd 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -31,8 +31,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" clientgoscheme "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/api/v1alpha4/index" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/v1beta1/index" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/internal/envtest" ctrl "sigs.k8s.io/controller-runtime" diff --git a/controllers/suite_util_test.go b/controllers/suite_util_test.go index 62247f571be4..96e3756bd524 100644 --- a/controllers/suite_util_test.go +++ b/controllers/suite_util_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/utils/pointer" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func intOrStrPtr(i int32) *intstr.IntOrString { diff --git a/controllers/topology/blueprint.go b/controllers/topology/blueprint.go index a2ce9ee3f5bf..181de1e2ede4 100644 --- a/controllers/topology/blueprint.go +++ b/controllers/topology/blueprint.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" kerrors "k8s.io/apimachinery/pkg/util/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" tlog "sigs.k8s.io/cluster-api/controllers/topology/internal/log" "sigs.k8s.io/cluster-api/controllers/topology/internal/scope" "sigs.k8s.io/cluster-api/util/patch" diff --git a/controllers/topology/blueprint_test.go b/controllers/topology/blueprint_test.go index a55d612f6f0b..cfd5684a5672 100644 --- a/controllers/topology/blueprint_test.go +++ b/controllers/topology/blueprint_test.go @@ -23,7 +23,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/topology/internal/scope" "sigs.k8s.io/cluster-api/internal/testtypes" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controllers/topology/cluster_controller.go b/controllers/topology/cluster_controller.go index 5fffab34850e..5adf418e06f1 100644 --- a/controllers/topology/cluster_controller.go +++ b/controllers/topology/cluster_controller.go @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/api/v1alpha4/index" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/v1beta1/index" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/controllers/topology/internal/scope" "sigs.k8s.io/cluster-api/util" diff --git a/controllers/topology/current_state.go b/controllers/topology/current_state.go index 2e217f0e0768..2e1c7204b4b2 100644 --- a/controllers/topology/current_state.go +++ b/controllers/topology/current_state.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/topology/internal/contract" tlog "sigs.k8s.io/cluster-api/controllers/topology/internal/log" "sigs.k8s.io/cluster-api/controllers/topology/internal/scope" diff --git a/controllers/topology/current_state_test.go b/controllers/topology/current_state_test.go index 85e963f6d6a4..e56cefb7e448 100644 --- a/controllers/topology/current_state_test.go +++ b/controllers/topology/current_state_test.go @@ -26,7 +26,7 @@ import ( "github.com/google/go-cmp/cmp" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/topology/internal/scope" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" diff --git a/controllers/topology/desired_state.go b/controllers/topology/desired_state.go index 7b2f7d6d8e84..ef7d7ba10a0b 100644 --- a/controllers/topology/desired_state.go +++ b/controllers/topology/desired_state.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apiserver/pkg/storage/names" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/controllers/topology/internal/contract" tlog "sigs.k8s.io/cluster-api/controllers/topology/internal/log" diff --git a/controllers/topology/desired_state_test.go b/controllers/topology/desired_state_test.go index d0c4862ac710..53363670c2a2 100644 --- a/controllers/topology/desired_state_test.go +++ b/controllers/topology/desired_state_test.go @@ -28,7 +28,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/topology/internal/contract" "sigs.k8s.io/cluster-api/controllers/topology/internal/scope" ) diff --git a/controllers/topology/internal/check/compatibility_test.go b/controllers/topology/internal/check/compatibility_test.go index fecc4d36a3ce..d557dab2ee2d 100644 --- a/controllers/topology/internal/check/compatibility_test.go +++ b/controllers/topology/internal/check/compatibility_test.go @@ -35,12 +35,12 @@ var referencedObjectsCompatibilityTestCases = []referencedObjectsCompatibilityTe name: "Fails if group changes", current: &unstructured.Unstructured{ Object: map[string]interface{}{ - "apiVersion": "foo/v1alpha4", + "apiVersion": "foo/v1beta1", }, }, desired: &unstructured.Unstructured{ Object: map[string]interface{}{ - "apiVersion": "bar/v1alpha4", + "apiVersion": "bar/v1beta1", }, }, wantErr: true, diff --git a/controllers/topology/internal/contract/controlplane_test.go b/controllers/topology/internal/contract/controlplane_test.go index 806d3fc1f00e..dfd149223448 100644 --- a/controllers/topology/internal/contract/controlplane_test.go +++ b/controllers/topology/internal/contract/controlplane_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func TestControlPlane(t *testing.T) { diff --git a/controllers/topology/internal/contract/metadata.go b/controllers/topology/internal/contract/metadata.go index 3d09e574b32f..eed2c9915912 100644 --- a/controllers/topology/internal/contract/metadata.go +++ b/controllers/topology/internal/contract/metadata.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // Metadata provides a helper struct for working with Metadata. diff --git a/controllers/topology/internal/log/log.go b/controllers/topology/internal/log/log.go index fae4b537ba71..b655084e2d13 100644 --- a/controllers/topology/internal/log/log.go +++ b/controllers/topology/internal/log/log.go @@ -22,7 +22,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/controllers/topology/internal/scope/blueprint.go b/controllers/topology/internal/scope/blueprint.go index 3a3f73855532..8f9a8b3bf638 100644 --- a/controllers/topology/internal/scope/blueprint.go +++ b/controllers/topology/internal/scope/blueprint.go @@ -18,7 +18,7 @@ package scope import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // ClusterBlueprint holds all the objects required for computing the desired state of a managed Cluster topology, diff --git a/controllers/topology/internal/scope/scope.go b/controllers/topology/internal/scope/scope.go index 6778dd6beaae..0ce1d27f19c3 100644 --- a/controllers/topology/internal/scope/scope.go +++ b/controllers/topology/internal/scope/scope.go @@ -17,7 +17,7 @@ limitations under the License. package scope import ( - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // Scope holds all the information to process a request in the topology/ClusterReconciler controller. diff --git a/controllers/topology/internal/scope/state.go b/controllers/topology/internal/scope/state.go index 123b9539a6e8..da9d72b4962e 100644 --- a/controllers/topology/internal/scope/state.go +++ b/controllers/topology/internal/scope/state.go @@ -18,7 +18,7 @@ package scope import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/mdutil" ) diff --git a/controllers/topology/machinedeployment_controller.go b/controllers/topology/machinedeployment_controller.go index 6b65c7f5c26d..62854d5d06ed 100644 --- a/controllers/topology/machinedeployment_controller.go +++ b/controllers/topology/machinedeployment_controller.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" tlog "sigs.k8s.io/cluster-api/controllers/topology/internal/log" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" diff --git a/controllers/topology/machinedeployment_controller_test.go b/controllers/topology/machinedeployment_controller_test.go index 3fb591aed469..d427d7770467 100644 --- a/controllers/topology/machinedeployment_controller_test.go +++ b/controllers/topology/machinedeployment_controller_test.go @@ -24,7 +24,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/internal/testtypes" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" diff --git a/controllers/topology/machineset_controller.go b/controllers/topology/machineset_controller.go index f289f1cfd7a6..e1afd6eeda5a 100644 --- a/controllers/topology/machineset_controller.go +++ b/controllers/topology/machineset_controller.go @@ -23,7 +23,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" tlog "sigs.k8s.io/cluster-api/controllers/topology/internal/log" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" diff --git a/controllers/topology/machineset_controller_test.go b/controllers/topology/machineset_controller_test.go index 6336166638ce..3c2ebff83298 100644 --- a/controllers/topology/machineset_controller_test.go +++ b/controllers/topology/machineset_controller_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/internal/testtypes" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" diff --git a/controllers/topology/reconcile_state_test.go b/controllers/topology/reconcile_state_test.go index dd99817414e2..32691a188f25 100644 --- a/controllers/topology/reconcile_state_test.go +++ b/controllers/topology/reconcile_state_test.go @@ -27,7 +27,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/topology/internal/contract" "sigs.k8s.io/cluster-api/controllers/topology/internal/scope" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controllers/topology/suite_test.go b/controllers/topology/suite_test.go index 076969d78653..fa1955e59b77 100644 --- a/controllers/topology/suite_test.go +++ b/controllers/topology/suite_test.go @@ -22,7 +22,7 @@ import ( clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) var ( diff --git a/controllers/topology/util.go b/controllers/topology/util.go index 18a18c5b9408..3e76bbb12585 100644 --- a/controllers/topology/util.go +++ b/controllers/topology/util.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" tlog "sigs.k8s.io/cluster-api/controllers/topology/internal/log" utilconversion "sigs.k8s.io/cluster-api/util/conversion" diff --git a/controllers/topology/util_test.go b/controllers/topology/util_test.go index de8baa0d9cce..e64113a83f27 100644 --- a/controllers/topology/util_test.go +++ b/controllers/topology/util_test.go @@ -20,7 +20,7 @@ import ( "testing" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/internal/testtypes" "github.com/google/go-cmp/cmp" @@ -36,7 +36,7 @@ import ( func TestGetReference(t *testing.T) { fakeControlPlaneTemplateCRDv99 := testtypes.GenericControlPlaneTemplateCRD.DeepCopy() fakeControlPlaneTemplateCRDv99.Labels = map[string]string{ - "cluster.x-k8s.io/v1alpha4": "v1alpha4_v99", + "cluster.x-k8s.io/v1beta1": "v1beta1_v99", } crds := []client.Object{ fakeControlPlaneTemplateCRDv99, diff --git a/controlplane/kubeadm/api/v1alpha3/conversion.go b/controlplane/kubeadm/api/v1alpha3/conversion.go index 8244b44436b0..9c9460c1f087 100644 --- a/controlplane/kubeadm/api/v1alpha3/conversion.go +++ b/controlplane/kubeadm/api/v1alpha3/conversion.go @@ -18,21 +18,21 @@ package v1alpha3 import ( apiconversion "k8s.io/apimachinery/pkg/conversion" - kubeadmbootstrapv1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + kubeadmbootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" ) func (src *KubeadmControlPlane) ConvertTo(destRaw conversion.Hub) error { - dest := destRaw.(*v1alpha4.KubeadmControlPlane) + dest := destRaw.(*v1beta1.KubeadmControlPlane) - if err := Convert_v1alpha3_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(src, dest, nil); err != nil { + if err := Convert_v1alpha3_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(src, dest, nil); err != nil { return err } // Manually restore data. - restored := &v1alpha4.KubeadmControlPlane{} + restored := &v1beta1.KubeadmControlPlane{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -42,14 +42,14 @@ func (src *KubeadmControlPlane) ConvertTo(destRaw conversion.Hub) error { if restored.Spec.KubeadmConfigSpec.JoinConfiguration != nil && restored.Spec.KubeadmConfigSpec.JoinConfiguration.NodeRegistration.IgnorePreflightErrors != nil { if dest.Spec.KubeadmConfigSpec.JoinConfiguration == nil { - dest.Spec.KubeadmConfigSpec.JoinConfiguration = &kubeadmbootstrapv1alpha4.JoinConfiguration{} + dest.Spec.KubeadmConfigSpec.JoinConfiguration = &kubeadmbootstrapv1.JoinConfiguration{} } dest.Spec.KubeadmConfigSpec.JoinConfiguration.NodeRegistration.IgnorePreflightErrors = restored.Spec.KubeadmConfigSpec.JoinConfiguration.NodeRegistration.IgnorePreflightErrors } if restored.Spec.KubeadmConfigSpec.InitConfiguration != nil && restored.Spec.KubeadmConfigSpec.InitConfiguration.NodeRegistration.IgnorePreflightErrors != nil { if dest.Spec.KubeadmConfigSpec.InitConfiguration == nil { - dest.Spec.KubeadmConfigSpec.InitConfiguration = &kubeadmbootstrapv1alpha4.InitConfiguration{} + dest.Spec.KubeadmConfigSpec.InitConfiguration = &kubeadmbootstrapv1.InitConfiguration{} } dest.Spec.KubeadmConfigSpec.InitConfiguration.NodeRegistration.IgnorePreflightErrors = restored.Spec.KubeadmConfigSpec.InitConfiguration.NodeRegistration.IgnorePreflightErrors } @@ -58,9 +58,9 @@ func (src *KubeadmControlPlane) ConvertTo(destRaw conversion.Hub) error { } func (dest *KubeadmControlPlane) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.KubeadmControlPlane) + src := srcRaw.(*v1beta1.KubeadmControlPlane) - if err := Convert_v1alpha4_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(src, dest, nil); err != nil { + if err := Convert_v1beta1_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(src, dest, nil); err != nil { return err } @@ -73,30 +73,32 @@ func (dest *KubeadmControlPlane) ConvertFrom(srcRaw conversion.Hub) error { } func (src *KubeadmControlPlaneList) ConvertTo(destRaw conversion.Hub) error { - dest := destRaw.(*v1alpha4.KubeadmControlPlaneList) - return Convert_v1alpha3_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList(src, dest, nil) + dest := destRaw.(*v1beta1.KubeadmControlPlaneList) + + return Convert_v1alpha3_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList(src, dest, nil) } func (dest *KubeadmControlPlaneList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.KubeadmControlPlaneList) - return Convert_v1alpha4_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList(src, dest, nil) + src := srcRaw.(*v1beta1.KubeadmControlPlaneList) + + return Convert_v1beta1_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList(src, dest, nil) } -func Convert_v1alpha4_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlaneSpec(in *v1alpha4.KubeadmControlPlaneSpec, out *KubeadmControlPlaneSpec, s apiconversion.Scope) error { +func Convert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlaneSpec(in *v1beta1.KubeadmControlPlaneSpec, out *KubeadmControlPlaneSpec, s apiconversion.Scope) error { out.UpgradeAfter = in.RolloutAfter out.InfrastructureTemplate = in.MachineTemplate.InfrastructureRef out.NodeDrainTimeout = in.MachineTemplate.NodeDrainTimeout - return autoConvert_v1alpha4_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlaneSpec(in, out, s) + return autoConvert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlaneSpec(in, out, s) } -func Convert_v1alpha4_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPlaneStatus(in *v1alpha4.KubeadmControlPlaneStatus, out *KubeadmControlPlaneStatus, s apiconversion.Scope) error { +func Convert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPlaneStatus(in *v1beta1.KubeadmControlPlaneStatus, out *KubeadmControlPlaneStatus, s apiconversion.Scope) error { // NOTE: custom conversion func is required because status.Version does not exist in v1alpha3. - return autoConvert_v1alpha4_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPlaneStatus(in, out, s) + return autoConvert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPlaneStatus(in, out, s) } -func Convert_v1alpha3_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(in *KubeadmControlPlaneSpec, out *v1alpha4.KubeadmControlPlaneSpec, s apiconversion.Scope) error { +func Convert_v1alpha3_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(in *KubeadmControlPlaneSpec, out *v1beta1.KubeadmControlPlaneSpec, s apiconversion.Scope) error { out.RolloutAfter = in.UpgradeAfter out.MachineTemplate.InfrastructureRef = in.InfrastructureTemplate out.MachineTemplate.NodeDrainTimeout = in.NodeDrainTimeout - return autoConvert_v1alpha3_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(in, out, s) + return autoConvert_v1alpha3_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(in, out, s) } diff --git a/controlplane/kubeadm/api/v1alpha3/conversion_test.go b/controlplane/kubeadm/api/v1alpha3/conversion_test.go index 59fb9ebbba61..da8e9f72d1cc 100644 --- a/controlplane/kubeadm/api/v1alpha3/conversion_test.go +++ b/controlplane/kubeadm/api/v1alpha3/conversion_test.go @@ -23,15 +23,15 @@ import ( "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - cabpkv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - kubeadmv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" - "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + cabpkv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + kubeadmv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" + "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) func TestFuzzyConversion(t *testing.T) { t.Run("for KubeadmControlPLane", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &v1alpha4.KubeadmControlPlane{}, + Hub: &v1beta1.KubeadmControlPlane{}, Spoke: &KubeadmControlPlane{}, FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs}, })) diff --git a/controlplane/kubeadm/api/v1alpha3/doc.go b/controlplane/kubeadm/api/v1alpha3/doc.go index a80c8a4cdab9..6ba2420a8838 100644 --- a/controlplane/kubeadm/api/v1alpha3/doc.go +++ b/controlplane/kubeadm/api/v1alpha3/doc.go @@ -15,5 +15,5 @@ limitations under the License. */ // Package v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1 package v1alpha3 diff --git a/controlplane/kubeadm/api/v1alpha3/webhook_test.go b/controlplane/kubeadm/api/v1alpha3/webhook_test.go index 42fe8de9c4c5..c015e3bd0a70 100644 --- a/controlplane/kubeadm/api/v1alpha3/webhook_test.go +++ b/controlplane/kubeadm/api/v1alpha3/webhook_test.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" cabpkv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3" - kubeadmv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1" + kubeadmv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" "sigs.k8s.io/cluster-api/util" ) diff --git a/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go b/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go index 844fb88c34c6..66c77aefc54a 100644 --- a/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go +++ b/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go @@ -1,4 +1,4 @@ -// +build !ignore_autogenerated_kubeadm_controlplane_v1alpha3 +// +build !ignore_autogenerated_kubeadm_controlplane /* Copyright The Kubernetes Authors. @@ -27,9 +27,9 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" clusterapiapiv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" apiv1alpha3 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3" - v1alpha4 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + v1beta1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" errors "sigs.k8s.io/cluster-api/errors" ) @@ -40,108 +40,108 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*KubeadmControlPlane)(nil), (*v1alpha4.KubeadmControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(a.(*KubeadmControlPlane), b.(*v1alpha4.KubeadmControlPlane), scope) + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlane)(nil), (*v1beta1.KubeadmControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(a.(*KubeadmControlPlane), b.(*v1beta1.KubeadmControlPlane), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.KubeadmControlPlane)(nil), (*KubeadmControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(a.(*v1alpha4.KubeadmControlPlane), b.(*KubeadmControlPlane), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlane)(nil), (*KubeadmControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(a.(*v1beta1.KubeadmControlPlane), b.(*KubeadmControlPlane), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneList)(nil), (*v1alpha4.KubeadmControlPlaneList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList(a.(*KubeadmControlPlaneList), b.(*v1alpha4.KubeadmControlPlaneList), scope) + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneList)(nil), (*v1beta1.KubeadmControlPlaneList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList(a.(*KubeadmControlPlaneList), b.(*v1beta1.KubeadmControlPlaneList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.KubeadmControlPlaneList)(nil), (*KubeadmControlPlaneList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList(a.(*v1alpha4.KubeadmControlPlaneList), b.(*KubeadmControlPlaneList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlaneList)(nil), (*KubeadmControlPlaneList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList(a.(*v1beta1.KubeadmControlPlaneList), b.(*KubeadmControlPlaneList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneStatus)(nil), (*v1alpha4.KubeadmControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(a.(*KubeadmControlPlaneStatus), b.(*v1alpha4.KubeadmControlPlaneStatus), scope) + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneStatus)(nil), (*v1beta1.KubeadmControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(a.(*KubeadmControlPlaneStatus), b.(*v1beta1.KubeadmControlPlaneStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*RollingUpdate)(nil), (*v1alpha4.RollingUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_RollingUpdate_To_v1alpha4_RollingUpdate(a.(*RollingUpdate), b.(*v1alpha4.RollingUpdate), scope) + if err := s.AddGeneratedConversionFunc((*RollingUpdate)(nil), (*v1beta1.RollingUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_RollingUpdate_To_v1beta1_RollingUpdate(a.(*RollingUpdate), b.(*v1beta1.RollingUpdate), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.RollingUpdate)(nil), (*RollingUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_RollingUpdate_To_v1alpha3_RollingUpdate(a.(*v1alpha4.RollingUpdate), b.(*RollingUpdate), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.RollingUpdate)(nil), (*RollingUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RollingUpdate_To_v1alpha3_RollingUpdate(a.(*v1beta1.RollingUpdate), b.(*RollingUpdate), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*RolloutStrategy)(nil), (*v1alpha4.RolloutStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_RolloutStrategy_To_v1alpha4_RolloutStrategy(a.(*RolloutStrategy), b.(*v1alpha4.RolloutStrategy), scope) + if err := s.AddGeneratedConversionFunc((*RolloutStrategy)(nil), (*v1beta1.RolloutStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_RolloutStrategy_To_v1beta1_RolloutStrategy(a.(*RolloutStrategy), b.(*v1beta1.RolloutStrategy), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.RolloutStrategy)(nil), (*RolloutStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_RolloutStrategy_To_v1alpha3_RolloutStrategy(a.(*v1alpha4.RolloutStrategy), b.(*RolloutStrategy), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.RolloutStrategy)(nil), (*RolloutStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RolloutStrategy_To_v1alpha3_RolloutStrategy(a.(*v1beta1.RolloutStrategy), b.(*RolloutStrategy), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*KubeadmControlPlaneSpec)(nil), (*v1alpha4.KubeadmControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(a.(*KubeadmControlPlaneSpec), b.(*v1alpha4.KubeadmControlPlaneSpec), scope) + if err := s.AddConversionFunc((*KubeadmControlPlaneSpec)(nil), (*v1beta1.KubeadmControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(a.(*KubeadmControlPlaneSpec), b.(*v1beta1.KubeadmControlPlaneSpec), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.KubeadmControlPlaneSpec)(nil), (*KubeadmControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlaneSpec(a.(*v1alpha4.KubeadmControlPlaneSpec), b.(*KubeadmControlPlaneSpec), scope) + if err := s.AddConversionFunc((*v1beta1.KubeadmControlPlaneSpec)(nil), (*KubeadmControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlaneSpec(a.(*v1beta1.KubeadmControlPlaneSpec), b.(*KubeadmControlPlaneSpec), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.KubeadmControlPlaneStatus)(nil), (*KubeadmControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPlaneStatus(a.(*v1alpha4.KubeadmControlPlaneStatus), b.(*KubeadmControlPlaneStatus), scope) + if err := s.AddConversionFunc((*v1beta1.KubeadmControlPlaneStatus)(nil), (*KubeadmControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPlaneStatus(a.(*v1beta1.KubeadmControlPlaneStatus), b.(*KubeadmControlPlaneStatus), scope) }); err != nil { return err } return nil } -func autoConvert_v1alpha3_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(in *KubeadmControlPlane, out *v1alpha4.KubeadmControlPlane, s conversion.Scope) error { +func autoConvert_v1alpha3_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(in *KubeadmControlPlane, out *v1beta1.KubeadmControlPlane, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(in *KubeadmControlPlane, out *v1alpha4.KubeadmControlPlane, s conversion.Scope) error { - return autoConvert_v1alpha3_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(in, out, s) +// Convert_v1alpha3_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane is an autogenerated conversion function. +func Convert_v1alpha3_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(in *KubeadmControlPlane, out *v1beta1.KubeadmControlPlane, s conversion.Scope) error { + return autoConvert_v1alpha3_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(in, out, s) } -func autoConvert_v1alpha4_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(in *v1alpha4.KubeadmControlPlane, out *KubeadmControlPlane, s conversion.Scope) error { +func autoConvert_v1beta1_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(in *v1beta1.KubeadmControlPlane, out *KubeadmControlPlane, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPlaneStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPlaneStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane is an autogenerated conversion function. -func Convert_v1alpha4_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(in *v1alpha4.KubeadmControlPlane, out *KubeadmControlPlane, s conversion.Scope) error { - return autoConvert_v1alpha4_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(in, out, s) +// Convert_v1beta1_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(in *v1beta1.KubeadmControlPlane, out *KubeadmControlPlane, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(in, out, s) } -func autoConvert_v1alpha3_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList(in *KubeadmControlPlaneList, out *v1alpha4.KubeadmControlPlaneList, s conversion.Scope) error { +func autoConvert_v1alpha3_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList(in *KubeadmControlPlaneList, out *v1beta1.KubeadmControlPlaneList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.KubeadmControlPlane, len(*in)) + *out = make([]v1beta1.KubeadmControlPlane, len(*in)) for i := range *in { - if err := Convert_v1alpha3_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -151,18 +151,18 @@ func autoConvert_v1alpha3_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlan return nil } -// Convert_v1alpha3_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList(in *KubeadmControlPlaneList, out *v1alpha4.KubeadmControlPlaneList, s conversion.Scope) error { - return autoConvert_v1alpha3_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList(in, out, s) +// Convert_v1alpha3_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList is an autogenerated conversion function. +func Convert_v1alpha3_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList(in *KubeadmControlPlaneList, out *v1beta1.KubeadmControlPlaneList, s conversion.Scope) error { + return autoConvert_v1alpha3_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList(in, out, s) } -func autoConvert_v1alpha4_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList(in *v1alpha4.KubeadmControlPlaneList, out *KubeadmControlPlaneList, s conversion.Scope) error { +func autoConvert_v1beta1_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList(in *v1beta1.KubeadmControlPlaneList, out *KubeadmControlPlaneList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]KubeadmControlPlane, len(*in)) for i := range *in { - if err := Convert_v1alpha4_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_KubeadmControlPlane_To_v1alpha3_KubeadmControlPlane(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -172,29 +172,29 @@ func autoConvert_v1alpha4_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlan return nil } -// Convert_v1alpha4_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList is an autogenerated conversion function. -func Convert_v1alpha4_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList(in *v1alpha4.KubeadmControlPlaneList, out *KubeadmControlPlaneList, s conversion.Scope) error { - return autoConvert_v1alpha4_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList(in, out, s) +// Convert_v1beta1_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList(in *v1beta1.KubeadmControlPlaneList, out *KubeadmControlPlaneList, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlaneList_To_v1alpha3_KubeadmControlPlaneList(in, out, s) } -func autoConvert_v1alpha3_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(in *KubeadmControlPlaneSpec, out *v1alpha4.KubeadmControlPlaneSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(in *KubeadmControlPlaneSpec, out *v1beta1.KubeadmControlPlaneSpec, s conversion.Scope) error { out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) out.Version = in.Version // WARNING: in.InfrastructureTemplate requires manual conversion: does not exist in peer-type - if err := apiv1alpha3.Convert_v1alpha3_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(&in.KubeadmConfigSpec, &out.KubeadmConfigSpec, s); err != nil { + if err := apiv1alpha3.Convert_v1alpha3_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(&in.KubeadmConfigSpec, &out.KubeadmConfigSpec, s); err != nil { return err } // WARNING: in.UpgradeAfter requires manual conversion: does not exist in peer-type // WARNING: in.NodeDrainTimeout requires manual conversion: does not exist in peer-type - out.RolloutStrategy = (*v1alpha4.RolloutStrategy)(unsafe.Pointer(in.RolloutStrategy)) + out.RolloutStrategy = (*v1beta1.RolloutStrategy)(unsafe.Pointer(in.RolloutStrategy)) return nil } -func autoConvert_v1alpha4_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlaneSpec(in *v1alpha4.KubeadmControlPlaneSpec, out *KubeadmControlPlaneSpec, s conversion.Scope) error { +func autoConvert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlaneSpec(in *v1beta1.KubeadmControlPlaneSpec, out *KubeadmControlPlaneSpec, s conversion.Scope) error { out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) out.Version = in.Version // WARNING: in.MachineTemplate requires manual conversion: does not exist in peer-type - if err := apiv1alpha3.Convert_v1alpha4_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(&in.KubeadmConfigSpec, &out.KubeadmConfigSpec, s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(&in.KubeadmConfigSpec, &out.KubeadmConfigSpec, s); err != nil { return err } // WARNING: in.RolloutAfter requires manual conversion: does not exist in peer-type @@ -202,7 +202,7 @@ func autoConvert_v1alpha4_KubeadmControlPlaneSpec_To_v1alpha3_KubeadmControlPlan return nil } -func autoConvert_v1alpha3_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(in *KubeadmControlPlaneStatus, out *v1alpha4.KubeadmControlPlaneStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(in *KubeadmControlPlaneStatus, out *v1beta1.KubeadmControlPlaneStatus, s conversion.Scope) error { out.Selector = in.Selector out.Replicas = in.Replicas out.UpdatedReplicas = in.UpdatedReplicas @@ -215,9 +215,9 @@ func autoConvert_v1alpha3_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPl out.ObservedGeneration = in.ObservedGeneration if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) + *out = make(apiv1beta1.Conditions, len(*in)) for i := range *in { - if err := clusterapiapiv1alpha3.Convert_v1alpha3_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := clusterapiapiv1alpha3.Convert_v1alpha3_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -227,12 +227,12 @@ func autoConvert_v1alpha3_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPl return nil } -// Convert_v1alpha3_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus is an autogenerated conversion function. -func Convert_v1alpha3_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(in *KubeadmControlPlaneStatus, out *v1alpha4.KubeadmControlPlaneStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(in, out, s) +// Convert_v1alpha3_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus is an autogenerated conversion function. +func Convert_v1alpha3_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(in *KubeadmControlPlaneStatus, out *v1beta1.KubeadmControlPlaneStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(in, out, s) } -func autoConvert_v1alpha4_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPlaneStatus(in *v1alpha4.KubeadmControlPlaneStatus, out *KubeadmControlPlaneStatus, s conversion.Scope) error { +func autoConvert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPlaneStatus(in *v1beta1.KubeadmControlPlaneStatus, out *KubeadmControlPlaneStatus, s conversion.Scope) error { out.Selector = in.Selector out.Replicas = in.Replicas // WARNING: in.Version requires manual conversion: does not exist in peer-type @@ -248,7 +248,7 @@ func autoConvert_v1alpha4_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPl in, out := &in.Conditions, &out.Conditions *out = make(clusterapiapiv1alpha3.Conditions, len(*in)) for i := range *in { - if err := clusterapiapiv1alpha3.Convert_v1alpha4_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := clusterapiapiv1alpha3.Convert_v1beta1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -258,44 +258,44 @@ func autoConvert_v1alpha4_KubeadmControlPlaneStatus_To_v1alpha3_KubeadmControlPl return nil } -func autoConvert_v1alpha3_RollingUpdate_To_v1alpha4_RollingUpdate(in *RollingUpdate, out *v1alpha4.RollingUpdate, s conversion.Scope) error { +func autoConvert_v1alpha3_RollingUpdate_To_v1beta1_RollingUpdate(in *RollingUpdate, out *v1beta1.RollingUpdate, s conversion.Scope) error { out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) return nil } -// Convert_v1alpha3_RollingUpdate_To_v1alpha4_RollingUpdate is an autogenerated conversion function. -func Convert_v1alpha3_RollingUpdate_To_v1alpha4_RollingUpdate(in *RollingUpdate, out *v1alpha4.RollingUpdate, s conversion.Scope) error { - return autoConvert_v1alpha3_RollingUpdate_To_v1alpha4_RollingUpdate(in, out, s) +// Convert_v1alpha3_RollingUpdate_To_v1beta1_RollingUpdate is an autogenerated conversion function. +func Convert_v1alpha3_RollingUpdate_To_v1beta1_RollingUpdate(in *RollingUpdate, out *v1beta1.RollingUpdate, s conversion.Scope) error { + return autoConvert_v1alpha3_RollingUpdate_To_v1beta1_RollingUpdate(in, out, s) } -func autoConvert_v1alpha4_RollingUpdate_To_v1alpha3_RollingUpdate(in *v1alpha4.RollingUpdate, out *RollingUpdate, s conversion.Scope) error { +func autoConvert_v1beta1_RollingUpdate_To_v1alpha3_RollingUpdate(in *v1beta1.RollingUpdate, out *RollingUpdate, s conversion.Scope) error { out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) return nil } -// Convert_v1alpha4_RollingUpdate_To_v1alpha3_RollingUpdate is an autogenerated conversion function. -func Convert_v1alpha4_RollingUpdate_To_v1alpha3_RollingUpdate(in *v1alpha4.RollingUpdate, out *RollingUpdate, s conversion.Scope) error { - return autoConvert_v1alpha4_RollingUpdate_To_v1alpha3_RollingUpdate(in, out, s) +// Convert_v1beta1_RollingUpdate_To_v1alpha3_RollingUpdate is an autogenerated conversion function. +func Convert_v1beta1_RollingUpdate_To_v1alpha3_RollingUpdate(in *v1beta1.RollingUpdate, out *RollingUpdate, s conversion.Scope) error { + return autoConvert_v1beta1_RollingUpdate_To_v1alpha3_RollingUpdate(in, out, s) } -func autoConvert_v1alpha3_RolloutStrategy_To_v1alpha4_RolloutStrategy(in *RolloutStrategy, out *v1alpha4.RolloutStrategy, s conversion.Scope) error { - out.Type = v1alpha4.RolloutStrategyType(in.Type) - out.RollingUpdate = (*v1alpha4.RollingUpdate)(unsafe.Pointer(in.RollingUpdate)) +func autoConvert_v1alpha3_RolloutStrategy_To_v1beta1_RolloutStrategy(in *RolloutStrategy, out *v1beta1.RolloutStrategy, s conversion.Scope) error { + out.Type = v1beta1.RolloutStrategyType(in.Type) + out.RollingUpdate = (*v1beta1.RollingUpdate)(unsafe.Pointer(in.RollingUpdate)) return nil } -// Convert_v1alpha3_RolloutStrategy_To_v1alpha4_RolloutStrategy is an autogenerated conversion function. -func Convert_v1alpha3_RolloutStrategy_To_v1alpha4_RolloutStrategy(in *RolloutStrategy, out *v1alpha4.RolloutStrategy, s conversion.Scope) error { - return autoConvert_v1alpha3_RolloutStrategy_To_v1alpha4_RolloutStrategy(in, out, s) +// Convert_v1alpha3_RolloutStrategy_To_v1beta1_RolloutStrategy is an autogenerated conversion function. +func Convert_v1alpha3_RolloutStrategy_To_v1beta1_RolloutStrategy(in *RolloutStrategy, out *v1beta1.RolloutStrategy, s conversion.Scope) error { + return autoConvert_v1alpha3_RolloutStrategy_To_v1beta1_RolloutStrategy(in, out, s) } -func autoConvert_v1alpha4_RolloutStrategy_To_v1alpha3_RolloutStrategy(in *v1alpha4.RolloutStrategy, out *RolloutStrategy, s conversion.Scope) error { +func autoConvert_v1beta1_RolloutStrategy_To_v1alpha3_RolloutStrategy(in *v1beta1.RolloutStrategy, out *RolloutStrategy, s conversion.Scope) error { out.Type = RolloutStrategyType(in.Type) out.RollingUpdate = (*RollingUpdate)(unsafe.Pointer(in.RollingUpdate)) return nil } -// Convert_v1alpha4_RolloutStrategy_To_v1alpha3_RolloutStrategy is an autogenerated conversion function. -func Convert_v1alpha4_RolloutStrategy_To_v1alpha3_RolloutStrategy(in *v1alpha4.RolloutStrategy, out *RolloutStrategy, s conversion.Scope) error { - return autoConvert_v1alpha4_RolloutStrategy_To_v1alpha3_RolloutStrategy(in, out, s) +// Convert_v1beta1_RolloutStrategy_To_v1alpha3_RolloutStrategy is an autogenerated conversion function. +func Convert_v1beta1_RolloutStrategy_To_v1alpha3_RolloutStrategy(in *v1beta1.RolloutStrategy, out *RolloutStrategy, s conversion.Scope) error { + return autoConvert_v1beta1_RolloutStrategy_To_v1alpha3_RolloutStrategy(in, out, s) } diff --git a/controlplane/kubeadm/api/v1alpha4/conversion.go b/controlplane/kubeadm/api/v1alpha4/conversion.go index 543e42e5218a..b9990f9dccf6 100644 --- a/controlplane/kubeadm/api/v1alpha4/conversion.go +++ b/controlplane/kubeadm/api/v1alpha4/conversion.go @@ -16,5 +16,31 @@ limitations under the License. package v1alpha4 -func (*KubeadmControlPlane) Hub() {} -func (*KubeadmControlPlaneList) Hub() {} +import ( + "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" + "sigs.k8s.io/controller-runtime/pkg/conversion" +) + +func (src *KubeadmControlPlane) ConvertTo(destRaw conversion.Hub) error { + dest := destRaw.(*v1beta1.KubeadmControlPlane) + + return Convert_v1alpha4_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(src, dest, nil) +} + +func (dest *KubeadmControlPlane) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.KubeadmControlPlane) + + return Convert_v1beta1_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(src, dest, nil) +} + +func (src *KubeadmControlPlaneList) ConvertTo(destRaw conversion.Hub) error { + dest := destRaw.(*v1beta1.KubeadmControlPlaneList) + + return Convert_v1alpha4_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList(src, dest, nil) +} + +func (dest *KubeadmControlPlaneList) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.KubeadmControlPlaneList) + + return Convert_v1beta1_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList(src, dest, nil) +} diff --git a/controlplane/kubeadm/api/v1alpha4/doc.go b/controlplane/kubeadm/api/v1alpha4/doc.go index b0efd4cde559..fd7c7fd2f582 100644 --- a/controlplane/kubeadm/api/v1alpha4/doc.go +++ b/controlplane/kubeadm/api/v1alpha4/doc.go @@ -14,4 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package v1alpha4 contains the v1alpha4 API implementation. +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1 package v1alpha4 diff --git a/controlplane/kubeadm/api/v1alpha4/groupversion_info.go b/controlplane/kubeadm/api/v1alpha4/groupversion_info.go index 8d26f9a44d05..64491c59b8bf 100644 --- a/controlplane/kubeadm/api/v1alpha4/groupversion_info.go +++ b/controlplane/kubeadm/api/v1alpha4/groupversion_info.go @@ -33,4 +33,6 @@ var ( // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = SchemeBuilder.SchemeBuilder ) diff --git a/controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_types.go b/controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_types.go index e883ae6cf174..f8d272ee097f 100644 --- a/controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_types.go +++ b/controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_types.go @@ -198,7 +198,6 @@ type KubeadmControlPlaneStatus struct { // +kubebuilder:object:root=true // +kubebuilder:resource:path=kubeadmcontrolplanes,shortName=kcp,scope=Namespaced,categories=cluster-api -// +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmControlPlane" diff --git a/controlplane/kubeadm/api/v1alpha4/kubeadmcontrolplanetemplate_types.go b/controlplane/kubeadm/api/v1alpha4/kubeadmcontrolplanetemplate_types.go index 20674b710cf5..891a3a2d8a5d 100644 --- a/controlplane/kubeadm/api/v1alpha4/kubeadmcontrolplanetemplate_types.go +++ b/controlplane/kubeadm/api/v1alpha4/kubeadmcontrolplanetemplate_types.go @@ -27,7 +27,6 @@ type KubeadmControlPlaneTemplateSpec struct { // +kubebuilder:object:root=true // +kubebuilder:resource:path=kubeadmcontrolplanetemplates,scope=Namespaced,categories=cluster-api -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmControlPlaneTemplate" // KubeadmControlPlaneTemplate is the Schema for the kubeadmcontrolplanetemplates API. diff --git a/controlplane/kubeadm/api/v1alpha4/zz_generated.conversion.go b/controlplane/kubeadm/api/v1alpha4/zz_generated.conversion.go new file mode 100644 index 000000000000..b7bc6c589b88 --- /dev/null +++ b/controlplane/kubeadm/api/v1alpha4/zz_generated.conversion.go @@ -0,0 +1,515 @@ +// +build !ignore_autogenerated_kubeadm_controlplane + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha4 + +import ( + unsafe "unsafe" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + intstr "k8s.io/apimachinery/pkg/util/intstr" + apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + kubeadmapiv1alpha4 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + v1beta1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" + errors "sigs.k8s.io/cluster-api/errors" +) + +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((*KubeadmControlPlane)(nil), (*v1beta1.KubeadmControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(a.(*KubeadmControlPlane), b.(*v1beta1.KubeadmControlPlane), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlane)(nil), (*KubeadmControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(a.(*v1beta1.KubeadmControlPlane), b.(*KubeadmControlPlane), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneList)(nil), (*v1beta1.KubeadmControlPlaneList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList(a.(*KubeadmControlPlaneList), b.(*v1beta1.KubeadmControlPlaneList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlaneList)(nil), (*KubeadmControlPlaneList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList(a.(*v1beta1.KubeadmControlPlaneList), b.(*KubeadmControlPlaneList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneMachineTemplate)(nil), (*v1beta1.KubeadmControlPlaneMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmControlPlaneMachineTemplate_To_v1beta1_KubeadmControlPlaneMachineTemplate(a.(*KubeadmControlPlaneMachineTemplate), b.(*v1beta1.KubeadmControlPlaneMachineTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlaneMachineTemplate)(nil), (*KubeadmControlPlaneMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneMachineTemplate_To_v1alpha4_KubeadmControlPlaneMachineTemplate(a.(*v1beta1.KubeadmControlPlaneMachineTemplate), b.(*KubeadmControlPlaneMachineTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneSpec)(nil), (*v1beta1.KubeadmControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(a.(*KubeadmControlPlaneSpec), b.(*v1beta1.KubeadmControlPlaneSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlaneSpec)(nil), (*KubeadmControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(a.(*v1beta1.KubeadmControlPlaneSpec), b.(*KubeadmControlPlaneSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneStatus)(nil), (*v1beta1.KubeadmControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(a.(*KubeadmControlPlaneStatus), b.(*v1beta1.KubeadmControlPlaneStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlaneStatus)(nil), (*KubeadmControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(a.(*v1beta1.KubeadmControlPlaneStatus), b.(*KubeadmControlPlaneStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneTemplate)(nil), (*v1beta1.KubeadmControlPlaneTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmControlPlaneTemplate_To_v1beta1_KubeadmControlPlaneTemplate(a.(*KubeadmControlPlaneTemplate), b.(*v1beta1.KubeadmControlPlaneTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlaneTemplate)(nil), (*KubeadmControlPlaneTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneTemplate_To_v1alpha4_KubeadmControlPlaneTemplate(a.(*v1beta1.KubeadmControlPlaneTemplate), b.(*KubeadmControlPlaneTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneTemplateList)(nil), (*v1beta1.KubeadmControlPlaneTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmControlPlaneTemplateList_To_v1beta1_KubeadmControlPlaneTemplateList(a.(*KubeadmControlPlaneTemplateList), b.(*v1beta1.KubeadmControlPlaneTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlaneTemplateList)(nil), (*KubeadmControlPlaneTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneTemplateList_To_v1alpha4_KubeadmControlPlaneTemplateList(a.(*v1beta1.KubeadmControlPlaneTemplateList), b.(*KubeadmControlPlaneTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneTemplateResource)(nil), (*v1beta1.KubeadmControlPlaneTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmControlPlaneTemplateResource_To_v1beta1_KubeadmControlPlaneTemplateResource(a.(*KubeadmControlPlaneTemplateResource), b.(*v1beta1.KubeadmControlPlaneTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlaneTemplateResource)(nil), (*KubeadmControlPlaneTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(a.(*v1beta1.KubeadmControlPlaneTemplateResource), b.(*KubeadmControlPlaneTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*KubeadmControlPlaneTemplateSpec)(nil), (*v1beta1.KubeadmControlPlaneTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmControlPlaneTemplateSpec_To_v1beta1_KubeadmControlPlaneTemplateSpec(a.(*KubeadmControlPlaneTemplateSpec), b.(*v1beta1.KubeadmControlPlaneTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeadmControlPlaneTemplateSpec)(nil), (*KubeadmControlPlaneTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmControlPlaneTemplateSpec_To_v1alpha4_KubeadmControlPlaneTemplateSpec(a.(*v1beta1.KubeadmControlPlaneTemplateSpec), b.(*KubeadmControlPlaneTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RollingUpdate)(nil), (*v1beta1.RollingUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_RollingUpdate_To_v1beta1_RollingUpdate(a.(*RollingUpdate), b.(*v1beta1.RollingUpdate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.RollingUpdate)(nil), (*RollingUpdate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RollingUpdate_To_v1alpha4_RollingUpdate(a.(*v1beta1.RollingUpdate), b.(*RollingUpdate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*RolloutStrategy)(nil), (*v1beta1.RolloutStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_RolloutStrategy_To_v1beta1_RolloutStrategy(a.(*RolloutStrategy), b.(*v1beta1.RolloutStrategy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.RolloutStrategy)(nil), (*RolloutStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RolloutStrategy_To_v1alpha4_RolloutStrategy(a.(*v1beta1.RolloutStrategy), b.(*RolloutStrategy), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha4_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(in *KubeadmControlPlane, out *v1beta1.KubeadmControlPlane, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(in *KubeadmControlPlane, out *v1beta1.KubeadmControlPlane, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(in, out, s) +} + +func autoConvert_v1beta1_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(in *v1beta1.KubeadmControlPlane, out *KubeadmControlPlane, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(in *v1beta1.KubeadmControlPlane, out *KubeadmControlPlane, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList(in *KubeadmControlPlaneList, out *v1beta1.KubeadmControlPlaneList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta1.KubeadmControlPlane, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_KubeadmControlPlane_To_v1beta1_KubeadmControlPlane(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList(in *KubeadmControlPlaneList, out *v1beta1.KubeadmControlPlaneList, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmControlPlaneList_To_v1beta1_KubeadmControlPlaneList(in, out, s) +} + +func autoConvert_v1beta1_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList(in *v1beta1.KubeadmControlPlaneList, out *KubeadmControlPlaneList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KubeadmControlPlane, len(*in)) + for i := range *in { + if err := Convert_v1beta1_KubeadmControlPlane_To_v1alpha4_KubeadmControlPlane(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList(in *v1beta1.KubeadmControlPlaneList, out *KubeadmControlPlaneList, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlaneList_To_v1alpha4_KubeadmControlPlaneList(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmControlPlaneMachineTemplate_To_v1beta1_KubeadmControlPlaneMachineTemplate(in *KubeadmControlPlaneMachineTemplate, out *v1beta1.KubeadmControlPlaneMachineTemplate, s conversion.Scope) error { + if err := apiv1alpha4.Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + out.InfrastructureRef = in.InfrastructureRef + out.NodeDrainTimeout = (*v1.Duration)(unsafe.Pointer(in.NodeDrainTimeout)) + return nil +} + +// Convert_v1alpha4_KubeadmControlPlaneMachineTemplate_To_v1beta1_KubeadmControlPlaneMachineTemplate is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmControlPlaneMachineTemplate_To_v1beta1_KubeadmControlPlaneMachineTemplate(in *KubeadmControlPlaneMachineTemplate, out *v1beta1.KubeadmControlPlaneMachineTemplate, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmControlPlaneMachineTemplate_To_v1beta1_KubeadmControlPlaneMachineTemplate(in, out, s) +} + +func autoConvert_v1beta1_KubeadmControlPlaneMachineTemplate_To_v1alpha4_KubeadmControlPlaneMachineTemplate(in *v1beta1.KubeadmControlPlaneMachineTemplate, out *KubeadmControlPlaneMachineTemplate, s conversion.Scope) error { + if err := apiv1alpha4.Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { + return err + } + out.InfrastructureRef = in.InfrastructureRef + out.NodeDrainTimeout = (*v1.Duration)(unsafe.Pointer(in.NodeDrainTimeout)) + return nil +} + +// Convert_v1beta1_KubeadmControlPlaneMachineTemplate_To_v1alpha4_KubeadmControlPlaneMachineTemplate is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlaneMachineTemplate_To_v1alpha4_KubeadmControlPlaneMachineTemplate(in *v1beta1.KubeadmControlPlaneMachineTemplate, out *KubeadmControlPlaneMachineTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlaneMachineTemplate_To_v1alpha4_KubeadmControlPlaneMachineTemplate(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(in *KubeadmControlPlaneSpec, out *v1beta1.KubeadmControlPlaneSpec, s conversion.Scope) error { + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + out.Version = in.Version + if err := Convert_v1alpha4_KubeadmControlPlaneMachineTemplate_To_v1beta1_KubeadmControlPlaneMachineTemplate(&in.MachineTemplate, &out.MachineTemplate, s); err != nil { + return err + } + if err := kubeadmapiv1alpha4.Convert_v1alpha4_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(&in.KubeadmConfigSpec, &out.KubeadmConfigSpec, s); err != nil { + return err + } + out.RolloutAfter = (*v1.Time)(unsafe.Pointer(in.RolloutAfter)) + out.RolloutStrategy = (*v1beta1.RolloutStrategy)(unsafe.Pointer(in.RolloutStrategy)) + return nil +} + +// Convert_v1alpha4_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(in *KubeadmControlPlaneSpec, out *v1beta1.KubeadmControlPlaneSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(in, out, s) +} + +func autoConvert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(in *v1beta1.KubeadmControlPlaneSpec, out *KubeadmControlPlaneSpec, s conversion.Scope) error { + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + out.Version = in.Version + if err := Convert_v1beta1_KubeadmControlPlaneMachineTemplate_To_v1alpha4_KubeadmControlPlaneMachineTemplate(&in.MachineTemplate, &out.MachineTemplate, s); err != nil { + return err + } + if err := kubeadmapiv1alpha4.Convert_v1beta1_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(&in.KubeadmConfigSpec, &out.KubeadmConfigSpec, s); err != nil { + return err + } + out.RolloutAfter = (*v1.Time)(unsafe.Pointer(in.RolloutAfter)) + out.RolloutStrategy = (*RolloutStrategy)(unsafe.Pointer(in.RolloutStrategy)) + return nil +} + +// Convert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(in *v1beta1.KubeadmControlPlaneSpec, out *KubeadmControlPlaneSpec, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(in *KubeadmControlPlaneStatus, out *v1beta1.KubeadmControlPlaneStatus, s conversion.Scope) error { + out.Selector = in.Selector + out.Replicas = in.Replicas + out.Version = (*string)(unsafe.Pointer(in.Version)) + out.UpdatedReplicas = in.UpdatedReplicas + out.ReadyReplicas = in.ReadyReplicas + out.UnavailableReplicas = in.UnavailableReplicas + out.Initialized = in.Initialized + out.Ready = in.Ready + out.FailureReason = errors.KubeadmControlPlaneStatusError(in.FailureReason) + out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) + out.ObservedGeneration = in.ObservedGeneration + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1beta1.Conditions, len(*in)) + for i := range *in { + if err := apiv1alpha4.Convert_v1alpha4_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +// Convert_v1alpha4_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(in *KubeadmControlPlaneStatus, out *v1beta1.KubeadmControlPlaneStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(in, out, s) +} + +func autoConvert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(in *v1beta1.KubeadmControlPlaneStatus, out *KubeadmControlPlaneStatus, s conversion.Scope) error { + out.Selector = in.Selector + out.Replicas = in.Replicas + out.Version = (*string)(unsafe.Pointer(in.Version)) + out.UpdatedReplicas = in.UpdatedReplicas + out.ReadyReplicas = in.ReadyReplicas + out.UnavailableReplicas = in.UnavailableReplicas + out.Initialized = in.Initialized + out.Ready = in.Ready + out.FailureReason = errors.KubeadmControlPlaneStatusError(in.FailureReason) + out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) + out.ObservedGeneration = in.ObservedGeneration + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1alpha4.Conditions, len(*in)) + for i := range *in { + if err := apiv1alpha4.Convert_v1beta1_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +// Convert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(in *v1beta1.KubeadmControlPlaneStatus, out *KubeadmControlPlaneStatus, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlaneStatus_To_v1alpha4_KubeadmControlPlaneStatus(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmControlPlaneTemplate_To_v1beta1_KubeadmControlPlaneTemplate(in *KubeadmControlPlaneTemplate, out *v1beta1.KubeadmControlPlaneTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_KubeadmControlPlaneTemplateSpec_To_v1beta1_KubeadmControlPlaneTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_KubeadmControlPlaneTemplate_To_v1beta1_KubeadmControlPlaneTemplate is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmControlPlaneTemplate_To_v1beta1_KubeadmControlPlaneTemplate(in *KubeadmControlPlaneTemplate, out *v1beta1.KubeadmControlPlaneTemplate, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmControlPlaneTemplate_To_v1beta1_KubeadmControlPlaneTemplate(in, out, s) +} + +func autoConvert_v1beta1_KubeadmControlPlaneTemplate_To_v1alpha4_KubeadmControlPlaneTemplate(in *v1beta1.KubeadmControlPlaneTemplate, out *KubeadmControlPlaneTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_KubeadmControlPlaneTemplateSpec_To_v1alpha4_KubeadmControlPlaneTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_KubeadmControlPlaneTemplate_To_v1alpha4_KubeadmControlPlaneTemplate is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlaneTemplate_To_v1alpha4_KubeadmControlPlaneTemplate(in *v1beta1.KubeadmControlPlaneTemplate, out *KubeadmControlPlaneTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlaneTemplate_To_v1alpha4_KubeadmControlPlaneTemplate(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmControlPlaneTemplateList_To_v1beta1_KubeadmControlPlaneTemplateList(in *KubeadmControlPlaneTemplateList, out *v1beta1.KubeadmControlPlaneTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta1.KubeadmControlPlaneTemplate, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_KubeadmControlPlaneTemplate_To_v1beta1_KubeadmControlPlaneTemplate(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_KubeadmControlPlaneTemplateList_To_v1beta1_KubeadmControlPlaneTemplateList is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmControlPlaneTemplateList_To_v1beta1_KubeadmControlPlaneTemplateList(in *KubeadmControlPlaneTemplateList, out *v1beta1.KubeadmControlPlaneTemplateList, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmControlPlaneTemplateList_To_v1beta1_KubeadmControlPlaneTemplateList(in, out, s) +} + +func autoConvert_v1beta1_KubeadmControlPlaneTemplateList_To_v1alpha4_KubeadmControlPlaneTemplateList(in *v1beta1.KubeadmControlPlaneTemplateList, out *KubeadmControlPlaneTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KubeadmControlPlaneTemplate, len(*in)) + for i := range *in { + if err := Convert_v1beta1_KubeadmControlPlaneTemplate_To_v1alpha4_KubeadmControlPlaneTemplate(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_KubeadmControlPlaneTemplateList_To_v1alpha4_KubeadmControlPlaneTemplateList is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlaneTemplateList_To_v1alpha4_KubeadmControlPlaneTemplateList(in *v1beta1.KubeadmControlPlaneTemplateList, out *KubeadmControlPlaneTemplateList, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlaneTemplateList_To_v1alpha4_KubeadmControlPlaneTemplateList(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmControlPlaneTemplateResource_To_v1beta1_KubeadmControlPlaneTemplateResource(in *KubeadmControlPlaneTemplateResource, out *v1beta1.KubeadmControlPlaneTemplateResource, s conversion.Scope) error { + if err := Convert_v1alpha4_KubeadmControlPlaneSpec_To_v1beta1_KubeadmControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_KubeadmControlPlaneTemplateResource_To_v1beta1_KubeadmControlPlaneTemplateResource is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmControlPlaneTemplateResource_To_v1beta1_KubeadmControlPlaneTemplateResource(in *KubeadmControlPlaneTemplateResource, out *v1beta1.KubeadmControlPlaneTemplateResource, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmControlPlaneTemplateResource_To_v1beta1_KubeadmControlPlaneTemplateResource(in, out, s) +} + +func autoConvert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(in *v1beta1.KubeadmControlPlaneTemplateResource, out *KubeadmControlPlaneTemplateResource, s conversion.Scope) error { + if err := Convert_v1beta1_KubeadmControlPlaneSpec_To_v1alpha4_KubeadmControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(in *v1beta1.KubeadmControlPlaneTemplateResource, out *KubeadmControlPlaneTemplateResource, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(in, out, s) +} + +func autoConvert_v1alpha4_KubeadmControlPlaneTemplateSpec_To_v1beta1_KubeadmControlPlaneTemplateSpec(in *KubeadmControlPlaneTemplateSpec, out *v1beta1.KubeadmControlPlaneTemplateSpec, s conversion.Scope) error { + if err := Convert_v1alpha4_KubeadmControlPlaneTemplateResource_To_v1beta1_KubeadmControlPlaneTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_KubeadmControlPlaneTemplateSpec_To_v1beta1_KubeadmControlPlaneTemplateSpec is an autogenerated conversion function. +func Convert_v1alpha4_KubeadmControlPlaneTemplateSpec_To_v1beta1_KubeadmControlPlaneTemplateSpec(in *KubeadmControlPlaneTemplateSpec, out *v1beta1.KubeadmControlPlaneTemplateSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_KubeadmControlPlaneTemplateSpec_To_v1beta1_KubeadmControlPlaneTemplateSpec(in, out, s) +} + +func autoConvert_v1beta1_KubeadmControlPlaneTemplateSpec_To_v1alpha4_KubeadmControlPlaneTemplateSpec(in *v1beta1.KubeadmControlPlaneTemplateSpec, out *KubeadmControlPlaneTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta1_KubeadmControlPlaneTemplateResource_To_v1alpha4_KubeadmControlPlaneTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_KubeadmControlPlaneTemplateSpec_To_v1alpha4_KubeadmControlPlaneTemplateSpec is an autogenerated conversion function. +func Convert_v1beta1_KubeadmControlPlaneTemplateSpec_To_v1alpha4_KubeadmControlPlaneTemplateSpec(in *v1beta1.KubeadmControlPlaneTemplateSpec, out *KubeadmControlPlaneTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta1_KubeadmControlPlaneTemplateSpec_To_v1alpha4_KubeadmControlPlaneTemplateSpec(in, out, s) +} + +func autoConvert_v1alpha4_RollingUpdate_To_v1beta1_RollingUpdate(in *RollingUpdate, out *v1beta1.RollingUpdate, s conversion.Scope) error { + out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) + return nil +} + +// Convert_v1alpha4_RollingUpdate_To_v1beta1_RollingUpdate is an autogenerated conversion function. +func Convert_v1alpha4_RollingUpdate_To_v1beta1_RollingUpdate(in *RollingUpdate, out *v1beta1.RollingUpdate, s conversion.Scope) error { + return autoConvert_v1alpha4_RollingUpdate_To_v1beta1_RollingUpdate(in, out, s) +} + +func autoConvert_v1beta1_RollingUpdate_To_v1alpha4_RollingUpdate(in *v1beta1.RollingUpdate, out *RollingUpdate, s conversion.Scope) error { + out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) + return nil +} + +// Convert_v1beta1_RollingUpdate_To_v1alpha4_RollingUpdate is an autogenerated conversion function. +func Convert_v1beta1_RollingUpdate_To_v1alpha4_RollingUpdate(in *v1beta1.RollingUpdate, out *RollingUpdate, s conversion.Scope) error { + return autoConvert_v1beta1_RollingUpdate_To_v1alpha4_RollingUpdate(in, out, s) +} + +func autoConvert_v1alpha4_RolloutStrategy_To_v1beta1_RolloutStrategy(in *RolloutStrategy, out *v1beta1.RolloutStrategy, s conversion.Scope) error { + out.Type = v1beta1.RolloutStrategyType(in.Type) + out.RollingUpdate = (*v1beta1.RollingUpdate)(unsafe.Pointer(in.RollingUpdate)) + return nil +} + +// Convert_v1alpha4_RolloutStrategy_To_v1beta1_RolloutStrategy is an autogenerated conversion function. +func Convert_v1alpha4_RolloutStrategy_To_v1beta1_RolloutStrategy(in *RolloutStrategy, out *v1beta1.RolloutStrategy, s conversion.Scope) error { + return autoConvert_v1alpha4_RolloutStrategy_To_v1beta1_RolloutStrategy(in, out, s) +} + +func autoConvert_v1beta1_RolloutStrategy_To_v1alpha4_RolloutStrategy(in *v1beta1.RolloutStrategy, out *RolloutStrategy, s conversion.Scope) error { + out.Type = RolloutStrategyType(in.Type) + out.RollingUpdate = (*RollingUpdate)(unsafe.Pointer(in.RollingUpdate)) + return nil +} + +// Convert_v1beta1_RolloutStrategy_To_v1alpha4_RolloutStrategy is an autogenerated conversion function. +func Convert_v1beta1_RolloutStrategy_To_v1alpha4_RolloutStrategy(in *v1beta1.RolloutStrategy, out *RolloutStrategy, s conversion.Scope) error { + return autoConvert_v1beta1_RolloutStrategy_To_v1alpha4_RolloutStrategy(in, out, s) +} diff --git a/controlplane/kubeadm/api/v1beta1/condition_consts.go b/controlplane/kubeadm/api/v1beta1/condition_consts.go new file mode 100644 index 000000000000..619db4aacc76 --- /dev/null +++ b/controlplane/kubeadm/api/v1beta1/condition_consts.go @@ -0,0 +1,151 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + +// Conditions and condition Reasons for the KubeadmControlPlane object + +const ( + // MachinesReadyCondition reports an aggregate of current status of the machines controlled by the KubeadmControlPlane. + MachinesReadyCondition clusterv1.ConditionType = "MachinesReady" +) + +const ( + // CertificatesAvailableCondition documents that cluster certificates were generated as part of the + // processing of a a KubeadmControlPlane object. + CertificatesAvailableCondition clusterv1.ConditionType = "CertificatesAvailable" + + // CertificatesGenerationFailedReason (Severity=Warning) documents a KubeadmControlPlane controller detecting + // an error while generating certificates; those kind of errors are usually temporary and the controller + // automatically recover from them. + CertificatesGenerationFailedReason = "CertificatesGenerationFailed" +) + +const ( + // AvailableCondition documents that the first control plane instance has completed the kubeadm init operation + // and so the control plane is available and an API server instance is ready for processing requests. + AvailableCondition clusterv1.ConditionType = "Available" + + // WaitingForKubeadmInitReason (Severity=Info) documents a KubeadmControlPlane object waiting for the first + // control plane instance to complete the kubeadm init operation. + WaitingForKubeadmInitReason = "WaitingForKubeadmInit" +) + +const ( + // MachinesSpecUpToDateCondition documents that the spec of the machines controlled by the KubeadmControlPlane + // is up to date. Whe this condition is false, the KubeadmControlPlane is executing a rolling upgrade. + MachinesSpecUpToDateCondition clusterv1.ConditionType = "MachinesSpecUpToDate" + + // RollingUpdateInProgressReason (Severity=Warning) documents a KubeadmControlPlane object executing a + // rolling upgrade for aligning the machines spec to the desired state. + RollingUpdateInProgressReason = "RollingUpdateInProgress" +) + +const ( + // ResizedCondition documents a KubeadmControlPlane that is resizing the set of controlled machines. + ResizedCondition clusterv1.ConditionType = "Resized" + + // ScalingUpReason (Severity=Info) documents a KubeadmControlPlane that is increasing the number of replicas. + ScalingUpReason = "ScalingUp" + + // ScalingDownReason (Severity=Info) documents a KubeadmControlPlane that is decreasing the number of replicas. + ScalingDownReason = "ScalingDown" +) + +const ( + // ControlPlaneComponentsHealthyCondition reports the overall status of control plane components + // implemented as static pods generated by kubeadm including kube-api-server, kube-controller manager, + // kube-scheduler and etcd if managed. + ControlPlaneComponentsHealthyCondition clusterv1.ConditionType = "ControlPlaneComponentsHealthy" + + // ControlPlaneComponentsUnhealthyReason (Severity=Error) documents a control plane component not healthy. + ControlPlaneComponentsUnhealthyReason = "ControlPlaneComponentsUnhealthy" + + // ControlPlaneComponentsUnknownReason reports a control plane component in unknown status. + ControlPlaneComponentsUnknownReason = "ControlPlaneComponentsUnknown" + + // ControlPlaneComponentsInspectionFailedReason documents a failure in inspecting the control plane component status. + ControlPlaneComponentsInspectionFailedReason = "ControlPlaneComponentsInspectionFailed" + + // MachineAPIServerPodHealthyCondition reports a machine's kube-apiserver's operational status. + MachineAPIServerPodHealthyCondition clusterv1.ConditionType = "APIServerPodHealthy" + + // MachineControllerManagerPodHealthyCondition reports a machine's kube-controller-manager's health status. + MachineControllerManagerPodHealthyCondition clusterv1.ConditionType = "ControllerManagerPodHealthy" + + // MachineSchedulerPodHealthyCondition reports a machine's kube-scheduler's operational status. + MachineSchedulerPodHealthyCondition clusterv1.ConditionType = "SchedulerPodHealthy" + + // MachineEtcdPodHealthyCondition reports a machine's etcd pod's operational status. + // NOTE: This conditions exists only if a stacked etcd cluster is used. + MachineEtcdPodHealthyCondition clusterv1.ConditionType = "EtcdPodHealthy" + + // PodProvisioningReason (Severity=Info) documents a pod waiting to be provisioned i.e., Pod is in "Pending" phase. + PodProvisioningReason = "PodProvisioning" + + // PodMissingReason (Severity=Error) documents a pod does not exist. + PodMissingReason = "PodMissing" + + // PodFailedReason (Severity=Error) documents if a pod failed during provisioning i.e., e.g CrashLoopbackOff, ImagePullBackOff + // or if all the containers in a pod have terminated. + PodFailedReason = "PodFailed" + + // PodInspectionFailedReason documents a failure in inspecting the pod status. + PodInspectionFailedReason = "PodInspectionFailed" +) + +const ( + // EtcdClusterHealthyCondition documents the overall etcd cluster's health. + EtcdClusterHealthyCondition clusterv1.ConditionType = "EtcdClusterHealthyCondition" + + // EtcdClusterInspectionFailedReason documents a failure in inspecting the etcd cluster status. + EtcdClusterInspectionFailedReason = "EtcdClusterInspectionFailed" + + // EtcdClusterUnknownReason reports an etcd cluster in unknown status. + EtcdClusterUnknownReason = "EtcdClusterUnknown" + + // EtcdClusterUnhealthyReason (Severity=Error) is set when the etcd cluster is unhealthy. + EtcdClusterUnhealthyReason = "EtcdClusterUnhealthy" + + // MachineEtcdMemberHealthyCondition report the machine's etcd member's health status. + // NOTE: This conditions exists only if a stacked etcd cluster is used. + MachineEtcdMemberHealthyCondition clusterv1.ConditionType = "EtcdMemberHealthy" + + // EtcdMemberInspectionFailedReason documents a failure in inspecting the etcd member status. + EtcdMemberInspectionFailedReason = "MemberInspectionFailed" + + // EtcdMemberUnhealthyReason (Severity=Error) documents a Machine's etcd member is unhealthy. + EtcdMemberUnhealthyReason = "EtcdMemberUnhealthy" + + // MachinesCreatedCondition documents that the machines controlled by the KubeadmControlPlane are created. + // When this condition is false, it indicates that there was an error when cloning the infrastructure/bootstrap template or + // when generating the machine object. + MachinesCreatedCondition clusterv1.ConditionType = "MachinesCreated" + + // InfrastructureTemplateCloningFailedReason (Severity=Error) documents a KubeadmControlPlane failing to + // clone the infrastructure template. + InfrastructureTemplateCloningFailedReason = "InfrastructureTemplateCloningFailed" + + // BootstrapTemplateCloningFailedReason (Severity=Error) documents a KubeadmControlPlane failing to + // clone the bootstrap template. + BootstrapTemplateCloningFailedReason = "BootstrapTemplateCloningFailed" + + // MachineGenerationFailedReason (Severity=Error) documents a KubeadmControlPlane failing to + // generate a machine object. + MachineGenerationFailedReason = "MachineGenerationFailed" +) diff --git a/controlplane/kubeadm/api/v1beta1/conversion.go b/controlplane/kubeadm/api/v1beta1/conversion.go new file mode 100644 index 000000000000..034be99b97bb --- /dev/null +++ b/controlplane/kubeadm/api/v1beta1/conversion.go @@ -0,0 +1,20 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 + +func (*KubeadmControlPlane) Hub() {} +func (*KubeadmControlPlaneList) Hub() {} diff --git a/controlplane/kubeadm/api/v1beta1/doc.go b/controlplane/kubeadm/api/v1beta1/doc.go new file mode 100644 index 000000000000..f8a9210a0fda --- /dev/null +++ b/controlplane/kubeadm/api/v1beta1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 diff --git a/controlplane/kubeadm/api/v1beta1/groupversion_info.go b/controlplane/kubeadm/api/v1beta1/groupversion_info.go new file mode 100644 index 000000000000..92a9d4473cd9 --- /dev/null +++ b/controlplane/kubeadm/api/v1beta1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 contains API Schema definitions for the kubeadm v1beta1 API group +// +kubebuilder:object:generate=true +// +groupName=controlplane.cluster.x-k8s.io +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects. + GroupVersion = schema.GroupVersion{Group: "controlplane.cluster.x-k8s.io", Version: "v1beta1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go new file mode 100644 index 000000000000..f85d2886ee41 --- /dev/null +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go @@ -0,0 +1,243 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + "k8s.io/apimachinery/pkg/util/intstr" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + cabpkv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + "sigs.k8s.io/cluster-api/errors" +) + +// RolloutStrategyType defines the rollout strategies for a KubeadmControlPlane. +type RolloutStrategyType string + +const ( + // RollingUpdateStrategyType replaces the old control planes by new one using rolling update + // i.e. gradually scale up or down the old control planes and scale up or down the new one. + RollingUpdateStrategyType RolloutStrategyType = "RollingUpdate" +) + +const ( + // KubeadmControlPlaneFinalizer is the finalizer applied to KubeadmControlPlane resources + // by its managing controller. + KubeadmControlPlaneFinalizer = "kubeadm.controlplane.cluster.x-k8s.io" + + // SkipCoreDNSAnnotation annotation explicitly skips reconciling CoreDNS if set. + SkipCoreDNSAnnotation = "controlplane.cluster.x-k8s.io/skip-coredns" + + // SkipKubeProxyAnnotation annotation explicitly skips reconciling kube-proxy if set. + SkipKubeProxyAnnotation = "controlplane.cluster.x-k8s.io/skip-kube-proxy" + + // KubeadmClusterConfigurationAnnotation is a machine annotation that stores the json-marshalled string of KCP ClusterConfiguration. + // This annotation is used to detect any changes in ClusterConfiguration and trigger machine rollout in KCP. + KubeadmClusterConfigurationAnnotation = "controlplane.cluster.x-k8s.io/kubeadm-cluster-configuration" +) + +// KubeadmControlPlaneSpec defines the desired state of KubeadmControlPlane. +type KubeadmControlPlaneSpec struct { + // Number of desired machines. Defaults to 1. When stacked etcd is used only + // odd numbers are permitted, as per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members). + // This is a pointer to distinguish between explicit zero and not specified. + // +optional + Replicas *int32 `json:"replicas,omitempty"` + + // Version defines the desired Kubernetes version. + Version string `json:"version"` + + // MachineTemplate contains information about how machines + // should be shaped when creating or updating a control plane. + MachineTemplate KubeadmControlPlaneMachineTemplate `json:"machineTemplate"` + + // KubeadmConfigSpec is a KubeadmConfigSpec + // to use for initializing and joining machines to the control plane. + KubeadmConfigSpec cabpkv1.KubeadmConfigSpec `json:"kubeadmConfigSpec"` + + // RolloutAfter is a field to indicate a rollout should be performed + // after the specified time even if no changes have been made to the + // KubeadmControlPlane. + // + // +optional + RolloutAfter *metav1.Time `json:"rolloutAfter,omitempty"` + + // The RolloutStrategy to use to replace control plane machines with + // new ones. + // +optional + // +kubebuilder:default={type: "RollingUpdate", rollingUpdate: {maxSurge: 1}} + RolloutStrategy *RolloutStrategy `json:"rolloutStrategy,omitempty"` +} + +// KubeadmControlPlaneMachineTemplate defines the template for Machines +// in a KubeadmControlPlane object. +type KubeadmControlPlaneMachineTemplate struct { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` + + // InfrastructureRef is a required reference to a custom resource + // offered by an infrastructure provider. + InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"` + + // NodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node + // The default value is 0, meaning that the node can be drained without any time limitations. + // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` + // +optional + NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` +} + +// RolloutStrategy describes how to replace existing machines +// with new ones. +type RolloutStrategy struct { + // Type of rollout. Currently the only supported strategy is + // "RollingUpdate". + // Default is RollingUpdate. + // +optional + Type RolloutStrategyType `json:"type,omitempty"` + + // Rolling update config params. Present only if + // RolloutStrategyType = RollingUpdate. + // +optional + RollingUpdate *RollingUpdate `json:"rollingUpdate,omitempty"` +} + +// RollingUpdate is used to control the desired behavior of rolling update. +type RollingUpdate struct { + // The maximum number of control planes that can be scheduled above or under the + // desired number of control planes. + // Value can be an absolute number 1 or 0. + // Defaults to 1. + // Example: when this is set to 1, the control plane can be scaled + // up immediately when the rolling update starts. + // +optional + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` +} + +// KubeadmControlPlaneStatus defines the observed state of KubeadmControlPlane. +type KubeadmControlPlaneStatus struct { + // Selector is the label selector in string format to avoid introspection + // by clients, and is used to provide the CRD-based integration for the + // scale subresource and additional integrations for things like kubectl + // describe.. The string will be in the same format as the query-param syntax. + // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector string `json:"selector,omitempty"` + + // Total number of non-terminated machines targeted by this control plane + // (their labels match the selector). + // +optional + Replicas int32 `json:"replicas,omitempty"` + + // Version represents the minimum Kubernetes version for the control plane machines + // in the cluster. + // +optional + Version *string `json:"version,omitempty"` + + // Total number of non-terminated machines targeted by this control plane + // that have the desired template spec. + // +optional + UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` + + // Total number of fully running and ready control plane machines. + // +optional + ReadyReplicas int32 `json:"readyReplicas,omitempty"` + + // Total number of unavailable machines targeted by this control plane. + // This is the total number of machines that are still required for + // the deployment to have 100% available capacity. They may either + // be machines that are running but not yet ready or machines + // that still have not been created. + // +optional + UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` + + // Initialized denotes whether or not the control plane has the + // uploaded kubeadm-config configmap. + // +optional + Initialized bool `json:"initialized"` + + // Ready denotes that the KubeadmControlPlane API Server is ready to + // receive requests. + // +optional + Ready bool `json:"ready"` + + // FailureReason indicates that there is a terminal problem reconciling the + // state, and will be set to a token value suitable for + // programmatic interpretation. + // +optional + FailureReason errors.KubeadmControlPlaneStatusError `json:"failureReason,omitempty"` + + // ErrorMessage indicates that there is a terminal problem reconciling the + // state, and will be set to a descriptive error message. + // +optional + FailureMessage *string `json:"failureMessage,omitempty"` + + // ObservedGeneration is the latest generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // Conditions defines current service state of the KubeadmControlPlane. + // +optional + Conditions clusterv1.Conditions `json:"conditions,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=kubeadmcontrolplanes,shortName=kcp,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmControlPlane" +// +kubebuilder:printcolumn:name="Initialized",type=boolean,JSONPath=".status.initialized",description="This denotes whether or not the control plane has the uploaded kubeadm-config configmap" +// +kubebuilder:printcolumn:name="API Server Available",type=boolean,JSONPath=".status.ready",description="KubeadmControlPlane API Server is ready to receive requests" +// +kubebuilder:printcolumn:name="Version",type=string,JSONPath=".spec.version",description="Kubernetes version associated with this control plane" +// +kubebuilder:printcolumn:name="Replicas",type=integer,JSONPath=".status.replicas",description="Total number of non-terminated machines targeted by this control plane" +// +kubebuilder:printcolumn:name="Ready",type=integer,JSONPath=".status.readyReplicas",description="Total number of fully running and ready control plane machines" +// +kubebuilder:printcolumn:name="Updated",type=integer,JSONPath=".status.updatedReplicas",description="Total number of non-terminated machines targeted by this control plane that have the desired template spec" +// +kubebuilder:printcolumn:name="Unavailable",type=integer,JSONPath=".status.unavailableReplicas",description="Total number of unavailable machines targeted by this control plane" + +// KubeadmControlPlane is the Schema for the KubeadmControlPlane API. +type KubeadmControlPlane struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec KubeadmControlPlaneSpec `json:"spec,omitempty"` + Status KubeadmControlPlaneStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (in *KubeadmControlPlane) GetConditions() clusterv1.Conditions { + return in.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (in *KubeadmControlPlane) SetConditions(conditions clusterv1.Conditions) { + in.Status.Conditions = conditions +} + +// +kubebuilder:object:root=true + +// KubeadmControlPlaneList contains a list of KubeadmControlPlane. +type KubeadmControlPlaneList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []KubeadmControlPlane `json:"items"` +} + +func init() { + SchemeBuilder.Register(&KubeadmControlPlane{}, &KubeadmControlPlaneList{}) +} diff --git a/controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_webhook.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go similarity index 96% rename from controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_webhook.go rename to controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go index 50108e4513a5..cc037a122870 100644 --- a/controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_webhook.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "encoding/json" @@ -41,8 +41,8 @@ func (in *KubeadmControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/mutate-controlplane-cluster-x-k8s-io-v1alpha4-kubeadmcontrolplane,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanes,versions=v1alpha4,name=default.kubeadmcontrolplane.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:webhook:verbs=create;update,path=/validate-controlplane-cluster-x-k8s-io-v1alpha4-kubeadmcontrolplane,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanes;kubeadmcontrolplanes/scale,versions=v1alpha4,name=validation.kubeadmcontrolplane.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-controlplane-cluster-x-k8s-io-v1beta1-kubeadmcontrolplane,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanes,versions=v1beta1,name=default.kubeadmcontrolplane.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-controlplane-cluster-x-k8s-io-v1beta1-kubeadmcontrolplane,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanes;kubeadmcontrolplanes/scale,versions=v1beta1,name=validation.kubeadmcontrolplane.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &KubeadmControlPlane{} var _ webhook.Validator = &KubeadmControlPlane{} diff --git a/controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_webhook_test.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook_test.go similarity index 99% rename from controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_webhook_test.go rename to controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook_test.go index bc22cdb193e8..933c0e9aabe9 100644 --- a/controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_webhook_test.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/utils/pointer" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" utildefaulting "sigs.k8s.io/cluster-api/util/defaulting" ) diff --git a/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go new file mode 100644 index 000000000000..0edee1737b50 --- /dev/null +++ b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go @@ -0,0 +1,57 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" +) + +// KubeadmControlPlaneTemplateSpec defines the desired state of KubeadmControlPlaneTemplate. +type KubeadmControlPlaneTemplateSpec struct { + Template KubeadmControlPlaneTemplateResource `json:"template"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=kubeadmcontrolplanetemplates,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmControlPlaneTemplate" + +// KubeadmControlPlaneTemplate is the Schema for the kubeadmcontrolplanetemplates API. +type KubeadmControlPlaneTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec KubeadmControlPlaneTemplateSpec `json:"spec,omitempty"` +} + +// +kubebuilder:object:root=true + +// KubeadmControlPlaneTemplateList contains a list of KubeadmControlPlaneTemplate. +type KubeadmControlPlaneTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []KubeadmControlPlaneTemplate `json:"items"` +} + +func init() { + SchemeBuilder.Register(&KubeadmControlPlaneTemplate{}, &KubeadmControlPlaneTemplateList{}) +} + +// KubeadmControlPlaneTemplateResource describes the data needed to create a KubeadmControlPlane from a template. +type KubeadmControlPlaneTemplateResource struct { + Spec KubeadmControlPlaneSpec `json:"spec"` +} diff --git a/controlplane/kubeadm/api/v1alpha4/kubeadmcontrolplanetemplate_webhook.go b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_webhook.go similarity index 84% rename from controlplane/kubeadm/api/v1alpha4/kubeadmcontrolplanetemplate_webhook.go rename to controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_webhook.go index 70f77406fe1e..5fde661a7048 100644 --- a/controlplane/kubeadm/api/v1alpha4/kubeadmcontrolplanetemplate_webhook.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -36,7 +36,7 @@ func (r *KubeadmControlPlaneTemplate) SetupWebhookWithManager(mgr ctrl.Manager) Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/mutate-controlplane-cluster-x-k8s-io-v1alpha4-kubeadmcontrolplanetemplate,mutating=true,failurePolicy=fail,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanetemplates,versions=v1alpha4,name=default.kubeadmcontrolplanetemplate.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-controlplane-cluster-x-k8s-io-v1beta1-kubeadmcontrolplanetemplate,mutating=true,failurePolicy=fail,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanetemplates,versions=v1beta1,name=default.kubeadmcontrolplanetemplate.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &KubeadmControlPlaneTemplate{} @@ -45,7 +45,7 @@ func (r *KubeadmControlPlaneTemplate) Default() { defaultKubeadmControlPlaneSpec(&r.Spec.Template.Spec, r.Namespace) } -// +kubebuilder:webhook:verbs=create;update,path=/validate-controlplane-cluster-x-k8s-io-v1alpha4-kubeadmcontrolplanetemplate,mutating=false,failurePolicy=fail,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanetemplates,versions=v1alpha4,name=validation.kubeadmcontrolplanetemplate.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-controlplane-cluster-x-k8s-io-v1beta1-kubeadmcontrolplanetemplate,mutating=false,failurePolicy=fail,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanetemplates,versions=v1beta1,name=validation.kubeadmcontrolplanetemplate.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Validator = &KubeadmControlPlaneTemplate{} diff --git a/controlplane/kubeadm/api/v1alpha4/kubeadmcontrolplanetemplate_webhook_test.go b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_webhook_test.go similarity index 99% rename from controlplane/kubeadm/api/v1alpha4/kubeadmcontrolplanetemplate_webhook_test.go rename to controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_webhook_test.go index 72acb9da271a..f717b26c775c 100644 --- a/controlplane/kubeadm/api/v1alpha4/kubeadmcontrolplanetemplate_webhook_test.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_webhook_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go b/controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000000..707e975b52ef --- /dev/null +++ b/controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,302 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeadmControlPlane) DeepCopyInto(out *KubeadmControlPlane) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmControlPlane. +func (in *KubeadmControlPlane) DeepCopy() *KubeadmControlPlane { + if in == nil { + return nil + } + out := new(KubeadmControlPlane) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeadmControlPlane) 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 *KubeadmControlPlaneList) DeepCopyInto(out *KubeadmControlPlaneList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KubeadmControlPlane, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmControlPlaneList. +func (in *KubeadmControlPlaneList) DeepCopy() *KubeadmControlPlaneList { + if in == nil { + return nil + } + out := new(KubeadmControlPlaneList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeadmControlPlaneList) 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 *KubeadmControlPlaneMachineTemplate) DeepCopyInto(out *KubeadmControlPlaneMachineTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.InfrastructureRef = in.InfrastructureRef + if in.NodeDrainTimeout != nil { + in, out := &in.NodeDrainTimeout, &out.NodeDrainTimeout + *out = new(v1.Duration) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmControlPlaneMachineTemplate. +func (in *KubeadmControlPlaneMachineTemplate) DeepCopy() *KubeadmControlPlaneMachineTemplate { + if in == nil { + return nil + } + out := new(KubeadmControlPlaneMachineTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeadmControlPlaneSpec) DeepCopyInto(out *KubeadmControlPlaneSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.MachineTemplate.DeepCopyInto(&out.MachineTemplate) + in.KubeadmConfigSpec.DeepCopyInto(&out.KubeadmConfigSpec) + if in.RolloutAfter != nil { + in, out := &in.RolloutAfter, &out.RolloutAfter + *out = (*in).DeepCopy() + } + if in.RolloutStrategy != nil { + in, out := &in.RolloutStrategy, &out.RolloutStrategy + *out = new(RolloutStrategy) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmControlPlaneSpec. +func (in *KubeadmControlPlaneSpec) DeepCopy() *KubeadmControlPlaneSpec { + if in == nil { + return nil + } + out := new(KubeadmControlPlaneSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeadmControlPlaneStatus) DeepCopyInto(out *KubeadmControlPlaneStatus) { + *out = *in + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } + if in.FailureMessage != nil { + in, out := &in.FailureMessage, &out.FailureMessage + *out = new(string) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1beta1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmControlPlaneStatus. +func (in *KubeadmControlPlaneStatus) DeepCopy() *KubeadmControlPlaneStatus { + if in == nil { + return nil + } + out := new(KubeadmControlPlaneStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeadmControlPlaneTemplate) DeepCopyInto(out *KubeadmControlPlaneTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmControlPlaneTemplate. +func (in *KubeadmControlPlaneTemplate) DeepCopy() *KubeadmControlPlaneTemplate { + if in == nil { + return nil + } + out := new(KubeadmControlPlaneTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeadmControlPlaneTemplate) 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 *KubeadmControlPlaneTemplateList) DeepCopyInto(out *KubeadmControlPlaneTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KubeadmControlPlaneTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmControlPlaneTemplateList. +func (in *KubeadmControlPlaneTemplateList) DeepCopy() *KubeadmControlPlaneTemplateList { + if in == nil { + return nil + } + out := new(KubeadmControlPlaneTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeadmControlPlaneTemplateList) 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 *KubeadmControlPlaneTemplateResource) DeepCopyInto(out *KubeadmControlPlaneTemplateResource) { + *out = *in + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmControlPlaneTemplateResource. +func (in *KubeadmControlPlaneTemplateResource) DeepCopy() *KubeadmControlPlaneTemplateResource { + if in == nil { + return nil + } + out := new(KubeadmControlPlaneTemplateResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeadmControlPlaneTemplateSpec) DeepCopyInto(out *KubeadmControlPlaneTemplateSpec) { + *out = *in + in.Template.DeepCopyInto(&out.Template) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeadmControlPlaneTemplateSpec. +func (in *KubeadmControlPlaneTemplateSpec) DeepCopy() *KubeadmControlPlaneTemplateSpec { + if in == nil { + return nil + } + out := new(KubeadmControlPlaneTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RollingUpdate) DeepCopyInto(out *RollingUpdate) { + *out = *in + if in.MaxSurge != nil { + in, out := &in.MaxSurge, &out.MaxSurge + *out = new(intstr.IntOrString) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdate. +func (in *RollingUpdate) DeepCopy() *RollingUpdate { + if in == nil { + return nil + } + out := new(RollingUpdate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RolloutStrategy) DeepCopyInto(out *RolloutStrategy) { + *out = *in + if in.RollingUpdate != nil { + in, out := &in.RollingUpdate, &out.RollingUpdate + *out = new(RollingUpdate) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutStrategy. +func (in *RolloutStrategy) DeepCopy() *RolloutStrategy { + if in == nil { + return nil + } + out := new(RolloutStrategy) + in.DeepCopyInto(out) + return out +} diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml index 8abb3ecd9cfd..93fb9459565b 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml @@ -2395,6 +2395,1216 @@ spec: type: object type: object served: true + storage: false + subresources: + scale: + labelSelectorPath: .status.selector + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} + - additionalPrinterColumns: + - description: Time duration since creation of KubeadmControlPlane + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: This denotes whether or not the control plane has the uploaded + kubeadm-config configmap + jsonPath: .status.initialized + name: Initialized + type: boolean + - description: KubeadmControlPlane API Server is ready to receive requests + jsonPath: .status.ready + name: API Server Available + type: boolean + - description: Kubernetes version associated with this control plane + jsonPath: .spec.version + name: Version + type: string + - description: Total number of non-terminated machines targeted by this control + plane + jsonPath: .status.replicas + name: Replicas + type: integer + - description: Total number of fully running and ready control plane machines + jsonPath: .status.readyReplicas + name: Ready + type: integer + - description: Total number of non-terminated machines targeted by this control + plane that have the desired template spec + jsonPath: .status.updatedReplicas + name: Updated + type: integer + - description: Total number of unavailable machines targeted by this control plane + jsonPath: .status.unavailableReplicas + name: Unavailable + type: integer + name: v1beta1 + schema: + openAPIV3Schema: + description: KubeadmControlPlane is the Schema for the KubeadmControlPlane + API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: KubeadmControlPlaneSpec defines the desired state of KubeadmControlPlane. + properties: + kubeadmConfigSpec: + description: KubeadmConfigSpec is a KubeadmConfigSpec to use for initializing + and joining machines to the control plane. + properties: + clusterConfiguration: + description: ClusterConfiguration along with InitConfiguration + are the configurations necessary for the init command + properties: + apiServer: + description: APIServer contains extra settings for the API + server control plane component + properties: + certSANs: + description: CertSANs sets extra Subject Alternative Names + for the API Server signing cert. + items: + type: string + type: array + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags to pass + to the control plane component. TODO: This is temporary + and ideally we would like to switch all components to + use ComponentConfig + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host volumes, + mounted to the control plane component. + items: + description: HostPathMount contains elements describing + volumes that are mounted from the host. + properties: + hostPath: + description: HostPath is the path in the host that + will be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside the pod + where hostPath will be mounted. + type: string + name: + description: Name of the volume inside the pod template. + type: string + pathType: + description: PathType is the type of the HostPath. + type: string + readOnly: + description: ReadOnly controls write access to the + volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + timeoutForControlPlane: + description: TimeoutForControlPlane controls the timeout + that we use for API server to appear + type: string + type: object + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + certificatesDir: + description: 'CertificatesDir specifies where to store or + look for all required certificates. NB: if not provided, + this will default to `/etc/kubernetes/pki`' + type: string + clusterName: + description: The cluster name + type: string + controlPlaneEndpoint: + description: 'ControlPlaneEndpoint sets a stable IP address + or DNS name for the control plane; it can be a valid IP + address or a RFC-1123 DNS subdomain, both with optional + TCP port. In case the ControlPlaneEndpoint is not specified, + the AdvertiseAddress + BindPort are used; in case the ControlPlaneEndpoint + is specified but without a TCP port, the BindPort is used. + Possible usages are: e.g. In a cluster with more than one + control plane instances, this field should be assigned the + address of the external load balancer in front of the control + plane instances. e.g. in environments with enforced node + recycling, the ControlPlaneEndpoint could be used for assigning + a stable DNS to the control plane. NB: This value defaults + to the first value in the Cluster object status.apiEndpoints + array.' + type: string + controllerManager: + description: ControllerManager contains extra settings for + the controller manager control plane component + properties: + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags to pass + to the control plane component. TODO: This is temporary + and ideally we would like to switch all components to + use ComponentConfig + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host volumes, + mounted to the control plane component. + items: + description: HostPathMount contains elements describing + volumes that are mounted from the host. + properties: + hostPath: + description: HostPath is the path in the host that + will be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside the pod + where hostPath will be mounted. + type: string + name: + description: Name of the volume inside the pod template. + type: string + pathType: + description: PathType is the type of the HostPath. + type: string + readOnly: + description: ReadOnly controls write access to the + volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + type: object + dns: + description: DNS defines the options for the DNS add-on installed + in the cluster. + properties: + imageRepository: + description: ImageRepository sets the container registry + to pull images from. if not set, the ImageRepository + defined in ClusterConfiguration will be used instead. + type: string + imageTag: + description: ImageTag allows to specify a tag for the + image. In case this value is set, kubeadm does not change + automatically the version of the above components during + upgrades. + type: string + type: object + etcd: + description: 'Etcd holds configuration for etcd. NB: This + value defaults to a Local (stacked) etcd' + properties: + external: + description: External describes how to connect to an external + etcd cluster Local and External are mutually exclusive + properties: + caFile: + description: CAFile is an SSL Certificate Authority + file used to secure etcd communication. Required + if using a TLS connection. + type: string + certFile: + description: CertFile is an SSL certification file + used to secure etcd communication. Required if using + a TLS connection. + type: string + endpoints: + description: Endpoints of etcd members. Required for + ExternalEtcd. + items: + type: string + type: array + keyFile: + description: KeyFile is an SSL key file used to secure + etcd communication. Required if using a TLS connection. + type: string + required: + - caFile + - certFile + - endpoints + - keyFile + type: object + local: + description: Local provides configuration knobs for configuring + the local etcd instance Local and External are mutually + exclusive + properties: + dataDir: + description: DataDir is the directory etcd will place + its data. Defaults to "/var/lib/etcd". + type: string + extraArgs: + additionalProperties: + type: string + description: ExtraArgs are extra arguments provided + to the etcd binary when run inside a static pod. + type: object + imageRepository: + description: ImageRepository sets the container registry + to pull images from. if not set, the ImageRepository + defined in ClusterConfiguration will be used instead. + type: string + imageTag: + description: ImageTag allows to specify a tag for + the image. In case this value is set, kubeadm does + not change automatically the version of the above + components during upgrades. + type: string + peerCertSANs: + description: PeerCertSANs sets extra Subject Alternative + Names for the etcd peer signing cert. + items: + type: string + type: array + serverCertSANs: + description: ServerCertSANs sets extra Subject Alternative + Names for the etcd server signing cert. + items: + type: string + type: array + type: object + type: object + featureGates: + additionalProperties: + type: boolean + description: FeatureGates enabled by the user. + type: object + imageRepository: + description: ImageRepository sets the container registry to + pull images from. If empty, `k8s.gcr.io` will be used by + default; in case of kubernetes version is a CI build (kubernetes + version starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images` + will be used as a default for control plane components and + for kube-proxy, while `k8s.gcr.io` will be used for all + the other images. + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + kubernetesVersion: + description: 'KubernetesVersion is the target version of the + control plane. NB: This value defaults to the Machine object + spec.version' + type: string + networking: + description: 'Networking holds configuration for the networking + topology of the cluster. NB: This value defaults to the + Cluster object spec.clusterNetwork.' + properties: + dnsDomain: + description: DNSDomain is the dns domain used by k8s services. + Defaults to "cluster.local". + type: string + podSubnet: + description: PodSubnet is the subnet used by pods. If + unset, the API server will not allocate CIDR ranges + for every node. Defaults to a comma-delimited string + of the Cluster object's spec.clusterNetwork.services.cidrBlocks + if that is set + type: string + serviceSubnet: + description: ServiceSubnet is the subnet used by k8s services. + Defaults to a comma-delimited string of the Cluster + object's spec.clusterNetwork.pods.cidrBlocks, or to + "10.96.0.0/12" if that's unset. + type: string + type: object + scheduler: + description: Scheduler contains extra settings for the scheduler + control plane component + properties: + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags to pass + to the control plane component. TODO: This is temporary + and ideally we would like to switch all components to + use ComponentConfig + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host volumes, + mounted to the control plane component. + items: + description: HostPathMount contains elements describing + volumes that are mounted from the host. + properties: + hostPath: + description: HostPath is the path in the host that + will be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside the pod + where hostPath will be mounted. + type: string + name: + description: Name of the volume inside the pod template. + type: string + pathType: + description: PathType is the type of the HostPath. + type: string + readOnly: + description: ReadOnly controls write access to the + volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + type: object + type: object + diskSetup: + description: DiskSetup specifies options for the creation of partition + tables and file systems on devices. + properties: + filesystems: + description: Filesystems specifies the list of file systems + to setup. + items: + description: Filesystem defines the file systems to be created. + properties: + device: + description: Device specifies the device name + type: string + extraOpts: + description: ExtraOpts defined extra options to add + to the command for creating the file system. + items: + type: string + type: array + filesystem: + description: Filesystem specifies the file system type. + type: string + label: + description: Label specifies the file system label to + be used. If set to None, no label is used. + type: string + overwrite: + description: Overwrite defines whether or not to overwrite + any existing filesystem. If true, any pre-existing + file system will be destroyed. Use with Caution. + type: boolean + partition: + description: 'Partition specifies the partition to use. + The valid options are: "auto|any", "auto", "any", + "none", and , where NUM is the actual partition + number.' + type: string + replaceFS: + description: 'ReplaceFS is a special directive, used + for Microsoft Azure that instructs cloud-init to replace + a file system of . NOTE: unless you define + a label, this requires the use of the ''any'' partition + directive.' + type: string + required: + - device + - filesystem + - label + type: object + type: array + partitions: + description: Partitions specifies the list of the partitions + to setup. + items: + description: Partition defines how to create and layout + a partition. + properties: + device: + description: Device is the name of the device. + type: string + layout: + description: Layout specifies the device layout. If + it is true, a single partition will be created for + the entire device. When layout is false, it means + don't partition or ignore existing partitioning. + type: boolean + overwrite: + description: Overwrite describes whether to skip checks + and create the partition if a partition or filesystem + is found on the device. Use with caution. Default + is 'false'. + type: boolean + tableType: + description: 'TableType specifies the tupe of partition + table. The following are supported: ''mbr'': default + and setups a MS-DOS partition table ''gpt'': setups + a GPT partition table' + type: string + required: + - device + - layout + type: object + type: array + type: object + files: + description: Files specifies extra files to be passed to user_data + upon creation. + items: + description: File defines the input for generating write_files + in cloud-init. + properties: + content: + description: Content is the actual content of the file. + type: string + contentFrom: + description: ContentFrom is a referenced source of content + to populate the file. + properties: + secret: + description: Secret represents a secret that should + populate this file. + properties: + key: + description: Key is the key in the secret's data + map for this value. + type: string + name: + description: Name of the secret in the KubeadmBootstrapConfig's + namespace to use. + type: string + required: + - key + - name + type: object + required: + - secret + type: object + encoding: + description: Encoding specifies the encoding of the file + contents. + enum: + - base64 + - gzip + - gzip+base64 + type: string + owner: + description: Owner specifies the ownership of the file, + e.g. "root:root". + type: string + path: + description: Path specifies the full path on disk where + to store the file. + type: string + permissions: + description: Permissions specifies the permissions to assign + to the file, e.g. "0640". + type: string + required: + - path + type: object + type: array + format: + description: Format specifies the output format of the bootstrap + data + enum: + - cloud-config + type: string + initConfiguration: + description: InitConfiguration along with ClusterConfiguration + are the configurations necessary for the init command + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + bootstrapTokens: + description: BootstrapTokens is respected at `kubeadm init` + time and describes a set of Bootstrap Tokens to create. + This information IS NOT uploaded to the kubeadm cluster + configmap, partly because of its sensitive nature + items: + description: BootstrapToken describes one bootstrap token, + stored as a Secret in the cluster. + properties: + description: + description: Description sets a human-friendly message + why this token exists and what it's used for, so other + administrators can know its purpose. + type: string + expires: + description: Expires specifies the timestamp when this + token expires. Defaults to being set dynamically at + runtime based on the TTL. Expires and TTL are mutually + exclusive. + format: date-time + type: string + groups: + description: Groups specifies the extra groups that + this token will authenticate as when/if used for authentication + items: + type: string + type: array + token: + description: Token is used for establishing bidirectional + trust between nodes and control-planes. Used for joining + nodes in the cluster. + type: string + ttl: + description: TTL defines the time to live for this token. + Defaults to 24h. Expires and TTL are mutually exclusive. + type: string + usages: + description: Usages describes the ways in which this + token can be used. Can by default be used for establishing + bidirectional trust, but that can be changed here. + items: + type: string + type: array + required: + - token + type: object + type: array + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + localAPIEndpoint: + description: LocalAPIEndpoint represents the endpoint of the + API server instance that's deployed on this control plane + node In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint + in the sense that ControlPlaneEndpoint is the global endpoint + for the cluster, which then loadbalances the requests to + each individual API server. This configuration object lets + you customize what IP/DNS name and port the local API server + advertises it's accessible on. By default, kubeadm tries + to auto-detect the IP of the default interface and use that, + but in case that process fails you may set the desired value + here. + properties: + advertiseAddress: + description: AdvertiseAddress sets the IP address for + the API server to advertise. + type: string + bindPort: + description: BindPort sets the secure port for the API + Server to bind to. Defaults to 6443. + format: int32 + type: integer + type: object + nodeRegistration: + description: NodeRegistration holds fields that relate to + registering the new control-plane node to the cluster. When + used in the context of control plane nodes, NodeRegistration + should remain consistent across both InitConfiguration and + JoinConfiguration + properties: + criSocket: + description: CRISocket is used to retrieve container runtime + info. This information will be annotated to the Node + API object, for later re-use + type: string + ignorePreflightErrors: + description: IgnorePreflightErrors provides a slice of + pre-flight errors to be ignored when the current node + is registered. + items: + type: string + type: array + kubeletExtraArgs: + additionalProperties: + type: string + description: KubeletExtraArgs passes through extra arguments + to the kubelet. The arguments here are passed to the + kubelet command line via the environment file kubeadm + writes at runtime for the kubelet to source. This overrides + the generic base-level configuration in the kubelet-config-1.X + ConfigMap Flags have higher priority when parsing. These + values are local and specific to the node kubeadm is + executing on. + type: object + name: + description: Name is the `.Metadata.Name` field of the + Node API object that will be created in this `kubeadm + init` or `kubeadm join` operation. This field is also + used in the CommonName field of the kubelet's client + certificate to the API server. Defaults to the hostname + of the node if not provided. + type: string + taints: + description: 'Taints specifies the taints the Node API + object should be registered with. If this field is unset, + i.e. nil, in the `kubeadm init` process it will be defaulted + to []v1.Taint{''node-role.kubernetes.io/master=""''}. + If you don''t want to taint your control-plane node, + set this field to an empty slice, i.e. `taints: {}` + in the YAML file. This field is solely used for Node + registration.' + items: + description: The node this Taint is attached to has + the "effect" on any pod that does not tolerate the + Taint. + properties: + effect: + description: Required. The effect of the taint on + pods that do not tolerate the taint. Valid effects + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Required. The taint key to be applied + to a node. + type: string + timeAdded: + description: TimeAdded represents the time at which + the taint was added. It is only written for NoExecute + taints. + format: date-time + type: string + value: + description: The taint value corresponding to the + taint key. + type: string + required: + - effect + - key + type: object + type: array + type: object + type: object + joinConfiguration: + description: JoinConfiguration is the kubeadm configuration for + the join command + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + caCertPath: + description: 'CACertPath is the path to the SSL certificate + authority used to secure comunications between node and + control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k' + type: string + controlPlane: + description: ControlPlane defines the additional control plane + instance to be deployed on the joining node. If nil, no + additional control plane instance will be deployed. + properties: + localAPIEndpoint: + description: LocalAPIEndpoint represents the endpoint + of the API server instance to be deployed on this node. + properties: + advertiseAddress: + description: AdvertiseAddress sets the IP address + for the API server to advertise. + type: string + bindPort: + description: BindPort sets the secure port for the + API Server to bind to. Defaults to 6443. + format: int32 + type: integer + type: object + type: object + discovery: + description: 'Discovery specifies the options for the kubelet + to use during the TLS Bootstrap process TODO: revisit when + there is defaulting from k/k' + properties: + bootstrapToken: + description: BootstrapToken is used to set the options + for bootstrap token based discovery BootstrapToken and + File are mutually exclusive + properties: + apiServerEndpoint: + description: APIServerEndpoint is an IP or domain + name to the API server from which info will be fetched. + type: string + caCertHashes: + description: 'CACertHashes specifies a set of public + key pins to verify when token-based discovery is + used. The root CA found during discovery must match + one of these values. Specifying an empty set disables + root CA pinning, which can be unsafe. Each hash + is specified as ":", where the only + currently supported type is "sha256". This is a + hex-encoded SHA-256 hash of the Subject Public Key + Info (SPKI) object in DER-encoded ASN.1. These hashes + can be calculated using, for example, OpenSSL: openssl + x509 -pubkey -in ca.crt openssl rsa -pubin -outform + der 2>&/dev/null | openssl dgst -sha256 -hex' + items: + type: string + type: array + token: + description: Token is a token used to validate cluster + information fetched from the control-plane. + type: string + unsafeSkipCAVerification: + description: UnsafeSkipCAVerification allows token-based + discovery without CA verification via CACertHashes. + This can weaken the security of kubeadm since other + nodes can impersonate the control-plane. + type: boolean + required: + - token + type: object + file: + description: File is used to specify a file or URL to + a kubeconfig file from which to load cluster information + BootstrapToken and File are mutually exclusive + properties: + kubeConfigPath: + description: KubeConfigPath is used to specify the + actual file path or URL to the kubeconfig file from + which to load cluster information + type: string + required: + - kubeConfigPath + type: object + timeout: + description: Timeout modifies the discovery timeout + type: string + tlsBootstrapToken: + description: TLSBootstrapToken is a token used for TLS + bootstrapping. If .BootstrapToken is set, this field + is defaulted to .BootstrapToken.Token, but can be overridden. + If .File is set, this field **must be set** in case + the KubeConfigFile does not contain any other authentication + information + type: string + type: object + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + nodeRegistration: + description: NodeRegistration holds fields that relate to + registering the new control-plane node to the cluster. When + used in the context of control plane nodes, NodeRegistration + should remain consistent across both InitConfiguration and + JoinConfiguration + properties: + criSocket: + description: CRISocket is used to retrieve container runtime + info. This information will be annotated to the Node + API object, for later re-use + type: string + ignorePreflightErrors: + description: IgnorePreflightErrors provides a slice of + pre-flight errors to be ignored when the current node + is registered. + items: + type: string + type: array + kubeletExtraArgs: + additionalProperties: + type: string + description: KubeletExtraArgs passes through extra arguments + to the kubelet. The arguments here are passed to the + kubelet command line via the environment file kubeadm + writes at runtime for the kubelet to source. This overrides + the generic base-level configuration in the kubelet-config-1.X + ConfigMap Flags have higher priority when parsing. These + values are local and specific to the node kubeadm is + executing on. + type: object + name: + description: Name is the `.Metadata.Name` field of the + Node API object that will be created in this `kubeadm + init` or `kubeadm join` operation. This field is also + used in the CommonName field of the kubelet's client + certificate to the API server. Defaults to the hostname + of the node if not provided. + type: string + taints: + description: 'Taints specifies the taints the Node API + object should be registered with. If this field is unset, + i.e. nil, in the `kubeadm init` process it will be defaulted + to []v1.Taint{''node-role.kubernetes.io/master=""''}. + If you don''t want to taint your control-plane node, + set this field to an empty slice, i.e. `taints: {}` + in the YAML file. This field is solely used for Node + registration.' + items: + description: The node this Taint is attached to has + the "effect" on any pod that does not tolerate the + Taint. + properties: + effect: + description: Required. The effect of the taint on + pods that do not tolerate the taint. Valid effects + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Required. The taint key to be applied + to a node. + type: string + timeAdded: + description: TimeAdded represents the time at which + the taint was added. It is only written for NoExecute + taints. + format: date-time + type: string + value: + description: The taint value corresponding to the + taint key. + type: string + required: + - effect + - key + type: object + type: array + type: object + type: object + mounts: + description: Mounts specifies a list of mount points to be setup. + items: + description: MountPoints defines input for generated mounts + in cloud-init. + items: + type: string + type: array + type: array + ntp: + description: NTP specifies NTP configuration + properties: + enabled: + description: Enabled specifies whether NTP should be enabled + type: boolean + servers: + description: Servers specifies which NTP servers to use + items: + type: string + type: array + type: object + postKubeadmCommands: + description: PostKubeadmCommands specifies extra commands to run + after kubeadm runs + items: + type: string + type: array + preKubeadmCommands: + description: PreKubeadmCommands specifies extra commands to run + before kubeadm runs + items: + type: string + type: array + useExperimentalRetryJoin: + description: "UseExperimentalRetryJoin replaces a basic kubeadm + command with a shell script with retries for joins. \n This + is meant to be an experimental temporary workaround on some + environments where joins fail due to timing (and other issues). + The long term goal is to add retries to kubeadm proper and use + that functionality. \n This will add about 40KB to userdata + \n For more information, refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055." + type: boolean + users: + description: Users specifies extra users to add + items: + description: User defines the input for a generated user in + cloud-init. + properties: + gecos: + description: Gecos specifies the gecos to use for the user + type: string + groups: + description: Groups specifies the additional groups for + the user + type: string + homeDir: + description: HomeDir specifies the home directory to use + for the user + type: string + inactive: + description: Inactive specifies whether to mark the user + as inactive + type: boolean + lockPassword: + description: LockPassword specifies if password login should + be disabled + type: boolean + name: + description: Name specifies the user name + type: string + passwd: + description: Passwd specifies a hashed password for the + user + type: string + primaryGroup: + description: PrimaryGroup specifies the primary group for + the user + type: string + shell: + description: Shell specifies the user's shell + type: string + sshAuthorizedKeys: + description: SSHAuthorizedKeys specifies a list of ssh authorized + keys for the user + items: + type: string + type: array + sudo: + description: Sudo specifies a sudo role for the user + type: string + required: + - name + type: object + type: array + verbosity: + description: Verbosity is the number for the kubeadm log level + verbosity. It overrides the `--v` flag in kubeadm commands. + format: int32 + type: integer + type: object + machineTemplate: + description: MachineTemplate contains information about how machines + should be shaped when creating or updating a control plane. + properties: + infrastructureRef: + description: InfrastructureRef is a required reference to a custom + resource offered by an infrastructure provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part + of an object. TODO: this design is not final and this field + is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map + stored with a resource that may be set by external tools + to store and retrieve arbitrary metadata. They are not queryable + and should be preserved when modifying objects. More info: + http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used + to organize and categorize (scope and select) objects. May + match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object + nodeDrainTimeout: + description: 'NodeDrainTimeout is the total amount of time that + the controller will spend on draining a controlplane node The + default value is 0, meaning that the node can be drained without + any time limitations. NOTE: NodeDrainTimeout is different from + `kubectl drain --timeout`' + type: string + required: + - infrastructureRef + type: object + replicas: + description: Number of desired machines. Defaults to 1. When stacked + etcd is used only odd numbers are permitted, as per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members). + This is a pointer to distinguish between explicit zero and not specified. + format: int32 + type: integer + rolloutAfter: + description: RolloutAfter is a field to indicate a rollout should + be performed after the specified time even if no changes have been + made to the KubeadmControlPlane. + format: date-time + type: string + rolloutStrategy: + default: + rollingUpdate: + maxSurge: 1 + type: RollingUpdate + description: The RolloutStrategy to use to replace control plane machines + with new ones. + properties: + rollingUpdate: + description: Rolling update config params. Present only if RolloutStrategyType + = RollingUpdate. + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: 'The maximum number of control planes that can + be scheduled above or under the desired number of control + planes. Value can be an absolute number 1 or 0. Defaults + to 1. Example: when this is set to 1, the control plane + can be scaled up immediately when the rolling update starts.' + x-kubernetes-int-or-string: true + type: object + type: + description: Type of rollout. Currently the only supported strategy + is "RollingUpdate". Default is RollingUpdate. + type: string + type: object + version: + description: Version defines the desired Kubernetes version. + type: string + required: + - kubeadmConfigSpec + - machineTemplate + - version + type: object + status: + description: KubeadmControlPlaneStatus defines the observed state of KubeadmControlPlane. + properties: + conditions: + description: Conditions defines current service state of the KubeadmControlPlane. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + failureMessage: + description: ErrorMessage indicates that there is a terminal problem + reconciling the state, and will be set to a descriptive error message. + type: string + failureReason: + description: FailureReason indicates that there is a terminal problem + reconciling the state, and will be set to a token value suitable + for programmatic interpretation. + type: string + initialized: + description: Initialized denotes whether or not the control plane + has the uploaded kubeadm-config configmap. + type: boolean + observedGeneration: + description: ObservedGeneration is the latest generation observed + by the controller. + format: int64 + type: integer + ready: + description: Ready denotes that the KubeadmControlPlane API Server + is ready to receive requests. + type: boolean + readyReplicas: + description: Total number of fully running and ready control plane + machines. + format: int32 + type: integer + replicas: + description: Total number of non-terminated machines targeted by this + control plane (their labels match the selector). + format: int32 + type: integer + selector: + description: 'Selector is the label selector in string format to avoid + introspection by clients, and is used to provide the CRD-based integration + for the scale subresource and additional integrations for things + like kubectl describe.. The string will be in the same format as + the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors' + type: string + unavailableReplicas: + description: Total number of unavailable machines targeted by this + control plane. This is the total number of machines that are still + required for the deployment to have 100% available capacity. They + may either be machines that are running but not yet ready or machines + that still have not been created. + format: int32 + type: integer + updatedReplicas: + description: Total number of non-terminated machines targeted by this + control plane that have the desired template spec. + format: int32 + type: integer + version: + description: Version represents the minimum Kubernetes version for + the control plane machines in the cluster. + type: string + type: object + type: object + served: true storage: true subresources: scale: diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml index b5d90577a3cb..42b065f5e213 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml @@ -1174,6 +1174,1164 @@ spec: type: object type: object served: true + storage: false + subresources: {} + - additionalPrinterColumns: + - description: Time duration since creation of KubeadmControlPlaneTemplate + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: KubeadmControlPlaneTemplate is the Schema for the kubeadmcontrolplanetemplates + API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: KubeadmControlPlaneTemplateSpec defines the desired state + of KubeadmControlPlaneTemplate. + properties: + template: + description: KubeadmControlPlaneTemplateResource describes the data + needed to create a KubeadmControlPlane from a template. + properties: + spec: + description: KubeadmControlPlaneSpec defines the desired state + of KubeadmControlPlane. + properties: + kubeadmConfigSpec: + description: KubeadmConfigSpec is a KubeadmConfigSpec to use + for initializing and joining machines to the control plane. + properties: + clusterConfiguration: + description: ClusterConfiguration along with InitConfiguration + are the configurations necessary for the init command + properties: + apiServer: + description: APIServer contains extra settings for + the API server control plane component + properties: + certSANs: + description: CertSANs sets extra Subject Alternative + Names for the API Server signing cert. + items: + type: string + type: array + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags + to pass to the control plane component. TODO: + This is temporary and ideally we would like + to switch all components to use ComponentConfig + + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host + volumes, mounted to the control plane component. + items: + description: HostPathMount contains elements + describing volumes that are mounted from the + host. + properties: + hostPath: + description: HostPath is the path in the + host that will be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside + the pod where hostPath will be mounted. + type: string + name: + description: Name of the volume inside the + pod template. + type: string + pathType: + description: PathType is the type of the + HostPath. + type: string + readOnly: + description: ReadOnly controls write access + to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + timeoutForControlPlane: + description: TimeoutForControlPlane controls the + timeout that we use for API server to appear + type: string + type: object + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal + value, and may reject unrecognized values. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + certificatesDir: + description: 'CertificatesDir specifies where to store + or look for all required certificates. NB: if not + provided, this will default to `/etc/kubernetes/pki`' + type: string + clusterName: + description: The cluster name + type: string + controlPlaneEndpoint: + description: 'ControlPlaneEndpoint sets a stable IP + address or DNS name for the control plane; it can + be a valid IP address or a RFC-1123 DNS subdomain, + both with optional TCP port. In case the ControlPlaneEndpoint + is not specified, the AdvertiseAddress + BindPort + are used; in case the ControlPlaneEndpoint is specified + but without a TCP port, the BindPort is used. Possible + usages are: e.g. In a cluster with more than one + control plane instances, this field should be assigned + the address of the external load balancer in front + of the control plane instances. e.g. in environments + with enforced node recycling, the ControlPlaneEndpoint + could be used for assigning a stable DNS to the + control plane. NB: This value defaults to the first + value in the Cluster object status.apiEndpoints + array.' + type: string + controllerManager: + description: ControllerManager contains extra settings + for the controller manager control plane component + properties: + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags + to pass to the control plane component. TODO: + This is temporary and ideally we would like + to switch all components to use ComponentConfig + + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host + volumes, mounted to the control plane component. + items: + description: HostPathMount contains elements + describing volumes that are mounted from the + host. + properties: + hostPath: + description: HostPath is the path in the + host that will be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside + the pod where hostPath will be mounted. + type: string + name: + description: Name of the volume inside the + pod template. + type: string + pathType: + description: PathType is the type of the + HostPath. + type: string + readOnly: + description: ReadOnly controls write access + to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + type: object + dns: + description: DNS defines the options for the DNS add-on + installed in the cluster. + properties: + imageRepository: + description: ImageRepository sets the container + registry to pull images from. if not set, the + ImageRepository defined in ClusterConfiguration + will be used instead. + type: string + imageTag: + description: ImageTag allows to specify a tag + for the image. In case this value is set, kubeadm + does not change automatically the version of + the above components during upgrades. + type: string + type: object + etcd: + description: 'Etcd holds configuration for etcd. NB: + This value defaults to a Local (stacked) etcd' + properties: + external: + description: External describes how to connect + to an external etcd cluster Local and External + are mutually exclusive + properties: + caFile: + description: CAFile is an SSL Certificate + Authority file used to secure etcd communication. + Required if using a TLS connection. + type: string + certFile: + description: CertFile is an SSL certification + file used to secure etcd communication. + Required if using a TLS connection. + type: string + endpoints: + description: Endpoints of etcd members. Required + for ExternalEtcd. + items: + type: string + type: array + keyFile: + description: KeyFile is an SSL key file used + to secure etcd communication. Required if + using a TLS connection. + type: string + required: + - caFile + - certFile + - endpoints + - keyFile + type: object + local: + description: Local provides configuration knobs + for configuring the local etcd instance Local + and External are mutually exclusive + properties: + dataDir: + description: DataDir is the directory etcd + will place its data. Defaults to "/var/lib/etcd". + type: string + extraArgs: + additionalProperties: + type: string + description: ExtraArgs are extra arguments + provided to the etcd binary when run inside + a static pod. + type: object + imageRepository: + description: ImageRepository sets the container + registry to pull images from. if not set, + the ImageRepository defined in ClusterConfiguration + will be used instead. + type: string + imageTag: + description: ImageTag allows to specify a + tag for the image. In case this value is + set, kubeadm does not change automatically + the version of the above components during + upgrades. + type: string + peerCertSANs: + description: PeerCertSANs sets extra Subject + Alternative Names for the etcd peer signing + cert. + items: + type: string + type: array + serverCertSANs: + description: ServerCertSANs sets extra Subject + Alternative Names for the etcd server signing + cert. + items: + type: string + type: array + type: object + type: object + featureGates: + additionalProperties: + type: boolean + description: FeatureGates enabled by the user. + type: object + imageRepository: + description: ImageRepository sets the container registry + to pull images from. If empty, `k8s.gcr.io` will + be used by default; in case of kubernetes version + is a CI build (kubernetes version starts with `ci/` + or `ci-cross/`) `gcr.io/k8s-staging-ci-images` will + be used as a default for control plane components + and for kube-proxy, while `k8s.gcr.io` will be used + for all the other images. + type: string + kind: + description: 'Kind is a string value representing + the REST resource this object represents. Servers + may infer this from the endpoint the client submits + requests to. Cannot be updated. In CamelCase. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + kubernetesVersion: + description: 'KubernetesVersion is the target version + of the control plane. NB: This value defaults to + the Machine object spec.version' + type: string + networking: + description: 'Networking holds configuration for the + networking topology of the cluster. NB: This value + defaults to the Cluster object spec.clusterNetwork.' + properties: + dnsDomain: + description: DNSDomain is the dns domain used + by k8s services. Defaults to "cluster.local". + type: string + podSubnet: + description: PodSubnet is the subnet used by pods. + If unset, the API server will not allocate CIDR + ranges for every node. Defaults to a comma-delimited + string of the Cluster object's spec.clusterNetwork.services.cidrBlocks + if that is set + type: string + serviceSubnet: + description: ServiceSubnet is the subnet used + by k8s services. Defaults to a comma-delimited + string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, + or to "10.96.0.0/12" if that's unset. + type: string + type: object + scheduler: + description: Scheduler contains extra settings for + the scheduler control plane component + properties: + extraArgs: + additionalProperties: + type: string + description: 'ExtraArgs is an extra set of flags + to pass to the control plane component. TODO: + This is temporary and ideally we would like + to switch all components to use ComponentConfig + + ConfigMaps.' + type: object + extraVolumes: + description: ExtraVolumes is an extra set of host + volumes, mounted to the control plane component. + items: + description: HostPathMount contains elements + describing volumes that are mounted from the + host. + properties: + hostPath: + description: HostPath is the path in the + host that will be mounted inside the pod. + type: string + mountPath: + description: MountPath is the path inside + the pod where hostPath will be mounted. + type: string + name: + description: Name of the volume inside the + pod template. + type: string + pathType: + description: PathType is the type of the + HostPath. + type: string + readOnly: + description: ReadOnly controls write access + to the volume + type: boolean + required: + - hostPath + - mountPath + - name + type: object + type: array + type: object + type: object + diskSetup: + description: DiskSetup specifies options for the creation + of partition tables and file systems on devices. + properties: + filesystems: + description: Filesystems specifies the list of file + systems to setup. + items: + description: Filesystem defines the file systems + to be created. + properties: + device: + description: Device specifies the device name + type: string + extraOpts: + description: ExtraOpts defined extra options + to add to the command for creating the file + system. + items: + type: string + type: array + filesystem: + description: Filesystem specifies the file system + type. + type: string + label: + description: Label specifies the file system + label to be used. If set to None, no label + is used. + type: string + overwrite: + description: Overwrite defines whether or not + to overwrite any existing filesystem. If true, + any pre-existing file system will be destroyed. + Use with Caution. + type: boolean + partition: + description: 'Partition specifies the partition + to use. The valid options are: "auto|any", + "auto", "any", "none", and , where NUM + is the actual partition number.' + type: string + replaceFS: + description: 'ReplaceFS is a special directive, + used for Microsoft Azure that instructs cloud-init + to replace a file system of . NOTE: + unless you define a label, this requires the + use of the ''any'' partition directive.' + type: string + required: + - device + - filesystem + - label + type: object + type: array + partitions: + description: Partitions specifies the list of the + partitions to setup. + items: + description: Partition defines how to create and + layout a partition. + properties: + device: + description: Device is the name of the device. + type: string + layout: + description: Layout specifies the device layout. + If it is true, a single partition will be + created for the entire device. When layout + is false, it means don't partition or ignore + existing partitioning. + type: boolean + overwrite: + description: Overwrite describes whether to + skip checks and create the partition if a + partition or filesystem is found on the device. + Use with caution. Default is 'false'. + type: boolean + tableType: + description: 'TableType specifies the tupe of + partition table. The following are supported: + ''mbr'': default and setups a MS-DOS partition + table ''gpt'': setups a GPT partition table' + type: string + required: + - device + - layout + type: object + type: array + type: object + files: + description: Files specifies extra files to be passed + to user_data upon creation. + items: + description: File defines the input for generating write_files + in cloud-init. + properties: + content: + description: Content is the actual content of the + file. + type: string + contentFrom: + description: ContentFrom is a referenced source + of content to populate the file. + properties: + secret: + description: Secret represents a secret that + should populate this file. + properties: + key: + description: Key is the key in the secret's + data map for this value. + type: string + name: + description: Name of the secret in the KubeadmBootstrapConfig's + namespace to use. + type: string + required: + - key + - name + type: object + required: + - secret + type: object + encoding: + description: Encoding specifies the encoding of + the file contents. + enum: + - base64 + - gzip + - gzip+base64 + type: string + owner: + description: Owner specifies the ownership of the + file, e.g. "root:root". + type: string + path: + description: Path specifies the full path on disk + where to store the file. + type: string + permissions: + description: Permissions specifies the permissions + to assign to the file, e.g. "0640". + type: string + required: + - path + type: object + type: array + format: + description: Format specifies the output format of the + bootstrap data + enum: + - cloud-config + type: string + initConfiguration: + description: InitConfiguration along with ClusterConfiguration + are the configurations necessary for the init command + properties: + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal + value, and may reject unrecognized values. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + bootstrapTokens: + description: BootstrapTokens is respected at `kubeadm + init` time and describes a set of Bootstrap Tokens + to create. This information IS NOT uploaded to the + kubeadm cluster configmap, partly because of its + sensitive nature + items: + description: BootstrapToken describes one bootstrap + token, stored as a Secret in the cluster. + properties: + description: + description: Description sets a human-friendly + message why this token exists and what it's + used for, so other administrators can know + its purpose. + type: string + expires: + description: Expires specifies the timestamp + when this token expires. Defaults to being + set dynamically at runtime based on the TTL. + Expires and TTL are mutually exclusive. + format: date-time + type: string + groups: + description: Groups specifies the extra groups + that this token will authenticate as when/if + used for authentication + items: + type: string + type: array + token: + description: Token is used for establishing + bidirectional trust between nodes and control-planes. + Used for joining nodes in the cluster. + type: string + ttl: + description: TTL defines the time to live for + this token. Defaults to 24h. Expires and TTL + are mutually exclusive. + type: string + usages: + description: Usages describes the ways in which + this token can be used. Can by default be + used for establishing bidirectional trust, + but that can be changed here. + items: + type: string + type: array + required: + - token + type: object + type: array + kind: + description: 'Kind is a string value representing + the REST resource this object represents. Servers + may infer this from the endpoint the client submits + requests to. Cannot be updated. In CamelCase. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + localAPIEndpoint: + description: LocalAPIEndpoint represents the endpoint + of the API server instance that's deployed on this + control plane node In HA setups, this differs from + ClusterConfiguration.ControlPlaneEndpoint in the + sense that ControlPlaneEndpoint is the global endpoint + for the cluster, which then loadbalances the requests + to each individual API server. This configuration + object lets you customize what IP/DNS name and port + the local API server advertises it's accessible + on. By default, kubeadm tries to auto-detect the + IP of the default interface and use that, but in + case that process fails you may set the desired + value here. + properties: + advertiseAddress: + description: AdvertiseAddress sets the IP address + for the API server to advertise. + type: string + bindPort: + description: BindPort sets the secure port for + the API Server to bind to. Defaults to 6443. + format: int32 + type: integer + type: object + nodeRegistration: + description: NodeRegistration holds fields that relate + to registering the new control-plane node to the + cluster. When used in the context of control plane + nodes, NodeRegistration should remain consistent + across both InitConfiguration and JoinConfiguration + properties: + criSocket: + description: CRISocket is used to retrieve container + runtime info. This information will be annotated + to the Node API object, for later re-use + type: string + ignorePreflightErrors: + description: IgnorePreflightErrors provides a + slice of pre-flight errors to be ignored when + the current node is registered. + items: + type: string + type: array + kubeletExtraArgs: + additionalProperties: + type: string + description: KubeletExtraArgs passes through extra + arguments to the kubelet. The arguments here + are passed to the kubelet command line via the + environment file kubeadm writes at runtime for + the kubelet to source. This overrides the generic + base-level configuration in the kubelet-config-1.X + ConfigMap Flags have higher priority when parsing. + These values are local and specific to the node + kubeadm is executing on. + type: object + name: + description: Name is the `.Metadata.Name` field + of the Node API object that will be created + in this `kubeadm init` or `kubeadm join` operation. + This field is also used in the CommonName field + of the kubelet's client certificate to the API + server. Defaults to the hostname of the node + if not provided. + type: string + taints: + description: 'Taints specifies the taints the + Node API object should be registered with. If + this field is unset, i.e. nil, in the `kubeadm + init` process it will be defaulted to []v1.Taint{''node-role.kubernetes.io/master=""''}. + If you don''t want to taint your control-plane + node, set this field to an empty slice, i.e. + `taints: {}` in the YAML file. This field is + solely used for Node registration.' + items: + description: The node this Taint is attached + to has the "effect" on any pod that does not + tolerate the Taint. + properties: + effect: + description: Required. The effect of the + taint on pods that do not tolerate the + taint. Valid effects are NoSchedule, PreferNoSchedule + and NoExecute. + type: string + key: + description: Required. The taint key to + be applied to a node. + type: string + timeAdded: + description: TimeAdded represents the time + at which the taint was added. It is only + written for NoExecute taints. + format: date-time + type: string + value: + description: The taint value corresponding + to the taint key. + type: string + required: + - effect + - key + type: object + type: array + type: object + type: object + joinConfiguration: + description: JoinConfiguration is the kubeadm configuration + for the join command + properties: + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal + value, and may reject unrecognized values. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + caCertPath: + description: 'CACertPath is the path to the SSL certificate + authority used to secure comunications between node + and control-plane. Defaults to "/etc/kubernetes/pki/ca.crt". + TODO: revisit when there is defaulting from k/k' + type: string + controlPlane: + description: ControlPlane defines the additional control + plane instance to be deployed on the joining node. + If nil, no additional control plane instance will + be deployed. + properties: + localAPIEndpoint: + description: LocalAPIEndpoint represents the endpoint + of the API server instance to be deployed on + this node. + properties: + advertiseAddress: + description: AdvertiseAddress sets the IP + address for the API server to advertise. + type: string + bindPort: + description: BindPort sets the secure port + for the API Server to bind to. Defaults + to 6443. + format: int32 + type: integer + type: object + type: object + discovery: + description: 'Discovery specifies the options for + the kubelet to use during the TLS Bootstrap process + TODO: revisit when there is defaulting from k/k' + properties: + bootstrapToken: + description: BootstrapToken is used to set the + options for bootstrap token based discovery + BootstrapToken and File are mutually exclusive + properties: + apiServerEndpoint: + description: APIServerEndpoint is an IP or + domain name to the API server from which + info will be fetched. + type: string + caCertHashes: + description: 'CACertHashes specifies a set + of public key pins to verify when token-based + discovery is used. The root CA found during + discovery must match one of these values. + Specifying an empty set disables root CA + pinning, which can be unsafe. Each hash + is specified as ":", where + the only currently supported type is "sha256". + This is a hex-encoded SHA-256 hash of the + Subject Public Key Info (SPKI) object in + DER-encoded ASN.1. These hashes can be calculated + using, for example, OpenSSL: openssl x509 + -pubkey -in ca.crt openssl rsa -pubin -outform + der 2>&/dev/null | openssl dgst -sha256 + -hex' + items: + type: string + type: array + token: + description: Token is a token used to validate + cluster information fetched from the control-plane. + type: string + unsafeSkipCAVerification: + description: UnsafeSkipCAVerification allows + token-based discovery without CA verification + via CACertHashes. This can weaken the security + of kubeadm since other nodes can impersonate + the control-plane. + type: boolean + required: + - token + type: object + file: + description: File is used to specify a file or + URL to a kubeconfig file from which to load + cluster information BootstrapToken and File + are mutually exclusive + properties: + kubeConfigPath: + description: KubeConfigPath is used to specify + the actual file path or URL to the kubeconfig + file from which to load cluster information + type: string + required: + - kubeConfigPath + type: object + timeout: + description: Timeout modifies the discovery timeout + type: string + tlsBootstrapToken: + description: TLSBootstrapToken is a token used + for TLS bootstrapping. If .BootstrapToken is + set, this field is defaulted to .BootstrapToken.Token, + but can be overridden. If .File is set, this + field **must be set** in case the KubeConfigFile + does not contain any other authentication information + type: string + type: object + kind: + description: 'Kind is a string value representing + the REST resource this object represents. Servers + may infer this from the endpoint the client submits + requests to. Cannot be updated. In CamelCase. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + nodeRegistration: + description: NodeRegistration holds fields that relate + to registering the new control-plane node to the + cluster. When used in the context of control plane + nodes, NodeRegistration should remain consistent + across both InitConfiguration and JoinConfiguration + properties: + criSocket: + description: CRISocket is used to retrieve container + runtime info. This information will be annotated + to the Node API object, for later re-use + type: string + ignorePreflightErrors: + description: IgnorePreflightErrors provides a + slice of pre-flight errors to be ignored when + the current node is registered. + items: + type: string + type: array + kubeletExtraArgs: + additionalProperties: + type: string + description: KubeletExtraArgs passes through extra + arguments to the kubelet. The arguments here + are passed to the kubelet command line via the + environment file kubeadm writes at runtime for + the kubelet to source. This overrides the generic + base-level configuration in the kubelet-config-1.X + ConfigMap Flags have higher priority when parsing. + These values are local and specific to the node + kubeadm is executing on. + type: object + name: + description: Name is the `.Metadata.Name` field + of the Node API object that will be created + in this `kubeadm init` or `kubeadm join` operation. + This field is also used in the CommonName field + of the kubelet's client certificate to the API + server. Defaults to the hostname of the node + if not provided. + type: string + taints: + description: 'Taints specifies the taints the + Node API object should be registered with. If + this field is unset, i.e. nil, in the `kubeadm + init` process it will be defaulted to []v1.Taint{''node-role.kubernetes.io/master=""''}. + If you don''t want to taint your control-plane + node, set this field to an empty slice, i.e. + `taints: {}` in the YAML file. This field is + solely used for Node registration.' + items: + description: The node this Taint is attached + to has the "effect" on any pod that does not + tolerate the Taint. + properties: + effect: + description: Required. The effect of the + taint on pods that do not tolerate the + taint. Valid effects are NoSchedule, PreferNoSchedule + and NoExecute. + type: string + key: + description: Required. The taint key to + be applied to a node. + type: string + timeAdded: + description: TimeAdded represents the time + at which the taint was added. It is only + written for NoExecute taints. + format: date-time + type: string + value: + description: The taint value corresponding + to the taint key. + type: string + required: + - effect + - key + type: object + type: array + type: object + type: object + mounts: + description: Mounts specifies a list of mount points to + be setup. + items: + description: MountPoints defines input for generated + mounts in cloud-init. + items: + type: string + type: array + type: array + ntp: + description: NTP specifies NTP configuration + properties: + enabled: + description: Enabled specifies whether NTP should + be enabled + type: boolean + servers: + description: Servers specifies which NTP servers to + use + items: + type: string + type: array + type: object + postKubeadmCommands: + description: PostKubeadmCommands specifies extra commands + to run after kubeadm runs + items: + type: string + type: array + preKubeadmCommands: + description: PreKubeadmCommands specifies extra commands + to run before kubeadm runs + items: + type: string + type: array + useExperimentalRetryJoin: + description: "UseExperimentalRetryJoin replaces a basic + kubeadm command with a shell script with retries for + joins. \n This is meant to be an experimental temporary + workaround on some environments where joins fail due + to timing (and other issues). The long term goal is + to add retries to kubeadm proper and use that functionality. + \n This will add about 40KB to userdata \n For more + information, refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055." + type: boolean + users: + description: Users specifies extra users to add + items: + description: User defines the input for a generated + user in cloud-init. + properties: + gecos: + description: Gecos specifies the gecos to use for + the user + type: string + groups: + description: Groups specifies the additional groups + for the user + type: string + homeDir: + description: HomeDir specifies the home directory + to use for the user + type: string + inactive: + description: Inactive specifies whether to mark + the user as inactive + type: boolean + lockPassword: + description: LockPassword specifies if password + login should be disabled + type: boolean + name: + description: Name specifies the user name + type: string + passwd: + description: Passwd specifies a hashed password + for the user + type: string + primaryGroup: + description: PrimaryGroup specifies the primary + group for the user + type: string + shell: + description: Shell specifies the user's shell + type: string + sshAuthorizedKeys: + description: SSHAuthorizedKeys specifies a list + of ssh authorized keys for the user + items: + type: string + type: array + sudo: + description: Sudo specifies a sudo role for the + user + type: string + required: + - name + type: object + type: array + verbosity: + description: Verbosity is the number for the kubeadm log + level verbosity. It overrides the `--v` flag in kubeadm + commands. + format: int32 + type: integer + type: object + machineTemplate: + description: MachineTemplate contains information about how + machines should be shaped when creating or updating a control + plane. + properties: + infrastructureRef: + description: InfrastructureRef is a required reference + to a custom resource offered by an infrastructure provider. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object + instead of an entire object, this string should + contain a valid JSON/Go field access statement, + such as desiredState.manifest.containers[2]. For + example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container + that triggered the event) or if no container name + is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only + to have some well-defined way of referencing a part + of an object. TODO: this design is not final and + this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this + reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + metadata: + description: 'Standard object''s metadata. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value + map stored with a resource that may be set by external + tools to store and retrieve arbitrary metadata. + They are not queryable and should be preserved when + modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can + be used to organize and categorize (scope and select) + objects. May match selectors of replication controllers + and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object + nodeDrainTimeout: + description: 'NodeDrainTimeout is the total amount of + time that the controller will spend on draining a controlplane + node The default value is 0, meaning that the node can + be drained without any time limitations. NOTE: NodeDrainTimeout + is different from `kubectl drain --timeout`' + type: string + required: + - infrastructureRef + type: object + replicas: + description: Number of desired machines. Defaults to 1. When + stacked etcd is used only odd numbers are permitted, as + per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members). + This is a pointer to distinguish between explicit zero and + not specified. + format: int32 + type: integer + rolloutAfter: + description: RolloutAfter is a field to indicate a rollout + should be performed after the specified time even if no + changes have been made to the KubeadmControlPlane. + format: date-time + type: string + rolloutStrategy: + default: + rollingUpdate: + maxSurge: 1 + type: RollingUpdate + description: The RolloutStrategy to use to replace control + plane machines with new ones. + properties: + rollingUpdate: + description: Rolling update config params. Present only + if RolloutStrategyType = RollingUpdate. + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: 'The maximum number of control planes + that can be scheduled above or under the desired + number of control planes. Value can be an absolute + number 1 or 0. Defaults to 1. Example: when this + is set to 1, the control plane can be scaled up + immediately when the rolling update starts.' + x-kubernetes-int-or-string: true + type: object + type: + description: Type of rollout. Currently the only supported + strategy is "RollingUpdate". Default is RollingUpdate. + type: string + type: object + version: + description: Version defines the desired Kubernetes version. + type: string + required: + - kubeadmConfigSpec + - machineTemplate + - version + type: object + required: + - spec + type: object + required: + - template + type: object + type: object + served: true storage: true subresources: {} status: diff --git a/controlplane/kubeadm/config/webhook/manifests.yaml b/controlplane/kubeadm/config/webhook/manifests.yaml index 19180ab6fd38..97a105092a6c 100644 --- a/controlplane/kubeadm/config/webhook/manifests.yaml +++ b/controlplane/kubeadm/config/webhook/manifests.yaml @@ -13,7 +13,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-controlplane-cluster-x-k8s-io-v1alpha4-kubeadmcontrolplane + path: /mutate-controlplane-cluster-x-k8s-io-v1beta1-kubeadmcontrolplane failurePolicy: Fail matchPolicy: Equivalent name: default.kubeadmcontrolplane.controlplane.cluster.x-k8s.io @@ -21,7 +21,7 @@ webhooks: - apiGroups: - controlplane.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -35,14 +35,14 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-controlplane-cluster-x-k8s-io-v1alpha4-kubeadmcontrolplanetemplate + path: /mutate-controlplane-cluster-x-k8s-io-v1beta1-kubeadmcontrolplanetemplate failurePolicy: Fail name: default.kubeadmcontrolplanetemplate.controlplane.cluster.x-k8s.io rules: - apiGroups: - controlplane.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -64,7 +64,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-controlplane-cluster-x-k8s-io-v1alpha4-kubeadmcontrolplane + path: /validate-controlplane-cluster-x-k8s-io-v1beta1-kubeadmcontrolplane failurePolicy: Fail matchPolicy: Equivalent name: validation.kubeadmcontrolplane.controlplane.cluster.x-k8s.io @@ -72,7 +72,7 @@ webhooks: - apiGroups: - controlplane.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -87,14 +87,14 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-controlplane-cluster-x-k8s-io-v1alpha4-kubeadmcontrolplanetemplate + path: /validate-controlplane-cluster-x-k8s-io-v1beta1-kubeadmcontrolplanetemplate failurePolicy: Fail name: validation.kubeadmcontrolplanetemplate.controlplane.cluster.x-k8s.io rules: - apiGroups: - controlplane.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE diff --git a/controlplane/kubeadm/controllers/controller.go b/controlplane/kubeadm/controllers/controller.go index 0e9e69a27e62..92b799936736 100644 --- a/controlplane/kubeadm/controllers/controller.go +++ b/controlplane/kubeadm/controllers/controller.go @@ -29,12 +29,12 @@ import ( kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/tools/record" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" diff --git a/controlplane/kubeadm/controllers/controller_test.go b/controlplane/kubeadm/controllers/controller_test.go index d9a9ed4039e0..0b184cbaea93 100644 --- a/controlplane/kubeadm/controllers/controller_test.go +++ b/controlplane/kubeadm/controllers/controller_test.go @@ -23,12 +23,8 @@ import ( "testing" "time" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" - "sigs.k8s.io/cluster-api/feature" - "github.com/blang/semver" . "github.com/onsi/gomega" - appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -38,11 +34,14 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/klog/v2/klogr" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" + "sigs.k8s.io/cluster-api/feature" + "sigs.k8s.io/cluster-api/internal/testtypes" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" @@ -53,8 +52,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/log" - - "sigs.k8s.io/cluster-api/internal/testtypes" ) func TestClusterToKubeadmControlPlane(t *testing.T) { @@ -1025,7 +1022,7 @@ kubernetesVersion: metav1.16.1`, fakeClient := newFakeClient(objs...) log.SetLogger(klogr.New()) - workloadCluster := fakeWorkloadCluster{ + workloadCluster := &fakeWorkloadCluster{ Workload: &internal.Workload{ Client: fakeClient, CoreDNSMigrator: &fakeMigrator{ diff --git a/controlplane/kubeadm/controllers/fakes_test.go b/controlplane/kubeadm/controllers/fakes_test.go index ee38d580f331..3ffa529a86d2 100644 --- a/controlplane/kubeadm/controllers/fakes_test.go +++ b/controlplane/kubeadm/controllers/fakes_test.go @@ -20,9 +20,9 @@ import ( "context" "github.com/blang/semver" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/controlplane/kubeadm/controllers/helpers.go b/controlplane/kubeadm/controllers/helpers.go index 12e1b72d40ec..02ce4da14e3b 100644 --- a/controlplane/kubeadm/controllers/helpers.go +++ b/controlplane/kubeadm/controllers/helpers.go @@ -28,10 +28,10 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apiserver/pkg/storage/names" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/certs" diff --git a/controlplane/kubeadm/controllers/helpers_test.go b/controlplane/kubeadm/controllers/helpers_test.go index 2d02abc27827..d108a83a519b 100644 --- a/controlplane/kubeadm/controllers/helpers_test.go +++ b/controlplane/kubeadm/controllers/helpers_test.go @@ -25,10 +25,10 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-go/tools/record" utilpointer "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/kubeconfig" @@ -509,13 +509,13 @@ func TestKubeadmControlPlaneReconciler_generateMachine(t *testing.T) { infraRef := &corev1.ObjectReference{ Kind: "InfraKind", - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Name: "infra", Namespace: cluster.Namespace, } bootstrapRef := &corev1.ObjectReference{ Kind: "BootstrapKind", - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Name: "bootstrap", Namespace: cluster.Namespace, } diff --git a/controlplane/kubeadm/controllers/remediation.go b/controlplane/kubeadm/controllers/remediation.go index f8d5e996a47c..8de1038e3fb7 100644 --- a/controlplane/kubeadm/controllers/remediation.go +++ b/controlplane/kubeadm/controllers/remediation.go @@ -22,8 +22,8 @@ import ( "github.com/blang/semver" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/controlplane/kubeadm/controllers/remediation_test.go b/controlplane/kubeadm/controllers/remediation_test.go index 89b0cfa3e228..9d14c62ac46c 100644 --- a/controlplane/kubeadm/controllers/remediation_test.go +++ b/controlplane/kubeadm/controllers/remediation_test.go @@ -30,8 +30,8 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" utilpointer "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/controlplane/kubeadm/controllers/scale.go b/controlplane/kubeadm/controllers/scale.go index 10229556464a..950bf6bc1a6c 100644 --- a/controlplane/kubeadm/controllers/scale.go +++ b/controlplane/kubeadm/controllers/scale.go @@ -27,8 +27,8 @@ import ( corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" kerrors "k8s.io/apimachinery/pkg/util/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/controlplane/kubeadm/controllers/scale_test.go b/controlplane/kubeadm/controllers/scale_test.go index d193e8a8dc5a..722aedc174b4 100644 --- a/controlplane/kubeadm/controllers/scale_test.go +++ b/controlplane/kubeadm/controllers/scale_test.go @@ -29,9 +29,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controlplane/kubeadm/controllers/status.go b/controlplane/kubeadm/controllers/status.go index 8d91caa1f1c5..e4605bef904c 100644 --- a/controlplane/kubeadm/controllers/status.go +++ b/controlplane/kubeadm/controllers/status.go @@ -22,8 +22,8 @@ import ( "sigs.k8s.io/cluster-api/util/collections" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/controlplane/kubeadm/controllers/status_test.go b/controlplane/kubeadm/controllers/status_test.go index cab59cccd8c3..ad10771afdaa 100644 --- a/controlplane/kubeadm/controllers/status_test.go +++ b/controlplane/kubeadm/controllers/status_test.go @@ -27,8 +27,8 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/klog/v2/klogr" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controlplane/kubeadm/controllers/suite_test.go b/controlplane/kubeadm/controllers/suite_test.go index 88cd66cc4d6b..d53da4039ce4 100644 --- a/controlplane/kubeadm/controllers/suite_test.go +++ b/controlplane/kubeadm/controllers/suite_test.go @@ -39,7 +39,7 @@ var ( ObjectMeta: metav1.ObjectMeta{ Name: "genericmachinetemplate.generic.io", Labels: map[string]string{ - "cluster.x-k8s.io/v1alpha4": "v1", + "cluster.x-k8s.io/v1beta1": "v1", }, }, Spec: apiextensionsv1.CustomResourceDefinitionSpec{ diff --git a/controlplane/kubeadm/controllers/upgrade.go b/controlplane/kubeadm/controllers/upgrade.go index 7ea5a222249f..ca51168466be 100644 --- a/controlplane/kubeadm/controllers/upgrade.go +++ b/controlplane/kubeadm/controllers/upgrade.go @@ -21,8 +21,8 @@ import ( "github.com/blang/semver" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/collections" diff --git a/controlplane/kubeadm/controllers/upgrade_test.go b/controlplane/kubeadm/controllers/upgrade_test.go index 3f814545a269..8d08e778217f 100644 --- a/controlplane/kubeadm/controllers/upgrade_test.go +++ b/controlplane/kubeadm/controllers/upgrade_test.go @@ -29,8 +29,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controlplane/kubeadm/internal/cluster.go b/controlplane/kubeadm/internal/cluster.go index 812c9c35d0d1..b497a07a26d0 100644 --- a/controlplane/kubeadm/internal/cluster.go +++ b/controlplane/kubeadm/internal/cluster.go @@ -25,9 +25,9 @@ import ( "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/secret" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/controlplane/kubeadm/internal/cluster_labels.go b/controlplane/kubeadm/internal/cluster_labels.go index bb6be3a7472e..cca11a27a354 100644 --- a/controlplane/kubeadm/internal/cluster_labels.go +++ b/controlplane/kubeadm/internal/cluster_labels.go @@ -17,8 +17,8 @@ limitations under the License. package internal import ( - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" ) // ControlPlaneMachineLabelsForCluster returns a set of labels to add to a control plane machine for this specific cluster. diff --git a/controlplane/kubeadm/internal/cluster_test.go b/controlplane/kubeadm/internal/cluster_test.go index 2f0f893e851a..3f004943cebf 100644 --- a/controlplane/kubeadm/internal/cluster_test.go +++ b/controlplane/kubeadm/internal/cluster_test.go @@ -34,7 +34,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/util/certs" "sigs.k8s.io/cluster-api/util/collections" diff --git a/controlplane/kubeadm/internal/control_plane.go b/controlplane/kubeadm/internal/control_plane.go index 81fa9d02ccb2..a2a54b3e7e2d 100644 --- a/controlplane/kubeadm/internal/control_plane.go +++ b/controlplane/kubeadm/internal/control_plane.go @@ -28,10 +28,10 @@ import ( kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apiserver/pkg/storage/names" "k8s.io/klog/v2/klogr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/failuredomains" "sigs.k8s.io/cluster-api/util/patch" diff --git a/controlplane/kubeadm/internal/control_plane_test.go b/controlplane/kubeadm/internal/control_plane_test.go index 62ed22456230..5dd3069fbc12 100644 --- a/controlplane/kubeadm/internal/control_plane_test.go +++ b/controlplane/kubeadm/internal/control_plane_test.go @@ -27,9 +27,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/controlplane/kubeadm/internal/filters.go b/controlplane/kubeadm/internal/filters.go index 7714d7f63811..2af862a7287b 100644 --- a/controlplane/kubeadm/internal/filters.go +++ b/controlplane/kubeadm/internal/filters.go @@ -21,9 +21,9 @@ import ( "reflect" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/controlplane/kubeadm/internal/filters_test.go b/controlplane/kubeadm/internal/filters_test.go index 16d7c12e1dd3..9c00bbfbc31c 100644 --- a/controlplane/kubeadm/internal/filters_test.go +++ b/controlplane/kubeadm/internal/filters_test.go @@ -23,9 +23,9 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" ) func TestMatchClusterConfiguration(t *testing.T) { @@ -989,7 +989,7 @@ func TestMatchesTemplateClonedFrom(t *testing.T) { m.Name: { Object: map[string]interface{}{ "kind": "InfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": "default", @@ -1065,7 +1065,7 @@ func TestMatchesTemplateClonedFrom_WithClonedFromAnnotations(t *testing.T) { machine := &clusterv1.Machine{ Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureMachine", Name: "infra-config1", Namespace: "default", @@ -1115,7 +1115,7 @@ func TestMatchesTemplateClonedFrom_WithClonedFromAnnotations(t *testing.T) { machine.Name: { Object: map[string]interface{}{ "kind": "InfrastructureMachine", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": "default", diff --git a/controlplane/kubeadm/internal/workload_cluster.go b/controlplane/kubeadm/internal/workload_cluster.go index 1c383e2a6da7..9ea74cbc26e9 100644 --- a/controlplane/kubeadm/internal/workload_cluster.go +++ b/controlplane/kubeadm/internal/workload_cluster.go @@ -37,10 +37,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-go/util/retry" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" kubeadmtypes "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/certs" containerutil "sigs.k8s.io/cluster-api/util/container" diff --git a/controlplane/kubeadm/internal/workload_cluster_conditions.go b/controlplane/kubeadm/internal/workload_cluster_conditions.go index e0b1d68e9ad2..fcf980dda711 100644 --- a/controlplane/kubeadm/internal/workload_cluster_conditions.go +++ b/controlplane/kubeadm/internal/workload_cluster_conditions.go @@ -25,8 +25,8 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" etcdutil "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd/util" "sigs.k8s.io/cluster-api/util/collections" diff --git a/controlplane/kubeadm/internal/workload_cluster_conditions_test.go b/controlplane/kubeadm/internal/workload_cluster_conditions_test.go index 1c60fb0c0bab..3e3fb7f3b0fa 100644 --- a/controlplane/kubeadm/internal/workload_cluster_conditions_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_conditions_test.go @@ -28,9 +28,9 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" fake2 "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd/fake" "sigs.k8s.io/cluster-api/util/collections" diff --git a/controlplane/kubeadm/internal/workload_cluster_coredns.go b/controlplane/kubeadm/internal/workload_cluster_coredns.go index 7f4995578d4b..9007d949f45b 100644 --- a/controlplane/kubeadm/internal/workload_cluster_coredns.go +++ b/controlplane/kubeadm/internal/workload_cluster_coredns.go @@ -31,8 +31,8 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/util/retry" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" containerutil "sigs.k8s.io/cluster-api/util/container" "sigs.k8s.io/cluster-api/util/patch" "sigs.k8s.io/cluster-api/util/version" diff --git a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go index 50df31fd356b..42acb51b6a92 100644 --- a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go @@ -27,8 +27,8 @@ import ( corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util/yaml" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" diff --git a/controlplane/kubeadm/internal/workload_cluster_etcd.go b/controlplane/kubeadm/internal/workload_cluster_etcd.go index dffa911f5b4a..a5b1f7c3e84b 100644 --- a/controlplane/kubeadm/internal/workload_cluster_etcd.go +++ b/controlplane/kubeadm/internal/workload_cluster_etcd.go @@ -22,8 +22,8 @@ import ( "github.com/blang/semver" "github.com/pkg/errors" kerrors "k8s.io/apimachinery/pkg/util/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" etcdutil "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd/util" ) diff --git a/controlplane/kubeadm/internal/workload_cluster_etcd_test.go b/controlplane/kubeadm/internal/workload_cluster_etcd_test.go index 56a3ca1c0662..bae50da49730 100644 --- a/controlplane/kubeadm/internal/workload_cluster_etcd_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_etcd_test.go @@ -28,7 +28,7 @@ import ( clientv3 "go.etcd.io/etcd/client/v3" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" fake2 "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd/fake" "sigs.k8s.io/cluster-api/util/yaml" diff --git a/controlplane/kubeadm/internal/workload_cluster_test.go b/controlplane/kubeadm/internal/workload_cluster_test.go index 56423d16e625..01958c151c03 100644 --- a/controlplane/kubeadm/internal/workload_cluster_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_test.go @@ -29,9 +29,9 @@ import ( corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util/yaml" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" @@ -45,42 +45,42 @@ func TestUpdateKubeProxyImageInfo(t *testing.T) { expectImage string clientGet map[string]interface{} patchErr error - KCP *v1alpha4.KubeadmControlPlane + KCP *v1beta1.KubeadmControlPlane }{ { name: "succeeds if patch correctly", ds: newKubeProxyDS(), expectErr: false, expectImage: "k8s.gcr.io/kube-proxy:v1.16.3", - KCP: &v1alpha4.KubeadmControlPlane{Spec: v1alpha4.KubeadmControlPlaneSpec{Version: "v1.16.3"}}, + KCP: &v1beta1.KubeadmControlPlane{Spec: v1beta1.KubeadmControlPlaneSpec{Version: "v1.16.3"}}, }, { name: "returns error if image in kube-proxy ds was in digest format", ds: newKubeProxyDSWithImage("k8s.gcr.io/kube-proxy@sha256:47bfd"), expectErr: true, expectImage: "k8s.gcr.io/kube-proxy@sha256:47bfd", - KCP: &v1alpha4.KubeadmControlPlane{Spec: v1alpha4.KubeadmControlPlaneSpec{Version: "v1.16.3"}}, + KCP: &v1beta1.KubeadmControlPlane{Spec: v1beta1.KubeadmControlPlaneSpec{Version: "v1.16.3"}}, }, { name: "expects OCI compatible format of tag", ds: newKubeProxyDS(), expectErr: false, expectImage: "k8s.gcr.io/kube-proxy:v1.16.3_build1", - KCP: &v1alpha4.KubeadmControlPlane{Spec: v1alpha4.KubeadmControlPlaneSpec{Version: "v1.16.3+build1"}}, + KCP: &v1beta1.KubeadmControlPlane{Spec: v1beta1.KubeadmControlPlaneSpec{Version: "v1.16.3+build1"}}, }, { name: "returns error if image in kube-proxy ds was in wrong format", ds: newKubeProxyDSWithImage(""), expectErr: true, - KCP: &v1alpha4.KubeadmControlPlane{Spec: v1alpha4.KubeadmControlPlaneSpec{Version: "v1.16.3"}}, + KCP: &v1beta1.KubeadmControlPlane{Spec: v1beta1.KubeadmControlPlaneSpec{Version: "v1.16.3"}}, }, { name: "updates image repository if one has been set on the control plane", ds: newKubeProxyDS(), expectErr: false, expectImage: "foo.bar.example/baz/qux/kube-proxy:v1.16.3", - KCP: &v1alpha4.KubeadmControlPlane{ - Spec: v1alpha4.KubeadmControlPlaneSpec{ + KCP: &v1beta1.KubeadmControlPlane{ + Spec: v1beta1.KubeadmControlPlaneSpec{ Version: "v1.16.3", KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{ ClusterConfiguration: &bootstrapv1.ClusterConfiguration{ @@ -94,8 +94,8 @@ func TestUpdateKubeProxyImageInfo(t *testing.T) { ds: newKubeProxyDS(), expectErr: false, expectImage: "k8s.gcr.io/kube-proxy:v1.16.3", - KCP: &v1alpha4.KubeadmControlPlane{ - Spec: v1alpha4.KubeadmControlPlaneSpec{ + KCP: &v1beta1.KubeadmControlPlane{ + Spec: v1beta1.KubeadmControlPlaneSpec{ Version: "v1.16.3", KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{ ClusterConfiguration: &bootstrapv1.ClusterConfiguration{ @@ -108,8 +108,8 @@ func TestUpdateKubeProxyImageInfo(t *testing.T) { name: "returns error if image repository is invalid", ds: newKubeProxyDS(), expectErr: true, - KCP: &v1alpha4.KubeadmControlPlane{ - Spec: v1alpha4.KubeadmControlPlaneSpec{ + KCP: &v1beta1.KubeadmControlPlane{ + Spec: v1beta1.KubeadmControlPlaneSpec{ Version: "v1.16.3", KubeadmConfigSpec: bootstrapv1.KubeadmConfigSpec{ ClusterConfiguration: &bootstrapv1.ClusterConfiguration{ @@ -123,13 +123,13 @@ func TestUpdateKubeProxyImageInfo(t *testing.T) { ds: newKubeProxyDSWithImage(""), // Using the same image name that would otherwise lead to an error expectErr: false, expectImage: "", - KCP: &v1alpha4.KubeadmControlPlane{ + KCP: &v1beta1.KubeadmControlPlane{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - v1alpha4.SkipKubeProxyAnnotation: "", + v1beta1.SkipKubeProxyAnnotation: "", }, }, - Spec: v1alpha4.KubeadmControlPlaneSpec{ + Spec: v1beta1.KubeadmControlPlaneSpec{ Version: "v1.16.3", }}, }, diff --git a/controlplane/kubeadm/main.go b/controlplane/kubeadm/main.go index 966520f93009..5465e1405633 100644 --- a/controlplane/kubeadm/main.go +++ b/controlplane/kubeadm/main.go @@ -35,11 +35,11 @@ import ( cliflag "k8s.io/component-base/cli/flag" "k8s.io/klog/v2" "k8s.io/klog/v2/klogr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - kubeadmbootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + kubeadmbootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" kubeadmcontrolplanev1old "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha3" - kubeadmcontrolplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + kubeadmcontrolplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" kubeadmcontrolplanecontrollers "sigs.k8s.io/cluster-api/controlplane/kubeadm/controllers" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/version" diff --git a/docs/proposals/20210210-insulate-users-from-kubeadm-API-changes.md b/docs/proposals/20210210-insulate-users-from-kubeadm-API-changes.md index b28527375355..14f606966681 100644 --- a/docs/proposals/20210210-insulate-users-from-kubeadm-API-changes.md +++ b/docs/proposals/20210210-insulate-users-from-kubeadm-API-changes.md @@ -137,13 +137,13 @@ in Cluster API is impractical, Cluster API hosts a mirror of kubeadm API types. kubeadm v1beta1 mirror-types: -- Hosted in `bootstrap/kubeadm/types/v1beta1`. +- Hosted in `bootstrap/kubeadm/types/upstreamv1beta1`. - Diverged from the original v1beta1 types for better CRD support (in practice a set of `+optional` fixes, few `omitempty` differences). kubeadm v1beta2 mirror-types: -- Hosted in `bootstrap/kubeadm/types/v1beta2`. +- Hosted in `bootstrap/kubeadm/types/upstreamv1beta2`. - Currently, not used in the Cluster API codebase. - Does not include changes for better CRD support introduced in kubeadm v1beta1 mirror-types. @@ -160,7 +160,7 @@ __Alternative 1:__ Keep kubeadm v1beta1 types as a Hub type (1); implement conversion to kubeadm API version f(Kubernetes Version) when generating the kubeadm config for init/join ( -e.g convert to kubeadm API v1beta2 for Kubernetes version >= v1.15, convert to +e.g convert to kubeadm API v1beta2 for Kubernetes version >= v1.15, convert to kubeadm API v1beta1 for Kubernetes version < v1.15). This alternative is the more clean, robust and forward looking, but it requires @@ -211,12 +211,12 @@ Planned actions are: - introduce a Cluster API owned version of the kubeadm config types (starting from kubeadm v1beta1) to be used by KubeadmConfig/KubeadmControlPlane specs; this should also act as a serialization/deserialization hub (1). - Please note that those types will be part of Cluster API types, and thus initially + Please note that those types will be part of Cluster API types, and thus initially versioned as v1alpha4; once conversion will be in place, those types are not required anymore to have the same serialization format of the real kubeadm types. -- preserve `bootstrap/kubeadm/types/v1beta1` as a serialization/deserialization +- preserve `bootstrap/kubeadm/types/upstreamv1beta1` as a serialization/deserialization spoke (1)(2) for v1alpha4 (also, this will be used by v1alpha3 API types until removal) -- preserve `bootstrap/kubeadm/types/v1beta2` as serialization/deserialization +- preserve `bootstrap/kubeadm/types/upstreamv1beta2` as serialization/deserialization spoke (1)(2) for v1alpha4 - implement hub/spoke conversions (1) - make CABPK to use conversion while generating the kubeadm config file for init/join @@ -224,13 +224,13 @@ Planned actions are: - make KCP to use the Cluster API owned version of the kubeadm config types instead of using `Unstructured` for the kubeadm-config Config Map handling - add the `IgnorePreflightError` field to the Cluster API owned types; this field will be silently - ignored when converting to v1beta1 (because this version does not support this field). + ignored when converting to v1beta1 (because this version does not support this field). Note: we are not planning to add `CertificateKey` to the Cluster API owned types because this field is not relevant for Cluster API. (1) See https://book.kubebuilder.io/multiversion-tutorial/conversion-concepts.html for a definition of Hub or spoke types/version. -(2) As soon as it will be possible to vendor kubeadm types, we should drop this copy +(2) As soon as it will be possible to vendor kubeadm types, we should drop this copy and use kubeadm library as a source of truth. Hover there is no concrete plan for this yet. ### Security Model diff --git a/exp/addons/api/v1alpha3/doc.go b/exp/addons/api/v1alpha3/doc.go index e87dca87ab27..943ee7960045 100644 --- a/exp/addons/api/v1alpha3/doc.go +++ b/exp/addons/api/v1alpha3/doc.go @@ -15,5 +15,5 @@ limitations under the License. */ // Package v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/exp/addons/api/v1beta1 package v1alpha3 diff --git a/exp/addons/api/v1alpha3/zz_generated.conversion.go b/exp/addons/api/v1alpha3/zz_generated.conversion.go index ee8945000722..65b0e28d10a7 100644 --- a/exp/addons/api/v1alpha3/zz_generated.conversion.go +++ b/exp/addons/api/v1alpha3/zz_generated.conversion.go @@ -27,8 +27,8 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" apiv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - v1alpha4 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + v1beta1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" ) func init() { @@ -38,216 +38,216 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*ClusterResourceSet)(nil), (*v1alpha4.ClusterResourceSet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterResourceSet_To_v1alpha4_ClusterResourceSet(a.(*ClusterResourceSet), b.(*v1alpha4.ClusterResourceSet), scope) + if err := s.AddGeneratedConversionFunc((*ClusterResourceSet)(nil), (*v1beta1.ClusterResourceSet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterResourceSet_To_v1beta1_ClusterResourceSet(a.(*ClusterResourceSet), b.(*v1beta1.ClusterResourceSet), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterResourceSet)(nil), (*ClusterResourceSet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterResourceSet_To_v1alpha3_ClusterResourceSet(a.(*v1alpha4.ClusterResourceSet), b.(*ClusterResourceSet), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterResourceSet)(nil), (*ClusterResourceSet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterResourceSet_To_v1alpha3_ClusterResourceSet(a.(*v1beta1.ClusterResourceSet), b.(*ClusterResourceSet), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ClusterResourceSetBinding)(nil), (*v1alpha4.ClusterResourceSetBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterResourceSetBinding_To_v1alpha4_ClusterResourceSetBinding(a.(*ClusterResourceSetBinding), b.(*v1alpha4.ClusterResourceSetBinding), scope) + if err := s.AddGeneratedConversionFunc((*ClusterResourceSetBinding)(nil), (*v1beta1.ClusterResourceSetBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterResourceSetBinding_To_v1beta1_ClusterResourceSetBinding(a.(*ClusterResourceSetBinding), b.(*v1beta1.ClusterResourceSetBinding), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterResourceSetBinding)(nil), (*ClusterResourceSetBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterResourceSetBinding_To_v1alpha3_ClusterResourceSetBinding(a.(*v1alpha4.ClusterResourceSetBinding), b.(*ClusterResourceSetBinding), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterResourceSetBinding)(nil), (*ClusterResourceSetBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterResourceSetBinding_To_v1alpha3_ClusterResourceSetBinding(a.(*v1beta1.ClusterResourceSetBinding), b.(*ClusterResourceSetBinding), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ClusterResourceSetBindingList)(nil), (*v1alpha4.ClusterResourceSetBindingList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterResourceSetBindingList_To_v1alpha4_ClusterResourceSetBindingList(a.(*ClusterResourceSetBindingList), b.(*v1alpha4.ClusterResourceSetBindingList), scope) + if err := s.AddGeneratedConversionFunc((*ClusterResourceSetBindingList)(nil), (*v1beta1.ClusterResourceSetBindingList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterResourceSetBindingList_To_v1beta1_ClusterResourceSetBindingList(a.(*ClusterResourceSetBindingList), b.(*v1beta1.ClusterResourceSetBindingList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterResourceSetBindingList)(nil), (*ClusterResourceSetBindingList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterResourceSetBindingList_To_v1alpha3_ClusterResourceSetBindingList(a.(*v1alpha4.ClusterResourceSetBindingList), b.(*ClusterResourceSetBindingList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterResourceSetBindingList)(nil), (*ClusterResourceSetBindingList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterResourceSetBindingList_To_v1alpha3_ClusterResourceSetBindingList(a.(*v1beta1.ClusterResourceSetBindingList), b.(*ClusterResourceSetBindingList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ClusterResourceSetBindingSpec)(nil), (*v1alpha4.ClusterResourceSetBindingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterResourceSetBindingSpec_To_v1alpha4_ClusterResourceSetBindingSpec(a.(*ClusterResourceSetBindingSpec), b.(*v1alpha4.ClusterResourceSetBindingSpec), scope) + if err := s.AddGeneratedConversionFunc((*ClusterResourceSetBindingSpec)(nil), (*v1beta1.ClusterResourceSetBindingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterResourceSetBindingSpec_To_v1beta1_ClusterResourceSetBindingSpec(a.(*ClusterResourceSetBindingSpec), b.(*v1beta1.ClusterResourceSetBindingSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterResourceSetBindingSpec)(nil), (*ClusterResourceSetBindingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec(a.(*v1alpha4.ClusterResourceSetBindingSpec), b.(*ClusterResourceSetBindingSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterResourceSetBindingSpec)(nil), (*ClusterResourceSetBindingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec(a.(*v1beta1.ClusterResourceSetBindingSpec), b.(*ClusterResourceSetBindingSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ClusterResourceSetList)(nil), (*v1alpha4.ClusterResourceSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterResourceSetList_To_v1alpha4_ClusterResourceSetList(a.(*ClusterResourceSetList), b.(*v1alpha4.ClusterResourceSetList), scope) + if err := s.AddGeneratedConversionFunc((*ClusterResourceSetList)(nil), (*v1beta1.ClusterResourceSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterResourceSetList_To_v1beta1_ClusterResourceSetList(a.(*ClusterResourceSetList), b.(*v1beta1.ClusterResourceSetList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterResourceSetList)(nil), (*ClusterResourceSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetList(a.(*v1alpha4.ClusterResourceSetList), b.(*ClusterResourceSetList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterResourceSetList)(nil), (*ClusterResourceSetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetList(a.(*v1beta1.ClusterResourceSetList), b.(*ClusterResourceSetList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ClusterResourceSetSpec)(nil), (*v1alpha4.ClusterResourceSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterResourceSetSpec_To_v1alpha4_ClusterResourceSetSpec(a.(*ClusterResourceSetSpec), b.(*v1alpha4.ClusterResourceSetSpec), scope) + if err := s.AddGeneratedConversionFunc((*ClusterResourceSetSpec)(nil), (*v1beta1.ClusterResourceSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterResourceSetSpec_To_v1beta1_ClusterResourceSetSpec(a.(*ClusterResourceSetSpec), b.(*v1beta1.ClusterResourceSetSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterResourceSetSpec)(nil), (*ClusterResourceSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec(a.(*v1alpha4.ClusterResourceSetSpec), b.(*ClusterResourceSetSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterResourceSetSpec)(nil), (*ClusterResourceSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec(a.(*v1beta1.ClusterResourceSetSpec), b.(*ClusterResourceSetSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ClusterResourceSetStatus)(nil), (*v1alpha4.ClusterResourceSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ClusterResourceSetStatus_To_v1alpha4_ClusterResourceSetStatus(a.(*ClusterResourceSetStatus), b.(*v1alpha4.ClusterResourceSetStatus), scope) + if err := s.AddGeneratedConversionFunc((*ClusterResourceSetStatus)(nil), (*v1beta1.ClusterResourceSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ClusterResourceSetStatus_To_v1beta1_ClusterResourceSetStatus(a.(*ClusterResourceSetStatus), b.(*v1beta1.ClusterResourceSetStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ClusterResourceSetStatus)(nil), (*ClusterResourceSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus(a.(*v1alpha4.ClusterResourceSetStatus), b.(*ClusterResourceSetStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ClusterResourceSetStatus)(nil), (*ClusterResourceSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus(a.(*v1beta1.ClusterResourceSetStatus), b.(*ClusterResourceSetStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ResourceBinding)(nil), (*v1alpha4.ResourceBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceBinding_To_v1alpha4_ResourceBinding(a.(*ResourceBinding), b.(*v1alpha4.ResourceBinding), scope) + if err := s.AddGeneratedConversionFunc((*ResourceBinding)(nil), (*v1beta1.ResourceBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceBinding_To_v1beta1_ResourceBinding(a.(*ResourceBinding), b.(*v1beta1.ResourceBinding), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ResourceBinding)(nil), (*ResourceBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ResourceBinding_To_v1alpha3_ResourceBinding(a.(*v1alpha4.ResourceBinding), b.(*ResourceBinding), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ResourceBinding)(nil), (*ResourceBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ResourceBinding_To_v1alpha3_ResourceBinding(a.(*v1beta1.ResourceBinding), b.(*ResourceBinding), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ResourceRef)(nil), (*v1alpha4.ResourceRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceRef_To_v1alpha4_ResourceRef(a.(*ResourceRef), b.(*v1alpha4.ResourceRef), scope) + if err := s.AddGeneratedConversionFunc((*ResourceRef)(nil), (*v1beta1.ResourceRef)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceRef_To_v1beta1_ResourceRef(a.(*ResourceRef), b.(*v1beta1.ResourceRef), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ResourceRef)(nil), (*ResourceRef)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ResourceRef_To_v1alpha3_ResourceRef(a.(*v1alpha4.ResourceRef), b.(*ResourceRef), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ResourceRef)(nil), (*ResourceRef)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ResourceRef_To_v1alpha3_ResourceRef(a.(*v1beta1.ResourceRef), b.(*ResourceRef), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ResourceSetBinding)(nil), (*v1alpha4.ResourceSetBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceSetBinding_To_v1alpha4_ResourceSetBinding(a.(*ResourceSetBinding), b.(*v1alpha4.ResourceSetBinding), scope) + if err := s.AddGeneratedConversionFunc((*ResourceSetBinding)(nil), (*v1beta1.ResourceSetBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceSetBinding_To_v1beta1_ResourceSetBinding(a.(*ResourceSetBinding), b.(*v1beta1.ResourceSetBinding), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.ResourceSetBinding)(nil), (*ResourceSetBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ResourceSetBinding_To_v1alpha3_ResourceSetBinding(a.(*v1alpha4.ResourceSetBinding), b.(*ResourceSetBinding), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.ResourceSetBinding)(nil), (*ResourceSetBinding)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ResourceSetBinding_To_v1alpha3_ResourceSetBinding(a.(*v1beta1.ResourceSetBinding), b.(*ResourceSetBinding), scope) }); err != nil { return err } return nil } -func autoConvert_v1alpha3_ClusterResourceSet_To_v1alpha4_ClusterResourceSet(in *ClusterResourceSet, out *v1alpha4.ClusterResourceSet, s conversion.Scope) error { +func autoConvert_v1alpha3_ClusterResourceSet_To_v1beta1_ClusterResourceSet(in *ClusterResourceSet, out *v1beta1.ClusterResourceSet, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_ClusterResourceSetSpec_To_v1alpha4_ClusterResourceSetSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_ClusterResourceSetSpec_To_v1beta1_ClusterResourceSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_ClusterResourceSetStatus_To_v1alpha4_ClusterResourceSetStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_ClusterResourceSetStatus_To_v1beta1_ClusterResourceSetStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_ClusterResourceSet_To_v1alpha4_ClusterResourceSet is an autogenerated conversion function. -func Convert_v1alpha3_ClusterResourceSet_To_v1alpha4_ClusterResourceSet(in *ClusterResourceSet, out *v1alpha4.ClusterResourceSet, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterResourceSet_To_v1alpha4_ClusterResourceSet(in, out, s) +// Convert_v1alpha3_ClusterResourceSet_To_v1beta1_ClusterResourceSet is an autogenerated conversion function. +func Convert_v1alpha3_ClusterResourceSet_To_v1beta1_ClusterResourceSet(in *ClusterResourceSet, out *v1beta1.ClusterResourceSet, s conversion.Scope) error { + return autoConvert_v1alpha3_ClusterResourceSet_To_v1beta1_ClusterResourceSet(in, out, s) } -func autoConvert_v1alpha4_ClusterResourceSet_To_v1alpha3_ClusterResourceSet(in *v1alpha4.ClusterResourceSet, out *ClusterResourceSet, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterResourceSet_To_v1alpha3_ClusterResourceSet(in *v1beta1.ClusterResourceSet, out *ClusterResourceSet, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_ClusterResourceSet_To_v1alpha3_ClusterResourceSet is an autogenerated conversion function. -func Convert_v1alpha4_ClusterResourceSet_To_v1alpha3_ClusterResourceSet(in *v1alpha4.ClusterResourceSet, out *ClusterResourceSet, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterResourceSet_To_v1alpha3_ClusterResourceSet(in, out, s) +// Convert_v1beta1_ClusterResourceSet_To_v1alpha3_ClusterResourceSet is an autogenerated conversion function. +func Convert_v1beta1_ClusterResourceSet_To_v1alpha3_ClusterResourceSet(in *v1beta1.ClusterResourceSet, out *ClusterResourceSet, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterResourceSet_To_v1alpha3_ClusterResourceSet(in, out, s) } -func autoConvert_v1alpha3_ClusterResourceSetBinding_To_v1alpha4_ClusterResourceSetBinding(in *ClusterResourceSetBinding, out *v1alpha4.ClusterResourceSetBinding, s conversion.Scope) error { +func autoConvert_v1alpha3_ClusterResourceSetBinding_To_v1beta1_ClusterResourceSetBinding(in *ClusterResourceSetBinding, out *v1beta1.ClusterResourceSetBinding, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_ClusterResourceSetBindingSpec_To_v1alpha4_ClusterResourceSetBindingSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_ClusterResourceSetBindingSpec_To_v1beta1_ClusterResourceSetBindingSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha3_ClusterResourceSetBinding_To_v1alpha4_ClusterResourceSetBinding is an autogenerated conversion function. -func Convert_v1alpha3_ClusterResourceSetBinding_To_v1alpha4_ClusterResourceSetBinding(in *ClusterResourceSetBinding, out *v1alpha4.ClusterResourceSetBinding, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterResourceSetBinding_To_v1alpha4_ClusterResourceSetBinding(in, out, s) +// Convert_v1alpha3_ClusterResourceSetBinding_To_v1beta1_ClusterResourceSetBinding is an autogenerated conversion function. +func Convert_v1alpha3_ClusterResourceSetBinding_To_v1beta1_ClusterResourceSetBinding(in *ClusterResourceSetBinding, out *v1beta1.ClusterResourceSetBinding, s conversion.Scope) error { + return autoConvert_v1alpha3_ClusterResourceSetBinding_To_v1beta1_ClusterResourceSetBinding(in, out, s) } -func autoConvert_v1alpha4_ClusterResourceSetBinding_To_v1alpha3_ClusterResourceSetBinding(in *v1alpha4.ClusterResourceSetBinding, out *ClusterResourceSetBinding, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterResourceSetBinding_To_v1alpha3_ClusterResourceSetBinding(in *v1beta1.ClusterResourceSetBinding, out *ClusterResourceSetBinding, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha4_ClusterResourceSetBinding_To_v1alpha3_ClusterResourceSetBinding is an autogenerated conversion function. -func Convert_v1alpha4_ClusterResourceSetBinding_To_v1alpha3_ClusterResourceSetBinding(in *v1alpha4.ClusterResourceSetBinding, out *ClusterResourceSetBinding, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterResourceSetBinding_To_v1alpha3_ClusterResourceSetBinding(in, out, s) +// Convert_v1beta1_ClusterResourceSetBinding_To_v1alpha3_ClusterResourceSetBinding is an autogenerated conversion function. +func Convert_v1beta1_ClusterResourceSetBinding_To_v1alpha3_ClusterResourceSetBinding(in *v1beta1.ClusterResourceSetBinding, out *ClusterResourceSetBinding, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterResourceSetBinding_To_v1alpha3_ClusterResourceSetBinding(in, out, s) } -func autoConvert_v1alpha3_ClusterResourceSetBindingList_To_v1alpha4_ClusterResourceSetBindingList(in *ClusterResourceSetBindingList, out *v1alpha4.ClusterResourceSetBindingList, s conversion.Scope) error { +func autoConvert_v1alpha3_ClusterResourceSetBindingList_To_v1beta1_ClusterResourceSetBindingList(in *ClusterResourceSetBindingList, out *v1beta1.ClusterResourceSetBindingList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha4.ClusterResourceSetBinding)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]v1beta1.ClusterResourceSetBinding)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_ClusterResourceSetBindingList_To_v1alpha4_ClusterResourceSetBindingList is an autogenerated conversion function. -func Convert_v1alpha3_ClusterResourceSetBindingList_To_v1alpha4_ClusterResourceSetBindingList(in *ClusterResourceSetBindingList, out *v1alpha4.ClusterResourceSetBindingList, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterResourceSetBindingList_To_v1alpha4_ClusterResourceSetBindingList(in, out, s) +// Convert_v1alpha3_ClusterResourceSetBindingList_To_v1beta1_ClusterResourceSetBindingList is an autogenerated conversion function. +func Convert_v1alpha3_ClusterResourceSetBindingList_To_v1beta1_ClusterResourceSetBindingList(in *ClusterResourceSetBindingList, out *v1beta1.ClusterResourceSetBindingList, s conversion.Scope) error { + return autoConvert_v1alpha3_ClusterResourceSetBindingList_To_v1beta1_ClusterResourceSetBindingList(in, out, s) } -func autoConvert_v1alpha4_ClusterResourceSetBindingList_To_v1alpha3_ClusterResourceSetBindingList(in *v1alpha4.ClusterResourceSetBindingList, out *ClusterResourceSetBindingList, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterResourceSetBindingList_To_v1alpha3_ClusterResourceSetBindingList(in *v1beta1.ClusterResourceSetBindingList, out *ClusterResourceSetBindingList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]ClusterResourceSetBinding)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha4_ClusterResourceSetBindingList_To_v1alpha3_ClusterResourceSetBindingList is an autogenerated conversion function. -func Convert_v1alpha4_ClusterResourceSetBindingList_To_v1alpha3_ClusterResourceSetBindingList(in *v1alpha4.ClusterResourceSetBindingList, out *ClusterResourceSetBindingList, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterResourceSetBindingList_To_v1alpha3_ClusterResourceSetBindingList(in, out, s) +// Convert_v1beta1_ClusterResourceSetBindingList_To_v1alpha3_ClusterResourceSetBindingList is an autogenerated conversion function. +func Convert_v1beta1_ClusterResourceSetBindingList_To_v1alpha3_ClusterResourceSetBindingList(in *v1beta1.ClusterResourceSetBindingList, out *ClusterResourceSetBindingList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterResourceSetBindingList_To_v1alpha3_ClusterResourceSetBindingList(in, out, s) } -func autoConvert_v1alpha3_ClusterResourceSetBindingSpec_To_v1alpha4_ClusterResourceSetBindingSpec(in *ClusterResourceSetBindingSpec, out *v1alpha4.ClusterResourceSetBindingSpec, s conversion.Scope) error { - out.Bindings = *(*[]*v1alpha4.ResourceSetBinding)(unsafe.Pointer(&in.Bindings)) +func autoConvert_v1alpha3_ClusterResourceSetBindingSpec_To_v1beta1_ClusterResourceSetBindingSpec(in *ClusterResourceSetBindingSpec, out *v1beta1.ClusterResourceSetBindingSpec, s conversion.Scope) error { + out.Bindings = *(*[]*v1beta1.ResourceSetBinding)(unsafe.Pointer(&in.Bindings)) return nil } -// Convert_v1alpha3_ClusterResourceSetBindingSpec_To_v1alpha4_ClusterResourceSetBindingSpec is an autogenerated conversion function. -func Convert_v1alpha3_ClusterResourceSetBindingSpec_To_v1alpha4_ClusterResourceSetBindingSpec(in *ClusterResourceSetBindingSpec, out *v1alpha4.ClusterResourceSetBindingSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterResourceSetBindingSpec_To_v1alpha4_ClusterResourceSetBindingSpec(in, out, s) +// Convert_v1alpha3_ClusterResourceSetBindingSpec_To_v1beta1_ClusterResourceSetBindingSpec is an autogenerated conversion function. +func Convert_v1alpha3_ClusterResourceSetBindingSpec_To_v1beta1_ClusterResourceSetBindingSpec(in *ClusterResourceSetBindingSpec, out *v1beta1.ClusterResourceSetBindingSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_ClusterResourceSetBindingSpec_To_v1beta1_ClusterResourceSetBindingSpec(in, out, s) } -func autoConvert_v1alpha4_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec(in *v1alpha4.ClusterResourceSetBindingSpec, out *ClusterResourceSetBindingSpec, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec(in *v1beta1.ClusterResourceSetBindingSpec, out *ClusterResourceSetBindingSpec, s conversion.Scope) error { out.Bindings = *(*[]*ResourceSetBinding)(unsafe.Pointer(&in.Bindings)) return nil } -// Convert_v1alpha4_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec is an autogenerated conversion function. -func Convert_v1alpha4_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec(in *v1alpha4.ClusterResourceSetBindingSpec, out *ClusterResourceSetBindingSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec(in, out, s) +// Convert_v1beta1_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec is an autogenerated conversion function. +func Convert_v1beta1_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec(in *v1beta1.ClusterResourceSetBindingSpec, out *ClusterResourceSetBindingSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterResourceSetBindingSpec_To_v1alpha3_ClusterResourceSetBindingSpec(in, out, s) } -func autoConvert_v1alpha3_ClusterResourceSetList_To_v1alpha4_ClusterResourceSetList(in *ClusterResourceSetList, out *v1alpha4.ClusterResourceSetList, s conversion.Scope) error { +func autoConvert_v1alpha3_ClusterResourceSetList_To_v1beta1_ClusterResourceSetList(in *ClusterResourceSetList, out *v1beta1.ClusterResourceSetList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.ClusterResourceSet, len(*in)) + *out = make([]v1beta1.ClusterResourceSet, len(*in)) for i := range *in { - if err := Convert_v1alpha3_ClusterResourceSet_To_v1alpha4_ClusterResourceSet(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_ClusterResourceSet_To_v1beta1_ClusterResourceSet(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -257,18 +257,18 @@ func autoConvert_v1alpha3_ClusterResourceSetList_To_v1alpha4_ClusterResourceSetL return nil } -// Convert_v1alpha3_ClusterResourceSetList_To_v1alpha4_ClusterResourceSetList is an autogenerated conversion function. -func Convert_v1alpha3_ClusterResourceSetList_To_v1alpha4_ClusterResourceSetList(in *ClusterResourceSetList, out *v1alpha4.ClusterResourceSetList, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterResourceSetList_To_v1alpha4_ClusterResourceSetList(in, out, s) +// Convert_v1alpha3_ClusterResourceSetList_To_v1beta1_ClusterResourceSetList is an autogenerated conversion function. +func Convert_v1alpha3_ClusterResourceSetList_To_v1beta1_ClusterResourceSetList(in *ClusterResourceSetList, out *v1beta1.ClusterResourceSetList, s conversion.Scope) error { + return autoConvert_v1alpha3_ClusterResourceSetList_To_v1beta1_ClusterResourceSetList(in, out, s) } -func autoConvert_v1alpha4_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetList(in *v1alpha4.ClusterResourceSetList, out *ClusterResourceSetList, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetList(in *v1beta1.ClusterResourceSetList, out *ClusterResourceSetList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ClusterResourceSet, len(*in)) for i := range *in { - if err := Convert_v1alpha4_ClusterResourceSet_To_v1alpha3_ClusterResourceSet(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_ClusterResourceSet_To_v1alpha3_ClusterResourceSet(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -278,42 +278,42 @@ func autoConvert_v1alpha4_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetL return nil } -// Convert_v1alpha4_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetList is an autogenerated conversion function. -func Convert_v1alpha4_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetList(in *v1alpha4.ClusterResourceSetList, out *ClusterResourceSetList, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetList(in, out, s) +// Convert_v1beta1_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetList is an autogenerated conversion function. +func Convert_v1beta1_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetList(in *v1beta1.ClusterResourceSetList, out *ClusterResourceSetList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterResourceSetList_To_v1alpha3_ClusterResourceSetList(in, out, s) } -func autoConvert_v1alpha3_ClusterResourceSetSpec_To_v1alpha4_ClusterResourceSetSpec(in *ClusterResourceSetSpec, out *v1alpha4.ClusterResourceSetSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_ClusterResourceSetSpec_To_v1beta1_ClusterResourceSetSpec(in *ClusterResourceSetSpec, out *v1beta1.ClusterResourceSetSpec, s conversion.Scope) error { out.ClusterSelector = in.ClusterSelector - out.Resources = *(*[]v1alpha4.ResourceRef)(unsafe.Pointer(&in.Resources)) + out.Resources = *(*[]v1beta1.ResourceRef)(unsafe.Pointer(&in.Resources)) out.Strategy = in.Strategy return nil } -// Convert_v1alpha3_ClusterResourceSetSpec_To_v1alpha4_ClusterResourceSetSpec is an autogenerated conversion function. -func Convert_v1alpha3_ClusterResourceSetSpec_To_v1alpha4_ClusterResourceSetSpec(in *ClusterResourceSetSpec, out *v1alpha4.ClusterResourceSetSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterResourceSetSpec_To_v1alpha4_ClusterResourceSetSpec(in, out, s) +// Convert_v1alpha3_ClusterResourceSetSpec_To_v1beta1_ClusterResourceSetSpec is an autogenerated conversion function. +func Convert_v1alpha3_ClusterResourceSetSpec_To_v1beta1_ClusterResourceSetSpec(in *ClusterResourceSetSpec, out *v1beta1.ClusterResourceSetSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_ClusterResourceSetSpec_To_v1beta1_ClusterResourceSetSpec(in, out, s) } -func autoConvert_v1alpha4_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec(in *v1alpha4.ClusterResourceSetSpec, out *ClusterResourceSetSpec, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec(in *v1beta1.ClusterResourceSetSpec, out *ClusterResourceSetSpec, s conversion.Scope) error { out.ClusterSelector = in.ClusterSelector out.Resources = *(*[]ResourceRef)(unsafe.Pointer(&in.Resources)) out.Strategy = in.Strategy return nil } -// Convert_v1alpha4_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec is an autogenerated conversion function. -func Convert_v1alpha4_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec(in *v1alpha4.ClusterResourceSetSpec, out *ClusterResourceSetSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec(in, out, s) +// Convert_v1beta1_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec is an autogenerated conversion function. +func Convert_v1beta1_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec(in *v1beta1.ClusterResourceSetSpec, out *ClusterResourceSetSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterResourceSetSpec_To_v1alpha3_ClusterResourceSetSpec(in, out, s) } -func autoConvert_v1alpha3_ClusterResourceSetStatus_To_v1alpha4_ClusterResourceSetStatus(in *ClusterResourceSetStatus, out *v1alpha4.ClusterResourceSetStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_ClusterResourceSetStatus_To_v1beta1_ClusterResourceSetStatus(in *ClusterResourceSetStatus, out *v1beta1.ClusterResourceSetStatus, s conversion.Scope) error { out.ObservedGeneration = in.ObservedGeneration if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) + *out = make(apiv1beta1.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -323,18 +323,18 @@ func autoConvert_v1alpha3_ClusterResourceSetStatus_To_v1alpha4_ClusterResourceSe return nil } -// Convert_v1alpha3_ClusterResourceSetStatus_To_v1alpha4_ClusterResourceSetStatus is an autogenerated conversion function. -func Convert_v1alpha3_ClusterResourceSetStatus_To_v1alpha4_ClusterResourceSetStatus(in *ClusterResourceSetStatus, out *v1alpha4.ClusterResourceSetStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_ClusterResourceSetStatus_To_v1alpha4_ClusterResourceSetStatus(in, out, s) +// Convert_v1alpha3_ClusterResourceSetStatus_To_v1beta1_ClusterResourceSetStatus is an autogenerated conversion function. +func Convert_v1alpha3_ClusterResourceSetStatus_To_v1beta1_ClusterResourceSetStatus(in *ClusterResourceSetStatus, out *v1beta1.ClusterResourceSetStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_ClusterResourceSetStatus_To_v1beta1_ClusterResourceSetStatus(in, out, s) } -func autoConvert_v1alpha4_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus(in *v1alpha4.ClusterResourceSetStatus, out *ClusterResourceSetStatus, s conversion.Scope) error { +func autoConvert_v1beta1_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus(in *v1beta1.ClusterResourceSetStatus, out *ClusterResourceSetStatus, s conversion.Scope) error { out.ObservedGeneration = in.ObservedGeneration if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make(apiv1alpha3.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha4_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -344,13 +344,13 @@ func autoConvert_v1alpha4_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSe return nil } -// Convert_v1alpha4_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus is an autogenerated conversion function. -func Convert_v1alpha4_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus(in *v1alpha4.ClusterResourceSetStatus, out *ClusterResourceSetStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus(in, out, s) +// Convert_v1beta1_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus is an autogenerated conversion function. +func Convert_v1beta1_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus(in *v1beta1.ClusterResourceSetStatus, out *ClusterResourceSetStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterResourceSetStatus_To_v1alpha3_ClusterResourceSetStatus(in, out, s) } -func autoConvert_v1alpha3_ResourceBinding_To_v1alpha4_ResourceBinding(in *ResourceBinding, out *v1alpha4.ResourceBinding, s conversion.Scope) error { - if err := Convert_v1alpha3_ResourceRef_To_v1alpha4_ResourceRef(&in.ResourceRef, &out.ResourceRef, s); err != nil { +func autoConvert_v1alpha3_ResourceBinding_To_v1beta1_ResourceBinding(in *ResourceBinding, out *v1beta1.ResourceBinding, s conversion.Scope) error { + if err := Convert_v1alpha3_ResourceRef_To_v1beta1_ResourceRef(&in.ResourceRef, &out.ResourceRef, s); err != nil { return err } out.Hash = in.Hash @@ -359,13 +359,13 @@ func autoConvert_v1alpha3_ResourceBinding_To_v1alpha4_ResourceBinding(in *Resour return nil } -// Convert_v1alpha3_ResourceBinding_To_v1alpha4_ResourceBinding is an autogenerated conversion function. -func Convert_v1alpha3_ResourceBinding_To_v1alpha4_ResourceBinding(in *ResourceBinding, out *v1alpha4.ResourceBinding, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceBinding_To_v1alpha4_ResourceBinding(in, out, s) +// Convert_v1alpha3_ResourceBinding_To_v1beta1_ResourceBinding is an autogenerated conversion function. +func Convert_v1alpha3_ResourceBinding_To_v1beta1_ResourceBinding(in *ResourceBinding, out *v1beta1.ResourceBinding, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceBinding_To_v1beta1_ResourceBinding(in, out, s) } -func autoConvert_v1alpha4_ResourceBinding_To_v1alpha3_ResourceBinding(in *v1alpha4.ResourceBinding, out *ResourceBinding, s conversion.Scope) error { - if err := Convert_v1alpha4_ResourceRef_To_v1alpha3_ResourceRef(&in.ResourceRef, &out.ResourceRef, s); err != nil { +func autoConvert_v1beta1_ResourceBinding_To_v1alpha3_ResourceBinding(in *v1beta1.ResourceBinding, out *ResourceBinding, s conversion.Scope) error { + if err := Convert_v1beta1_ResourceRef_To_v1alpha3_ResourceRef(&in.ResourceRef, &out.ResourceRef, s); err != nil { return err } out.Hash = in.Hash @@ -374,51 +374,51 @@ func autoConvert_v1alpha4_ResourceBinding_To_v1alpha3_ResourceBinding(in *v1alph return nil } -// Convert_v1alpha4_ResourceBinding_To_v1alpha3_ResourceBinding is an autogenerated conversion function. -func Convert_v1alpha4_ResourceBinding_To_v1alpha3_ResourceBinding(in *v1alpha4.ResourceBinding, out *ResourceBinding, s conversion.Scope) error { - return autoConvert_v1alpha4_ResourceBinding_To_v1alpha3_ResourceBinding(in, out, s) +// Convert_v1beta1_ResourceBinding_To_v1alpha3_ResourceBinding is an autogenerated conversion function. +func Convert_v1beta1_ResourceBinding_To_v1alpha3_ResourceBinding(in *v1beta1.ResourceBinding, out *ResourceBinding, s conversion.Scope) error { + return autoConvert_v1beta1_ResourceBinding_To_v1alpha3_ResourceBinding(in, out, s) } -func autoConvert_v1alpha3_ResourceRef_To_v1alpha4_ResourceRef(in *ResourceRef, out *v1alpha4.ResourceRef, s conversion.Scope) error { +func autoConvert_v1alpha3_ResourceRef_To_v1beta1_ResourceRef(in *ResourceRef, out *v1beta1.ResourceRef, s conversion.Scope) error { out.Name = in.Name out.Kind = in.Kind return nil } -// Convert_v1alpha3_ResourceRef_To_v1alpha4_ResourceRef is an autogenerated conversion function. -func Convert_v1alpha3_ResourceRef_To_v1alpha4_ResourceRef(in *ResourceRef, out *v1alpha4.ResourceRef, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceRef_To_v1alpha4_ResourceRef(in, out, s) +// Convert_v1alpha3_ResourceRef_To_v1beta1_ResourceRef is an autogenerated conversion function. +func Convert_v1alpha3_ResourceRef_To_v1beta1_ResourceRef(in *ResourceRef, out *v1beta1.ResourceRef, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceRef_To_v1beta1_ResourceRef(in, out, s) } -func autoConvert_v1alpha4_ResourceRef_To_v1alpha3_ResourceRef(in *v1alpha4.ResourceRef, out *ResourceRef, s conversion.Scope) error { +func autoConvert_v1beta1_ResourceRef_To_v1alpha3_ResourceRef(in *v1beta1.ResourceRef, out *ResourceRef, s conversion.Scope) error { out.Name = in.Name out.Kind = in.Kind return nil } -// Convert_v1alpha4_ResourceRef_To_v1alpha3_ResourceRef is an autogenerated conversion function. -func Convert_v1alpha4_ResourceRef_To_v1alpha3_ResourceRef(in *v1alpha4.ResourceRef, out *ResourceRef, s conversion.Scope) error { - return autoConvert_v1alpha4_ResourceRef_To_v1alpha3_ResourceRef(in, out, s) +// Convert_v1beta1_ResourceRef_To_v1alpha3_ResourceRef is an autogenerated conversion function. +func Convert_v1beta1_ResourceRef_To_v1alpha3_ResourceRef(in *v1beta1.ResourceRef, out *ResourceRef, s conversion.Scope) error { + return autoConvert_v1beta1_ResourceRef_To_v1alpha3_ResourceRef(in, out, s) } -func autoConvert_v1alpha3_ResourceSetBinding_To_v1alpha4_ResourceSetBinding(in *ResourceSetBinding, out *v1alpha4.ResourceSetBinding, s conversion.Scope) error { +func autoConvert_v1alpha3_ResourceSetBinding_To_v1beta1_ResourceSetBinding(in *ResourceSetBinding, out *v1beta1.ResourceSetBinding, s conversion.Scope) error { out.ClusterResourceSetName = in.ClusterResourceSetName - out.Resources = *(*[]v1alpha4.ResourceBinding)(unsafe.Pointer(&in.Resources)) + out.Resources = *(*[]v1beta1.ResourceBinding)(unsafe.Pointer(&in.Resources)) return nil } -// Convert_v1alpha3_ResourceSetBinding_To_v1alpha4_ResourceSetBinding is an autogenerated conversion function. -func Convert_v1alpha3_ResourceSetBinding_To_v1alpha4_ResourceSetBinding(in *ResourceSetBinding, out *v1alpha4.ResourceSetBinding, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceSetBinding_To_v1alpha4_ResourceSetBinding(in, out, s) +// Convert_v1alpha3_ResourceSetBinding_To_v1beta1_ResourceSetBinding is an autogenerated conversion function. +func Convert_v1alpha3_ResourceSetBinding_To_v1beta1_ResourceSetBinding(in *ResourceSetBinding, out *v1beta1.ResourceSetBinding, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceSetBinding_To_v1beta1_ResourceSetBinding(in, out, s) } -func autoConvert_v1alpha4_ResourceSetBinding_To_v1alpha3_ResourceSetBinding(in *v1alpha4.ResourceSetBinding, out *ResourceSetBinding, s conversion.Scope) error { +func autoConvert_v1beta1_ResourceSetBinding_To_v1alpha3_ResourceSetBinding(in *v1beta1.ResourceSetBinding, out *ResourceSetBinding, s conversion.Scope) error { out.ClusterResourceSetName = in.ClusterResourceSetName out.Resources = *(*[]ResourceBinding)(unsafe.Pointer(&in.Resources)) return nil } -// Convert_v1alpha4_ResourceSetBinding_To_v1alpha3_ResourceSetBinding is an autogenerated conversion function. -func Convert_v1alpha4_ResourceSetBinding_To_v1alpha3_ResourceSetBinding(in *v1alpha4.ResourceSetBinding, out *ResourceSetBinding, s conversion.Scope) error { - return autoConvert_v1alpha4_ResourceSetBinding_To_v1alpha3_ResourceSetBinding(in, out, s) +// Convert_v1beta1_ResourceSetBinding_To_v1alpha3_ResourceSetBinding is an autogenerated conversion function. +func Convert_v1beta1_ResourceSetBinding_To_v1alpha3_ResourceSetBinding(in *v1beta1.ResourceSetBinding, out *ResourceSetBinding, s conversion.Scope) error { + return autoConvert_v1beta1_ResourceSetBinding_To_v1alpha3_ResourceSetBinding(in, out, s) } diff --git a/exp/addons/api/v1alpha4/clusterresourceset_types.go b/exp/addons/api/v1alpha4/clusterresourceset_types.go index fa5e1600d50e..0f15fc248e6d 100644 --- a/exp/addons/api/v1alpha4/clusterresourceset_types.go +++ b/exp/addons/api/v1alpha4/clusterresourceset_types.go @@ -19,7 +19,7 @@ package v1alpha4 import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) const ( @@ -113,7 +113,6 @@ func (m *ClusterResourceSet) SetConditions(conditions clusterv1.Conditions) { // +kubebuilder:object:root=true // +kubebuilder:resource:path=clusterresourcesets,scope=Namespaced,categories=cluster-api // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ClusterResourceSet" // ClusterResourceSet is the Schema for the clusterresourcesets API. diff --git a/exp/addons/api/v1alpha4/clusterresourcesetbinding_types.go b/exp/addons/api/v1alpha4/clusterresourcesetbinding_types.go index b7fe09e57059..b772d220c009 100644 --- a/exp/addons/api/v1alpha4/clusterresourcesetbinding_types.go +++ b/exp/addons/api/v1alpha4/clusterresourcesetbinding_types.go @@ -103,7 +103,6 @@ func (c *ClusterResourceSetBinding) DeleteBinding(clusterResourceSet *ClusterRes // +kubebuilder:object:root=true // +kubebuilder:resource:path=clusterresourcesetbindings,scope=Namespaced,categories=cluster-api // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ClusterResourceSetBinding" // ClusterResourceSetBinding lists all matching ClusterResourceSets with the cluster it belongs to. diff --git a/exp/addons/api/v1alpha4/condition_consts.go b/exp/addons/api/v1alpha4/condition_consts.go index 5bfcc3910bc7..f4961f2bb007 100644 --- a/exp/addons/api/v1alpha4/condition_consts.go +++ b/exp/addons/api/v1alpha4/condition_consts.go @@ -16,7 +16,7 @@ limitations under the License. package v1alpha4 -import clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" +import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" // Conditions and condition Reasons for the ClusterResourceSet object diff --git a/exp/addons/api/v1alpha4/zz_generated.deepcopy.go b/exp/addons/api/v1alpha4/zz_generated.deepcopy.go index 223fc46221b1..d9d0452647d7 100644 --- a/exp/addons/api/v1alpha4/zz_generated.deepcopy.go +++ b/exp/addons/api/v1alpha4/zz_generated.deepcopy.go @@ -21,8 +21,8 @@ limitations under the License. package v1alpha4 import ( - "k8s.io/apimachinery/pkg/runtime" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" + runtime "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/cluster-api/api/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -194,7 +194,7 @@ func (in *ClusterResourceSetStatus) DeepCopyInto(out *ClusterResourceSetStatus) *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) + *out = make(v1beta1.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/exp/addons/api/v1beta1/clusterresourceset_types.go b/exp/addons/api/v1beta1/clusterresourceset_types.go new file mode 100644 index 000000000000..4c3a74b106b9 --- /dev/null +++ b/exp/addons/api/v1beta1/clusterresourceset_types.go @@ -0,0 +1,139 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" +) + +const ( + // ClusterResourceSetSecretType is the only accepted type of secret in resources. + ClusterResourceSetSecretType corev1.SecretType = "addons.cluster.x-k8s.io/resource-set" //nolint:gosec + + // ClusterResourceSetFinalizer is added to the ClusterResourceSet object for additional cleanup logic on deletion. + ClusterResourceSetFinalizer = "addons.cluster.x-k8s.io" +) + +// ANCHOR: ClusterResourceSetSpec + +// ClusterResourceSetSpec defines the desired state of ClusterResourceSet. +type ClusterResourceSetSpec struct { + // Label selector for Clusters. The Clusters that are + // selected by this will be the ones affected by this ClusterResourceSet. + // It must match the Cluster labels. This field is immutable. + // Label selector cannot be empty. + ClusterSelector metav1.LabelSelector `json:"clusterSelector"` + + // Resources is a list of Secrets/ConfigMaps where each contains 1 or more resources to be applied to remote clusters. + Resources []ResourceRef `json:"resources,omitempty"` + + // Strategy is the strategy to be used during applying resources. Defaults to ApplyOnce. This field is immutable. + // +kubebuilder:validation:Enum=ApplyOnce + // +optional + Strategy string `json:"strategy,omitempty"` +} + +// ANCHOR_END: ClusterResourceSetSpec + +// ClusterResourceSetResourceKind is a string representation of a ClusterResourceSet resource kind. +type ClusterResourceSetResourceKind string + +// Define the ClusterResourceSetResourceKind constants. +const ( + SecretClusterResourceSetResourceKind ClusterResourceSetResourceKind = "Secret" + ConfigMapClusterResourceSetResourceKind ClusterResourceSetResourceKind = "ConfigMap" +) + +// ResourceRef specifies a resource. +type ResourceRef struct { + // Name of the resource that is in the same namespace with ClusterResourceSet object. + // +kubebuilder:validation:MinLength=1 + Name string `json:"name"` + + // Kind of the resource. Supported kinds are: Secrets and ConfigMaps. + // +kubebuilder:validation:Enum=Secret;ConfigMap + Kind string `json:"kind"` +} + +// ClusterResourceSetStrategy is a string representation of a ClusterResourceSet Strategy. +type ClusterResourceSetStrategy string + +const ( + // ClusterResourceSetStrategyApplyOnce is the default strategy a ClusterResourceSet strategy is assigned by + // ClusterResourceSet controller after being created if not specified by user. + ClusterResourceSetStrategyApplyOnce ClusterResourceSetStrategy = "ApplyOnce" +) + +// SetTypedStrategy sets the Strategy field to the string representation of ClusterResourceSetStrategy. +func (c *ClusterResourceSetSpec) SetTypedStrategy(p ClusterResourceSetStrategy) { + c.Strategy = string(p) +} + +// ANCHOR: ClusterResourceSetStatus + +// ClusterResourceSetStatus defines the observed state of ClusterResourceSet. +type ClusterResourceSetStatus struct { + // ObservedGeneration reflects the generation of the most recently observed ClusterResourceSet. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // Conditions defines current state of the ClusterResourceSet. + // +optional + Conditions clusterv1.Conditions `json:"conditions,omitempty"` +} + +// ANCHOR_END: ClusterResourceSetStatus + +// GetConditions returns the set of conditions for this object. +func (m *ClusterResourceSet) GetConditions() clusterv1.Conditions { + return m.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (m *ClusterResourceSet) SetConditions(conditions clusterv1.Conditions) { + m.Status.Conditions = conditions +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=clusterresourcesets,scope=Namespaced,categories=cluster-api +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ClusterResourceSet" + +// ClusterResourceSet is the Schema for the clusterresourcesets API. +type ClusterResourceSet struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ClusterResourceSetSpec `json:"spec,omitempty"` + Status ClusterResourceSetStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ClusterResourceSetList contains a list of ClusterResourceSet. +type ClusterResourceSetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterResourceSet `json:"items"` +} + +func init() { + SchemeBuilder.Register(&ClusterResourceSet{}, &ClusterResourceSetList{}) +} diff --git a/exp/addons/api/v1alpha4/clusterresourceset_webhook.go b/exp/addons/api/v1beta1/clusterresourceset_webhook.go similarity index 85% rename from exp/addons/api/v1alpha4/clusterresourceset_webhook.go rename to exp/addons/api/v1beta1/clusterresourceset_webhook.go index d43f52f9c020..e0dc70c253c4 100644 --- a/exp/addons/api/v1alpha4/clusterresourceset_webhook.go +++ b/exp/addons/api/v1beta1/clusterresourceset_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -34,8 +34,8 @@ func (m *ClusterResourceSet) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/validate-addons-cluster-x-k8s-io-v1alpha4-clusterresourceset,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=addons.cluster.x-k8s.io,resources=clusterresourcesets,versions=v1alpha4,name=validation.clusterresourceset.addons.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:webhook:verbs=create;update,path=/mutate-addons-cluster-x-k8s-io-v1alpha4-clusterresourceset,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=addons.cluster.x-k8s.io,resources=clusterresourcesets,versions=v1alpha4,name=default.clusterresourceset.addons.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-addons-cluster-x-k8s-io-v1beta1-clusterresourceset,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=addons.cluster.x-k8s.io,resources=clusterresourcesets,versions=v1beta1,name=validation.clusterresourceset.addons.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-addons-cluster-x-k8s-io-v1beta1-clusterresourceset,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=addons.cluster.x-k8s.io,resources=clusterresourcesets,versions=v1beta1,name=default.clusterresourceset.addons.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &ClusterResourceSet{} var _ webhook.Validator = &ClusterResourceSet{} diff --git a/exp/addons/api/v1alpha4/clusterresourceset_webhook_test.go b/exp/addons/api/v1beta1/clusterresourceset_webhook_test.go similarity index 99% rename from exp/addons/api/v1alpha4/clusterresourceset_webhook_test.go rename to exp/addons/api/v1beta1/clusterresourceset_webhook_test.go index 7e2b8a3915b2..370a8968e7a4 100644 --- a/exp/addons/api/v1alpha4/clusterresourceset_webhook_test.go +++ b/exp/addons/api/v1beta1/clusterresourceset_webhook_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/exp/addons/api/v1beta1/clusterresourcesetbinding_types.go b/exp/addons/api/v1beta1/clusterresourcesetbinding_types.go new file mode 100644 index 000000000000..a3be04130fb6 --- /dev/null +++ b/exp/addons/api/v1beta1/clusterresourcesetbinding_types.go @@ -0,0 +1,137 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 ( + "reflect" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ANCHOR: ResourceBinding + +// ResourceBinding shows the status of a resource that belongs to a ClusterResourceSet matched by the owner cluster of the ClusterResourceSetBinding object. +type ResourceBinding struct { + // ResourceRef specifies a resource. + ResourceRef `json:",inline"` + + // Hash is the hash of a resource's data. This can be used to decide if a resource is changed. + // For "ApplyOnce" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change. + Hash string `json:"hash,omitempty"` + + // LastAppliedTime identifies when this resource was last applied to the cluster. + // +optional + LastAppliedTime *metav1.Time `json:"lastAppliedTime,omitempty"` + + // Applied is to track if a resource is applied to the cluster or not. + Applied bool `json:"applied"` +} + +// ANCHOR_END: ResourceBinding + +// ResourceSetBinding keeps info on all of the resources in a ClusterResourceSet. +type ResourceSetBinding struct { + // ClusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding. + ClusterResourceSetName string `json:"clusterResourceSetName"` + + // Resources is a list of resources that the ClusterResourceSet has. + Resources []ResourceBinding `json:"resources,omitempty"` +} + +// IsApplied returns true if the resource is applied to the cluster by checking the cluster's binding. +func (r *ResourceSetBinding) IsApplied(resourceRef ResourceRef) bool { + for _, resource := range r.Resources { + if reflect.DeepEqual(resource.ResourceRef, resourceRef) { + if resource.Applied { + return true + } + } + } + return false +} + +// SetBinding sets resourceBinding for a resource in resourceSetbinding either by updating the existing one or +// creating a new one. +func (r *ResourceSetBinding) SetBinding(resourceBinding ResourceBinding) { + for i := range r.Resources { + if reflect.DeepEqual(r.Resources[i].ResourceRef, resourceBinding.ResourceRef) { + r.Resources[i] = resourceBinding + return + } + } + r.Resources = append(r.Resources, resourceBinding) +} + +// GetOrCreateBinding returns the ResourceSetBinding for a given ClusterResourceSet if exists, +// otherwise creates one and updates ClusterResourceSet with it. +func (c *ClusterResourceSetBinding) GetOrCreateBinding(clusterResourceSet *ClusterResourceSet) *ResourceSetBinding { + for _, binding := range c.Spec.Bindings { + if binding.ClusterResourceSetName == clusterResourceSet.Name { + return binding + } + } + binding := &ResourceSetBinding{ClusterResourceSetName: clusterResourceSet.Name, Resources: []ResourceBinding{}} + c.Spec.Bindings = append(c.Spec.Bindings, binding) + return binding +} + +// DeleteBinding removes the ClusterResourceSet from the ClusterResourceSetBinding Bindings list. +func (c *ClusterResourceSetBinding) DeleteBinding(clusterResourceSet *ClusterResourceSet) { + for i, binding := range c.Spec.Bindings { + if binding.ClusterResourceSetName == clusterResourceSet.Name { + copy(c.Spec.Bindings[i:], c.Spec.Bindings[i+1:]) + c.Spec.Bindings = c.Spec.Bindings[:len(c.Spec.Bindings)-1] + break + } + } +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=clusterresourcesetbindings,scope=Namespaced,categories=cluster-api +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ClusterResourceSetBinding" + +// ClusterResourceSetBinding lists all matching ClusterResourceSets with the cluster it belongs to. +type ClusterResourceSetBinding struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ClusterResourceSetBindingSpec `json:"spec,omitempty"` +} + +// ANCHOR: ClusterResourceSetBindingSpec + +// ClusterResourceSetBindingSpec defines the desired state of ClusterResourceSetBinding. +type ClusterResourceSetBindingSpec struct { + // Bindings is a list of ClusterResourceSets and their resources. + Bindings []*ResourceSetBinding `json:"bindings,omitempty"` +} + +// ANCHOR_END: ClusterResourceSetBindingSpec + +// +kubebuilder:object:root=true + +// ClusterResourceSetBindingList contains a list of ClusterResourceSetBinding. +type ClusterResourceSetBindingList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterResourceSetBinding `json:"items"` +} + +func init() { + SchemeBuilder.Register(&ClusterResourceSetBinding{}, &ClusterResourceSetBindingList{}) +} diff --git a/exp/addons/api/v1beta1/clusterresourcesetbinding_types_test.go b/exp/addons/api/v1beta1/clusterresourcesetbinding_types_test.go new file mode 100644 index 000000000000..ac50831ca99f --- /dev/null +++ b/exp/addons/api/v1beta1/clusterresourcesetbinding_types_test.go @@ -0,0 +1,159 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 ( + "reflect" + "testing" + "time" + + . "github.com/onsi/gomega" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestIsResourceApplied(t *testing.T) { + resourceRefApplyFailed := ResourceRef{ + Name: "applyFailed", + Kind: "Secret", + } + resourceRefApplySucceeded := ResourceRef{ + Name: "ApplySucceeded", + Kind: "Secret", + } + resourceRefNotExist := ResourceRef{ + Name: "notExist", + Kind: "Secret", + } + CRSBinding := &ResourceSetBinding{ + ClusterResourceSetName: "test-clusterResourceSet", + Resources: []ResourceBinding{ + { + ResourceRef: resourceRefApplySucceeded, + Applied: true, + Hash: "xyz", + LastAppliedTime: &metav1.Time{Time: time.Now().UTC()}, + }, + { + ResourceRef: resourceRefApplyFailed, + Applied: false, + Hash: "", + LastAppliedTime: &metav1.Time{Time: time.Now().UTC()}, + }, + }, + } + + tests := []struct { + name string + resourceSetBinding *ResourceSetBinding + resourceRef ResourceRef + isApplied bool + }{ + { + name: "should return true if the resource is applied successfully", + resourceSetBinding: CRSBinding, + resourceRef: resourceRefApplySucceeded, + isApplied: true, + }, + { + name: "should return false if the resource apply failed", + resourceSetBinding: CRSBinding, + resourceRef: resourceRefApplyFailed, + isApplied: false, + }, + { + name: "should return false if the resource does not exist", + resourceSetBinding: CRSBinding, + resourceRef: resourceRefNotExist, + isApplied: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + gs := NewWithT(t) + gs.Expect(tt.resourceSetBinding.IsApplied(tt.resourceRef)).To(BeEquivalentTo(tt.isApplied)) + }) + } +} + +func TestSetResourceBinding(t *testing.T) { + resourceRefApplyFailed := ResourceRef{ + Name: "applyFailed", + Kind: "Secret", + } + + CRSBinding := &ResourceSetBinding{ + ClusterResourceSetName: "test-clusterResourceSet", + Resources: []ResourceBinding{ + { + ResourceRef: resourceRefApplyFailed, + Applied: false, + Hash: "", + LastAppliedTime: &metav1.Time{Time: time.Now().UTC()}, + }, + }, + } + updateFailedResourceBinding := ResourceBinding{ + ResourceRef: resourceRefApplyFailed, + Applied: true, + Hash: "xyz", + LastAppliedTime: &metav1.Time{Time: time.Now().UTC()}, + } + + newResourceBinding := ResourceBinding{ + ResourceRef: ResourceRef{ + Name: "newBinding", + Kind: "Secret", + }, + Applied: false, + Hash: "xyz", + LastAppliedTime: &metav1.Time{Time: time.Now().UTC()}, + } + + tests := []struct { + name string + resourceSetBinding *ResourceSetBinding + resourceBinding ResourceBinding + }{ + { + name: "should update resourceSetBinding with new resource binding if not exist", + resourceSetBinding: CRSBinding, + resourceBinding: newResourceBinding, + }, + { + name: "should update Applied if resource failed before", + resourceSetBinding: CRSBinding, + resourceBinding: updateFailedResourceBinding, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + gs := NewWithT(t) + tt.resourceSetBinding.SetBinding(tt.resourceBinding) + exist := false + for _, b := range tt.resourceSetBinding.Resources { + if reflect.DeepEqual(b.ResourceRef, tt.resourceBinding.ResourceRef) { + gs.Expect(tt.resourceBinding.Applied).To(BeEquivalentTo(b.Applied)) + exist = true + } + } + gs.Expect(exist).To(BeTrue()) + }) + } +} diff --git a/exp/addons/api/v1beta1/condition_consts.go b/exp/addons/api/v1beta1/condition_consts.go new file mode 100644 index 000000000000..fd9be0b79475 --- /dev/null +++ b/exp/addons/api/v1beta1/condition_consts.go @@ -0,0 +1,42 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + +// Conditions and condition Reasons for the ClusterResourceSet object + +const ( + // ResourcesAppliedCondition documents that all resources in the ClusterResourceSet object are applied to + // all matching clusters. This indicates all resources exist, and no errors during applying them to all clusters. + ResourcesAppliedCondition clusterv1.ConditionType = "ResourcesApplied" + + // RemoteClusterClientFailedReason (Severity=Error) documents failure during getting the remote cluster client. + RemoteClusterClientFailedReason = "RemoteClusterClientFailed" + + // ClusterMatchFailedReason (Severity=Warning) documents failure getting clusters that match the clusterSelector. + ClusterMatchFailedReason = "ClusterMatchFailed" + + // ApplyFailedReason (Severity=Warning) documents applying at least one of the resources to one of the matching clusters is failed. + ApplyFailedReason = "ApplyFailed" + + // RetrievingResourceFailedReason (Severity=Warning) documents at least one of the resources are not successfully retrieved. + RetrievingResourceFailedReason = "RetrievingResourceFailed" + + // WrongSecretTypeReason (Severity=Warning) documents at least one of the Secret's type in the resource list is not supported. + WrongSecretTypeReason = "WrongSecretType" +) diff --git a/exp/addons/api/v1beta1/doc.go b/exp/addons/api/v1beta1/doc.go new file mode 100644 index 000000000000..f8a9210a0fda --- /dev/null +++ b/exp/addons/api/v1beta1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 diff --git a/exp/addons/api/v1beta1/groupversion_info.go b/exp/addons/api/v1beta1/groupversion_info.go new file mode 100644 index 000000000000..ebfda33de3d0 --- /dev/null +++ b/exp/addons/api/v1beta1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 contains API Schema definitions for the addons v1beta1 API group +// +kubebuilder:object:generate=true +// +groupName=addons.cluster.x-k8s.io +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects. + GroupVersion = schema.GroupVersion{Group: "addons.cluster.x-k8s.io", Version: "v1beta1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/exp/addons/api/v1beta1/zz_generated.deepcopy.go b/exp/addons/api/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000000..419867bf03fb --- /dev/null +++ b/exp/addons/api/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,269 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterResourceSet) DeepCopyInto(out *ClusterResourceSet) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSet. +func (in *ClusterResourceSet) DeepCopy() *ClusterResourceSet { + if in == nil { + return nil + } + out := new(ClusterResourceSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterResourceSet) 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 *ClusterResourceSetBinding) DeepCopyInto(out *ClusterResourceSetBinding) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSetBinding. +func (in *ClusterResourceSetBinding) DeepCopy() *ClusterResourceSetBinding { + if in == nil { + return nil + } + out := new(ClusterResourceSetBinding) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterResourceSetBinding) 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 *ClusterResourceSetBindingList) DeepCopyInto(out *ClusterResourceSetBindingList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterResourceSetBinding, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSetBindingList. +func (in *ClusterResourceSetBindingList) DeepCopy() *ClusterResourceSetBindingList { + if in == nil { + return nil + } + out := new(ClusterResourceSetBindingList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterResourceSetBindingList) 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 *ClusterResourceSetBindingSpec) DeepCopyInto(out *ClusterResourceSetBindingSpec) { + *out = *in + if in.Bindings != nil { + in, out := &in.Bindings, &out.Bindings + *out = make([]*ResourceSetBinding, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(ResourceSetBinding) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSetBindingSpec. +func (in *ClusterResourceSetBindingSpec) DeepCopy() *ClusterResourceSetBindingSpec { + if in == nil { + return nil + } + out := new(ClusterResourceSetBindingSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterResourceSetList) DeepCopyInto(out *ClusterResourceSetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterResourceSet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSetList. +func (in *ClusterResourceSetList) DeepCopy() *ClusterResourceSetList { + if in == nil { + return nil + } + out := new(ClusterResourceSetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterResourceSetList) 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 *ClusterResourceSetSpec) DeepCopyInto(out *ClusterResourceSetSpec) { + *out = *in + in.ClusterSelector.DeepCopyInto(&out.ClusterSelector) + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ResourceRef, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSetSpec. +func (in *ClusterResourceSetSpec) DeepCopy() *ClusterResourceSetSpec { + if in == nil { + return nil + } + out := new(ClusterResourceSetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterResourceSetStatus) DeepCopyInto(out *ClusterResourceSetStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1beta1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSetStatus. +func (in *ClusterResourceSetStatus) DeepCopy() *ClusterResourceSetStatus { + if in == nil { + return nil + } + out := new(ClusterResourceSetStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceBinding) DeepCopyInto(out *ResourceBinding) { + *out = *in + out.ResourceRef = in.ResourceRef + if in.LastAppliedTime != nil { + in, out := &in.LastAppliedTime, &out.LastAppliedTime + *out = (*in).DeepCopy() + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceBinding. +func (in *ResourceBinding) DeepCopy() *ResourceBinding { + if in == nil { + return nil + } + out := new(ResourceBinding) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRef) DeepCopyInto(out *ResourceRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef. +func (in *ResourceRef) DeepCopy() *ResourceRef { + if in == nil { + return nil + } + out := new(ResourceRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceSetBinding) DeepCopyInto(out *ResourceSetBinding) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ResourceBinding, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSetBinding. +func (in *ResourceSetBinding) DeepCopy() *ResourceSetBinding { + if in == nil { + return nil + } + out := new(ResourceSetBinding) + in.DeepCopyInto(out) + return out +} diff --git a/exp/addons/controllers/clusterresourceset_controller.go b/exp/addons/controllers/clusterresourceset_controller.go index 7b395c8e69f1..54c70ff59660 100644 --- a/exp/addons/controllers/clusterresourceset_controller.go +++ b/exp/addons/controllers/clusterresourceset_controller.go @@ -31,9 +31,9 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" kerrors "k8s.io/apimachinery/pkg/util/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" resourcepredicates "sigs.k8s.io/cluster-api/exp/addons/controllers/predicates" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/exp/addons/controllers/clusterresourceset_controller_test.go b/exp/addons/controllers/clusterresourceset_controller_test.go index d1beea996d14..3d77b4c66bf1 100644 --- a/exp/addons/controllers/clusterresourceset_controller_test.go +++ b/exp/addons/controllers/clusterresourceset_controller_test.go @@ -27,8 +27,8 @@ import ( corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/exp/addons/controllers/clusterresourceset_helpers.go b/exp/addons/controllers/clusterresourceset_helpers.go index 681768ec6e8e..fe66bf2cb92d 100644 --- a/exp/addons/controllers/clusterresourceset_helpers.go +++ b/exp/addons/controllers/clusterresourceset_helpers.go @@ -32,8 +32,8 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/types" kerrors "k8s.io/apimachinery/pkg/util/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" "sigs.k8s.io/cluster-api/util" utilresource "sigs.k8s.io/cluster-api/util/resource" utilyaml "sigs.k8s.io/cluster-api/util/yaml" diff --git a/exp/addons/controllers/clusterresourceset_helpers_test.go b/exp/addons/controllers/clusterresourceset_helpers_test.go index 4c485d28e919..8e78b5f9a987 100644 --- a/exp/addons/controllers/clusterresourceset_helpers_test.go +++ b/exp/addons/controllers/clusterresourceset_helpers_test.go @@ -27,8 +27,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client/fake" ) diff --git a/exp/addons/controllers/clusterresourcesetbinding_controller.go b/exp/addons/controllers/clusterresourcesetbinding_controller.go index 85a3cffe93db..29a00918d66c 100644 --- a/exp/addons/controllers/clusterresourcesetbinding_controller.go +++ b/exp/addons/controllers/clusterresourcesetbinding_controller.go @@ -21,8 +21,8 @@ import ( "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/predicates" ctrl "sigs.k8s.io/controller-runtime" diff --git a/exp/addons/controllers/suite_test.go b/exp/addons/controllers/suite_test.go index 6d658385e5db..e37190d19fac 100644 --- a/exp/addons/controllers/suite_test.go +++ b/exp/addons/controllers/suite_test.go @@ -23,9 +23,9 @@ import ( "testing" corev1 "k8s.io/api/core/v1" - "sigs.k8s.io/cluster-api/api/v1alpha4/index" + "sigs.k8s.io/cluster-api/api/v1beta1/index" "sigs.k8s.io/cluster-api/controllers/remote" - "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + v1alpha4 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" "sigs.k8s.io/cluster-api/internal/envtest" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/exp/api/v1alpha3/conversion.go b/exp/api/v1alpha3/conversion.go index c42053280cb2..c1ea87de0204 100644 --- a/exp/api/v1alpha3/conversion.go +++ b/exp/api/v1alpha3/conversion.go @@ -18,24 +18,24 @@ package v1alpha3 import ( "k8s.io/apimachinery/pkg/conversion" - "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + v1beta1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" ) -// Convert_v1alpha3_MachinePoolSpec_To_v1alpha4_MachinePoolSpec is an autogenerated conversion function. -func Convert_v1alpha3_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in *MachinePoolSpec, out *v1alpha4.MachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in, out, s) +// Convert_v1alpha3_MachinePoolSpec_To_v1beta1_MachinePoolSpec is an autogenerated conversion function. +func Convert_v1alpha3_MachinePoolSpec_To_v1beta1_MachinePoolSpec(in *MachinePoolSpec, out *v1beta1.MachinePoolSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_MachinePoolSpec_To_v1beta1_MachinePoolSpec(in, out, s) } -func Convert_v1alpha3_MachinePool_To_v1alpha4_MachinePool(in *MachinePool, out *v1alpha4.MachinePool, s conversion.Scope) error { - if err := autoConvert_v1alpha3_MachinePool_To_v1alpha4_MachinePool(in, out, s); err != nil { +func Convert_v1alpha3_MachinePool_To_v1beta1_MachinePool(in *MachinePool, out *v1beta1.MachinePool, s conversion.Scope) error { + if err := autoConvert_v1alpha3_MachinePool_To_v1beta1_MachinePool(in, out, s); err != nil { return err } // Replace v1alpha3 finalizer to allow old MachinePools to get deleted. if !controllerutil.ContainsFinalizer(out, MachinePoolFinalizer) { controllerutil.RemoveFinalizer(out, MachinePoolFinalizer) - controllerutil.AddFinalizer(out, v1alpha4.MachinePoolFinalizer) + controllerutil.AddFinalizer(out, v1beta1.MachinePoolFinalizer) } return nil diff --git a/exp/api/v1alpha3/doc.go b/exp/api/v1alpha3/doc.go index 781a057261ba..46a17737a5b7 100644 --- a/exp/api/v1alpha3/doc.go +++ b/exp/api/v1alpha3/doc.go @@ -15,5 +15,5 @@ limitations under the License. */ // Package v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/exp/api/v1alpha4 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/exp/api/v1beta1 package v1alpha3 diff --git a/exp/api/v1alpha3/zz_generated.conversion.go b/exp/api/v1alpha3/zz_generated.conversion.go index c1de67b6c69b..258e74660f90 100644 --- a/exp/api/v1alpha3/zz_generated.conversion.go +++ b/exp/api/v1alpha3/zz_generated.conversion.go @@ -27,9 +27,9 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" apiv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" errors "sigs.k8s.io/cluster-api/errors" - v1alpha4 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + v1beta1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" ) func init() { @@ -39,83 +39,83 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachinePool)(nil), (*MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachinePool_To_v1alpha3_MachinePool(a.(*v1alpha4.MachinePool), b.(*MachinePool), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachinePool)(nil), (*MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachinePool_To_v1alpha3_MachinePool(a.(*v1beta1.MachinePool), b.(*MachinePool), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachinePoolList)(nil), (*v1alpha4.MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachinePoolList_To_v1alpha4_MachinePoolList(a.(*MachinePoolList), b.(*v1alpha4.MachinePoolList), scope) + if err := s.AddGeneratedConversionFunc((*MachinePoolList)(nil), (*v1beta1.MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachinePoolList_To_v1beta1_MachinePoolList(a.(*MachinePoolList), b.(*v1beta1.MachinePoolList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachinePoolList)(nil), (*MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachinePoolList_To_v1alpha3_MachinePoolList(a.(*v1alpha4.MachinePoolList), b.(*MachinePoolList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachinePoolList)(nil), (*MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachinePoolList_To_v1alpha3_MachinePoolList(a.(*v1beta1.MachinePoolList), b.(*MachinePoolList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachinePoolSpec)(nil), (*MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(a.(*v1alpha4.MachinePoolSpec), b.(*MachinePoolSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachinePoolSpec)(nil), (*MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(a.(*v1beta1.MachinePoolSpec), b.(*MachinePoolSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*MachinePoolStatus)(nil), (*v1alpha4.MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(a.(*MachinePoolStatus), b.(*v1alpha4.MachinePoolStatus), scope) + if err := s.AddGeneratedConversionFunc((*MachinePoolStatus)(nil), (*v1beta1.MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachinePoolStatus_To_v1beta1_MachinePoolStatus(a.(*MachinePoolStatus), b.(*v1beta1.MachinePoolStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.MachinePoolStatus)(nil), (*MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(a.(*v1alpha4.MachinePoolStatus), b.(*MachinePoolStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.MachinePoolStatus)(nil), (*MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(a.(*v1beta1.MachinePoolStatus), b.(*MachinePoolStatus), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*MachinePoolSpec)(nil), (*v1alpha4.MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(a.(*MachinePoolSpec), b.(*v1alpha4.MachinePoolSpec), scope) + if err := s.AddConversionFunc((*MachinePoolSpec)(nil), (*v1beta1.MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachinePoolSpec_To_v1beta1_MachinePoolSpec(a.(*MachinePoolSpec), b.(*v1beta1.MachinePoolSpec), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*MachinePool)(nil), (*v1alpha4.MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachinePool_To_v1alpha4_MachinePool(a.(*MachinePool), b.(*v1alpha4.MachinePool), scope) + if err := s.AddConversionFunc((*MachinePool)(nil), (*v1beta1.MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachinePool_To_v1beta1_MachinePool(a.(*MachinePool), b.(*v1beta1.MachinePool), scope) }); err != nil { return err } return nil } -func autoConvert_v1alpha3_MachinePool_To_v1alpha4_MachinePool(in *MachinePool, out *v1alpha4.MachinePool, s conversion.Scope) error { +func autoConvert_v1alpha3_MachinePool_To_v1beta1_MachinePool(in *MachinePool, out *v1beta1.MachinePool, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_MachinePoolSpec_To_v1beta1_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_MachinePoolStatus_To_v1beta1_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -func autoConvert_v1alpha4_MachinePool_To_v1alpha3_MachinePool(in *v1alpha4.MachinePool, out *MachinePool, s conversion.Scope) error { +func autoConvert_v1beta1_MachinePool_To_v1alpha3_MachinePool(in *v1beta1.MachinePool, out *MachinePool, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_MachinePool_To_v1alpha3_MachinePool is an autogenerated conversion function. -func Convert_v1alpha4_MachinePool_To_v1alpha3_MachinePool(in *v1alpha4.MachinePool, out *MachinePool, s conversion.Scope) error { - return autoConvert_v1alpha4_MachinePool_To_v1alpha3_MachinePool(in, out, s) +// Convert_v1beta1_MachinePool_To_v1alpha3_MachinePool is an autogenerated conversion function. +func Convert_v1beta1_MachinePool_To_v1alpha3_MachinePool(in *v1beta1.MachinePool, out *MachinePool, s conversion.Scope) error { + return autoConvert_v1beta1_MachinePool_To_v1alpha3_MachinePool(in, out, s) } -func autoConvert_v1alpha3_MachinePoolList_To_v1alpha4_MachinePoolList(in *MachinePoolList, out *v1alpha4.MachinePoolList, s conversion.Scope) error { +func autoConvert_v1alpha3_MachinePoolList_To_v1beta1_MachinePoolList(in *MachinePoolList, out *v1beta1.MachinePoolList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.MachinePool, len(*in)) + *out = make([]v1beta1.MachinePool, len(*in)) for i := range *in { - if err := Convert_v1alpha3_MachinePool_To_v1alpha4_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_MachinePool_To_v1beta1_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -125,18 +125,18 @@ func autoConvert_v1alpha3_MachinePoolList_To_v1alpha4_MachinePoolList(in *Machin return nil } -// Convert_v1alpha3_MachinePoolList_To_v1alpha4_MachinePoolList is an autogenerated conversion function. -func Convert_v1alpha3_MachinePoolList_To_v1alpha4_MachinePoolList(in *MachinePoolList, out *v1alpha4.MachinePoolList, s conversion.Scope) error { - return autoConvert_v1alpha3_MachinePoolList_To_v1alpha4_MachinePoolList(in, out, s) +// Convert_v1alpha3_MachinePoolList_To_v1beta1_MachinePoolList is an autogenerated conversion function. +func Convert_v1alpha3_MachinePoolList_To_v1beta1_MachinePoolList(in *MachinePoolList, out *v1beta1.MachinePoolList, s conversion.Scope) error { + return autoConvert_v1alpha3_MachinePoolList_To_v1beta1_MachinePoolList(in, out, s) } -func autoConvert_v1alpha4_MachinePoolList_To_v1alpha3_MachinePoolList(in *v1alpha4.MachinePoolList, out *MachinePoolList, s conversion.Scope) error { +func autoConvert_v1beta1_MachinePoolList_To_v1alpha3_MachinePoolList(in *v1beta1.MachinePoolList, out *MachinePoolList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]MachinePool, len(*in)) for i := range *in { - if err := Convert_v1alpha4_MachinePool_To_v1alpha3_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_MachinePool_To_v1alpha3_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -146,15 +146,15 @@ func autoConvert_v1alpha4_MachinePoolList_To_v1alpha3_MachinePoolList(in *v1alph return nil } -// Convert_v1alpha4_MachinePoolList_To_v1alpha3_MachinePoolList is an autogenerated conversion function. -func Convert_v1alpha4_MachinePoolList_To_v1alpha3_MachinePoolList(in *v1alpha4.MachinePoolList, out *MachinePoolList, s conversion.Scope) error { - return autoConvert_v1alpha4_MachinePoolList_To_v1alpha3_MachinePoolList(in, out, s) +// Convert_v1beta1_MachinePoolList_To_v1alpha3_MachinePoolList is an autogenerated conversion function. +func Convert_v1beta1_MachinePoolList_To_v1alpha3_MachinePoolList(in *v1beta1.MachinePoolList, out *MachinePoolList, s conversion.Scope) error { + return autoConvert_v1beta1_MachinePoolList_To_v1alpha3_MachinePoolList(in, out, s) } -func autoConvert_v1alpha3_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in *MachinePoolSpec, out *v1alpha4.MachinePoolSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_MachinePoolSpec_To_v1beta1_MachinePoolSpec(in *MachinePoolSpec, out *v1beta1.MachinePoolSpec, s conversion.Scope) error { out.ClusterName = in.ClusterName out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - if err := apiv1alpha3.Convert_v1alpha3_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + if err := apiv1alpha3.Convert_v1alpha3_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } // WARNING: in.Strategy requires manual conversion: does not exist in peer-type @@ -164,10 +164,10 @@ func autoConvert_v1alpha3_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in *Machin return nil } -func autoConvert_v1alpha4_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in *v1alpha4.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { +func autoConvert_v1beta1_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in *v1beta1.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { out.ClusterName = in.ClusterName out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - if err := apiv1alpha3.Convert_v1alpha4_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds)) @@ -176,12 +176,12 @@ func autoConvert_v1alpha4_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in *v1alph return nil } -// Convert_v1alpha4_MachinePoolSpec_To_v1alpha3_MachinePoolSpec is an autogenerated conversion function. -func Convert_v1alpha4_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in *v1alpha4.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in, out, s) +// Convert_v1beta1_MachinePoolSpec_To_v1alpha3_MachinePoolSpec is an autogenerated conversion function. +func Convert_v1beta1_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in *v1beta1.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { + return autoConvert_v1beta1_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in, out, s) } -func autoConvert_v1alpha3_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in *MachinePoolStatus, out *v1alpha4.MachinePoolStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_MachinePoolStatus_To_v1beta1_MachinePoolStatus(in *MachinePoolStatus, out *v1beta1.MachinePoolStatus, s conversion.Scope) error { out.NodeRefs = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) out.Replicas = in.Replicas out.ReadyReplicas = in.ReadyReplicas @@ -195,9 +195,9 @@ func autoConvert_v1alpha3_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in *Ma out.ObservedGeneration = in.ObservedGeneration if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) + *out = make(apiv1beta1.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -207,12 +207,12 @@ func autoConvert_v1alpha3_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in *Ma return nil } -// Convert_v1alpha3_MachinePoolStatus_To_v1alpha4_MachinePoolStatus is an autogenerated conversion function. -func Convert_v1alpha3_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in *MachinePoolStatus, out *v1alpha4.MachinePoolStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in, out, s) +// Convert_v1alpha3_MachinePoolStatus_To_v1beta1_MachinePoolStatus is an autogenerated conversion function. +func Convert_v1alpha3_MachinePoolStatus_To_v1beta1_MachinePoolStatus(in *MachinePoolStatus, out *v1beta1.MachinePoolStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_MachinePoolStatus_To_v1beta1_MachinePoolStatus(in, out, s) } -func autoConvert_v1alpha4_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in *v1alpha4.MachinePoolStatus, out *MachinePoolStatus, s conversion.Scope) error { +func autoConvert_v1beta1_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in *v1beta1.MachinePoolStatus, out *MachinePoolStatus, s conversion.Scope) error { out.NodeRefs = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) out.Replicas = in.Replicas out.ReadyReplicas = in.ReadyReplicas @@ -228,7 +228,7 @@ func autoConvert_v1alpha4_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in *v1 in, out := &in.Conditions, &out.Conditions *out = make(apiv1alpha3.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha4_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -238,7 +238,7 @@ func autoConvert_v1alpha4_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in *v1 return nil } -// Convert_v1alpha4_MachinePoolStatus_To_v1alpha3_MachinePoolStatus is an autogenerated conversion function. -func Convert_v1alpha4_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in *v1alpha4.MachinePoolStatus, out *MachinePoolStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in, out, s) +// Convert_v1beta1_MachinePoolStatus_To_v1alpha3_MachinePoolStatus is an autogenerated conversion function. +func Convert_v1beta1_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in *v1beta1.MachinePoolStatus, out *MachinePoolStatus, s conversion.Scope) error { + return autoConvert_v1beta1_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in, out, s) } diff --git a/exp/api/v1alpha4/machinepool_types.go b/exp/api/v1alpha4/machinepool_types.go index 038c7f5bbbab..b81c1e59fb20 100644 --- a/exp/api/v1alpha4/machinepool_types.go +++ b/exp/api/v1alpha4/machinepool_types.go @@ -201,7 +201,6 @@ func (m *MachinePoolStatus) GetTypedPhase() MachinePoolPhase { // +kubebuilder:resource:path=machinepools,shortName=mp,scope=Namespaced,categories=cluster-api // +kubebuilder:subresource:status // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachinePool" // +kubebuilder:printcolumn:name="Replicas",type="string",JSONPath=".status.replicas",description="MachinePool replicas count" // +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="MachinePool status such as Terminating/Pending/Provisioning/Running/Failed etc" diff --git a/exp/api/v1alpha4/zz_generated.deepcopy.go b/exp/api/v1alpha4/zz_generated.deepcopy.go index e67e5831a7b1..6c9f85b4c1ca 100644 --- a/exp/api/v1alpha4/zz_generated.deepcopy.go +++ b/exp/api/v1alpha4/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ package v1alpha4 import ( "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" + runtime "k8s.io/apimachinery/pkg/runtime" apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" "sigs.k8s.io/cluster-api/errors" ) diff --git a/exp/api/v1beta1/condition_consts.go b/exp/api/v1beta1/condition_consts.go new file mode 100644 index 000000000000..bbee93f69c78 --- /dev/null +++ b/exp/api/v1beta1/condition_consts.go @@ -0,0 +1,30 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + +// Conditions and condition Reasons for the MachinePool object + +const ( + // ReplicasReadyCondition reports an aggregate of current status of the replicas controlled by the MachinePool. + ReplicasReadyCondition clusterv1.ConditionType = "ReplicasReady" + + // WaitingForReplicasReadyReason (Severity=Info) documents a machinepool waiting for the required replicas + // to be ready. + WaitingForReplicasReadyReason = "WaitingForReplicasReady" +) diff --git a/exp/api/v1beta1/doc.go b/exp/api/v1beta1/doc.go new file mode 100644 index 000000000000..f8a9210a0fda --- /dev/null +++ b/exp/api/v1beta1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 diff --git a/exp/api/v1beta1/groupversion_info.go b/exp/api/v1beta1/groupversion_info.go new file mode 100644 index 000000000000..c9eb095850c4 --- /dev/null +++ b/exp/api/v1beta1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 contains API Schema definitions for the exp v1beta1 API group +// +kubebuilder:object:generate=true +// +groupName=cluster.x-k8s.io +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects. + GroupVersion = schema.GroupVersion{Group: "cluster.x-k8s.io", Version: "v1beta1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/exp/api/v1beta1/machinepool_types.go b/exp/api/v1beta1/machinepool_types.go new file mode 100644 index 000000000000..cf0971511f6b --- /dev/null +++ b/exp/api/v1beta1/machinepool_types.go @@ -0,0 +1,241 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + capierrors "sigs.k8s.io/cluster-api/errors" +) + +const ( + // MachinePoolFinalizer is used to ensure deletion of dependencies (nodes, infra). + MachinePoolFinalizer = "machinepool.cluster.x-k8s.io" +) + +// ANCHOR: MachinePoolSpec + +// MachinePoolSpec defines the desired state of MachinePool. +type MachinePoolSpec struct { + // ClusterName is the name of the Cluster this object belongs to. + // +kubebuilder:validation:MinLength=1 + ClusterName string `json:"clusterName"` + + // Number of desired machines. Defaults to 1. + // This is a pointer to distinguish between explicit zero and not specified. + Replicas *int32 `json:"replicas,omitempty"` + + // Template describes the machines that will be created. + Template clusterv1.MachineTemplateSpec `json:"template"` + + // Minimum number of seconds for which a newly created machine instances should + // be ready. + // Defaults to 0 (machine instance will be considered available as soon as it + // is ready) + // +optional + MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` + + // ProviderIDList are the identification IDs of machine instances provided by the provider. + // This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances. + // +optional + ProviderIDList []string `json:"providerIDList,omitempty"` + + // FailureDomains is the list of failure domains this MachinePool should be attached to. + FailureDomains []string `json:"failureDomains,omitempty"` +} + +// ANCHOR_END: MachinePoolSpec + +// ANCHOR: MachinePoolStatus + +// MachinePoolStatus defines the observed state of MachinePool. +type MachinePoolStatus struct { + // NodeRefs will point to the corresponding Nodes if it they exist. + // +optional + NodeRefs []corev1.ObjectReference `json:"nodeRefs,omitempty"` + + // Replicas is the most recently observed number of replicas. + // +optional + Replicas int32 `json:"replicas"` + + // The number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is "Ready". + // +optional + ReadyReplicas int32 `json:"readyReplicas,omitempty"` + + // The number of available replicas (ready for at least minReadySeconds) for this MachinePool. + // +optional + AvailableReplicas int32 `json:"availableReplicas,omitempty"` + + // Total number of unavailable machine instances targeted by this machine pool. + // This is the total number of machine instances that are still required for + // the machine pool to have 100% available capacity. They may either + // be machine instances that are running but not yet available or machine instances + // that still have not been created. + // +optional + UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` + + // FailureReason indicates that there is a problem reconciling the state, and + // will be set to a token value suitable for programmatic interpretation. + // +optional + FailureReason *capierrors.MachinePoolStatusFailure `json:"failureReason,omitempty"` + + // FailureMessage indicates that there is a problem reconciling the state, + // and will be set to a descriptive error message. + // +optional + FailureMessage *string `json:"failureMessage,omitempty"` + + // Phase represents the current phase of cluster actuation. + // E.g. Pending, Running, Terminating, Failed etc. + // +optional + Phase string `json:"phase,omitempty"` + + // BootstrapReady is the state of the bootstrap provider. + // +optional + BootstrapReady bool `json:"bootstrapReady"` + + // InfrastructureReady is the state of the infrastructure provider. + // +optional + InfrastructureReady bool `json:"infrastructureReady"` + + // ObservedGeneration is the latest generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // Conditions define the current service state of the MachinePool. + // +optional + Conditions clusterv1.Conditions `json:"conditions,omitempty"` +} + +// ANCHOR_END: MachinePoolStatus + +// MachinePoolPhase is a string representation of a MachinePool Phase. +// +// This type is a high-level indicator of the status of the MachinePool as it is provisioned, +// from the API user’s perspective. +// +// The value should not be interpreted by any software components as a reliable indication +// of the actual state of the MachinePool, and controllers should not use the MachinePool Phase field +// value when making decisions about what action to take. +// +// Controllers should always look at the actual state of the MachinePool’s fields to make those decisions. +type MachinePoolPhase string + +const ( + // MachinePoolPhasePending is the first state a MachinePool is assigned by + // Cluster API MachinePool controller after being created. + MachinePoolPhasePending = MachinePoolPhase("Pending") + + // MachinePoolPhaseProvisioning is the state when the + // MachinePool infrastructure is being created or updated. + MachinePoolPhaseProvisioning = MachinePoolPhase("Provisioning") + + // MachinePoolPhaseProvisioned is the state when its + // infrastructure has been created and configured. + MachinePoolPhaseProvisioned = MachinePoolPhase("Provisioned") + + // MachinePoolPhaseRunning is the MachinePool state when its instances + // have become Kubernetes Nodes in the Ready state. + MachinePoolPhaseRunning = MachinePoolPhase("Running") + + // MachinePoolPhaseScalingUp is the MachinePool state when the + // MachinePool infrastructure is scaling up. + MachinePoolPhaseScalingUp = MachinePoolPhase("ScalingUp") + + // MachinePoolPhaseScalingDown is the MachinePool state when the + // MachinePool infrastructure is scaling down. + MachinePoolPhaseScalingDown = MachinePoolPhase("ScalingDown") + + // MachinePoolPhaseDeleting is the MachinePool state when a delete + // request has been sent to the API Server, + // but its infrastructure has not yet been fully deleted. + MachinePoolPhaseDeleting = MachinePoolPhase("Deleting") + + // MachinePoolPhaseFailed is the MachinePool state when the system + // might require user intervention. + MachinePoolPhaseFailed = MachinePoolPhase("Failed") + + // MachinePoolPhaseUnknown is returned if the MachinePool state cannot be determined. + MachinePoolPhaseUnknown = MachinePoolPhase("Unknown") +) + +// SetTypedPhase sets the Phase field to the string representation of MachinePoolPhase. +func (m *MachinePoolStatus) SetTypedPhase(p MachinePoolPhase) { + m.Phase = string(p) +} + +// GetTypedPhase attempts to parse the Phase field and return +// the typed MachinePoolPhase representation as described in `machinepool_phase_types.go`. +func (m *MachinePoolStatus) GetTypedPhase() MachinePoolPhase { + switch phase := MachinePoolPhase(m.Phase); phase { + case + MachinePoolPhasePending, + MachinePoolPhaseProvisioning, + MachinePoolPhaseProvisioned, + MachinePoolPhaseRunning, + MachinePoolPhaseScalingUp, + MachinePoolPhaseScalingDown, + MachinePoolPhaseDeleting, + MachinePoolPhaseFailed: + return phase + default: + return MachinePoolPhaseUnknown + } +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machinepools,shortName=mp,scope=Namespaced,categories=cluster-api +// +kubebuilder:subresource:status +// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of MachinePool" +// +kubebuilder:printcolumn:name="Replicas",type="string",JSONPath=".status.replicas",description="MachinePool replicas count" +// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="MachinePool status such as Terminating/Pending/Provisioning/Running/Failed etc" +// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.template.spec.version",description="Kubernetes version associated with this MachinePool" +// +k8s:conversion-gen=false + +// MachinePool is the Schema for the machinepools API. +type MachinePool struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec MachinePoolSpec `json:"spec,omitempty"` + Status MachinePoolStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (m *MachinePool) GetConditions() clusterv1.Conditions { + return m.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (m *MachinePool) SetConditions(conditions clusterv1.Conditions) { + m.Status.Conditions = conditions +} + +// +kubebuilder:object:root=true + +// MachinePoolList contains a list of MachinePool. +type MachinePoolList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []MachinePool `json:"items"` +} + +func init() { + SchemeBuilder.Register(&MachinePool{}, &MachinePoolList{}) +} diff --git a/exp/api/v1alpha4/machinepool_webhook.go b/exp/api/v1beta1/machinepool_webhook.go similarity index 87% rename from exp/api/v1alpha4/machinepool_webhook.go rename to exp/api/v1beta1/machinepool_webhook.go index 4250feb103c9..f042b8f9641c 100644 --- a/exp/api/v1alpha4/machinepool_webhook.go +++ b/exp/api/v1beta1/machinepool_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -24,7 +24,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" runtime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" ) @@ -35,8 +35,8 @@ func (m *MachinePool) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1alpha4-machinepool,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinepools,versions=v1alpha4,name=validation.machinepool.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1alpha4-machinepool,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinepools,versions=v1alpha4,name=default.machinepool.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cluster-x-k8s-io-v1beta1-machinepool,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinepools,versions=v1beta1,name=validation.machinepool.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-cluster-x-k8s-io-v1beta1-machinepool,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=cluster.x-k8s.io,resources=machinepools,versions=v1beta1,name=default.machinepool.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &MachinePool{} var _ webhook.Validator = &MachinePool{} diff --git a/exp/api/v1alpha4/machinepool_webhook_test.go b/exp/api/v1beta1/machinepool_webhook_test.go similarity index 98% rename from exp/api/v1alpha4/machinepool_webhook_test.go rename to exp/api/v1beta1/machinepool_webhook_test.go index 5d35935290eb..6be7df972896 100644 --- a/exp/api/v1alpha4/machinepool_webhook_test.go +++ b/exp/api/v1beta1/machinepool_webhook_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" utildefaulting "sigs.k8s.io/cluster-api/util/defaulting" ) diff --git a/exp/api/v1beta1/zz_generated.deepcopy.go b/exp/api/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000000..fdbea08fc5ea --- /dev/null +++ b/exp/api/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,160 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/errors" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachinePool) DeepCopyInto(out *MachinePool) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePool. +func (in *MachinePool) DeepCopy() *MachinePool { + if in == nil { + return nil + } + out := new(MachinePool) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachinePool) 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 *MachinePoolList) DeepCopyInto(out *MachinePoolList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachinePool, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolList. +func (in *MachinePoolList) DeepCopy() *MachinePoolList { + if in == nil { + return nil + } + out := new(MachinePoolList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachinePoolList) 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 *MachinePoolSpec) DeepCopyInto(out *MachinePoolSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.Template.DeepCopyInto(&out.Template) + if in.MinReadySeconds != nil { + in, out := &in.MinReadySeconds, &out.MinReadySeconds + *out = new(int32) + **out = **in + } + if in.ProviderIDList != nil { + in, out := &in.ProviderIDList, &out.ProviderIDList + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.FailureDomains != nil { + in, out := &in.FailureDomains, &out.FailureDomains + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolSpec. +func (in *MachinePoolSpec) DeepCopy() *MachinePoolSpec { + if in == nil { + return nil + } + out := new(MachinePoolSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachinePoolStatus) DeepCopyInto(out *MachinePoolStatus) { + *out = *in + if in.NodeRefs != nil { + in, out := &in.NodeRefs, &out.NodeRefs + *out = make([]v1.ObjectReference, len(*in)) + copy(*out, *in) + } + if in.FailureReason != nil { + in, out := &in.FailureReason, &out.FailureReason + *out = new(errors.MachinePoolStatusFailure) + **out = **in + } + if in.FailureMessage != nil { + in, out := &in.FailureMessage, &out.FailureMessage + *out = new(string) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1beta1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolStatus. +func (in *MachinePoolStatus) DeepCopy() *MachinePoolStatus { + if in == nil { + return nil + } + out := new(MachinePoolStatus) + in.DeepCopyInto(out) + return out +} diff --git a/exp/controllers/machinepool_controller.go b/exp/controllers/machinepool_controller.go index 5099c99f507e..d2061cd30b31 100644 --- a/exp/controllers/machinepool_controller.go +++ b/exp/controllers/machinepool_controller.go @@ -27,10 +27,10 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/tools/record" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/controllers/remote" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/exp/controllers/machinepool_controller_noderef.go b/exp/controllers/machinepool_controller_noderef.go index 53c61afaef29..0b4cb46e845e 100644 --- a/exp/controllers/machinepool_controller_noderef.go +++ b/exp/controllers/machinepool_controller_noderef.go @@ -23,10 +23,10 @@ import ( "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/noderefutil" "sigs.k8s.io/cluster-api/controllers/remote" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/exp/controllers/machinepool_controller_phases.go b/exp/controllers/machinepool_controller_phases.go index e5cba40a993e..960516911a1e 100644 --- a/exp/controllers/machinepool_controller_phases.go +++ b/exp/controllers/machinepool_controller_phases.go @@ -30,10 +30,10 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" capierrors "sigs.k8s.io/cluster-api/errors" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" diff --git a/exp/controllers/machinepool_controller_phases_test.go b/exp/controllers/machinepool_controller_phases_test.go index f643e81ac317..cc05c2b1e353 100644 --- a/exp/controllers/machinepool_controller_phases_test.go +++ b/exp/controllers/machinepool_controller_phases_test.go @@ -27,8 +27,8 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/types" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util/kubeconfig" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client/fake" @@ -66,13 +66,13 @@ func TestReconcileMachinePoolPhases(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "BootstrapConfig", Name: "bootstrap-config1", }, }, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureConfig", Name: "infra-config1", }, @@ -84,7 +84,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { defaultBootstrap := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -97,7 +97,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { defaultInfra := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "InfrastructureConfig", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": metav1.NamespaceDefault, @@ -484,7 +484,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "BootstrapConfig", Name: "bootstrap-config1", }, @@ -513,7 +513,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { name: "new machinepool, bootstrap config ready with data", bootstrapConfig: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -535,7 +535,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { name: "new machinepool, bootstrap config ready with no data", bootstrapConfig: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -555,7 +555,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { name: "new machinepool, bootstrap config not ready", bootstrapConfig: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -573,7 +573,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { name: "new machinepool, bootstrap config is not found", bootstrapConfig: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": wrongNamespace, @@ -590,7 +590,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { name: "new machinepool, no bootstrap config or data", bootstrapConfig: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": wrongNamespace, @@ -604,7 +604,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { name: "existing machinepool, bootstrap data should not change", bootstrapConfig: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -625,7 +625,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "BootstrapConfig", Name: "bootstrap-config1", }, @@ -648,7 +648,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { name: "existing machinepool, bootstrap provider is to not ready", bootstrapConfig: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -669,7 +669,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "BootstrapConfig", Name: "bootstrap-config1", }, @@ -731,13 +731,13 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "BootstrapConfig", Name: "bootstrap-config1", }, }, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureConfig", Name: "infra-config1", }, @@ -767,7 +767,7 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { name: "new machinepool, infrastructure config ready", infraConfig: map[string]interface{}{ "kind": "InfrastructureConfig", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": metav1.NamespaceDefault, @@ -810,13 +810,13 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "BootstrapConfig", Name: "bootstrap-config1", }, }, InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureConfig", Name: "infra-config1", }, @@ -831,7 +831,7 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { }, bootstrapConfig: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap-config1", "namespace": metav1.NamespaceDefault, @@ -844,7 +844,7 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { }, infraConfig: map[string]interface{}{ "kind": "InfrastructureConfig", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{}, }, expectError: true, @@ -860,7 +860,7 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { name: "infrastructure ref is paused", infraConfig: map[string]interface{}{ "kind": "InfrastructureConfig", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": metav1.NamespaceDefault, diff --git a/exp/controllers/machinepool_controller_test.go b/exp/controllers/machinepool_controller_test.go index e1805e25265d..39ab6e6b04d5 100644 --- a/exp/controllers/machinepool_controller_test.go +++ b/exp/controllers/machinepool_controller_test.go @@ -26,8 +26,8 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-go/kubernetes/scheme" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" ctrl "sigs.k8s.io/controller-runtime" @@ -252,7 +252,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) { infraConfig := unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "InfrastructureConfig", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra-config1", "namespace": metav1.NamespaceDefault, @@ -284,7 +284,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) { bootstrapConfig := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "test-bootstrap", "namespace": metav1.NamespaceDefault, @@ -315,7 +315,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) { Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureConfig", Name: "infra-config1", }, @@ -351,7 +351,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) { Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureConfig", Name: "infra-config1", }, @@ -390,7 +390,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) { Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureConfig", Name: "infra-config1", }, @@ -441,7 +441,7 @@ func TestReconcileMachinePoolDeleteExternal(t *testing.T) { bootstrapConfig := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "delete-bootstrap", "namespace": metav1.NamespaceDefault, @@ -452,7 +452,7 @@ func TestReconcileMachinePoolDeleteExternal(t *testing.T) { infraConfig := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "InfrastructureConfig", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "delete-infra", "namespace": metav1.NamespaceDefault, @@ -471,13 +471,13 @@ func TestReconcileMachinePoolDeleteExternal(t *testing.T) { Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureConfig", Name: "delete-infra", }, Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "BootstrapConfig", Name: "delete-bootstrap", }, @@ -574,7 +574,7 @@ func TestRemoveMachinePoolFinalizerAfterDeleteReconcile(t *testing.T) { Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureConfig", Name: "infra-config1", }, @@ -604,7 +604,7 @@ func TestMachinePoolConditions(t *testing.T) { return &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "BootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "bootstrap1", "namespace": metav1.NamespaceDefault, @@ -621,7 +621,7 @@ func TestMachinePoolConditions(t *testing.T) { return &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "InfrastructureConfig", - "apiVersion": "infrastructure.cluster.x-k8s.io/v1alpha4", + "apiVersion": "infrastructure.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "name": "infra1", "namespace": metav1.NamespaceDefault, @@ -651,13 +651,13 @@ func TestMachinePoolConditions(t *testing.T) { Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureConfig", Name: "infra1", }, Bootstrap: clusterv1.Bootstrap{ ConfigRef: &corev1.ObjectReference{ - APIVersion: "bootstrap.cluster.x-k8s.io/v1alpha4", + APIVersion: "bootstrap.cluster.x-k8s.io/v1beta1", Kind: "BootstrapConfig", Name: "bootstrap1", }, @@ -812,7 +812,7 @@ func TestMachinePoolConditions(t *testing.T) { expectError: true, beforeFunc: func(bootstrap, infra *unstructured.Unstructured, mp *expv1.MachinePool, nodeList *corev1.NodeList) { mp.Spec.Template.Spec.InfrastructureRef = corev1.ObjectReference{ - APIVersion: "infrastructure.cluster.x-k8s.io/v1alpha4", + APIVersion: "infrastructure.cluster.x-k8s.io/v1beta1", Kind: "InfrastructureConfig", Name: "does-not-exist", } diff --git a/exp/controllers/suite_test.go b/exp/controllers/suite_test.go index e5022b55612a..a70f231423d0 100644 --- a/exp/controllers/suite_test.go +++ b/exp/controllers/suite_test.go @@ -22,7 +22,7 @@ import ( "os" "testing" - "sigs.k8s.io/cluster-api/api/v1alpha4/index" + "sigs.k8s.io/cluster-api/api/v1beta1/index" "sigs.k8s.io/cluster-api/internal/envtest" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/controller" diff --git a/exp/util/util.go b/exp/util/util.go index 93cb93054922..9e70b033dca3 100644 --- a/exp/util/util.go +++ b/exp/util/util.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" diff --git a/go.mod b/go.mod index 48af897a9d60..9ccf246c2493 100644 --- a/go.mod +++ b/go.mod @@ -11,10 +11,8 @@ require ( github.com/drone/envsubst/v2 v2.0.0-20210615175204-7bf45dbf5372 github.com/evanphx/json-patch v4.11.0+incompatible github.com/fatih/color v1.12.0 - github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect github.com/go-logr/logr v0.4.0 github.com/gobuffalo/flect v0.2.3 - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/go-cmp v0.5.6 github.com/google/go-github/v33 v33.0.0 github.com/google/gofuzz v1.2.0 @@ -30,13 +28,13 @@ require ( go.etcd.io/etcd/client/v3 v3.5.0 golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 google.golang.org/grpc v1.39.0 - k8s.io/api v0.21.4 + k8s.io/api v0.22.1 k8s.io/apiextensions-apiserver v0.21.4 - k8s.io/apimachinery v0.21.4 + k8s.io/apimachinery v0.22.1 k8s.io/apiserver v0.21.4 - k8s.io/client-go v0.21.4 + k8s.io/client-go v0.22.1 k8s.io/cluster-bootstrap v0.21.4 - k8s.io/component-base v0.21.4 + k8s.io/component-base v0.22.1 k8s.io/klog/v2 v2.9.0 k8s.io/kubectl v0.21.4 k8s.io/utils v0.0.0-20210802155522-efc7438f0176 diff --git a/go.sum b/go.sum index ab50f02dbf5e..73bb79479c5a 100644 --- a/go.sum +++ b/go.sum @@ -38,20 +38,25 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.12 h1:gI8ytXbxMfI+IVbI9mP2JGCTXIuhHLgRlvQ9X4PsnHE= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest/adal v0.9.5 h1:Y3bBUV4rTuxenJJs41HU3qmqsb+auo+a3Lz+PlJPpL0= +github.com/Azure/go-autorest/autorest v0.11.18 h1:90Y4srNYrwOtAgVo3ndrQkTYn6kf1Eg/AjTFJ8Is2aM= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -79,6 +84,7 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -165,6 +171,7 @@ github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwo github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= @@ -280,6 +287,7 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -324,6 +332,7 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= @@ -355,7 +364,6 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= @@ -440,8 +448,9 @@ github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxd github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -466,6 +475,7 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -549,6 +559,7 @@ github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -612,6 +623,16 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -725,8 +746,9 @@ golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 h1:ADo5wSpq2gqaCGQWzk7S5vd//0iyyLeAratkEoG5dLE= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -792,6 +814,7 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -815,6 +838,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 h1:c8PlLMqBbOHoqtjteWm5/kbe6rNY2pbRfbIMVnepueo= golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -998,6 +1022,7 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.39.0 h1:Klz8I9kdtkIN6EpHHUOMLCYhTn/2WAe5a0s1hcBkdTI= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= @@ -1058,22 +1083,26 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.21.4 h1:WtDkzTAuI31WZKDPeIYpEUA+WeUfXAmA7gwj6nzFfbc= k8s.io/api v0.21.4/go.mod h1:fTVGP+M4D8+00FN2cMnJqk/eb/GH53bvmNs2SVTmpFk= +k8s.io/api v0.22.1 h1:ISu3tD/jRhYfSW8jI/Q1e+lRxkR7w9UwQEZ7FgslrwY= +k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= k8s.io/apiextensions-apiserver v0.21.4 h1:HkajN/vmT/9HnFmUxvpXfSGkTCvH/ax4e3+j6mqWUDU= k8s.io/apiextensions-apiserver v0.21.4/go.mod h1:OoC8LhI9LnV+wKjZkXIBbLUwtnOGJiTRE33qctH5CIk= -k8s.io/apimachinery v0.21.4 h1:KDq0lWZVslHkuE5I7iGAQHwpK0aDTlar1E7IWEc4CNw= k8s.io/apimachinery v0.21.4/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= +k8s.io/apimachinery v0.22.1 h1:DTARnyzmdHMz7bFWFDDm22AM4pLWTQECMpRTFu2d2OM= +k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apiserver v0.21.4 h1:egJgdhW0ueq5iJSY0c5YedPvRM2Ft/D3dcXOgwvs9jY= k8s.io/apiserver v0.21.4/go.mod h1:SErUuFBBPZUcD2nsUU8hItxoYheqyYr2o/pCINEPW8g= k8s.io/cli-runtime v0.21.4/go.mod h1:eRbLHYkdVWzvG87yrkgGd8CqX6/+fAG9DTdAqTXmlRY= -k8s.io/client-go v0.21.4 h1:tcwj167If+v+pIGrCjaPG7hFo6SqFPFCCgMJy+Vm8Jc= k8s.io/client-go v0.21.4/go.mod h1:t0/eMKyUAq/DoQ7vW8NVVA00/nomlwC+eInsS8PxSew= +k8s.io/client-go v0.22.1 h1:jW0ZSHi8wW260FvcXHkIa0NLxFBQszTlhiAVsU5mopw= +k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk= k8s.io/cluster-bootstrap v0.21.4 h1:dnCOcVJdCAMz8+nvqodrFv/yd/3Ae9Jn14cChpQjps8= k8s.io/cluster-bootstrap v0.21.4/go.mod h1:GtXGuiEtdV4XQJcscR6qQCm/vtQWkhUi3qnl9KL9jzw= k8s.io/code-generator v0.21.4/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= -k8s.io/component-base v0.21.4 h1:Bc0AttSyhJFVXEIHz+VX+D11j/5z7SPPhl6whiXaRzs= k8s.io/component-base v0.21.4/go.mod h1:ZKG0eHVX+tUDcaoIGpU3Vtk4TIjMddN9uhEWDmW6Nyg= +k8s.io/component-base v0.22.1 h1:SFqIXsEN3v3Kkr1bS6rstrs1wd45StJqbtgbQ4nRQdo= +k8s.io/component-base v0.22.1/go.mod h1:0D+Bl8rrnsPN9v0dyYvkqFfBeAd4u7n77ze+p8CMiPo= k8s.io/component-helpers v0.21.4/go.mod h1:/5TBNWmxaAymZweO1JWv3Pt5rcYJV1LbWWY0x1rDdVU= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1082,12 +1111,14 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kubectl v0.21.4 h1:ODXpSKpi5C6XnJmGg96E/36KAry513v4Jr9Efg3ePJI= k8s.io/kubectl v0.21.4/go.mod h1:rRYB5HeScoGQKxZDQmus17pTSVIuqfm0D31ApET/qSM= k8s.io/metrics v0.21.4/go.mod h1:uhWoVuVumUMSeCa1B1p2tm4Y4XuZIg0n24QEtB54wuA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176 h1:Mx0aa+SUAcNRQbs5jUzV8lkDlGFU8laZsY9jrcVX5SY= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/hack/tools/go.mod b/hack/tools/go.mod index c6962b680078..963bfde6dae5 100644 --- a/hack/tools/go.mod +++ b/hack/tools/go.mod @@ -11,7 +11,7 @@ require ( golang.org/x/exp v0.0.0-20210625193404-fa9d1d177d71 // indirect golang.org/x/tools v0.1.5 gotest.tools/gotestsum v1.6.4 - k8s.io/code-generator v0.21.3 + k8s.io/code-generator v0.22.1 sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20210706144019-ef5c8a3ffd28 sigs.k8s.io/controller-tools v0.6.2 sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20210702145813-742983631190 diff --git a/hack/tools/go.sum b/hack/tools/go.sum index 201231f273f5..d579e9d98c99 100644 --- a/hack/tools/go.sum +++ b/hack/tools/go.sum @@ -182,12 +182,15 @@ github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= @@ -275,6 +278,8 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -328,6 +333,7 @@ github.com/joelanford/go-apidiff v0.1.0/go.mod h1:wgVWgVCwYYkjcYpJtBnWYkyUYZfVov github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -363,6 +369,7 @@ github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPK github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -417,6 +424,7 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.1/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= @@ -530,6 +538,7 @@ github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5q github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -703,8 +712,9 @@ golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 h1:ADo5wSpq2gqaCGQWzk7S5vd//0iyyLeAratkEoG5dLE= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -772,6 +782,7 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -791,8 +802,9 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= @@ -945,6 +957,7 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1032,6 +1045,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/gotestsum v1.6.4 h1:HFkapG0hK/HWiOxWS78SbR/JK5EpbH8hFzUuCvvfbfQ= @@ -1056,17 +1070,20 @@ k8s.io/apimachinery v0.21.3 h1:3Ju4nvjCngxxMYby0BimUk+pQHPOQp3eCGChk5kfVII= k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= -k8s.io/code-generator v0.21.3 h1:K2Onrjuve/31D4Y5DpR9ngWM2BiiKUxrGaCxSEJS/Y8= k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= +k8s.io/code-generator v0.22.1 h1:zAcKpn+xe9Iyc4qtZlfg4tD0f+SO2h5+e/s4pZPOVhs= +k8s.io/code-generator v0.22.1/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027 h1:Uusb3oh8XcdzDF/ndlI4ToKTYVlkCSJP39SRY2mfRAw= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= +k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/internal/envtest/environment.go b/internal/envtest/environment.go index 7a533c49ea40..ebef9b9bc701 100644 --- a/internal/envtest/environment.go +++ b/internal/envtest/environment.go @@ -43,12 +43,12 @@ import ( "k8s.io/client-go/rest" "k8s.io/klog/v2" "k8s.io/klog/v2/klogr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/log" - kcpv1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" - addonv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + kcpv1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" + addonv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/internal/testtypes" "sigs.k8s.io/cluster-api/util/kubeconfig" ctrl "sigs.k8s.io/controller-runtime" diff --git a/internal/testtypes/bootstrap.go b/internal/testtypes/bootstrap.go index 9a14e91eb1c7..4e52e933b78e 100644 --- a/internal/testtypes/bootstrap.go +++ b/internal/testtypes/bootstrap.go @@ -22,7 +22,7 @@ import ( var ( // BootstrapGroupVersion is group version used for bootstrap objects. - BootstrapGroupVersion = schema.GroupVersion{Group: "bootstrap.cluster.x-k8s.io", Version: "v1alpha4"} + BootstrapGroupVersion = schema.GroupVersion{Group: "bootstrap.cluster.x-k8s.io", Version: "v1beta1"} // GenericBootstrapConfigKind is the Kind for the GenericBootstrapConfig. GenericBootstrapConfigKind = "GenericBootstrapConfig" diff --git a/internal/testtypes/builders.go b/internal/testtypes/builders.go index 6069f5316a90..d6c4018e8fed 100644 --- a/internal/testtypes/builders.go +++ b/internal/testtypes/builders.go @@ -23,7 +23,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/internal/testtypes/controlplane.go b/internal/testtypes/controlplane.go index 1e2375342dfc..e6a4cde660d9 100644 --- a/internal/testtypes/controlplane.go +++ b/internal/testtypes/controlplane.go @@ -22,7 +22,7 @@ import ( var ( // ControlPlaneGroupVersion is group version used for control plane objects. - ControlPlaneGroupVersion = schema.GroupVersion{Group: "controlplane.cluster.x-k8s.io", Version: "v1alpha4"} + ControlPlaneGroupVersion = schema.GroupVersion{Group: "controlplane.cluster.x-k8s.io", Version: "v1beta1"} // GenericControlPlaneKind is the Kind for the GenericControlPlane. GenericControlPlaneKind = "GenericControlPlane" diff --git a/internal/testtypes/crds.go b/internal/testtypes/crds.go index f9e6e2c5415b..830e48d524c2 100644 --- a/internal/testtypes/crds.go +++ b/internal/testtypes/crds.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func generateCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDefinition { @@ -37,7 +37,7 @@ func generateCRD(gvk schema.GroupVersionKind) *apiextensionsv1.CustomResourceDef ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s.%s", flect.Pluralize(strings.ToLower(gvk.Kind)), gvk.Group), Labels: map[string]string{ - clusterv1.GroupVersion.String(): "v1alpha4", + clusterv1.GroupVersion.String(): "v1beta1", }, }, Spec: apiextensionsv1.CustomResourceDefinitionSpec{ diff --git a/internal/testtypes/infrastructure.go b/internal/testtypes/infrastructure.go index ced3f6e0bc7f..c7a8bc1cba79 100644 --- a/internal/testtypes/infrastructure.go +++ b/internal/testtypes/infrastructure.go @@ -22,7 +22,7 @@ import ( var ( // InfrastructureGroupVersion is group version used for infrastructure objects. - InfrastructureGroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha4"} + InfrastructureGroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1beta1"} // GenericInfrastructureMachineKind is the Kind for the GenericInfrastructureMachine. GenericInfrastructureMachineKind = "GenericInfrastructureMachine" diff --git a/internal/testtypes/remediation.go b/internal/testtypes/remediation.go index ddf32fff8509..c19ea4b87972 100644 --- a/internal/testtypes/remediation.go +++ b/internal/testtypes/remediation.go @@ -22,7 +22,7 @@ import ( var ( // RemediationGroupVersion is group version used for remediation objects. - RemediationGroupVersion = schema.GroupVersion{Group: "remediation.external.io", Version: "v1alpha4"} + RemediationGroupVersion = schema.GroupVersion{Group: "remediation.external.io", Version: "v1beta1"} // GenericRemediationCRD is a generic infrastructure remediation CRD. GenericRemediationCRD = generateCRD(RemediationGroupVersion.WithKind("GenericExternalRemediation")) diff --git a/main.go b/main.go index c7d3abc0ee88..67399fe45ad6 100644 --- a/main.go +++ b/main.go @@ -33,17 +33,20 @@ import ( cliflag "k8s.io/component-base/cli/flag" "k8s.io/klog/v2" "k8s.io/klog/v2/klogr" - clusterv1old "sigs.k8s.io/cluster-api/api/v1alpha3" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/api/v1alpha4/index" + clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" + clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/v1beta1/index" "sigs.k8s.io/cluster-api/controllers" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/controllers/topology" - addonsv1old "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha3" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + addonsv1alpha3 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha3" + addonsv1alpha4 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" addonscontrollers "sigs.k8s.io/cluster-api/exp/addons/controllers" - expv1old "sigs.k8s.io/cluster-api/exp/api/v1alpha3" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1alpha3 "sigs.k8s.io/cluster-api/exp/api/v1alpha3" + expv1alpha4 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" expcontrollers "sigs.k8s.io/cluster-api/exp/controllers" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/version" @@ -84,13 +87,20 @@ func init() { klog.InitFlags(nil) _ = clientgoscheme.AddToScheme(scheme) - _ = clusterv1old.AddToScheme(scheme) + _ = apiextensionsv1.AddToScheme(scheme) + + _ = clusterv1alpha3.AddToScheme(scheme) + _ = clusterv1alpha4.AddToScheme(scheme) _ = clusterv1.AddToScheme(scheme) - _ = expv1old.AddToScheme(scheme) + + _ = expv1alpha3.AddToScheme(scheme) + _ = expv1alpha4.AddToScheme(scheme) _ = expv1.AddToScheme(scheme) - _ = addonsv1old.AddToScheme(scheme) + + _ = addonsv1alpha3.AddToScheme(scheme) + _ = addonsv1alpha4.AddToScheme(scheme) _ = addonsv1.AddToScheme(scheme) - _ = apiextensionsv1.AddToScheme(scheme) + // +kubebuilder:scaffold:scheme } diff --git a/test/e2e/clusterctl_upgrade.go b/test/e2e/clusterctl_upgrade.go index 90140dbbf7e2..0c7b31381e63 100644 --- a/test/e2e/clusterctl_upgrade.go +++ b/test/e2e/clusterctl_upgrade.go @@ -35,7 +35,7 @@ import ( "k8s.io/client-go/discovery" "k8s.io/utils/pointer" clusterv1old "sigs.k8s.io/cluster-api/api/v1alpha3" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" "sigs.k8s.io/cluster-api/test/e2e/internal/log" "sigs.k8s.io/cluster-api/test/framework" diff --git a/test/e2e/common.go b/test/e2e/common.go index 3dfa7b7b9e9d..ca37c6d8ad1c 100644 --- a/test/e2e/common.go +++ b/test/e2e/common.go @@ -26,7 +26,7 @@ import ( "github.com/onsi/gomega/types" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/util" ) diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index f4981d45a7d4..f955760723d2 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -32,7 +32,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/bootstrap" "sigs.k8s.io/cluster-api/test/framework/clusterctl" diff --git a/test/e2e/kcp_adoption.go b/test/e2e/kcp_adoption.go index ac45f871849a..c734cd562e9d 100644 --- a/test/e2e/kcp_adoption.go +++ b/test/e2e/kcp_adoption.go @@ -26,14 +26,13 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" - corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" "sigs.k8s.io/cluster-api/util" diff --git a/test/e2e/node_drain_timeout.go b/test/e2e/node_drain_timeout.go index bfd83f79ed76..4ff0a35e96c8 100644 --- a/test/e2e/node_drain_timeout.go +++ b/test/e2e/node_drain_timeout.go @@ -29,9 +29,8 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" "sigs.k8s.io/cluster-api/util" diff --git a/test/e2e/self_hosted.go b/test/e2e/self_hosted.go index 8f728c077684..f6f527d621dc 100644 --- a/test/e2e/self_hosted.go +++ b/test/e2e/self_hosted.go @@ -28,7 +28,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/e2e/internal/log" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/bootstrap" diff --git a/test/framework/alltypes_helpers.go b/test/framework/alltypes_helpers.go index c62c2c74e12e..4f38d18f6216 100644 --- a/test/framework/alltypes_helpers.go +++ b/test/framework/alltypes_helpers.go @@ -33,7 +33,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" ) diff --git a/test/framework/bootstrap/kind_provider.go b/test/framework/bootstrap/kind_provider.go index e63a7254b2e4..ea096b16077e 100644 --- a/test/framework/bootstrap/kind_provider.go +++ b/test/framework/bootstrap/kind_provider.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework/internal/log" kindv1 "sigs.k8s.io/kind/pkg/apis/config/v1alpha4" kind "sigs.k8s.io/kind/pkg/cluster" diff --git a/test/framework/cluster_helpers.go b/test/framework/cluster_helpers.go index 11055f5f0568..c3b8204fd06d 100644 --- a/test/framework/cluster_helpers.go +++ b/test/framework/cluster_helpers.go @@ -24,7 +24,7 @@ import ( . "github.com/onsi/gomega" apierrors "k8s.io/apimachinery/pkg/api/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util/patch" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/test/framework/cluster_proxy.go b/test/framework/cluster_proxy.go index 56ba44e0f1f2..efc6379517ba 100644 --- a/test/framework/cluster_proxy.go +++ b/test/framework/cluster_proxy.go @@ -32,8 +32,8 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd/api" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework/exec" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/test/infrastructure/container" diff --git a/test/framework/clusterctl/clusterctl_helpers.go b/test/framework/clusterctl/clusterctl_helpers.go index 3b5413f63b9e..f016172ec7c0 100644 --- a/test/framework/clusterctl/clusterctl_helpers.go +++ b/test/framework/clusterctl/clusterctl_helpers.go @@ -23,10 +23,10 @@ import ( . "github.com/onsi/gomega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" - clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" + clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/internal/log" ) diff --git a/test/framework/clusterresourceset_helpers.go b/test/framework/clusterresourceset_helpers.go index 4c4068192710..510aebe608e0 100644 --- a/test/framework/clusterresourceset_helpers.go +++ b/test/framework/clusterresourceset_helpers.go @@ -25,8 +25,8 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/test/framework/control_plane.go b/test/framework/control_plane.go index 406172d0bc9a..9386935d0d06 100644 --- a/test/framework/control_plane.go +++ b/test/framework/control_plane.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/test/framework/controlplane_helpers.go b/test/framework/controlplane_helpers.go index 1f1040ba61cb..83362ef8372a 100644 --- a/test/framework/controlplane_helpers.go +++ b/test/framework/controlplane_helpers.go @@ -25,9 +25,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util/patch" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/test/framework/convenience.go b/test/framework/convenience.go index a46b62cca8a0..b59e36bda3cb 100644 --- a/test/framework/convenience.go +++ b/test/framework/convenience.go @@ -26,11 +26,11 @@ import ( apiextensionsv1beta "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" "k8s.io/apimachinery/pkg/runtime" clusterv1old "sigs.k8s.io/cluster-api/api/v1alpha3" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" - addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" + addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" ) // TryAddDefaultSchemes tries to add the following schemes: @@ -47,10 +47,10 @@ func TryAddDefaultSchemes(scheme *runtime.Scheme) { // Add the apps schemes. _ = appsv1.AddToScheme(scheme) - // Add the core CAPI v1alpha4 scheme. + // Add the core CAPI scheme. _ = clusterv1.AddToScheme(scheme) - // Add the CAPI v1alpha4 experiments scheme. + // Add the CAPI experiments scheme. _ = expv1.AddToScheme(scheme) _ = addonsv1.AddToScheme(scheme) diff --git a/test/framework/deployment_helpers.go b/test/framework/deployment_helpers.go index d36d4a63942f..2652e56d10c9 100644 --- a/test/framework/deployment_helpers.go +++ b/test/framework/deployment_helpers.go @@ -38,7 +38,7 @@ import ( "k8s.io/api/policy/v1beta1" "k8s.io/utils/pointer" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/test/framework/docker_logcollector.go b/test/framework/docker_logcollector.go index d69a157d59ff..baff13711d92 100644 --- a/test/framework/docker_logcollector.go +++ b/test/framework/docker_logcollector.go @@ -25,8 +25,8 @@ import ( "strings" kerrors "k8s.io/apimachinery/pkg/util/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/container" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/kind/pkg/errors" diff --git a/test/framework/machine_helpers.go b/test/framework/machine_helpers.go index d75ce67ac0bd..8710943348fc 100644 --- a/test/framework/machine_helpers.go +++ b/test/framework/machine_helpers.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" diff --git a/test/framework/machinedeployment_helpers.go b/test/framework/machinedeployment_helpers.go index 5630d2f6f37b..78dbe04725f1 100644 --- a/test/framework/machinedeployment_helpers.go +++ b/test/framework/machinedeployment_helpers.go @@ -27,7 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/patch" diff --git a/test/framework/machinehealthcheck_helpers.go b/test/framework/machinehealthcheck_helpers.go index 3b168711e714..7403924f2f6f 100644 --- a/test/framework/machinehealthcheck_helpers.go +++ b/test/framework/machinehealthcheck_helpers.go @@ -27,7 +27,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/test/framework/machinepool_helpers.go b/test/framework/machinepool_helpers.go index 6cc22851ea74..9586389050e5 100644 --- a/test/framework/machinepool_helpers.go +++ b/test/framework/machinepool_helpers.go @@ -27,8 +27,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/test/framework/machines.go b/test/framework/machines.go index 8478f0b17424..f1179f9cec3b 100644 --- a/test/framework/machines.go +++ b/test/framework/machines.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/test/go.mod b/test/go.mod index bef86e772475..1c4a4a8d23df 100644 --- a/test/go.mod +++ b/test/go.mod @@ -16,15 +16,15 @@ require ( github.com/onsi/gomega v1.15.0 github.com/pkg/errors v0.9.1 github.com/spf13/pflag v1.0.5 - k8s.io/api v0.21.4 - k8s.io/apiextensions-apiserver v0.21.4 - k8s.io/apimachinery v0.21.4 - k8s.io/client-go v0.21.4 - k8s.io/component-base v0.21.4 + k8s.io/api v0.22.1 + k8s.io/apiextensions-apiserver v0.22.1 + k8s.io/apimachinery v0.22.1 + k8s.io/client-go v0.22.1 + k8s.io/component-base v0.22.1 k8s.io/klog/v2 v2.9.0 k8s.io/utils v0.0.0-20210802155522-efc7438f0176 sigs.k8s.io/cluster-api v0.0.0-00010101000000-000000000000 - sigs.k8s.io/controller-runtime v0.9.7 + sigs.k8s.io/controller-runtime v0.10.0 sigs.k8s.io/kind v0.11.1 sigs.k8s.io/yaml v1.2.0 ) diff --git a/test/go.sum b/test/go.sum index 13f3776af35b..8167decd1900 100644 --- a/test/go.sum +++ b/test/go.sum @@ -40,18 +40,23 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -103,6 +108,7 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -123,6 +129,8 @@ github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8n github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= @@ -142,6 +150,9 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= @@ -307,6 +318,7 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZM github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -317,6 +329,7 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= @@ -350,10 +363,12 @@ github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwds github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -376,6 +391,7 @@ github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/ github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= @@ -435,6 +451,7 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -480,6 +497,7 @@ github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= @@ -494,6 +512,7 @@ github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16 github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -515,7 +534,6 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= @@ -539,6 +557,8 @@ github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJS github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -581,6 +601,7 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -617,8 +638,9 @@ github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2J github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -650,6 +672,7 @@ github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -682,6 +705,7 @@ github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.m github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -754,14 +778,16 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -774,6 +800,7 @@ github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKv github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -812,6 +839,7 @@ github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= @@ -843,11 +871,15 @@ github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -859,6 +891,17 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -975,6 +1018,7 @@ golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -982,8 +1026,9 @@ golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 h1:ADo5wSpq2gqaCGQWzk7S5vd//0iyyLeAratkEoG5dLE= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1062,6 +1107,7 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1074,6 +1120,7 @@ golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1095,6 +1142,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 h1:c8PlLMqBbOHoqtjteWm5/kbe6rNY2pbRfbIMVnepueo= golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -1241,6 +1289,7 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1287,6 +1336,7 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.39.0 h1:Klz8I9kdtkIN6EpHHUOMLCYhTn/2WAe5a0s1hcBkdTI= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= @@ -1357,35 +1407,42 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= -k8s.io/api v0.21.4 h1:WtDkzTAuI31WZKDPeIYpEUA+WeUfXAmA7gwj6nzFfbc= k8s.io/api v0.21.4/go.mod h1:fTVGP+M4D8+00FN2cMnJqk/eb/GH53bvmNs2SVTmpFk= -k8s.io/apiextensions-apiserver v0.21.4 h1:HkajN/vmT/9HnFmUxvpXfSGkTCvH/ax4e3+j6mqWUDU= +k8s.io/api v0.22.1 h1:ISu3tD/jRhYfSW8jI/Q1e+lRxkR7w9UwQEZ7FgslrwY= +k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= k8s.io/apiextensions-apiserver v0.21.4/go.mod h1:OoC8LhI9LnV+wKjZkXIBbLUwtnOGJiTRE33qctH5CIk= +k8s.io/apiextensions-apiserver v0.22.1 h1:YSJYzlFNFSfUle+yeEXX0lSQyLEoxoPJySRupepb0gE= +k8s.io/apiextensions-apiserver v0.22.1/go.mod h1:HeGmorjtRmRLE+Q8dJu6AYRoZccvCMsghwS8XTUYb2c= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= -k8s.io/apimachinery v0.21.4 h1:KDq0lWZVslHkuE5I7iGAQHwpK0aDTlar1E7IWEc4CNw= k8s.io/apimachinery v0.21.4/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= +k8s.io/apimachinery v0.22.1 h1:DTARnyzmdHMz7bFWFDDm22AM4pLWTQECMpRTFu2d2OM= +k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= -k8s.io/apiserver v0.21.4 h1:egJgdhW0ueq5iJSY0c5YedPvRM2Ft/D3dcXOgwvs9jY= k8s.io/apiserver v0.21.4/go.mod h1:SErUuFBBPZUcD2nsUU8hItxoYheqyYr2o/pCINEPW8g= +k8s.io/apiserver v0.22.1 h1:Ul9Iv8OMB2s45h2tl5XWPpAZo1VPIJ/6N+MESeed7L8= +k8s.io/apiserver v0.22.1/go.mod h1:2mcM6dzSt+XndzVQJX21Gx0/Klo7Aen7i0Ai6tIa400= k8s.io/cli-runtime v0.21.4/go.mod h1:eRbLHYkdVWzvG87yrkgGd8CqX6/+fAG9DTdAqTXmlRY= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= -k8s.io/client-go v0.21.4 h1:tcwj167If+v+pIGrCjaPG7hFo6SqFPFCCgMJy+Vm8Jc= k8s.io/client-go v0.21.4/go.mod h1:t0/eMKyUAq/DoQ7vW8NVVA00/nomlwC+eInsS8PxSew= +k8s.io/client-go v0.22.1 h1:jW0ZSHi8wW260FvcXHkIa0NLxFBQszTlhiAVsU5mopw= +k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk= k8s.io/cluster-bootstrap v0.21.4 h1:dnCOcVJdCAMz8+nvqodrFv/yd/3Ae9Jn14cChpQjps8= k8s.io/cluster-bootstrap v0.21.4/go.mod h1:GtXGuiEtdV4XQJcscR6qQCm/vtQWkhUi3qnl9KL9jzw= k8s.io/code-generator v0.21.4/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= +k8s.io/code-generator v0.22.1/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= -k8s.io/component-base v0.21.4 h1:Bc0AttSyhJFVXEIHz+VX+D11j/5z7SPPhl6whiXaRzs= k8s.io/component-base v0.21.4/go.mod h1:ZKG0eHVX+tUDcaoIGpU3Vtk4TIjMddN9uhEWDmW6Nyg= +k8s.io/component-base v0.22.1 h1:SFqIXsEN3v3Kkr1bS6rstrs1wd45StJqbtgbQ4nRQdo= +k8s.io/component-base v0.22.1/go.mod h1:0D+Bl8rrnsPN9v0dyYvkqFfBeAd4u7n77ze+p8CMiPo= k8s.io/component-helpers v0.21.4/go.mod h1:/5TBNWmxaAymZweO1JWv3Pt5rcYJV1LbWWY0x1rDdVU= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -1400,12 +1457,14 @@ k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kubectl v0.21.4/go.mod h1:rRYB5HeScoGQKxZDQmus17pTSVIuqfm0D31ApET/qSM= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/metrics v0.21.4/go.mod h1:uhWoVuVumUMSeCa1B1p2tm4Y4XuZIg0n24QEtB54wuA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176 h1:Mx0aa+SUAcNRQbs5jUzV8lkDlGFU8laZsY9jrcVX5SY= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= @@ -1414,8 +1473,9 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.9.7 h1:DlHMlAyLpgEITVvNsuZqMbf8/sJl9HirmCZIeR5H9mQ= sigs.k8s.io/controller-runtime v0.9.7/go.mod h1:nExcHcQ2zvLMeoO9K7rOesGCmgu32srN5SENvpAEbGA= +sigs.k8s.io/controller-runtime v0.10.0 h1:HgyZmMpjUOrtkaFtCnfxsR1bGRuFoAczSNbn2MoKj5U= +sigs.k8s.io/controller-runtime v0.10.0/go.mod h1:GCdh6kqV6IY4LK0JLwX0Zm6g233RtVGdb/f0+KSfprg= sigs.k8s.io/kind v0.11.1 h1:pVzOkhUwMBrCB0Q/WllQDO3v14Y+o2V0tFgjTqIUjwA= sigs.k8s.io/kind v0.11.1/go.mod h1:fRpgVhtqAWrtLB9ED7zQahUimpUXuG/iHT88xYqEGIA= sigs.k8s.io/kustomize/api v0.8.8/go.mod h1:He1zoK0nk43Pc6NlV085xDXDXTNprtcyKZVm3swsdNY= diff --git a/test/infrastructure/container/docker.go b/test/infrastructure/container/docker.go index 3b632b69eca3..9c1e1257f077 100644 --- a/test/infrastructure/container/docker.go +++ b/test/infrastructure/container/docker.go @@ -35,7 +35,7 @@ import ( "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" "github.com/pkg/errors" - "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) const ( @@ -392,7 +392,7 @@ func (d *docker) RunContainer(ctx context.Context, runConfig *RunContainerInput, } networkConfig := network.NetworkingConfig{} - if runConfig.IPFamily == v1alpha4.IPv6IPFamily { + if runConfig.IPFamily == clusterv1.IPv6IPFamily { hostConfig.Sysctls = map[string]string{ "net.ipv6.conf.all.disable_ipv6": "0", "net.ipv6.conf.all.forwarding": "1", diff --git a/test/infrastructure/container/interface.go b/test/infrastructure/container/interface.go index 8a9ba19b539a..c585355c7891 100644 --- a/test/infrastructure/container/interface.go +++ b/test/infrastructure/container/interface.go @@ -20,7 +20,7 @@ import ( "context" "io" - "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // Runtime defines the interface for interacting with a container runtime. @@ -88,7 +88,7 @@ type RunContainerInput struct { // PortMappings contains host<>container ports to map. PortMappings []PortMapping // IPFamily is the IP version to use. - IPFamily v1alpha4.ClusterIPFamily + IPFamily clusterv1.ClusterIPFamily } // ExecContainerInput contains values for running exec on a container. diff --git a/test/infrastructure/docker/Makefile b/test/infrastructure/docker/Makefile index 512677b0659b..1f44a8748dd7 100644 --- a/test/infrastructure/docker/Makefile +++ b/test/infrastructure/docker/Makefile @@ -130,11 +130,14 @@ generate-go: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs Go related generate tar paths=./api/... \ paths=./$(EXP_DIR)/api/... (IFS=','; for i in "./api/v1alpha3,./$(EXP_DIR)/api/v1alpha3"; do find $$i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done) + (IFS=','; for i in "./api/v1alpha4,./$(EXP_DIR)/api/v1alpha4"; do find $$i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done) $(CONVERSION_GEN) \ --input-dirs=./api/v1alpha3 \ + --input-dirs=./api/v1alpha4 \ --input-dirs=./$(EXP_DIR)/api/v1alpha3 \ - --build-tag=ignore_autogenerated_capd_v1alpha3 \ + --build-tag=ignore_autogenerated_capd \ --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \ + --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha4 \ --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \ --go-header-file=$(ROOT)/hack/boilerplate/boilerplate.generatego.txt diff --git a/test/infrastructure/docker/api/v1alpha3/conversion.go b/test/infrastructure/docker/api/v1alpha3/conversion.go index c2efe2a9dc25..4cbf77c02f06 100644 --- a/test/infrastructure/docker/api/v1alpha3/conversion.go +++ b/test/infrastructure/docker/api/v1alpha3/conversion.go @@ -19,14 +19,15 @@ package v1alpha3 import ( apiconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" + "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" ) func (src *DockerCluster) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*v1alpha4.DockerCluster) + dst := dstRaw.(*v1beta1.DockerCluster) - if err := Convert_v1alpha3_DockerCluster_To_v1alpha4_DockerCluster(src, dst, nil); err != nil { + if err := Convert_v1alpha3_DockerCluster_To_v1beta1_DockerCluster(src, dst, nil); err != nil { return err } @@ -48,9 +49,9 @@ func (src *DockerCluster) ConvertTo(dstRaw conversion.Hub) error { } func (dst *DockerCluster) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*v1alpha4.DockerCluster) + src := srcRaw.(*v1beta1.DockerCluster) - if err := Convert_v1alpha4_DockerCluster_To_v1alpha3_DockerCluster(src, dst, nil); err != nil { + if err := Convert_v1beta1_DockerCluster_To_v1alpha3_DockerCluster(src, dst, nil); err != nil { return err } @@ -62,8 +63,8 @@ func (dst *DockerCluster) ConvertFrom(srcRaw conversion.Hub) error { return nil } -// Convert_v1alpha4_DockerClusterSpec_To_v1alpha3_DockerClusterSpec is an autogenerated conversion function. -func Convert_v1alpha4_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(in *v1alpha4.DockerClusterSpec, out *DockerClusterSpec, s apiconversion.Scope) error { +// Convert_v1beta1_DockerClusterSpec_To_v1alpha3_DockerClusterSpec is an autogenerated conversion function. +func Convert_v1beta1_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(in *v1beta1.DockerClusterSpec, out *DockerClusterSpec, s apiconversion.Scope) error { // DockerClusterSpec.LoadBalancer was added in v1alpha4, so automatic conversion is not possible - return autoConvert_v1alpha4_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(in, out, s) + return autoConvert_v1beta1_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(in, out, s) } diff --git a/test/infrastructure/docker/api/v1alpha3/doc.go b/test/infrastructure/docker/api/v1alpha3/doc.go index c4497d19bff2..78f3cde2fb62 100644 --- a/test/infrastructure/docker/api/v1alpha3/doc.go +++ b/test/infrastructure/docker/api/v1alpha3/doc.go @@ -15,5 +15,5 @@ limitations under the License. */ // Package v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1 package v1alpha3 diff --git a/test/infrastructure/docker/api/v1alpha3/zz_generated.conversion.go b/test/infrastructure/docker/api/v1alpha3/zz_generated.conversion.go index 7c914c4663a1..1a3edd63b888 100644 --- a/test/infrastructure/docker/api/v1alpha3/zz_generated.conversion.go +++ b/test/infrastructure/docker/api/v1alpha3/zz_generated.conversion.go @@ -1,4 +1,4 @@ -// +build !ignore_autogenerated_capd_v1alpha3 +// +build !ignore_autogenerated_capd /* Copyright The Kubernetes Authors. @@ -26,8 +26,8 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" apiv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - v1alpha4 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + v1beta1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) func init() { @@ -37,210 +37,210 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*APIEndpoint)(nil), (*v1alpha4.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint(a.(*APIEndpoint), b.(*v1alpha4.APIEndpoint), scope) + if err := s.AddGeneratedConversionFunc((*APIEndpoint)(nil), (*v1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(a.(*APIEndpoint), b.(*v1beta1.APIEndpoint), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint(a.(*v1alpha4.APIEndpoint), b.(*APIEndpoint), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(a.(*v1beta1.APIEndpoint), b.(*APIEndpoint), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerCluster)(nil), (*v1alpha4.DockerCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerCluster_To_v1alpha4_DockerCluster(a.(*DockerCluster), b.(*v1alpha4.DockerCluster), scope) + if err := s.AddGeneratedConversionFunc((*DockerCluster)(nil), (*v1beta1.DockerCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerCluster_To_v1beta1_DockerCluster(a.(*DockerCluster), b.(*v1beta1.DockerCluster), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerCluster)(nil), (*DockerCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerCluster_To_v1alpha3_DockerCluster(a.(*v1alpha4.DockerCluster), b.(*DockerCluster), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerCluster)(nil), (*DockerCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerCluster_To_v1alpha3_DockerCluster(a.(*v1beta1.DockerCluster), b.(*DockerCluster), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerClusterList)(nil), (*v1alpha4.DockerClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerClusterList_To_v1alpha4_DockerClusterList(a.(*DockerClusterList), b.(*v1alpha4.DockerClusterList), scope) + if err := s.AddGeneratedConversionFunc((*DockerClusterList)(nil), (*v1beta1.DockerClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerClusterList_To_v1beta1_DockerClusterList(a.(*DockerClusterList), b.(*v1beta1.DockerClusterList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerClusterList)(nil), (*DockerClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerClusterList_To_v1alpha3_DockerClusterList(a.(*v1alpha4.DockerClusterList), b.(*DockerClusterList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerClusterList)(nil), (*DockerClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerClusterList_To_v1alpha3_DockerClusterList(a.(*v1beta1.DockerClusterList), b.(*DockerClusterList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerClusterSpec)(nil), (*v1alpha4.DockerClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(a.(*DockerClusterSpec), b.(*v1alpha4.DockerClusterSpec), scope) + if err := s.AddGeneratedConversionFunc((*DockerClusterSpec)(nil), (*v1beta1.DockerClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerClusterSpec_To_v1beta1_DockerClusterSpec(a.(*DockerClusterSpec), b.(*v1beta1.DockerClusterSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerClusterStatus)(nil), (*v1alpha4.DockerClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(a.(*DockerClusterStatus), b.(*v1alpha4.DockerClusterStatus), scope) + if err := s.AddGeneratedConversionFunc((*DockerClusterStatus)(nil), (*v1beta1.DockerClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerClusterStatus_To_v1beta1_DockerClusterStatus(a.(*DockerClusterStatus), b.(*v1beta1.DockerClusterStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerClusterStatus)(nil), (*DockerClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(a.(*v1alpha4.DockerClusterStatus), b.(*DockerClusterStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerClusterStatus)(nil), (*DockerClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(a.(*v1beta1.DockerClusterStatus), b.(*DockerClusterStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachine)(nil), (*v1alpha4.DockerMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachine_To_v1alpha4_DockerMachine(a.(*DockerMachine), b.(*v1alpha4.DockerMachine), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachine)(nil), (*v1beta1.DockerMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachine_To_v1beta1_DockerMachine(a.(*DockerMachine), b.(*v1beta1.DockerMachine), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachine)(nil), (*DockerMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachine_To_v1alpha3_DockerMachine(a.(*v1alpha4.DockerMachine), b.(*DockerMachine), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachine)(nil), (*DockerMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachine_To_v1alpha3_DockerMachine(a.(*v1beta1.DockerMachine), b.(*DockerMachine), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachineList)(nil), (*v1alpha4.DockerMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachineList_To_v1alpha4_DockerMachineList(a.(*DockerMachineList), b.(*v1alpha4.DockerMachineList), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachineList)(nil), (*v1beta1.DockerMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachineList_To_v1beta1_DockerMachineList(a.(*DockerMachineList), b.(*v1beta1.DockerMachineList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachineList)(nil), (*DockerMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachineList_To_v1alpha3_DockerMachineList(a.(*v1alpha4.DockerMachineList), b.(*DockerMachineList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineList)(nil), (*DockerMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineList_To_v1alpha3_DockerMachineList(a.(*v1beta1.DockerMachineList), b.(*DockerMachineList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachineSpec)(nil), (*v1alpha4.DockerMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(a.(*DockerMachineSpec), b.(*v1alpha4.DockerMachineSpec), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachineSpec)(nil), (*v1beta1.DockerMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachineSpec_To_v1beta1_DockerMachineSpec(a.(*DockerMachineSpec), b.(*v1beta1.DockerMachineSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachineSpec)(nil), (*DockerMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(a.(*v1alpha4.DockerMachineSpec), b.(*DockerMachineSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineSpec)(nil), (*DockerMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(a.(*v1beta1.DockerMachineSpec), b.(*DockerMachineSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachineStatus)(nil), (*v1alpha4.DockerMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(a.(*DockerMachineStatus), b.(*v1alpha4.DockerMachineStatus), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachineStatus)(nil), (*v1beta1.DockerMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachineStatus_To_v1beta1_DockerMachineStatus(a.(*DockerMachineStatus), b.(*v1beta1.DockerMachineStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachineStatus)(nil), (*DockerMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(a.(*v1alpha4.DockerMachineStatus), b.(*DockerMachineStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineStatus)(nil), (*DockerMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(a.(*v1beta1.DockerMachineStatus), b.(*DockerMachineStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachineTemplate)(nil), (*v1alpha4.DockerMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate(a.(*DockerMachineTemplate), b.(*v1alpha4.DockerMachineTemplate), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachineTemplate)(nil), (*v1beta1.DockerMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate(a.(*DockerMachineTemplate), b.(*v1beta1.DockerMachineTemplate), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachineTemplate)(nil), (*DockerMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachineTemplate_To_v1alpha3_DockerMachineTemplate(a.(*v1alpha4.DockerMachineTemplate), b.(*DockerMachineTemplate), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineTemplate)(nil), (*DockerMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineTemplate_To_v1alpha3_DockerMachineTemplate(a.(*v1beta1.DockerMachineTemplate), b.(*DockerMachineTemplate), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachineTemplateList)(nil), (*v1alpha4.DockerMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachineTemplateList_To_v1alpha4_DockerMachineTemplateList(a.(*DockerMachineTemplateList), b.(*v1alpha4.DockerMachineTemplateList), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachineTemplateList)(nil), (*v1beta1.DockerMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachineTemplateList_To_v1beta1_DockerMachineTemplateList(a.(*DockerMachineTemplateList), b.(*v1beta1.DockerMachineTemplateList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachineTemplateList)(nil), (*DockerMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachineTemplateList_To_v1alpha3_DockerMachineTemplateList(a.(*v1alpha4.DockerMachineTemplateList), b.(*DockerMachineTemplateList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineTemplateList)(nil), (*DockerMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineTemplateList_To_v1alpha3_DockerMachineTemplateList(a.(*v1beta1.DockerMachineTemplateList), b.(*DockerMachineTemplateList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachineTemplateResource)(nil), (*v1alpha4.DockerMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource(a.(*DockerMachineTemplateResource), b.(*v1alpha4.DockerMachineTemplateResource), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachineTemplateResource)(nil), (*v1beta1.DockerMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource(a.(*DockerMachineTemplateResource), b.(*v1beta1.DockerMachineTemplateResource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachineTemplateResource)(nil), (*DockerMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource(a.(*v1alpha4.DockerMachineTemplateResource), b.(*DockerMachineTemplateResource), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineTemplateResource)(nil), (*DockerMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource(a.(*v1beta1.DockerMachineTemplateResource), b.(*DockerMachineTemplateResource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachineTemplateSpec)(nil), (*v1alpha4.DockerMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec(a.(*DockerMachineTemplateSpec), b.(*v1alpha4.DockerMachineTemplateSpec), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachineTemplateSpec)(nil), (*v1beta1.DockerMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec(a.(*DockerMachineTemplateSpec), b.(*v1beta1.DockerMachineTemplateSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachineTemplateSpec)(nil), (*DockerMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec(a.(*v1alpha4.DockerMachineTemplateSpec), b.(*DockerMachineTemplateSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineTemplateSpec)(nil), (*DockerMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec(a.(*v1beta1.DockerMachineTemplateSpec), b.(*DockerMachineTemplateSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*Mount)(nil), (*v1alpha4.Mount)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Mount_To_v1alpha4_Mount(a.(*Mount), b.(*v1alpha4.Mount), scope) + if err := s.AddGeneratedConversionFunc((*Mount)(nil), (*v1beta1.Mount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_Mount_To_v1beta1_Mount(a.(*Mount), b.(*v1beta1.Mount), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.Mount)(nil), (*Mount)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Mount_To_v1alpha3_Mount(a.(*v1alpha4.Mount), b.(*Mount), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.Mount)(nil), (*Mount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Mount_To_v1alpha3_Mount(a.(*v1beta1.Mount), b.(*Mount), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha4.DockerClusterSpec)(nil), (*DockerClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(a.(*v1alpha4.DockerClusterSpec), b.(*DockerClusterSpec), scope) + if err := s.AddConversionFunc((*v1beta1.DockerClusterSpec)(nil), (*DockerClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(a.(*v1beta1.DockerClusterSpec), b.(*DockerClusterSpec), scope) }); err != nil { return err } return nil } -func autoConvert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint(in *APIEndpoint, out *v1alpha4.APIEndpoint, s conversion.Scope) error { +func autoConvert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { out.Host = in.Host out.Port = in.Port return nil } -// Convert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint(in *APIEndpoint, out *v1alpha4.APIEndpoint, s conversion.Scope) error { - return autoConvert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) +// Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. +func Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + return autoConvert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) } -func autoConvert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint(in *v1alpha4.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { +func autoConvert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { out.Host = in.Host out.Port = in.Port return nil } -// Convert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint(in *v1alpha4.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - return autoConvert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint(in, out, s) +// Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint is an autogenerated conversion function. +func Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + return autoConvert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in, out, s) } -func autoConvert_v1alpha3_DockerCluster_To_v1alpha4_DockerCluster(in *DockerCluster, out *v1alpha4.DockerCluster, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerCluster_To_v1beta1_DockerCluster(in *DockerCluster, out *v1beta1.DockerCluster, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_DockerClusterSpec_To_v1beta1_DockerClusterSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_DockerClusterStatus_To_v1beta1_DockerClusterStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_DockerCluster_To_v1alpha4_DockerCluster is an autogenerated conversion function. -func Convert_v1alpha3_DockerCluster_To_v1alpha4_DockerCluster(in *DockerCluster, out *v1alpha4.DockerCluster, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerCluster_To_v1alpha4_DockerCluster(in, out, s) +// Convert_v1alpha3_DockerCluster_To_v1beta1_DockerCluster is an autogenerated conversion function. +func Convert_v1alpha3_DockerCluster_To_v1beta1_DockerCluster(in *DockerCluster, out *v1beta1.DockerCluster, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerCluster_To_v1beta1_DockerCluster(in, out, s) } -func autoConvert_v1alpha4_DockerCluster_To_v1alpha3_DockerCluster(in *v1alpha4.DockerCluster, out *DockerCluster, s conversion.Scope) error { +func autoConvert_v1beta1_DockerCluster_To_v1alpha3_DockerCluster(in *v1beta1.DockerCluster, out *DockerCluster, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_DockerCluster_To_v1alpha3_DockerCluster is an autogenerated conversion function. -func Convert_v1alpha4_DockerCluster_To_v1alpha3_DockerCluster(in *v1alpha4.DockerCluster, out *DockerCluster, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerCluster_To_v1alpha3_DockerCluster(in, out, s) +// Convert_v1beta1_DockerCluster_To_v1alpha3_DockerCluster is an autogenerated conversion function. +func Convert_v1beta1_DockerCluster_To_v1alpha3_DockerCluster(in *v1beta1.DockerCluster, out *DockerCluster, s conversion.Scope) error { + return autoConvert_v1beta1_DockerCluster_To_v1alpha3_DockerCluster(in, out, s) } -func autoConvert_v1alpha3_DockerClusterList_To_v1alpha4_DockerClusterList(in *DockerClusterList, out *v1alpha4.DockerClusterList, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerClusterList_To_v1beta1_DockerClusterList(in *DockerClusterList, out *v1beta1.DockerClusterList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.DockerCluster, len(*in)) + *out = make([]v1beta1.DockerCluster, len(*in)) for i := range *in { - if err := Convert_v1alpha3_DockerCluster_To_v1alpha4_DockerCluster(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_DockerCluster_To_v1beta1_DockerCluster(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -250,18 +250,18 @@ func autoConvert_v1alpha3_DockerClusterList_To_v1alpha4_DockerClusterList(in *Do return nil } -// Convert_v1alpha3_DockerClusterList_To_v1alpha4_DockerClusterList is an autogenerated conversion function. -func Convert_v1alpha3_DockerClusterList_To_v1alpha4_DockerClusterList(in *DockerClusterList, out *v1alpha4.DockerClusterList, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerClusterList_To_v1alpha4_DockerClusterList(in, out, s) +// Convert_v1alpha3_DockerClusterList_To_v1beta1_DockerClusterList is an autogenerated conversion function. +func Convert_v1alpha3_DockerClusterList_To_v1beta1_DockerClusterList(in *DockerClusterList, out *v1beta1.DockerClusterList, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerClusterList_To_v1beta1_DockerClusterList(in, out, s) } -func autoConvert_v1alpha4_DockerClusterList_To_v1alpha3_DockerClusterList(in *v1alpha4.DockerClusterList, out *DockerClusterList, s conversion.Scope) error { +func autoConvert_v1beta1_DockerClusterList_To_v1alpha3_DockerClusterList(in *v1beta1.DockerClusterList, out *DockerClusterList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]DockerCluster, len(*in)) for i := range *in { - if err := Convert_v1alpha4_DockerCluster_To_v1alpha3_DockerCluster(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_DockerCluster_To_v1alpha3_DockerCluster(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -271,21 +271,21 @@ func autoConvert_v1alpha4_DockerClusterList_To_v1alpha3_DockerClusterList(in *v1 return nil } -// Convert_v1alpha4_DockerClusterList_To_v1alpha3_DockerClusterList is an autogenerated conversion function. -func Convert_v1alpha4_DockerClusterList_To_v1alpha3_DockerClusterList(in *v1alpha4.DockerClusterList, out *DockerClusterList, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerClusterList_To_v1alpha3_DockerClusterList(in, out, s) +// Convert_v1beta1_DockerClusterList_To_v1alpha3_DockerClusterList is an autogenerated conversion function. +func Convert_v1beta1_DockerClusterList_To_v1alpha3_DockerClusterList(in *v1beta1.DockerClusterList, out *DockerClusterList, s conversion.Scope) error { + return autoConvert_v1beta1_DockerClusterList_To_v1alpha3_DockerClusterList(in, out, s) } -func autoConvert_v1alpha3_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(in *DockerClusterSpec, out *v1alpha4.DockerClusterSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_APIEndpoint_To_v1alpha4_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { +func autoConvert_v1alpha3_DockerClusterSpec_To_v1beta1_DockerClusterSpec(in *DockerClusterSpec, out *v1beta1.DockerClusterSpec, s conversion.Scope) error { + if err := Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { return err } if in.FailureDomains != nil { in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1alpha4.FailureDomains, len(*in)) + *out = make(apiv1beta1.FailureDomains, len(*in)) for key, val := range *in { - newVal := new(apiv1alpha4.FailureDomainSpec) - if err := apiv1alpha3.Convert_v1alpha3_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(&val, newVal, s); err != nil { + newVal := new(apiv1beta1.FailureDomainSpec) + if err := apiv1alpha3.Convert_v1alpha3_FailureDomainSpec_To_v1beta1_FailureDomainSpec(&val, newVal, s); err != nil { return err } (*out)[key] = *newVal @@ -296,13 +296,13 @@ func autoConvert_v1alpha3_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(in *Do return nil } -// Convert_v1alpha3_DockerClusterSpec_To_v1alpha4_DockerClusterSpec is an autogenerated conversion function. -func Convert_v1alpha3_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(in *DockerClusterSpec, out *v1alpha4.DockerClusterSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(in, out, s) +// Convert_v1alpha3_DockerClusterSpec_To_v1beta1_DockerClusterSpec is an autogenerated conversion function. +func Convert_v1alpha3_DockerClusterSpec_To_v1beta1_DockerClusterSpec(in *DockerClusterSpec, out *v1beta1.DockerClusterSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerClusterSpec_To_v1beta1_DockerClusterSpec(in, out, s) } -func autoConvert_v1alpha4_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(in *v1alpha4.DockerClusterSpec, out *DockerClusterSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_APIEndpoint_To_v1alpha3_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { +func autoConvert_v1beta1_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(in *v1beta1.DockerClusterSpec, out *DockerClusterSpec, s conversion.Scope) error { + if err := Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { return err } if in.FailureDomains != nil { @@ -310,7 +310,7 @@ func autoConvert_v1alpha4_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(in *v1 *out = make(apiv1alpha3.FailureDomains, len(*in)) for key, val := range *in { newVal := new(apiv1alpha3.FailureDomainSpec) - if err := apiv1alpha3.Convert_v1alpha4_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(&val, newVal, s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(&val, newVal, s); err != nil { return err } (*out)[key] = *newVal @@ -322,14 +322,14 @@ func autoConvert_v1alpha4_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(in *v1 return nil } -func autoConvert_v1alpha3_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(in *DockerClusterStatus, out *v1alpha4.DockerClusterStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerClusterStatus_To_v1beta1_DockerClusterStatus(in *DockerClusterStatus, out *v1beta1.DockerClusterStatus, s conversion.Scope) error { out.Ready = in.Ready if in.FailureDomains != nil { in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1alpha4.FailureDomains, len(*in)) + *out = make(apiv1beta1.FailureDomains, len(*in)) for key, val := range *in { - newVal := new(apiv1alpha4.FailureDomainSpec) - if err := apiv1alpha3.Convert_v1alpha3_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(&val, newVal, s); err != nil { + newVal := new(apiv1beta1.FailureDomainSpec) + if err := apiv1alpha3.Convert_v1alpha3_FailureDomainSpec_To_v1beta1_FailureDomainSpec(&val, newVal, s); err != nil { return err } (*out)[key] = *newVal @@ -339,9 +339,9 @@ func autoConvert_v1alpha3_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(in } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) + *out = make(apiv1beta1.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -351,19 +351,19 @@ func autoConvert_v1alpha3_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(in return nil } -// Convert_v1alpha3_DockerClusterStatus_To_v1alpha4_DockerClusterStatus is an autogenerated conversion function. -func Convert_v1alpha3_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(in *DockerClusterStatus, out *v1alpha4.DockerClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(in, out, s) +// Convert_v1alpha3_DockerClusterStatus_To_v1beta1_DockerClusterStatus is an autogenerated conversion function. +func Convert_v1alpha3_DockerClusterStatus_To_v1beta1_DockerClusterStatus(in *DockerClusterStatus, out *v1beta1.DockerClusterStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerClusterStatus_To_v1beta1_DockerClusterStatus(in, out, s) } -func autoConvert_v1alpha4_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(in *v1alpha4.DockerClusterStatus, out *DockerClusterStatus, s conversion.Scope) error { +func autoConvert_v1beta1_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(in *v1beta1.DockerClusterStatus, out *DockerClusterStatus, s conversion.Scope) error { out.Ready = in.Ready if in.FailureDomains != nil { in, out := &in.FailureDomains, &out.FailureDomains *out = make(apiv1alpha3.FailureDomains, len(*in)) for key, val := range *in { newVal := new(apiv1alpha3.FailureDomainSpec) - if err := apiv1alpha3.Convert_v1alpha4_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(&val, newVal, s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(&val, newVal, s); err != nil { return err } (*out)[key] = *newVal @@ -375,7 +375,7 @@ func autoConvert_v1alpha4_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(in in, out := &in.Conditions, &out.Conditions *out = make(apiv1alpha3.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha4_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -385,50 +385,50 @@ func autoConvert_v1alpha4_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(in return nil } -// Convert_v1alpha4_DockerClusterStatus_To_v1alpha3_DockerClusterStatus is an autogenerated conversion function. -func Convert_v1alpha4_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(in *v1alpha4.DockerClusterStatus, out *DockerClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(in, out, s) +// Convert_v1beta1_DockerClusterStatus_To_v1alpha3_DockerClusterStatus is an autogenerated conversion function. +func Convert_v1beta1_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(in *v1beta1.DockerClusterStatus, out *DockerClusterStatus, s conversion.Scope) error { + return autoConvert_v1beta1_DockerClusterStatus_To_v1alpha3_DockerClusterStatus(in, out, s) } -func autoConvert_v1alpha3_DockerMachine_To_v1alpha4_DockerMachine(in *DockerMachine, out *v1alpha4.DockerMachine, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachine_To_v1beta1_DockerMachine(in *DockerMachine, out *v1beta1.DockerMachine, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_DockerMachineSpec_To_v1beta1_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_DockerMachineStatus_To_v1beta1_DockerMachineStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_DockerMachine_To_v1alpha4_DockerMachine is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachine_To_v1alpha4_DockerMachine(in *DockerMachine, out *v1alpha4.DockerMachine, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachine_To_v1alpha4_DockerMachine(in, out, s) +// Convert_v1alpha3_DockerMachine_To_v1beta1_DockerMachine is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachine_To_v1beta1_DockerMachine(in *DockerMachine, out *v1beta1.DockerMachine, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachine_To_v1beta1_DockerMachine(in, out, s) } -func autoConvert_v1alpha4_DockerMachine_To_v1alpha3_DockerMachine(in *v1alpha4.DockerMachine, out *DockerMachine, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachine_To_v1alpha3_DockerMachine(in *v1beta1.DockerMachine, out *DockerMachine, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_DockerMachine_To_v1alpha3_DockerMachine is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachine_To_v1alpha3_DockerMachine(in *v1alpha4.DockerMachine, out *DockerMachine, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachine_To_v1alpha3_DockerMachine(in, out, s) +// Convert_v1beta1_DockerMachine_To_v1alpha3_DockerMachine is an autogenerated conversion function. +func Convert_v1beta1_DockerMachine_To_v1alpha3_DockerMachine(in *v1beta1.DockerMachine, out *DockerMachine, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachine_To_v1alpha3_DockerMachine(in, out, s) } -func autoConvert_v1alpha3_DockerMachineList_To_v1alpha4_DockerMachineList(in *DockerMachineList, out *v1alpha4.DockerMachineList, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachineList_To_v1beta1_DockerMachineList(in *DockerMachineList, out *v1beta1.DockerMachineList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.DockerMachine, len(*in)) + *out = make([]v1beta1.DockerMachine, len(*in)) for i := range *in { - if err := Convert_v1alpha3_DockerMachine_To_v1alpha4_DockerMachine(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_DockerMachine_To_v1beta1_DockerMachine(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -438,18 +438,18 @@ func autoConvert_v1alpha3_DockerMachineList_To_v1alpha4_DockerMachineList(in *Do return nil } -// Convert_v1alpha3_DockerMachineList_To_v1alpha4_DockerMachineList is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachineList_To_v1alpha4_DockerMachineList(in *DockerMachineList, out *v1alpha4.DockerMachineList, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachineList_To_v1alpha4_DockerMachineList(in, out, s) +// Convert_v1alpha3_DockerMachineList_To_v1beta1_DockerMachineList is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachineList_To_v1beta1_DockerMachineList(in *DockerMachineList, out *v1beta1.DockerMachineList, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachineList_To_v1beta1_DockerMachineList(in, out, s) } -func autoConvert_v1alpha4_DockerMachineList_To_v1alpha3_DockerMachineList(in *v1alpha4.DockerMachineList, out *DockerMachineList, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachineList_To_v1alpha3_DockerMachineList(in *v1beta1.DockerMachineList, out *DockerMachineList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]DockerMachine, len(*in)) for i := range *in { - if err := Convert_v1alpha4_DockerMachine_To_v1alpha3_DockerMachine(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_DockerMachine_To_v1alpha3_DockerMachine(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -459,26 +459,26 @@ func autoConvert_v1alpha4_DockerMachineList_To_v1alpha3_DockerMachineList(in *v1 return nil } -// Convert_v1alpha4_DockerMachineList_To_v1alpha3_DockerMachineList is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachineList_To_v1alpha3_DockerMachineList(in *v1alpha4.DockerMachineList, out *DockerMachineList, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachineList_To_v1alpha3_DockerMachineList(in, out, s) +// Convert_v1beta1_DockerMachineList_To_v1alpha3_DockerMachineList is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineList_To_v1alpha3_DockerMachineList(in *v1beta1.DockerMachineList, out *DockerMachineList, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineList_To_v1alpha3_DockerMachineList(in, out, s) } -func autoConvert_v1alpha3_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(in *DockerMachineSpec, out *v1alpha4.DockerMachineSpec, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachineSpec_To_v1beta1_DockerMachineSpec(in *DockerMachineSpec, out *v1beta1.DockerMachineSpec, s conversion.Scope) error { out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) out.CustomImage = in.CustomImage out.PreLoadImages = *(*[]string)(unsafe.Pointer(&in.PreLoadImages)) - out.ExtraMounts = *(*[]v1alpha4.Mount)(unsafe.Pointer(&in.ExtraMounts)) + out.ExtraMounts = *(*[]v1beta1.Mount)(unsafe.Pointer(&in.ExtraMounts)) out.Bootstrapped = in.Bootstrapped return nil } -// Convert_v1alpha3_DockerMachineSpec_To_v1alpha4_DockerMachineSpec is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(in *DockerMachineSpec, out *v1alpha4.DockerMachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(in, out, s) +// Convert_v1alpha3_DockerMachineSpec_To_v1beta1_DockerMachineSpec is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachineSpec_To_v1beta1_DockerMachineSpec(in *DockerMachineSpec, out *v1beta1.DockerMachineSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachineSpec_To_v1beta1_DockerMachineSpec(in, out, s) } -func autoConvert_v1alpha4_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(in *v1alpha4.DockerMachineSpec, out *DockerMachineSpec, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(in *v1beta1.DockerMachineSpec, out *DockerMachineSpec, s conversion.Scope) error { out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) out.CustomImage = in.CustomImage out.PreLoadImages = *(*[]string)(unsafe.Pointer(&in.PreLoadImages)) @@ -487,19 +487,19 @@ func autoConvert_v1alpha4_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(in *v1 return nil } -// Convert_v1alpha4_DockerMachineSpec_To_v1alpha3_DockerMachineSpec is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(in *v1alpha4.DockerMachineSpec, out *DockerMachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(in, out, s) +// Convert_v1beta1_DockerMachineSpec_To_v1alpha3_DockerMachineSpec is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(in *v1beta1.DockerMachineSpec, out *DockerMachineSpec, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(in, out, s) } -func autoConvert_v1alpha3_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(in *DockerMachineStatus, out *v1alpha4.DockerMachineStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachineStatus_To_v1beta1_DockerMachineStatus(in *DockerMachineStatus, out *v1beta1.DockerMachineStatus, s conversion.Scope) error { out.Ready = in.Ready out.LoadBalancerConfigured = in.LoadBalancerConfigured if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses - *out = make([]apiv1alpha4.MachineAddress, len(*in)) + *out = make([]apiv1beta1.MachineAddress, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_MachineAddress_To_v1alpha4_MachineAddress(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1alpha3_MachineAddress_To_v1beta1_MachineAddress(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -508,9 +508,9 @@ func autoConvert_v1alpha3_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(in } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) + *out = make(apiv1beta1.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -520,19 +520,19 @@ func autoConvert_v1alpha3_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(in return nil } -// Convert_v1alpha3_DockerMachineStatus_To_v1alpha4_DockerMachineStatus is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(in *DockerMachineStatus, out *v1alpha4.DockerMachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(in, out, s) +// Convert_v1alpha3_DockerMachineStatus_To_v1beta1_DockerMachineStatus is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachineStatus_To_v1beta1_DockerMachineStatus(in *DockerMachineStatus, out *v1beta1.DockerMachineStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachineStatus_To_v1beta1_DockerMachineStatus(in, out, s) } -func autoConvert_v1alpha4_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(in *v1alpha4.DockerMachineStatus, out *DockerMachineStatus, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(in *v1beta1.DockerMachineStatus, out *DockerMachineStatus, s conversion.Scope) error { out.Ready = in.Ready out.LoadBalancerConfigured = in.LoadBalancerConfigured if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses *out = make([]apiv1alpha3.MachineAddress, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha4_MachineAddress_To_v1alpha3_MachineAddress(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_MachineAddress_To_v1alpha3_MachineAddress(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -543,7 +543,7 @@ func autoConvert_v1alpha4_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(in in, out := &in.Conditions, &out.Conditions *out = make(apiv1alpha3.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha4_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -553,127 +553,127 @@ func autoConvert_v1alpha4_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(in return nil } -// Convert_v1alpha4_DockerMachineStatus_To_v1alpha3_DockerMachineStatus is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(in *v1alpha4.DockerMachineStatus, out *DockerMachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(in, out, s) +// Convert_v1beta1_DockerMachineStatus_To_v1alpha3_DockerMachineStatus is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(in *v1beta1.DockerMachineStatus, out *DockerMachineStatus, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineStatus_To_v1alpha3_DockerMachineStatus(in, out, s) } -func autoConvert_v1alpha3_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate(in *DockerMachineTemplate, out *v1alpha4.DockerMachineTemplate, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate(in *DockerMachineTemplate, out *v1beta1.DockerMachineTemplate, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha3_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate(in *DockerMachineTemplate, out *v1alpha4.DockerMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate(in, out, s) +// Convert_v1alpha3_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate(in *DockerMachineTemplate, out *v1beta1.DockerMachineTemplate, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate(in, out, s) } -func autoConvert_v1alpha4_DockerMachineTemplate_To_v1alpha3_DockerMachineTemplate(in *v1alpha4.DockerMachineTemplate, out *DockerMachineTemplate, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachineTemplate_To_v1alpha3_DockerMachineTemplate(in *v1beta1.DockerMachineTemplate, out *DockerMachineTemplate, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha4_DockerMachineTemplate_To_v1alpha3_DockerMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachineTemplate_To_v1alpha3_DockerMachineTemplate(in *v1alpha4.DockerMachineTemplate, out *DockerMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachineTemplate_To_v1alpha3_DockerMachineTemplate(in, out, s) +// Convert_v1beta1_DockerMachineTemplate_To_v1alpha3_DockerMachineTemplate is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineTemplate_To_v1alpha3_DockerMachineTemplate(in *v1beta1.DockerMachineTemplate, out *DockerMachineTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineTemplate_To_v1alpha3_DockerMachineTemplate(in, out, s) } -func autoConvert_v1alpha3_DockerMachineTemplateList_To_v1alpha4_DockerMachineTemplateList(in *DockerMachineTemplateList, out *v1alpha4.DockerMachineTemplateList, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachineTemplateList_To_v1beta1_DockerMachineTemplateList(in *DockerMachineTemplateList, out *v1beta1.DockerMachineTemplateList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha4.DockerMachineTemplate)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]v1beta1.DockerMachineTemplate)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_DockerMachineTemplateList_To_v1alpha4_DockerMachineTemplateList is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachineTemplateList_To_v1alpha4_DockerMachineTemplateList(in *DockerMachineTemplateList, out *v1alpha4.DockerMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachineTemplateList_To_v1alpha4_DockerMachineTemplateList(in, out, s) +// Convert_v1alpha3_DockerMachineTemplateList_To_v1beta1_DockerMachineTemplateList is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachineTemplateList_To_v1beta1_DockerMachineTemplateList(in *DockerMachineTemplateList, out *v1beta1.DockerMachineTemplateList, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachineTemplateList_To_v1beta1_DockerMachineTemplateList(in, out, s) } -func autoConvert_v1alpha4_DockerMachineTemplateList_To_v1alpha3_DockerMachineTemplateList(in *v1alpha4.DockerMachineTemplateList, out *DockerMachineTemplateList, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachineTemplateList_To_v1alpha3_DockerMachineTemplateList(in *v1beta1.DockerMachineTemplateList, out *DockerMachineTemplateList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]DockerMachineTemplate)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha4_DockerMachineTemplateList_To_v1alpha3_DockerMachineTemplateList is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachineTemplateList_To_v1alpha3_DockerMachineTemplateList(in *v1alpha4.DockerMachineTemplateList, out *DockerMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachineTemplateList_To_v1alpha3_DockerMachineTemplateList(in, out, s) +// Convert_v1beta1_DockerMachineTemplateList_To_v1alpha3_DockerMachineTemplateList is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineTemplateList_To_v1alpha3_DockerMachineTemplateList(in *v1beta1.DockerMachineTemplateList, out *DockerMachineTemplateList, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineTemplateList_To_v1alpha3_DockerMachineTemplateList(in, out, s) } -func autoConvert_v1alpha3_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource(in *DockerMachineTemplateResource, out *v1alpha4.DockerMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha3_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { +func autoConvert_v1alpha3_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource(in *DockerMachineTemplateResource, out *v1beta1.DockerMachineTemplateResource, s conversion.Scope) error { + if err := Convert_v1alpha3_DockerMachineSpec_To_v1beta1_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha3_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource(in *DockerMachineTemplateResource, out *v1alpha4.DockerMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource(in, out, s) +// Convert_v1alpha3_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource(in *DockerMachineTemplateResource, out *v1beta1.DockerMachineTemplateResource, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource(in, out, s) } -func autoConvert_v1alpha4_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource(in *v1alpha4.DockerMachineTemplateResource, out *DockerMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha4_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { +func autoConvert_v1beta1_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource(in *v1beta1.DockerMachineTemplateResource, out *DockerMachineTemplateResource, s conversion.Scope) error { + if err := Convert_v1beta1_DockerMachineSpec_To_v1alpha3_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } -// Convert_v1alpha4_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource(in *v1alpha4.DockerMachineTemplateResource, out *DockerMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource(in, out, s) +// Convert_v1beta1_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource(in *v1beta1.DockerMachineTemplateResource, out *DockerMachineTemplateResource, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource(in, out, s) } -func autoConvert_v1alpha3_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec(in *DockerMachineTemplateSpec, out *v1alpha4.DockerMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource(&in.Template, &out.Template, s); err != nil { +func autoConvert_v1alpha3_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec(in *DockerMachineTemplateSpec, out *v1beta1.DockerMachineTemplateSpec, s conversion.Scope) error { + if err := Convert_v1alpha3_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource(&in.Template, &out.Template, s); err != nil { return err } return nil } -// Convert_v1alpha3_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec(in *DockerMachineTemplateSpec, out *v1alpha4.DockerMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec(in, out, s) +// Convert_v1alpha3_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec(in *DockerMachineTemplateSpec, out *v1beta1.DockerMachineTemplateSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec(in, out, s) } -func autoConvert_v1alpha4_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec(in *v1alpha4.DockerMachineTemplateSpec, out *DockerMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource(&in.Template, &out.Template, s); err != nil { +func autoConvert_v1beta1_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec(in *v1beta1.DockerMachineTemplateSpec, out *DockerMachineTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta1_DockerMachineTemplateResource_To_v1alpha3_DockerMachineTemplateResource(&in.Template, &out.Template, s); err != nil { return err } return nil } -// Convert_v1alpha4_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec(in *v1alpha4.DockerMachineTemplateSpec, out *DockerMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec(in, out, s) +// Convert_v1beta1_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec(in *v1beta1.DockerMachineTemplateSpec, out *DockerMachineTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineTemplateSpec_To_v1alpha3_DockerMachineTemplateSpec(in, out, s) } -func autoConvert_v1alpha3_Mount_To_v1alpha4_Mount(in *Mount, out *v1alpha4.Mount, s conversion.Scope) error { +func autoConvert_v1alpha3_Mount_To_v1beta1_Mount(in *Mount, out *v1beta1.Mount, s conversion.Scope) error { out.ContainerPath = in.ContainerPath out.HostPath = in.HostPath out.Readonly = in.Readonly return nil } -// Convert_v1alpha3_Mount_To_v1alpha4_Mount is an autogenerated conversion function. -func Convert_v1alpha3_Mount_To_v1alpha4_Mount(in *Mount, out *v1alpha4.Mount, s conversion.Scope) error { - return autoConvert_v1alpha3_Mount_To_v1alpha4_Mount(in, out, s) +// Convert_v1alpha3_Mount_To_v1beta1_Mount is an autogenerated conversion function. +func Convert_v1alpha3_Mount_To_v1beta1_Mount(in *Mount, out *v1beta1.Mount, s conversion.Scope) error { + return autoConvert_v1alpha3_Mount_To_v1beta1_Mount(in, out, s) } -func autoConvert_v1alpha4_Mount_To_v1alpha3_Mount(in *v1alpha4.Mount, out *Mount, s conversion.Scope) error { +func autoConvert_v1beta1_Mount_To_v1alpha3_Mount(in *v1beta1.Mount, out *Mount, s conversion.Scope) error { out.ContainerPath = in.ContainerPath out.HostPath = in.HostPath out.Readonly = in.Readonly return nil } -// Convert_v1alpha4_Mount_To_v1alpha3_Mount is an autogenerated conversion function. -func Convert_v1alpha4_Mount_To_v1alpha3_Mount(in *v1alpha4.Mount, out *Mount, s conversion.Scope) error { - return autoConvert_v1alpha4_Mount_To_v1alpha3_Mount(in, out, s) +// Convert_v1beta1_Mount_To_v1alpha3_Mount is an autogenerated conversion function. +func Convert_v1beta1_Mount_To_v1alpha3_Mount(in *v1beta1.Mount, out *Mount, s conversion.Scope) error { + return autoConvert_v1beta1_Mount_To_v1alpha3_Mount(in, out, s) } diff --git a/test/infrastructure/docker/api/v1alpha4/conversion.go b/test/infrastructure/docker/api/v1alpha4/conversion.go index cd8b992bcd0d..ca8a9b58e25b 100644 --- a/test/infrastructure/docker/api/v1alpha4/conversion.go +++ b/test/infrastructure/docker/api/v1alpha4/conversion.go @@ -16,5 +16,55 @@ limitations under the License. package v1alpha4 -func (*DockerCluster) Hub() {} -func (*DockerClusterList) Hub() {} +import ( + "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" + "sigs.k8s.io/controller-runtime/pkg/conversion" +) + +func (src *DockerCluster) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.DockerCluster) + + return Convert_v1alpha4_DockerCluster_To_v1beta1_DockerCluster(src, dst, nil) +} + +func (dst *DockerCluster) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.DockerCluster) + + return Convert_v1beta1_DockerCluster_To_v1alpha4_DockerCluster(src, dst, nil) +} + +func (src *DockerClusterTemplate) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.DockerClusterTemplate) + + return Convert_v1alpha4_DockerClusterTemplate_To_v1beta1_DockerClusterTemplate(src, dst, nil) +} + +func (dst *DockerClusterTemplate) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.DockerClusterTemplate) + + return Convert_v1beta1_DockerClusterTemplate_To_v1alpha4_DockerClusterTemplate(src, dst, nil) +} + +func (src *DockerMachine) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.DockerMachine) + + return Convert_v1alpha4_DockerMachine_To_v1beta1_DockerMachine(src, dst, nil) +} + +func (dst *DockerMachine) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.DockerMachine) + + return Convert_v1beta1_DockerMachine_To_v1alpha4_DockerMachine(src, dst, nil) +} + +func (src *DockerMachineTemplate) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*v1beta1.DockerMachineTemplate) + + return Convert_v1alpha4_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate(src, dst, nil) +} + +func (dst *DockerMachineTemplate) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1beta1.DockerMachineTemplate) + + return Convert_v1beta1_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate(src, dst, nil) +} diff --git a/test/infrastructure/docker/api/v1alpha4/doc.go b/test/infrastructure/docker/api/v1alpha4/doc.go index b0efd4cde559..ac26282bb97d 100644 --- a/test/infrastructure/docker/api/v1alpha4/doc.go +++ b/test/infrastructure/docker/api/v1alpha4/doc.go @@ -14,4 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package v1alpha4 contains the v1alpha4 API implementation. +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1 package v1alpha4 diff --git a/test/infrastructure/docker/api/v1alpha4/dockercluster_types.go b/test/infrastructure/docker/api/v1alpha4/dockercluster_types.go index 1c4358fb16f5..e8b59f55d21e 100644 --- a/test/infrastructure/docker/api/v1alpha4/dockercluster_types.go +++ b/test/infrastructure/docker/api/v1alpha4/dockercluster_types.go @@ -93,7 +93,6 @@ type APIEndpoint struct { // +kubebuilder:resource:path=dockerclusters,scope=Namespaced,categories=cluster-api // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:object:root=true // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerCluster" diff --git a/test/infrastructure/docker/api/v1alpha4/dockermachine_types.go b/test/infrastructure/docker/api/v1alpha4/dockermachine_types.go index 3417a9fc2be3..8229c89cd7ee 100644 --- a/test/infrastructure/docker/api/v1alpha4/dockermachine_types.go +++ b/test/infrastructure/docker/api/v1alpha4/dockermachine_types.go @@ -92,7 +92,6 @@ type DockerMachineStatus struct { // +kubebuilder:resource:path=dockermachines,scope=Namespaced,categories=cluster-api // +kubebuilder:object:root=true -// +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerMachine" diff --git a/test/infrastructure/docker/api/v1alpha4/dockermachinetemplate_types.go b/test/infrastructure/docker/api/v1alpha4/dockermachinetemplate_types.go index 50b5b8dece12..ca6c8f8a6aa4 100644 --- a/test/infrastructure/docker/api/v1alpha4/dockermachinetemplate_types.go +++ b/test/infrastructure/docker/api/v1alpha4/dockermachinetemplate_types.go @@ -27,7 +27,6 @@ type DockerMachineTemplateSpec struct { // +kubebuilder:object:root=true // +kubebuilder:resource:path=dockermachinetemplates,scope=Namespaced,categories=cluster-api -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerMachineTemplate" // DockerMachineTemplate is the Schema for the dockermachinetemplates API. diff --git a/test/infrastructure/docker/api/v1alpha4/groupversion_info.go b/test/infrastructure/docker/api/v1alpha4/groupversion_info.go index b07130723bd8..9f321f7f90ca 100644 --- a/test/infrastructure/docker/api/v1alpha4/groupversion_info.go +++ b/test/infrastructure/docker/api/v1alpha4/groupversion_info.go @@ -33,4 +33,6 @@ var ( // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = SchemeBuilder.SchemeBuilder ) diff --git a/test/infrastructure/docker/api/v1alpha4/zz_generated.conversion.go b/test/infrastructure/docker/api/v1alpha4/zz_generated.conversion.go new file mode 100644 index 000000000000..d40c840f760d --- /dev/null +++ b/test/infrastructure/docker/api/v1alpha4/zz_generated.conversion.go @@ -0,0 +1,911 @@ +// +build !ignore_autogenerated_capd + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha4 + +import ( + unsafe "unsafe" + + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + v1beta1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" +) + +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((*APIEndpoint)(nil), (*v1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(a.(*APIEndpoint), b.(*v1beta1.APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(a.(*v1beta1.APIEndpoint), b.(*APIEndpoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerCluster)(nil), (*v1beta1.DockerCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerCluster_To_v1beta1_DockerCluster(a.(*DockerCluster), b.(*v1beta1.DockerCluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerCluster)(nil), (*DockerCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerCluster_To_v1alpha4_DockerCluster(a.(*v1beta1.DockerCluster), b.(*DockerCluster), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerClusterList)(nil), (*v1beta1.DockerClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerClusterList_To_v1beta1_DockerClusterList(a.(*DockerClusterList), b.(*v1beta1.DockerClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerClusterList)(nil), (*DockerClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerClusterList_To_v1alpha4_DockerClusterList(a.(*v1beta1.DockerClusterList), b.(*DockerClusterList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerClusterSpec)(nil), (*v1beta1.DockerClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerClusterSpec_To_v1beta1_DockerClusterSpec(a.(*DockerClusterSpec), b.(*v1beta1.DockerClusterSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerClusterSpec)(nil), (*DockerClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(a.(*v1beta1.DockerClusterSpec), b.(*DockerClusterSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerClusterStatus)(nil), (*v1beta1.DockerClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerClusterStatus_To_v1beta1_DockerClusterStatus(a.(*DockerClusterStatus), b.(*v1beta1.DockerClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerClusterStatus)(nil), (*DockerClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(a.(*v1beta1.DockerClusterStatus), b.(*DockerClusterStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerClusterTemplate)(nil), (*v1beta1.DockerClusterTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerClusterTemplate_To_v1beta1_DockerClusterTemplate(a.(*DockerClusterTemplate), b.(*v1beta1.DockerClusterTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerClusterTemplate)(nil), (*DockerClusterTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerClusterTemplate_To_v1alpha4_DockerClusterTemplate(a.(*v1beta1.DockerClusterTemplate), b.(*DockerClusterTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerClusterTemplateList)(nil), (*v1beta1.DockerClusterTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerClusterTemplateList_To_v1beta1_DockerClusterTemplateList(a.(*DockerClusterTemplateList), b.(*v1beta1.DockerClusterTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerClusterTemplateList)(nil), (*DockerClusterTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerClusterTemplateList_To_v1alpha4_DockerClusterTemplateList(a.(*v1beta1.DockerClusterTemplateList), b.(*DockerClusterTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerClusterTemplateResource)(nil), (*v1beta1.DockerClusterTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerClusterTemplateResource_To_v1beta1_DockerClusterTemplateResource(a.(*DockerClusterTemplateResource), b.(*v1beta1.DockerClusterTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerClusterTemplateResource)(nil), (*DockerClusterTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerClusterTemplateResource_To_v1alpha4_DockerClusterTemplateResource(a.(*v1beta1.DockerClusterTemplateResource), b.(*DockerClusterTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerClusterTemplateSpec)(nil), (*v1beta1.DockerClusterTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerClusterTemplateSpec_To_v1beta1_DockerClusterTemplateSpec(a.(*DockerClusterTemplateSpec), b.(*v1beta1.DockerClusterTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerClusterTemplateSpec)(nil), (*DockerClusterTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerClusterTemplateSpec_To_v1alpha4_DockerClusterTemplateSpec(a.(*v1beta1.DockerClusterTemplateSpec), b.(*DockerClusterTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerLoadBalancer)(nil), (*v1beta1.DockerLoadBalancer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerLoadBalancer_To_v1beta1_DockerLoadBalancer(a.(*DockerLoadBalancer), b.(*v1beta1.DockerLoadBalancer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerLoadBalancer)(nil), (*DockerLoadBalancer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerLoadBalancer_To_v1alpha4_DockerLoadBalancer(a.(*v1beta1.DockerLoadBalancer), b.(*DockerLoadBalancer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerMachine)(nil), (*v1beta1.DockerMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerMachine_To_v1beta1_DockerMachine(a.(*DockerMachine), b.(*v1beta1.DockerMachine), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachine)(nil), (*DockerMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachine_To_v1alpha4_DockerMachine(a.(*v1beta1.DockerMachine), b.(*DockerMachine), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerMachineList)(nil), (*v1beta1.DockerMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerMachineList_To_v1beta1_DockerMachineList(a.(*DockerMachineList), b.(*v1beta1.DockerMachineList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineList)(nil), (*DockerMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineList_To_v1alpha4_DockerMachineList(a.(*v1beta1.DockerMachineList), b.(*DockerMachineList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerMachineSpec)(nil), (*v1beta1.DockerMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerMachineSpec_To_v1beta1_DockerMachineSpec(a.(*DockerMachineSpec), b.(*v1beta1.DockerMachineSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineSpec)(nil), (*DockerMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(a.(*v1beta1.DockerMachineSpec), b.(*DockerMachineSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerMachineStatus)(nil), (*v1beta1.DockerMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerMachineStatus_To_v1beta1_DockerMachineStatus(a.(*DockerMachineStatus), b.(*v1beta1.DockerMachineStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineStatus)(nil), (*DockerMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(a.(*v1beta1.DockerMachineStatus), b.(*DockerMachineStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerMachineTemplate)(nil), (*v1beta1.DockerMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate(a.(*DockerMachineTemplate), b.(*v1beta1.DockerMachineTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineTemplate)(nil), (*DockerMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate(a.(*v1beta1.DockerMachineTemplate), b.(*DockerMachineTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerMachineTemplateList)(nil), (*v1beta1.DockerMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerMachineTemplateList_To_v1beta1_DockerMachineTemplateList(a.(*DockerMachineTemplateList), b.(*v1beta1.DockerMachineTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineTemplateList)(nil), (*DockerMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineTemplateList_To_v1alpha4_DockerMachineTemplateList(a.(*v1beta1.DockerMachineTemplateList), b.(*DockerMachineTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerMachineTemplateResource)(nil), (*v1beta1.DockerMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource(a.(*DockerMachineTemplateResource), b.(*v1beta1.DockerMachineTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineTemplateResource)(nil), (*DockerMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource(a.(*v1beta1.DockerMachineTemplateResource), b.(*DockerMachineTemplateResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*DockerMachineTemplateSpec)(nil), (*v1beta1.DockerMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec(a.(*DockerMachineTemplateSpec), b.(*v1beta1.DockerMachineTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachineTemplateSpec)(nil), (*DockerMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec(a.(*v1beta1.DockerMachineTemplateSpec), b.(*DockerMachineTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ImageMeta)(nil), (*v1beta1.ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(a.(*ImageMeta), b.(*v1beta1.ImageMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ImageMeta)(nil), (*ImageMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(a.(*v1beta1.ImageMeta), b.(*ImageMeta), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Mount)(nil), (*v1beta1.Mount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_Mount_To_v1beta1_Mount(a.(*Mount), b.(*v1beta1.Mount), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Mount)(nil), (*Mount)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Mount_To_v1alpha4_Mount(a.(*v1beta1.Mount), b.(*Mount), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + out.Host = in.Host + out.Port = in.Port + return nil +} + +// Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. +func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { + return autoConvert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) +} + +func autoConvert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + out.Host = in.Host + out.Port = in.Port + return nil +} + +// Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint is an autogenerated conversion function. +func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { + return autoConvert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) +} + +func autoConvert_v1alpha4_DockerCluster_To_v1beta1_DockerCluster(in *DockerCluster, out *v1beta1.DockerCluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_DockerClusterSpec_To_v1beta1_DockerClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_DockerClusterStatus_To_v1beta1_DockerClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DockerCluster_To_v1beta1_DockerCluster is an autogenerated conversion function. +func Convert_v1alpha4_DockerCluster_To_v1beta1_DockerCluster(in *DockerCluster, out *v1beta1.DockerCluster, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerCluster_To_v1beta1_DockerCluster(in, out, s) +} + +func autoConvert_v1beta1_DockerCluster_To_v1alpha4_DockerCluster(in *v1beta1.DockerCluster, out *DockerCluster, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DockerCluster_To_v1alpha4_DockerCluster is an autogenerated conversion function. +func Convert_v1beta1_DockerCluster_To_v1alpha4_DockerCluster(in *v1beta1.DockerCluster, out *DockerCluster, s conversion.Scope) error { + return autoConvert_v1beta1_DockerCluster_To_v1alpha4_DockerCluster(in, out, s) +} + +func autoConvert_v1alpha4_DockerClusterList_To_v1beta1_DockerClusterList(in *DockerClusterList, out *v1beta1.DockerClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta1.DockerCluster, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_DockerCluster_To_v1beta1_DockerCluster(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_DockerClusterList_To_v1beta1_DockerClusterList is an autogenerated conversion function. +func Convert_v1alpha4_DockerClusterList_To_v1beta1_DockerClusterList(in *DockerClusterList, out *v1beta1.DockerClusterList, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerClusterList_To_v1beta1_DockerClusterList(in, out, s) +} + +func autoConvert_v1beta1_DockerClusterList_To_v1alpha4_DockerClusterList(in *v1beta1.DockerClusterList, out *DockerClusterList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DockerCluster, len(*in)) + for i := range *in { + if err := Convert_v1beta1_DockerCluster_To_v1alpha4_DockerCluster(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_DockerClusterList_To_v1alpha4_DockerClusterList is an autogenerated conversion function. +func Convert_v1beta1_DockerClusterList_To_v1alpha4_DockerClusterList(in *v1beta1.DockerClusterList, out *DockerClusterList, s conversion.Scope) error { + return autoConvert_v1beta1_DockerClusterList_To_v1alpha4_DockerClusterList(in, out, s) +} + +func autoConvert_v1alpha4_DockerClusterSpec_To_v1beta1_DockerClusterSpec(in *DockerClusterSpec, out *v1beta1.DockerClusterSpec, s conversion.Scope) error { + if err := Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { + return err + } + if in.FailureDomains != nil { + in, out := &in.FailureDomains, &out.FailureDomains + *out = make(apiv1beta1.FailureDomains, len(*in)) + for key, val := range *in { + newVal := new(apiv1beta1.FailureDomainSpec) + if err := apiv1alpha4.Convert_v1alpha4_FailureDomainSpec_To_v1beta1_FailureDomainSpec(&val, newVal, s); err != nil { + return err + } + (*out)[key] = *newVal + } + } else { + out.FailureDomains = nil + } + if err := Convert_v1alpha4_DockerLoadBalancer_To_v1beta1_DockerLoadBalancer(&in.LoadBalancer, &out.LoadBalancer, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DockerClusterSpec_To_v1beta1_DockerClusterSpec is an autogenerated conversion function. +func Convert_v1alpha4_DockerClusterSpec_To_v1beta1_DockerClusterSpec(in *DockerClusterSpec, out *v1beta1.DockerClusterSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerClusterSpec_To_v1beta1_DockerClusterSpec(in, out, s) +} + +func autoConvert_v1beta1_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(in *v1beta1.DockerClusterSpec, out *DockerClusterSpec, s conversion.Scope) error { + if err := Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { + return err + } + if in.FailureDomains != nil { + in, out := &in.FailureDomains, &out.FailureDomains + *out = make(apiv1alpha4.FailureDomains, len(*in)) + for key, val := range *in { + newVal := new(apiv1alpha4.FailureDomainSpec) + if err := apiv1alpha4.Convert_v1beta1_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(&val, newVal, s); err != nil { + return err + } + (*out)[key] = *newVal + } + } else { + out.FailureDomains = nil + } + if err := Convert_v1beta1_DockerLoadBalancer_To_v1alpha4_DockerLoadBalancer(&in.LoadBalancer, &out.LoadBalancer, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DockerClusterSpec_To_v1alpha4_DockerClusterSpec is an autogenerated conversion function. +func Convert_v1beta1_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(in *v1beta1.DockerClusterSpec, out *DockerClusterSpec, s conversion.Scope) error { + return autoConvert_v1beta1_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(in, out, s) +} + +func autoConvert_v1alpha4_DockerClusterStatus_To_v1beta1_DockerClusterStatus(in *DockerClusterStatus, out *v1beta1.DockerClusterStatus, s conversion.Scope) error { + out.Ready = in.Ready + if in.FailureDomains != nil { + in, out := &in.FailureDomains, &out.FailureDomains + *out = make(apiv1beta1.FailureDomains, len(*in)) + for key, val := range *in { + newVal := new(apiv1beta1.FailureDomainSpec) + if err := apiv1alpha4.Convert_v1alpha4_FailureDomainSpec_To_v1beta1_FailureDomainSpec(&val, newVal, s); err != nil { + return err + } + (*out)[key] = *newVal + } + } else { + out.FailureDomains = nil + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1beta1.Conditions, len(*in)) + for i := range *in { + if err := apiv1alpha4.Convert_v1alpha4_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +// Convert_v1alpha4_DockerClusterStatus_To_v1beta1_DockerClusterStatus is an autogenerated conversion function. +func Convert_v1alpha4_DockerClusterStatus_To_v1beta1_DockerClusterStatus(in *DockerClusterStatus, out *v1beta1.DockerClusterStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerClusterStatus_To_v1beta1_DockerClusterStatus(in, out, s) +} + +func autoConvert_v1beta1_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(in *v1beta1.DockerClusterStatus, out *DockerClusterStatus, s conversion.Scope) error { + out.Ready = in.Ready + if in.FailureDomains != nil { + in, out := &in.FailureDomains, &out.FailureDomains + *out = make(apiv1alpha4.FailureDomains, len(*in)) + for key, val := range *in { + newVal := new(apiv1alpha4.FailureDomainSpec) + if err := apiv1alpha4.Convert_v1beta1_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(&val, newVal, s); err != nil { + return err + } + (*out)[key] = *newVal + } + } else { + out.FailureDomains = nil + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1alpha4.Conditions, len(*in)) + for i := range *in { + if err := apiv1alpha4.Convert_v1beta1_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +// Convert_v1beta1_DockerClusterStatus_To_v1alpha4_DockerClusterStatus is an autogenerated conversion function. +func Convert_v1beta1_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(in *v1beta1.DockerClusterStatus, out *DockerClusterStatus, s conversion.Scope) error { + return autoConvert_v1beta1_DockerClusterStatus_To_v1alpha4_DockerClusterStatus(in, out, s) +} + +func autoConvert_v1alpha4_DockerClusterTemplate_To_v1beta1_DockerClusterTemplate(in *DockerClusterTemplate, out *v1beta1.DockerClusterTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_DockerClusterTemplateSpec_To_v1beta1_DockerClusterTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DockerClusterTemplate_To_v1beta1_DockerClusterTemplate is an autogenerated conversion function. +func Convert_v1alpha4_DockerClusterTemplate_To_v1beta1_DockerClusterTemplate(in *DockerClusterTemplate, out *v1beta1.DockerClusterTemplate, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerClusterTemplate_To_v1beta1_DockerClusterTemplate(in, out, s) +} + +func autoConvert_v1beta1_DockerClusterTemplate_To_v1alpha4_DockerClusterTemplate(in *v1beta1.DockerClusterTemplate, out *DockerClusterTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_DockerClusterTemplateSpec_To_v1alpha4_DockerClusterTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DockerClusterTemplate_To_v1alpha4_DockerClusterTemplate is an autogenerated conversion function. +func Convert_v1beta1_DockerClusterTemplate_To_v1alpha4_DockerClusterTemplate(in *v1beta1.DockerClusterTemplate, out *DockerClusterTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_DockerClusterTemplate_To_v1alpha4_DockerClusterTemplate(in, out, s) +} + +func autoConvert_v1alpha4_DockerClusterTemplateList_To_v1beta1_DockerClusterTemplateList(in *DockerClusterTemplateList, out *v1beta1.DockerClusterTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta1.DockerClusterTemplate, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_DockerClusterTemplate_To_v1beta1_DockerClusterTemplate(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_DockerClusterTemplateList_To_v1beta1_DockerClusterTemplateList is an autogenerated conversion function. +func Convert_v1alpha4_DockerClusterTemplateList_To_v1beta1_DockerClusterTemplateList(in *DockerClusterTemplateList, out *v1beta1.DockerClusterTemplateList, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerClusterTemplateList_To_v1beta1_DockerClusterTemplateList(in, out, s) +} + +func autoConvert_v1beta1_DockerClusterTemplateList_To_v1alpha4_DockerClusterTemplateList(in *v1beta1.DockerClusterTemplateList, out *DockerClusterTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DockerClusterTemplate, len(*in)) + for i := range *in { + if err := Convert_v1beta1_DockerClusterTemplate_To_v1alpha4_DockerClusterTemplate(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_DockerClusterTemplateList_To_v1alpha4_DockerClusterTemplateList is an autogenerated conversion function. +func Convert_v1beta1_DockerClusterTemplateList_To_v1alpha4_DockerClusterTemplateList(in *v1beta1.DockerClusterTemplateList, out *DockerClusterTemplateList, s conversion.Scope) error { + return autoConvert_v1beta1_DockerClusterTemplateList_To_v1alpha4_DockerClusterTemplateList(in, out, s) +} + +func autoConvert_v1alpha4_DockerClusterTemplateResource_To_v1beta1_DockerClusterTemplateResource(in *DockerClusterTemplateResource, out *v1beta1.DockerClusterTemplateResource, s conversion.Scope) error { + if err := Convert_v1alpha4_DockerClusterSpec_To_v1beta1_DockerClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DockerClusterTemplateResource_To_v1beta1_DockerClusterTemplateResource is an autogenerated conversion function. +func Convert_v1alpha4_DockerClusterTemplateResource_To_v1beta1_DockerClusterTemplateResource(in *DockerClusterTemplateResource, out *v1beta1.DockerClusterTemplateResource, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerClusterTemplateResource_To_v1beta1_DockerClusterTemplateResource(in, out, s) +} + +func autoConvert_v1beta1_DockerClusterTemplateResource_To_v1alpha4_DockerClusterTemplateResource(in *v1beta1.DockerClusterTemplateResource, out *DockerClusterTemplateResource, s conversion.Scope) error { + if err := Convert_v1beta1_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DockerClusterTemplateResource_To_v1alpha4_DockerClusterTemplateResource is an autogenerated conversion function. +func Convert_v1beta1_DockerClusterTemplateResource_To_v1alpha4_DockerClusterTemplateResource(in *v1beta1.DockerClusterTemplateResource, out *DockerClusterTemplateResource, s conversion.Scope) error { + return autoConvert_v1beta1_DockerClusterTemplateResource_To_v1alpha4_DockerClusterTemplateResource(in, out, s) +} + +func autoConvert_v1alpha4_DockerClusterTemplateSpec_To_v1beta1_DockerClusterTemplateSpec(in *DockerClusterTemplateSpec, out *v1beta1.DockerClusterTemplateSpec, s conversion.Scope) error { + if err := Convert_v1alpha4_DockerClusterTemplateResource_To_v1beta1_DockerClusterTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DockerClusterTemplateSpec_To_v1beta1_DockerClusterTemplateSpec is an autogenerated conversion function. +func Convert_v1alpha4_DockerClusterTemplateSpec_To_v1beta1_DockerClusterTemplateSpec(in *DockerClusterTemplateSpec, out *v1beta1.DockerClusterTemplateSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerClusterTemplateSpec_To_v1beta1_DockerClusterTemplateSpec(in, out, s) +} + +func autoConvert_v1beta1_DockerClusterTemplateSpec_To_v1alpha4_DockerClusterTemplateSpec(in *v1beta1.DockerClusterTemplateSpec, out *DockerClusterTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta1_DockerClusterTemplateResource_To_v1alpha4_DockerClusterTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DockerClusterTemplateSpec_To_v1alpha4_DockerClusterTemplateSpec is an autogenerated conversion function. +func Convert_v1beta1_DockerClusterTemplateSpec_To_v1alpha4_DockerClusterTemplateSpec(in *v1beta1.DockerClusterTemplateSpec, out *DockerClusterTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta1_DockerClusterTemplateSpec_To_v1alpha4_DockerClusterTemplateSpec(in, out, s) +} + +func autoConvert_v1alpha4_DockerLoadBalancer_To_v1beta1_DockerLoadBalancer(in *DockerLoadBalancer, out *v1beta1.DockerLoadBalancer, s conversion.Scope) error { + if err := Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DockerLoadBalancer_To_v1beta1_DockerLoadBalancer is an autogenerated conversion function. +func Convert_v1alpha4_DockerLoadBalancer_To_v1beta1_DockerLoadBalancer(in *DockerLoadBalancer, out *v1beta1.DockerLoadBalancer, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerLoadBalancer_To_v1beta1_DockerLoadBalancer(in, out, s) +} + +func autoConvert_v1beta1_DockerLoadBalancer_To_v1alpha4_DockerLoadBalancer(in *v1beta1.DockerLoadBalancer, out *DockerLoadBalancer, s conversion.Scope) error { + if err := Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(&in.ImageMeta, &out.ImageMeta, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DockerLoadBalancer_To_v1alpha4_DockerLoadBalancer is an autogenerated conversion function. +func Convert_v1beta1_DockerLoadBalancer_To_v1alpha4_DockerLoadBalancer(in *v1beta1.DockerLoadBalancer, out *DockerLoadBalancer, s conversion.Scope) error { + return autoConvert_v1beta1_DockerLoadBalancer_To_v1alpha4_DockerLoadBalancer(in, out, s) +} + +func autoConvert_v1alpha4_DockerMachine_To_v1beta1_DockerMachine(in *DockerMachine, out *v1beta1.DockerMachine, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_DockerMachineSpec_To_v1beta1_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_DockerMachineStatus_To_v1beta1_DockerMachineStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DockerMachine_To_v1beta1_DockerMachine is an autogenerated conversion function. +func Convert_v1alpha4_DockerMachine_To_v1beta1_DockerMachine(in *DockerMachine, out *v1beta1.DockerMachine, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerMachine_To_v1beta1_DockerMachine(in, out, s) +} + +func autoConvert_v1beta1_DockerMachine_To_v1alpha4_DockerMachine(in *v1beta1.DockerMachine, out *DockerMachine, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DockerMachine_To_v1alpha4_DockerMachine is an autogenerated conversion function. +func Convert_v1beta1_DockerMachine_To_v1alpha4_DockerMachine(in *v1beta1.DockerMachine, out *DockerMachine, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachine_To_v1alpha4_DockerMachine(in, out, s) +} + +func autoConvert_v1alpha4_DockerMachineList_To_v1beta1_DockerMachineList(in *DockerMachineList, out *v1beta1.DockerMachineList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta1.DockerMachine, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_DockerMachine_To_v1beta1_DockerMachine(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_DockerMachineList_To_v1beta1_DockerMachineList is an autogenerated conversion function. +func Convert_v1alpha4_DockerMachineList_To_v1beta1_DockerMachineList(in *DockerMachineList, out *v1beta1.DockerMachineList, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerMachineList_To_v1beta1_DockerMachineList(in, out, s) +} + +func autoConvert_v1beta1_DockerMachineList_To_v1alpha4_DockerMachineList(in *v1beta1.DockerMachineList, out *DockerMachineList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DockerMachine, len(*in)) + for i := range *in { + if err := Convert_v1beta1_DockerMachine_To_v1alpha4_DockerMachine(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_DockerMachineList_To_v1alpha4_DockerMachineList is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineList_To_v1alpha4_DockerMachineList(in *v1beta1.DockerMachineList, out *DockerMachineList, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineList_To_v1alpha4_DockerMachineList(in, out, s) +} + +func autoConvert_v1alpha4_DockerMachineSpec_To_v1beta1_DockerMachineSpec(in *DockerMachineSpec, out *v1beta1.DockerMachineSpec, s conversion.Scope) error { + out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) + out.CustomImage = in.CustomImage + out.PreLoadImages = *(*[]string)(unsafe.Pointer(&in.PreLoadImages)) + out.ExtraMounts = *(*[]v1beta1.Mount)(unsafe.Pointer(&in.ExtraMounts)) + out.Bootstrapped = in.Bootstrapped + return nil +} + +// Convert_v1alpha4_DockerMachineSpec_To_v1beta1_DockerMachineSpec is an autogenerated conversion function. +func Convert_v1alpha4_DockerMachineSpec_To_v1beta1_DockerMachineSpec(in *DockerMachineSpec, out *v1beta1.DockerMachineSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerMachineSpec_To_v1beta1_DockerMachineSpec(in, out, s) +} + +func autoConvert_v1beta1_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(in *v1beta1.DockerMachineSpec, out *DockerMachineSpec, s conversion.Scope) error { + out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) + out.CustomImage = in.CustomImage + out.PreLoadImages = *(*[]string)(unsafe.Pointer(&in.PreLoadImages)) + out.ExtraMounts = *(*[]Mount)(unsafe.Pointer(&in.ExtraMounts)) + out.Bootstrapped = in.Bootstrapped + return nil +} + +// Convert_v1beta1_DockerMachineSpec_To_v1alpha4_DockerMachineSpec is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(in *v1beta1.DockerMachineSpec, out *DockerMachineSpec, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(in, out, s) +} + +func autoConvert_v1alpha4_DockerMachineStatus_To_v1beta1_DockerMachineStatus(in *DockerMachineStatus, out *v1beta1.DockerMachineStatus, s conversion.Scope) error { + out.Ready = in.Ready + out.LoadBalancerConfigured = in.LoadBalancerConfigured + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make([]apiv1beta1.MachineAddress, len(*in)) + for i := range *in { + if err := apiv1alpha4.Convert_v1alpha4_MachineAddress_To_v1beta1_MachineAddress(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Addresses = nil + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1beta1.Conditions, len(*in)) + for i := range *in { + if err := apiv1alpha4.Convert_v1alpha4_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +// Convert_v1alpha4_DockerMachineStatus_To_v1beta1_DockerMachineStatus is an autogenerated conversion function. +func Convert_v1alpha4_DockerMachineStatus_To_v1beta1_DockerMachineStatus(in *DockerMachineStatus, out *v1beta1.DockerMachineStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerMachineStatus_To_v1beta1_DockerMachineStatus(in, out, s) +} + +func autoConvert_v1beta1_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(in *v1beta1.DockerMachineStatus, out *DockerMachineStatus, s conversion.Scope) error { + out.Ready = in.Ready + out.LoadBalancerConfigured = in.LoadBalancerConfigured + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make([]apiv1alpha4.MachineAddress, len(*in)) + for i := range *in { + if err := apiv1alpha4.Convert_v1beta1_MachineAddress_To_v1alpha4_MachineAddress(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Addresses = nil + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1alpha4.Conditions, len(*in)) + for i := range *in { + if err := apiv1alpha4.Convert_v1beta1_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +// Convert_v1beta1_DockerMachineStatus_To_v1alpha4_DockerMachineStatus is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(in *v1beta1.DockerMachineStatus, out *DockerMachineStatus, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineStatus_To_v1alpha4_DockerMachineStatus(in, out, s) +} + +func autoConvert_v1alpha4_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate(in *DockerMachineTemplate, out *v1beta1.DockerMachineTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate is an autogenerated conversion function. +func Convert_v1alpha4_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate(in *DockerMachineTemplate, out *v1beta1.DockerMachineTemplate, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerMachineTemplate_To_v1beta1_DockerMachineTemplate(in, out, s) +} + +func autoConvert_v1beta1_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate(in *v1beta1.DockerMachineTemplate, out *DockerMachineTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate(in *v1beta1.DockerMachineTemplate, out *DockerMachineTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineTemplate_To_v1alpha4_DockerMachineTemplate(in, out, s) +} + +func autoConvert_v1alpha4_DockerMachineTemplateList_To_v1beta1_DockerMachineTemplateList(in *DockerMachineTemplateList, out *v1beta1.DockerMachineTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.DockerMachineTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_DockerMachineTemplateList_To_v1beta1_DockerMachineTemplateList is an autogenerated conversion function. +func Convert_v1alpha4_DockerMachineTemplateList_To_v1beta1_DockerMachineTemplateList(in *DockerMachineTemplateList, out *v1beta1.DockerMachineTemplateList, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerMachineTemplateList_To_v1beta1_DockerMachineTemplateList(in, out, s) +} + +func autoConvert_v1beta1_DockerMachineTemplateList_To_v1alpha4_DockerMachineTemplateList(in *v1beta1.DockerMachineTemplateList, out *DockerMachineTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]DockerMachineTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_DockerMachineTemplateList_To_v1alpha4_DockerMachineTemplateList is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineTemplateList_To_v1alpha4_DockerMachineTemplateList(in *v1beta1.DockerMachineTemplateList, out *DockerMachineTemplateList, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineTemplateList_To_v1alpha4_DockerMachineTemplateList(in, out, s) +} + +func autoConvert_v1alpha4_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource(in *DockerMachineTemplateResource, out *v1beta1.DockerMachineTemplateResource, s conversion.Scope) error { + if err := Convert_v1alpha4_DockerMachineSpec_To_v1beta1_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource is an autogenerated conversion function. +func Convert_v1alpha4_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource(in *DockerMachineTemplateResource, out *v1beta1.DockerMachineTemplateResource, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource(in, out, s) +} + +func autoConvert_v1beta1_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource(in *v1beta1.DockerMachineTemplateResource, out *DockerMachineTemplateResource, s conversion.Scope) error { + if err := Convert_v1beta1_DockerMachineSpec_To_v1alpha4_DockerMachineSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource(in *v1beta1.DockerMachineTemplateResource, out *DockerMachineTemplateResource, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource(in, out, s) +} + +func autoConvert_v1alpha4_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec(in *DockerMachineTemplateSpec, out *v1beta1.DockerMachineTemplateSpec, s conversion.Scope) error { + if err := Convert_v1alpha4_DockerMachineTemplateResource_To_v1beta1_DockerMachineTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec is an autogenerated conversion function. +func Convert_v1alpha4_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec(in *DockerMachineTemplateSpec, out *v1beta1.DockerMachineTemplateSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_DockerMachineTemplateSpec_To_v1beta1_DockerMachineTemplateSpec(in, out, s) +} + +func autoConvert_v1beta1_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec(in *v1beta1.DockerMachineTemplateSpec, out *DockerMachineTemplateSpec, s conversion.Scope) error { + if err := Convert_v1beta1_DockerMachineTemplateResource_To_v1alpha4_DockerMachineTemplateResource(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec is an autogenerated conversion function. +func Convert_v1beta1_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec(in *v1beta1.DockerMachineTemplateSpec, out *DockerMachineTemplateSpec, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachineTemplateSpec_To_v1alpha4_DockerMachineTemplateSpec(in, out, s) +} + +func autoConvert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(in *ImageMeta, out *v1beta1.ImageMeta, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta is an autogenerated conversion function. +func Convert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(in *ImageMeta, out *v1beta1.ImageMeta, s conversion.Scope) error { + return autoConvert_v1alpha4_ImageMeta_To_v1beta1_ImageMeta(in, out, s) +} + +func autoConvert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(in *v1beta1.ImageMeta, out *ImageMeta, s conversion.Scope) error { + out.ImageRepository = in.ImageRepository + out.ImageTag = in.ImageTag + return nil +} + +// Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta is an autogenerated conversion function. +func Convert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(in *v1beta1.ImageMeta, out *ImageMeta, s conversion.Scope) error { + return autoConvert_v1beta1_ImageMeta_To_v1alpha4_ImageMeta(in, out, s) +} + +func autoConvert_v1alpha4_Mount_To_v1beta1_Mount(in *Mount, out *v1beta1.Mount, s conversion.Scope) error { + out.ContainerPath = in.ContainerPath + out.HostPath = in.HostPath + out.Readonly = in.Readonly + return nil +} + +// Convert_v1alpha4_Mount_To_v1beta1_Mount is an autogenerated conversion function. +func Convert_v1alpha4_Mount_To_v1beta1_Mount(in *Mount, out *v1beta1.Mount, s conversion.Scope) error { + return autoConvert_v1alpha4_Mount_To_v1beta1_Mount(in, out, s) +} + +func autoConvert_v1beta1_Mount_To_v1alpha4_Mount(in *v1beta1.Mount, out *Mount, s conversion.Scope) error { + out.ContainerPath = in.ContainerPath + out.HostPath = in.HostPath + out.Readonly = in.Readonly + return nil +} + +// Convert_v1beta1_Mount_To_v1alpha4_Mount is an autogenerated conversion function. +func Convert_v1beta1_Mount_To_v1alpha4_Mount(in *v1beta1.Mount, out *Mount, s conversion.Scope) error { + return autoConvert_v1beta1_Mount_To_v1alpha4_Mount(in, out, s) +} diff --git a/test/infrastructure/docker/api/v1beta1/condition_consts.go b/test/infrastructure/docker/api/v1beta1/condition_consts.go new file mode 100644 index 000000000000..825678ce0f4e --- /dev/null +++ b/test/infrastructure/docker/api/v1beta1/condition_consts.go @@ -0,0 +1,81 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + +// Conditions and condition Reasons for the DockerMachine object + +const ( + // ContainerProvisionedCondition documents the status of the provisioning of the container + // generated by a DockerMachine. + // + // NOTE: When the container provisioning starts the process completes almost immediately and within + // the same reconciliation, so the user will always see a transition from Wait to Provisioned without + // having evidence that the operation is started/is in progress. + ContainerProvisionedCondition clusterv1.ConditionType = "ContainerProvisioned" + + // WaitingForClusterInfrastructureReason (Severity=Info) documents a DockerMachine waiting for the cluster + // infrastructure to be ready before starting to create the container that provides the DockerMachine + // infrastructure. + WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure" + + // WaitingForBootstrapDataReason (Severity=Info) documents a DockerMachine waiting for the bootstrap + // script to be ready before starting to create the container that provides the DockerMachine infrastructure. + WaitingForBootstrapDataReason = "WaitingForBootstrapData" + + // ContainerProvisioningFailedReason (Severity=Warning) documents a DockerMachine controller detecting + // an error while provisioning the container that provides the DockerMachine infrastructure; those kind of + // errors are usually transient and failed provisioning are automatically re-tried by the controller. + ContainerProvisioningFailedReason = "ContainerProvisioningFailed" +) + +const ( + // BootstrapExecSucceededCondition provides an observation of the DockerMachine bootstrap process. + // It is set based on successful execution of bootstrap commands and on the existence of + // the /run/cluster-api/bootstrap-success.complete file. + // The condition gets generated after ContainerProvisionedCondition is True. + // + // NOTE as a difference from other providers, container provisioning and bootstrap are directly managed + // by the DockerMachine controller (not by cloud-init). + BootstrapExecSucceededCondition clusterv1.ConditionType = "BootstrapExecSucceeded" + + // BootstrappingReason documents (Severity=Info) a DockerMachine currently executing the bootstrap + // script that creates the Kubernetes node on the newly provisioned machine infrastructure. + BootstrappingReason = "Bootstrapping" + + // BootstrapFailedReason documents (Severity=Warning) a DockerMachine controller detecting an error while + // bootstrapping the Kubernetes node on the machine just provisioned; those kind of errors are usually + // transient and failed bootstrap are automatically re-tried by the controller. + BootstrapFailedReason = "BootstrapFailed" +) + +// Conditions and condition Reasons for the DockerCluster object + +const ( + // LoadBalancerAvailableCondition documents the availability of the container that implements the cluster load balancer. + // + // NOTE: When the load balancer provisioning starts the process completes almost immediately and within + // the same reconciliation, so the user will always see a transition from no condition to available without + // having evidence that the operation is started/is in progress. + LoadBalancerAvailableCondition clusterv1.ConditionType = "LoadBalancerAvailable" + + // LoadBalancerProvisioningFailedReason (Severity=Warning) documents a DockerCluster controller detecting + // an error while provisioning the container that provides the cluster load balancer.; those kind of + // errors are usually transient and failed provisioning are automatically re-tried by the controller. + LoadBalancerProvisioningFailedReason = "LoadBalancerProvisioningFailed" +) diff --git a/test/infrastructure/docker/api/v1beta1/conversion.go b/test/infrastructure/docker/api/v1beta1/conversion.go new file mode 100644 index 000000000000..ee6316e46656 --- /dev/null +++ b/test/infrastructure/docker/api/v1beta1/conversion.go @@ -0,0 +1,26 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 + +func (*DockerCluster) Hub() {} +func (*DockerClusterList) Hub() {} +func (*DockerClusterTemplate) Hub() {} +func (*DockerClusterTemplateList) Hub() {} +func (*DockerMachine) Hub() {} +func (*DockerMachineList) Hub() {} +func (*DockerMachineTemplate) Hub() {} +func (*DockerMachineTemplateList) Hub() {} diff --git a/test/infrastructure/docker/api/v1beta1/doc.go b/test/infrastructure/docker/api/v1beta1/doc.go new file mode 100644 index 000000000000..f8a9210a0fda --- /dev/null +++ b/test/infrastructure/docker/api/v1beta1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 diff --git a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go new file mode 100644 index 000000000000..43d484cee5bc --- /dev/null +++ b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go @@ -0,0 +1,130 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" +) + +const ( + // ClusterFinalizer allows DockerClusterReconciler to clean up resources associated with DockerCluster before + // removing it from the apiserver. + ClusterFinalizer = "dockercluster.infrastructure.cluster.x-k8s.io" +) + +// DockerClusterSpec defines the desired state of DockerCluster. +type DockerClusterSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + // +optional + ControlPlaneEndpoint APIEndpoint `json:"controlPlaneEndpoint"` + + // FailureDomains are not usulaly defined on the spec. + // The docker provider is special since failure domains don't mean anything in a local docker environment. + // Instead, the docker cluster controller will simply copy these into the Status and allow the Cluster API + // controllers to do what they will with the defined failure domains. + // +optional + FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"` + + // LoadBalancer allows defining configurations for the cluster load balancer. + // +optional + LoadBalancer DockerLoadBalancer `json:"loadBalancer,omitempty"` +} + +// DockerLoadBalancer allows defining configurations for the cluster load balancer. +type DockerLoadBalancer struct { + // ImageMeta allows customizing the image used for the cluster load balancer. + ImageMeta `json:",inline"` +} + +// ImageMeta allows customizing the image used for components that are not +// originated from the Kubernetes/Kubernetes release process. +type ImageMeta struct { + // ImageRepository sets the container registry to pull the haproxy image from. + // if not set, "kindest" will be used instead. + // +optional + ImageRepository string `json:"imageRepository,omitempty"` + + // ImageTag allows to specify a tag for the haproxy image. + // if not set, "v20210715-a6da3463" will be used instead. + // +optional + ImageTag string `json:"imageTag,omitempty"` +} + +// DockerClusterStatus defines the observed state of DockerCluster. +type DockerClusterStatus struct { + // Ready denotes that the docker cluster (infrastructure) is ready. + Ready bool `json:"ready"` + + // FailureDomains don't mean much in CAPD since it's all local, but we can see how the rest of cluster API + // will use this if we populate it. + FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"` + + // Conditions defines current service state of the DockerCluster. + // +optional + Conditions clusterv1.Conditions `json:"conditions,omitempty"` +} + +// APIEndpoint represents a reachable Kubernetes API endpoint. +type APIEndpoint struct { + // Host is the hostname on which the API server is serving. + Host string `json:"host"` + + // Port is the port on which the API server is serving. + Port int `json:"port"` +} + +// +kubebuilder:resource:path=dockerclusters,scope=Namespaced,categories=cluster-api +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerCluster" + +// DockerCluster is the Schema for the dockerclusters API. +type DockerCluster struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DockerClusterSpec `json:"spec,omitempty"` + Status DockerClusterStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (c *DockerCluster) GetConditions() clusterv1.Conditions { + return c.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (c *DockerCluster) SetConditions(conditions clusterv1.Conditions) { + c.Status.Conditions = conditions +} + +// +kubebuilder:object:root=true + +// DockerClusterList contains a list of DockerCluster. +type DockerClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DockerCluster `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DockerCluster{}, &DockerClusterList{}) +} diff --git a/test/infrastructure/docker/api/v1alpha4/dockercluster_webhook.go b/test/infrastructure/docker/api/v1beta1/dockercluster_webhook.go similarity index 77% rename from test/infrastructure/docker/api/v1alpha4/dockercluster_webhook.go rename to test/infrastructure/docker/api/v1beta1/dockercluster_webhook.go index 1938f152bafe..5e480a68e92f 100644 --- a/test/infrastructure/docker/api/v1alpha4/dockercluster_webhook.go +++ b/test/infrastructure/docker/api/v1beta1/dockercluster_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -30,7 +30,7 @@ func (c *DockerCluster) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1alpha4-dockercluster,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=dockerclusters,versions=v1alpha4,name=default.dockercluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-dockercluster,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=dockerclusters,versions=v1beta1,name=default.dockercluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &DockerCluster{} @@ -39,7 +39,7 @@ func (c *DockerCluster) Default() { defaultDockerClusterSpec(&c.Spec) } -// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1alpha4-dockercluster,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=dockerclusters,versions=v1alpha4,name=validation.dockercluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-dockercluster,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=dockerclusters,versions=v1beta1,name=validation.dockercluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Validator = &DockerCluster{} diff --git a/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_types.go b/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_types.go new file mode 100644 index 000000000000..96426405cf9d --- /dev/null +++ b/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_types.go @@ -0,0 +1,57 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" +) + +// DockerClusterTemplateSpec defines the desired state of DockerClusterTemplate. +type DockerClusterTemplateSpec struct { + Template DockerClusterTemplateResource `json:"template"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerClusterTemplate" + +// DockerClusterTemplate is the Schema for the dockerclustertemplates API. +type DockerClusterTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DockerClusterTemplateSpec `json:"spec,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=dockerclustertemplates,scope=Namespaced,categories=cluster-api + +// DockerClusterTemplateList contains a list of DockerClusterTemplate. +type DockerClusterTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DockerClusterTemplate `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DockerClusterTemplate{}, &DockerClusterTemplateList{}) +} + +// DockerClusterTemplateResource describes the data needed to create a DockerCluster from a template. +type DockerClusterTemplateResource struct { + Spec DockerClusterSpec `json:"spec"` +} diff --git a/test/infrastructure/docker/api/v1alpha4/dockerclustertemplate_webhook.go b/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_webhook.go similarity index 82% rename from test/infrastructure/docker/api/v1alpha4/dockerclustertemplate_webhook.go rename to test/infrastructure/docker/api/v1beta1/dockerclustertemplate_webhook.go index d7c4f5243aa2..988cfb69df2c 100644 --- a/test/infrastructure/docker/api/v1alpha4/dockerclustertemplate_webhook.go +++ b/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -36,7 +36,7 @@ func (r *DockerClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1alpha4-dockerclustertemplate,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=dockerclustertemplates,versions=v1alpha4,name=default.dockerclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-dockerclustertemplate,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=dockerclustertemplates,versions=v1beta1,name=default.dockerclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &DockerClusterTemplate{} @@ -45,7 +45,7 @@ func (r *DockerClusterTemplate) Default() { defaultDockerClusterSpec(&r.Spec.Template.Spec) } -// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1alpha4-dockerclustertemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=dockerclustertemplates,versions=v1alpha4,name=validation.dockerclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-dockerclustertemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=dockerclustertemplates,versions=v1beta1,name=validation.dockerclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Validator = &DockerClusterTemplate{} diff --git a/test/infrastructure/docker/api/v1alpha4/dockerclustertemplate_webhook_test.go b/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_webhook_test.go similarity index 99% rename from test/infrastructure/docker/api/v1alpha4/dockerclustertemplate_webhook_test.go rename to test/infrastructure/docker/api/v1beta1/dockerclustertemplate_webhook_test.go index b9f7b0919475..ce3469bc812e 100644 --- a/test/infrastructure/docker/api/v1alpha4/dockerclustertemplate_webhook_test.go +++ b/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_webhook_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/test/infrastructure/docker/api/v1beta1/dockermachine_types.go b/test/infrastructure/docker/api/v1beta1/dockermachine_types.go new file mode 100644 index 000000000000..66967877e9d4 --- /dev/null +++ b/test/infrastructure/docker/api/v1beta1/dockermachine_types.go @@ -0,0 +1,129 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" +) + +const ( + // MachineFinalizer allows ReconcileDockerMachine to clean up resources associated with AWSMachine before + // removing it from the apiserver. + MachineFinalizer = "dockermachine.infrastructure.cluster.x-k8s.io" +) + +// DockerMachineSpec defines the desired state of DockerMachine. +type DockerMachineSpec struct { + // ProviderID will be the container name in ProviderID format (docker:////) + // +optional + ProviderID *string `json:"providerID,omitempty"` + + // CustomImage allows customizing the container image that is used for + // running the machine + // +optional + CustomImage string `json:"customImage,omitempty"` + + // PreLoadImages allows to pre-load images in a newly created machine. This can be used to + // speed up tests by avoiding e.g. to download CNI images on all the containers. + // +optional + PreLoadImages []string `json:"preLoadImages,omitempty"` + + // ExtraMounts describes additional mount points for the node container + // These may be used to bind a hostPath + // +optional + ExtraMounts []Mount `json:"extraMounts,omitempty"` + + // Bootstrapped is true when the kubeadm bootstrapping has been run + // against this machine + // +optional + Bootstrapped bool `json:"bootstrapped,omitempty"` +} + +// Mount specifies a host volume to mount into a container. +// This is a simplified version of kind v1alpha4.Mount types. +type Mount struct { + // Path of the mount within the container. + ContainerPath string `json:"containerPath,omitempty"` + + // Path of the mount on the host. If the hostPath doesn't exist, then runtimes + // should report error. If the hostpath is a symbolic link, runtimes should + // follow the symlink and mount the real destination to container. + HostPath string `json:"hostPath,omitempty"` + + // If set, the mount is read-only. + // +optional + Readonly bool `json:"readOnly,omitempty"` +} + +// DockerMachineStatus defines the observed state of DockerMachine. +type DockerMachineStatus struct { + // Ready denotes that the machine (docker container) is ready + // +optional + Ready bool `json:"ready"` + + // LoadBalancerConfigured denotes that the machine has been + // added to the load balancer + // +optional + LoadBalancerConfigured bool `json:"loadBalancerConfigured,omitempty"` + + // Addresses contains the associated addresses for the docker machine. + // +optional + Addresses []clusterv1.MachineAddress `json:"addresses,omitempty"` + + // Conditions defines current service state of the DockerMachine. + // +optional + Conditions clusterv1.Conditions `json:"conditions,omitempty"` +} + +// +kubebuilder:resource:path=dockermachines,scope=Namespaced,categories=cluster-api +// +kubebuilder:object:root=true +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerMachine" + +// DockerMachine is the Schema for the dockermachines API. +type DockerMachine struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DockerMachineSpec `json:"spec,omitempty"` + Status DockerMachineStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (c *DockerMachine) GetConditions() clusterv1.Conditions { + return c.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (c *DockerMachine) SetConditions(conditions clusterv1.Conditions) { + c.Status.Conditions = conditions +} + +// +kubebuilder:object:root=true + +// DockerMachineList contains a list of DockerMachine. +type DockerMachineList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DockerMachine `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DockerMachine{}, &DockerMachineList{}) +} diff --git a/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_types.go b/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_types.go new file mode 100644 index 000000000000..747cd7ad2bc4 --- /dev/null +++ b/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_types.go @@ -0,0 +1,58 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" +) + +// DockerMachineTemplateSpec defines the desired state of DockerMachineTemplate. +type DockerMachineTemplateSpec struct { + Template DockerMachineTemplateResource `json:"template"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=dockermachinetemplates,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerMachineTemplate" + +// DockerMachineTemplate is the Schema for the dockermachinetemplates API. +type DockerMachineTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DockerMachineTemplateSpec `json:"spec,omitempty"` +} + +// +kubebuilder:object:root=true + +// DockerMachineTemplateList contains a list of DockerMachineTemplate. +type DockerMachineTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DockerMachineTemplate `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DockerMachineTemplate{}, &DockerMachineTemplateList{}) +} + +// DockerMachineTemplateResource describes the data needed to create a DockerMachine from a template. +type DockerMachineTemplateResource struct { + // Spec is the specification of the desired behavior of the machine. + Spec DockerMachineSpec `json:"spec"` +} diff --git a/test/infrastructure/docker/api/v1alpha4/dockermachinetemplate_webhook.go b/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_webhook.go similarity index 86% rename from test/infrastructure/docker/api/v1alpha4/dockermachinetemplate_webhook.go rename to test/infrastructure/docker/api/v1beta1/dockermachinetemplate_webhook.go index 29e0a036bcd6..e79d3adc5a6d 100644 --- a/test/infrastructure/docker/api/v1alpha4/dockermachinetemplate_webhook.go +++ b/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_webhook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "fmt" @@ -35,7 +35,7 @@ func (m *DockerMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error Complete() } -// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1alpha4-dockermachinetemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=dockermachinetemplates,versions=v1alpha4,name=validation.dockermachinetemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-dockermachinetemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=dockermachinetemplates,versions=v1beta1,name=validation.dockermachinetemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1 var _ webhook.Validator = &DockerMachineTemplate{} diff --git a/test/infrastructure/docker/api/v1alpha4/dockermachinetemplate_webhook_test.go b/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_webhook_test.go similarity index 99% rename from test/infrastructure/docker/api/v1alpha4/dockermachinetemplate_webhook_test.go rename to test/infrastructure/docker/api/v1beta1/dockermachinetemplate_webhook_test.go index ce104bace697..c4657747c413 100644 --- a/test/infrastructure/docker/api/v1alpha4/dockermachinetemplate_webhook_test.go +++ b/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_webhook_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha4 +package v1beta1 import ( "testing" diff --git a/test/infrastructure/docker/api/v1beta1/groupversion_info.go b/test/infrastructure/docker/api/v1beta1/groupversion_info.go new file mode 100644 index 000000000000..63fbef713e28 --- /dev/null +++ b/test/infrastructure/docker/api/v1beta1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 contains API Schema definitions for the infrastructure v1beta1 API group +// +kubebuilder:object:generate=true +// +groupName=infrastructure.cluster.x-k8s.io +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects. + GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1beta1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/test/infrastructure/docker/api/v1beta1/zz_generated.deepcopy.go b/test/infrastructure/docker/api/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000000..1c95eded6473 --- /dev/null +++ b/test/infrastructure/docker/api/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,495 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIEndpoint) DeepCopyInto(out *APIEndpoint) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIEndpoint. +func (in *APIEndpoint) DeepCopy() *APIEndpoint { + if in == nil { + return nil + } + out := new(APIEndpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerCluster) DeepCopyInto(out *DockerCluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerCluster. +func (in *DockerCluster) DeepCopy() *DockerCluster { + if in == nil { + return nil + } + out := new(DockerCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DockerCluster) 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 *DockerClusterList) DeepCopyInto(out *DockerClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DockerCluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerClusterList. +func (in *DockerClusterList) DeepCopy() *DockerClusterList { + if in == nil { + return nil + } + out := new(DockerClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DockerClusterList) 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 *DockerClusterSpec) DeepCopyInto(out *DockerClusterSpec) { + *out = *in + out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if in.FailureDomains != nil { + in, out := &in.FailureDomains, &out.FailureDomains + *out = make(apiv1beta1.FailureDomains, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + out.LoadBalancer = in.LoadBalancer +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerClusterSpec. +func (in *DockerClusterSpec) DeepCopy() *DockerClusterSpec { + if in == nil { + return nil + } + out := new(DockerClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerClusterStatus) DeepCopyInto(out *DockerClusterStatus) { + *out = *in + if in.FailureDomains != nil { + in, out := &in.FailureDomains, &out.FailureDomains + *out = make(apiv1beta1.FailureDomains, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1beta1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerClusterStatus. +func (in *DockerClusterStatus) DeepCopy() *DockerClusterStatus { + if in == nil { + return nil + } + out := new(DockerClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerClusterTemplate) DeepCopyInto(out *DockerClusterTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerClusterTemplate. +func (in *DockerClusterTemplate) DeepCopy() *DockerClusterTemplate { + if in == nil { + return nil + } + out := new(DockerClusterTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DockerClusterTemplate) 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 *DockerClusterTemplateList) DeepCopyInto(out *DockerClusterTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DockerClusterTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerClusterTemplateList. +func (in *DockerClusterTemplateList) DeepCopy() *DockerClusterTemplateList { + if in == nil { + return nil + } + out := new(DockerClusterTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DockerClusterTemplateList) 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 *DockerClusterTemplateResource) DeepCopyInto(out *DockerClusterTemplateResource) { + *out = *in + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerClusterTemplateResource. +func (in *DockerClusterTemplateResource) DeepCopy() *DockerClusterTemplateResource { + if in == nil { + return nil + } + out := new(DockerClusterTemplateResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerClusterTemplateSpec) DeepCopyInto(out *DockerClusterTemplateSpec) { + *out = *in + in.Template.DeepCopyInto(&out.Template) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerClusterTemplateSpec. +func (in *DockerClusterTemplateSpec) DeepCopy() *DockerClusterTemplateSpec { + if in == nil { + return nil + } + out := new(DockerClusterTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerLoadBalancer) DeepCopyInto(out *DockerLoadBalancer) { + *out = *in + out.ImageMeta = in.ImageMeta +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerLoadBalancer. +func (in *DockerLoadBalancer) DeepCopy() *DockerLoadBalancer { + if in == nil { + return nil + } + out := new(DockerLoadBalancer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerMachine) DeepCopyInto(out *DockerMachine) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachine. +func (in *DockerMachine) DeepCopy() *DockerMachine { + if in == nil { + return nil + } + out := new(DockerMachine) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DockerMachine) 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 *DockerMachineList) DeepCopyInto(out *DockerMachineList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DockerMachine, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachineList. +func (in *DockerMachineList) DeepCopy() *DockerMachineList { + if in == nil { + return nil + } + out := new(DockerMachineList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DockerMachineList) 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 *DockerMachineSpec) DeepCopyInto(out *DockerMachineSpec) { + *out = *in + if in.ProviderID != nil { + in, out := &in.ProviderID, &out.ProviderID + *out = new(string) + **out = **in + } + if in.PreLoadImages != nil { + in, out := &in.PreLoadImages, &out.PreLoadImages + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ExtraMounts != nil { + in, out := &in.ExtraMounts, &out.ExtraMounts + *out = make([]Mount, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachineSpec. +func (in *DockerMachineSpec) DeepCopy() *DockerMachineSpec { + if in == nil { + return nil + } + out := new(DockerMachineSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerMachineStatus) DeepCopyInto(out *DockerMachineStatus) { + *out = *in + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make([]apiv1beta1.MachineAddress, len(*in)) + copy(*out, *in) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(apiv1beta1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachineStatus. +func (in *DockerMachineStatus) DeepCopy() *DockerMachineStatus { + if in == nil { + return nil + } + out := new(DockerMachineStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerMachineTemplate) DeepCopyInto(out *DockerMachineTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachineTemplate. +func (in *DockerMachineTemplate) DeepCopy() *DockerMachineTemplate { + if in == nil { + return nil + } + out := new(DockerMachineTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DockerMachineTemplate) 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 *DockerMachineTemplateList) DeepCopyInto(out *DockerMachineTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DockerMachineTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachineTemplateList. +func (in *DockerMachineTemplateList) DeepCopy() *DockerMachineTemplateList { + if in == nil { + return nil + } + out := new(DockerMachineTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DockerMachineTemplateList) 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 *DockerMachineTemplateResource) DeepCopyInto(out *DockerMachineTemplateResource) { + *out = *in + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachineTemplateResource. +func (in *DockerMachineTemplateResource) DeepCopy() *DockerMachineTemplateResource { + if in == nil { + return nil + } + out := new(DockerMachineTemplateResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerMachineTemplateSpec) DeepCopyInto(out *DockerMachineTemplateSpec) { + *out = *in + in.Template.DeepCopyInto(&out.Template) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachineTemplateSpec. +func (in *DockerMachineTemplateSpec) DeepCopy() *DockerMachineTemplateSpec { + if in == nil { + return nil + } + out := new(DockerMachineTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageMeta) DeepCopyInto(out *ImageMeta) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageMeta. +func (in *ImageMeta) DeepCopy() *ImageMeta { + if in == nil { + return nil + } + out := new(ImageMeta) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Mount) DeepCopyInto(out *Mount) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mount. +func (in *Mount) DeepCopy() *Mount { + if in == nil { + return nil + } + out := new(Mount) + in.DeepCopyInto(out) + return out +} diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml index 37392a85e0c0..c08379a92b93 100644 --- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml +++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml @@ -309,6 +309,162 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Time duration since creation of DockerCluster + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: DockerCluster is the Schema for the dockerclusters API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: DockerClusterSpec defines the desired state of DockerCluster. + properties: + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint used to + communicate with the control plane. + properties: + host: + description: Host is the hostname on which the API server is serving. + type: string + port: + description: Port is the port on which the API server is serving. + type: integer + required: + - host + - port + type: object + failureDomains: + additionalProperties: + description: FailureDomainSpec is the Schema for Cluster API failure + domains. It allows controllers to understand how many failure + domains a cluster can optionally span across. + properties: + attributes: + additionalProperties: + type: string + description: Attributes is a free form map of attributes an + infrastructure provider might use or require. + type: object + controlPlane: + description: ControlPlane determines if this failure domain + is suitable for use by control plane machines. + type: boolean + type: object + description: FailureDomains are not usulaly defined on the spec. The + docker provider is special since failure domains don't mean anything + in a local docker environment. Instead, the docker cluster controller + will simply copy these into the Status and allow the Cluster API + controllers to do what they will with the defined failure domains. + type: object + loadBalancer: + description: LoadBalancer allows defining configurations for the cluster + load balancer. + properties: + imageRepository: + description: ImageRepository sets the container registry to pull + the haproxy image from. if not set, "kindest" will be used instead. + type: string + imageTag: + description: ImageTag allows to specify a tag for the haproxy + image. if not set, "v20210715-a6da3463" will be used instead. + type: string + type: object + type: object + status: + description: DockerClusterStatus defines the observed state of DockerCluster. + properties: + conditions: + description: Conditions defines current service state of the DockerCluster. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + failureDomains: + additionalProperties: + description: FailureDomainSpec is the Schema for Cluster API failure + domains. It allows controllers to understand how many failure + domains a cluster can optionally span across. + properties: + attributes: + additionalProperties: + type: string + description: Attributes is a free form map of attributes an + infrastructure provider might use or require. + type: object + controlPlane: + description: ControlPlane determines if this failure domain + is suitable for use by control plane machines. + type: boolean + type: object + description: FailureDomains don't mean much in CAPD since it's all + local, but we can see how the rest of cluster API will use this + if we populate it. + type: object + ready: + description: Ready denotes that the docker cluster (infrastructure) + is ready. + type: boolean + required: + - ready + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclustertemplates.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclustertemplates.yaml index afb9a1c230eb..1ddca0ee0873 100644 --- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclustertemplates.yaml +++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclustertemplates.yaml @@ -114,6 +114,106 @@ spec: type: object type: object served: true + storage: false + subresources: {} + - additionalPrinterColumns: + - description: Time duration since creation of DockerClusterTemplate + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: DockerClusterTemplate is the Schema for the dockerclustertemplates + API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: DockerClusterTemplateSpec defines the desired state of DockerClusterTemplate. + properties: + template: + description: DockerClusterTemplateResource describes the data needed + to create a DockerCluster from a template. + properties: + spec: + description: DockerClusterSpec defines the desired state of DockerCluster. + properties: + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint + used to communicate with the control plane. + properties: + host: + description: Host is the hostname on which the API server + is serving. + type: string + port: + description: Port is the port on which the API server + is serving. + type: integer + required: + - host + - port + type: object + failureDomains: + additionalProperties: + description: FailureDomainSpec is the Schema for Cluster + API failure domains. It allows controllers to understand + how many failure domains a cluster can optionally span + across. + properties: + attributes: + additionalProperties: + type: string + description: Attributes is a free form map of attributes + an infrastructure provider might use or require. + type: object + controlPlane: + description: ControlPlane determines if this failure + domain is suitable for use by control plane machines. + type: boolean + type: object + description: FailureDomains are not usulaly defined on the + spec. The docker provider is special since failure domains + don't mean anything in a local docker environment. Instead, + the docker cluster controller will simply copy these into + the Status and allow the Cluster API controllers to do what + they will with the defined failure domains. + type: object + loadBalancer: + description: LoadBalancer allows defining configurations for + the cluster load balancer. + properties: + imageRepository: + description: ImageRepository sets the container registry + to pull the haproxy image from. if not set, "kindest" + will be used instead. + type: string + imageTag: + description: ImageTag allows to specify a tag for the + haproxy image. if not set, "v20210715-a6da3463" will + be used instead. + type: string + type: object + type: object + required: + - spec + type: object + required: + - template + type: object + type: object + served: true storage: true subresources: {} status: diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepools.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepools.yaml index 6d63f59e2ba2..c0c90ae28ce4 100644 --- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepools.yaml +++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepools.yaml @@ -374,6 +374,188 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Time duration since creation of DockerMachinePool + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: DockerMachinePool is the Schema for the dockermachinepools API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: DockerMachinePoolSpec defines the desired state of DockerMachinePool. + properties: + providerID: + description: ProviderID is the identification ID of the Machine Pool + type: string + providerIDList: + description: ProviderIDList is the list of identification IDs of machine + instances managed by this Machine Pool + items: + type: string + type: array + template: + description: Template contains the details used to build a replica + machine within the Machine Pool + properties: + customImage: + description: CustomImage allows customizing the container image + that is used for running the machine + type: string + extraMounts: + description: ExtraMounts describes additional mount points for + the node container These may be used to bind a hostPath + items: + description: Mount specifies a host volume to mount into a container. + This is a simplified version of kind v1alpha4.Mount types. + properties: + containerPath: + description: Path of the mount within the container. + type: string + hostPath: + description: Path of the mount on the host. If the hostPath + doesn't exist, then runtimes should report error. If the + hostpath is a symbolic link, runtimes should follow the + symlink and mount the real destination to container. + type: string + readOnly: + description: If set, the mount is read-only. + type: boolean + type: object + type: array + preLoadImages: + description: PreLoadImages allows to pre-load images in a newly + created machine. This can be used to speed up tests by avoiding + e.g. to download CNI images on all the containers. + items: + type: string + type: array + type: object + type: object + status: + description: DockerMachinePoolStatus defines the observed state of DockerMachinePool. + properties: + conditions: + description: Conditions defines current service state of the DockerMachinePool. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + instances: + description: Instances contains the status for each instance in the + pool + items: + properties: + addresses: + description: Addresses contains the associated addresses for + the docker machine. + items: + description: MachineAddress contains information for the node's + address. + properties: + address: + description: The machine address. + type: string + type: + description: Machine address type, one of Hostname, ExternalIP + or InternalIP. + type: string + required: + - address + - type + type: object + type: array + bootstrapped: + description: Bootstrapped is true when the kubeadm bootstrapping + has been run against this machine + type: boolean + instanceName: + description: InstanceName is the identification of the Machine + Instance within the Machine Pool + type: string + providerID: + description: ProviderID is the provider identification of the + Machine Pool Instance + type: string + ready: + description: Ready denotes that the machine (docker container) + is ready + type: boolean + version: + description: Version defines the Kubernetes version for the + Machine Instance + type: string + type: object + type: array + observedGeneration: + description: The generation observed by the deployment controller. + format: int64 + type: integer + ready: + description: Ready denotes that the machine pool is ready + type: boolean + replicas: + description: Replicas is the most recently observed number of replicas. + format: int32 + type: integer + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml index 284ab308f38c..2deb9997c4d0 100644 --- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml +++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml @@ -302,6 +302,152 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - description: Time duration since creation of DockerMachine + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: DockerMachine is the Schema for the dockermachines API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: DockerMachineSpec defines the desired state of DockerMachine. + properties: + bootstrapped: + description: Bootstrapped is true when the kubeadm bootstrapping has + been run against this machine + type: boolean + customImage: + description: CustomImage allows customizing the container image that + is used for running the machine + type: string + extraMounts: + description: ExtraMounts describes additional mount points for the + node container These may be used to bind a hostPath + items: + description: Mount specifies a host volume to mount into a container. + This is a simplified version of kind v1alpha4.Mount types. + properties: + containerPath: + description: Path of the mount within the container. + type: string + hostPath: + description: Path of the mount on the host. If the hostPath + doesn't exist, then runtimes should report error. If the hostpath + is a symbolic link, runtimes should follow the symlink and + mount the real destination to container. + type: string + readOnly: + description: If set, the mount is read-only. + type: boolean + type: object + type: array + preLoadImages: + description: PreLoadImages allows to pre-load images in a newly created + machine. This can be used to speed up tests by avoiding e.g. to + download CNI images on all the containers. + items: + type: string + type: array + providerID: + description: ProviderID will be the container name in ProviderID format + (docker:////) + type: string + type: object + status: + description: DockerMachineStatus defines the observed state of DockerMachine. + properties: + addresses: + description: Addresses contains the associated addresses for the docker + machine. + items: + description: MachineAddress contains information for the node's + address. + properties: + address: + description: The machine address. + type: string + type: + description: Machine address type, one of Hostname, ExternalIP + or InternalIP. + type: string + required: + - address + - type + type: object + type: array + conditions: + description: Conditions defines current service state of the DockerMachine. + items: + description: Condition defines an observation of a Cluster API resource + operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - status + - type + type: object + type: array + loadBalancerConfigured: + description: LoadBalancerConfigured denotes that the machine has been + added to the load balancer + type: boolean + ready: + description: Ready denotes that the machine (docker container) is + ready + type: boolean + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml index 7cdb7df0c00e..e757be004725 100644 --- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml +++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml @@ -184,6 +184,93 @@ spec: type: object type: object served: true + storage: false + subresources: {} + - additionalPrinterColumns: + - description: Time duration since creation of DockerMachineTemplate + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: DockerMachineTemplate is the Schema for the dockermachinetemplates + API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: DockerMachineTemplateSpec defines the desired state of DockerMachineTemplate. + properties: + template: + description: DockerMachineTemplateResource describes the data needed + to create a DockerMachine from a template. + properties: + spec: + description: Spec is the specification of the desired behavior + of the machine. + properties: + bootstrapped: + description: Bootstrapped is true when the kubeadm bootstrapping + has been run against this machine + type: boolean + customImage: + description: CustomImage allows customizing the container + image that is used for running the machine + type: string + extraMounts: + description: ExtraMounts describes additional mount points + for the node container These may be used to bind a hostPath + items: + description: Mount specifies a host volume to mount into + a container. This is a simplified version of kind v1alpha4.Mount + types. + properties: + containerPath: + description: Path of the mount within the container. + type: string + hostPath: + description: Path of the mount on the host. If the hostPath + doesn't exist, then runtimes should report error. + If the hostpath is a symbolic link, runtimes should + follow the symlink and mount the real destination + to container. + type: string + readOnly: + description: If set, the mount is read-only. + type: boolean + type: object + type: array + preLoadImages: + description: PreLoadImages allows to pre-load images in a + newly created machine. This can be used to speed up tests + by avoiding e.g. to download CNI images on all the containers. + items: + type: string + type: array + providerID: + description: ProviderID will be the container name in ProviderID + format (docker:////) + type: string + type: object + required: + - spec + type: object + required: + - template + type: object + type: object + served: true storage: true subresources: {} status: diff --git a/test/infrastructure/docker/config/crd/kustomization.yaml b/test/infrastructure/docker/config/crd/kustomization.yaml index edb6bb5845de..b734d29a4b90 100644 --- a/test/infrastructure/docker/config/crd/kustomization.yaml +++ b/test/infrastructure/docker/config/crd/kustomization.yaml @@ -18,13 +18,15 @@ resources: patchesStrategicMerge: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD - # - patches/webhook_in_dockermachines.yaml + - patches/webhook_in_dockermachines.yaml + - patches/webhook_in_dockermachinetemplates.yaml - patches/webhook_in_dockerclusters.yaml - patches/webhook_in_dockerclustertemplates.yaml # +kubebuilder:scaffold:crdkustomizewebhookpatch # [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix. # patches here are for enabling the CA injection for each CRD - # - patches/cainjection_in_dockermachines.yaml + - patches/cainjection_in_dockermachines.yaml + - patches/cainjection_in_dockermachinetemplates.yaml - patches/cainjection_in_dockerclusters.yaml - patches/cainjection_in_dockerclustertemplates.yaml # +kubebuilder:scaffold:crdkustomizecainjectionpatch diff --git a/test/infrastructure/docker/config/crd/patches/cainjection_in_dockermachinetemplates.yaml b/test/infrastructure/docker/config/crd/patches/cainjection_in_dockermachinetemplates.yaml new file mode 100644 index 000000000000..4e793abce708 --- /dev/null +++ b/test/infrastructure/docker/config/crd/patches/cainjection_in_dockermachinetemplates.yaml @@ -0,0 +1,8 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + name: dockermachinetemplates.infrastructure.cluster.x-k8s.io diff --git a/test/infrastructure/docker/config/crd/patches/webhook_in_dockermachinetemplates.yaml b/test/infrastructure/docker/config/crd/patches/webhook_in_dockermachinetemplates.yaml new file mode 100644 index 000000000000..6bad66d3bf66 --- /dev/null +++ b/test/infrastructure/docker/config/crd/patches/webhook_in_dockermachinetemplates.yaml @@ -0,0 +1,19 @@ +# The following patch enables conversion webhook for CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: dockermachinetemplates.infrastructure.cluster.x-k8s.io +spec: + conversion: + strategy: Webhook + webhook: + conversionReviewVersions: ["v1", "v1beta1"] + clientConfig: + # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, + # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) + caBundle: Cg== + service: + namespace: system + name: webhook-service + path: /convert diff --git a/test/infrastructure/docker/config/webhook/manifests.yaml b/test/infrastructure/docker/config/webhook/manifests.yaml index bc0aa5d9e66a..b92d37b594da 100644 --- a/test/infrastructure/docker/config/webhook/manifests.yaml +++ b/test/infrastructure/docker/config/webhook/manifests.yaml @@ -13,7 +13,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-infrastructure-cluster-x-k8s-io-v1alpha4-dockercluster + path: /mutate-infrastructure-cluster-x-k8s-io-v1beta1-dockercluster failurePolicy: Fail matchPolicy: Equivalent name: default.dockercluster.infrastructure.cluster.x-k8s.io @@ -21,7 +21,7 @@ webhooks: - apiGroups: - infrastructure.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -35,7 +35,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-infrastructure-cluster-x-k8s-io-v1alpha4-dockerclustertemplate + path: /mutate-infrastructure-cluster-x-k8s-io-v1beta1-dockerclustertemplate failurePolicy: Fail matchPolicy: Equivalent name: default.dockerclustertemplate.infrastructure.cluster.x-k8s.io @@ -43,7 +43,7 @@ webhooks: - apiGroups: - infrastructure.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -65,7 +65,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-infrastructure-cluster-x-k8s-io-v1alpha4-dockercluster + path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-dockercluster failurePolicy: Fail matchPolicy: Equivalent name: validation.dockercluster.infrastructure.cluster.x-k8s.io @@ -73,7 +73,7 @@ webhooks: - apiGroups: - infrastructure.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -87,7 +87,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-infrastructure-cluster-x-k8s-io-v1alpha4-dockerclustertemplate + path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-dockerclustertemplate failurePolicy: Fail matchPolicy: Equivalent name: validation.dockerclustertemplate.infrastructure.cluster.x-k8s.io @@ -95,7 +95,7 @@ webhooks: - apiGroups: - infrastructure.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE @@ -109,7 +109,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-infrastructure-cluster-x-k8s-io-v1alpha4-dockermachinetemplate + path: /validate-infrastructure-cluster-x-k8s-io-v1beta1-dockermachinetemplate failurePolicy: Fail matchPolicy: Equivalent name: validation.dockermachinetemplate.infrastructure.cluster.x-k8s.io @@ -117,7 +117,7 @@ webhooks: - apiGroups: - infrastructure.cluster.x-k8s.io apiVersions: - - v1alpha4 + - v1beta1 operations: - CREATE - UPDATE diff --git a/test/infrastructure/docker/controllers/dockercluster_controller.go b/test/infrastructure/docker/controllers/dockercluster_controller.go index c9e8662cea2c..03e7bdfddc7b 100644 --- a/test/infrastructure/docker/controllers/dockercluster_controller.go +++ b/test/infrastructure/docker/controllers/dockercluster_controller.go @@ -25,8 +25,8 @@ import ( "github.com/go-logr/logr" "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/docker/docker" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/test/infrastructure/docker/controllers/dockermachine_controller.go b/test/infrastructure/docker/controllers/dockermachine_controller.go index bb50bcdcc1a2..466d41ccf969 100644 --- a/test/infrastructure/docker/controllers/dockermachine_controller.go +++ b/test/infrastructure/docker/controllers/dockermachine_controller.go @@ -25,8 +25,8 @@ import ( "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/docker/docker" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" diff --git a/test/infrastructure/docker/controllers/dockermachine_controller_test.go b/test/infrastructure/docker/controllers/dockermachine_controller_test.go index b36c14b207d1..572dc00ecec0 100644 --- a/test/infrastructure/docker/controllers/dockermachine_controller_test.go +++ b/test/infrastructure/docker/controllers/dockermachine_controller_test.go @@ -23,8 +23,8 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" ) diff --git a/test/infrastructure/docker/controllers/suite_test.go b/test/infrastructure/docker/controllers/suite_test.go index 085bbe7379e4..505dd2d9a390 100644 --- a/test/infrastructure/docker/controllers/suite_test.go +++ b/test/infrastructure/docker/controllers/suite_test.go @@ -19,8 +19,8 @@ package controllers import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) func init() { diff --git a/test/infrastructure/docker/docker/kind_manager.go b/test/infrastructure/docker/docker/kind_manager.go index 32852a97640e..409d0b1c0948 100644 --- a/test/infrastructure/docker/docker/kind_manager.go +++ b/test/infrastructure/docker/docker/kind_manager.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/container" "sigs.k8s.io/cluster-api/test/infrastructure/docker/docker/types" ctrl "sigs.k8s.io/controller-runtime" diff --git a/test/infrastructure/docker/docker/loadbalancer.go b/test/infrastructure/docker/docker/loadbalancer.go index 362891f35e9d..b866118d694a 100644 --- a/test/infrastructure/docker/docker/loadbalancer.go +++ b/test/infrastructure/docker/docker/loadbalancer.go @@ -22,9 +22,9 @@ import ( "net" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/container" - "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" + "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/docker/docker/types" "sigs.k8s.io/cluster-api/test/infrastructure/docker/third_party/forked/loadbalancer" ctrl "sigs.k8s.io/controller-runtime" @@ -45,7 +45,7 @@ type LoadBalancer struct { } // NewLoadBalancer returns a new helper for managing a docker loadbalancer with a given name. -func NewLoadBalancer(cluster *clusterv1.Cluster, dockerCluster *v1alpha4.DockerCluster) (*LoadBalancer, error) { +func NewLoadBalancer(cluster *clusterv1.Cluster, dockerCluster *v1beta1.DockerCluster) (*LoadBalancer, error) { if cluster.Name == "" { return nil, errors.New("create load balancer: cluster name is empty") } @@ -80,7 +80,7 @@ func NewLoadBalancer(cluster *clusterv1.Cluster, dockerCluster *v1alpha4.DockerC // getLoadBalancerImage will return the image (e.g. "kindest/haproxy:2.1.1-alpine") to use for // the load balancer. -func getLoadBalancerImage(dockerCluster *v1alpha4.DockerCluster) string { +func getLoadBalancerImage(dockerCluster *v1beta1.DockerCluster) string { // Check if a non-default image was provided image := loadbalancer.Image imageRepo := loadbalancer.DefaultImageRepository diff --git a/test/infrastructure/docker/docker/machine.go b/test/infrastructure/docker/docker/machine.go index e318d7c3653b..9189fc1ce0bc 100644 --- a/test/infrastructure/docker/docker/machine.go +++ b/test/infrastructure/docker/docker/machine.go @@ -33,9 +33,9 @@ import ( "sigs.k8s.io/kind/pkg/apis/config/v1alpha4" "sigs.k8s.io/kind/pkg/cluster/constants" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/container" - infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" + infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/docker/cloudinit" "sigs.k8s.io/cluster-api/test/infrastructure/docker/docker/types" clusterapicontainer "sigs.k8s.io/cluster-api/util/container" diff --git a/test/infrastructure/docker/exp/api/v1alpha3/doc.go b/test/infrastructure/docker/exp/api/v1alpha3/doc.go index d7be0b9d85bf..051e1a4b9af2 100644 --- a/test/infrastructure/docker/exp/api/v1alpha3/doc.go +++ b/test/infrastructure/docker/exp/api/v1alpha3/doc.go @@ -15,5 +15,5 @@ limitations under the License. */ // Package v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha4 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1 package v1alpha3 diff --git a/test/infrastructure/docker/exp/api/v1alpha3/zz_generated.conversion.go b/test/infrastructure/docker/exp/api/v1alpha3/zz_generated.conversion.go index 50cd3dde7d54..4ad51ba14f70 100644 --- a/test/infrastructure/docker/exp/api/v1alpha3/zz_generated.conversion.go +++ b/test/infrastructure/docker/exp/api/v1alpha3/zz_generated.conversion.go @@ -1,4 +1,4 @@ -// +build !ignore_autogenerated_capd_v1alpha3 +// +build !ignore_autogenerated_capd /* Copyright The Kubernetes Authors. @@ -26,10 +26,10 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" apiv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" + apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" dockerapiv1alpha3 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha3" - dockerapiv1alpha4 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" - v1alpha4 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha4" + dockerapiv1beta1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" + v1beta1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1" ) func init() { @@ -39,107 +39,107 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*DockerMachinePool)(nil), (*v1alpha4.DockerMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachinePool_To_v1alpha4_DockerMachinePool(a.(*DockerMachinePool), b.(*v1alpha4.DockerMachinePool), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachinePool)(nil), (*v1beta1.DockerMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachinePool_To_v1beta1_DockerMachinePool(a.(*DockerMachinePool), b.(*v1beta1.DockerMachinePool), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachinePool)(nil), (*DockerMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachinePool_To_v1alpha3_DockerMachinePool(a.(*v1alpha4.DockerMachinePool), b.(*DockerMachinePool), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachinePool)(nil), (*DockerMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachinePool_To_v1alpha3_DockerMachinePool(a.(*v1beta1.DockerMachinePool), b.(*DockerMachinePool), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachinePoolInstanceStatus)(nil), (*v1alpha4.DockerMachinePoolInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1alpha4_DockerMachinePoolInstanceStatus(a.(*DockerMachinePoolInstanceStatus), b.(*v1alpha4.DockerMachinePoolInstanceStatus), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachinePoolInstanceStatus)(nil), (*v1beta1.DockerMachinePoolInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1beta1_DockerMachinePoolInstanceStatus(a.(*DockerMachinePoolInstanceStatus), b.(*v1beta1.DockerMachinePoolInstanceStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachinePoolInstanceStatus)(nil), (*DockerMachinePoolInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus(a.(*v1alpha4.DockerMachinePoolInstanceStatus), b.(*DockerMachinePoolInstanceStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachinePoolInstanceStatus)(nil), (*DockerMachinePoolInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus(a.(*v1beta1.DockerMachinePoolInstanceStatus), b.(*DockerMachinePoolInstanceStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachinePoolList)(nil), (*v1alpha4.DockerMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachinePoolList_To_v1alpha4_DockerMachinePoolList(a.(*DockerMachinePoolList), b.(*v1alpha4.DockerMachinePoolList), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachinePoolList)(nil), (*v1beta1.DockerMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachinePoolList_To_v1beta1_DockerMachinePoolList(a.(*DockerMachinePoolList), b.(*v1beta1.DockerMachinePoolList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachinePoolList)(nil), (*DockerMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolList(a.(*v1alpha4.DockerMachinePoolList), b.(*DockerMachinePoolList), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachinePoolList)(nil), (*DockerMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolList(a.(*v1beta1.DockerMachinePoolList), b.(*DockerMachinePoolList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachinePoolMachineTemplate)(nil), (*v1alpha4.DockerMachinePoolMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1alpha4_DockerMachinePoolMachineTemplate(a.(*DockerMachinePoolMachineTemplate), b.(*v1alpha4.DockerMachinePoolMachineTemplate), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachinePoolMachineTemplate)(nil), (*v1beta1.DockerMachinePoolMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1beta1_DockerMachinePoolMachineTemplate(a.(*DockerMachinePoolMachineTemplate), b.(*v1beta1.DockerMachinePoolMachineTemplate), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachinePoolMachineTemplate)(nil), (*DockerMachinePoolMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate(a.(*v1alpha4.DockerMachinePoolMachineTemplate), b.(*DockerMachinePoolMachineTemplate), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachinePoolMachineTemplate)(nil), (*DockerMachinePoolMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate(a.(*v1beta1.DockerMachinePoolMachineTemplate), b.(*DockerMachinePoolMachineTemplate), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachinePoolSpec)(nil), (*v1alpha4.DockerMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachinePoolSpec_To_v1alpha4_DockerMachinePoolSpec(a.(*DockerMachinePoolSpec), b.(*v1alpha4.DockerMachinePoolSpec), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachinePoolSpec)(nil), (*v1beta1.DockerMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachinePoolSpec_To_v1beta1_DockerMachinePoolSpec(a.(*DockerMachinePoolSpec), b.(*v1beta1.DockerMachinePoolSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachinePoolSpec)(nil), (*DockerMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec(a.(*v1alpha4.DockerMachinePoolSpec), b.(*DockerMachinePoolSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachinePoolSpec)(nil), (*DockerMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec(a.(*v1beta1.DockerMachinePoolSpec), b.(*DockerMachinePoolSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*DockerMachinePoolStatus)(nil), (*v1alpha4.DockerMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DockerMachinePoolStatus_To_v1alpha4_DockerMachinePoolStatus(a.(*DockerMachinePoolStatus), b.(*v1alpha4.DockerMachinePoolStatus), scope) + if err := s.AddGeneratedConversionFunc((*DockerMachinePoolStatus)(nil), (*v1beta1.DockerMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DockerMachinePoolStatus_To_v1beta1_DockerMachinePoolStatus(a.(*DockerMachinePoolStatus), b.(*v1beta1.DockerMachinePoolStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha4.DockerMachinePoolStatus)(nil), (*DockerMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus(a.(*v1alpha4.DockerMachinePoolStatus), b.(*DockerMachinePoolStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1beta1.DockerMachinePoolStatus)(nil), (*DockerMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus(a.(*v1beta1.DockerMachinePoolStatus), b.(*DockerMachinePoolStatus), scope) }); err != nil { return err } return nil } -func autoConvert_v1alpha3_DockerMachinePool_To_v1alpha4_DockerMachinePool(in *DockerMachinePool, out *v1alpha4.DockerMachinePool, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachinePool_To_v1beta1_DockerMachinePool(in *DockerMachinePool, out *v1beta1.DockerMachinePool, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_DockerMachinePoolSpec_To_v1alpha4_DockerMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha3_DockerMachinePoolSpec_To_v1beta1_DockerMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_DockerMachinePoolStatus_To_v1alpha4_DockerMachinePoolStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha3_DockerMachinePoolStatus_To_v1beta1_DockerMachinePoolStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_DockerMachinePool_To_v1alpha4_DockerMachinePool is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachinePool_To_v1alpha4_DockerMachinePool(in *DockerMachinePool, out *v1alpha4.DockerMachinePool, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachinePool_To_v1alpha4_DockerMachinePool(in, out, s) +// Convert_v1alpha3_DockerMachinePool_To_v1beta1_DockerMachinePool is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachinePool_To_v1beta1_DockerMachinePool(in *DockerMachinePool, out *v1beta1.DockerMachinePool, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachinePool_To_v1beta1_DockerMachinePool(in, out, s) } -func autoConvert_v1alpha4_DockerMachinePool_To_v1alpha3_DockerMachinePool(in *v1alpha4.DockerMachinePool, out *DockerMachinePool, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachinePool_To_v1alpha3_DockerMachinePool(in *v1beta1.DockerMachinePool, out *DockerMachinePool, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha4_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha4_DockerMachinePool_To_v1alpha3_DockerMachinePool is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachinePool_To_v1alpha3_DockerMachinePool(in *v1alpha4.DockerMachinePool, out *DockerMachinePool, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachinePool_To_v1alpha3_DockerMachinePool(in, out, s) +// Convert_v1beta1_DockerMachinePool_To_v1alpha3_DockerMachinePool is an autogenerated conversion function. +func Convert_v1beta1_DockerMachinePool_To_v1alpha3_DockerMachinePool(in *v1beta1.DockerMachinePool, out *DockerMachinePool, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachinePool_To_v1alpha3_DockerMachinePool(in, out, s) } -func autoConvert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1alpha4_DockerMachinePoolInstanceStatus(in *DockerMachinePoolInstanceStatus, out *v1alpha4.DockerMachinePoolInstanceStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1beta1_DockerMachinePoolInstanceStatus(in *DockerMachinePoolInstanceStatus, out *v1beta1.DockerMachinePoolInstanceStatus, s conversion.Scope) error { if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses - *out = make([]apiv1alpha4.MachineAddress, len(*in)) + *out = make([]apiv1beta1.MachineAddress, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_MachineAddress_To_v1alpha4_MachineAddress(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1alpha3_MachineAddress_To_v1beta1_MachineAddress(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -154,17 +154,17 @@ func autoConvert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1alpha4_DockerMach return nil } -// Convert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1alpha4_DockerMachinePoolInstanceStatus is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1alpha4_DockerMachinePoolInstanceStatus(in *DockerMachinePoolInstanceStatus, out *v1alpha4.DockerMachinePoolInstanceStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1alpha4_DockerMachinePoolInstanceStatus(in, out, s) +// Convert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1beta1_DockerMachinePoolInstanceStatus is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1beta1_DockerMachinePoolInstanceStatus(in *DockerMachinePoolInstanceStatus, out *v1beta1.DockerMachinePoolInstanceStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1beta1_DockerMachinePoolInstanceStatus(in, out, s) } -func autoConvert_v1alpha4_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus(in *v1alpha4.DockerMachinePoolInstanceStatus, out *DockerMachinePoolInstanceStatus, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus(in *v1beta1.DockerMachinePoolInstanceStatus, out *DockerMachinePoolInstanceStatus, s conversion.Scope) error { if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses *out = make([]apiv1alpha3.MachineAddress, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha4_MachineAddress_To_v1alpha3_MachineAddress(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_MachineAddress_To_v1alpha3_MachineAddress(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -179,18 +179,18 @@ func autoConvert_v1alpha4_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMach return nil } -// Convert_v1alpha4_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus(in *v1alpha4.DockerMachinePoolInstanceStatus, out *DockerMachinePoolInstanceStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus(in, out, s) +// Convert_v1beta1_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus is an autogenerated conversion function. +func Convert_v1beta1_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus(in *v1beta1.DockerMachinePoolInstanceStatus, out *DockerMachinePoolInstanceStatus, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus(in, out, s) } -func autoConvert_v1alpha3_DockerMachinePoolList_To_v1alpha4_DockerMachinePoolList(in *DockerMachinePoolList, out *v1alpha4.DockerMachinePoolList, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachinePoolList_To_v1beta1_DockerMachinePoolList(in *DockerMachinePoolList, out *v1beta1.DockerMachinePoolList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha4.DockerMachinePool, len(*in)) + *out = make([]v1beta1.DockerMachinePool, len(*in)) for i := range *in { - if err := Convert_v1alpha3_DockerMachinePool_To_v1alpha4_DockerMachinePool(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_DockerMachinePool_To_v1beta1_DockerMachinePool(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -200,18 +200,18 @@ func autoConvert_v1alpha3_DockerMachinePoolList_To_v1alpha4_DockerMachinePoolLis return nil } -// Convert_v1alpha3_DockerMachinePoolList_To_v1alpha4_DockerMachinePoolList is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachinePoolList_To_v1alpha4_DockerMachinePoolList(in *DockerMachinePoolList, out *v1alpha4.DockerMachinePoolList, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachinePoolList_To_v1alpha4_DockerMachinePoolList(in, out, s) +// Convert_v1alpha3_DockerMachinePoolList_To_v1beta1_DockerMachinePoolList is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachinePoolList_To_v1beta1_DockerMachinePoolList(in *DockerMachinePoolList, out *v1beta1.DockerMachinePoolList, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachinePoolList_To_v1beta1_DockerMachinePoolList(in, out, s) } -func autoConvert_v1alpha4_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolList(in *v1alpha4.DockerMachinePoolList, out *DockerMachinePoolList, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolList(in *v1beta1.DockerMachinePoolList, out *DockerMachinePoolList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]DockerMachinePool, len(*in)) for i := range *in { - if err := Convert_v1alpha4_DockerMachinePool_To_v1alpha3_DockerMachinePool(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_DockerMachinePool_To_v1alpha3_DockerMachinePool(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -221,37 +221,37 @@ func autoConvert_v1alpha4_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolLis return nil } -// Convert_v1alpha4_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolList is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolList(in *v1alpha4.DockerMachinePoolList, out *DockerMachinePoolList, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolList(in, out, s) +// Convert_v1beta1_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolList is an autogenerated conversion function. +func Convert_v1beta1_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolList(in *v1beta1.DockerMachinePoolList, out *DockerMachinePoolList, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachinePoolList_To_v1alpha3_DockerMachinePoolList(in, out, s) } -func autoConvert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1alpha4_DockerMachinePoolMachineTemplate(in *DockerMachinePoolMachineTemplate, out *v1alpha4.DockerMachinePoolMachineTemplate, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1beta1_DockerMachinePoolMachineTemplate(in *DockerMachinePoolMachineTemplate, out *v1beta1.DockerMachinePoolMachineTemplate, s conversion.Scope) error { out.CustomImage = in.CustomImage out.PreLoadImages = *(*[]string)(unsafe.Pointer(&in.PreLoadImages)) - out.ExtraMounts = *(*[]dockerapiv1alpha4.Mount)(unsafe.Pointer(&in.ExtraMounts)) + out.ExtraMounts = *(*[]dockerapiv1beta1.Mount)(unsafe.Pointer(&in.ExtraMounts)) return nil } -// Convert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1alpha4_DockerMachinePoolMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1alpha4_DockerMachinePoolMachineTemplate(in *DockerMachinePoolMachineTemplate, out *v1alpha4.DockerMachinePoolMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1alpha4_DockerMachinePoolMachineTemplate(in, out, s) +// Convert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1beta1_DockerMachinePoolMachineTemplate is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1beta1_DockerMachinePoolMachineTemplate(in *DockerMachinePoolMachineTemplate, out *v1beta1.DockerMachinePoolMachineTemplate, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1beta1_DockerMachinePoolMachineTemplate(in, out, s) } -func autoConvert_v1alpha4_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate(in *v1alpha4.DockerMachinePoolMachineTemplate, out *DockerMachinePoolMachineTemplate, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate(in *v1beta1.DockerMachinePoolMachineTemplate, out *DockerMachinePoolMachineTemplate, s conversion.Scope) error { out.CustomImage = in.CustomImage out.PreLoadImages = *(*[]string)(unsafe.Pointer(&in.PreLoadImages)) out.ExtraMounts = *(*[]dockerapiv1alpha3.Mount)(unsafe.Pointer(&in.ExtraMounts)) return nil } -// Convert_v1alpha4_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate(in *v1alpha4.DockerMachinePoolMachineTemplate, out *DockerMachinePoolMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate(in, out, s) +// Convert_v1beta1_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate is an autogenerated conversion function. +func Convert_v1beta1_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate(in *v1beta1.DockerMachinePoolMachineTemplate, out *DockerMachinePoolMachineTemplate, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate(in, out, s) } -func autoConvert_v1alpha3_DockerMachinePoolSpec_To_v1alpha4_DockerMachinePoolSpec(in *DockerMachinePoolSpec, out *v1alpha4.DockerMachinePoolSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1alpha4_DockerMachinePoolMachineTemplate(&in.Template, &out.Template, s); err != nil { +func autoConvert_v1alpha3_DockerMachinePoolSpec_To_v1beta1_DockerMachinePoolSpec(in *DockerMachinePoolSpec, out *v1beta1.DockerMachinePoolSpec, s conversion.Scope) error { + if err := Convert_v1alpha3_DockerMachinePoolMachineTemplate_To_v1beta1_DockerMachinePoolMachineTemplate(&in.Template, &out.Template, s); err != nil { return err } out.ProviderID = in.ProviderID @@ -259,13 +259,13 @@ func autoConvert_v1alpha3_DockerMachinePoolSpec_To_v1alpha4_DockerMachinePoolSpe return nil } -// Convert_v1alpha3_DockerMachinePoolSpec_To_v1alpha4_DockerMachinePoolSpec is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachinePoolSpec_To_v1alpha4_DockerMachinePoolSpec(in *DockerMachinePoolSpec, out *v1alpha4.DockerMachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachinePoolSpec_To_v1alpha4_DockerMachinePoolSpec(in, out, s) +// Convert_v1alpha3_DockerMachinePoolSpec_To_v1beta1_DockerMachinePoolSpec is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachinePoolSpec_To_v1beta1_DockerMachinePoolSpec(in *DockerMachinePoolSpec, out *v1beta1.DockerMachinePoolSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachinePoolSpec_To_v1beta1_DockerMachinePoolSpec(in, out, s) } -func autoConvert_v1alpha4_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec(in *v1alpha4.DockerMachinePoolSpec, out *DockerMachinePoolSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate(&in.Template, &out.Template, s); err != nil { +func autoConvert_v1beta1_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec(in *v1beta1.DockerMachinePoolSpec, out *DockerMachinePoolSpec, s conversion.Scope) error { + if err := Convert_v1beta1_DockerMachinePoolMachineTemplate_To_v1alpha3_DockerMachinePoolMachineTemplate(&in.Template, &out.Template, s); err != nil { return err } out.ProviderID = in.ProviderID @@ -273,20 +273,20 @@ func autoConvert_v1alpha4_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpe return nil } -// Convert_v1alpha4_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec(in *v1alpha4.DockerMachinePoolSpec, out *DockerMachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec(in, out, s) +// Convert_v1beta1_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec is an autogenerated conversion function. +func Convert_v1beta1_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec(in *v1beta1.DockerMachinePoolSpec, out *DockerMachinePoolSpec, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachinePoolSpec_To_v1alpha3_DockerMachinePoolSpec(in, out, s) } -func autoConvert_v1alpha3_DockerMachinePoolStatus_To_v1alpha4_DockerMachinePoolStatus(in *DockerMachinePoolStatus, out *v1alpha4.DockerMachinePoolStatus, s conversion.Scope) error { +func autoConvert_v1alpha3_DockerMachinePoolStatus_To_v1beta1_DockerMachinePoolStatus(in *DockerMachinePoolStatus, out *v1beta1.DockerMachinePoolStatus, s conversion.Scope) error { out.Ready = in.Ready out.Replicas = in.Replicas out.ObservedGeneration = in.ObservedGeneration if in.Instances != nil { in, out := &in.Instances, &out.Instances - *out = make([]v1alpha4.DockerMachinePoolInstanceStatus, len(*in)) + *out = make([]v1beta1.DockerMachinePoolInstanceStatus, len(*in)) for i := range *in { - if err := Convert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1alpha4_DockerMachinePoolInstanceStatus(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha3_DockerMachinePoolInstanceStatus_To_v1beta1_DockerMachinePoolInstanceStatus(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -295,9 +295,9 @@ func autoConvert_v1alpha3_DockerMachinePoolStatus_To_v1alpha4_DockerMachinePoolS } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) + *out = make(apiv1beta1.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -307,12 +307,12 @@ func autoConvert_v1alpha3_DockerMachinePoolStatus_To_v1alpha4_DockerMachinePoolS return nil } -// Convert_v1alpha3_DockerMachinePoolStatus_To_v1alpha4_DockerMachinePoolStatus is an autogenerated conversion function. -func Convert_v1alpha3_DockerMachinePoolStatus_To_v1alpha4_DockerMachinePoolStatus(in *DockerMachinePoolStatus, out *v1alpha4.DockerMachinePoolStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_DockerMachinePoolStatus_To_v1alpha4_DockerMachinePoolStatus(in, out, s) +// Convert_v1alpha3_DockerMachinePoolStatus_To_v1beta1_DockerMachinePoolStatus is an autogenerated conversion function. +func Convert_v1alpha3_DockerMachinePoolStatus_To_v1beta1_DockerMachinePoolStatus(in *DockerMachinePoolStatus, out *v1beta1.DockerMachinePoolStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_DockerMachinePoolStatus_To_v1beta1_DockerMachinePoolStatus(in, out, s) } -func autoConvert_v1alpha4_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus(in *v1alpha4.DockerMachinePoolStatus, out *DockerMachinePoolStatus, s conversion.Scope) error { +func autoConvert_v1beta1_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus(in *v1beta1.DockerMachinePoolStatus, out *DockerMachinePoolStatus, s conversion.Scope) error { out.Ready = in.Ready out.Replicas = in.Replicas out.ObservedGeneration = in.ObservedGeneration @@ -320,7 +320,7 @@ func autoConvert_v1alpha4_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolS in, out := &in.Instances, &out.Instances *out = make([]DockerMachinePoolInstanceStatus, len(*in)) for i := range *in { - if err := Convert_v1alpha4_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1beta1_DockerMachinePoolInstanceStatus_To_v1alpha3_DockerMachinePoolInstanceStatus(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -331,7 +331,7 @@ func autoConvert_v1alpha4_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolS in, out := &in.Conditions, &out.Conditions *out = make(apiv1alpha3.Conditions, len(*in)) for i := range *in { - if err := apiv1alpha3.Convert_v1alpha4_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { + if err := apiv1alpha3.Convert_v1beta1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -341,7 +341,7 @@ func autoConvert_v1alpha4_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolS return nil } -// Convert_v1alpha4_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus is an autogenerated conversion function. -func Convert_v1alpha4_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus(in *v1alpha4.DockerMachinePoolStatus, out *DockerMachinePoolStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus(in, out, s) +// Convert_v1beta1_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus is an autogenerated conversion function. +func Convert_v1beta1_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus(in *v1beta1.DockerMachinePoolStatus, out *DockerMachinePoolStatus, s conversion.Scope) error { + return autoConvert_v1beta1_DockerMachinePoolStatus_To_v1alpha3_DockerMachinePoolStatus(in, out, s) } diff --git a/test/infrastructure/docker/exp/api/v1alpha4/dockermachinepool_types.go b/test/infrastructure/docker/exp/api/v1alpha4/dockermachinepool_types.go index 8d27e49e1e4f..99e693d015af 100644 --- a/test/infrastructure/docker/exp/api/v1alpha4/dockermachinepool_types.go +++ b/test/infrastructure/docker/exp/api/v1alpha4/dockermachinepool_types.go @@ -112,7 +112,6 @@ type DockerMachinePoolInstanceStatus struct { // +kubebuilder:resource:path=dockermachinepools,scope=Namespaced,categories=cluster-api // +kubebuilder:object:root=true -// +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerMachinePool" diff --git a/test/infrastructure/docker/exp/api/v1beta1/dockermachinepool_types.go b/test/infrastructure/docker/exp/api/v1beta1/dockermachinepool_types.go new file mode 100644 index 000000000000..7a304ab0bb99 --- /dev/null +++ b/test/infrastructure/docker/exp/api/v1beta1/dockermachinepool_types.go @@ -0,0 +1,149 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" +) + +const ( + // MachinePoolFinalizer allows ReconcileDockerMachinePool to clean up resources. + MachinePoolFinalizer = "dockermachinepool.infrastructure.cluster.x-k8s.io" +) + +// DockerMachinePoolMachineTemplate defines the desired state of DockerMachine. +type DockerMachinePoolMachineTemplate struct { + // CustomImage allows customizing the container image that is used for + // running the machine + // +optional + CustomImage string `json:"customImage,omitempty"` + + // PreLoadImages allows to pre-load images in a newly created machine. This can be used to + // speed up tests by avoiding e.g. to download CNI images on all the containers. + // +optional + PreLoadImages []string `json:"preLoadImages,omitempty"` + + // ExtraMounts describes additional mount points for the node container + // These may be used to bind a hostPath + // +optional + ExtraMounts []infrav1.Mount `json:"extraMounts,omitempty"` +} + +// DockerMachinePoolSpec defines the desired state of DockerMachinePool. +type DockerMachinePoolSpec struct { + // Template contains the details used to build a replica machine within the Machine Pool + // +optional + Template DockerMachinePoolMachineTemplate `json:"template"` + + // ProviderID is the identification ID of the Machine Pool + // +optional + ProviderID string `json:"providerID,omitempty"` + + // ProviderIDList is the list of identification IDs of machine instances managed by this Machine Pool + //+optional + ProviderIDList []string `json:"providerIDList,omitempty"` +} + +// DockerMachinePoolStatus defines the observed state of DockerMachinePool. +type DockerMachinePoolStatus struct { + // Ready denotes that the machine pool is ready + // +optional + Ready bool `json:"ready"` + + // Replicas is the most recently observed number of replicas. + // +optional + Replicas int32 `json:"replicas"` + + // The generation observed by the deployment controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // Instances contains the status for each instance in the pool + // +optional + Instances []DockerMachinePoolInstanceStatus `json:"instances,omitempty"` + + // Conditions defines current service state of the DockerMachinePool. + // +optional + Conditions clusterv1.Conditions `json:"conditions,omitempty"` +} + +type DockerMachinePoolInstanceStatus struct { + // Addresses contains the associated addresses for the docker machine. + // +optional + Addresses []clusterv1.MachineAddress `json:"addresses,omitempty"` + + // InstanceName is the identification of the Machine Instance within the Machine Pool + InstanceName string `json:"instanceName,omitempty"` + + // ProviderID is the provider identification of the Machine Pool Instance + // +optional + ProviderID *string `json:"providerID,omitempty"` + + // Version defines the Kubernetes version for the Machine Instance + // +optional + Version *string `json:"version,omitempty"` + + // Ready denotes that the machine (docker container) is ready + // +optional + Ready bool `json:"ready"` + + // Bootstrapped is true when the kubeadm bootstrapping has been run + // against this machine + // +optional + Bootstrapped bool `json:"bootstrapped,omitempty"` +} + +// +kubebuilder:resource:path=dockermachinepools,scope=Namespaced,categories=cluster-api +// +kubebuilder:storageversion +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of DockerMachinePool" + +// DockerMachinePool is the Schema for the dockermachinepools API. +type DockerMachinePool struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DockerMachinePoolSpec `json:"spec,omitempty"` + Status DockerMachinePoolStatus `json:"status,omitempty"` +} + +// GetConditions returns the set of conditions for this object. +func (c *DockerMachinePool) GetConditions() clusterv1.Conditions { + return c.Status.Conditions +} + +// SetConditions sets the conditions on this object. +func (c *DockerMachinePool) SetConditions(conditions clusterv1.Conditions) { + c.Status.Conditions = conditions +} + +// +kubebuilder:object:root=true + +// DockerMachinePoolList contains a list of DockerMachinePool. +type DockerMachinePoolList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DockerMachinePool `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DockerMachinePool{}, &DockerMachinePoolList{}) +} diff --git a/test/infrastructure/docker/exp/api/v1beta1/groupversion_info.go b/test/infrastructure/docker/exp/api/v1beta1/groupversion_info.go new file mode 100644 index 000000000000..90cb5dba902c --- /dev/null +++ b/test/infrastructure/docker/exp/api/v1beta1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1alpha4 contains API Schema definitions for the infrastructure v1alpha4 API group +// +kubebuilder:object:generate=true +// +groupName=infrastructure.cluster.x-k8s.io +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects. + GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1beta1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/test/infrastructure/docker/exp/api/v1beta1/zz_generated.deepcopy.go b/test/infrastructure/docker/exp/api/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000000..1d5e4c79ed92 --- /dev/null +++ b/test/infrastructure/docker/exp/api/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,191 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + cluster_apiapiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + apiv1beta1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerMachinePool) DeepCopyInto(out *DockerMachinePool) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachinePool. +func (in *DockerMachinePool) DeepCopy() *DockerMachinePool { + if in == nil { + return nil + } + out := new(DockerMachinePool) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DockerMachinePool) 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 *DockerMachinePoolInstanceStatus) DeepCopyInto(out *DockerMachinePoolInstanceStatus) { + *out = *in + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make([]cluster_apiapiv1beta1.MachineAddress, len(*in)) + copy(*out, *in) + } + if in.ProviderID != nil { + in, out := &in.ProviderID, &out.ProviderID + *out = new(string) + **out = **in + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachinePoolInstanceStatus. +func (in *DockerMachinePoolInstanceStatus) DeepCopy() *DockerMachinePoolInstanceStatus { + if in == nil { + return nil + } + out := new(DockerMachinePoolInstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerMachinePoolList) DeepCopyInto(out *DockerMachinePoolList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DockerMachinePool, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachinePoolList. +func (in *DockerMachinePoolList) DeepCopy() *DockerMachinePoolList { + if in == nil { + return nil + } + out := new(DockerMachinePoolList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DockerMachinePoolList) 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 *DockerMachinePoolMachineTemplate) DeepCopyInto(out *DockerMachinePoolMachineTemplate) { + *out = *in + if in.PreLoadImages != nil { + in, out := &in.PreLoadImages, &out.PreLoadImages + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ExtraMounts != nil { + in, out := &in.ExtraMounts, &out.ExtraMounts + *out = make([]apiv1beta1.Mount, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachinePoolMachineTemplate. +func (in *DockerMachinePoolMachineTemplate) DeepCopy() *DockerMachinePoolMachineTemplate { + if in == nil { + return nil + } + out := new(DockerMachinePoolMachineTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerMachinePoolSpec) DeepCopyInto(out *DockerMachinePoolSpec) { + *out = *in + in.Template.DeepCopyInto(&out.Template) + if in.ProviderIDList != nil { + in, out := &in.ProviderIDList, &out.ProviderIDList + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachinePoolSpec. +func (in *DockerMachinePoolSpec) DeepCopy() *DockerMachinePoolSpec { + if in == nil { + return nil + } + out := new(DockerMachinePoolSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerMachinePoolStatus) DeepCopyInto(out *DockerMachinePoolStatus) { + *out = *in + if in.Instances != nil { + in, out := &in.Instances, &out.Instances + *out = make([]DockerMachinePoolInstanceStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(cluster_apiapiv1beta1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerMachinePoolStatus. +func (in *DockerMachinePoolStatus) DeepCopy() *DockerMachinePoolStatus { + if in == nil { + return nil + } + out := new(DockerMachinePoolStatus) + in.DeepCopyInto(out) + return out +} diff --git a/test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go b/test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go index 3b8d80ee83ad..288d5079f5f6 100644 --- a/test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go +++ b/test/infrastructure/docker/exp/controllers/dockermachinepool_controller.go @@ -26,10 +26,10 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1beta1" utilexp "sigs.k8s.io/cluster-api/exp/util" - infrav1exp "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha4" + infrav1exp "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/docker" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/patch" diff --git a/test/infrastructure/docker/exp/docker/nodepool.go b/test/infrastructure/docker/exp/docker/nodepool.go index 18e5239b6c17..54e092d88e79 100644 --- a/test/infrastructure/docker/exp/docker/nodepool.go +++ b/test/infrastructure/docker/exp/docker/nodepool.go @@ -25,10 +25,10 @@ import ( "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/docker/docker" - infrav1exp "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha4" + infrav1exp "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/container" ctrl "sigs.k8s.io/controller-runtime" diff --git a/test/infrastructure/docker/main.go b/test/infrastructure/docker/main.go index 70c3fca010bc..214b92def712 100644 --- a/test/infrastructure/docker/main.go +++ b/test/infrastructure/docker/main.go @@ -31,18 +31,20 @@ import ( cliflag "k8s.io/component-base/cli/flag" "k8s.io/klog/v2" "k8s.io/klog/v2/klogr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/remote" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" + expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" "sigs.k8s.io/cluster-api/feature" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/controller" - infrav1old "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha3" - infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" + infrav1alpha3 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha3" + infrav1alpha4 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" + infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/docker/controllers" - infraexpv1old "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha3" - infraexpv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha4" + infraexpv1alpha3 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha3" + infraexpv1alpha4 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha4" + infraexpv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1" expcontrollers "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/controllers" // +kubebuilder:scaffold:imports ) @@ -65,9 +67,11 @@ func init() { klog.InitFlags(nil) _ = scheme.AddToScheme(myscheme) - _ = infrav1old.AddToScheme(myscheme) + _ = infrav1alpha3.AddToScheme(myscheme) + _ = infrav1alpha4.AddToScheme(myscheme) _ = infrav1.AddToScheme(myscheme) - _ = infraexpv1old.AddToScheme(myscheme) + _ = infraexpv1alpha3.AddToScheme(myscheme) + _ = infraexpv1alpha4.AddToScheme(myscheme) _ = infraexpv1.AddToScheme(myscheme) _ = clusterv1.AddToScheme(myscheme) _ = expv1.AddToScheme(myscheme) diff --git a/util/annotations/helpers.go b/util/annotations/helpers.go index 286d5187f8fa..c5405eb1fafd 100644 --- a/util/annotations/helpers.go +++ b/util/annotations/helpers.go @@ -21,7 +21,7 @@ import ( "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // IsPaused returns true if the Cluster is paused or the object has the `paused` annotation. diff --git a/util/collections/helpers.go b/util/collections/helpers.go index 1d989e795065..be059c6e0be4 100644 --- a/util/collections/helpers.go +++ b/util/collections/helpers.go @@ -21,7 +21,7 @@ import ( "context" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/util/collections/machine_collection.go b/util/collections/machine_collection.go index eb3b9844a921..8265889eea3b 100644 --- a/util/collections/machine_collection.go +++ b/util/collections/machine_collection.go @@ -31,7 +31,7 @@ import ( "sort" "github.com/blang/semver" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/version" diff --git a/util/collections/machine_collection_test.go b/util/collections/machine_collection_test.go index e01355b4a265..4fae8bbe6f1b 100644 --- a/util/collections/machine_collection_test.go +++ b/util/collections/machine_collection_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/collections" ) diff --git a/util/collections/machine_filters.go b/util/collections/machine_filters.go index 374629fa814a..53b5b4161936 100644 --- a/util/collections/machine_filters.go +++ b/util/collections/machine_filters.go @@ -21,8 +21,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/util/collections/machine_filters_test.go b/util/collections/machine_filters_test.go index d05f427e3460..c0893c8a1540 100644 --- a/util/collections/machine_filters_test.go +++ b/util/collections/machine_filters_test.go @@ -28,8 +28,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" ) func falseFilter(_ *clusterv1.Machine) bool { diff --git a/util/conditions/getter.go b/util/conditions/getter.go index 92a1a67a7a77..379e1ecb68a1 100644 --- a/util/conditions/getter.go +++ b/util/conditions/getter.go @@ -19,7 +19,7 @@ package conditions import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/util/conditions/getter_test.go b/util/conditions/getter_test.go index 9aef2a8c37e2..88b961b1e418 100644 --- a/util/conditions/getter_test.go +++ b/util/conditions/getter_test.go @@ -20,7 +20,7 @@ import ( "testing" . "github.com/onsi/gomega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) var ( diff --git a/util/conditions/matcher.go b/util/conditions/matcher.go index d9415b8fe4ff..dc5757dece40 100644 --- a/util/conditions/matcher.go +++ b/util/conditions/matcher.go @@ -21,7 +21,7 @@ import ( "github.com/onsi/gomega" "github.com/onsi/gomega/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // MatchConditions returns a custom matcher to check equality of clusterv1.Conditions. diff --git a/util/conditions/matcher_test.go b/util/conditions/matcher_test.go index 3703fcb4f05a..0b9ca1b81e05 100644 --- a/util/conditions/matcher_test.go +++ b/util/conditions/matcher_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func TestMatchConditions(t *testing.T) { diff --git a/util/conditions/matchers.go b/util/conditions/matchers.go index e49ebced6486..a2fd651744ef 100644 --- a/util/conditions/matchers.go +++ b/util/conditions/matchers.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega/format" "github.com/onsi/gomega/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // HaveSameStateOf matches a condition to have the same state of another. diff --git a/util/conditions/merge.go b/util/conditions/merge.go index a5650d891cdc..54c1ec3d2eed 100644 --- a/util/conditions/merge.go +++ b/util/conditions/merge.go @@ -20,7 +20,7 @@ import ( "sort" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // localizedCondition defines a condition with the information of the object the conditions diff --git a/util/conditions/merge_strategies.go b/util/conditions/merge_strategies.go index 87bda830fcd0..6e582bf10d0e 100644 --- a/util/conditions/merge_strategies.go +++ b/util/conditions/merge_strategies.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // mergeOptions allows to set strategies for merging a set of conditions into a single condition, diff --git a/util/conditions/merge_strategies_test.go b/util/conditions/merge_strategies_test.go index cddc13572b12..0fa6170f4583 100644 --- a/util/conditions/merge_strategies_test.go +++ b/util/conditions/merge_strategies_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func TestGetStepCounterMessage(t *testing.T) { diff --git a/util/conditions/merge_test.go b/util/conditions/merge_test.go index 67504db2c7e6..2cd91370d4fe 100644 --- a/util/conditions/merge_test.go +++ b/util/conditions/merge_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func TestNewConditionsGroup(t *testing.T) { diff --git a/util/conditions/patch.go b/util/conditions/patch.go index d9bdd386204b..51af0b398c5f 100644 --- a/util/conditions/patch.go +++ b/util/conditions/patch.go @@ -21,7 +21,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // Patch defines a list of operations to change a list of conditions into another. diff --git a/util/conditions/patch_test.go b/util/conditions/patch_test.go index 4d87b92a5709..137c94441909 100644 --- a/util/conditions/patch_test.go +++ b/util/conditions/patch_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func TestNewPatch(t *testing.T) { diff --git a/util/conditions/setter.go b/util/conditions/setter.go index 207ce55b2b9c..415013739299 100644 --- a/util/conditions/setter.go +++ b/util/conditions/setter.go @@ -23,7 +23,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // Setter interface defines methods that a Cluster API object should implement in order to diff --git a/util/conditions/setter_test.go b/util/conditions/setter_test.go index d9dcc10d593a..470ae4f8d98c 100644 --- a/util/conditions/setter_test.go +++ b/util/conditions/setter_test.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func TestHasSameState(t *testing.T) { diff --git a/util/conditions/suite_test.go b/util/conditions/suite_test.go index bb2ad0cb5b35..9fa7fb7a8093 100644 --- a/util/conditions/suite_test.go +++ b/util/conditions/suite_test.go @@ -19,7 +19,7 @@ package conditions import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func init() { diff --git a/util/conditions/unstructured.go b/util/conditions/unstructured.go index dfd50d50f201..00ec7ac3587f 100644 --- a/util/conditions/unstructured.go +++ b/util/conditions/unstructured.go @@ -19,7 +19,7 @@ package conditions import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/controller-runtime/pkg/log" ) diff --git a/util/conditions/unstructured_test.go b/util/conditions/unstructured_test.go index 618022cf1240..c628ae8065db 100644 --- a/util/conditions/unstructured_test.go +++ b/util/conditions/unstructured_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func TestUnstructuredGetConditions(t *testing.T) { diff --git a/util/conversion/conversion.go b/util/conversion/conversion.go index 49a4d6bf6253..2e1949260ddf 100644 --- a/util/conversion/conversion.go +++ b/util/conversion/conversion.go @@ -39,7 +39,7 @@ import ( "k8s.io/apimachinery/pkg/util/json" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/util/conversion/conversion_test.go b/util/conversion/conversion_test.go index 23f4bf074278..6762cafcfb2a 100644 --- a/util/conversion/conversion_test.go +++ b/util/conversion/conversion_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) var ( diff --git a/util/deprecated.go b/util/deprecated.go index f422189efb4c..dbd82ba9c0f0 100644 --- a/util/deprecated.go +++ b/util/deprecated.go @@ -21,7 +21,7 @@ import ( "context" "github.com/blang/semver" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/version" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/util/failuredomains/failure_domains.go b/util/failuredomains/failure_domains.go index d373298e0970..005d2f36a477 100644 --- a/util/failuredomains/failure_domains.go +++ b/util/failuredomains/failure_domains.go @@ -23,7 +23,7 @@ import ( "k8s.io/klog/v2/klogr" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/collections" ) diff --git a/util/failuredomains/failure_domains_test.go b/util/failuredomains/failure_domains_test.go index d6b358d8fcca..40eb4015132f 100644 --- a/util/failuredomains/failure_domains_test.go +++ b/util/failuredomains/failure_domains_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func TestNewFailureDomainPicker(t *testing.T) { diff --git a/util/kubeconfig/kubeconfig.go b/util/kubeconfig/kubeconfig.go index 4b4b91f4c546..283c2817d737 100644 --- a/util/kubeconfig/kubeconfig.go +++ b/util/kubeconfig/kubeconfig.go @@ -30,7 +30,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd/api" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/certs" "sigs.k8s.io/cluster-api/util/secret" diff --git a/util/kubeconfig/kubeconfig_test.go b/util/kubeconfig/kubeconfig_test.go index 92063c74bd4f..980eb2641626 100644 --- a/util/kubeconfig/kubeconfig_test.go +++ b/util/kubeconfig/kubeconfig_test.go @@ -31,7 +31,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd/api" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/certs" "sigs.k8s.io/cluster-api/util/secret" diff --git a/util/kubeconfig/testing.go b/util/kubeconfig/testing.go index c7e50ee365ee..51da00ad1c94 100644 --- a/util/kubeconfig/testing.go +++ b/util/kubeconfig/testing.go @@ -22,7 +22,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd/api" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // FromEnvTestConfig returns a new Kubeconfig in byte form when running in envtest. diff --git a/util/labels/helpers.go b/util/labels/helpers.go index 6de98c118929..673ccd1cf5d4 100644 --- a/util/labels/helpers.go +++ b/util/labels/helpers.go @@ -19,7 +19,7 @@ package labels import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) // IsTopologyOwned returns true if the object has the `topology.cluster.x-k8s.io/owned` label. diff --git a/util/labels/helpers_test.go b/util/labels/helpers_test.go index c747bc9bd22b..329f8d57f6eb 100644 --- a/util/labels/helpers_test.go +++ b/util/labels/helpers_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func TestHasWatchLabel(t *testing.T) { diff --git a/util/patch/options.go b/util/patch/options.go index 1b4defaf2d13..9c2adffbdce3 100644 --- a/util/patch/options.go +++ b/util/patch/options.go @@ -16,7 +16,7 @@ limitations under the License. package patch -import clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" +import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" // Option is some configuration that modifies options for a patch request. type Option interface { diff --git a/util/patch/patch.go b/util/patch/patch.go index 9423a9e0da56..48f2efecc95f 100644 --- a/util/patch/patch.go +++ b/util/patch/patch.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/wait" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" diff --git a/util/patch/patch_test.go b/util/patch/patch_test.go index fcf82404504b..8d70cab5b046 100644 --- a/util/patch/patch_test.go +++ b/util/patch/patch_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/types" "k8s.io/utils/pointer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/controller-runtime/pkg/client" @@ -50,7 +50,7 @@ func TestPatchHelper(t *testing.T) { obj := &unstructured.Unstructured{ Object: map[string]interface{}{ "kind": "GenericBootstrapConfig", - "apiVersion": "bootstrap.cluster.x-k8s.io/v1alpha4", + "apiVersion": "bootstrap.cluster.x-k8s.io/v1beta1", "metadata": map[string]interface{}{ "generateName": "test-bootstrap-", "namespace": ns.Name, @@ -86,7 +86,7 @@ func TestPatchHelper(t *testing.T) { t.Log("Modifying the OwnerReferences") refs := []metav1.OwnerReference{ { - APIVersion: "cluster.x-k8s.io/v1alpha4", + APIVersion: "cluster.x-k8s.io/v1beta1", Kind: "Cluster", Name: "test", UID: types.UID("fake-uid"), diff --git a/util/patch/utils_test.go b/util/patch/utils_test.go index f297112c2e26..9f4746475afc 100644 --- a/util/patch/utils_test.go +++ b/util/patch/utils_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) func TestToUnstructured(t *testing.T) { diff --git a/util/predicates/cluster_predicates.go b/util/predicates/cluster_predicates.go index 71cb0bb5b5a1..9bf91d4c53cc 100644 --- a/util/predicates/cluster_predicates.go +++ b/util/predicates/cluster_predicates.go @@ -19,7 +19,7 @@ package predicates import ( "github.com/go-logr/logr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/predicate" ) diff --git a/util/secret/certificates.go b/util/secret/certificates.go index 5085f5fe0c36..178023e9e9bb 100644 --- a/util/secret/certificates.go +++ b/util/secret/certificates.go @@ -34,8 +34,8 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/util/cert" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util/certs" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/util/secret/certificates_test.go b/util/secret/certificates_test.go index e5ca3f6b3f6b..e6c48c252ba2 100644 --- a/util/secret/certificates_test.go +++ b/util/secret/certificates_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/gomega" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4" + bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util/secret" ) diff --git a/util/suite_test.go b/util/suite_test.go index 21ef3db697e8..86dca5158185 100644 --- a/util/suite_test.go +++ b/util/suite_test.go @@ -19,7 +19,7 @@ package util import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" ) diff --git a/util/util.go b/util/util.go index a4d9de37794f..11635f4f6239 100644 --- a/util/util.go +++ b/util/util.go @@ -38,7 +38,7 @@ import ( k8sversion "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/metadata" "k8s.io/client-go/rest" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" diff --git a/util/util_test.go b/util/util_test.go index 6d2a39f90df5..5dc6df949fc1 100644 --- a/util/util_test.go +++ b/util/util_test.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" @@ -58,7 +58,7 @@ func TestMachineToInfrastructureMapFunc(t *testing.T) { }, Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{ - APIVersion: "foo.cluster.x-k8s.io/v1alpha4", + APIVersion: "foo.cluster.x-k8s.io/v1beta1", Kind: "TestMachine", Name: "infra-1", }, @@ -77,7 +77,7 @@ func TestMachineToInfrastructureMapFunc(t *testing.T) { name: "should return no matching reconcile requests", input: schema.GroupVersionKind{ Group: "foo.cluster.x-k8s.io", - Version: "v1alpha4", + Version: "v1beta1", Kind: "TestMachine", }, request: &clusterv1.Machine{ @@ -87,7 +87,7 @@ func TestMachineToInfrastructureMapFunc(t *testing.T) { }, Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{ - APIVersion: "bar.cluster.x-k8s.io/v1alpha4", + APIVersion: "bar.cluster.x-k8s.io/v1beta1", Kind: "TestMachine", Name: "bar-1", }, @@ -129,7 +129,7 @@ func TestClusterToInfrastructureMapFunc(t *testing.T) { }, Spec: clusterv1.ClusterSpec{ InfrastructureRef: &corev1.ObjectReference{ - APIVersion: "foo.cluster.x-k8s.io/v1alpha4", + APIVersion: "foo.cluster.x-k8s.io/v1beta1", Kind: "TestCluster", Name: "infra-1", }, @@ -148,7 +148,7 @@ func TestClusterToInfrastructureMapFunc(t *testing.T) { name: "should return no matching reconcile requests", input: schema.GroupVersionKind{ Group: "foo.cluster.x-k8s.io", - Version: "v1alpha4", + Version: "v1beta1", Kind: "TestCluster", }, request: &clusterv1.Cluster{ @@ -158,7 +158,7 @@ func TestClusterToInfrastructureMapFunc(t *testing.T) { }, Spec: clusterv1.ClusterSpec{ InfrastructureRef: &corev1.ObjectReference{ - APIVersion: "bar.cluster.x-k8s.io/v1alpha4", + APIVersion: "bar.cluster.x-k8s.io/v1beta1", Kind: "TestCluster", Name: "bar-1", }, @@ -834,7 +834,7 @@ func TestRemoveOwnerRef(t *testing.T) { Name: "m4g1c", }, { - APIVersion: "bar.cluster.x-k8s.io/v1alpha4", + APIVersion: "bar.cluster.x-k8s.io/v1beta1", Kind: "TestCluster", Name: "bar-1", }, diff --git a/util/yaml/yaml.go b/util/yaml/yaml.go index 8ee41b94423e..49e0dc99d1aa 100644 --- a/util/yaml/yaml.go +++ b/util/yaml/yaml.go @@ -33,7 +33,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer/streaming" apiyaml "k8s.io/apimachinery/pkg/util/yaml" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/yaml" ) diff --git a/util/yaml/yaml_test.go b/util/yaml/yaml_test.go index 7cd1ed71fffb..74046d9517d2 100644 --- a/util/yaml/yaml_test.go +++ b/util/yaml/yaml_test.go @@ -27,7 +27,7 @@ import ( ) const validCluster = ` -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Cluster metadata: name: cluster1 @@ -35,39 +35,39 @@ spec:` const validMachines1 = ` --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Machine metadata: name: machine1 --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Machine metadata: name: machine2` const validUnified1 = ` -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Cluster metadata: name: cluster1 --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Machine metadata: name: machine1` const validUnified2 = ` -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Cluster metadata: name: cluster1 --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Machine metadata: name: machine1 --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Machine metadata: name: machine2` @@ -84,24 +84,24 @@ metadata: name: cluster-api-shared-configuration namespace: cluster-api-test --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Cluster metadata: name: cluster1 --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Machine metadata: name: machine1 --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Machine metadata: name: machine2` const invalidMachines1 = ` items: -- apiVersion: "cluster.x-k8s.io/v1alpha4" +- apiVersion: "cluster.x-k8s.io/v1beta1" kind: Machine metadata: name: machine1 @@ -128,12 +128,12 @@ metadata: name: cluster-api-shared-configuration namespace: cluster-api-test --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Cluster metadata: name: cluster1 --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Machine - metadata: name: machine1 @@ -154,7 +154,7 @@ metadata: name: cluster-api-shared-configuration namespace: cluster-api-test --- -apiVersion: "cluster.x-k8s.io/v1alpha4" +apiVersion: "cluster.x-k8s.io/v1beta1" kind: Cluster metadata: name: cluster1