diff --git a/.golangci-kal.yml b/.golangci-kal.yml index 89163c96f034..5f6df6056dd5 100644 --- a/.golangci-kal.yml +++ b/.golangci-kal.yml @@ -60,53 +60,53 @@ linters: - path-except: "api//*" linters: - kubeapilinter - - path: "api/v1beta2/*|api/addons/v1beta2/*|api/v1beta1/*|api/v1alpha1/*|api/addons/v1beta1/*" + - path: "api/addons/v1beta2/*|api/bootstrap/kubeadm/v1beta2/*|api/controlplane/kubeadm/v1beta2/*|api/core/v1beta2/*|api/ipam/v1beta2/*|api/runtime/v1beta2/*|api/addons/v1beta1/*|api/bootstrap/kubeadm/v1beta1/*|api/controlplane/kubeadm/v1beta1/*|api/core/v1beta1/*|api/ipam/v1beta1/*|api/ipam/v1alpha1/*|api/runtime/v1alpha1/*" text: "Conditions field must be a slice of metav1.Condition" linters: - kubeapilinter - - path: "api/v1beta1/*" + - path: "api/core/v1beta1/*" text: "type ClusterIPFamily should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements" linters: - kubeapilinter - - path: "exp/ipam/api/v1beta2/*|exp/ipam/api/v1alpha1/*|exp/ipam/api/v1beta1/*" + - path: "api/ipam/v1beta2/*|api/ipam/v1alpha1/*|api/ipam/v1beta1/*" text: "field Prefix should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements" linters: - kubeapilinter # clusterctl and Runtime Hooks can be fixed once we bump their apiVersion. - - path: "cmd/clusterctl/api/v1alpha3|exp/runtime/hooks/api/v1alpha1" + - path: "cmd/clusterctl/api/v1alpha3|api/runtime/hooks/v1alpha1" text: "maxlength" linters: - kubeapilinter # controller-gen does not allow to add MaxItems to Schemaless fields - - path: "api/v1beta2/*|api/v1beta1/*" + - path: "api/core/v1beta2/*|api/core/v1beta1/*" text: "maxlength: field (AllOf|OneOf|AnyOf) must have a maximum items, add kubebuilder:validation:MaxItems marker" linters: - kubeapilinter # It does not make sense to add a maxItems marker on the *List structs as they are not used to generate CRD YAMLs. # This exclude will be removed once https://github.com/JoelSpeed/kubeapilinter/issues/38 is resolved. - - path: "api/v1beta2/*|api/addons/v1beta2/*|api/v1beta1/*|api/v1alpha1/*|api/addons/v1beta1/*" + - path: "api/core/v1beta2/*|api/addons/v1beta2/*|api/core/v1beta1/*|api/v1alpha1/*|api/addons/v1beta1/*" text: "maxlength: field Items must have a maximum items, add kubebuilder:validation:MaxItems marker" linters: - kubeapilinter - - path: "api/v1beta2/*|api/addons/v1beta2/*|api/v1alpha1/*|api/v1beta1/*|api/addons/v1beta1/*" + - path: "api/bootstrap/kubeadm/v1beta2/*|api/controlplane/kubeadm/v1beta2/*|api/core/v1beta2/*|api/addons/v1beta2/*|api/bootstrap/kubeadm/v1beta1/*|api/controlplane/kubeadm/v1beta1/*|api/v1alpha1/*|api/core/v1beta1/*|api/addons/v1beta1/*" text: "nobools" linters: - kubeapilinter # We follow the current CustomResourceDefinition field's json tag pattern. - - path: "api/v1beta2/*|api/v1beta1/*" + - path: "api/core/v1beta2/*|api/core/v1beta1/*" text: "field (XPreserveUnknownFields|XPreserveUnknownFields|XValidations|XMetadata|XIntOrString) json tag does not match pattern" linters: - kubeapilinter # The following rules are disabled until we migrate to the new API. - - path: "bootstrap/kubeadm/api/v1beta2/kubeadm_types.go|bootstrap/kubeadm/api/v1beta1/kubeadm_types.go" + - path: "api/bootstrap/kubeadm/v1beta2/kubeadm_types.go|api/bootstrap/kubeadm/v1beta1/kubeadm_types.go" text: "field Token is marked as required, should not be a pointer" linters: - kubeapilinter - - path: "api/v1beta2/clusterclass_types.go|api/v1beta1/clusterclass_types.go" + - path: "api/core/v1beta2/clusterclass_types.go|api/core/v1beta1/clusterclass_types.go" text: "field Ref is marked as required, should not be a pointer" linters: - kubeapilinter - - path: "api/v1beta2/*|api/addons/v1beta2/*|api/v1alpha1/*|api/v1beta1/*|api/v1alpha3/*|api/addons/v1beta1/*" + - path: "api/core/v1beta2/*|api/addons/v1beta2/*|api/v1alpha1/*|api/core/v1beta1/*|api/v1alpha3/*|api/addons/v1beta1/*|api/runtime/v1beta2/*|api/runtime/v1alpha1/*|api/runtime/hooks/v1alpha1/*" text: "field Items must be marked as optional or required" linters: - kubeapilinter diff --git a/.golangci.yml b/.golangci.yml index 316d1c8e8b18..e004c37fd839 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -110,37 +110,28 @@ linters: alias: bootstrapv1alpha3 - pkg: sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha4 alias: bootstrapv1alpha4 - - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 + - pkg: sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1 alias: bootstrapv1beta1 - - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2 + - pkg: sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2 alias: bootstrapv1 # KCP - pkg: sigs.k8s.io/cluster-api/internal/apis/controlplane/kubeadm/v1alpha3 alias: controlplanev1alpha3 - pkg: sigs.k8s.io/cluster-api/internal/apis/controlplane/kubeadm/v1alpha4 alias: controlplanev1alpha4 - - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1 + - pkg: sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta1 alias: controlplanev1beta1 - - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2 + - pkg: sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2 alias: controlplanev1 # CAPI - pkg: sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3 alias: clusterv1alpha3 - pkg: sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4 alias: clusterv1alpha4 - - pkg: sigs.k8s.io/cluster-api/api/v1beta1 + - pkg: sigs.k8s.io/cluster-api/api/core/v1beta1 alias: clusterv1beta1 - - pkg: sigs.k8s.io/cluster-api/api/v1beta2 + - pkg: sigs.k8s.io/cluster-api/api/core/v1beta2 alias: clusterv1 - # CAPI exp - - pkg: sigs.k8s.io/cluster-api/internal/apis/core/exp/v1alpha3 - alias: expv1alpha3 - - pkg: sigs.k8s.io/cluster-api/internal/apis/core/exp/v1alpha4 - alias: expv1alpha4 - - pkg: sigs.k8s.io/cluster-api/exp/api/v1beta1 - alias: expv1beta1 - - pkg: sigs.k8s.io/cluster-api/exp/api/v1beta2 - alias: expv1 # CAPI exp addons - pkg: sigs.k8s.io/cluster-api/internal/apis/addons/v1alpha3 alias: addonsv1alpha3 @@ -151,16 +142,16 @@ linters: - pkg: sigs.k8s.io/cluster-api/api/addons/v1beta2 alias: addonsv1 # CAPI exp IPAM - - pkg: sigs.k8s.io/cluster-api/exp/ipam/api/v1beta1 + - pkg: sigs.k8s.io/cluster-api/api/ipam/v1beta1 alias: ipamv1beta1 - - pkg: sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2 + - pkg: sigs.k8s.io/cluster-api/api/ipam/v1beta2 alias: ipamv1 # CAPI exp runtime - - pkg: sigs.k8s.io/cluster-api/exp/runtime/api/v1alpha1 + - pkg: sigs.k8s.io/cluster-api/api/runtime/v1alpha1 alias: runtimev1alpha1 - - pkg: sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2 + - pkg: sigs.k8s.io/cluster-api/api/runtime/v1beta2 alias: runtimev1 - - pkg: sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1 + - pkg: sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1 alias: runtimehooksv1 - pkg: sigs.k8s.io/cluster-api/exp/runtime/controllers alias: runtimecontrollers diff --git a/Makefile b/Makefile index 6a56da4ae22e..4b01060d002c 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,6 @@ TRACE ?= 0 # # Full directory of where the Makefile resides ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) -EXP_DIR := exp BIN_DIR := bin TEST_DIR := test TOOLS_DIR := hack/tools @@ -282,18 +281,18 @@ generate-manifests-core: $(CONTROLLER_GEN) $(KUSTOMIZE) ## Generate manifests e. $(MAKE) clean-generated-yaml SRC_DIRS="./config/crd/bases,./config/webhook/manifests.yaml" $(CONTROLLER_GEN) \ paths=./ \ - paths=./api/... \ + paths=./api/addons/... \ + paths=./api/core/... \ + paths=./api/ipam/... \ + paths=./api/runtime/... \ paths=./internal/apis/core/... \ paths=./internal/controllers/... \ paths=./internal/webhooks/... \ paths=./internal/apis/addons/... \ - paths=./$(EXP_DIR)/api/... \ - paths=./$(EXP_DIR)/internal/controllers/... \ - paths=./$(EXP_DIR)/internal/webhooks/... \ - paths=./$(EXP_DIR)/ipam/api/... \ - paths=./$(EXP_DIR)/ipam/internal/webhooks/... \ - paths=./$(EXP_DIR)/runtime/api/... \ - paths=./$(EXP_DIR)/runtime/internal/controllers/... \ + paths=./exp/internal/controllers/... \ + paths=./exp/internal/webhooks/... \ + paths=./exp/ipam/internal/webhooks/... \ + paths=./exp/runtime/internal/controllers/... \ crd:crdVersions=v1 \ rbac:roleName=manager-role \ output:crd:dir=./config/crd/bases \ @@ -333,8 +332,8 @@ generate-manifests-core: $(CONTROLLER_GEN) $(KUSTOMIZE) ## Generate manifests e. generate-manifests-kubeadm-bootstrap: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc. for kubeadm bootstrap $(MAKE) clean-generated-yaml SRC_DIRS="./bootstrap/kubeadm/config/crd/bases,./bootstrap/kubeadm/config/webhook/manifests.yaml" $(CONTROLLER_GEN) \ + paths=./api/bootstrap/kubeadm/... \ paths=./bootstrap/kubeadm \ - paths=./bootstrap/kubeadm/api/... \ paths=./bootstrap/kubeadm/internal/controllers/... \ paths=./bootstrap/kubeadm/internal/webhooks/... \ paths=./internal/apis/bootstrap/kubeadm/... \ @@ -349,8 +348,8 @@ generate-manifests-kubeadm-bootstrap: $(CONTROLLER_GEN) ## Generate manifests e. generate-manifests-kubeadm-control-plane: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc. for kubeadm control plane $(MAKE) clean-generated-yaml SRC_DIRS="./controlplane/kubeadm/config/crd/bases,./controlplane/kubeadm/config/webhook/manifests.yaml" $(CONTROLLER_GEN) \ + paths=./api/controlplane/kubeadm/... \ paths=./controlplane/kubeadm \ - paths=./controlplane/kubeadm/api/... \ paths=./controlplane/kubeadm/internal/controllers/... \ paths=./controlplane/kubeadm/internal/webhooks/... \ paths=./internal/apis/controlplane/kubeadm/... \ @@ -367,9 +366,9 @@ generate-manifests-docker-infrastructure: $(CONTROLLER_GEN) ## Generate manifest cd $(CAPD_DIR); $(CONTROLLER_GEN) \ paths=./ \ paths=./api/... \ - paths=./$(EXP_DIR)/api/... \ - paths=./$(EXP_DIR)/internal/controllers/... \ - paths=./$(EXP_DIR)/internal/webhooks/... \ + paths=./exp/api/... \ + paths=./exp/internal/controllers/... \ + paths=./exp/internal/webhooks/... \ paths=./internal/controllers/... \ paths=./internal/webhooks/... \ crd:crdVersions=v1 \ @@ -391,16 +390,16 @@ generate-go-deepcopy: ## Run all generate-go-deepcopy-* targets .PHONY: generate-go-deepcopy-core generate-go-deepcopy-core: $(CONTROLLER_GEN) ## Generate deepcopy go code for core - $(MAKE) clean-generated-deepcopy SRC_DIRS="./api,./internal/apis/addons,./internal/apis/core,./$(EXP_DIR)/api,./$(EXP_DIR)/runtime/api,./$(EXP_DIR)/runtime/hooks/api" + $(MAKE) clean-generated-deepcopy SRC_DIRS="./api/addons,./api/core,./api/ipam,./api/runtime,./internal/apis/addons,./internal/apis/core,./api/runtime/hooks" $(CONTROLLER_GEN) \ object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \ - paths=./api/... \ + paths=./api/addons/... \ + paths=./api/core/... \ + paths=./api/ipam/... \ + paths=./api/runtime/... \ + paths=./api/runtime/hooks/... \ paths=./internal/apis/addons/... \ paths=./internal/apis/core/... \ - paths=./$(EXP_DIR)/api/... \ - paths=./$(EXP_DIR)/ipam/api/... \ - paths=./$(EXP_DIR)/runtime/api/... \ - paths=./$(EXP_DIR)/runtime/hooks/api/... \ paths=./internal/runtime/test/... \ paths=./cmd/clusterctl/... \ paths=./util/test/builder/... \ @@ -409,26 +408,28 @@ generate-go-deepcopy-core: $(CONTROLLER_GEN) ## Generate deepcopy go code for co .PHONY: generate-go-deepcopy-kubeadm-bootstrap generate-go-deepcopy-kubeadm-bootstrap: $(CONTROLLER_GEN) ## Generate deepcopy go code for kubeadm bootstrap - $(MAKE) clean-generated-deepcopy SRC_DIRS="./bootstrap/kubeadm/api,./bootstrap/kubeadm/types" + $(MAKE) clean-generated-deepcopy SRC_DIRS="./api/bootstrap/kubeadm,./bootstrap/kubeadm/types" $(CONTROLLER_GEN) \ object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \ - paths=./bootstrap/kubeadm/api/... \ - paths=./bootstrap/kubeadm/types/... + paths=./api/bootstrap/kubeadm/... \ + paths=./bootstrap/kubeadm/types/... \ + paths=./internal/apis/bootstrap/kubeadm/... .PHONY: generate-go-deepcopy-kubeadm-control-plane generate-go-deepcopy-kubeadm-control-plane: $(CONTROLLER_GEN) ## Generate deepcopy go code for kubeadm control plane - $(MAKE) clean-generated-deepcopy SRC_DIRS="./controlplane/kubeadm/api" + $(MAKE) clean-generated-deepcopy SRC_DIRS="./api/controlplane/kubeadm" $(CONTROLLER_GEN) \ object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \ - paths=./controlplane/kubeadm/api/... + paths=./api/controlplane/kubeadm/... \ + paths=./internal/apis/controlplane/kubeadm/... .PHONY: generate-go-deepcopy-docker-infrastructure generate-go-deepcopy-docker-infrastructure: $(CONTROLLER_GEN) generate-go-deepcopy-in-memory-infrastructure ## Generate deepcopy go code for docker infrastructure provider - $(MAKE) clean-generated-deepcopy SRC_DIRS="$(CAPD_DIR)/api,$(CAPD_DIR)/$(EXP_DIR)/api" + $(MAKE) clean-generated-deepcopy SRC_DIRS="$(CAPD_DIR)/api,$(CAPD_DIR)/exp/api" cd $(CAPD_DIR); $(CONTROLLER_GEN) \ object:headerFile=../../../hack/boilerplate/boilerplate.generatego.txt \ paths=./api/... \ - paths=./$(EXP_DIR)/api/... + paths=./exp/api/... .PHONY: generate-go-deepcopy-in-memory-infrastructure generate-go-deepcopy-in-memory-infrastructure: $(CONTROLLER_GEN) ## Generate deepcopy go code for in-memory cloud resources @@ -448,19 +449,18 @@ generate-go-conversions: ## Run all generate-go-conversions-* targets generate-go-conversions-core: ## Run all generate-go-conversions-core-* targets $(MAKE) generate-go-conversions-core-api $(MAKE) generate-go-conversions-addons-api - $(MAKE) generate-go-conversions-core-exp - $(MAKE) generate-go-conversions-core-exp-ipam + $(MAKE) generate-go-conversions-core-ipam $(MAKE) generate-go-conversions-core-runtime .PHONY: generate-go-conversions-core-api generate-go-conversions-core-api: $(CONVERSION_GEN) ## Generate conversions go code for core api - $(MAKE) clean-generated-conversions SRC_DIRS="./api/v1beta1,./internal/apis/core/v1alpha3,./internal/apis/core/v1alpha4" + $(MAKE) clean-generated-conversions SRC_DIRS="./api/core/v1beta1,./internal/apis/core/v1alpha3,./internal/apis/core/v1alpha4" $(CONVERSION_GEN) \ --output-file=zz_generated.conversion.go \ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \ ./internal/apis/core/v1alpha3 \ ./internal/apis/core/v1alpha4 \ - ./api/v1beta1 + ./api/core/v1beta1 .PHONY: generate-go-conversions-addons-api generate-go-conversions-addons-api: $(CONVERSION_GEN) ## Generate conversions go code for addons api @@ -472,24 +472,14 @@ generate-go-conversions-addons-api: $(CONVERSION_GEN) ## Generate conversions go ./internal/apis/addons/v1alpha4 \ ./api/addons/v1beta1 -.PHONY: generate-go-conversions-core-exp -generate-go-conversions-core-exp: $(CONVERSION_GEN) ## Generate conversions go code for core exp - $(MAKE) clean-generated-conversions SRC_DIRS="./exp/api/v1beta1,./internal/apis/core/exp/v1alpha3,./internal/apis/core/exp/v1alpha4" - $(CONVERSION_GEN) \ - --output-file=zz_generated.conversion.go \ - --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \ - ./internal/apis/core/exp/v1alpha3 \ - ./internal/apis/core/exp/v1alpha4 \ - ./$(EXP_DIR)/api/v1beta1 - -.PHONY: generate-go-conversions-core-exp-ipam -generate-go-conversions-core-exp-ipam: $(CONVERSION_GEN) ## Generate conversions go code for core exp IPAM - $(MAKE) clean-generated-conversions SRC_DIRS="./$(EXP_DIR)/ipam/api/v1beta1,./$(EXP_DIR)/ipam/api/v1alpha1" +.PHONY: generate-go-conversions-core-ipam +generate-go-conversions-core-ipam: $(CONVERSION_GEN) ## Generate conversions go code for core exp IPAM + $(MAKE) clean-generated-conversions SRC_DIRS="./api/ipam/v1beta1,./api/ipam/v1alpha1" $(CONVERSION_GEN) \ --output-file=zz_generated.conversion.go \ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \ - ./$(EXP_DIR)/ipam/api/v1alpha1 \ - ./$(EXP_DIR)/ipam/api/v1beta1 + ./api/ipam/v1alpha1 \ + ./api/ipam/v1beta1 .PHONY: generate-go-conversions-core-runtime generate-go-conversions-core-runtime: $(CONVERSION_GEN) ## Generate conversions go code for core runtime @@ -499,22 +489,21 @@ generate-go-conversions-core-runtime: $(CONVERSION_GEN) ## Generate conversions --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \ ./internal/runtime/test/v1alpha1 \ ./internal/runtime/test/v1alpha2 - $(MAKE) clean-generated-conversions SRC_DIRS="./$(EXP_DIR)/runtime/api/v1alpha1,./$(EXP_DIR)/runtime/api/v1beta2" + $(MAKE) clean-generated-conversions SRC_DIRS="./api/runtime/v1alpha1" $(CONVERSION_GEN) \ --output-file=zz_generated.conversion.go \ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \ - ./$(EXP_DIR)/runtime/api/v1alpha1 \ - ./$(EXP_DIR)/runtime/api/v1beta2 + ./api/runtime/v1alpha1 .PHONY: generate-go-conversions-kubeadm-bootstrap generate-go-conversions-kubeadm-bootstrap: $(CONVERSION_GEN) ## Generate conversions go code for kubeadm bootstrap - $(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/api/v1beta1,./internal/apis/bootstrap/kubeadm" + $(MAKE) clean-generated-conversions SRC_DIRS="./api/bootstrap/kubeadm/v1beta1,./internal/apis/bootstrap/kubeadm" $(CONVERSION_GEN) \ --output-file=zz_generated.conversion.go \ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \ ./internal/apis/bootstrap/kubeadm/v1alpha3 \ ./internal/apis/bootstrap/kubeadm/v1alpha4 \ - ./bootstrap/kubeadm/api/v1beta1 + ./api/bootstrap/kubeadm/v1beta1 $(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/types/upstreamv1beta1,./bootstrap/kubeadm/types/upstreamv1beta2,./bootstrap/kubeadm/types/upstreamv1beta3,./bootstrap/kubeadm/types/upstreamv1beta4" $(CONVERSION_GEN) \ --output-file=zz_generated.conversion.go \ @@ -526,13 +515,13 @@ generate-go-conversions-kubeadm-bootstrap: $(CONVERSION_GEN) ## Generate convers .PHONY: generate-go-conversions-kubeadm-control-plane generate-go-conversions-kubeadm-control-plane: $(CONVERSION_GEN) ## Generate conversions go code for kubeadm control plane - $(MAKE) clean-generated-conversions SRC_DIRS="./controlplane/kubeadm/api/v1beta1,./internal/apis/controlplane/kubeadm" + $(MAKE) clean-generated-conversions SRC_DIRS="./api/controlplane/kubeadm/v1beta1,./internal/apis/controlplane/kubeadm" $(CONVERSION_GEN) \ --output-file=zz_generated.conversion.go \ --go-header-file=./hack/boilerplate/boilerplate.generatego.txt \ ./internal/apis/controlplane/kubeadm/v1alpha3 \ ./internal/apis/controlplane/kubeadm/v1alpha4 \ - ./controlplane/kubeadm/api/v1beta1 + ./api/controlplane/kubeadm/v1beta1 .PHONY: generate-go-conversions-docker-infrastructure generate-go-conversions-docker-infrastructure: $(CONVERSION_GEN) ## Generate conversions go code for docker infrastructure provider @@ -541,8 +530,8 @@ generate-go-conversions-docker-infrastructure: $(CONVERSION_GEN) ## Generate con --go-header-file=../../../hack/boilerplate/boilerplate.generatego.txt \ ./api/v1alpha3 \ ./api/v1alpha4 \ - ./$(EXP_DIR)/api/v1alpha3 \ - ./$(EXP_DIR)/api/v1alpha4 + ./exp/api/v1alpha3 \ + ./exp/api/v1alpha4 .PHONY: generate-go-conversions-test-extension generate-go-conversions-test-extension: $(CONVERSION_GEN) ## Generate conversions go code for test runtime extension provider @@ -551,7 +540,7 @@ generate-go-conversions-test-extension: $(CONVERSION_GEN) ## Generate conversion .PHONY: generate-go-openapi generate-go-openapi: $(OPENAPI_GEN) ## Generate openapi go code for runtime SDK @mkdir -p ./tmp/sigs.k8s.io; ln -s $(ROOT_DIR) ./tmp/sigs.k8s.io/; cd ./tmp; \ - for pkg in "api/v1beta2" "api/v1beta1" "$(EXP_DIR)/runtime/hooks/api/v1alpha1"; do \ + for pkg in "api/core/v1beta2" "api/core/v1beta1" "api/runtime/hooks/v1alpha1"; do \ (cd ../ && $(MAKE) clean-generated-openapi-definitions SRC_DIRS="./$${pkg}"); \ echo "** Generating openapi schema for types in ./$${pkg} **"; \ $(OPENAPI_GEN) \ diff --git a/api/addons/v1beta1/clusterresourceset_types.go b/api/addons/v1beta1/clusterresourceset_types.go index faf6f5468656..d1c83fc7e248 100644 --- a/api/addons/v1beta1/clusterresourceset_types.go +++ b/api/addons/v1beta1/clusterresourceset_types.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // ClusterResourceSet's ResourcesApplied condition and corresponding reasons that will be used in v1Beta2 API version. diff --git a/api/addons/v1beta1/condition_consts.go b/api/addons/v1beta1/condition_consts.go index 583d463f634c..1304735c6d6e 100644 --- a/api/addons/v1beta1/condition_consts.go +++ b/api/addons/v1beta1/condition_consts.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // Conditions and condition Reasons for the ClusterResourceSet object. diff --git a/api/addons/v1beta1/conversion.go b/api/addons/v1beta1/conversion.go index 4f6bb29a67ea..6eeb285d99a8 100644 --- a/api/addons/v1beta1/conversion.go +++ b/api/addons/v1beta1/conversion.go @@ -22,7 +22,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/conversion" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) func (src *ClusterResourceSet) ConvertTo(dstRaw conversion.Hub) error { diff --git a/api/addons/v1beta1/v1beta2_condition_consts.go b/api/addons/v1beta1/v1beta2_condition_consts.go index 06020a9f6f78..b5ad1b7e5c26 100644 --- a/api/addons/v1beta1/v1beta2_condition_consts.go +++ b/api/addons/v1beta1/v1beta2_condition_consts.go @@ -16,7 +16,7 @@ limitations under the License. package v1beta1 -import clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" +import clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" // Conditions that will be used for the ClusterResourceSet object in v1Beta2 API version. const ( diff --git a/api/addons/v1beta1/zz_generated.conversion.go b/api/addons/v1beta1/zz_generated.conversion.go index eeb1cb34720c..bfe815b69f13 100644 --- a/api/addons/v1beta1/zz_generated.conversion.go +++ b/api/addons/v1beta1/zz_generated.conversion.go @@ -28,7 +28,7 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" v1beta2 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) func init() { @@ -128,8 +128,8 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*v1.Condition)(nil), (*apiv1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_Condition_To_v1beta1_Condition(a.(*v1.Condition), b.(*apiv1beta1.Condition), scope) + if err := s.AddConversionFunc((*v1.Condition)(nil), (*corev1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Condition_To_v1beta1_Condition(a.(*v1.Condition), b.(*corev1beta1.Condition), scope) }); err != nil { return err } @@ -138,8 +138,8 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*apiv1beta1.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Condition_To_v1_Condition(a.(*apiv1beta1.Condition), b.(*v1.Condition), scope) + if err := s.AddConversionFunc((*corev1beta1.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Condition_To_v1_Condition(a.(*corev1beta1.Condition), b.(*v1.Condition), scope) }); err != nil { return err } @@ -339,7 +339,7 @@ func autoConvert_v1beta1_ClusterResourceSetStatus_To_v1beta2_ClusterResourceSetS func autoConvert_v1beta2_ClusterResourceSetStatus_To_v1beta1_ClusterResourceSetStatus(in *v1beta2.ClusterResourceSetStatus, out *ClusterResourceSetStatus, s conversion.Scope) error { if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(corev1beta1.Conditions, len(*in)) for i := range *in { if err := Convert_v1_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err diff --git a/api/addons/v1beta1/zz_generated.deepcopy.go b/api/addons/v1beta1/zz_generated.deepcopy.go index f7afd3968ebc..036245e51e8e 100644 --- a/api/addons/v1beta1/zz_generated.deepcopy.go +++ b/api/addons/v1beta1/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1beta1 import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -195,7 +195,7 @@ func (in *ClusterResourceSetStatus) DeepCopyInto(out *ClusterResourceSetStatus) *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(corev1beta1.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/api/addons/v1beta2/clusterresourceset_types.go b/api/addons/v1beta2/clusterresourceset_types.go index 3d10dd3c2882..e097595c0458 100644 --- a/api/addons/v1beta2/clusterresourceset_types.go +++ b/api/addons/v1beta2/clusterresourceset_types.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // ClusterResourceSet's ResourcesApplied condition and corresponding reasons. diff --git a/api/addons/v1beta2/v1beta1_condition_consts.go b/api/addons/v1beta2/v1beta1_condition_consts.go index 2b7ee37037cc..efba2a7fdd41 100644 --- a/api/addons/v1beta2/v1beta1_condition_consts.go +++ b/api/addons/v1beta2/v1beta1_condition_consts.go @@ -16,7 +16,7 @@ limitations under the License. package v1beta2 -import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" +import clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" // Conditions and condition Reasons for the ClusterResourceSet object. const ( diff --git a/api/addons/v1beta2/zz_generated.deepcopy.go b/api/addons/v1beta2/zz_generated.deepcopy.go index b54338b174a3..97b15bb1e6c7 100644 --- a/api/addons/v1beta2/zz_generated.deepcopy.go +++ b/api/addons/v1beta2/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1beta2 import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - apiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -242,7 +242,7 @@ func (in *ClusterResourceSetV1Beta1DeprecatedStatus) DeepCopyInto(out *ClusterRe *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta2.Conditions, len(*in)) + *out = make(corev1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/api/.import-restrictions b/api/bootstrap/kubeadm/.import-restrictions similarity index 100% rename from api/.import-restrictions rename to api/bootstrap/kubeadm/.import-restrictions diff --git a/bootstrap/kubeadm/api/v1beta1/condition_consts.go b/api/bootstrap/kubeadm/v1beta1/condition_consts.go similarity index 98% rename from bootstrap/kubeadm/api/v1beta1/condition_consts.go rename to api/bootstrap/kubeadm/v1beta1/condition_consts.go index c7a0b7fa7550..e024d009c28d 100644 --- a/bootstrap/kubeadm/api/v1beta1/condition_consts.go +++ b/api/bootstrap/kubeadm/v1beta1/condition_consts.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // Conditions and condition Reasons for the KubeadmConfig object. diff --git a/bootstrap/kubeadm/api/v1beta1/conversion.go b/api/bootstrap/kubeadm/v1beta1/conversion.go similarity index 97% rename from bootstrap/kubeadm/api/v1beta1/conversion.go rename to api/bootstrap/kubeadm/v1beta1/conversion.go index 6d090edbbe92..390c0070b258 100644 --- a/bootstrap/kubeadm/api/v1beta1/conversion.go +++ b/api/bootstrap/kubeadm/v1beta1/conversion.go @@ -21,9 +21,9 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func (src *KubeadmConfig) ConvertTo(dstRaw conversion.Hub) error { diff --git a/bootstrap/kubeadm/api/v1beta1/conversion_test.go b/api/bootstrap/kubeadm/v1beta1/conversion_test.go similarity index 97% rename from bootstrap/kubeadm/api/v1beta1/conversion_test.go rename to api/bootstrap/kubeadm/v1beta1/conversion_test.go index 5a619bd6ad06..99fb911bc60e 100644 --- a/bootstrap/kubeadm/api/v1beta1/conversion_test.go +++ b/api/bootstrap/kubeadm/v1beta1/conversion_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/bootstrap/kubeadm/api/v1beta1/doc.go b/api/bootstrap/kubeadm/v1beta1/doc.go similarity index 91% rename from bootstrap/kubeadm/api/v1beta1/doc.go rename to api/bootstrap/kubeadm/v1beta1/doc.go index 0907f017b730..58bfea72fcce 100644 --- a/bootstrap/kubeadm/api/v1beta1/doc.go +++ b/api/bootstrap/kubeadm/v1beta1/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1beta1 contains API Schema definitions for the kubeadm v1beta1 API group. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2 // +kubebuilder:object:generate=true // +groupName=bootstrap.cluster.x-k8s.io // diff --git a/bootstrap/kubeadm/api/v1beta1/groupversion_info.go b/api/bootstrap/kubeadm/v1beta1/groupversion_info.go similarity index 100% rename from bootstrap/kubeadm/api/v1beta1/groupversion_info.go rename to api/bootstrap/kubeadm/v1beta1/groupversion_info.go diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types.go b/api/bootstrap/kubeadm/v1beta1/kubeadm_types.go similarity index 100% rename from bootstrap/kubeadm/api/v1beta1/kubeadm_types.go rename to api/bootstrap/kubeadm/v1beta1/kubeadm_types.go diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadm_types_test.go b/api/bootstrap/kubeadm/v1beta1/kubeadm_types_test.go similarity index 100% rename from bootstrap/kubeadm/api/v1beta1/kubeadm_types_test.go rename to api/bootstrap/kubeadm/v1beta1/kubeadm_types_test.go diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go b/api/bootstrap/kubeadm/v1beta1/kubeadmconfig_types.go similarity index 99% rename from bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go rename to api/bootstrap/kubeadm/v1beta1/kubeadmconfig_types.go index 922ad804752e..98a582479b42 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go +++ b/api/bootstrap/kubeadm/v1beta1/kubeadmconfig_types.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/validation/field" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/feature" ) diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go b/api/bootstrap/kubeadm/v1beta1/kubeadmconfigtemplate_types.go similarity index 97% rename from bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go rename to api/bootstrap/kubeadm/v1beta1/kubeadmconfigtemplate_types.go index ca8cffc265e0..d881f59ac67f 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go +++ b/api/bootstrap/kubeadm/v1beta1/kubeadmconfigtemplate_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // KubeadmConfigTemplateSpec defines the desired state of KubeadmConfigTemplate. diff --git a/bootstrap/kubeadm/api/v1beta1/v1beta2_condition_consts.go b/api/bootstrap/kubeadm/v1beta1/v1beta2_condition_consts.go similarity index 98% rename from bootstrap/kubeadm/api/v1beta1/v1beta2_condition_consts.go rename to api/bootstrap/kubeadm/v1beta1/v1beta2_condition_consts.go index 8b6d4a73d303..58e121519e55 100644 --- a/bootstrap/kubeadm/api/v1beta1/v1beta2_condition_consts.go +++ b/api/bootstrap/kubeadm/v1beta1/v1beta2_condition_consts.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // KubeadmConfig's Ready condition and corresponding reasons that will be used in v1Beta2 API version. diff --git a/bootstrap/kubeadm/api/v1beta1/zz_generated.conversion.go b/api/bootstrap/kubeadm/v1beta1/zz_generated.conversion.go similarity index 98% rename from bootstrap/kubeadm/api/v1beta1/zz_generated.conversion.go rename to api/bootstrap/kubeadm/v1beta1/zz_generated.conversion.go index ea0c4588a8c0..5d4a74cfbca7 100644 --- a/bootstrap/kubeadm/api/v1beta1/zz_generated.conversion.go +++ b/api/bootstrap/kubeadm/v1beta1/zz_generated.conversion.go @@ -28,9 +28,9 @@ import ( 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" - apiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" - v1beta2 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func init() { @@ -515,13 +515,13 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*v1.Condition)(nil), (*apiv1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_Condition_To_v1beta1_Condition(a.(*v1.Condition), b.(*apiv1beta1.Condition), scope) + if err := s.AddConversionFunc((*v1.Condition)(nil), (*corev1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Condition_To_v1beta1_Condition(a.(*v1.Condition), b.(*corev1beta1.Condition), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*apiv1beta1.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Condition_To_v1_Condition(a.(*apiv1beta1.Condition), b.(*v1.Condition), scope) + if err := s.AddConversionFunc((*corev1beta1.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Condition_To_v1_Condition(a.(*corev1beta1.Condition), b.(*v1.Condition), scope) }); err != nil { return err } @@ -535,8 +535,8 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*apiv1beta1.ObjectMeta)(nil), (*apiv1beta2.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ObjectMeta_To_v1beta2_ObjectMeta(a.(*apiv1beta1.ObjectMeta), b.(*apiv1beta2.ObjectMeta), scope) + if err := s.AddConversionFunc((*corev1beta1.ObjectMeta)(nil), (*corev1beta2.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ObjectMeta_To_v1beta2_ObjectMeta(a.(*corev1beta1.ObjectMeta), b.(*corev1beta2.ObjectMeta), scope) }); err != nil { return err } @@ -545,8 +545,8 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*apiv1beta2.ObjectMeta)(nil), (*apiv1beta1.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_ObjectMeta_To_v1beta1_ObjectMeta(a.(*apiv1beta2.ObjectMeta), b.(*apiv1beta1.ObjectMeta), scope) + if err := s.AddConversionFunc((*corev1beta2.ObjectMeta)(nil), (*corev1beta1.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ObjectMeta_To_v1beta1_ObjectMeta(a.(*corev1beta2.ObjectMeta), b.(*corev1beta1.ObjectMeta), scope) }); err != nil { return err } @@ -1519,7 +1519,7 @@ func autoConvert_v1beta1_KubeadmConfigStatus_To_v1beta2_KubeadmConfigStatus(in * func autoConvert_v1beta2_KubeadmConfigStatus_To_v1beta1_KubeadmConfigStatus(in *v1beta2.KubeadmConfigStatus, out *KubeadmConfigStatus, s conversion.Scope) error { if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(corev1beta1.Conditions, len(*in)) for i := range *in { if err := Convert_v1_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err diff --git a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go b/api/bootstrap/kubeadm/v1beta1/zz_generated.deepcopy.go similarity index 99% rename from bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go rename to api/bootstrap/kubeadm/v1beta1/zz_generated.deepcopy.go index e1bdbac23f9e..0bb852981884 100644 --- a/bootstrap/kubeadm/api/v1beta1/zz_generated.deepcopy.go +++ b/api/bootstrap/kubeadm/v1beta1/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" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -923,7 +923,7 @@ func (in *KubeadmConfigStatus) DeepCopyInto(out *KubeadmConfigStatus) { } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(corev1beta1.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/api/v1beta2/.import-restrictions b/api/bootstrap/kubeadm/v1beta2/.import-restrictions similarity index 100% rename from api/v1beta2/.import-restrictions rename to api/bootstrap/kubeadm/v1beta2/.import-restrictions diff --git a/bootstrap/kubeadm/api/v1beta2/conversion.go b/api/bootstrap/kubeadm/v1beta2/conversion.go similarity index 100% rename from bootstrap/kubeadm/api/v1beta2/conversion.go rename to api/bootstrap/kubeadm/v1beta2/conversion.go diff --git a/bootstrap/kubeadm/api/v1beta2/doc.go b/api/bootstrap/kubeadm/v1beta2/doc.go similarity index 100% rename from bootstrap/kubeadm/api/v1beta2/doc.go rename to api/bootstrap/kubeadm/v1beta2/doc.go diff --git a/bootstrap/kubeadm/api/v1beta2/groupversion_info.go b/api/bootstrap/kubeadm/v1beta2/groupversion_info.go similarity index 100% rename from bootstrap/kubeadm/api/v1beta2/groupversion_info.go rename to api/bootstrap/kubeadm/v1beta2/groupversion_info.go diff --git a/bootstrap/kubeadm/api/v1beta2/kubeadm_types.go b/api/bootstrap/kubeadm/v1beta2/kubeadm_types.go similarity index 99% rename from bootstrap/kubeadm/api/v1beta2/kubeadm_types.go rename to api/bootstrap/kubeadm/v1beta2/kubeadm_types.go index d5d217b01665..7f487f62c841 100644 --- a/bootstrap/kubeadm/api/v1beta2/kubeadm_types.go +++ b/api/bootstrap/kubeadm/v1beta2/kubeadm_types.go @@ -27,7 +27,7 @@ import ( bootstrapapi "k8s.io/cluster-bootstrap/token/api" bootstraputil "k8s.io/cluster-bootstrap/token/util" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // KubeadmConfig's Ready condition and corresponding reasons. diff --git a/bootstrap/kubeadm/api/v1beta2/kubeadm_types_test.go b/api/bootstrap/kubeadm/v1beta2/kubeadm_types_test.go similarity index 100% rename from bootstrap/kubeadm/api/v1beta2/kubeadm_types_test.go rename to api/bootstrap/kubeadm/v1beta2/kubeadm_types_test.go diff --git a/bootstrap/kubeadm/api/v1beta2/kubeadmconfig_types.go b/api/bootstrap/kubeadm/v1beta2/kubeadmconfig_types.go similarity index 99% rename from bootstrap/kubeadm/api/v1beta2/kubeadmconfig_types.go rename to api/bootstrap/kubeadm/v1beta2/kubeadmconfig_types.go index 9e8947334644..b85ebb5314ad 100644 --- a/bootstrap/kubeadm/api/v1beta2/kubeadmconfig_types.go +++ b/api/bootstrap/kubeadm/v1beta2/kubeadmconfig_types.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/validation/field" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" ) diff --git a/bootstrap/kubeadm/api/v1beta2/kubeadmconfigtemplate_types.go b/api/bootstrap/kubeadm/v1beta2/kubeadmconfigtemplate_types.go similarity index 98% rename from bootstrap/kubeadm/api/v1beta2/kubeadmconfigtemplate_types.go rename to api/bootstrap/kubeadm/v1beta2/kubeadmconfigtemplate_types.go index 7f02a833da06..4b1a17489115 100644 --- a/bootstrap/kubeadm/api/v1beta2/kubeadmconfigtemplate_types.go +++ b/api/bootstrap/kubeadm/v1beta2/kubeadmconfigtemplate_types.go @@ -19,7 +19,7 @@ package v1beta2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // KubeadmConfigTemplateSpec defines the desired state of KubeadmConfigTemplate. diff --git a/bootstrap/kubeadm/api/v1beta2/v1beta1_condition_consts.go b/api/bootstrap/kubeadm/v1beta2/v1beta1_condition_consts.go similarity index 98% rename from bootstrap/kubeadm/api/v1beta2/v1beta1_condition_consts.go rename to api/bootstrap/kubeadm/v1beta2/v1beta1_condition_consts.go index ad3b0096acdb..7ccc263e927c 100644 --- a/bootstrap/kubeadm/api/v1beta2/v1beta1_condition_consts.go +++ b/api/bootstrap/kubeadm/v1beta2/v1beta1_condition_consts.go @@ -16,7 +16,7 @@ limitations under the License. package v1beta2 -import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" +import clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" // Conditions and condition Reasons for the KubeadmConfig object. diff --git a/bootstrap/kubeadm/api/v1beta2/zz_generated.deepcopy.go b/api/bootstrap/kubeadm/v1beta2/zz_generated.deepcopy.go similarity index 99% rename from bootstrap/kubeadm/api/v1beta2/zz_generated.deepcopy.go rename to api/bootstrap/kubeadm/v1beta2/zz_generated.deepcopy.go index fccd4ada1e03..2a212b30a978 100644 --- a/bootstrap/kubeadm/api/v1beta2/zz_generated.deepcopy.go +++ b/api/bootstrap/kubeadm/v1beta2/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" - apiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -1081,7 +1081,7 @@ func (in *KubeadmConfigV1Beta1DeprecatedStatus) DeepCopyInto(out *KubeadmConfigV *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta2.Conditions, len(*in)) + *out = make(corev1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/bootstrap/kubeadm/api/.import-restrictions b/api/controlplane/kubeadm/.import-restrictions similarity index 100% rename from bootstrap/kubeadm/api/.import-restrictions rename to api/controlplane/kubeadm/.import-restrictions diff --git a/controlplane/kubeadm/api/v1beta1/condition_consts.go b/api/controlplane/kubeadm/v1beta1/condition_consts.go similarity index 99% rename from controlplane/kubeadm/api/v1beta1/condition_consts.go rename to api/controlplane/kubeadm/v1beta1/condition_consts.go index bbc12c3d5a7e..c460c3a80fff 100644 --- a/controlplane/kubeadm/api/v1beta1/condition_consts.go +++ b/api/controlplane/kubeadm/v1beta1/condition_consts.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // Conditions and condition Reasons for the KubeadmControlPlane object. diff --git a/controlplane/kubeadm/api/v1beta1/conversion.go b/api/controlplane/kubeadm/v1beta1/conversion.go similarity index 95% rename from controlplane/kubeadm/api/v1beta1/conversion.go rename to api/controlplane/kubeadm/v1beta1/conversion.go index 2df904caf792..b2356cab246a 100644 --- a/controlplane/kubeadm/api/v1beta1/conversion.go +++ b/api/controlplane/kubeadm/v1beta1/conversion.go @@ -21,11 +21,11 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1beta1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func (src *KubeadmControlPlane) ConvertTo(dstRaw conversion.Hub) error { diff --git a/controlplane/kubeadm/api/v1beta1/conversion_test.go b/api/controlplane/kubeadm/v1beta1/conversion_test.go similarity index 96% rename from controlplane/kubeadm/api/v1beta1/conversion_test.go rename to api/controlplane/kubeadm/v1beta1/conversion_test.go index 97e8ce6e9e38..0b5fc8de4b3f 100644 --- a/controlplane/kubeadm/api/v1beta1/conversion_test.go +++ b/api/controlplane/kubeadm/v1beta1/conversion_test.go @@ -27,8 +27,8 @@ import ( runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/utils/ptr" - bootstrapv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1beta1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/controlplane/kubeadm/api/v1beta1/doc.go b/api/controlplane/kubeadm/v1beta1/doc.go similarity index 91% rename from controlplane/kubeadm/api/v1beta1/doc.go rename to api/controlplane/kubeadm/v1beta1/doc.go index c96e1819dbc7..558f8888944e 100644 --- a/controlplane/kubeadm/api/v1beta1/doc.go +++ b/api/controlplane/kubeadm/v1beta1/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1beta1 contains API Schema definitions for the kubeadm v1beta1 API group, -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2 // +kubebuilder:object:generate=true // +groupName=controlplane.cluster.x-k8s.io // diff --git a/controlplane/kubeadm/api/v1beta1/groupversion_info.go b/api/controlplane/kubeadm/v1beta1/groupversion_info.go similarity index 100% rename from controlplane/kubeadm/api/v1beta1/groupversion_info.go rename to api/controlplane/kubeadm/v1beta1/groupversion_info.go diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go b/api/controlplane/kubeadm/v1beta1/kubeadm_control_plane_types.go similarity index 99% rename from controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go rename to api/controlplane/kubeadm/v1beta1/kubeadm_control_plane_types.go index 887dede76ef1..b8dd22f194b3 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go +++ b/api/controlplane/kubeadm/v1beta1/kubeadm_control_plane_types.go @@ -23,8 +23,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - bootstrapv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + bootstrapv1beta1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/errors" ) diff --git a/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go b/api/controlplane/kubeadm/v1beta1/kubeadmcontrolplanetemplate_types.go similarity index 98% rename from controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go rename to api/controlplane/kubeadm/v1beta1/kubeadmcontrolplanetemplate_types.go index b0098aa4c90d..81ddd06e4ea1 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadmcontrolplanetemplate_types.go +++ b/api/controlplane/kubeadm/v1beta1/kubeadmcontrolplanetemplate_types.go @@ -19,8 +19,8 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - bootstrapv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" + bootstrapv1beta1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // KubeadmControlPlaneTemplateSpec defines the desired state of KubeadmControlPlaneTemplate. diff --git a/controlplane/kubeadm/api/v1beta1/v1beta2_condition_consts.go b/api/controlplane/kubeadm/v1beta1/v1beta2_condition_consts.go similarity index 99% rename from controlplane/kubeadm/api/v1beta1/v1beta2_condition_consts.go rename to api/controlplane/kubeadm/v1beta1/v1beta2_condition_consts.go index 9956eab4f713..3e5ef18916ef 100644 --- a/controlplane/kubeadm/api/v1beta1/v1beta2_condition_consts.go +++ b/api/controlplane/kubeadm/v1beta1/v1beta2_condition_consts.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // KubeadmControlPlane's Available condition and corresponding reasons that will be used in v1Beta2 API version. diff --git a/controlplane/kubeadm/api/v1beta1/zz_generated.conversion.go b/api/controlplane/kubeadm/v1beta1/zz_generated.conversion.go similarity index 95% rename from controlplane/kubeadm/api/v1beta1/zz_generated.conversion.go rename to api/controlplane/kubeadm/v1beta1/zz_generated.conversion.go index 19478599f3eb..272a6cbd53d4 100644 --- a/controlplane/kubeadm/api/v1beta1/zz_generated.conversion.go +++ b/api/controlplane/kubeadm/v1beta1/zz_generated.conversion.go @@ -28,11 +28,11 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterapiapiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" - kubeadmapiv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" - apiv1beta2 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - v1beta2 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + kubeadmv1beta1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1" + kubeadmv1beta2 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func init() { @@ -202,18 +202,18 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*v1.Condition)(nil), (*apiv1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_Condition_To_v1beta1_Condition(a.(*v1.Condition), b.(*apiv1beta1.Condition), scope) + if err := s.AddConversionFunc((*v1.Condition)(nil), (*corev1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Condition_To_v1beta1_Condition(a.(*v1.Condition), b.(*corev1beta1.Condition), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*apiv1beta1.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Condition_To_v1_Condition(a.(*apiv1beta1.Condition), b.(*v1.Condition), scope) + if err := s.AddConversionFunc((*corev1beta1.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Condition_To_v1_Condition(a.(*corev1beta1.Condition), b.(*v1.Condition), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*kubeadmapiv1beta1.KubeadmConfigSpec)(nil), (*apiv1beta2.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_KubeadmConfigSpec_To_v1beta2_KubeadmConfigSpec(a.(*kubeadmapiv1beta1.KubeadmConfigSpec), b.(*apiv1beta2.KubeadmConfigSpec), scope) + if err := s.AddConversionFunc((*kubeadmv1beta1.KubeadmConfigSpec)(nil), (*kubeadmv1beta2.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeadmConfigSpec_To_v1beta2_KubeadmConfigSpec(a.(*kubeadmv1beta1.KubeadmConfigSpec), b.(*kubeadmv1beta2.KubeadmConfigSpec), scope) }); err != nil { return err } @@ -222,13 +222,13 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*apiv1beta1.ObjectMeta)(nil), (*clusterapiapiv1beta2.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ObjectMeta_To_v1beta2_ObjectMeta(a.(*apiv1beta1.ObjectMeta), b.(*clusterapiapiv1beta2.ObjectMeta), scope) + if err := s.AddConversionFunc((*corev1beta1.ObjectMeta)(nil), (*corev1beta2.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ObjectMeta_To_v1beta2_ObjectMeta(a.(*corev1beta1.ObjectMeta), b.(*corev1beta2.ObjectMeta), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*apiv1beta2.KubeadmConfigSpec)(nil), (*kubeadmapiv1beta1.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(a.(*apiv1beta2.KubeadmConfigSpec), b.(*kubeadmapiv1beta1.KubeadmConfigSpec), scope) + if err := s.AddConversionFunc((*kubeadmv1beta2.KubeadmConfigSpec)(nil), (*kubeadmv1beta1.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_KubeadmConfigSpec_To_v1beta1_KubeadmConfigSpec(a.(*kubeadmv1beta2.KubeadmConfigSpec), b.(*kubeadmv1beta1.KubeadmConfigSpec), scope) }); err != nil { return err } @@ -237,8 +237,8 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*clusterapiapiv1beta2.ObjectMeta)(nil), (*apiv1beta1.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_ObjectMeta_To_v1beta1_ObjectMeta(a.(*clusterapiapiv1beta2.ObjectMeta), b.(*apiv1beta1.ObjectMeta), scope) + if err := s.AddConversionFunc((*corev1beta2.ObjectMeta)(nil), (*corev1beta1.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ObjectMeta_To_v1beta1_ObjectMeta(a.(*corev1beta2.ObjectMeta), b.(*corev1beta1.ObjectMeta), scope) }); err != nil { return err } @@ -324,7 +324,7 @@ func autoConvert_v1beta1_KubeadmControlPlaneMachineTemplate_To_v1beta2_KubeadmCo return err } out.InfrastructureRef = in.InfrastructureRef - out.ReadinessGates = *(*[]clusterapiapiv1beta2.MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates)) + out.ReadinessGates = *(*[]corev1beta2.MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates)) out.NodeDrainTimeout = (*v1.Duration)(unsafe.Pointer(in.NodeDrainTimeout)) out.NodeVolumeDetachTimeout = (*v1.Duration)(unsafe.Pointer(in.NodeVolumeDetachTimeout)) out.NodeDeletionTimeout = (*v1.Duration)(unsafe.Pointer(in.NodeDeletionTimeout)) @@ -341,7 +341,7 @@ func autoConvert_v1beta2_KubeadmControlPlaneMachineTemplate_To_v1beta1_KubeadmCo return err } out.InfrastructureRef = in.InfrastructureRef - out.ReadinessGates = *(*[]apiv1beta1.MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates)) + out.ReadinessGates = *(*[]corev1beta1.MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates)) out.NodeDrainTimeout = (*v1.Duration)(unsafe.Pointer(in.NodeDrainTimeout)) out.NodeVolumeDetachTimeout = (*v1.Duration)(unsafe.Pointer(in.NodeVolumeDetachTimeout)) out.NodeDeletionTimeout = (*v1.Duration)(unsafe.Pointer(in.NodeDeletionTimeout)) @@ -432,7 +432,7 @@ func autoConvert_v1beta1_KubeadmControlPlaneStatus_To_v1beta2_KubeadmControlPlan func autoConvert_v1beta2_KubeadmControlPlaneStatus_To_v1beta1_KubeadmControlPlaneStatus(in *v1beta2.KubeadmControlPlaneStatus, out *KubeadmControlPlaneStatus, s conversion.Scope) error { if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(corev1beta1.Conditions, len(*in)) for i := range *in { if err := Convert_v1_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err diff --git a/controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go b/api/controlplane/kubeadm/v1beta1/zz_generated.deepcopy.go similarity index 99% rename from controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go rename to api/controlplane/kubeadm/v1beta1/zz_generated.deepcopy.go index b6d41c20e602..25c37f0417d5 100644 --- a/controlplane/kubeadm/api/v1beta1/zz_generated.deepcopy.go +++ b/api/controlplane/kubeadm/v1beta1/zz_generated.deepcopy.go @@ -24,7 +24,7 @@ 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" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -93,7 +93,7 @@ func (in *KubeadmControlPlaneMachineTemplate) DeepCopyInto(out *KubeadmControlPl out.InfrastructureRef = in.InfrastructureRef if in.ReadinessGates != nil { in, out := &in.ReadinessGates, &out.ReadinessGates - *out = make([]apiv1beta1.MachineReadinessGate, len(*in)) + *out = make([]corev1beta1.MachineReadinessGate, len(*in)) copy(*out, *in) } if in.NodeDrainTimeout != nil { @@ -184,7 +184,7 @@ func (in *KubeadmControlPlaneStatus) DeepCopyInto(out *KubeadmControlPlaneStatus } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(corev1beta1.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/bootstrap/kubeadm/api/v1beta2/.import-restrictions b/api/controlplane/kubeadm/v1beta2/.import-restrictions similarity index 100% rename from bootstrap/kubeadm/api/v1beta2/.import-restrictions rename to api/controlplane/kubeadm/v1beta2/.import-restrictions diff --git a/controlplane/kubeadm/api/v1beta2/conversion.go b/api/controlplane/kubeadm/v1beta2/conversion.go similarity index 100% rename from controlplane/kubeadm/api/v1beta2/conversion.go rename to api/controlplane/kubeadm/v1beta2/conversion.go diff --git a/controlplane/kubeadm/api/v1beta2/doc.go b/api/controlplane/kubeadm/v1beta2/doc.go similarity index 100% rename from controlplane/kubeadm/api/v1beta2/doc.go rename to api/controlplane/kubeadm/v1beta2/doc.go diff --git a/controlplane/kubeadm/api/v1beta2/groupversion_info.go b/api/controlplane/kubeadm/v1beta2/groupversion_info.go similarity index 100% rename from controlplane/kubeadm/api/v1beta2/groupversion_info.go rename to api/controlplane/kubeadm/v1beta2/groupversion_info.go diff --git a/controlplane/kubeadm/api/v1beta2/kubeadm_control_plane_types.go b/api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go similarity index 99% rename from controlplane/kubeadm/api/v1beta2/kubeadm_control_plane_types.go rename to api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go index e171442b26ac..ff826c8bda02 100644 --- a/controlplane/kubeadm/api/v1beta2/kubeadm_control_plane_types.go +++ b/api/controlplane/kubeadm/v1beta2/kubeadm_control_plane_types.go @@ -23,8 +23,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/errors" ) diff --git a/controlplane/kubeadm/api/v1beta2/kubeadmcontrolplanetemplate_types.go b/api/controlplane/kubeadm/v1beta2/kubeadmcontrolplanetemplate_types.go similarity index 97% rename from controlplane/kubeadm/api/v1beta2/kubeadmcontrolplanetemplate_types.go rename to api/controlplane/kubeadm/v1beta2/kubeadmcontrolplanetemplate_types.go index 23b05ce648f6..e549f1615e00 100644 --- a/controlplane/kubeadm/api/v1beta2/kubeadmcontrolplanetemplate_types.go +++ b/api/controlplane/kubeadm/v1beta2/kubeadmcontrolplanetemplate_types.go @@ -19,8 +19,8 @@ package v1beta2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // KubeadmControlPlaneTemplateSpec defines the desired state of KubeadmControlPlaneTemplate. @@ -36,6 +36,7 @@ type KubeadmControlPlaneTemplateSpec struct { // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmControlPlaneTemplate" // KubeadmControlPlaneTemplate is the Schema for the kubeadmcontrolplanetemplates API. +// NOTE: This CRD can only be used if the ClusterTopology feature gate is enabled. type KubeadmControlPlaneTemplate struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. diff --git a/controlplane/kubeadm/api/v1beta2/v1beta1_condition_consts.go b/api/controlplane/kubeadm/v1beta2/v1beta1_condition_consts.go similarity index 99% rename from controlplane/kubeadm/api/v1beta2/v1beta1_condition_consts.go rename to api/controlplane/kubeadm/v1beta2/v1beta1_condition_consts.go index 19bbe5315fcf..df8317ca5560 100644 --- a/controlplane/kubeadm/api/v1beta2/v1beta1_condition_consts.go +++ b/api/controlplane/kubeadm/v1beta2/v1beta1_condition_consts.go @@ -16,7 +16,7 @@ limitations under the License. package v1beta2 -import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" +import clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" // Conditions and condition Reasons for the KubeadmControlPlane object. diff --git a/controlplane/kubeadm/api/v1beta2/zz_generated.deepcopy.go b/api/controlplane/kubeadm/v1beta2/zz_generated.deepcopy.go similarity index 99% rename from controlplane/kubeadm/api/v1beta2/zz_generated.deepcopy.go rename to api/controlplane/kubeadm/v1beta2/zz_generated.deepcopy.go index 6f0f3c452ef7..04565651443e 100644 --- a/controlplane/kubeadm/api/v1beta2/zz_generated.deepcopy.go +++ b/api/controlplane/kubeadm/v1beta2/zz_generated.deepcopy.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" - apiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -128,7 +128,7 @@ func (in *KubeadmControlPlaneMachineTemplate) DeepCopyInto(out *KubeadmControlPl out.InfrastructureRef = in.InfrastructureRef if in.ReadinessGates != nil { in, out := &in.ReadinessGates, &out.ReadinessGates - *out = make([]apiv1beta2.MachineReadinessGate, len(*in)) + *out = make([]corev1beta2.MachineReadinessGate, len(*in)) copy(*out, *in) } if in.NodeDrainTimeout != nil { @@ -438,7 +438,7 @@ func (in *KubeadmControlPlaneV1Beta1DeprecatedStatus) DeepCopyInto(out *KubeadmC *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta2.Conditions, len(*in)) + *out = make(corev1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/controlplane/kubeadm/api/.import-restrictions b/api/core/.import-restrictions similarity index 100% rename from controlplane/kubeadm/api/.import-restrictions rename to api/core/.import-restrictions diff --git a/api/v1beta1/cluster_phase_types.go b/api/core/v1beta1/cluster_phase_types.go similarity index 100% rename from api/v1beta1/cluster_phase_types.go rename to api/core/v1beta1/cluster_phase_types.go diff --git a/api/v1beta1/cluster_types.go b/api/core/v1beta1/cluster_types.go similarity index 100% rename from api/v1beta1/cluster_types.go rename to api/core/v1beta1/cluster_types.go diff --git a/api/v1beta1/cluster_types_test.go b/api/core/v1beta1/cluster_types_test.go similarity index 100% rename from api/v1beta1/cluster_types_test.go rename to api/core/v1beta1/cluster_types_test.go diff --git a/api/v1beta1/clusterclass_types.go b/api/core/v1beta1/clusterclass_types.go similarity index 99% rename from api/v1beta1/clusterclass_types.go rename to api/core/v1beta1/clusterclass_types.go index f324119356f6..6957df542031 100644 --- a/api/v1beta1/clusterclass_types.go +++ b/api/core/v1beta1/clusterclass_types.go @@ -889,7 +889,7 @@ type ValidationRule struct { // +optional // +kubebuilder:validation:Enum=FieldValueInvalid;FieldValueForbidden;FieldValueRequired;FieldValueDuplicate // +kubebuilder:default=FieldValueInvalid - // +default=ref(sigs.k8s.io/cluster-api/api/v1beta1.FieldValueInvalid) + // +default=ref(sigs.k8s.io/cluster-api/api/core/v1beta1.FieldValueInvalid) Reason FieldValueErrorReason `json:"reason,omitempty"` // fieldPath represents the field path returned when the validation fails. // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. diff --git a/api/v1beta1/common_types.go b/api/core/v1beta1/common_types.go similarity index 100% rename from api/v1beta1/common_types.go rename to api/core/v1beta1/common_types.go diff --git a/api/v1beta1/condition_consts.go b/api/core/v1beta1/condition_consts.go similarity index 97% rename from api/v1beta1/condition_consts.go rename to api/core/v1beta1/condition_consts.go index b2797402e8e6..49fa972148ca 100644 --- a/api/v1beta1/condition_consts.go +++ b/api/core/v1beta1/condition_consts.go @@ -358,3 +358,14 @@ const ( // if the references are up-to-date. ClusterClassRefVersionsUpToDateInternalErrorReason = "InternalError" ) + +// Conditions and condition Reasons for the MachinePool object. + +const ( + // ReplicasReadyCondition reports an aggregate of current status of the replicas controlled by the MachinePool. + ReplicasReadyCondition ConditionType = "ReplicasReady" + + // WaitingForReplicasReadyReason (Severity=Info) documents a machinepool waiting for the required replicas + // to be ready. + WaitingForReplicasReadyReason = "WaitingForReplicasReady" +) diff --git a/api/v1beta1/condition_types.go b/api/core/v1beta1/condition_types.go similarity index 100% rename from api/v1beta1/condition_types.go rename to api/core/v1beta1/condition_types.go diff --git a/api/v1beta1/conversion.go b/api/core/v1beta1/conversion.go similarity index 85% rename from api/v1beta1/conversion.go rename to api/core/v1beta1/conversion.go index d9f4a3338d80..4a209f4f959e 100644 --- a/api/v1beta1/conversion.go +++ b/api/core/v1beta1/conversion.go @@ -24,7 +24,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) @@ -143,6 +143,30 @@ func (dst *MachineHealthCheck) ConvertFrom(srcRaw conversion.Hub) error { return Convert_v1beta2_MachineHealthCheck_To_v1beta1_MachineHealthCheck(src, dst, nil) } +func (src *MachinePool) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*clusterv1.MachinePool) + + if err := Convert_v1beta1_MachinePool_To_v1beta2_MachinePool(src, dst, nil); err != nil { + return err + } + + dst.Spec.Template.Spec.MinReadySeconds = src.Spec.MinReadySeconds + + return nil +} + +func (dst *MachinePool) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*clusterv1.MachinePool) + + if err := Convert_v1beta2_MachinePool_To_v1beta1_MachinePool(src, dst, nil); err != nil { + return err + } + + dst.Spec.MinReadySeconds = src.Spec.Template.Spec.MinReadySeconds + + return nil +} + func Convert_v1beta2_ClusterClassSpec_To_v1beta1_ClusterClassSpec(in *clusterv1.ClusterClassSpec, out *ClusterClassSpec, s apimachineryconversion.Scope) error { if err := autoConvert_v1beta2_ClusterClassSpec_To_v1beta1_ClusterClassSpec(in, out, s); err != nil { return err @@ -763,3 +787,100 @@ func Convert_v1beta1_MachineSetSpec_To_v1beta2_MachineSetSpec(in *MachineSetSpec func Convert_v1beta2_MachineSpec_To_v1beta1_MachineSpec(in *clusterv1.MachineSpec, out *MachineSpec, s apimachineryconversion.Scope) error { return autoConvert_v1beta2_MachineSpec_To_v1beta1_MachineSpec(in, out, s) } + +func Convert_v1beta2_MachinePoolStatus_To_v1beta1_MachinePoolStatus(in *clusterv1.MachinePoolStatus, out *MachinePoolStatus, s apimachineryconversion.Scope) error { + if err := autoConvert_v1beta2_MachinePoolStatus_To_v1beta1_MachinePoolStatus(in, out, s); err != nil { + return err + } + + // Reset conditions from autogenerated conversions + // NOTE: v1beta2 conditions should not be automatically be converted into legacy conditions (v1beta1). + out.Conditions = nil + + // Reset replica counters from autogenerated conversions + // NOTE: replica counters with a new semantic should not be automatically be converted into old replica counters. + out.ReadyReplicas = 0 + out.AvailableReplicas = 0 + + // Retrieve legacy conditions (v1beta1), failureReason, failureMessage and replica counters from the deprecated field. + if in.Deprecated != nil && in.Deprecated.V1Beta1 != nil { + if in.Deprecated.V1Beta1.Conditions != nil { + Convert_v1beta2_Deprecated_V1Beta1_Conditions_To_v1beta1_Conditions(&in.Deprecated.V1Beta1.Conditions, &out.Conditions) + } + out.FailureReason = in.Deprecated.V1Beta1.FailureReason + out.FailureMessage = in.Deprecated.V1Beta1.FailureMessage + out.ReadyReplicas = in.Deprecated.V1Beta1.ReadyReplicas + out.AvailableReplicas = in.Deprecated.V1Beta1.AvailableReplicas + out.UnavailableReplicas = in.Deprecated.V1Beta1.UnavailableReplicas + } + + // Move initialization to old fields + if in.Initialization != nil { + out.BootstrapReady = in.Initialization.BootstrapDataSecretCreated + out.InfrastructureReady = in.Initialization.InfrastructureProvisioned + } + + // Move new conditions (v1beta2) and replica counters to the v1beta2 field. + if in.Conditions == nil && in.ReadyReplicas == nil && in.AvailableReplicas == nil && in.UpToDateReplicas == nil { + return nil + } + out.V1Beta2 = &MachinePoolV1Beta2Status{} + out.V1Beta2.Conditions = in.Conditions + out.V1Beta2.ReadyReplicas = in.ReadyReplicas + out.V1Beta2.AvailableReplicas = in.AvailableReplicas + out.V1Beta2.UpToDateReplicas = in.UpToDateReplicas + return nil +} + +func Convert_v1beta1_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *clusterv1.MachinePoolStatus, s apimachineryconversion.Scope) error { + if err := autoConvert_v1beta1_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in, out, s); err != nil { + return err + } + + // Reset conditions from autogenerated conversions + // NOTE: v1beta1 conditions should not be automatically be converted into v1beta2 conditions. + out.Conditions = nil + + // Reset replica counters from autogenerated conversions + // NOTE: old replica counters should not be automatically be converted into replica counters with a new semantic. + out.ReadyReplicas = nil + out.AvailableReplicas = nil + + // Retrieve new conditions (v1beta2) and replica counters from the v1beta2 field. + if in.V1Beta2 != nil { + out.Conditions = in.V1Beta2.Conditions + out.ReadyReplicas = in.V1Beta2.ReadyReplicas + out.AvailableReplicas = in.V1Beta2.AvailableReplicas + out.UpToDateReplicas = in.V1Beta2.UpToDateReplicas + } + + // Move BootstrapReady and InfrastructureReady to Initialization + if in.BootstrapReady || in.InfrastructureReady { + if out.Initialization == nil { + out.Initialization = &clusterv1.MachinePoolInitializationStatus{} + } + out.Initialization.BootstrapDataSecretCreated = in.BootstrapReady + out.Initialization.InfrastructureProvisioned = in.InfrastructureReady + } + + // Move legacy conditions (v1beta1), failureReason, failureMessage and replica counters to the deprecated field. + if out.Deprecated == nil { + out.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} + } + if out.Deprecated.V1Beta1 == nil { + out.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} + } + if in.Conditions != nil { + Convert_v1beta1_Conditions_To_v1beta2_Deprecated_V1Beta1_Conditions(&in.Conditions, &out.Deprecated.V1Beta1.Conditions) + } + out.Deprecated.V1Beta1.FailureReason = in.FailureReason + out.Deprecated.V1Beta1.FailureMessage = in.FailureMessage + out.Deprecated.V1Beta1.ReadyReplicas = in.ReadyReplicas + out.Deprecated.V1Beta1.AvailableReplicas = in.AvailableReplicas + out.Deprecated.V1Beta1.UnavailableReplicas = in.UnavailableReplicas + return nil +} + +func Convert_v1beta1_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *clusterv1.MachinePoolSpec, s apimachineryconversion.Scope) error { + return autoConvert_v1beta1_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in, out, s) +} diff --git a/api/v1beta1/conversion_test.go b/api/core/v1beta1/conversion_test.go similarity index 88% rename from api/v1beta1/conversion_test.go rename to api/core/v1beta1/conversion_test.go index 9c83da3fecef..9009346517e5 100644 --- a/api/v1beta1/conversion_test.go +++ b/api/core/v1beta1/conversion_test.go @@ -29,7 +29,7 @@ import ( runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) @@ -66,6 +66,11 @@ func TestFuzzyConversion(t *testing.T) { Spoke: &MachineHealthCheck{}, FuzzerFuncs: []fuzzer.FuzzerFuncs{MachineHealthCheckFuzzFuncs}, })) + t.Run("for MachinePool", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ + Hub: &clusterv1.MachinePool{}, + Spoke: &MachinePool{}, + FuzzerFuncs: []fuzzer.FuzzerFuncs{MachinePoolFuzzFuncs}, + })) } func ClusterFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} { @@ -359,3 +364,44 @@ func spokeMachineHealthCheckStatus(in *MachineHealthCheckStatus, c fuzz.Continue } } } + +func MachinePoolFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} { + return []interface{}{ + hubMachinePoolStatus, + spokeMachinePoolStatus, + } +} + +func hubMachinePoolStatus(in *clusterv1.MachinePoolStatus, c fuzz.Continue) { + c.FuzzNoCustom(in) + // Always create struct with at least one mandatory fields. + if in.Deprecated == nil { + in.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} + } + if in.Deprecated.V1Beta1 == nil { + in.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} + } + + // Drop empty structs with only omit empty fields. + if in.Initialization != nil { + if reflect.DeepEqual(in.Initialization, &clusterv1.MachinePoolInitializationStatus{}) { + in.Initialization = nil + } + } + + // nil becomes &0 after hub => spoke => hub conversion + // This is acceptable as usually Replicas is set and controllers using older apiVersions are not writing MachineSet status. + if in.Replicas == nil { + in.Replicas = ptr.To(int32(0)) + } +} + +func spokeMachinePoolStatus(in *MachinePoolStatus, c fuzz.Continue) { + c.FuzzNoCustom(in) + // Drop empty structs with only omit empty fields. + if in.V1Beta2 != nil { + if reflect.DeepEqual(in.V1Beta2, &MachinePoolV1Beta2Status{}) { + in.V1Beta2 = nil + } + } +} diff --git a/api/v1beta1/doc.go b/api/core/v1beta1/doc.go similarity index 93% rename from api/v1beta1/doc.go rename to api/core/v1beta1/doc.go index 57ee56096ffd..1df77151b575 100644 --- a/api/v1beta1/doc.go +++ b/api/core/v1beta1/doc.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1beta1 contains API Schema definitions for the cluster v1beta1 API group // +k8s:openapi-gen=true -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/core/v1beta2 // +kubebuilder:object:generate=true // +groupName=cluster.x-k8s.io // diff --git a/api/v1beta1/groupversion_info.go b/api/core/v1beta1/groupversion_info.go similarity index 100% rename from api/v1beta1/groupversion_info.go rename to api/core/v1beta1/groupversion_info.go diff --git a/api/v1beta1/machine_phase_types.go b/api/core/v1beta1/machine_phase_types.go similarity index 100% rename from api/v1beta1/machine_phase_types.go rename to api/core/v1beta1/machine_phase_types.go diff --git a/api/v1beta1/machine_types.go b/api/core/v1beta1/machine_types.go similarity index 100% rename from api/v1beta1/machine_types.go rename to api/core/v1beta1/machine_types.go diff --git a/api/v1beta1/machinedeployment_types.go b/api/core/v1beta1/machinedeployment_types.go similarity index 100% rename from api/v1beta1/machinedeployment_types.go rename to api/core/v1beta1/machinedeployment_types.go diff --git a/api/v1beta1/machinedrainrules_types.go b/api/core/v1beta1/machinedrainrules_types.go similarity index 100% rename from api/v1beta1/machinedrainrules_types.go rename to api/core/v1beta1/machinedrainrules_types.go diff --git a/api/v1beta1/machinehealthcheck_types.go b/api/core/v1beta1/machinehealthcheck_types.go similarity index 100% rename from api/v1beta1/machinehealthcheck_types.go rename to api/core/v1beta1/machinehealthcheck_types.go diff --git a/exp/api/v1beta1/machinepool_types.go b/api/core/v1beta1/machinepool_types.go similarity index 84% rename from exp/api/v1beta1/machinepool_types.go rename to api/core/v1beta1/machinepool_types.go index 538af0217d18..174fb6817183 100644 --- a/exp/api/v1beta1/machinepool_types.go +++ b/api/core/v1beta1/machinepool_types.go @@ -20,7 +20,6 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" capierrors "sigs.k8s.io/cluster-api/errors" ) @@ -29,6 +28,42 @@ const ( MachinePoolFinalizer = "machinepool.cluster.x-k8s.io" ) +/* +NOTE: we are commenting const for MachinePool's V1Beta2 conditions and reasons because not yet implemented for the 1.9 CAPI release. +However, we are keeping the v1beta2 struct in the MachinePool struct because the code that will collect conditions and replica +counters at cluster level is already implemented. + +// Conditions that will be used for the MachinePool object in v1Beta2 API version. +const ( + // MachinePoolAvailableV1Beta2Condition is true when InfrastructureReady and available replicas >= desired replicas. + MachinePoolAvailableV1Beta2Condition = clusterv1beta1.AvailableV1Beta2Condition + + // MachinePoolBootstrapConfigReadyV1Beta2Condition mirrors the corresponding condition from the MachinePool's BootstrapConfig resource. + MachinePoolBootstrapConfigReadyV1Beta2Condition = clusterv1beta1.BootstrapConfigReadyV1Beta2Condition + + // MachinePoolInfrastructureReadyV1Beta2Condition mirrors the corresponding condition from the MachinePool's Infrastructure resource. + MachinePoolInfrastructureReadyV1Beta2Condition = clusterv1beta1.InfrastructureReadyV1Beta2Condition + + // MachinePoolMachinesReadyV1Beta2Condition surfaces detail of issues on the controlled machines, if any. + MachinePoolMachinesReadyV1Beta2Condition = clusterv1beta1.MachinesReadyV1Beta2Condition + + // MachinePoolMachinesUpToDateV1Beta2Condition surfaces details of controlled machines not up to date, if any. + MachinePoolMachinesUpToDateV1Beta2Condition = clusterv1beta1.MachinesUpToDateV1Beta2Condition + + // MachinePoolScalingUpV1Beta2Condition is true if available replicas < desired replicas. + MachinePoolScalingUpV1Beta2Condition = clusterv1beta1.ScalingUpV1Beta2Condition + + // MachinePoolScalingDownV1Beta2Condition is true if replicas > desired replicas. + MachinePoolScalingDownV1Beta2Condition = clusterv1beta1.ScalingDownV1Beta2Condition + + // MachinePoolRemediatingV1Beta2Condition surfaces details about ongoing remediation of the controlled machines, if any. + MachinePoolRemediatingV1Beta2Condition = clusterv1beta1.RemediatingV1Beta2Condition + + // MachinePoolDeletingV1Beta2Condition surfaces details about ongoing deletion of the controlled machines. + MachinePoolDeletingV1Beta2Condition = clusterv1beta1.DeletingV1Beta2Condition +). +*/ + // ANCHOR: MachinePoolSpec // MachinePoolSpec defines the desired state of MachinePool. @@ -46,7 +81,7 @@ type MachinePoolSpec struct { // template describes the machines that will be created. // +required - Template clusterv1beta1.MachineTemplateSpec `json:"template"` + Template MachineTemplateSpec `json:"template"` // minReadySeconds is the minimum number of seconds for which a newly created machine instances should // be ready. @@ -142,7 +177,7 @@ type MachinePoolStatus struct { // conditions define the current service state of the MachinePool. // +optional - Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"` + Conditions Conditions `json:"conditions,omitempty"` // v1beta2 groups all the fields that will be added or modified in MachinePool's status with the V1Beta2 version. // +optional @@ -286,12 +321,12 @@ type MachinePool struct { } // GetConditions returns the set of conditions for this object. -func (m *MachinePool) GetConditions() clusterv1beta1.Conditions { +func (m *MachinePool) GetConditions() Conditions { return m.Status.Conditions } // SetConditions sets the conditions on this object. -func (m *MachinePool) SetConditions(conditions clusterv1beta1.Conditions) { +func (m *MachinePool) SetConditions(conditions Conditions) { m.Status.Conditions = conditions } diff --git a/api/v1beta1/machineset_types.go b/api/core/v1beta1/machineset_types.go similarity index 100% rename from api/v1beta1/machineset_types.go rename to api/core/v1beta1/machineset_types.go diff --git a/api/v1beta1/v1beta2_condition_consts.go b/api/core/v1beta1/v1beta2_condition_consts.go similarity index 100% rename from api/v1beta1/v1beta2_condition_consts.go rename to api/core/v1beta1/v1beta2_condition_consts.go diff --git a/api/v1beta1/zz_generated.conversion.go b/api/core/v1beta1/zz_generated.conversion.go similarity index 95% rename from api/v1beta1/zz_generated.conversion.go rename to api/core/v1beta1/zz_generated.conversion.go index 1e18891de246..0217448971f5 100644 --- a/api/v1beta1/zz_generated.conversion.go +++ b/api/core/v1beta1/zz_generated.conversion.go @@ -30,7 +30,7 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" - v1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func init() { @@ -530,6 +530,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*MachinePool)(nil), (*v1beta2.MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachinePool_To_v1beta2_MachinePool(a.(*MachinePool), b.(*v1beta2.MachinePool), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePool)(nil), (*MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePool_To_v1beta1_MachinePool(a.(*v1beta2.MachinePool), b.(*MachinePool), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*MachinePoolClass)(nil), (*v1beta2.MachinePoolClass)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_MachinePoolClass_To_v1beta2_MachinePoolClass(a.(*MachinePoolClass), b.(*v1beta2.MachinePoolClass), scope) }); err != nil { @@ -560,6 +570,21 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*MachinePoolList)(nil), (*v1beta2.MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachinePoolList_To_v1beta2_MachinePoolList(a.(*MachinePoolList), b.(*v1beta2.MachinePoolList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolList)(nil), (*MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePoolList_To_v1beta1_MachinePoolList(a.(*v1beta2.MachinePoolList), b.(*MachinePoolList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolSpec)(nil), (*MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec(a.(*v1beta2.MachinePoolSpec), b.(*MachinePoolSpec), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*MachinePoolTopology)(nil), (*v1beta2.MachinePoolTopology)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_MachinePoolTopology_To_v1beta2_MachinePoolTopology(a.(*MachinePoolTopology), b.(*v1beta2.MachinePoolTopology), scope) }); err != nil { @@ -840,6 +865,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*MachinePoolSpec)(nil), (*v1beta2.MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachinePoolSpec_To_v1beta2_MachinePoolSpec(a.(*MachinePoolSpec), b.(*v1beta2.MachinePoolSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*MachinePoolStatus)(nil), (*v1beta2.MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_MachinePoolStatus_To_v1beta2_MachinePoolStatus(a.(*MachinePoolStatus), b.(*v1beta2.MachinePoolStatus), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*MachineSetSpec)(nil), (*v1beta2.MachineSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_MachineSetSpec_To_v1beta2_MachineSetSpec(a.(*MachineSetSpec), b.(*v1beta2.MachineSetSpec), scope) }); err != nil { @@ -900,6 +935,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*v1beta2.MachinePoolStatus)(nil), (*MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePoolStatus_To_v1beta1_MachinePoolStatus(a.(*v1beta2.MachinePoolStatus), b.(*MachinePoolStatus), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*v1beta2.MachineSetStatus)(nil), (*MachineSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta2_MachineSetStatus_To_v1beta1_MachineSetStatus(a.(*v1beta2.MachineSetStatus), b.(*MachineSetStatus), scope) }); err != nil { @@ -2823,6 +2863,38 @@ func Convert_v1beta2_MachineNamingStrategy_To_v1beta1_MachineNamingStrategy(in * return autoConvert_v1beta2_MachineNamingStrategy_To_v1beta1_MachineNamingStrategy(in, out, s) } +func autoConvert_v1beta1_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *v1beta2.MachinePool, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_MachinePoolSpec_To_v1beta2_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_MachinePoolStatus_To_v1beta2_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_MachinePool_To_v1beta2_MachinePool is an autogenerated conversion function. +func Convert_v1beta1_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *v1beta2.MachinePool, s conversion.Scope) error { + return autoConvert_v1beta1_MachinePool_To_v1beta2_MachinePool(in, out, s) +} + +func autoConvert_v1beta2_MachinePool_To_v1beta1_MachinePool(in *v1beta2.MachinePool, out *MachinePool, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta2_MachinePoolStatus_To_v1beta1_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_MachinePool_To_v1beta1_MachinePool is an autogenerated conversion function. +func Convert_v1beta2_MachinePool_To_v1beta1_MachinePool(in *v1beta2.MachinePool, out *MachinePool, s conversion.Scope) error { + return autoConvert_v1beta2_MachinePool_To_v1beta1_MachinePool(in, out, s) +} + func autoConvert_v1beta1_MachinePoolClass_To_v1beta2_MachinePoolClass(in *MachinePoolClass, out *v1beta2.MachinePoolClass, s conversion.Scope) error { out.Class = in.Class if err := Convert_v1beta1_MachinePoolClassTemplate_To_v1beta2_MachinePoolClassTemplate(&in.Template, &out.Template, s); err != nil { @@ -2917,6 +2989,139 @@ func Convert_v1beta2_MachinePoolClassTemplate_To_v1beta1_MachinePoolClassTemplat return autoConvert_v1beta2_MachinePoolClassTemplate_To_v1beta1_MachinePoolClassTemplate(in, out, s) } +func autoConvert_v1beta1_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta2.MachinePool, len(*in)) + for i := range *in { + if err := Convert_v1beta1_MachinePool_To_v1beta2_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_MachinePoolList_To_v1beta2_MachinePoolList is an autogenerated conversion function. +func Convert_v1beta1_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { + return autoConvert_v1beta1_MachinePoolList_To_v1beta2_MachinePoolList(in, out, s) +} + +func autoConvert_v1beta2_MachinePoolList_To_v1beta1_MachinePoolList(in *v1beta2.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_v1beta2_MachinePool_To_v1beta1_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta2_MachinePoolList_To_v1beta1_MachinePoolList is an autogenerated conversion function. +func Convert_v1beta2_MachinePoolList_To_v1beta1_MachinePoolList(in *v1beta2.MachinePoolList, out *MachinePoolList, s conversion.Scope) error { + return autoConvert_v1beta2_MachinePoolList_To_v1beta1_MachinePoolList(in, out, s) +} + +func autoConvert_v1beta1_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *v1beta2.MachinePoolSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + if err := Convert_v1beta1_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + // WARNING: in.MinReadySeconds requires manual conversion: does not exist in peer-type + out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) + out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) + return nil +} + +func autoConvert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + if err := Convert_v1beta2_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) + out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) + return nil +} + +// Convert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec is an autogenerated conversion function. +func Convert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { + return autoConvert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec(in, out, s) +} + +func autoConvert_v1beta1_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *v1beta2.MachinePoolStatus, s conversion.Scope) error { + out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) + if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { + return err + } + if err := v1.Convert_int32_To_Pointer_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { + return err + } + if err := v1.Convert_int32_To_Pointer_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { + return err + } + // WARNING: in.UnavailableReplicas requires manual conversion: does not exist in peer-type + // WARNING: in.FailureReason requires manual conversion: does not exist in peer-type + // WARNING: in.FailureMessage requires manual conversion: does not exist in peer-type + out.Phase = in.Phase + // WARNING: in.BootstrapReady requires manual conversion: does not exist in peer-type + // WARNING: in.InfrastructureReady requires manual conversion: does not exist in peer-type + out.ObservedGeneration = in.ObservedGeneration + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Condition_To_v1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + // WARNING: in.V1Beta2 requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta2_MachinePoolStatus_To_v1beta1_MachinePoolStatus(in *v1beta2.MachinePoolStatus, out *MachinePoolStatus, s conversion.Scope) error { + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(Conditions, len(*in)) + for i := range *in { + if err := Convert_v1_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + // WARNING: in.Initialization requires manual conversion: does not exist in peer-type + out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) + if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { + return err + } + if err := v1.Convert_Pointer_int32_To_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { + return err + } + if err := v1.Convert_Pointer_int32_To_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { + return err + } + // WARNING: in.UpToDateReplicas requires manual conversion: does not exist in peer-type + out.Phase = in.Phase + out.ObservedGeneration = in.ObservedGeneration + // WARNING: in.Deprecated requires manual conversion: does not exist in peer-type + return nil +} + func autoConvert_v1beta1_MachinePoolTopology_To_v1beta2_MachinePoolTopology(in *MachinePoolTopology, out *v1beta2.MachinePoolTopology, s conversion.Scope) error { if err := Convert_v1beta1_ObjectMeta_To_v1beta2_ObjectMeta(&in.Metadata, &out.Metadata, s); err != nil { return err diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/core/v1beta1/zz_generated.deepcopy.go similarity index 94% rename from api/v1beta1/zz_generated.deepcopy.go rename to api/core/v1beta1/zz_generated.deepcopy.go index ec25c1dfb000..403dc6b8e294 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/core/v1beta1/zz_generated.deepcopy.go @@ -1992,6 +1992,33 @@ func (in *MachineNamingStrategy) DeepCopy() *MachineNamingStrategy { return out } +// 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 *MachinePoolClass) DeepCopyInto(out *MachinePoolClass) { *out = *in @@ -2076,6 +2103,116 @@ func (in *MachinePoolClassTemplate) DeepCopy() *MachinePoolClassTemplate { return out } +// 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(Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.V1Beta2 != nil { + in, out := &in.V1Beta2, &out.V1Beta2 + *out = new(MachinePoolV1Beta2Status) + (*in).DeepCopyInto(*out) + } +} + +// 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 +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachinePoolTopology) DeepCopyInto(out *MachinePoolTopology) { *out = *in @@ -2127,6 +2264,43 @@ func (in *MachinePoolTopology) DeepCopy() *MachinePoolTopology { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachinePoolV1Beta2Status) DeepCopyInto(out *MachinePoolV1Beta2Status) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ReadyReplicas != nil { + in, out := &in.ReadyReplicas, &out.ReadyReplicas + *out = new(int32) + **out = **in + } + if in.AvailableReplicas != nil { + in, out := &in.AvailableReplicas, &out.AvailableReplicas + *out = new(int32) + **out = **in + } + if in.UpToDateReplicas != nil { + in, out := &in.UpToDateReplicas, &out.UpToDateReplicas + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolV1Beta2Status. +func (in *MachinePoolV1Beta2Status) DeepCopy() *MachinePoolV1Beta2Status { + if in == nil { + return nil + } + out := new(MachinePoolV1Beta2Status) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachinePoolVariables) DeepCopyInto(out *MachinePoolVariables) { *out = *in diff --git a/api/v1beta1/zz_generated.openapi.go b/api/core/v1beta1/zz_generated.openapi.go similarity index 79% rename from api/v1beta1/zz_generated.openapi.go rename to api/core/v1beta1/zz_generated.openapi.go index aa0f813621b1..13a78b23719c 100644 --- a/api/v1beta1/zz_generated.openapi.go +++ b/api/core/v1beta1/zz_generated.openapi.go @@ -28,104 +28,109 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "sigs.k8s.io/cluster-api/api/v1beta1.APIEndpoint": schema_sigsk8sio_cluster_api_api_v1beta1_APIEndpoint(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.Bootstrap": schema_sigsk8sio_cluster_api_api_v1beta1_Bootstrap(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.Cluster": schema_sigsk8sio_cluster_api_api_v1beta1_Cluster(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterAvailabilityGate": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterAvailabilityGate(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClass": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassList": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassList(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassPatch": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassPatch(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassSpec": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassStatus": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassStatusVariable": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatusVariable(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassStatusVariableDefinition": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatusVariableDefinition(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassV1Beta2Status": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassV1Beta2Status(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassVariable": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassVariable(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassVariableMetadata": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassVariableMetadata(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterControlPlaneStatus": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterControlPlaneStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterList": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterList(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterNetwork": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterNetwork(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterSpec": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterStatus": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterV1Beta2Status": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterV1Beta2Status(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterVariable": schema_sigsk8sio_cluster_api_api_v1beta1_ClusterVariable(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.Condition": schema_sigsk8sio_cluster_api_api_v1beta1_Condition(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneClass": schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneClassNamingStrategy": schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneClassNamingStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneTopology": schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneTopology(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneVariables": schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneVariables(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ExternalPatchDefinition": schema_sigsk8sio_cluster_api_api_v1beta1_ExternalPatchDefinition(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.FailureDomainSpec": schema_sigsk8sio_cluster_api_api_v1beta1_FailureDomainSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.InfrastructureNamingStrategy": schema_sigsk8sio_cluster_api_api_v1beta1_InfrastructureNamingStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.JSONPatch": schema_sigsk8sio_cluster_api_api_v1beta1_JSONPatch(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.JSONPatchValue": schema_sigsk8sio_cluster_api_api_v1beta1_JSONPatchValue(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps": schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate": schema_sigsk8sio_cluster_api_api_v1beta1_LocalObjectTemplate(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.Machine": schema_sigsk8sio_cluster_api_api_v1beta1_Machine(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineAddress": schema_sigsk8sio_cluster_api_api_v1beta1_MachineAddress(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeletionStatus": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeletionStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeployment": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeployment(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentClass": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentClassNamingStrategy": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClassNamingStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentClassTemplate": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClassTemplate(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentList": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentList(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentSpec": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentStatus": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentStrategy": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentTopology": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentTopology(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentV1Beta2Status": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentV1Beta2Status(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentVariables": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentVariables(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRule": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRule(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRuleDrainConfig": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleDrainConfig(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRuleList": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleList(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRuleMachineSelector": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleMachineSelector(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRulePodSelector": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRulePodSelector(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRuleSpec": schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheck": schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheck(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckClass": schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckList": schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckList(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckSpec": schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckStatus": schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckTopology": schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckTopology(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckV1Beta2Status": schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckV1Beta2Status(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineList": schema_sigsk8sio_cluster_api_api_v1beta1_MachineList(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineNamingStrategy": schema_sigsk8sio_cluster_api_api_v1beta1_MachineNamingStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolClass": schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolClassNamingStrategy": schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClassNamingStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolClassTemplate": schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClassTemplate(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolTopology": schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolTopology(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolVariables": schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolVariables(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate": schema_sigsk8sio_cluster_api_api_v1beta1_MachineReadinessGate(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineRollingUpdateDeployment": schema_sigsk8sio_cluster_api_api_v1beta1_MachineRollingUpdateDeployment(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineSet": schema_sigsk8sio_cluster_api_api_v1beta1_MachineSet(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineSetList": schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetList(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineSetSpec": schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineSetStatus": schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineSetV1Beta2Status": schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetV1Beta2Status(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineSpec": schema_sigsk8sio_cluster_api_api_v1beta1_MachineSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineStatus": schema_sigsk8sio_cluster_api_api_v1beta1_MachineStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineTemplateSpec": schema_sigsk8sio_cluster_api_api_v1beta1_MachineTemplateSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.MachineV1Beta2Status": schema_sigsk8sio_cluster_api_api_v1beta1_MachineV1Beta2Status(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.NetworkRanges": schema_sigsk8sio_cluster_api_api_v1beta1_NetworkRanges(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta": schema_sigsk8sio_cluster_api_api_v1beta1_ObjectMeta(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.PatchDefinition": schema_sigsk8sio_cluster_api_api_v1beta1_PatchDefinition(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.PatchSelector": schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelector(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.PatchSelectorMatch": schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelectorMatch(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.PatchSelectorMatchMachineDeploymentClass": schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelectorMatchMachineDeploymentClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.PatchSelectorMatchMachinePoolClass": schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelectorMatchMachinePoolClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.RemediationStrategy": schema_sigsk8sio_cluster_api_api_v1beta1_RemediationStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.Topology": schema_sigsk8sio_cluster_api_api_v1beta1_Topology(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.UnhealthyCondition": schema_sigsk8sio_cluster_api_api_v1beta1_UnhealthyCondition(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.ValidationRule": schema_sigsk8sio_cluster_api_api_v1beta1_ValidationRule(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.VariableSchema": schema_sigsk8sio_cluster_api_api_v1beta1_VariableSchema(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.VariableSchemaMetadata": schema_sigsk8sio_cluster_api_api_v1beta1_VariableSchemaMetadata(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.WorkersClass": schema_sigsk8sio_cluster_api_api_v1beta1_WorkersClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.WorkersStatus": schema_sigsk8sio_cluster_api_api_v1beta1_WorkersStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta1.WorkersTopology": schema_sigsk8sio_cluster_api_api_v1beta1_WorkersTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint": schema_cluster_api_api_core_v1beta1_APIEndpoint(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.Bootstrap": schema_cluster_api_api_core_v1beta1_Bootstrap(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster": schema_cluster_api_api_core_v1beta1_Cluster(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate": schema_cluster_api_api_core_v1beta1_ClusterAvailabilityGate(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClass": schema_cluster_api_api_core_v1beta1_ClusterClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassList": schema_cluster_api_api_core_v1beta1_ClusterClassList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassPatch": schema_cluster_api_api_core_v1beta1_ClusterClassPatch(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassSpec": schema_cluster_api_api_core_v1beta1_ClusterClassSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatus": schema_cluster_api_api_core_v1beta1_ClusterClassStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariable": schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariable(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariableDefinition": schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariableDefinition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassV1Beta2Status": schema_cluster_api_api_core_v1beta1_ClusterClassV1Beta2Status(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable": schema_cluster_api_api_core_v1beta1_ClusterClassVariable(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata": schema_cluster_api_api_core_v1beta1_ClusterClassVariableMetadata(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterControlPlaneStatus": schema_cluster_api_api_core_v1beta1_ClusterControlPlaneStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterList": schema_cluster_api_api_core_v1beta1_ClusterList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterNetwork": schema_cluster_api_api_core_v1beta1_ClusterNetwork(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterSpec": schema_cluster_api_api_core_v1beta1_ClusterSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterStatus": schema_cluster_api_api_core_v1beta1_ClusterStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterV1Beta2Status": schema_cluster_api_api_core_v1beta1_ClusterV1Beta2Status(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable": schema_cluster_api_api_core_v1beta1_ClusterVariable(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition": schema_cluster_api_api_core_v1beta1_Condition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClass": schema_cluster_api_api_core_v1beta1_ControlPlaneClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClassNamingStrategy": schema_cluster_api_api_core_v1beta1_ControlPlaneClassNamingStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopology": schema_cluster_api_api_core_v1beta1_ControlPlaneTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables": schema_cluster_api_api_core_v1beta1_ControlPlaneVariables(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ExternalPatchDefinition": schema_cluster_api_api_core_v1beta1_ExternalPatchDefinition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec": schema_cluster_api_api_core_v1beta1_FailureDomainSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.InfrastructureNamingStrategy": schema_cluster_api_api_core_v1beta1_InfrastructureNamingStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatch": schema_cluster_api_api_core_v1beta1_JSONPatch(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatchValue": schema_cluster_api_api_core_v1beta1_JSONPatchValue(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps": schema_cluster_api_api_core_v1beta1_JSONSchemaProps(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate": schema_cluster_api_api_core_v1beta1_LocalObjectTemplate(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.Machine": schema_cluster_api_api_core_v1beta1_Machine(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineAddress": schema_cluster_api_api_core_v1beta1_MachineAddress(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeletionStatus": schema_cluster_api_api_core_v1beta1_MachineDeletionStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeployment": schema_cluster_api_api_core_v1beta1_MachineDeployment(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClass": schema_cluster_api_api_core_v1beta1_MachineDeploymentClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassNamingStrategy": schema_cluster_api_api_core_v1beta1_MachineDeploymentClassNamingStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassTemplate": schema_cluster_api_api_core_v1beta1_MachineDeploymentClassTemplate(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentList": schema_cluster_api_api_core_v1beta1_MachineDeploymentList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentSpec": schema_cluster_api_api_core_v1beta1_MachineDeploymentSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStatus": schema_cluster_api_api_core_v1beta1_MachineDeploymentStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy": schema_cluster_api_api_core_v1beta1_MachineDeploymentStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentTopology": schema_cluster_api_api_core_v1beta1_MachineDeploymentTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineDeploymentV1Beta2Status(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables": schema_cluster_api_api_core_v1beta1_MachineDeploymentVariables(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRule": schema_cluster_api_api_core_v1beta1_MachineDrainRule(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleDrainConfig": schema_cluster_api_api_core_v1beta1_MachineDrainRuleDrainConfig(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleList": schema_cluster_api_api_core_v1beta1_MachineDrainRuleList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleMachineSelector": schema_cluster_api_api_core_v1beta1_MachineDrainRuleMachineSelector(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRulePodSelector": schema_cluster_api_api_core_v1beta1_MachineDrainRulePodSelector(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleSpec": schema_cluster_api_api_core_v1beta1_MachineDrainRuleSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheck": schema_cluster_api_api_core_v1beta1_MachineHealthCheck(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass": schema_cluster_api_api_core_v1beta1_MachineHealthCheckClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckList": schema_cluster_api_api_core_v1beta1_MachineHealthCheckList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckSpec": schema_cluster_api_api_core_v1beta1_MachineHealthCheckSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckStatus": schema_cluster_api_api_core_v1beta1_MachineHealthCheckStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology": schema_cluster_api_api_core_v1beta1_MachineHealthCheckTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineHealthCheckV1Beta2Status(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineList": schema_cluster_api_api_core_v1beta1_MachineList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy": schema_cluster_api_api_core_v1beta1_MachineNamingStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePool": schema_cluster_api_api_core_v1beta1_MachinePool(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClass": schema_cluster_api_api_core_v1beta1_MachinePoolClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassNamingStrategy": schema_cluster_api_api_core_v1beta1_MachinePoolClassNamingStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassTemplate": schema_cluster_api_api_core_v1beta1_MachinePoolClassTemplate(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolList": schema_cluster_api_api_core_v1beta1_MachinePoolList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolSpec": schema_cluster_api_api_core_v1beta1_MachinePoolSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolStatus": schema_cluster_api_api_core_v1beta1_MachinePoolStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolTopology": schema_cluster_api_api_core_v1beta1_MachinePoolTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachinePoolV1Beta2Status(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolVariables": schema_cluster_api_api_core_v1beta1_MachinePoolVariables(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate": schema_cluster_api_api_core_v1beta1_MachineReadinessGate(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineRollingUpdateDeployment": schema_cluster_api_api_core_v1beta1_MachineRollingUpdateDeployment(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSet": schema_cluster_api_api_core_v1beta1_MachineSet(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetList": schema_cluster_api_api_core_v1beta1_MachineSetList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetSpec": schema_cluster_api_api_core_v1beta1_MachineSetSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetStatus": schema_cluster_api_api_core_v1beta1_MachineSetStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineSetV1Beta2Status(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec": schema_cluster_api_api_core_v1beta1_MachineSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineStatus": schema_cluster_api_api_core_v1beta1_MachineStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec": schema_cluster_api_api_core_v1beta1_MachineTemplateSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineV1Beta2Status(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.NetworkRanges": schema_cluster_api_api_core_v1beta1_NetworkRanges(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta": schema_cluster_api_api_core_v1beta1_ObjectMeta(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchDefinition": schema_cluster_api_api_core_v1beta1_PatchDefinition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelector": schema_cluster_api_api_core_v1beta1_PatchSelector(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatch": schema_cluster_api_api_core_v1beta1_PatchSelectorMatch(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachineDeploymentClass": schema_cluster_api_api_core_v1beta1_PatchSelectorMatchMachineDeploymentClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachinePoolClass": schema_cluster_api_api_core_v1beta1_PatchSelectorMatchMachinePoolClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.RemediationStrategy": schema_cluster_api_api_core_v1beta1_RemediationStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.Topology": schema_cluster_api_api_core_v1beta1_Topology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition": schema_cluster_api_api_core_v1beta1_UnhealthyCondition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.ValidationRule": schema_cluster_api_api_core_v1beta1_ValidationRule(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema": schema_cluster_api_api_core_v1beta1_VariableSchema(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchemaMetadata": schema_cluster_api_api_core_v1beta1_VariableSchemaMetadata(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersClass": schema_cluster_api_api_core_v1beta1_WorkersClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersStatus": schema_cluster_api_api_core_v1beta1_WorkersStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersTopology": schema_cluster_api_api_core_v1beta1_WorkersTopology(ref), } } -func schema_sigsk8sio_cluster_api_api_v1beta1_APIEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_APIEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -155,7 +160,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_APIEndpoint(ref common.ReferenceCa } } -func schema_sigsk8sio_cluster_api_api_v1beta1_Bootstrap(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_Bootstrap(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -183,7 +188,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_Bootstrap(ref common.ReferenceCall } } -func schema_sigsk8sio_cluster_api_api_v1beta1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -215,25 +220,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_Cluster(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of Cluster.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the observed state of Cluster.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterSpec", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterAvailabilityGate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterAvailabilityGate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -262,7 +267,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterAvailabilityGate(ref common } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -294,25 +299,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClass(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of ClusterClass.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the observed state of ClusterClass.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassSpec", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -348,7 +353,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassList(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClass"), }, }, }, @@ -359,11 +364,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassList(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClass"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClass"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassPatch(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterClassPatch(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -400,7 +405,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassPatch(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.PatchDefinition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.PatchDefinition"), }, }, }, @@ -409,7 +414,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassPatch(ref common.Refer "external": { SchemaProps: spec.SchemaProps{ Description: "external defines an external patch. Note: Exactly one of Definitions or External must be set.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ExternalPatchDefinition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ExternalPatchDefinition"), }, }, }, @@ -417,11 +422,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassPatch(ref common.Refer }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ExternalPatchDefinition", "sigs.k8s.io/cluster-api/api/v1beta1.PatchDefinition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ExternalPatchDefinition", "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchDefinition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -444,7 +449,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassSpec(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterAvailabilityGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate"), }, }, }, @@ -454,27 +459,27 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassSpec(ref common.Refere SchemaProps: spec.SchemaProps{ 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.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"), }, }, "infrastructureNamingStrategy": { SchemaProps: spec.SchemaProps{ Description: "infrastructureNamingStrategy allows changing the naming pattern used when creating the infrastructure object.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.InfrastructureNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.InfrastructureNamingStrategy"), }, }, "controlPlane": { SchemaProps: spec.SchemaProps{ Description: "controlPlane is a reference to a local struct that holds the details for provisioning the Control Plane for the Cluster.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClass"), }, }, "workers": { SchemaProps: spec.SchemaProps{ 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.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.WorkersClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersClass"), }, }, "variables": { @@ -485,7 +490,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassSpec(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable"), }, }, }, @@ -499,7 +504,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassSpec(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassPatch"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassPatch"), }, }, }, @@ -509,11 +514,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassSpec(ref common.Refere }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/v1beta1.InfrastructureNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/v1beta1.WorkersClass"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.InfrastructureNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersClass"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterClassStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -528,7 +533,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatus(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassStatusVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariable"), }, }, }, @@ -542,7 +547,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatus(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), }, }, }, @@ -558,18 +563,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatus(ref common.Refe "v1beta2": { SchemaProps: spec.SchemaProps{ Description: "v1beta2 groups all the fields that will be added or modified in ClusterClass's status with the V1Beta2 version.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassV1Beta2Status"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassV1Beta2Status"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassStatusVariable", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassV1Beta2Status", "sigs.k8s.io/cluster-api/api/v1beta1.Condition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariable", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassV1Beta2Status", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatusVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -600,7 +605,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatusVariable(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassStatusVariableDefinition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariableDefinition"), }, }, }, @@ -611,11 +616,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatusVariable(ref com }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassStatusVariableDefinition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariableDefinition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatusVariableDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariableDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -642,14 +647,14 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatusVariableDefiniti SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata of a variable. It can be used to add additional data for higher level tools to a ClusterClassVariable.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassVariableMetadata"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata"), }, }, "schema": { SchemaProps: spec.SchemaProps{ Description: "schema defines the schema of the variable.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.VariableSchema"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema"), }, }, }, @@ -657,11 +662,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassStatusVariableDefiniti }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassVariableMetadata", "sigs.k8s.io/cluster-api/api/v1beta1.VariableSchema"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata", "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterClassV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -698,7 +703,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassV1Beta2Status(ref comm } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterClassVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -725,14 +730,14 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassVariable(ref common.Re SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata of a variable. It can be used to add additional data for higher level tools to a ClusterClassVariable.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please use XMetadata in JSONSchemaProps instead.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassVariableMetadata"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata"), }, }, "schema": { SchemaProps: spec.SchemaProps{ Description: "schema defines the schema of the variable.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.VariableSchema"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema"), }, }, }, @@ -740,11 +745,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassVariable(ref common.Re }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassVariableMetadata", "sigs.k8s.io/cluster-api/api/v1beta1.VariableSchema"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata", "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassVariableMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterClassVariableMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -789,7 +794,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterClassVariableMetadata(ref c } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterControlPlaneStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterControlPlaneStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -837,7 +842,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterControlPlaneStatus(ref comm } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -873,7 +878,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Cluster"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"), }, }, }, @@ -884,11 +889,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta1.Cluster"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterNetwork(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterNetwork(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -905,13 +910,13 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterNetwork(ref common.Referenc "services": { SchemaProps: spec.SchemaProps{ Description: "services is the network ranges from which service VIPs are allocated.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.NetworkRanges"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.NetworkRanges"), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods is the network ranges from which Pod networks are allocated.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.NetworkRanges"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.NetworkRanges"), }, }, "serviceDomain": { @@ -925,11 +930,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterNetwork(ref common.Referenc }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.NetworkRanges"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.NetworkRanges"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -946,14 +951,14 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterSpec(ref common.ReferenceCa "clusterNetwork": { SchemaProps: spec.SchemaProps{ Description: "clusterNetwork represents the cluster network configuration.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterNetwork"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterNetwork"), }, }, "controlPlaneEndpoint": { SchemaProps: spec.SchemaProps{ Description: "controlPlaneEndpoint represents the endpoint used to communicate with the control plane.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.APIEndpoint"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint"), }, }, "controlPlaneRef": { @@ -971,7 +976,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterSpec(ref common.ReferenceCa "topology": { SchemaProps: spec.SchemaProps{ Description: "topology 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.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Topology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Topology"), }, }, "availabilityGates": { @@ -990,7 +995,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterSpec(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterAvailabilityGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate"), }, }, }, @@ -1000,11 +1005,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterSpec(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/v1beta1.APIEndpoint", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterNetwork", "sigs.k8s.io/cluster-api/api/v1beta1.Topology"}, + "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterNetwork", "sigs.k8s.io/cluster-api/api/core/v1beta1.Topology"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1020,7 +1025,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterStatus(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.FailureDomainSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec"), }, }, }, @@ -1071,7 +1076,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterStatus(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), }, }, }, @@ -1087,18 +1092,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterStatus(ref common.Reference "v1beta2": { SchemaProps: spec.SchemaProps{ Description: "v1beta2 groups all the fields that will be added or modified in Cluster's status with the V1Beta2 version.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterV1Beta2Status"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterV1Beta2Status"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterV1Beta2Status", "sigs.k8s.io/cluster-api/api/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/v1beta1.FailureDomainSpec"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterV1Beta2Status", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1130,24 +1135,24 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterV1Beta2Status(ref common.Re "controlPlane": { SchemaProps: spec.SchemaProps{ Description: "controlPlane groups all the observations about Cluster's ControlPlane current state.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterControlPlaneStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterControlPlaneStatus"), }, }, "workers": { SchemaProps: spec.SchemaProps{ Description: "workers groups all the observations about Cluster's Workers current state.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.WorkersStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterControlPlaneStatus", "sigs.k8s.io/cluster-api/api/v1beta1.WorkersStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterControlPlaneStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ClusterVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1184,7 +1189,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterVariable(ref common.Referen } } -func schema_sigsk8sio_cluster_api_api_v1beta1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1243,7 +1248,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_Condition(ref common.ReferenceCall } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ControlPlaneClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1254,7 +1259,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneClass(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane if the ControlPlaneTemplate referenced is machine based. If not, it is applied only to the ControlPlane. At runtime this metadata is merged with the corresponding metadata from the topology.\n\nThis field is supported if and only if the control plane provider template referenced is Machine based.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "ref": { @@ -1266,19 +1271,19 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneClass(ref common.Refer "machineInfrastructure": { SchemaProps: spec.SchemaProps{ Description: "machineInfrastructure defines the metadata and infrastructure information for control plane machines.\n\nThis field is supported if and only if the control plane provider template referenced above is Machine based and supports setting replicas.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"), }, }, "machineHealthCheck": { SchemaProps: spec.SchemaProps{ Description: "machineHealthCheck defines a MachineHealthCheck for this ControlPlaneClass. This field is supported if and only if the ControlPlane provider template referenced above is Machine based and supports setting replicas.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass"), }, }, "namingStrategy": { SchemaProps: spec.SchemaProps{ Description: "namingStrategy allows changing the naming pattern used when creating the control plane provider object.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneClassNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClassNamingStrategy"), }, }, "nodeDrainTimeout": { @@ -1315,7 +1320,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneClass(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"), }, }, }, @@ -1326,11 +1331,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneClass(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneClassNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ControlPlaneClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1350,7 +1355,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneClassNamingStrategy(re } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ControlPlaneTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1361,7 +1366,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneTopology(ref common.Re SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane if the ControlPlaneTemplate referenced by the ClusterClass is machine based. If not, it is applied only to the ControlPlane. At runtime this metadata is merged with the corresponding metadata from the ClusterClass.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "replicas": { @@ -1374,7 +1379,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneTopology(ref common.Re "machineHealthCheck": { SchemaProps: spec.SchemaProps{ Description: "machineHealthCheck allows to enable, disable and override the MachineHealthCheck configuration in the ClusterClass for this control plane.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology"), }, }, "nodeDrainTimeout": { @@ -1411,7 +1416,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneTopology(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"), }, }, }, @@ -1420,18 +1425,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneTopology(ref common.Re "variables": { SchemaProps: spec.SchemaProps{ Description: "variables can be used to customize the ControlPlane through patches.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneVariables"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ControlPlaneVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1454,7 +1459,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneVariables(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"), }, }, }, @@ -1464,11 +1469,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ControlPlaneVariables(ref common.R }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterVariable"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ExternalPatchDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ExternalPatchDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1518,7 +1523,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ExternalPatchDefinition(ref common } } -func schema_sigsk8sio_cluster_api_api_v1beta1_FailureDomainSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_FailureDomainSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1554,7 +1559,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_FailureDomainSpec(ref common.Refer } } -func schema_sigsk8sio_cluster_api_api_v1beta1_InfrastructureNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_InfrastructureNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1574,7 +1579,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_InfrastructureNamingStrategy(ref c } } -func schema_sigsk8sio_cluster_api_api_v1beta1_JSONPatch(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_JSONPatch(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1606,7 +1611,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONPatch(ref common.ReferenceCall "valueFrom": { SchemaProps: spec.SchemaProps{ Description: "valueFrom defines the value of the patch. Note: Either Value or ValueFrom is required for add and replace operations. Only one of them is allowed to be set at the same time.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.JSONPatchValue"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatchValue"), }, }, }, @@ -1614,11 +1619,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONPatch(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "sigs.k8s.io/cluster-api/api/v1beta1.JSONPatchValue"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatchValue"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_JSONPatchValue(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_JSONPatchValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1645,7 +1650,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONPatchValue(ref common.Referenc } } -func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1681,7 +1686,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"), }, }, }, @@ -1690,7 +1695,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen "additionalProperties": { SchemaProps: spec.SchemaProps{ Description: "additionalProperties specifies the schema of values in a map (keys are always strings). NOTE: Can only be set if type is object. NOTE: AdditionalProperties is mutually exclusive with Properties. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"), }, }, "maxProperties": { @@ -1725,7 +1730,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen "items": { SchemaProps: spec.SchemaProps{ Description: "items specifies fields of an array. NOTE: Can only be set if type is array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"), }, }, "maxItems": { @@ -1847,7 +1852,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ValidationRule"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ValidationRule"), }, }, }, @@ -1856,7 +1861,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen "x-metadata": { SchemaProps: spec.SchemaProps{ Description: "x-metadata is the metadata of a variable or a nested field within a variable. It can be used to add additional data for higher level tools.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.VariableSchemaMetadata"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchemaMetadata"), }, }, "x-kubernetes-int-or-string": { @@ -1874,7 +1879,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"), }, }, }, @@ -1888,7 +1893,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"), }, }, }, @@ -1902,7 +1907,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"), }, }, }, @@ -1911,18 +1916,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen "not": { SchemaProps: spec.SchemaProps{ Description: "not specifies that the variable must not validate against the subschema. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps", "sigs.k8s.io/cluster-api/api/v1beta1.ValidationRule", "sigs.k8s.io/cluster-api/api/v1beta1.VariableSchemaMetadata"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps", "sigs.k8s.io/cluster-api/api/core/v1beta1.ValidationRule", "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchemaMetadata"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_LocalObjectTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_LocalObjectTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1944,7 +1949,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_LocalObjectTemplate(ref common.Ref } } -func schema_sigsk8sio_cluster_api_api_v1beta1_Machine(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_Machine(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1976,25 +1981,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_Machine(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of Machine.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the observed state of Machine.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta1.MachineSpec", "sigs.k8s.io/cluster-api/api/v1beta1.MachineStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2024,7 +2029,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineAddress(ref common.Referenc } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeletionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeletionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2051,7 +2056,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeletionStatus(ref common.R } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2083,25 +2088,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeployment(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of MachineDeployment.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the observed state of MachineDeployment.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentSpec", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeploymentClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2120,13 +2125,13 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClass(ref common. SchemaProps: spec.SchemaProps{ Description: "template is a local struct containing a collection of templates for creation of MachineDeployment objects representing a set of worker nodes.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentClassTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassTemplate"), }, }, "machineHealthCheck": { SchemaProps: spec.SchemaProps{ Description: "machineHealthCheck defines a MachineHealthCheck for this MachineDeploymentClass.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass"), }, }, "failureDomain": { @@ -2139,7 +2144,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClass(ref common. "namingStrategy": { SchemaProps: spec.SchemaProps{ Description: "namingStrategy allows changing the naming pattern used when creating the MachineDeployment.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentClassNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassNamingStrategy"), }, }, "nodeDrainTimeout": { @@ -2183,7 +2188,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClass(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"), }, }, }, @@ -2192,7 +2197,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClass(ref common. "strategy": { SchemaProps: spec.SchemaProps{ Description: "strategy is the deployment strategy to use to replace existing machines with new ones. NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy"), }, }, }, @@ -2200,11 +2205,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClass(ref common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentClassNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentClassTemplate", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeploymentClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2224,7 +2229,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClassNamingStrate } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClassTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeploymentClassTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2235,21 +2240,21 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClassTemplate(ref SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. At runtime this metadata is merged with the corresponding metadata from the topology.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "bootstrap": { SchemaProps: spec.SchemaProps{ Description: "bootstrap contains the bootstrap template reference to be used for the creation of worker Machines.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"), }, }, "infrastructure": { SchemaProps: spec.SchemaProps{ Description: "infrastructure contains the infrastructure template reference to be used for the creation of worker Machines.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"), }, }, }, @@ -2257,11 +2262,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentClassTemplate(ref }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2297,7 +2302,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentList(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeployment"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeployment"), }, }, }, @@ -2308,11 +2313,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentList(ref common.R }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeployment"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeployment"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2351,19 +2356,19 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentSpec(ref common.R SchemaProps: spec.SchemaProps{ Description: "template describes the machines that will be created.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineTemplateSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"), }, }, "strategy": { SchemaProps: spec.SchemaProps{ Description: "strategy is the deployment strategy to use to replace existing machines with new ones.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy"), }, }, "machineNamingStrategy": { SchemaProps: spec.SchemaProps{ Description: "machineNamingStrategy allows changing the naming pattern used when creating Machines. Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy"), }, }, "minReadySeconds": { @@ -2399,11 +2404,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentSpec(ref common.R }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/v1beta1.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta1.MachineTemplateSpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2479,7 +2484,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentStatus(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), }, }, }, @@ -2488,18 +2493,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentStatus(ref common "v1beta2": { SchemaProps: spec.SchemaProps{ Description: "v1beta2 groups all the fields that will be added or modified in MachineDeployment's status with the V1Beta2 version.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentV1Beta2Status"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentV1Beta2Status"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentV1Beta2Status"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentV1Beta2Status"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2516,24 +2521,24 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentStrategy(ref comm "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "rollingUpdate is the rolling update config params. Present only if MachineDeploymentStrategyType = RollingUpdate.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineRollingUpdateDeployment"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineRollingUpdateDeployment"), }, }, "remediation": { SchemaProps: spec.SchemaProps{ Description: "remediation controls the strategy of remediating unhealthy machines and how remediating operations should occur during the lifecycle of the dependant MachineSets.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.RemediationStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.RemediationStrategy"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.MachineRollingUpdateDeployment", "sigs.k8s.io/cluster-api/api/v1beta1.RemediationStrategy"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineRollingUpdateDeployment", "sigs.k8s.io/cluster-api/api/core/v1beta1.RemediationStrategy"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeploymentTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2544,7 +2549,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentTopology(ref comm SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. At runtime this metadata is merged with the corresponding metadata from the ClusterClass.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "class": { @@ -2580,7 +2585,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentTopology(ref comm "machineHealthCheck": { SchemaProps: spec.SchemaProps{ Description: "machineHealthCheck allows to enable, disable and override the MachineHealthCheck configuration in the ClusterClass for this MachineDeployment.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology"), }, }, "nodeDrainTimeout": { @@ -2624,7 +2629,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentTopology(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"), }, }, }, @@ -2633,13 +2638,13 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentTopology(ref comm "strategy": { SchemaProps: spec.SchemaProps{ Description: "strategy is the deployment strategy to use to replace existing machines with new ones.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy"), }, }, "variables": { SchemaProps: spec.SchemaProps{ Description: "variables can be used to customize the MachineDeployment through patches.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentVariables"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables"), }, }, }, @@ -2647,11 +2652,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentTopology(ref comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeploymentV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2709,7 +2714,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentV1Beta2Status(ref } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDeploymentVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2732,7 +2737,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentVariables(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"), }, }, }, @@ -2742,11 +2747,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentVariables(ref com }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterVariable"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDrainRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2778,7 +2783,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRule(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "spec defines the spec of a MachineDrainRule.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRuleSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleSpec"), }, }, }, @@ -2786,11 +2791,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRule(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRuleSpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleSpec"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleDrainConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDrainRuleDrainConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2819,7 +2824,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleDrainConfig(ref co } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDrainRuleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2855,7 +2860,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleList(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRule"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRule"), }, }, }, @@ -2866,11 +2871,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleList(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRule"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRule"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleMachineSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDrainRuleMachineSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2897,7 +2902,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleMachineSelector(re } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRulePodSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDrainRulePodSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2924,7 +2929,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRulePodSelector(ref co } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineDrainRuleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2935,7 +2940,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleSpec(ref common.Re SchemaProps: spec.SchemaProps{ Description: "drain configures if and how Pods are drained.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRuleDrainConfig"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleDrainConfig"), }, }, "machines": { @@ -2951,7 +2956,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleSpec(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRuleMachineSelector"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleMachineSelector"), }, }, }, @@ -2970,7 +2975,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleSpec(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRulePodSelector"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRulePodSelector"), }, }, }, @@ -2981,11 +2986,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDrainRuleSpec(ref common.Re }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRuleDrainConfig", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRuleMachineSelector", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDrainRulePodSelector"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleDrainConfig", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleMachineSelector", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRulePodSelector"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheck(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineHealthCheck(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3017,25 +3022,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheck(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "spec is the specification of machine health check policy", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the most recently observed status of MachineHealthCheck resource", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckSpec", "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineHealthCheckClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3050,7 +3055,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckClass(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.UnhealthyCondition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"), }, }, }, @@ -3085,11 +3090,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckClass(ref common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/v1beta1.UnhealthyCondition"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineHealthCheckList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3125,7 +3130,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckList(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheck"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheck"), }, }, }, @@ -3136,11 +3141,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckList(ref common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheck"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheck"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineHealthCheckSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3170,7 +3175,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckSpec(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.UnhealthyCondition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"), }, }, }, @@ -3206,11 +3211,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckSpec(ref common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/v1beta1.UnhealthyCondition"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineHealthCheckStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3271,7 +3276,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckStatus(ref commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), }, }, }, @@ -3280,18 +3285,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckStatus(ref commo "v1beta2": { SchemaProps: spec.SchemaProps{ Description: "v1beta2 groups all the fields that will be added or modified in MachineHealthCheck's status with the V1Beta2 version.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckV1Beta2Status"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckV1Beta2Status"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/v1beta1.MachineHealthCheckV1Beta2Status"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckV1Beta2Status"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineHealthCheckTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3313,7 +3318,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckTopology(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.UnhealthyCondition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"), }, }, }, @@ -3348,11 +3353,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckTopology(ref com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/v1beta1.UnhealthyCondition"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineHealthCheckV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3389,7 +3394,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineHealthCheckV1Beta2Status(re } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3425,7 +3430,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Machine"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Machine"), }, }, }, @@ -3436,11 +3441,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta1.Machine"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.Machine"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3460,7 +3465,57 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineNamingStrategy(ref common.R } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachinePool(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePool is the Schema for the machinepools API.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec is the desired state of MachinePool.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the observed state of MachinePool.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolStatus"}, + } +} + +func schema_cluster_api_api_core_v1beta1_MachinePoolClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3479,7 +3534,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClass(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "template is a local struct containing a collection of templates for creation of MachinePools objects representing a pool of worker nodes.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolClassTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassTemplate"), }, }, "failureDomains": { @@ -3500,7 +3555,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClass(ref common.Refere "namingStrategy": { SchemaProps: spec.SchemaProps{ Description: "namingStrategy allows changing the naming pattern used when creating the MachinePool.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolClassNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassNamingStrategy"), }, }, "nodeDrainTimeout": { @@ -3533,11 +3588,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClass(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolClassNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolClassTemplate"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassTemplate"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachinePoolClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3557,7 +3612,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClassNamingStrategy(ref } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClassTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachinePoolClassTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3568,21 +3623,21 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClassTemplate(ref commo SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the MachinePool. At runtime this metadata is merged with the corresponding metadata from the topology.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "bootstrap": { SchemaProps: spec.SchemaProps{ Description: "bootstrap contains the bootstrap template reference to be used for the creation of the Machines in the MachinePool.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"), }, }, "infrastructure": { SchemaProps: spec.SchemaProps{ Description: "infrastructure contains the infrastructure template reference to be used for the creation of the MachinePool.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"), }, }, }, @@ -3590,11 +3645,259 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolClassTemplate(ref commo }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachinePoolList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePoolList contains a list of MachinePool.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of MachinePools.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePool"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePool"}, + } +} + +func schema_cluster_api_api_core_v1beta1_MachinePoolSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePoolSpec defines the desired state of MachinePool.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusterName": { + SchemaProps: spec.SchemaProps{ + Description: "clusterName is the name of the Cluster this object belongs to.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas is the number of desired machines. Defaults to 1. This is a pointer to distinguish between explicit zero and not specified.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "template describes the machines that will be created.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"), + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "minReadySeconds is the 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)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "providerIDList": { + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "failureDomains": { + SchemaProps: spec.SchemaProps{ + Description: "failureDomains is the list of failure domains this MachinePool should be attached to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"clusterName", "template"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"}, + } +} + +func schema_cluster_api_api_core_v1beta1_MachinePoolStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePoolStatus defines the observed state of MachinePool.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeRefs": { + SchemaProps: spec.SchemaProps{ + Description: "nodeRefs will point to the corresponding Nodes if it they exist.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas is the most recently observed number of replicas.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is \"Ready\".", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachinePool.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "unavailableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "unavailableReplicas is the 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.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failureReason": { + SchemaProps: spec.SchemaProps{ + Description: "failureReason indicates that there is a problem reconciling the state, and will be set to a token value suitable for programmatic interpretation.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", + Type: []string{"string"}, + Format: "", + }, + }, + "failureMessage": { + SchemaProps: spec.SchemaProps{ + Description: "failureMessage indicates that there is a problem reconciling the state, and will be set to a descriptive error message.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", + Type: []string{"string"}, + Format: "", + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "phase represents the current phase of cluster actuation.", + Type: []string{"string"}, + Format: "", + }, + }, + "bootstrapReady": { + SchemaProps: spec.SchemaProps{ + Description: "bootstrapReady is the state of the bootstrap provider.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "infrastructureReady": { + SchemaProps: spec.SchemaProps{ + Description: "infrastructureReady is the state of the infrastructure provider.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the latest generation observed by the controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "conditions define the current service state of the MachinePool.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), + }, + }, + }, + }, + }, + "v1beta2": { + SchemaProps: spec.SchemaProps{ + Description: "v1beta2 groups all the fields that will be added or modified in MachinePool's status with the V1Beta2 version.", + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolV1Beta2Status"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolV1Beta2Status"}, + } +} + +func schema_cluster_api_api_core_v1beta1_MachinePoolTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3605,7 +3908,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolTopology(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the MachinePool. At runtime this metadata is merged with the corresponding metadata from the ClusterClass.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "class": { @@ -3674,7 +3977,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolTopology(ref common.Ref "variables": { SchemaProps: spec.SchemaProps{ Description: "variables can be used to customize the MachinePool through patches.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolVariables"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolVariables"), }, }, }, @@ -3682,11 +3985,69 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolTopology(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, + } +} + +func schema_cluster_api_api_core_v1beta1_MachinePoolV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePoolV1Beta2Status groups all the fields that will be added or modified in MachinePoolStatus with the V1Beta2 version. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "conditions represents the observations of a MachinePool's current state. Known condition types are Available, BootstrapConfigReady, InfrastructureReady, MachinesReady, MachinesUpToDate, ScalingUp, ScalingDown, Remediating, Deleting, Paused.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + }, + }, + }, + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when Machine's Ready condition is true.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "availableReplicas is the number of available replicas for this MachinePool. A machine is considered available when Machine's Available condition is true.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "upToDateReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "upToDateReplicas is the number of up-to-date replicas targeted by this MachinePool. A machine is considered up-to-date when Machine's UpToDate condition is true.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachinePoolVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3709,7 +4070,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolVariables(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"), }, }, }, @@ -3719,11 +4080,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachinePoolVariables(ref common.Re }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterVariable"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineReadinessGate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineReadinessGate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3752,7 +4113,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineReadinessGate(ref common.Re } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineRollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineRollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3786,7 +4147,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineRollingUpdateDeployment(ref } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSet(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3818,25 +4179,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSet(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of MachineSet.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineSetSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the observed state of MachineSet.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineSetStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta1.MachineSetSpec", "sigs.k8s.io/cluster-api/api/v1beta1.MachineSetStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3872,7 +4233,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetList(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineSet"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSet"), }, }, }, @@ -3883,11 +4244,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetList(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta1.MachineSet"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSet"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3934,13 +4295,13 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetSpec(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "template is the object that describes the machine that will be created if insufficient replicas are detected. Object references to custom resources are treated as templates.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineTemplateSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"), }, }, "machineNamingStrategy": { SchemaProps: spec.SchemaProps{ Description: "machineNamingStrategy allows changing the naming pattern used when creating Machines. Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy"), }, }, }, @@ -3948,11 +4309,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetSpec(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/api/v1beta1.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta1.MachineTemplateSpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4027,7 +4388,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetStatus(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), }, }, }, @@ -4036,18 +4397,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetStatus(ref common.Refere "v1beta2": { SchemaProps: spec.SchemaProps{ Description: "v1beta2 groups all the fields that will be added or modified in MachineSet's status with the V1Beta2 version.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineSetV1Beta2Status"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetV1Beta2Status"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/v1beta1.MachineSetV1Beta2Status"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetV1Beta2Status"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineSetV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4105,7 +4466,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetV1Beta2Status(ref common } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4124,7 +4485,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSpec(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "bootstrap is a reference to a local struct which encapsulates fields to configure the Machine’s bootstrapping mechanism.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Bootstrap"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Bootstrap"), }, }, "infrastructureRef": { @@ -4171,7 +4532,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSpec(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"), }, }, }, @@ -4200,11 +4561,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSpec(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta1.Bootstrap", "sigs.k8s.io/cluster-api/api/v1beta1.MachineReadinessGate"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.Bootstrap", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4251,7 +4612,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineStatus(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineAddress"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineAddress"), }, }, }, @@ -4301,7 +4662,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineStatus(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"), }, }, }, @@ -4310,24 +4671,24 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineStatus(ref common.Reference "deletion": { SchemaProps: spec.SchemaProps{ Description: "deletion contains information relating to removal of the Machine. Only present when the Machine has a deletionTimestamp and drain or wait for volume detach started.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeletionStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeletionStatus"), }, }, "v1beta2": { SchemaProps: spec.SchemaProps{ Description: "v1beta2 groups all the fields that will be added or modified in Machine's status with the V1Beta2 version.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineV1Beta2Status"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineV1Beta2Status"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/v1beta1.MachineAddress", "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeletionStatus", "sigs.k8s.io/cluster-api/api/v1beta1.MachineV1Beta2Status"}, + "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineAddress", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeletionStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineV1Beta2Status"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4338,25 +4699,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineTemplateSpec(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the 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", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.MachineSpec", "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_MachineV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_MachineV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4393,7 +4754,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineV1Beta2Status(ref common.Re } } -func schema_sigsk8sio_cluster_api_api_v1beta1_NetworkRanges(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_NetworkRanges(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4422,7 +4783,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_NetworkRanges(ref common.Reference } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4467,7 +4828,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ObjectMeta(ref common.ReferenceCal } } -func schema_sigsk8sio_cluster_api_api_v1beta1_PatchDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_PatchDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4478,7 +4839,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_PatchDefinition(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "selector defines on which templates the patch should be applied.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.PatchSelector"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelector"), }, }, "jsonPatches": { @@ -4489,7 +4850,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_PatchDefinition(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.JSONPatch"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatch"), }, }, }, @@ -4500,11 +4861,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_PatchDefinition(ref common.Referen }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.JSONPatch", "sigs.k8s.io/cluster-api/api/v1beta1.PatchSelector"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatch", "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelector"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_PatchSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4531,7 +4892,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelector(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "matchResources selects templates based on where they are referenced.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.PatchSelectorMatch"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatch"), }, }, }, @@ -4539,11 +4900,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelector(ref common.Reference }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.PatchSelectorMatch"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatch"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelectorMatch(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_PatchSelectorMatch(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4567,24 +4928,24 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelectorMatch(ref common.Refe "machineDeploymentClass": { SchemaProps: spec.SchemaProps{ Description: "machineDeploymentClass selects templates referenced in specific MachineDeploymentClasses in .spec.workers.machineDeployments.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.PatchSelectorMatchMachineDeploymentClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachineDeploymentClass"), }, }, "machinePoolClass": { SchemaProps: spec.SchemaProps{ Description: "machinePoolClass selects templates referenced in specific MachinePoolClasses in .spec.workers.machinePools.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.PatchSelectorMatchMachinePoolClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachinePoolClass"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.PatchSelectorMatchMachineDeploymentClass", "sigs.k8s.io/cluster-api/api/v1beta1.PatchSelectorMatchMachinePoolClass"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachineDeploymentClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachinePoolClass"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelectorMatchMachineDeploymentClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_PatchSelectorMatchMachineDeploymentClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4612,7 +4973,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelectorMatchMachineDeploymen } } -func schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelectorMatchMachinePoolClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_PatchSelectorMatchMachinePoolClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4640,7 +5001,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_PatchSelectorMatchMachinePoolClass } } -func schema_sigsk8sio_cluster_api_api_v1beta1_RemediationStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_RemediationStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4661,7 +5022,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_RemediationStrategy(ref common.Ref } } -func schema_sigsk8sio_cluster_api_api_v1beta1_Topology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_Topology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4701,13 +5062,13 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_Topology(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "controlPlane describes the cluster control plane.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopology"), }, }, "workers": { SchemaProps: spec.SchemaProps{ Description: "workers encapsulates the different constructs that form the worker nodes for the cluster.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.WorkersTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersTopology"), }, }, "variables": { @@ -4726,7 +5087,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_Topology(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"), }, }, }, @@ -4737,11 +5098,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_Topology(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/v1beta1.ClusterVariable", "sigs.k8s.io/cluster-api/api/v1beta1.ControlPlaneTopology", "sigs.k8s.io/cluster-api/api/v1beta1.WorkersTopology"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersTopology"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_UnhealthyCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_UnhealthyCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4779,7 +5140,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_UnhealthyCondition(ref common.Refe } } -func schema_sigsk8sio_cluster_api_api_v1beta1_ValidationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_ValidationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4830,7 +5191,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ValidationRule(ref common.Referenc } } -func schema_sigsk8sio_cluster_api_api_v1beta1_VariableSchema(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_VariableSchema(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4841,7 +5202,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_VariableSchema(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "openAPIV3Schema defines the schema of a variable via OpenAPI v3 schema. The schema is a subset of the schema used in Kubernetes CRDs.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"), }, }, }, @@ -4849,11 +5210,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_VariableSchema(ref common.Referenc }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.JSONSchemaProps"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_VariableSchemaMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_VariableSchemaMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4898,7 +5259,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_VariableSchemaMetadata(ref common. } } -func schema_sigsk8sio_cluster_api_api_v1beta1_WorkersClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_WorkersClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4921,7 +5282,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_WorkersClass(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClass"), }, }, }, @@ -4943,7 +5304,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_WorkersClass(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClass"), }, }, }, @@ -4953,11 +5314,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_WorkersClass(ref common.ReferenceC }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentClass", "sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolClass"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClass"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta1_WorkersStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_WorkersStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -5005,7 +5366,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_WorkersStatus(ref common.Reference } } -func schema_sigsk8sio_cluster_api_api_v1beta1_WorkersTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta1_WorkersTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -5028,7 +5389,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_WorkersTopology(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentTopology"), }, }, }, @@ -5050,7 +5411,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_WorkersTopology(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolTopology"), }, }, }, @@ -5060,6 +5421,6 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_WorkersTopology(ref common.Referen }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.MachineDeploymentTopology", "sigs.k8s.io/cluster-api/api/v1beta1.MachinePoolTopology"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolTopology"}, } } diff --git a/controlplane/kubeadm/api/v1beta2/.import-restrictions b/api/core/v1beta2/.import-restrictions similarity index 100% rename from controlplane/kubeadm/api/v1beta2/.import-restrictions rename to api/core/v1beta2/.import-restrictions diff --git a/api/v1beta2/cluster_phase_types.go b/api/core/v1beta2/cluster_phase_types.go similarity index 100% rename from api/v1beta2/cluster_phase_types.go rename to api/core/v1beta2/cluster_phase_types.go diff --git a/api/v1beta2/cluster_types.go b/api/core/v1beta2/cluster_types.go similarity index 100% rename from api/v1beta2/cluster_types.go rename to api/core/v1beta2/cluster_types.go diff --git a/api/v1beta2/clusterclass_types.go b/api/core/v1beta2/clusterclass_types.go similarity index 99% rename from api/v1beta2/clusterclass_types.go rename to api/core/v1beta2/clusterclass_types.go index 5630ef21b7aa..fecf110b961c 100644 --- a/api/v1beta2/clusterclass_types.go +++ b/api/core/v1beta2/clusterclass_types.go @@ -71,6 +71,7 @@ const ( // +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. +// NOTE: This CRD can only be used if the ClusterTopology feature gate is enabled. type ClusterClass struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. @@ -891,7 +892,7 @@ type ValidationRule struct { // +optional // +kubebuilder:validation:Enum=FieldValueInvalid;FieldValueForbidden;FieldValueRequired;FieldValueDuplicate // +kubebuilder:default=FieldValueInvalid - // +default=ref(sigs.k8s.io/cluster-api/api/v1beta2.FieldValueInvalid) + // +default=ref(sigs.k8s.io/cluster-api/api/core/v1beta2.FieldValueInvalid) Reason FieldValueErrorReason `json:"reason,omitempty"` // fieldPath represents the field path returned when the validation fails. // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. diff --git a/api/v1beta2/common_types.go b/api/core/v1beta2/common_types.go similarity index 100% rename from api/v1beta2/common_types.go rename to api/core/v1beta2/common_types.go diff --git a/api/v1beta2/condition_consts.go b/api/core/v1beta2/condition_consts.go similarity index 100% rename from api/v1beta2/condition_consts.go rename to api/core/v1beta2/condition_consts.go diff --git a/api/v1beta2/condition_types.go b/api/core/v1beta2/condition_types.go similarity index 100% rename from api/v1beta2/condition_types.go rename to api/core/v1beta2/condition_types.go diff --git a/api/v1beta2/conversion.go b/api/core/v1beta2/conversion.go similarity index 95% rename from api/v1beta2/conversion.go rename to api/core/v1beta2/conversion.go index 9a1453d7bd8c..eeee691f499d 100644 --- a/api/v1beta2/conversion.go +++ b/api/core/v1beta2/conversion.go @@ -22,3 +22,4 @@ func (*Machine) Hub() {} func (*MachineSet) Hub() {} func (*MachineDeployment) Hub() {} func (*MachineHealthCheck) Hub() {} +func (*MachinePool) Hub() {} diff --git a/api/v1beta2/doc.go b/api/core/v1beta2/doc.go similarity index 100% rename from api/v1beta2/doc.go rename to api/core/v1beta2/doc.go diff --git a/api/v1beta2/groupversion_info.go b/api/core/v1beta2/groupversion_info.go similarity index 100% rename from api/v1beta2/groupversion_info.go rename to api/core/v1beta2/groupversion_info.go diff --git a/api/v1beta2/index/.import-restrictions b/api/core/v1beta2/index/.import-restrictions similarity index 100% rename from api/v1beta2/index/.import-restrictions rename to api/core/v1beta2/index/.import-restrictions diff --git a/api/v1beta2/index/cluster.go b/api/core/v1beta2/index/cluster.go similarity index 98% rename from api/v1beta2/index/cluster.go rename to api/core/v1beta2/index/cluster.go index 592a06dd2008..5787622f635b 100644 --- a/api/v1beta2/index/cluster.go +++ b/api/core/v1beta2/index/cluster.go @@ -24,7 +24,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( diff --git a/api/v1beta2/index/cluster_test.go b/api/core/v1beta2/index/cluster_test.go similarity index 97% rename from api/v1beta2/index/cluster_test.go rename to api/core/v1beta2/index/cluster_test.go index 1236ae186c3a..9033e8114d19 100644 --- a/api/v1beta2/index/cluster_test.go +++ b/api/core/v1beta2/index/cluster_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestClusterByClusterClassRef(t *testing.T) { diff --git a/api/v1beta2/index/index.go b/api/core/v1beta2/index/index.go similarity index 100% rename from api/v1beta2/index/index.go rename to api/core/v1beta2/index/index.go diff --git a/api/v1beta2/index/machine.go b/api/core/v1beta2/index/machine.go similarity index 97% rename from api/v1beta2/index/machine.go rename to api/core/v1beta2/index/machine.go index b81ce2d98f2a..4c7f23495b11 100644 --- a/api/v1beta2/index/machine.go +++ b/api/core/v1beta2/index/machine.go @@ -25,7 +25,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( diff --git a/api/v1beta2/index/machine_test.go b/api/core/v1beta2/index/machine_test.go similarity index 97% rename from api/v1beta2/index/machine_test.go rename to api/core/v1beta2/index/machine_test.go index 07916d188fe0..708713145269 100644 --- a/api/v1beta2/index/machine_test.go +++ b/api/core/v1beta2/index/machine_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestIndexMachineByNodeName(t *testing.T) { diff --git a/api/v1beta2/index/machinepool.go b/api/core/v1beta2/index/machinepool.go similarity index 90% rename from api/v1beta2/index/machinepool.go rename to api/core/v1beta2/index/machinepool.go index 15ade0fea4d9..f5eb9267d476 100644 --- a/api/v1beta2/index/machinepool.go +++ b/api/core/v1beta2/index/machinepool.go @@ -24,7 +24,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( @@ -39,7 +39,7 @@ const ( // ByMachinePoolNode adds the machinepool node name index to the // managers cache. func ByMachinePoolNode(ctx context.Context, mgr ctrl.Manager) error { - if err := mgr.GetCache().IndexField(ctx, &expv1.MachinePool{}, + if err := mgr.GetCache().IndexField(ctx, &clusterv1.MachinePool{}, MachinePoolNodeNameField, MachinePoolByNodeName, ); err != nil { @@ -51,7 +51,7 @@ func ByMachinePoolNode(ctx context.Context, mgr ctrl.Manager) error { // MachinePoolByNodeName contains the logic to index MachinePools by Node name. func MachinePoolByNodeName(o client.Object) []string { - machinepool, ok := o.(*expv1.MachinePool) + machinepool, ok := o.(*clusterv1.MachinePool) if !ok { panic(fmt.Sprintf("Expected a MachinePool but got a %T", o)) } @@ -70,7 +70,7 @@ func MachinePoolByNodeName(o client.Object) []string { // ByMachinePoolProviderID adds the machinepool providerID index to the // managers cache. func ByMachinePoolProviderID(ctx context.Context, mgr ctrl.Manager) error { - if err := mgr.GetCache().IndexField(ctx, &expv1.MachinePool{}, + if err := mgr.GetCache().IndexField(ctx, &clusterv1.MachinePool{}, MachinePoolProviderIDField, machinePoolByProviderID, ); err != nil { @@ -81,7 +81,7 @@ func ByMachinePoolProviderID(ctx context.Context, mgr ctrl.Manager) error { } func machinePoolByProviderID(o client.Object) []string { - machinepool, ok := o.(*expv1.MachinePool) + machinepool, ok := o.(*clusterv1.MachinePool) if !ok { panic(fmt.Sprintf("Expected a MachinePool but got a %T", o)) } diff --git a/api/v1beta2/index/machinepool_test.go b/api/core/v1beta2/index/machinepool_test.go similarity index 86% rename from api/v1beta2/index/machinepool_test.go rename to api/core/v1beta2/index/machinepool_test.go index 936235710330..47cfec29886d 100644 --- a/api/v1beta2/index/machinepool_test.go +++ b/api/core/v1beta2/index/machinepool_test.go @@ -23,7 +23,7 @@ import ( corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestIndexMachinePoolByNodeName(t *testing.T) { @@ -34,13 +34,13 @@ func TestIndexMachinePoolByNodeName(t *testing.T) { }{ { name: "when the machinepool has no NodeRef", - object: &expv1.MachinePool{}, + object: &clusterv1.MachinePool{}, expected: []string{}, }, { name: "when the machinepool has valid NodeRefs", - object: &expv1.MachinePool{ - Status: expv1.MachinePoolStatus{ + object: &clusterv1.MachinePool{ + Status: clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ { Name: "node1", @@ -75,13 +75,13 @@ func TestIndexMachinePoolByProviderID(t *testing.T) { }{ { name: "MachinePool has no providerID", - object: &expv1.MachinePool{}, + object: &clusterv1.MachinePool{}, expected: nil, }, { name: "MachinePool has invalid providerID", - object: &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + object: &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ ProviderIDList: []string{""}, }, }, @@ -89,8 +89,8 @@ func TestIndexMachinePoolByProviderID(t *testing.T) { }, { name: "MachinePool has valid providerIDs", - object: &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + object: &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ ProviderIDList: []string{validProviderID, otherValidProviderID}, }, }, diff --git a/api/v1beta2/index/node.go b/api/core/v1beta2/index/node.go similarity index 100% rename from api/v1beta2/index/node.go rename to api/core/v1beta2/index/node.go diff --git a/api/v1beta2/index/node_test.go b/api/core/v1beta2/index/node_test.go similarity index 100% rename from api/v1beta2/index/node_test.go rename to api/core/v1beta2/index/node_test.go diff --git a/api/v1beta2/machine_phase_types.go b/api/core/v1beta2/machine_phase_types.go similarity index 100% rename from api/v1beta2/machine_phase_types.go rename to api/core/v1beta2/machine_phase_types.go diff --git a/api/v1beta2/machine_types.go b/api/core/v1beta2/machine_types.go similarity index 100% rename from api/v1beta2/machine_types.go rename to api/core/v1beta2/machine_types.go diff --git a/api/v1beta2/machinedeployment_types.go b/api/core/v1beta2/machinedeployment_types.go similarity index 100% rename from api/v1beta2/machinedeployment_types.go rename to api/core/v1beta2/machinedeployment_types.go diff --git a/api/v1beta2/machinedrainrules_types.go b/api/core/v1beta2/machinedrainrules_types.go similarity index 100% rename from api/v1beta2/machinedrainrules_types.go rename to api/core/v1beta2/machinedrainrules_types.go diff --git a/api/v1beta2/machinehealthcheck_types.go b/api/core/v1beta2/machinehealthcheck_types.go similarity index 100% rename from api/v1beta2/machinehealthcheck_types.go rename to api/core/v1beta2/machinehealthcheck_types.go diff --git a/exp/api/v1beta2/machinepool_types.go b/api/core/v1beta2/machinepool_types.go similarity index 87% rename from exp/api/v1beta2/machinepool_types.go rename to api/core/v1beta2/machinepool_types.go index 27de6261a765..0f16263bf194 100644 --- a/exp/api/v1beta2/machinepool_types.go +++ b/api/core/v1beta2/machinepool_types.go @@ -20,7 +20,6 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" capierrors "sigs.k8s.io/cluster-api/errors" ) @@ -29,6 +28,42 @@ const ( MachinePoolFinalizer = "machinepool.cluster.x-k8s.io" ) +/* +NOTE: we are commenting const for MachinePool's V1Beta2 conditions and reasons because not yet implemented for the 1.9 CAPI release. +However, we are keeping the v1beta2 struct in the MachinePool struct because the code that will collect conditions and replica +counters at cluster level is already implemented. + +// Conditions that will be used for the MachinePool object in v1Beta2 API version. +const ( + // MachinePoolAvailableCondition is true when InfrastructureReady and available replicas >= desired replicas. + MachinePoolAvailableCondition = clusterv1.AvailableCondition + + // MachinePoolBootstrapConfigReadyCondition mirrors the corresponding condition from the MachinePool's BootstrapConfig resource. + MachinePoolBootstrapConfigReadyCondition = clusterv1.BootstrapConfigReadyCondition + + // MachinePoolInfrastructureReadyCondition mirrors the corresponding condition from the MachinePool's Infrastructure resource. + MachinePoolInfrastructureReadyCondition = clusterv1.InfrastructureReadyCondition + + // MachinePoolMachinesReadyCondition surfaces detail of issues on the controlled machines, if any. + MachinePoolMachinesReadyCondition = clusterv1.MachinesReadyCondition + + // MachinePoolMachinesUpToDateCondition surfaces details of controlled machines not up to date, if any. + MachinePoolMachinesUpToDateCondition = clusterv1.MachinesUpToDateCondition + + // MachinePoolScalingUpCondition is true if available replicas < desired replicas. + MachinePoolScalingUpCondition = clusterv1.ScalingUpCondition + + // MachinePoolScalingDownCondition is true if replicas > desired replicas. + MachinePoolScalingDownCondition = clusterv1.ScalingDownCondition + + // MachinePoolRemediatingCondition surfaces details about ongoing remediation of the controlled machines, if any. + MachinePoolRemediatingCondition = clusterv1.RemediatingCondition + + // MachinePoolDeletingCondition surfaces details about ongoing deletion of the controlled machines. + MachinePoolDeletingCondition = clusterv1.DeletingCondition +). +*/ + // ANCHOR: MachinePoolSpec // MachinePoolSpec defines the desired state of MachinePool. @@ -46,7 +81,7 @@ type MachinePoolSpec struct { // template describes the machines that will be created. // +required - Template clusterv1.MachineTemplateSpec `json:"template"` + Template MachineTemplateSpec `json:"template"` // 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. @@ -151,7 +186,7 @@ type MachinePoolV1Beta1DeprecatedStatus struct { // Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. // // +optional - Conditions clusterv1.Conditions `json:"conditions,omitempty"` + Conditions Conditions `json:"conditions,omitempty"` // failureReason indicates that there is a problem reconciling the state, and // will be set to a token value suitable for programmatic interpretation. @@ -298,6 +333,7 @@ func (m *MachinePoolStatus) GetTypedPhase() MachinePoolPhase { // +k8s:conversion-gen=false // MachinePool is the Schema for the machinepools API. +// NOTE: This CRD can only be used if the MachinePool feature gate is enabled. type MachinePool struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. @@ -314,7 +350,7 @@ type MachinePool struct { } // GetV1Beta1Conditions returns the set of conditions for this object. -func (m *MachinePool) GetV1Beta1Conditions() clusterv1.Conditions { +func (m *MachinePool) GetV1Beta1Conditions() Conditions { if m.Status.Deprecated == nil || m.Status.Deprecated.V1Beta1 == nil { return nil } @@ -322,7 +358,7 @@ func (m *MachinePool) GetV1Beta1Conditions() clusterv1.Conditions { } // SetV1Beta1Conditions sets the conditions on this object. -func (m *MachinePool) SetV1Beta1Conditions(conditions clusterv1.Conditions) { +func (m *MachinePool) SetV1Beta1Conditions(conditions Conditions) { if m.Status.Deprecated == nil { m.Status.Deprecated = &MachinePoolDeprecatedStatus{} } diff --git a/api/v1beta2/machineset_types.go b/api/core/v1beta2/machineset_types.go similarity index 100% rename from api/v1beta2/machineset_types.go rename to api/core/v1beta2/machineset_types.go diff --git a/api/v1beta2/v1beta1_condition_consts.go b/api/core/v1beta2/v1beta1_condition_consts.go similarity index 97% rename from api/v1beta2/v1beta1_condition_consts.go rename to api/core/v1beta2/v1beta1_condition_consts.go index ad212ae5523c..b6445dc0b5fe 100644 --- a/api/v1beta2/v1beta1_condition_consts.go +++ b/api/core/v1beta2/v1beta1_condition_consts.go @@ -358,3 +358,14 @@ const ( // if the references are up-to-date. ClusterClassRefVersionsUpToDateInternalErrorV1Beta1Reason = "InternalError" ) + +// Conditions and condition Reasons for the MachinePool object. + +const ( + // ReplicasReadyV1Beta1Condition reports an aggregate of current status of the replicas controlled by the MachinePool. + ReplicasReadyV1Beta1Condition ConditionType = "ReplicasReady" + + // WaitingForReplicasReadyV1Beta1Reason (Severity=Info) documents a machinepool waiting for the required replicas + // to be ready. + WaitingForReplicasReadyV1Beta1Reason = "WaitingForReplicasReady" +) diff --git a/api/v1beta2/zz_generated.deepcopy.go b/api/core/v1beta2/zz_generated.deepcopy.go similarity index 93% rename from api/v1beta2/zz_generated.deepcopy.go rename to api/core/v1beta2/zz_generated.deepcopy.go index 53af31b9db0b..4b712e9ba7ee 100644 --- a/api/v1beta2/zz_generated.deepcopy.go +++ b/api/core/v1beta2/zz_generated.deepcopy.go @@ -2153,6 +2153,33 @@ func (in *MachineNamingStrategy) DeepCopy() *MachineNamingStrategy { return out } +// 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 *MachinePoolClass) DeepCopyInto(out *MachinePoolClass) { *out = *in @@ -2237,6 +2264,161 @@ func (in *MachinePoolClassTemplate) DeepCopy() *MachinePoolClassTemplate { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachinePoolDeprecatedStatus) DeepCopyInto(out *MachinePoolDeprecatedStatus) { + *out = *in + if in.V1Beta1 != nil { + in, out := &in.V1Beta1, &out.V1Beta1 + *out = new(MachinePoolV1Beta1DeprecatedStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolDeprecatedStatus. +func (in *MachinePoolDeprecatedStatus) DeepCopy() *MachinePoolDeprecatedStatus { + if in == nil { + return nil + } + out := new(MachinePoolDeprecatedStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachinePoolInitializationStatus) DeepCopyInto(out *MachinePoolInitializationStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolInitializationStatus. +func (in *MachinePoolInitializationStatus) DeepCopy() *MachinePoolInitializationStatus { + if in == nil { + return nil + } + out := new(MachinePoolInitializationStatus) + in.DeepCopyInto(out) + return out +} + +// 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.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.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(MachinePoolInitializationStatus) + **out = **in + } + if in.NodeRefs != nil { + in, out := &in.NodeRefs, &out.NodeRefs + *out = make([]v1.ObjectReference, len(*in)) + copy(*out, *in) + } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.ReadyReplicas != nil { + in, out := &in.ReadyReplicas, &out.ReadyReplicas + *out = new(int32) + **out = **in + } + if in.AvailableReplicas != nil { + in, out := &in.AvailableReplicas, &out.AvailableReplicas + *out = new(int32) + **out = **in + } + if in.UpToDateReplicas != nil { + in, out := &in.UpToDateReplicas, &out.UpToDateReplicas + *out = new(int32) + **out = **in + } + if in.Deprecated != nil { + in, out := &in.Deprecated, &out.Deprecated + *out = new(MachinePoolDeprecatedStatus) + (*in).DeepCopyInto(*out) + } +} + +// 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 +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachinePoolTopology) DeepCopyInto(out *MachinePoolTopology) { *out = *in @@ -2288,6 +2470,38 @@ func (in *MachinePoolTopology) DeepCopy() *MachinePoolTopology { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachinePoolV1Beta1DeprecatedStatus) DeepCopyInto(out *MachinePoolV1Beta1DeprecatedStatus) { + *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]) + } + } + 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 + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolV1Beta1DeprecatedStatus. +func (in *MachinePoolV1Beta1DeprecatedStatus) DeepCopy() *MachinePoolV1Beta1DeprecatedStatus { + if in == nil { + return nil + } + out := new(MachinePoolV1Beta1DeprecatedStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachinePoolVariables) DeepCopyInto(out *MachinePoolVariables) { *out = *in diff --git a/api/v1beta2/zz_generated.openapi.go b/api/core/v1beta2/zz_generated.openapi.go similarity index 78% rename from api/v1beta2/zz_generated.openapi.go rename to api/core/v1beta2/zz_generated.openapi.go index 57fa1f7c42d9..db99ee179bee 100644 --- a/api/v1beta2/zz_generated.openapi.go +++ b/api/core/v1beta2/zz_generated.openapi.go @@ -28,114 +28,121 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "sigs.k8s.io/cluster-api/api/v1beta2.APIEndpoint": schema_sigsk8sio_cluster_api_api_v1beta2_APIEndpoint(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.Bootstrap": schema_sigsk8sio_cluster_api_api_v1beta2_Bootstrap(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.Cluster": schema_sigsk8sio_cluster_api_api_v1beta2_Cluster(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterAvailabilityGate": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterAvailabilityGate(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClass": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassDeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassDeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassList": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassList(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassPatch": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassPatch(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassRef": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassRef(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassSpec": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassStatus": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassStatusVariable": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatusVariable(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassStatusVariableDefinition": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatusVariableDefinition(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassV1Beta1DeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassV1Beta1DeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassVariable": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassVariable(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassVariableMetadata": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassVariableMetadata(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterControlPlaneStatus": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterControlPlaneStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterDeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterDeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterInitializationStatus": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterInitializationStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterList": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterList(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterNetwork": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterNetwork(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterSpec": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterStatus": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterV1Beta1DeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterV1Beta1DeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterVariable": schema_sigsk8sio_cluster_api_api_v1beta2_ClusterVariable(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.Condition": schema_sigsk8sio_cluster_api_api_v1beta2_Condition(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneClass": schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneClassNamingStrategy": schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneClassNamingStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneTopology": schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneTopology(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneVariables": schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneVariables(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ExternalPatchDefinition": schema_sigsk8sio_cluster_api_api_v1beta2_ExternalPatchDefinition(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.FailureDomainSpec": schema_sigsk8sio_cluster_api_api_v1beta2_FailureDomainSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.InfrastructureClass": schema_sigsk8sio_cluster_api_api_v1beta2_InfrastructureClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.InfrastructureClassNamingStrategy": schema_sigsk8sio_cluster_api_api_v1beta2_InfrastructureClassNamingStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.JSONPatch": schema_sigsk8sio_cluster_api_api_v1beta2_JSONPatch(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.JSONPatchValue": schema_sigsk8sio_cluster_api_api_v1beta2_JSONPatchValue(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps": schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.LocalObjectTemplate": schema_sigsk8sio_cluster_api_api_v1beta2_LocalObjectTemplate(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.Machine": schema_sigsk8sio_cluster_api_api_v1beta2_Machine(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineAddress": schema_sigsk8sio_cluster_api_api_v1beta2_MachineAddress(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeletionStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeletionStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeployment": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeployment(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentClass": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentClassNamingStrategy": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClassNamingStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentClassTemplate": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClassTemplate(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentDeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentDeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentList": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentList(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentSpec": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentStrategy": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentTopology": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentTopology(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentV1Beta1DeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentV1Beta1DeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentVariables": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentVariables(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRule": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRule(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRuleDrainConfig": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleDrainConfig(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRuleList": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleList(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRuleMachineSelector": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleMachineSelector(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRulePodSelector": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRulePodSelector(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRuleSpec": schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheck": schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheck(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckClass": schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckDeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckDeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckList": schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckList(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckSpec": schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckTopology": schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckTopology(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckV1Beta1DeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckV1Beta1DeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineInitializationStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineInitializationStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineList": schema_sigsk8sio_cluster_api_api_v1beta2_MachineList(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineNamingStrategy": schema_sigsk8sio_cluster_api_api_v1beta2_MachineNamingStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolClass": schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolClassNamingStrategy": schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClassNamingStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolClassTemplate": schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClassTemplate(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolTopology": schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolTopology(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolVariables": schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolVariables(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate": schema_sigsk8sio_cluster_api_api_v1beta2_MachineReadinessGate(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineRollingUpdateDeployment": schema_sigsk8sio_cluster_api_api_v1beta2_MachineRollingUpdateDeployment(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineSet": schema_sigsk8sio_cluster_api_api_v1beta2_MachineSet(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineSetDeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetDeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineSetList": schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetList(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineSetSpec": schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineSetStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineSetV1Beta1DeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetV1Beta1DeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineSpec": schema_sigsk8sio_cluster_api_api_v1beta2_MachineSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineTemplateSpec": schema_sigsk8sio_cluster_api_api_v1beta2_MachineTemplateSpec(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.MachineV1Beta1DeprecatedStatus": schema_sigsk8sio_cluster_api_api_v1beta2_MachineV1Beta1DeprecatedStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.NetworkRanges": schema_sigsk8sio_cluster_api_api_v1beta2_NetworkRanges(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta": schema_sigsk8sio_cluster_api_api_v1beta2_ObjectMeta(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.PatchDefinition": schema_sigsk8sio_cluster_api_api_v1beta2_PatchDefinition(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.PatchSelector": schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelector(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.PatchSelectorMatch": schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelectorMatch(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.PatchSelectorMatchMachineDeploymentClass": schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelectorMatchMachineDeploymentClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.PatchSelectorMatchMachinePoolClass": schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelectorMatchMachinePoolClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.RemediationStrategy": schema_sigsk8sio_cluster_api_api_v1beta2_RemediationStrategy(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.Topology": schema_sigsk8sio_cluster_api_api_v1beta2_Topology(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.UnhealthyNodeCondition": schema_sigsk8sio_cluster_api_api_v1beta2_UnhealthyNodeCondition(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.ValidationRule": schema_sigsk8sio_cluster_api_api_v1beta2_ValidationRule(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.VariableSchema": schema_sigsk8sio_cluster_api_api_v1beta2_VariableSchema(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.VariableSchemaMetadata": schema_sigsk8sio_cluster_api_api_v1beta2_VariableSchemaMetadata(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.WorkersClass": schema_sigsk8sio_cluster_api_api_v1beta2_WorkersClass(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.WorkersStatus": schema_sigsk8sio_cluster_api_api_v1beta2_WorkersStatus(ref), - "sigs.k8s.io/cluster-api/api/v1beta2.WorkersTopology": schema_sigsk8sio_cluster_api_api_v1beta2_WorkersTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.APIEndpoint": schema_cluster_api_api_core_v1beta2_APIEndpoint(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.Bootstrap": schema_cluster_api_api_core_v1beta2_Bootstrap(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.Cluster": schema_cluster_api_api_core_v1beta2_Cluster(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterAvailabilityGate": schema_cluster_api_api_core_v1beta2_ClusterAvailabilityGate(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClass": schema_cluster_api_api_core_v1beta2_ClusterClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassDeprecatedStatus": schema_cluster_api_api_core_v1beta2_ClusterClassDeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassList": schema_cluster_api_api_core_v1beta2_ClusterClassList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassPatch": schema_cluster_api_api_core_v1beta2_ClusterClassPatch(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassRef": schema_cluster_api_api_core_v1beta2_ClusterClassRef(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassSpec": schema_cluster_api_api_core_v1beta2_ClusterClassSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatus": schema_cluster_api_api_core_v1beta2_ClusterClassStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariable": schema_cluster_api_api_core_v1beta2_ClusterClassStatusVariable(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariableDefinition": schema_cluster_api_api_core_v1beta2_ClusterClassStatusVariableDefinition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_ClusterClassV1Beta1DeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariable": schema_cluster_api_api_core_v1beta2_ClusterClassVariable(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariableMetadata": schema_cluster_api_api_core_v1beta2_ClusterClassVariableMetadata(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterControlPlaneStatus": schema_cluster_api_api_core_v1beta2_ClusterControlPlaneStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterDeprecatedStatus": schema_cluster_api_api_core_v1beta2_ClusterDeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterInitializationStatus": schema_cluster_api_api_core_v1beta2_ClusterInitializationStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterList": schema_cluster_api_api_core_v1beta2_ClusterList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterNetwork": schema_cluster_api_api_core_v1beta2_ClusterNetwork(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterSpec": schema_cluster_api_api_core_v1beta2_ClusterSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterStatus": schema_cluster_api_api_core_v1beta2_ClusterStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_ClusterV1Beta1DeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterVariable": schema_cluster_api_api_core_v1beta2_ClusterVariable(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.Condition": schema_cluster_api_api_core_v1beta2_Condition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClass": schema_cluster_api_api_core_v1beta2_ControlPlaneClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassNamingStrategy": schema_cluster_api_api_core_v1beta2_ControlPlaneClassNamingStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopology": schema_cluster_api_api_core_v1beta2_ControlPlaneTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables": schema_cluster_api_api_core_v1beta2_ControlPlaneVariables(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ExternalPatchDefinition": schema_cluster_api_api_core_v1beta2_ExternalPatchDefinition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomainSpec": schema_cluster_api_api_core_v1beta2_FailureDomainSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.InfrastructureClass": schema_cluster_api_api_core_v1beta2_InfrastructureClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.InfrastructureClassNamingStrategy": schema_cluster_api_api_core_v1beta2_InfrastructureClassNamingStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.JSONPatch": schema_cluster_api_api_core_v1beta2_JSONPatch(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.JSONPatchValue": schema_cluster_api_api_core_v1beta2_JSONPatchValue(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps": schema_cluster_api_api_core_v1beta2_JSONSchemaProps(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.LocalObjectTemplate": schema_cluster_api_api_core_v1beta2_LocalObjectTemplate(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.Machine": schema_cluster_api_api_core_v1beta2_Machine(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineAddress": schema_cluster_api_api_core_v1beta2_MachineAddress(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionStatus": schema_cluster_api_api_core_v1beta2_MachineDeletionStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeployment": schema_cluster_api_api_core_v1beta2_MachineDeployment(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClass": schema_cluster_api_api_core_v1beta2_MachineDeploymentClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassNamingStrategy": schema_cluster_api_api_core_v1beta2_MachineDeploymentClassNamingStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassTemplate": schema_cluster_api_api_core_v1beta2_MachineDeploymentClassTemplate(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentDeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineDeploymentDeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentList": schema_cluster_api_api_core_v1beta2_MachineDeploymentList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentSpec": schema_cluster_api_api_core_v1beta2_MachineDeploymentSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStatus": schema_cluster_api_api_core_v1beta2_MachineDeploymentStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStrategy": schema_cluster_api_api_core_v1beta2_MachineDeploymentStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopology": schema_cluster_api_api_core_v1beta2_MachineDeploymentTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineDeploymentV1Beta1DeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentVariables": schema_cluster_api_api_core_v1beta2_MachineDeploymentVariables(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineDeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRule": schema_cluster_api_api_core_v1beta2_MachineDrainRule(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleDrainConfig": schema_cluster_api_api_core_v1beta2_MachineDrainRuleDrainConfig(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleList": schema_cluster_api_api_core_v1beta2_MachineDrainRuleList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleMachineSelector": schema_cluster_api_api_core_v1beta2_MachineDrainRuleMachineSelector(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRulePodSelector": schema_cluster_api_api_core_v1beta2_MachineDrainRulePodSelector(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleSpec": schema_cluster_api_api_core_v1beta2_MachineDrainRuleSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheck": schema_cluster_api_api_core_v1beta2_MachineHealthCheck(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckClass": schema_cluster_api_api_core_v1beta2_MachineHealthCheckClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckDeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineHealthCheckDeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckList": schema_cluster_api_api_core_v1beta2_MachineHealthCheckList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckSpec": schema_cluster_api_api_core_v1beta2_MachineHealthCheckSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckStatus": schema_cluster_api_api_core_v1beta2_MachineHealthCheckStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckTopology": schema_cluster_api_api_core_v1beta2_MachineHealthCheckTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineHealthCheckV1Beta1DeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineInitializationStatus": schema_cluster_api_api_core_v1beta2_MachineInitializationStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineList": schema_cluster_api_api_core_v1beta2_MachineList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNamingStrategy": schema_cluster_api_api_core_v1beta2_MachineNamingStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePool": schema_cluster_api_api_core_v1beta2_MachinePool(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClass": schema_cluster_api_api_core_v1beta2_MachinePoolClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassNamingStrategy": schema_cluster_api_api_core_v1beta2_MachinePoolClassNamingStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassTemplate": schema_cluster_api_api_core_v1beta2_MachinePoolClassTemplate(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolDeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachinePoolDeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolInitializationStatus": schema_cluster_api_api_core_v1beta2_MachinePoolInitializationStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolList": schema_cluster_api_api_core_v1beta2_MachinePoolList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolSpec": schema_cluster_api_api_core_v1beta2_MachinePoolSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolStatus": schema_cluster_api_api_core_v1beta2_MachinePoolStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolTopology": schema_cluster_api_api_core_v1beta2_MachinePoolTopology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachinePoolV1Beta1DeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolVariables": schema_cluster_api_api_core_v1beta2_MachinePoolVariables(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate": schema_cluster_api_api_core_v1beta2_MachineReadinessGate(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineRollingUpdateDeployment": schema_cluster_api_api_core_v1beta2_MachineRollingUpdateDeployment(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSet": schema_cluster_api_api_core_v1beta2_MachineSet(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetDeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineSetDeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetList": schema_cluster_api_api_core_v1beta2_MachineSetList(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetSpec": schema_cluster_api_api_core_v1beta2_MachineSetSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetStatus": schema_cluster_api_api_core_v1beta2_MachineSetStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineSetV1Beta1DeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSpec": schema_cluster_api_api_core_v1beta2_MachineSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineStatus": schema_cluster_api_api_core_v1beta2_MachineStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec": schema_cluster_api_api_core_v1beta2_MachineTemplateSpec(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineV1Beta1DeprecatedStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.NetworkRanges": schema_cluster_api_api_core_v1beta2_NetworkRanges(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta": schema_cluster_api_api_core_v1beta2_ObjectMeta(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchDefinition": schema_cluster_api_api_core_v1beta2_PatchDefinition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelector": schema_cluster_api_api_core_v1beta2_PatchSelector(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatch": schema_cluster_api_api_core_v1beta2_PatchSelectorMatch(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatchMachineDeploymentClass": schema_cluster_api_api_core_v1beta2_PatchSelectorMatchMachineDeploymentClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatchMachinePoolClass": schema_cluster_api_api_core_v1beta2_PatchSelectorMatchMachinePoolClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.RemediationStrategy": schema_cluster_api_api_core_v1beta2_RemediationStrategy(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.Topology": schema_cluster_api_api_core_v1beta2_Topology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition": schema_cluster_api_api_core_v1beta2_UnhealthyNodeCondition(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ValidationRule": schema_cluster_api_api_core_v1beta2_ValidationRule(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.VariableSchema": schema_cluster_api_api_core_v1beta2_VariableSchema(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.VariableSchemaMetadata": schema_cluster_api_api_core_v1beta2_VariableSchemaMetadata(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersClass": schema_cluster_api_api_core_v1beta2_WorkersClass(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersStatus": schema_cluster_api_api_core_v1beta2_WorkersStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersTopology": schema_cluster_api_api_core_v1beta2_WorkersTopology(ref), } } -func schema_sigsk8sio_cluster_api_api_v1beta2_APIEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_APIEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -165,7 +172,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_APIEndpoint(ref common.ReferenceCa } } -func schema_sigsk8sio_cluster_api_api_v1beta2_Bootstrap(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_Bootstrap(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -193,7 +200,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_Bootstrap(ref common.ReferenceCall } } -func schema_sigsk8sio_cluster_api_api_v1beta2_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -225,25 +232,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_Cluster(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of Cluster.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the observed state of Cluster.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterSpec", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterAvailabilityGate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterAvailabilityGate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -272,11 +279,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterAvailabilityGate(ref common } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ClusterClass is a template which can be used to create managed topologies.", + Description: "ClusterClass is a template which can be used to create managed topologies. NOTE: This CRD can only be used if the ClusterTopology feature gate is enabled.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -304,25 +311,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClass(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of ClusterClass.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the observed state of ClusterClass.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassSpec", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -332,18 +339,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassDeprecatedStatus(ref c "v1beta1": { SchemaProps: spec.SchemaProps{ Description: "v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassV1Beta1DeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassV1Beta1DeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassV1Beta1DeprecatedStatus"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassV1Beta1DeprecatedStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -379,7 +386,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassList(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClass"), }, }, }, @@ -390,11 +397,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassList(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClass"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClass"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassPatch(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassPatch(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -431,7 +438,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassPatch(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.PatchDefinition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.PatchDefinition"), }, }, }, @@ -440,7 +447,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassPatch(ref common.Refer "external": { SchemaProps: spec.SchemaProps{ Description: "external defines an external patch. Note: Exactly one of Definitions or External must be set.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ExternalPatchDefinition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ExternalPatchDefinition"), }, }, }, @@ -448,11 +455,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassPatch(ref common.Refer }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.ExternalPatchDefinition", "sigs.k8s.io/cluster-api/api/v1beta2.PatchDefinition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ExternalPatchDefinition", "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchDefinition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassRef(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassRef(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -481,7 +488,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassRef(ref common.Referen } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -504,7 +511,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassSpec(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterAvailabilityGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterAvailabilityGate"), }, }, }, @@ -514,21 +521,21 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassSpec(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "infrastructure is a reference to a local struct that holds the details for provisioning the infrastructure cluster for the Cluster.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.InfrastructureClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.InfrastructureClass"), }, }, "controlPlane": { SchemaProps: spec.SchemaProps{ Description: "controlPlane is a reference to a local struct that holds the details for provisioning the Control Plane for the Cluster.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClass"), }, }, "workers": { SchemaProps: spec.SchemaProps{ 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.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.WorkersClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersClass"), }, }, "variables": { @@ -539,7 +546,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassSpec(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariable"), }, }, }, @@ -553,7 +560,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassSpec(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassPatch"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassPatch"), }, }, }, @@ -563,11 +570,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassSpec(ref common.Refere }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/v1beta2.InfrastructureClass", "sigs.k8s.io/cluster-api/api/v1beta2.WorkersClass"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.InfrastructureClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersClass"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -604,7 +611,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatus(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassStatusVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariable"), }, }, }, @@ -620,18 +627,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatus(ref common.Refe "deprecated": { SchemaProps: spec.SchemaProps{ Description: "deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassDeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassDeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassDeprecatedStatus", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassStatusVariable"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariable"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatusVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassStatusVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -662,7 +669,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatusVariable(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassStatusVariableDefinition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariableDefinition"), }, }, }, @@ -673,11 +680,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatusVariable(ref com }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassStatusVariableDefinition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariableDefinition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatusVariableDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassStatusVariableDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -704,14 +711,14 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatusVariableDefiniti SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata of a variable. It can be used to add additional data for higher level tools to a ClusterClassVariable.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassVariableMetadata"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariableMetadata"), }, }, "schema": { SchemaProps: spec.SchemaProps{ Description: "schema defines the schema of the variable.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.VariableSchema"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.VariableSchema"), }, }, }, @@ -719,11 +726,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassStatusVariableDefiniti }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassVariableMetadata", "sigs.k8s.io/cluster-api/api/v1beta2.VariableSchema"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariableMetadata", "sigs.k8s.io/cluster-api/api/core/v1beta2.VariableSchema"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -738,7 +745,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassV1Beta1DeprecatedStatu Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"), }, }, }, @@ -748,11 +755,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassV1Beta1DeprecatedStatu }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.Condition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -779,14 +786,14 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassVariable(ref common.Re SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata of a variable. It can be used to add additional data for higher level tools to a ClusterClassVariable.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please use XMetadata in JSONSchemaProps instead.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassVariableMetadata"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariableMetadata"), }, }, "schema": { SchemaProps: spec.SchemaProps{ Description: "schema defines the schema of the variable.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.VariableSchema"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.VariableSchema"), }, }, }, @@ -794,11 +801,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassVariable(ref common.Re }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassVariableMetadata", "sigs.k8s.io/cluster-api/api/v1beta2.VariableSchema"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariableMetadata", "sigs.k8s.io/cluster-api/api/core/v1beta2.VariableSchema"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassVariableMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterClassVariableMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -843,7 +850,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterClassVariableMetadata(ref c } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterControlPlaneStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterControlPlaneStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -891,7 +898,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterControlPlaneStatus(ref comm } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -901,18 +908,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterDeprecatedStatus(ref common "v1beta1": { SchemaProps: spec.SchemaProps{ Description: "v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterV1Beta1DeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterV1Beta1DeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterV1Beta1DeprecatedStatus"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterV1Beta1DeprecatedStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterInitializationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterInitializationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -941,7 +948,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterInitializationStatus(ref co } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -977,7 +984,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.Cluster"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Cluster"), }, }, }, @@ -988,11 +995,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta2.Cluster"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.Cluster"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterNetwork(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterNetwork(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1009,13 +1016,13 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterNetwork(ref common.Referenc "services": { SchemaProps: spec.SchemaProps{ Description: "services is the network ranges from which service VIPs are allocated.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.NetworkRanges"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.NetworkRanges"), }, }, "pods": { SchemaProps: spec.SchemaProps{ Description: "pods is the network ranges from which Pod networks are allocated.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.NetworkRanges"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.NetworkRanges"), }, }, "serviceDomain": { @@ -1029,11 +1036,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterNetwork(ref common.Referenc }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.NetworkRanges"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.NetworkRanges"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1050,14 +1057,14 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterSpec(ref common.ReferenceCa "clusterNetwork": { SchemaProps: spec.SchemaProps{ Description: "clusterNetwork represents the cluster network configuration.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterNetwork"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterNetwork"), }, }, "controlPlaneEndpoint": { SchemaProps: spec.SchemaProps{ Description: "controlPlaneEndpoint represents the endpoint used to communicate with the control plane.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.APIEndpoint"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.APIEndpoint"), }, }, "controlPlaneRef": { @@ -1075,7 +1082,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterSpec(ref common.ReferenceCa "topology": { SchemaProps: spec.SchemaProps{ Description: "topology 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.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.Topology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Topology"), }, }, "availabilityGates": { @@ -1094,7 +1101,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterSpec(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterAvailabilityGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterAvailabilityGate"), }, }, }, @@ -1104,11 +1111,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterSpec(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/v1beta2.APIEndpoint", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterNetwork", "sigs.k8s.io/cluster-api/api/v1beta2.Topology"}, + "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta2.APIEndpoint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterNetwork", "sigs.k8s.io/cluster-api/api/core/v1beta2.Topology"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1140,19 +1147,19 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterStatus(ref common.Reference "initialization": { SchemaProps: spec.SchemaProps{ Description: "initialization provides observations of the Cluster initialization process. NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Cluster provisioning.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterInitializationStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterInitializationStatus"), }, }, "controlPlane": { SchemaProps: spec.SchemaProps{ Description: "controlPlane groups all the observations about Cluster's ControlPlane current state.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterControlPlaneStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterControlPlaneStatus"), }, }, "workers": { SchemaProps: spec.SchemaProps{ Description: "workers groups all the observations about Cluster's Workers current state.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.WorkersStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersStatus"), }, }, "failureDomains": { @@ -1164,7 +1171,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterStatus(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.FailureDomainSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomainSpec"), }, }, }, @@ -1187,18 +1194,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterStatus(ref common.Reference "deprecated": { SchemaProps: spec.SchemaProps{ Description: "deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterDeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterDeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterControlPlaneStatus", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterDeprecatedStatus", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterInitializationStatus", "sigs.k8s.io/cluster-api/api/v1beta2.FailureDomainSpec", "sigs.k8s.io/cluster-api/api/v1beta2.WorkersStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterControlPlaneStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterInitializationStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomainSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1213,7 +1220,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterV1Beta1DeprecatedStatus(ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"), }, }, }, @@ -1237,11 +1244,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterV1Beta1DeprecatedStatus(ref }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.Condition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ClusterVariable(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1271,7 +1278,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ClusterVariable(ref common.Referen } } -func schema_sigsk8sio_cluster_api_api_v1beta2_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1330,7 +1337,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_Condition(ref common.ReferenceCall } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ControlPlaneClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1341,7 +1348,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneClass(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane if the ControlPlaneTemplate referenced is machine based. If not, it is applied only to the ControlPlane. At runtime this metadata is merged with the corresponding metadata from the topology.\n\nThis field is supported if and only if the control plane provider template referenced is Machine based.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"), }, }, "ref": { @@ -1353,19 +1360,19 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneClass(ref common.Refer "machineInfrastructure": { SchemaProps: spec.SchemaProps{ Description: "machineInfrastructure defines the metadata and infrastructure information for control plane machines.\n\nThis field is supported if and only if the control plane provider template referenced above is Machine based and supports setting replicas.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.LocalObjectTemplate"), }, }, "machineHealthCheck": { SchemaProps: spec.SchemaProps{ Description: "machineHealthCheck defines a MachineHealthCheck for this ControlPlaneClass. This field is supported if and only if the ControlPlane provider template referenced above is Machine based and supports setting replicas.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckClass"), }, }, "namingStrategy": { SchemaProps: spec.SchemaProps{ Description: "namingStrategy allows changing the naming pattern used when creating the control plane provider object.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneClassNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassNamingStrategy"), }, }, "nodeDrainTimeout": { @@ -1402,7 +1409,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneClass(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate"), }, }, }, @@ -1413,11 +1420,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneClass(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneClassNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta2.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta2.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ControlPlaneClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1437,7 +1444,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneClassNamingStrategy(re } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ControlPlaneTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1448,7 +1455,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneTopology(ref common.Re SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane if the ControlPlaneTemplate referenced by the ClusterClass is machine based. If not, it is applied only to the ControlPlane. At runtime this metadata is merged with the corresponding metadata from the ClusterClass.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"), }, }, "replicas": { @@ -1461,7 +1468,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneTopology(ref common.Re "machineHealthCheck": { SchemaProps: spec.SchemaProps{ Description: "machineHealthCheck allows to enable, disable and override the MachineHealthCheck configuration in the ClusterClass for this control plane.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckTopology"), }, }, "nodeDrainTimeout": { @@ -1498,7 +1505,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneTopology(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate"), }, }, }, @@ -1507,18 +1514,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneTopology(ref common.Re "variables": { SchemaProps: spec.SchemaProps{ Description: "variables can be used to customize the ControlPlane through patches.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneVariables"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ControlPlaneVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1541,7 +1548,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneVariables(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterVariable"), }, }, }, @@ -1551,11 +1558,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ControlPlaneVariables(ref common.R }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterVariable"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterVariable"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ExternalPatchDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ExternalPatchDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1605,7 +1612,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ExternalPatchDefinition(ref common } } -func schema_sigsk8sio_cluster_api_api_v1beta2_FailureDomainSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_FailureDomainSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1641,7 +1648,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_FailureDomainSpec(ref common.Refer } } -func schema_sigsk8sio_cluster_api_api_v1beta2_InfrastructureClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_InfrastructureClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1657,7 +1664,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_InfrastructureClass(ref common.Ref "namingStrategy": { SchemaProps: spec.SchemaProps{ Description: "namingStrategy allows changing the naming pattern used when creating the infrastructure cluster object.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.InfrastructureClassNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.InfrastructureClassNamingStrategy"), }, }, }, @@ -1665,11 +1672,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_InfrastructureClass(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/v1beta2.InfrastructureClassNamingStrategy"}, + "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta2.InfrastructureClassNamingStrategy"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_InfrastructureClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_InfrastructureClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1689,7 +1696,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_InfrastructureClassNamingStrategy( } } -func schema_sigsk8sio_cluster_api_api_v1beta2_JSONPatch(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_JSONPatch(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1721,7 +1728,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONPatch(ref common.ReferenceCall "valueFrom": { SchemaProps: spec.SchemaProps{ Description: "valueFrom defines the value of the patch. Note: Either Value or ValueFrom is required for add and replace operations. Only one of them is allowed to be set at the same time.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.JSONPatchValue"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.JSONPatchValue"), }, }, }, @@ -1729,11 +1736,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONPatch(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "sigs.k8s.io/cluster-api/api/v1beta2.JSONPatchValue"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "sigs.k8s.io/cluster-api/api/core/v1beta2.JSONPatchValue"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_JSONPatchValue(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_JSONPatchValue(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1760,7 +1767,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONPatchValue(ref common.Referenc } } -func schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1796,7 +1803,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps"), }, }, }, @@ -1805,7 +1812,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref common.Referen "additionalProperties": { SchemaProps: spec.SchemaProps{ Description: "additionalProperties specifies the schema of values in a map (keys are always strings). NOTE: Can only be set if type is object. NOTE: AdditionalProperties is mutually exclusive with Properties. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps"), }, }, "maxProperties": { @@ -1840,7 +1847,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref common.Referen "items": { SchemaProps: spec.SchemaProps{ Description: "items specifies fields of an array. NOTE: Can only be set if type is array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps"), }, }, "maxItems": { @@ -1962,7 +1969,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ValidationRule"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ValidationRule"), }, }, }, @@ -1971,7 +1978,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref common.Referen "x-metadata": { SchemaProps: spec.SchemaProps{ Description: "x-metadata is the metadata of a variable or a nested field within a variable. It can be used to add additional data for higher level tools.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.VariableSchemaMetadata"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.VariableSchemaMetadata"), }, }, "x-kubernetes-int-or-string": { @@ -1989,7 +1996,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps"), }, }, }, @@ -2003,7 +2010,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps"), }, }, }, @@ -2017,7 +2024,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps"), }, }, }, @@ -2026,18 +2033,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_JSONSchemaProps(ref common.Referen "not": { SchemaProps: spec.SchemaProps{ Description: "not specifies that the variable must not validate against the subschema. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps", "sigs.k8s.io/cluster-api/api/v1beta2.ValidationRule", "sigs.k8s.io/cluster-api/api/v1beta2.VariableSchemaMetadata"}, + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps", "sigs.k8s.io/cluster-api/api/core/v1beta2.ValidationRule", "sigs.k8s.io/cluster-api/api/core/v1beta2.VariableSchemaMetadata"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_LocalObjectTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_LocalObjectTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2059,7 +2066,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_LocalObjectTemplate(ref common.Ref } } -func schema_sigsk8sio_cluster_api_api_v1beta2_Machine(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_Machine(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2091,25 +2098,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_Machine(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of Machine.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the observed state of Machine.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta2.MachineSpec", "sigs.k8s.io/cluster-api/api/v1beta2.MachineStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2139,7 +2146,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineAddress(ref common.Referenc } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeletionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeletionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2166,7 +2173,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeletionStatus(ref common.R } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2198,25 +2205,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeployment(ref common.Refer SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of MachineDeployment.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the observed state of MachineDeployment.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentSpec", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2235,13 +2242,13 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClass(ref common. SchemaProps: spec.SchemaProps{ Description: "template is a local struct containing a collection of templates for creation of MachineDeployment objects representing a set of worker nodes.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentClassTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassTemplate"), }, }, "machineHealthCheck": { SchemaProps: spec.SchemaProps{ Description: "machineHealthCheck defines a MachineHealthCheck for this MachineDeploymentClass.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckClass"), }, }, "failureDomain": { @@ -2254,7 +2261,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClass(ref common. "namingStrategy": { SchemaProps: spec.SchemaProps{ Description: "namingStrategy allows changing the naming pattern used when creating the MachineDeployment.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentClassNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassNamingStrategy"), }, }, "nodeDrainTimeout": { @@ -2298,7 +2305,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClass(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate"), }, }, }, @@ -2307,7 +2314,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClass(ref common. "strategy": { SchemaProps: spec.SchemaProps{ Description: "strategy is the deployment strategy to use to replace existing machines with new ones. NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStrategy"), }, }, }, @@ -2315,11 +2322,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClass(ref common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentClassNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentClassTemplate", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2339,7 +2346,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClassNamingStrate } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClassTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentClassTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2350,21 +2357,21 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClassTemplate(ref SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. At runtime this metadata is merged with the corresponding metadata from the topology.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"), }, }, "bootstrap": { SchemaProps: spec.SchemaProps{ Description: "bootstrap contains the bootstrap template reference to be used for the creation of worker Machines.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.LocalObjectTemplate"), }, }, "infrastructure": { SchemaProps: spec.SchemaProps{ Description: "infrastructure contains the infrastructure template reference to be used for the creation of worker Machines.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.LocalObjectTemplate"), }, }, }, @@ -2372,11 +2379,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentClassTemplate(ref }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2386,18 +2393,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentDeprecatedStatus( "v1beta1": { SchemaProps: spec.SchemaProps{ Description: "v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentV1Beta1DeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentV1Beta1DeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentV1Beta1DeprecatedStatus"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentV1Beta1DeprecatedStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2433,7 +2440,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentList(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeployment"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeployment"), }, }, }, @@ -2444,11 +2451,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentList(ref common.R }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeployment"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeployment"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2487,19 +2494,19 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentSpec(ref common.R SchemaProps: spec.SchemaProps{ Description: "template describes the machines that will be created.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineTemplateSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec"), }, }, "strategy": { SchemaProps: spec.SchemaProps{ Description: "strategy is the deployment strategy to use to replace existing machines with new ones.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStrategy"), }, }, "machineNamingStrategy": { SchemaProps: spec.SchemaProps{ Description: "machineNamingStrategy allows changing the naming pattern used when creating Machines. Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNamingStrategy"), }, }, "revisionHistoryLimit": { @@ -2521,11 +2528,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentSpec(ref common.R }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/v1beta2.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta2.MachineTemplateSpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2606,18 +2613,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentStatus(ref common "deprecated": { SchemaProps: spec.SchemaProps{ Description: "deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentDeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentDeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentDeprecatedStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentDeprecatedStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2634,24 +2641,24 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentStrategy(ref comm "rollingUpdate": { SchemaProps: spec.SchemaProps{ Description: "rollingUpdate is the rolling update config params. Present only if MachineDeploymentStrategyType = RollingUpdate.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineRollingUpdateDeployment"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineRollingUpdateDeployment"), }, }, "remediation": { SchemaProps: spec.SchemaProps{ Description: "remediation controls the strategy of remediating unhealthy machines and how remediating operations should occur during the lifecycle of the dependant MachineSets.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.RemediationStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.RemediationStrategy"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.MachineRollingUpdateDeployment", "sigs.k8s.io/cluster-api/api/v1beta2.RemediationStrategy"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineRollingUpdateDeployment", "sigs.k8s.io/cluster-api/api/core/v1beta2.RemediationStrategy"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2662,7 +2669,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentTopology(ref comm SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. At runtime this metadata is merged with the corresponding metadata from the ClusterClass.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"), }, }, "class": { @@ -2698,7 +2705,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentTopology(ref comm "machineHealthCheck": { SchemaProps: spec.SchemaProps{ Description: "machineHealthCheck allows to enable, disable and override the MachineHealthCheck configuration in the ClusterClass for this MachineDeployment.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckTopology"), }, }, "nodeDrainTimeout": { @@ -2742,7 +2749,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentTopology(ref comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate"), }, }, }, @@ -2751,13 +2758,13 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentTopology(ref comm "strategy": { SchemaProps: spec.SchemaProps{ Description: "strategy is the deployment strategy to use to replace existing machines with new ones.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStrategy"), }, }, "variables": { SchemaProps: spec.SchemaProps{ Description: "variables can be used to customize the MachineDeployment through patches.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentVariables"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentVariables"), }, }, }, @@ -2765,11 +2772,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentTopology(ref comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2784,7 +2791,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentV1Beta1Deprecated Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"), }, }, }, @@ -2826,11 +2833,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentV1Beta1Deprecated }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.Condition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeploymentVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2853,7 +2860,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentVariables(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterVariable"), }, }, }, @@ -2863,11 +2870,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeploymentVariables(ref com }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterVariable"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterVariable"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2877,18 +2884,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDeprecatedStatus(ref common "v1beta1": { SchemaProps: spec.SchemaProps{ Description: "v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineV1Beta1DeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineV1Beta1DeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.MachineV1Beta1DeprecatedStatus"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineV1Beta1DeprecatedStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDrainRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2920,7 +2927,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRule(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "spec defines the spec of a MachineDrainRule.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRuleSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleSpec"), }, }, }, @@ -2928,11 +2935,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRule(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRuleSpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleSpec"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleDrainConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDrainRuleDrainConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2961,7 +2968,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleDrainConfig(ref co } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDrainRuleList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2997,7 +3004,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleList(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRule"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRule"), }, }, }, @@ -3008,11 +3015,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleList(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRule"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRule"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleMachineSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDrainRuleMachineSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3039,7 +3046,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleMachineSelector(re } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRulePodSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDrainRulePodSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3066,7 +3073,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRulePodSelector(ref co } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineDrainRuleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3077,7 +3084,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleSpec(ref common.Re SchemaProps: spec.SchemaProps{ Description: "drain configures if and how Pods are drained.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRuleDrainConfig"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleDrainConfig"), }, }, "machines": { @@ -3093,7 +3100,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleSpec(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRuleMachineSelector"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleMachineSelector"), }, }, }, @@ -3112,7 +3119,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleSpec(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRulePodSelector"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRulePodSelector"), }, }, }, @@ -3123,11 +3130,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineDrainRuleSpec(ref common.Re }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRuleDrainConfig", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRuleMachineSelector", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDrainRulePodSelector"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleDrainConfig", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRuleMachineSelector", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDrainRulePodSelector"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheck(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineHealthCheck(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3159,25 +3166,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheck(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "spec is the specification of machine health check policy", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the most recently observed status of MachineHealthCheck resource", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckSpec", "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineHealthCheckClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3192,7 +3199,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckClass(ref common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.UnhealthyNodeCondition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"), }, }, }, @@ -3227,11 +3234,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckClass(ref common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/v1beta2.UnhealthyNodeCondition"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineHealthCheckDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3241,18 +3248,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckDeprecatedStatus "v1beta1": { SchemaProps: spec.SchemaProps{ Description: "v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckV1Beta1DeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckV1Beta1DeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckV1Beta1DeprecatedStatus"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckV1Beta1DeprecatedStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineHealthCheckList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3288,7 +3295,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckList(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheck"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheck"), }, }, }, @@ -3299,11 +3306,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckList(ref common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheck"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheck"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineHealthCheckSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3333,7 +3340,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckSpec(ref common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.UnhealthyNodeCondition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"), }, }, }, @@ -3369,11 +3376,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckSpec(ref common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/v1beta2.UnhealthyNodeCondition"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineHealthCheckStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3451,18 +3458,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckStatus(ref commo "deprecated": { SchemaProps: spec.SchemaProps{ Description: "deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckDeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckDeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/v1beta2.MachineHealthCheckDeprecatedStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineHealthCheckDeprecatedStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineHealthCheckTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3484,7 +3491,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckTopology(ref com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.UnhealthyNodeCondition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"), }, }, }, @@ -3519,11 +3526,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckTopology(ref com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/v1beta2.UnhealthyNodeCondition"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineHealthCheckV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3538,7 +3545,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckV1Beta1Deprecate Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"), }, }, }, @@ -3548,11 +3555,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineHealthCheckV1Beta1Deprecate }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.Condition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineInitializationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineInitializationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3581,7 +3588,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineInitializationStatus(ref co } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3617,7 +3624,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.Machine"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Machine"), }, }, }, @@ -3628,11 +3635,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta2.Machine"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.Machine"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3652,7 +3659,57 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineNamingStrategy(ref common.R } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachinePool(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePool is the Schema for the machinepools API. NOTE: This CRD can only be used if the MachinePool feature gate is enabled.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec is the desired state of MachinePool.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status is the observed state of MachinePool.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolStatus"}, + } +} + +func schema_cluster_api_api_core_v1beta2_MachinePoolClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3671,7 +3728,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClass(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "template is a local struct containing a collection of templates for creation of MachinePools objects representing a pool of worker nodes.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolClassTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassTemplate"), }, }, "failureDomains": { @@ -3692,7 +3749,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClass(ref common.Refere "namingStrategy": { SchemaProps: spec.SchemaProps{ Description: "namingStrategy allows changing the naming pattern used when creating the MachinePool.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolClassNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassNamingStrategy"), }, }, "nodeDrainTimeout": { @@ -3725,11 +3782,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClass(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolClassNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolClassTemplate"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassTemplate"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachinePoolClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3749,7 +3806,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClassNamingStrategy(ref } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClassTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachinePoolClassTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3760,21 +3817,21 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClassTemplate(ref commo SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the MachinePool. At runtime this metadata is merged with the corresponding metadata from the topology.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"), }, }, "bootstrap": { SchemaProps: spec.SchemaProps{ Description: "bootstrap contains the bootstrap template reference to be used for the creation of the Machines in the MachinePool.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.LocalObjectTemplate"), }, }, "infrastructure": { SchemaProps: spec.SchemaProps{ Description: "infrastructure contains the infrastructure template reference to be used for the creation of the MachinePool.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.LocalObjectTemplate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.LocalObjectTemplate"), }, }, }, @@ -3782,11 +3839,285 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolClassTemplate(ref commo }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, + } +} + +func schema_cluster_api_api_core_v1beta2_MachinePoolDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePoolDeprecatedStatus groups all the status fields that are deprecated and will be removed in a future version. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "v1beta1": { + SchemaProps: spec.SchemaProps{ + Description: "v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.", + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolV1Beta1DeprecatedStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolV1Beta1DeprecatedStatus"}, + } +} + +func schema_cluster_api_api_core_v1beta2_MachinePoolInitializationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePoolInitializationStatus provides observations of the MachinePool initialization process. NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial MachinePool provisioning.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "infrastructureProvisioned": { + SchemaProps: spec.SchemaProps{ + Description: "infrastructureProvisioned is true when the infrastructure provider reports that MachinePool's infrastructure is fully provisioned. NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning. The value of this field is never updated after provisioning is completed.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "bootstrapDataSecretCreated": { + SchemaProps: spec.SchemaProps{ + Description: "bootstrapDataSecretCreated is true when the bootstrap provider reports that the MachinePool's boostrap secret is created. NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning. The value of this field is never updated after provisioning is completed.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_cluster_api_api_core_v1beta2_MachinePoolList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePoolList contains a list of MachinePool.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of MachinePools.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePool"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePool"}, + } +} + +func schema_cluster_api_api_core_v1beta2_MachinePoolSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePoolSpec defines the desired state of MachinePool.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusterName": { + SchemaProps: spec.SchemaProps{ + Description: "clusterName is the name of the Cluster this object belongs to.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas is the number of desired machines. Defaults to 1. This is a pointer to distinguish between explicit zero and not specified.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "template describes the machines that will be created.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec"), + }, + }, + "providerIDList": { + SchemaProps: spec.SchemaProps{ + 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "failureDomains": { + SchemaProps: spec.SchemaProps{ + Description: "failureDomains is the list of failure domains this MachinePool should be attached to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"clusterName", "template"}, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec"}, + } +} + +func schema_cluster_api_api_core_v1beta2_MachinePoolStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePoolStatus defines the observed state of MachinePool.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "conditions represents the observations of a MachinePool's current state. Known condition types are Available, BootstrapConfigReady, InfrastructureReady, MachinesReady, MachinesUpToDate, ScalingUp, ScalingDown, Remediating, Deleting, Paused.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + }, + }, + }, + }, + }, + "initialization": { + SchemaProps: spec.SchemaProps{ + Description: "initialization provides observations of the MachinePool initialization process. NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial MachinePool provisioning.", + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolInitializationStatus"), + }, + }, + "nodeRefs": { + SchemaProps: spec.SchemaProps{ + Description: "nodeRefs will point to the corresponding Nodes if it they exist.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas is the most recently observed number of replicas.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when Machine's Ready condition is true.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "availableReplicas is the number of available replicas for this MachinePool. A machine is considered available when Machine's Available condition is true.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "upToDateReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "upToDateReplicas is the number of up-to-date replicas targeted by this MachinePool. A machine is considered up-to-date when Machine's UpToDate condition is true.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "phase represents the current phase of cluster actuation.", + Type: []string{"string"}, + Format: "", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the latest generation observed by the controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "deprecated": { + SchemaProps: spec.SchemaProps{ + Description: "deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.", + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolDeprecatedStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolInitializationStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachinePoolTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3797,7 +4128,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolTopology(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata applied to the MachinePool. At runtime this metadata is merged with the corresponding metadata from the ClusterClass.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"), }, }, "class": { @@ -3866,7 +4197,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolTopology(ref common.Ref "variables": { SchemaProps: spec.SchemaProps{ Description: "variables can be used to customize the MachinePool through patches.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolVariables"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolVariables"), }, }, }, @@ -3874,11 +4205,75 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolTopology(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, + } +} + +func schema_cluster_api_api_core_v1beta2_MachinePoolV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachinePoolV1Beta1DeprecatedStatus groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "conditions define the current service state of the MachinePool.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"), + }, + }, + }, + }, + }, + "failureReason": { + SchemaProps: spec.SchemaProps{ + Description: "failureReason indicates that there is a problem reconciling the state, and will be set to a token value suitable for programmatic interpretation.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", + Type: []string{"string"}, + Format: "", + }, + }, + "failureMessage": { + SchemaProps: spec.SchemaProps{ + Description: "failureMessage indicates that there is a problem reconciling the state, and will be set to a descriptive error message.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", + Type: []string{"string"}, + Format: "", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is \"Ready\".\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachinePool.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "unavailableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "unavailableReplicas is the 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.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachinePoolVariables(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3901,7 +4296,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolVariables(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterVariable"), }, }, }, @@ -3911,11 +4306,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachinePoolVariables(ref common.Re }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.ClusterVariable"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterVariable"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineReadinessGate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineReadinessGate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3944,7 +4339,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineReadinessGate(ref common.Re } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineRollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineRollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -3978,7 +4373,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineRollingUpdateDeployment(ref } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSet(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4010,25 +4405,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSet(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Description: "spec is the desired state of MachineSet.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineSetSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status is the observed state of MachineSet.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineSetStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/v1beta2.MachineSetSpec", "sigs.k8s.io/cluster-api/api/v1beta2.MachineSetStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineSetDeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4038,18 +4433,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetDeprecatedStatus(ref com "v1beta1": { SchemaProps: spec.SchemaProps{ Description: "v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineSetV1Beta1DeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetV1Beta1DeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.MachineSetV1Beta1DeprecatedStatus"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetV1Beta1DeprecatedStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4085,7 +4480,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetList(ref common.Referenc Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineSet"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSet"), }, }, }, @@ -4096,11 +4491,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetList(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/v1beta2.MachineSet"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSet"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4140,13 +4535,13 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetSpec(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "template is the object that describes the machine that will be created if insufficient replicas are detected. Object references to custom resources are treated as templates.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineTemplateSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec"), }, }, "machineNamingStrategy": { SchemaProps: spec.SchemaProps{ Description: "machineNamingStrategy allows changing the naming pattern used when creating Machines. Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineNamingStrategy"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNamingStrategy"), }, }, }, @@ -4154,11 +4549,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetSpec(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/api/v1beta2.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/v1beta2.MachineTemplateSpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4232,18 +4627,18 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetStatus(ref common.Refere "deprecated": { SchemaProps: spec.SchemaProps{ Description: "deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineSetDeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetDeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/v1beta2.MachineSetDeprecatedStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetDeprecatedStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineSetV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4258,7 +4653,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetV1Beta1DeprecatedStatus( Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"), }, }, }, @@ -4306,11 +4701,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSetV1Beta1DeprecatedStatus( }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.Condition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4329,7 +4724,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSpec(ref common.ReferenceCa SchemaProps: spec.SchemaProps{ Description: "bootstrap is a reference to a local struct which encapsulates fields to configure the Machine’s bootstrapping mechanism.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.Bootstrap"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Bootstrap"), }, }, "infrastructureRef": { @@ -4383,7 +4778,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSpec(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate"), }, }, }, @@ -4412,11 +4807,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineSpec(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/v1beta2.Bootstrap", "sigs.k8s.io/cluster-api/api/v1beta2.MachineReadinessGate"}, + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta2.Bootstrap", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4448,7 +4843,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineStatus(ref common.Reference "initialization": { SchemaProps: spec.SchemaProps{ Description: "initialization provides observations of the Machine initialization process. NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Machine provisioning.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineInitializationStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineInitializationStatus"), }, }, "nodeRef": { @@ -4477,7 +4872,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineStatus(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineAddress"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineAddress"), }, }, }, @@ -4506,24 +4901,24 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineStatus(ref common.Reference "deletion": { SchemaProps: spec.SchemaProps{ Description: "deletion contains information relating to removal of the Machine. Only present when the Machine has a deletionTimestamp and drain or wait for volume detach started.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeletionStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionStatus"), }, }, "deprecated": { SchemaProps: spec.SchemaProps{ Description: "deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeprecatedStatus"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeprecatedStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/v1beta2.MachineAddress", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeletionStatus", "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeprecatedStatus", "sigs.k8s.io/cluster-api/api/v1beta2.MachineInitializationStatus"}, + "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineAddress", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeprecatedStatus", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineInitializationStatus"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4534,25 +4929,25 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineTemplateSpec(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec is the 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", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineSpec"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSpec"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.MachineSpec", "sigs.k8s.io/cluster-api/api/v1beta2.ObjectMeta"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_MachineV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_MachineV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4567,7 +4962,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineV1Beta1DeprecatedStatus(ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.Condition"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"), }, }, }, @@ -4591,11 +4986,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_MachineV1Beta1DeprecatedStatus(ref }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.Condition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.Condition"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_NetworkRanges(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_NetworkRanges(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4624,7 +5019,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_NetworkRanges(ref common.Reference } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4669,7 +5064,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ObjectMeta(ref common.ReferenceCal } } -func schema_sigsk8sio_cluster_api_api_v1beta2_PatchDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_PatchDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4680,7 +5075,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_PatchDefinition(ref common.Referen SchemaProps: spec.SchemaProps{ Description: "selector defines on which templates the patch should be applied.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.PatchSelector"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelector"), }, }, "jsonPatches": { @@ -4691,7 +5086,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_PatchDefinition(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.JSONPatch"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.JSONPatch"), }, }, }, @@ -4702,11 +5097,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_PatchDefinition(ref common.Referen }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.JSONPatch", "sigs.k8s.io/cluster-api/api/v1beta2.PatchSelector"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.JSONPatch", "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelector"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_PatchSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4733,7 +5128,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelector(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "matchResources selects templates based on where they are referenced.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.PatchSelectorMatch"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatch"), }, }, }, @@ -4741,11 +5136,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelector(ref common.Reference }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.PatchSelectorMatch"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatch"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelectorMatch(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_PatchSelectorMatch(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4769,24 +5164,24 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelectorMatch(ref common.Refe "machineDeploymentClass": { SchemaProps: spec.SchemaProps{ Description: "machineDeploymentClass selects templates referenced in specific MachineDeploymentClasses in .spec.workers.machineDeployments.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.PatchSelectorMatchMachineDeploymentClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatchMachineDeploymentClass"), }, }, "machinePoolClass": { SchemaProps: spec.SchemaProps{ Description: "machinePoolClass selects templates referenced in specific MachinePoolClasses in .spec.workers.machinePools.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.PatchSelectorMatchMachinePoolClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatchMachinePoolClass"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.PatchSelectorMatchMachineDeploymentClass", "sigs.k8s.io/cluster-api/api/v1beta2.PatchSelectorMatchMachinePoolClass"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatchMachineDeploymentClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatchMachinePoolClass"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelectorMatchMachineDeploymentClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_PatchSelectorMatchMachineDeploymentClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4814,7 +5209,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelectorMatchMachineDeploymen } } -func schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelectorMatchMachinePoolClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_PatchSelectorMatchMachinePoolClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4842,7 +5237,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_PatchSelectorMatchMachinePoolClass } } -func schema_sigsk8sio_cluster_api_api_v1beta2_RemediationStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_RemediationStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4863,7 +5258,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_RemediationStrategy(ref common.Ref } } -func schema_sigsk8sio_cluster_api_api_v1beta2_Topology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_Topology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4874,7 +5269,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_Topology(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "classRef is the ref to the ClusterClass that should be used for the topology.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassRef"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassRef"), }, }, "version": { @@ -4895,13 +5290,13 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_Topology(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "controlPlane describes the cluster control plane.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopology"), }, }, "workers": { SchemaProps: spec.SchemaProps{ Description: "workers encapsulates the different constructs that form the worker nodes for the cluster.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.WorkersTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersTopology"), }, }, "variables": { @@ -4920,7 +5315,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_Topology(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.ClusterVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterVariable"), }, }, }, @@ -4931,11 +5326,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_Topology(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterClassRef", "sigs.k8s.io/cluster-api/api/v1beta2.ClusterVariable", "sigs.k8s.io/cluster-api/api/v1beta2.ControlPlaneTopology", "sigs.k8s.io/cluster-api/api/v1beta2.WorkersTopology"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassRef", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterVariable", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopology", "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersTopology"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_UnhealthyNodeCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_UnhealthyNodeCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -4973,7 +5368,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_UnhealthyNodeCondition(ref common. } } -func schema_sigsk8sio_cluster_api_api_v1beta2_ValidationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_ValidationRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -5024,7 +5419,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_ValidationRule(ref common.Referenc } } -func schema_sigsk8sio_cluster_api_api_v1beta2_VariableSchema(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_VariableSchema(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -5035,7 +5430,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_VariableSchema(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "openAPIV3Schema defines the schema of a variable via OpenAPI v3 schema. The schema is a subset of the schema used in Kubernetes CRDs.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps"), }, }, }, @@ -5043,11 +5438,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_VariableSchema(ref common.Referenc }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.JSONSchemaProps"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.JSONSchemaProps"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_VariableSchemaMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_VariableSchemaMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -5092,7 +5487,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_VariableSchemaMetadata(ref common. } } -func schema_sigsk8sio_cluster_api_api_v1beta2_WorkersClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_WorkersClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -5115,7 +5510,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_WorkersClass(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClass"), }, }, }, @@ -5137,7 +5532,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_WorkersClass(ref common.ReferenceC Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolClass"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClass"), }, }, }, @@ -5147,11 +5542,11 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_WorkersClass(ref common.ReferenceC }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentClass", "sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolClass"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClass"}, } } -func schema_sigsk8sio_cluster_api_api_v1beta2_WorkersStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_WorkersStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -5199,7 +5594,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_WorkersStatus(ref common.Reference } } -func schema_sigsk8sio_cluster_api_api_v1beta2_WorkersTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_cluster_api_api_core_v1beta2_WorkersTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -5222,7 +5617,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_WorkersTopology(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopology"), }, }, }, @@ -5244,7 +5639,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_WorkersTopology(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolTopology"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolTopology"), }, }, }, @@ -5254,6 +5649,6 @@ func schema_sigsk8sio_cluster_api_api_v1beta2_WorkersTopology(ref common.Referen }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta2.MachineDeploymentTopology", "sigs.k8s.io/cluster-api/api/v1beta2.MachinePoolTopology"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopology", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolTopology"}, } } diff --git a/exp/api/.import-restrictions b/api/ipam/.import-restrictions similarity index 100% rename from exp/api/.import-restrictions rename to api/ipam/.import-restrictions diff --git a/exp/ipam/api/v1alpha1/conversion.go b/api/ipam/v1alpha1/conversion.go similarity index 96% rename from exp/ipam/api/v1alpha1/conversion.go rename to api/ipam/v1alpha1/conversion.go index 386f307fc493..6363d3c5b8dc 100644 --- a/exp/ipam/api/v1alpha1/conversion.go +++ b/api/ipam/v1alpha1/conversion.go @@ -20,9 +20,9 @@ import ( apiconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/exp/ipam/api/v1alpha1/conversion_test.go b/api/ipam/v1alpha1/conversion_test.go similarity index 97% rename from exp/ipam/api/v1alpha1/conversion_test.go rename to api/ipam/v1alpha1/conversion_test.go index 501534a75375..666fa32be77b 100644 --- a/exp/ipam/api/v1alpha1/conversion_test.go +++ b/api/ipam/v1alpha1/conversion_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/exp/ipam/api/v1alpha1/doc.go b/api/ipam/v1alpha1/doc.go similarity index 92% rename from exp/ipam/api/v1alpha1/doc.go rename to api/ipam/v1alpha1/doc.go index afab3620b6d5..4f6f5dca822a 100644 --- a/exp/ipam/api/v1alpha1/doc.go +++ b/api/ipam/v1alpha1/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1alpha1 contains API Schema definitions for the exp v1alpha1 IPAM API. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/ipam/v1beta2 // // Deprecated: This package is deprecated and is going to be removed when support for v1beta1 will be dropped. package v1alpha1 diff --git a/exp/ipam/api/v1alpha1/groupversion_info.go b/api/ipam/v1alpha1/groupversion_info.go similarity index 100% rename from exp/ipam/api/v1alpha1/groupversion_info.go rename to api/ipam/v1alpha1/groupversion_info.go diff --git a/exp/ipam/api/v1alpha1/ipaddress_types.go b/api/ipam/v1alpha1/ipaddress_types.go similarity index 100% rename from exp/ipam/api/v1alpha1/ipaddress_types.go rename to api/ipam/v1alpha1/ipaddress_types.go diff --git a/exp/ipam/api/v1alpha1/ipaddressclaim_types.go b/api/ipam/v1alpha1/ipaddressclaim_types.go similarity index 98% rename from exp/ipam/api/v1alpha1/ipaddressclaim_types.go rename to api/ipam/v1alpha1/ipaddressclaim_types.go index 57b7294bfc06..ec3f4b71e2fc 100644 --- a/exp/ipam/api/v1alpha1/ipaddressclaim_types.go +++ b/api/ipam/v1alpha1/ipaddressclaim_types.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // IPAddressClaimSpec is the desired state of an IPAddressClaim. diff --git a/exp/ipam/api/v1alpha1/zz_generated.conversion.go b/api/ipam/v1alpha1/zz_generated.conversion.go similarity index 98% rename from exp/ipam/api/v1alpha1/zz_generated.conversion.go rename to api/ipam/v1alpha1/zz_generated.conversion.go index e55d9ece2a92..230c2ad23670 100644 --- a/exp/ipam/api/v1alpha1/zz_generated.conversion.go +++ b/api/ipam/v1alpha1/zz_generated.conversion.go @@ -27,9 +27,9 @@ import ( 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/exp/ipam/api/v1beta1" - v1beta2 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + v1beta1 "sigs.k8s.io/cluster-api/api/ipam/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" ) func init() { @@ -252,7 +252,7 @@ func Convert_v1alpha1_IPAddressClaimStatus_To_v1beta2_IPAddressClaimStatus(in *I func autoConvert_v1beta2_IPAddressClaimStatus_To_v1alpha1_IPAddressClaimStatus(in *v1beta2.IPAddressClaimStatus, out *IPAddressClaimStatus, s conversion.Scope) error { if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(corev1beta1.Conditions, len(*in)) for i := range *in { if err := v1beta1.Convert_v1_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err diff --git a/exp/ipam/api/v1alpha1/zz_generated.deepcopy.go b/api/ipam/v1alpha1/zz_generated.deepcopy.go similarity index 99% rename from exp/ipam/api/v1alpha1/zz_generated.deepcopy.go rename to api/ipam/v1alpha1/zz_generated.deepcopy.go index 650f11b0d32b..4efe04ac2d05 100644 --- a/exp/ipam/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/ipam/v1alpha1/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/exp/ipam/api/v1beta1/condition_consts.go b/api/ipam/v1beta1/condition_consts.go similarity index 100% rename from exp/ipam/api/v1beta1/condition_consts.go rename to api/ipam/v1beta1/condition_consts.go diff --git a/exp/ipam/api/v1beta1/conversion.go b/api/ipam/v1beta1/conversion.go similarity index 97% rename from exp/ipam/api/v1beta1/conversion.go rename to api/ipam/v1beta1/conversion.go index ac7f8e3853e1..da5ab3819577 100644 --- a/exp/ipam/api/v1beta1/conversion.go +++ b/api/ipam/v1beta1/conversion.go @@ -21,8 +21,8 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" ) func (src *IPAddress) ConvertTo(dstRaw conversion.Hub) error { diff --git a/exp/ipam/api/v1beta1/conversion_test.go b/api/ipam/v1beta1/conversion_test.go similarity index 97% rename from exp/ipam/api/v1beta1/conversion_test.go rename to api/ipam/v1beta1/conversion_test.go index d609ca5b2239..01bd5be23a6f 100644 --- a/exp/ipam/api/v1beta1/conversion_test.go +++ b/api/ipam/v1beta1/conversion_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/exp/ipam/api/v1beta1/doc.go b/api/ipam/v1beta1/doc.go similarity index 92% rename from exp/ipam/api/v1beta1/doc.go rename to api/ipam/v1beta1/doc.go index 00740bd6570f..acfb16f1e9d2 100644 --- a/exp/ipam/api/v1beta1/doc.go +++ b/api/ipam/v1beta1/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1beta1 contains API Schema definitions for the v1beta1 IPAM API. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/ipam/v1beta2 // +kubebuilder:object:generate=true // +groupName=ipam.cluster.x-k8s.io // diff --git a/exp/ipam/api/v1beta1/groupversion_info.go b/api/ipam/v1beta1/groupversion_info.go similarity index 100% rename from exp/ipam/api/v1beta1/groupversion_info.go rename to api/ipam/v1beta1/groupversion_info.go diff --git a/exp/ipam/api/v1beta1/ipaddress_types.go b/api/ipam/v1beta1/ipaddress_types.go similarity index 100% rename from exp/ipam/api/v1beta1/ipaddress_types.go rename to api/ipam/v1beta1/ipaddress_types.go diff --git a/exp/ipam/api/v1beta1/ipaddressclaim_types.go b/api/ipam/v1beta1/ipaddressclaim_types.go similarity index 98% rename from exp/ipam/api/v1beta1/ipaddressclaim_types.go rename to api/ipam/v1beta1/ipaddressclaim_types.go index bfc066a5ae06..8a6a44a2e68a 100644 --- a/exp/ipam/api/v1beta1/ipaddressclaim_types.go +++ b/api/ipam/v1beta1/ipaddressclaim_types.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // IPAddressClaimSpec is the desired state of an IPAddressClaim. diff --git a/exp/ipam/api/v1beta1/zz_generated.conversion.go b/api/ipam/v1beta1/zz_generated.conversion.go similarity index 96% rename from exp/ipam/api/v1beta1/zz_generated.conversion.go rename to api/ipam/v1beta1/zz_generated.conversion.go index b8b74faac53e..2657814443b1 100644 --- a/exp/ipam/api/v1beta1/zz_generated.conversion.go +++ b/api/ipam/v1beta1/zz_generated.conversion.go @@ -27,8 +27,8 @@ import ( 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" - v1beta2 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" ) func init() { @@ -98,13 +98,13 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*v1.Condition)(nil), (*apiv1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_Condition_To_v1beta1_Condition(a.(*v1.Condition), b.(*apiv1beta1.Condition), scope) + if err := s.AddConversionFunc((*v1.Condition)(nil), (*corev1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Condition_To_v1beta1_Condition(a.(*v1.Condition), b.(*corev1beta1.Condition), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*apiv1beta1.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Condition_To_v1_Condition(a.(*apiv1beta1.Condition), b.(*v1.Condition), scope) + if err := s.AddConversionFunc((*corev1beta1.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Condition_To_v1_Condition(a.(*corev1beta1.Condition), b.(*v1.Condition), scope) }); err != nil { return err } @@ -263,7 +263,7 @@ func autoConvert_v1beta1_IPAddressClaimStatus_To_v1beta2_IPAddressClaimStatus(in func autoConvert_v1beta2_IPAddressClaimStatus_To_v1beta1_IPAddressClaimStatus(in *v1beta2.IPAddressClaimStatus, out *IPAddressClaimStatus, s conversion.Scope) error { if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(corev1beta1.Conditions, len(*in)) for i := range *in { if err := Convert_v1_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { return err diff --git a/exp/ipam/api/v1beta1/zz_generated.deepcopy.go b/api/ipam/v1beta1/zz_generated.deepcopy.go similarity index 98% rename from exp/ipam/api/v1beta1/zz_generated.deepcopy.go rename to api/ipam/v1beta1/zz_generated.deepcopy.go index 338a238c266a..a4f0ecf51a02 100644 --- a/exp/ipam/api/v1beta1/zz_generated.deepcopy.go +++ b/api/ipam/v1beta1/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1beta1 import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -133,7 +133,7 @@ func (in *IPAddressClaimStatus) DeepCopyInto(out *IPAddressClaimStatus) { out.AddressRef = in.AddressRef if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) + *out = make(corev1beta1.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/exp/api/v1beta2/.import-restrictions b/api/ipam/v1beta2/.import-restrictions similarity index 100% rename from exp/api/v1beta2/.import-restrictions rename to api/ipam/v1beta2/.import-restrictions diff --git a/exp/ipam/api/v1beta2/conversion.go b/api/ipam/v1beta2/conversion.go similarity index 100% rename from exp/ipam/api/v1beta2/conversion.go rename to api/ipam/v1beta2/conversion.go diff --git a/exp/ipam/api/v1beta2/doc.go b/api/ipam/v1beta2/doc.go similarity index 100% rename from exp/ipam/api/v1beta2/doc.go rename to api/ipam/v1beta2/doc.go diff --git a/exp/ipam/api/v1beta2/groupversion_info.go b/api/ipam/v1beta2/groupversion_info.go similarity index 100% rename from exp/ipam/api/v1beta2/groupversion_info.go rename to api/ipam/v1beta2/groupversion_info.go diff --git a/exp/ipam/api/v1beta2/ipaddress_types.go b/api/ipam/v1beta2/ipaddress_types.go similarity index 100% rename from exp/ipam/api/v1beta2/ipaddress_types.go rename to api/ipam/v1beta2/ipaddress_types.go diff --git a/exp/ipam/api/v1beta2/ipaddressclaim_types.go b/api/ipam/v1beta2/ipaddressclaim_types.go similarity index 99% rename from exp/ipam/api/v1beta2/ipaddressclaim_types.go rename to api/ipam/v1beta2/ipaddressclaim_types.go index d1472d6ff844..1f729266c80a 100644 --- a/exp/ipam/api/v1beta2/ipaddressclaim_types.go +++ b/api/ipam/v1beta2/ipaddressclaim_types.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // IPAddressClaim's Ready condition and corresponding reasons. diff --git a/exp/ipam/api/v1beta2/v1beta1_condition_consts.go b/api/ipam/v1beta2/v1beta1_condition_consts.go similarity index 100% rename from exp/ipam/api/v1beta2/v1beta1_condition_consts.go rename to api/ipam/v1beta2/v1beta1_condition_consts.go diff --git a/exp/ipam/api/v1beta2/zz_generated.deepcopy.go b/api/ipam/v1beta2/zz_generated.deepcopy.go similarity index 98% rename from exp/ipam/api/v1beta2/zz_generated.deepcopy.go rename to api/ipam/v1beta2/zz_generated.deepcopy.go index 155367c9bd0f..0bd370925273 100644 --- a/exp/ipam/api/v1beta2/zz_generated.deepcopy.go +++ b/api/ipam/v1beta2/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1beta2 import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - apiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -180,7 +180,7 @@ func (in *IPAddressClaimV1Beta1DeprecatedStatus) DeepCopyInto(out *IPAddressClai *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta2.Conditions, len(*in)) + *out = make(corev1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/exp/ipam/api/.import-restrictions b/api/runtime/.import-restrictions similarity index 100% rename from exp/ipam/api/.import-restrictions rename to api/runtime/.import-restrictions diff --git a/exp/runtime/hooks/api/v1alpha1/common_types.go b/api/runtime/hooks/v1alpha1/common_types.go similarity index 100% rename from exp/runtime/hooks/api/v1alpha1/common_types.go rename to api/runtime/hooks/v1alpha1/common_types.go diff --git a/exp/runtime/hooks/api/v1alpha1/discovery_types.go b/api/runtime/hooks/v1alpha1/discovery_types.go similarity index 100% rename from exp/runtime/hooks/api/v1alpha1/discovery_types.go rename to api/runtime/hooks/v1alpha1/discovery_types.go diff --git a/exp/runtime/hooks/api/v1alpha1/doc.go b/api/runtime/hooks/v1alpha1/doc.go similarity index 87% rename from exp/runtime/hooks/api/v1alpha1/doc.go rename to api/runtime/hooks/v1alpha1/doc.go index c3fbb8fa2343..f2d9525ca558 100644 --- a/exp/runtime/hooks/api/v1alpha1/doc.go +++ b/api/runtime/hooks/v1alpha1/doc.go @@ -15,6 +15,8 @@ limitations under the License. */ // Package v1alpha1 contains the v1alpha1 RuntimeHooks. +// +// Note: This package contains the API of Runtime Hooks. It does not contain any Go types for CRDs. // +kubebuilder:object:generate=true // +k8s:openapi-gen=true package v1alpha1 diff --git a/exp/runtime/hooks/api/v1alpha1/groupversion_info.go b/api/runtime/hooks/v1alpha1/groupversion_info.go similarity index 100% rename from exp/runtime/hooks/api/v1alpha1/groupversion_info.go rename to api/runtime/hooks/v1alpha1/groupversion_info.go diff --git a/exp/runtime/hooks/api/v1alpha1/lifecyclehooks_types.go b/api/runtime/hooks/v1alpha1/lifecyclehooks_types.go similarity index 99% rename from exp/runtime/hooks/api/v1alpha1/lifecyclehooks_types.go rename to api/runtime/hooks/v1alpha1/lifecyclehooks_types.go index 5a09822c0e3b..bf0b8e15384b 100644 --- a/exp/runtime/hooks/api/v1alpha1/lifecyclehooks_types.go +++ b/api/runtime/hooks/v1alpha1/lifecyclehooks_types.go @@ -19,7 +19,7 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" ) diff --git a/exp/runtime/hooks/api/v1alpha1/topologymutation_types.go b/api/runtime/hooks/v1alpha1/topologymutation_types.go similarity index 99% rename from exp/runtime/hooks/api/v1alpha1/topologymutation_types.go rename to api/runtime/hooks/v1alpha1/topologymutation_types.go index f2f84872e1a9..2d240d01dd19 100644 --- a/exp/runtime/hooks/api/v1alpha1/topologymutation_types.go +++ b/api/runtime/hooks/v1alpha1/topologymutation_types.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" ) diff --git a/exp/runtime/hooks/api/v1alpha1/topologymutation_variable_types.go b/api/runtime/hooks/v1alpha1/topologymutation_variable_types.go similarity index 99% rename from exp/runtime/hooks/api/v1alpha1/topologymutation_variable_types.go rename to api/runtime/hooks/v1alpha1/topologymutation_variable_types.go index eafeddc732d0..2a9c9aa917bc 100644 --- a/exp/runtime/hooks/api/v1alpha1/topologymutation_variable_types.go +++ b/api/runtime/hooks/v1alpha1/topologymutation_variable_types.go @@ -19,7 +19,7 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/types" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // BuiltinsName is the name of the builtin variable. diff --git a/exp/runtime/hooks/api/v1alpha1/zz_generated.deepcopy.go b/api/runtime/hooks/v1alpha1/zz_generated.deepcopy.go similarity index 99% rename from exp/runtime/hooks/api/v1alpha1/zz_generated.deepcopy.go rename to api/runtime/hooks/v1alpha1/zz_generated.deepcopy.go index e6b70c4b0c0e..ce59d1aedec7 100644 --- a/exp/runtime/hooks/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/runtime/hooks/v1alpha1/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/exp/runtime/hooks/api/v1alpha1/zz_generated.openapi.go b/api/runtime/hooks/v1alpha1/zz_generated.openapi.go similarity index 81% rename from exp/runtime/hooks/api/v1alpha1/zz_generated.openapi.go rename to api/runtime/hooks/v1alpha1/zz_generated.openapi.go index 6d186fbb11bb..e72d12416126 100644 --- a/exp/runtime/hooks/api/v1alpha1/zz_generated.openapi.go +++ b/api/runtime/hooks/v1alpha1/zz_generated.openapi.go @@ -28,53 +28,53 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.AfterClusterUpgradeRequest": schema_runtime_hooks_api_v1alpha1_AfterClusterUpgradeRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.AfterClusterUpgradeResponse": schema_runtime_hooks_api_v1alpha1_AfterClusterUpgradeResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.AfterControlPlaneInitializedRequest": schema_runtime_hooks_api_v1alpha1_AfterControlPlaneInitializedRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.AfterControlPlaneInitializedResponse": schema_runtime_hooks_api_v1alpha1_AfterControlPlaneInitializedResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.AfterControlPlaneUpgradeRequest": schema_runtime_hooks_api_v1alpha1_AfterControlPlaneUpgradeRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.AfterControlPlaneUpgradeResponse": schema_runtime_hooks_api_v1alpha1_AfterControlPlaneUpgradeResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.BeforeClusterCreateRequest": schema_runtime_hooks_api_v1alpha1_BeforeClusterCreateRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.BeforeClusterCreateResponse": schema_runtime_hooks_api_v1alpha1_BeforeClusterCreateResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.BeforeClusterDeleteRequest": schema_runtime_hooks_api_v1alpha1_BeforeClusterDeleteRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.BeforeClusterDeleteResponse": schema_runtime_hooks_api_v1alpha1_BeforeClusterDeleteResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.BeforeClusterUpgradeRequest": schema_runtime_hooks_api_v1alpha1_BeforeClusterUpgradeRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.BeforeClusterUpgradeResponse": schema_runtime_hooks_api_v1alpha1_BeforeClusterUpgradeResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.Builtins": schema_runtime_hooks_api_v1alpha1_Builtins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterBuiltins": schema_runtime_hooks_api_v1alpha1_ClusterBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterNetworkBuiltins": schema_runtime_hooks_api_v1alpha1_ClusterNetworkBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterTopologyBuiltins": schema_runtime_hooks_api_v1alpha1_ClusterTopologyBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterTopologyClusterClassRefBuiltins": schema_runtime_hooks_api_v1alpha1_ClusterTopologyClusterClassRefBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.CommonRequest": schema_runtime_hooks_api_v1alpha1_CommonRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.CommonResponse": schema_runtime_hooks_api_v1alpha1_CommonResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.CommonRetryResponse": schema_runtime_hooks_api_v1alpha1_CommonRetryResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ControlPlaneBuiltins": schema_runtime_hooks_api_v1alpha1_ControlPlaneBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ControlPlaneMachineTemplateBuiltins": schema_runtime_hooks_api_v1alpha1_ControlPlaneMachineTemplateBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ControlPlaneMachineTemplateInfrastructureRefBuiltins": schema_runtime_hooks_api_v1alpha1_ControlPlaneMachineTemplateInfrastructureRefBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.DiscoverVariablesRequest": schema_runtime_hooks_api_v1alpha1_DiscoverVariablesRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.DiscoverVariablesResponse": schema_runtime_hooks_api_v1alpha1_DiscoverVariablesResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.DiscoveryRequest": schema_runtime_hooks_api_v1alpha1_DiscoveryRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.DiscoveryResponse": schema_runtime_hooks_api_v1alpha1_DiscoveryResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ExtensionHandler": schema_runtime_hooks_api_v1alpha1_ExtensionHandler(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GeneratePatchesRequest": schema_runtime_hooks_api_v1alpha1_GeneratePatchesRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GeneratePatchesRequestItem": schema_runtime_hooks_api_v1alpha1_GeneratePatchesRequestItem(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GeneratePatchesResponse": schema_runtime_hooks_api_v1alpha1_GeneratePatchesResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GeneratePatchesResponseItem": schema_runtime_hooks_api_v1alpha1_GeneratePatchesResponseItem(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GroupVersionHook": schema_runtime_hooks_api_v1alpha1_GroupVersionHook(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.HolderReference": schema_runtime_hooks_api_v1alpha1_HolderReference(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineBootstrapBuiltins": schema_runtime_hooks_api_v1alpha1_MachineBootstrapBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineBootstrapConfigRefBuiltins": schema_runtime_hooks_api_v1alpha1_MachineBootstrapConfigRefBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineDeploymentBuiltins": schema_runtime_hooks_api_v1alpha1_MachineDeploymentBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineInfrastructureRefBuiltins": schema_runtime_hooks_api_v1alpha1_MachineInfrastructureRefBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachinePoolBuiltins": schema_runtime_hooks_api_v1alpha1_MachinePoolBuiltins(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ValidateTopologyRequest": schema_runtime_hooks_api_v1alpha1_ValidateTopologyRequest(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ValidateTopologyRequestItem": schema_runtime_hooks_api_v1alpha1_ValidateTopologyRequestItem(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ValidateTopologyResponse": schema_runtime_hooks_api_v1alpha1_ValidateTopologyResponse(ref), - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.Variable": schema_runtime_hooks_api_v1alpha1_Variable(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterClusterUpgradeRequest": schema_api_runtime_hooks_v1alpha1_AfterClusterUpgradeRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterClusterUpgradeResponse": schema_api_runtime_hooks_v1alpha1_AfterClusterUpgradeResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterControlPlaneInitializedRequest": schema_api_runtime_hooks_v1alpha1_AfterControlPlaneInitializedRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterControlPlaneInitializedResponse": schema_api_runtime_hooks_v1alpha1_AfterControlPlaneInitializedResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterControlPlaneUpgradeRequest": schema_api_runtime_hooks_v1alpha1_AfterControlPlaneUpgradeRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.AfterControlPlaneUpgradeResponse": schema_api_runtime_hooks_v1alpha1_AfterControlPlaneUpgradeResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterCreateRequest": schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterCreateResponse": schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterDeleteRequest": schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterDeleteResponse": schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterUpgradeRequest": schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.BeforeClusterUpgradeResponse": schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Builtins": schema_api_runtime_hooks_v1alpha1_Builtins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterBuiltins": schema_api_runtime_hooks_v1alpha1_ClusterBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterNetworkBuiltins": schema_api_runtime_hooks_v1alpha1_ClusterNetworkBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyBuiltins": schema_api_runtime_hooks_v1alpha1_ClusterTopologyBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyClusterClassRefBuiltins": schema_api_runtime_hooks_v1alpha1_ClusterTopologyClusterClassRefBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CommonRequest": schema_api_runtime_hooks_v1alpha1_CommonRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CommonResponse": schema_api_runtime_hooks_v1alpha1_CommonResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.CommonRetryResponse": schema_api_runtime_hooks_v1alpha1_CommonRetryResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneBuiltins": schema_api_runtime_hooks_v1alpha1_ControlPlaneBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneMachineTemplateBuiltins": schema_api_runtime_hooks_v1alpha1_ControlPlaneMachineTemplateBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneMachineTemplateInfrastructureRefBuiltins": schema_api_runtime_hooks_v1alpha1_ControlPlaneMachineTemplateInfrastructureRefBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.DiscoverVariablesRequest": schema_api_runtime_hooks_v1alpha1_DiscoverVariablesRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.DiscoverVariablesResponse": schema_api_runtime_hooks_v1alpha1_DiscoverVariablesResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.DiscoveryRequest": schema_api_runtime_hooks_v1alpha1_DiscoveryRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.DiscoveryResponse": schema_api_runtime_hooks_v1alpha1_DiscoveryResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ExtensionHandler": schema_api_runtime_hooks_v1alpha1_ExtensionHandler(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesRequest": schema_api_runtime_hooks_v1alpha1_GeneratePatchesRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesRequestItem": schema_api_runtime_hooks_v1alpha1_GeneratePatchesRequestItem(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesResponse": schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesResponseItem": schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponseItem(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GroupVersionHook": schema_api_runtime_hooks_v1alpha1_GroupVersionHook(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.HolderReference": schema_api_runtime_hooks_v1alpha1_HolderReference(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineBootstrapBuiltins": schema_api_runtime_hooks_v1alpha1_MachineBootstrapBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineBootstrapConfigRefBuiltins": schema_api_runtime_hooks_v1alpha1_MachineBootstrapConfigRefBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineDeploymentBuiltins": schema_api_runtime_hooks_v1alpha1_MachineDeploymentBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineInfrastructureRefBuiltins": schema_api_runtime_hooks_v1alpha1_MachineInfrastructureRefBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachinePoolBuiltins": schema_api_runtime_hooks_v1alpha1_MachinePoolBuiltins(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ValidateTopologyRequest": schema_api_runtime_hooks_v1alpha1_ValidateTopologyRequest(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ValidateTopologyRequestItem": schema_api_runtime_hooks_v1alpha1_ValidateTopologyRequestItem(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ValidateTopologyResponse": schema_api_runtime_hooks_v1alpha1_ValidateTopologyResponse(ref), + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable": schema_api_runtime_hooks_v1alpha1_Variable(ref), } } -func schema_runtime_hooks_api_v1alpha1_AfterClusterUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_AfterClusterUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -115,7 +115,7 @@ func schema_runtime_hooks_api_v1alpha1_AfterClusterUpgradeRequest(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "cluster is the cluster object the lifecycle hook corresponds to.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Cluster"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"), }, }, "kubernetesVersion": { @@ -131,11 +131,11 @@ func schema_runtime_hooks_api_v1alpha1_AfterClusterUpgradeRequest(ref common.Ref }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.Cluster"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"}, } } -func schema_runtime_hooks_api_v1alpha1_AfterClusterUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_AfterClusterUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -179,7 +179,7 @@ func schema_runtime_hooks_api_v1alpha1_AfterClusterUpgradeResponse(ref common.Re } } -func schema_runtime_hooks_api_v1alpha1_AfterControlPlaneInitializedRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_AfterControlPlaneInitializedRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -220,7 +220,7 @@ func schema_runtime_hooks_api_v1alpha1_AfterControlPlaneInitializedRequest(ref c SchemaProps: spec.SchemaProps{ Description: "cluster is the cluster object the lifecycle hook corresponds to.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Cluster"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"), }, }, }, @@ -228,11 +228,11 @@ func schema_runtime_hooks_api_v1alpha1_AfterControlPlaneInitializedRequest(ref c }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.Cluster"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"}, } } -func schema_runtime_hooks_api_v1alpha1_AfterControlPlaneInitializedResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_AfterControlPlaneInitializedResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -276,7 +276,7 @@ func schema_runtime_hooks_api_v1alpha1_AfterControlPlaneInitializedResponse(ref } } -func schema_runtime_hooks_api_v1alpha1_AfterControlPlaneUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_AfterControlPlaneUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -317,7 +317,7 @@ func schema_runtime_hooks_api_v1alpha1_AfterControlPlaneUpgradeRequest(ref commo SchemaProps: spec.SchemaProps{ Description: "cluster is the cluster object the lifecycle hook corresponds to.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Cluster"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"), }, }, "kubernetesVersion": { @@ -333,11 +333,11 @@ func schema_runtime_hooks_api_v1alpha1_AfterControlPlaneUpgradeRequest(ref commo }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.Cluster"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"}, } } -func schema_runtime_hooks_api_v1alpha1_AfterControlPlaneUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_AfterControlPlaneUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -389,7 +389,7 @@ func schema_runtime_hooks_api_v1alpha1_AfterControlPlaneUpgradeResponse(ref comm } } -func schema_runtime_hooks_api_v1alpha1_BeforeClusterCreateRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -430,7 +430,7 @@ func schema_runtime_hooks_api_v1alpha1_BeforeClusterCreateRequest(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "cluster is the cluster object the lifecycle hook corresponds to.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Cluster"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"), }, }, }, @@ -438,11 +438,11 @@ func schema_runtime_hooks_api_v1alpha1_BeforeClusterCreateRequest(ref common.Ref }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.Cluster"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"}, } } -func schema_runtime_hooks_api_v1alpha1_BeforeClusterCreateResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_BeforeClusterCreateResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -494,7 +494,7 @@ func schema_runtime_hooks_api_v1alpha1_BeforeClusterCreateResponse(ref common.Re } } -func schema_runtime_hooks_api_v1alpha1_BeforeClusterDeleteRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -535,7 +535,7 @@ func schema_runtime_hooks_api_v1alpha1_BeforeClusterDeleteRequest(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "cluster is the cluster object the lifecycle hook corresponds to.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Cluster"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"), }, }, }, @@ -543,11 +543,11 @@ func schema_runtime_hooks_api_v1alpha1_BeforeClusterDeleteRequest(ref common.Ref }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.Cluster"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"}, } } -func schema_runtime_hooks_api_v1alpha1_BeforeClusterDeleteResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_BeforeClusterDeleteResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -599,7 +599,7 @@ func schema_runtime_hooks_api_v1alpha1_BeforeClusterDeleteResponse(ref common.Re } } -func schema_runtime_hooks_api_v1alpha1_BeforeClusterUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -640,7 +640,7 @@ func schema_runtime_hooks_api_v1alpha1_BeforeClusterUpgradeRequest(ref common.Re SchemaProps: spec.SchemaProps{ Description: "cluster is the cluster object the lifecycle hook corresponds to.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.Cluster"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"), }, }, "fromKubernetesVersion": { @@ -664,11 +664,11 @@ func schema_runtime_hooks_api_v1alpha1_BeforeClusterUpgradeRequest(ref common.Re }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.Cluster"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"}, } } -func schema_runtime_hooks_api_v1alpha1_BeforeClusterUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_BeforeClusterUpgradeResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -720,7 +720,7 @@ func schema_runtime_hooks_api_v1alpha1_BeforeClusterUpgradeResponse(ref common.R } } -func schema_runtime_hooks_api_v1alpha1_Builtins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_Builtins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -730,36 +730,36 @@ func schema_runtime_hooks_api_v1alpha1_Builtins(ref common.ReferenceCallback) co "cluster": { SchemaProps: spec.SchemaProps{ Description: "cluster represents builtin cluster variables.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterBuiltins"), }, }, "controlPlane": { SchemaProps: spec.SchemaProps{ Description: "controlPlane represents builtin ControlPlane variables.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ControlPlaneBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneBuiltins"), }, }, "machineDeployment": { SchemaProps: spec.SchemaProps{ Description: "machineDeployment represents builtin MachineDeployment variables.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineDeploymentBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineDeploymentBuiltins"), }, }, "machinePool": { SchemaProps: spec.SchemaProps{ Description: "machinePool represents builtin MachinePool variables.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachinePoolBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachinePoolBuiltins"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterBuiltins", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ControlPlaneBuiltins", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineDeploymentBuiltins", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachinePoolBuiltins"}, + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineDeploymentBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachinePoolBuiltins"}, } } -func schema_runtime_hooks_api_v1alpha1_ClusterBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ClusterBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -790,30 +790,30 @@ func schema_runtime_hooks_api_v1alpha1_ClusterBuiltins(ref common.ReferenceCallb "metadata": { SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata set on the Cluster object.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "topology": { SchemaProps: spec.SchemaProps{ Description: "topology represents the cluster topology variables.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterTopologyBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyBuiltins"), }, }, "network": { SchemaProps: spec.SchemaProps{ Description: "network represents the cluster network variables.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterNetworkBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterNetworkBuiltins"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterNetworkBuiltins", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterTopologyBuiltins"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterNetworkBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyBuiltins"}, } } -func schema_runtime_hooks_api_v1alpha1_ClusterNetworkBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ClusterNetworkBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -863,7 +863,7 @@ func schema_runtime_hooks_api_v1alpha1_ClusterNetworkBuiltins(ref common.Referen } } -func schema_runtime_hooks_api_v1alpha1_ClusterTopologyBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ClusterTopologyBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -881,7 +881,7 @@ func schema_runtime_hooks_api_v1alpha1_ClusterTopologyBuiltins(ref common.Refere SchemaProps: spec.SchemaProps{ Description: "classRef is the ref to the ClusterClass that is used for the topology.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterTopologyClusterClassRefBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyClusterClassRefBuiltins"), }, }, "class": { @@ -903,11 +903,11 @@ func schema_runtime_hooks_api_v1alpha1_ClusterTopologyBuiltins(ref common.Refere }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ClusterTopologyClusterClassRefBuiltins"}, + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ClusterTopologyClusterClassRefBuiltins"}, } } -func schema_runtime_hooks_api_v1alpha1_ClusterTopologyClusterClassRefBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ClusterTopologyClusterClassRefBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -937,7 +937,7 @@ func schema_runtime_hooks_api_v1alpha1_ClusterTopologyClusterClassRefBuiltins(re } } -func schema_runtime_hooks_api_v1alpha1_CommonRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_CommonRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -966,7 +966,7 @@ func schema_runtime_hooks_api_v1alpha1_CommonRequest(ref common.ReferenceCallbac } } -func schema_runtime_hooks_api_v1alpha1_CommonResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_CommonResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -996,7 +996,7 @@ func schema_runtime_hooks_api_v1alpha1_CommonResponse(ref common.ReferenceCallba } } -func schema_runtime_hooks_api_v1alpha1_CommonRetryResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_CommonRetryResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1034,7 +1034,7 @@ func schema_runtime_hooks_api_v1alpha1_CommonRetryResponse(ref common.ReferenceC } } -func schema_runtime_hooks_api_v1alpha1_ControlPlaneBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ControlPlaneBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1051,7 +1051,7 @@ func schema_runtime_hooks_api_v1alpha1_ControlPlaneBuiltins(ref common.Reference "metadata": { SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata set on the ControlPlane object.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "name": { @@ -1071,18 +1071,18 @@ func schema_runtime_hooks_api_v1alpha1_ControlPlaneBuiltins(ref common.Reference "machineTemplate": { SchemaProps: spec.SchemaProps{ Description: "machineTemplate is the value of the .spec.machineTemplate field of the ControlPlane object.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ControlPlaneMachineTemplateBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneMachineTemplateBuiltins"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ControlPlaneMachineTemplateBuiltins"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneMachineTemplateBuiltins"}, } } -func schema_runtime_hooks_api_v1alpha1_ControlPlaneMachineTemplateBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ControlPlaneMachineTemplateBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1093,18 +1093,18 @@ func schema_runtime_hooks_api_v1alpha1_ControlPlaneMachineTemplateBuiltins(ref c SchemaProps: spec.SchemaProps{ Description: "infrastructureRef is the value of the infrastructureRef field of ControlPlane.spec.machineTemplate.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ControlPlaneMachineTemplateInfrastructureRefBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneMachineTemplateInfrastructureRefBuiltins"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ControlPlaneMachineTemplateInfrastructureRefBuiltins"}, + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ControlPlaneMachineTemplateInfrastructureRefBuiltins"}, } } -func schema_runtime_hooks_api_v1alpha1_ControlPlaneMachineTemplateInfrastructureRefBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ControlPlaneMachineTemplateInfrastructureRefBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1124,7 +1124,7 @@ func schema_runtime_hooks_api_v1alpha1_ControlPlaneMachineTemplateInfrastructure } } -func schema_runtime_hooks_api_v1alpha1_DiscoverVariablesRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_DiscoverVariablesRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1167,7 +1167,7 @@ func schema_runtime_hooks_api_v1alpha1_DiscoverVariablesRequest(ref common.Refer } } -func schema_runtime_hooks_api_v1alpha1_DiscoverVariablesResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_DiscoverVariablesResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1212,7 +1212,7 @@ func schema_runtime_hooks_api_v1alpha1_DiscoverVariablesResponse(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassVariable"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable"), }, }, }, @@ -1223,11 +1223,11 @@ func schema_runtime_hooks_api_v1alpha1_DiscoverVariablesResponse(ref common.Refe }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ClusterClassVariable"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable"}, } } -func schema_runtime_hooks_api_v1alpha1_DiscoveryRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_DiscoveryRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1254,7 +1254,7 @@ func schema_runtime_hooks_api_v1alpha1_DiscoveryRequest(ref common.ReferenceCall } } -func schema_runtime_hooks_api_v1alpha1_DiscoveryResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_DiscoveryResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1307,7 +1307,7 @@ func schema_runtime_hooks_api_v1alpha1_DiscoveryResponse(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ExtensionHandler"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ExtensionHandler"), }, }, }, @@ -1318,11 +1318,11 @@ func schema_runtime_hooks_api_v1alpha1_DiscoveryResponse(ref common.ReferenceCal }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ExtensionHandler"}, + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ExtensionHandler"}, } } -func schema_runtime_hooks_api_v1alpha1_ExtensionHandler(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ExtensionHandler(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1341,7 +1341,7 @@ func schema_runtime_hooks_api_v1alpha1_ExtensionHandler(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "requestHook defines the versioned runtime hook which this ExtensionHandler serves.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GroupVersionHook"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GroupVersionHook"), }, }, "timeoutSeconds": { @@ -1363,11 +1363,11 @@ func schema_runtime_hooks_api_v1alpha1_ExtensionHandler(ref common.ReferenceCall }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GroupVersionHook"}, + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GroupVersionHook"}, } } -func schema_runtime_hooks_api_v1alpha1_GeneratePatchesRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_GeneratePatchesRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1412,7 +1412,7 @@ func schema_runtime_hooks_api_v1alpha1_GeneratePatchesRequest(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.Variable"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"), }, }, }, @@ -1426,7 +1426,7 @@ func schema_runtime_hooks_api_v1alpha1_GeneratePatchesRequest(ref common.Referen Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GeneratePatchesRequestItem"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesRequestItem"), }, }, }, @@ -1437,11 +1437,11 @@ func schema_runtime_hooks_api_v1alpha1_GeneratePatchesRequest(ref common.Referen }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GeneratePatchesRequestItem", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.Variable"}, + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesRequestItem", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"}, } } -func schema_runtime_hooks_api_v1alpha1_GeneratePatchesRequestItem(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_GeneratePatchesRequestItem(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1460,7 +1460,7 @@ func schema_runtime_hooks_api_v1alpha1_GeneratePatchesRequestItem(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "holderReference is a reference to the object where the template is used.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.HolderReference"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.HolderReference"), }, }, "object": { @@ -1477,7 +1477,7 @@ func schema_runtime_hooks_api_v1alpha1_GeneratePatchesRequestItem(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.Variable"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"), }, }, }, @@ -1488,11 +1488,11 @@ func schema_runtime_hooks_api_v1alpha1_GeneratePatchesRequestItem(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.HolderReference", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.Variable"}, + "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.HolderReference", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"}, } } -func schema_runtime_hooks_api_v1alpha1_GeneratePatchesResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1537,7 +1537,7 @@ func schema_runtime_hooks_api_v1alpha1_GeneratePatchesResponse(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GeneratePatchesResponseItem"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesResponseItem"), }, }, }, @@ -1548,11 +1548,11 @@ func schema_runtime_hooks_api_v1alpha1_GeneratePatchesResponse(ref common.Refere }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.GeneratePatchesResponseItem"}, + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.GeneratePatchesResponseItem"}, } } -func schema_runtime_hooks_api_v1alpha1_GeneratePatchesResponseItem(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_GeneratePatchesResponseItem(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1590,7 +1590,7 @@ func schema_runtime_hooks_api_v1alpha1_GeneratePatchesResponseItem(ref common.Re } } -func schema_runtime_hooks_api_v1alpha1_GroupVersionHook(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_GroupVersionHook(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1620,7 +1620,7 @@ func schema_runtime_hooks_api_v1alpha1_GroupVersionHook(ref common.ReferenceCall } } -func schema_runtime_hooks_api_v1alpha1_HolderReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_HolderReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1674,7 +1674,7 @@ func schema_runtime_hooks_api_v1alpha1_HolderReference(ref common.ReferenceCallb } } -func schema_runtime_hooks_api_v1alpha1_MachineBootstrapBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_MachineBootstrapBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1684,18 +1684,18 @@ func schema_runtime_hooks_api_v1alpha1_MachineBootstrapBuiltins(ref common.Refer "configRef": { SchemaProps: spec.SchemaProps{ Description: "configRef is the value of the .spec.template.spec.bootstrap.configRef field of the MachineDeployment.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineBootstrapConfigRefBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineBootstrapConfigRefBuiltins"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineBootstrapConfigRefBuiltins"}, + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineBootstrapConfigRefBuiltins"}, } } -func schema_runtime_hooks_api_v1alpha1_MachineBootstrapConfigRefBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_MachineBootstrapConfigRefBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1715,7 +1715,7 @@ func schema_runtime_hooks_api_v1alpha1_MachineBootstrapConfigRefBuiltins(ref com } } -func schema_runtime_hooks_api_v1alpha1_MachineDeploymentBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_MachineDeploymentBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1732,7 +1732,7 @@ func schema_runtime_hooks_api_v1alpha1_MachineDeploymentBuiltins(ref common.Refe "metadata": { SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata set on the MachineDeployment.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "class": { @@ -1766,24 +1766,24 @@ func schema_runtime_hooks_api_v1alpha1_MachineDeploymentBuiltins(ref common.Refe "bootstrap": { SchemaProps: spec.SchemaProps{ Description: "bootstrap is the value of the .spec.template.spec.bootstrap field of the MachineDeployment.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineBootstrapBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineBootstrapBuiltins"), }, }, "infrastructureRef": { SchemaProps: spec.SchemaProps{ Description: "infrastructureRef is the value of the .spec.template.spec.infrastructureRef field of the MachineDeployment.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineInfrastructureRefBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineInfrastructureRefBuiltins"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineBootstrapBuiltins", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineInfrastructureRefBuiltins"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineBootstrapBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineInfrastructureRefBuiltins"}, } } -func schema_runtime_hooks_api_v1alpha1_MachineInfrastructureRefBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_MachineInfrastructureRefBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1803,7 +1803,7 @@ func schema_runtime_hooks_api_v1alpha1_MachineInfrastructureRefBuiltins(ref comm } } -func schema_runtime_hooks_api_v1alpha1_MachinePoolBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_MachinePoolBuiltins(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1820,7 +1820,7 @@ func schema_runtime_hooks_api_v1alpha1_MachinePoolBuiltins(ref common.ReferenceC "metadata": { SchemaProps: spec.SchemaProps{ Description: "metadata is the metadata set on the MachinePool.", - Ref: ref("sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta"), + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"), }, }, "class": { @@ -1854,24 +1854,24 @@ func schema_runtime_hooks_api_v1alpha1_MachinePoolBuiltins(ref common.ReferenceC "bootstrap": { SchemaProps: spec.SchemaProps{ Description: "bootstrap is the value of the .spec.template.spec.bootstrap field of the MachinePool.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineBootstrapBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineBootstrapBuiltins"), }, }, "infrastructureRef": { SchemaProps: spec.SchemaProps{ Description: "infrastructureRef is the value of the .spec.template.spec.infrastructureRef field of the MachinePool.", - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineInfrastructureRefBuiltins"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineInfrastructureRefBuiltins"), }, }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/v1beta1.ObjectMeta", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineBootstrapBuiltins", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.MachineInfrastructureRefBuiltins"}, + "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineBootstrapBuiltins", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.MachineInfrastructureRefBuiltins"}, } } -func schema_runtime_hooks_api_v1alpha1_ValidateTopologyRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ValidateTopologyRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1916,7 +1916,7 @@ func schema_runtime_hooks_api_v1alpha1_ValidateTopologyRequest(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.Variable"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"), }, }, }, @@ -1929,7 +1929,7 @@ func schema_runtime_hooks_api_v1alpha1_ValidateTopologyRequest(ref common.Refere Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ValidateTopologyRequestItem"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ValidateTopologyRequestItem"), }, }, }, @@ -1940,11 +1940,11 @@ func schema_runtime_hooks_api_v1alpha1_ValidateTopologyRequest(ref common.Refere }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.ValidateTopologyRequestItem", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.Variable"}, + "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.ValidateTopologyRequestItem", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"}, } } -func schema_runtime_hooks_api_v1alpha1_ValidateTopologyRequestItem(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ValidateTopologyRequestItem(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1955,7 +1955,7 @@ func schema_runtime_hooks_api_v1alpha1_ValidateTopologyRequestItem(ref common.Re SchemaProps: spec.SchemaProps{ Description: "holderReference is a reference to the object where the template is used.", Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.HolderReference"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.HolderReference"), }, }, "object": { @@ -1972,7 +1972,7 @@ func schema_runtime_hooks_api_v1alpha1_ValidateTopologyRequestItem(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.Variable"), + Ref: ref("sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"), }, }, }, @@ -1983,11 +1983,11 @@ func schema_runtime_hooks_api_v1alpha1_ValidateTopologyRequestItem(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.HolderReference", "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1.Variable"}, + "k8s.io/apimachinery/pkg/runtime.RawExtension", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.HolderReference", "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1.Variable"}, } } -func schema_runtime_hooks_api_v1alpha1_ValidateTopologyResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_ValidateTopologyResponse(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -2031,7 +2031,7 @@ func schema_runtime_hooks_api_v1alpha1_ValidateTopologyResponse(ref common.Refer } } -func schema_runtime_hooks_api_v1alpha1_Variable(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_runtime_hooks_v1alpha1_Variable(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ diff --git a/exp/runtime/api/v1alpha1/conversion.go b/api/runtime/v1alpha1/conversion.go similarity index 96% rename from exp/runtime/api/v1alpha1/conversion.go rename to api/runtime/v1alpha1/conversion.go index 1adc124fe551..f5a0228c041a 100644 --- a/exp/runtime/api/v1alpha1/conversion.go +++ b/api/runtime/v1alpha1/conversion.go @@ -21,8 +21,8 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" ) func (src *ExtensionConfig) ConvertTo(dstRaw conversion.Hub) error { diff --git a/exp/runtime/api/v1alpha1/conversion_test.go b/api/runtime/v1alpha1/conversion_test.go similarity index 97% rename from exp/runtime/api/v1alpha1/conversion_test.go rename to api/runtime/v1alpha1/conversion_test.go index b831e29bbfe9..7efd238ce5e0 100644 --- a/exp/runtime/api/v1alpha1/conversion_test.go +++ b/api/runtime/v1alpha1/conversion_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/exp/runtime/api/v1alpha1/doc.go b/api/runtime/v1alpha1/doc.go similarity index 91% rename from exp/runtime/api/v1alpha1/doc.go rename to api/runtime/v1alpha1/doc.go index 05950a3d2ca7..4e07c08b10cf 100644 --- a/exp/runtime/api/v1alpha1/doc.go +++ b/api/runtime/v1alpha1/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1alpha1 contains the v1alpha1 implementation of ExtensionConfig. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/runtime/v1beta2 // // Deprecated: This package is deprecated and is going to be removed when support for v1beta1 will be dropped. package v1alpha1 diff --git a/exp/runtime/api/v1alpha1/extensionconfig_types.go b/api/runtime/v1alpha1/extensionconfig_types.go similarity index 99% rename from exp/runtime/api/v1alpha1/extensionconfig_types.go rename to api/runtime/v1alpha1/extensionconfig_types.go index 0ed3745dafdb..74843d1af59a 100644 --- a/exp/runtime/api/v1alpha1/extensionconfig_types.go +++ b/api/runtime/v1alpha1/extensionconfig_types.go @@ -19,7 +19,7 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // ANCHOR: ExtensionConfigSpec diff --git a/exp/runtime/api/v1alpha1/groupversion_info.go b/api/runtime/v1alpha1/groupversion_info.go similarity index 100% rename from exp/runtime/api/v1alpha1/groupversion_info.go rename to api/runtime/v1alpha1/groupversion_info.go diff --git a/exp/runtime/api/v1alpha1/zz_generated.conversion.go b/api/runtime/v1alpha1/zz_generated.conversion.go similarity index 99% rename from exp/runtime/api/v1alpha1/zz_generated.conversion.go rename to api/runtime/v1alpha1/zz_generated.conversion.go index 54d3ff1c1af6..976acfeec3d3 100644 --- a/exp/runtime/api/v1alpha1/zz_generated.conversion.go +++ b/api/runtime/v1alpha1/zz_generated.conversion.go @@ -27,8 +27,8 @@ import ( 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/api/v1beta1" - v1beta2 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + v1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" ) func init() { diff --git a/exp/runtime/api/v1alpha1/zz_generated.deepcopy.go b/api/runtime/v1alpha1/zz_generated.deepcopy.go similarity index 99% rename from exp/runtime/api/v1alpha1/zz_generated.deepcopy.go rename to api/runtime/v1alpha1/zz_generated.deepcopy.go index 332b048343f3..5358e24deed8 100644 --- a/exp/runtime/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/runtime/v1alpha1/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/exp/ipam/api/v1beta2/.import-restrictions b/api/runtime/v1beta2/.import-restrictions similarity index 100% rename from exp/ipam/api/v1beta2/.import-restrictions rename to api/runtime/v1beta2/.import-restrictions diff --git a/exp/runtime/api/v1beta2/conversion.go b/api/runtime/v1beta2/conversion.go similarity index 100% rename from exp/runtime/api/v1beta2/conversion.go rename to api/runtime/v1beta2/conversion.go diff --git a/exp/runtime/api/v1beta2/doc.go b/api/runtime/v1beta2/doc.go similarity index 100% rename from exp/runtime/api/v1beta2/doc.go rename to api/runtime/v1beta2/doc.go diff --git a/exp/runtime/api/v1beta2/extensionconfig_types.go b/api/runtime/v1beta2/extensionconfig_types.go similarity index 98% rename from exp/runtime/api/v1beta2/extensionconfig_types.go rename to api/runtime/v1beta2/extensionconfig_types.go index 64a378c4b919..73d24106d34f 100644 --- a/exp/runtime/api/v1beta2/extensionconfig_types.go +++ b/api/runtime/v1beta2/extensionconfig_types.go @@ -19,7 +19,7 @@ package v1beta2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // ANCHOR: ExtensionConfigSpec @@ -220,6 +220,7 @@ const ( // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ExtensionConfig" // ExtensionConfig is the Schema for the ExtensionConfig API. +// NOTE: This CRD can only be used if the RuntimeSDK feature gate is enabled. type ExtensionConfig struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. diff --git a/exp/runtime/api/v1beta2/groupversion_info.go b/api/runtime/v1beta2/groupversion_info.go similarity index 100% rename from exp/runtime/api/v1beta2/groupversion_info.go rename to api/runtime/v1beta2/groupversion_info.go diff --git a/exp/runtime/api/v1beta2/zz_generated.deepcopy.go b/api/runtime/v1beta2/zz_generated.deepcopy.go similarity index 98% rename from exp/runtime/api/v1beta2/zz_generated.deepcopy.go rename to api/runtime/v1beta2/zz_generated.deepcopy.go index af6348193e98..64820d769401 100644 --- a/exp/runtime/api/v1beta2/zz_generated.deepcopy.go +++ b/api/runtime/v1beta2/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1beta2 import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - apiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -202,7 +202,7 @@ func (in *ExtensionConfigV1Beta1DeprecatedStatus) DeepCopyInto(out *ExtensionCon *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta2.Conditions, len(*in)) + *out = make(corev1beta2.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/bootstrap/kubeadm/internal/builder/builders.go b/bootstrap/kubeadm/internal/builder/builders.go index 9e355e81df3c..e92bddee11d7 100644 --- a/bootstrap/kubeadm/internal/builder/builders.go +++ b/bootstrap/kubeadm/internal/builder/builders.go @@ -21,8 +21,8 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // KubeadmConfigBuilder contains the information needed to produce a KubeadmConfig. diff --git a/bootstrap/kubeadm/internal/cloudinit/cloudinit.go b/bootstrap/kubeadm/internal/cloudinit/cloudinit.go index 6d78f5c363f3..c49decd19786 100644 --- a/bootstrap/kubeadm/internal/cloudinit/cloudinit.go +++ b/bootstrap/kubeadm/internal/cloudinit/cloudinit.go @@ -24,7 +24,7 @@ import ( "github.com/blang/semver/v4" "github.com/pkg/errors" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) const ( diff --git a/bootstrap/kubeadm/internal/cloudinit/cloudinit_test.go b/bootstrap/kubeadm/internal/cloudinit/cloudinit_test.go index 99b38d9423ea..027e5725e4fc 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/ptr" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "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 e3e141efaaf8..4fca5b2398b3 100644 --- a/bootstrap/kubeadm/internal/cloudinit/node_test.go +++ b/bootstrap/kubeadm/internal/cloudinit/node_test.go @@ -22,7 +22,7 @@ import ( "sigs.k8s.io/yaml" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func TestNewNode(t *testing.T) { diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go index bd49ddb0b614..6686231481a1 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go @@ -43,15 +43,14 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/yaml" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/cloudinit" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/ignition" "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/clustercache" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/util/taints" "sigs.k8s.io/cluster-api/util" @@ -127,7 +126,7 @@ func (r *KubeadmConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl if feature.Gates.Enabled(feature.MachinePool) { b = b.Watches( - &expv1.MachinePool{}, + &clusterv1.MachinePool{}, handler.EnqueueRequestsFromMapFunc(r.MachinePoolToBootstrapMapFunc), builder.WithPredicates(predicates.ResourceIsChanged(mgr.GetScheme(), predicateLog)), ) @@ -1178,7 +1177,7 @@ func (r *KubeadmConfigReconciler) ClusterToKubeadmConfigs(ctx context.Context, o } if feature.Gates.Enabled(feature.MachinePool) { - machinePoolList := &expv1.MachinePoolList{} + machinePoolList := &clusterv1.MachinePoolList{} if err := r.Client.List(ctx, machinePoolList, selectors...); err != nil { return nil } @@ -1214,7 +1213,7 @@ func (r *KubeadmConfigReconciler) MachineToBootstrapMapFunc(_ context.Context, o // MachinePoolToBootstrapMapFunc is a handler.ToRequestsFunc to be used to enqueue // request for reconciliation of KubeadmConfig. func (r *KubeadmConfigReconciler) MachinePoolToBootstrapMapFunc(_ context.Context, o client.Object) []ctrl.Request { - m, ok := o.(*expv1.MachinePool) + m, ok := o.(*clusterv1.MachinePool) if !ok { panic(fmt.Sprintf("Expected a MachinePool but got a %T", o)) } diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_reconciler_test.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_reconciler_test.go index 718214bce2f1..bed494228029 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_reconciler_test.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_reconciler_test.go @@ -23,7 +23,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go index 927a550d2e68..317bd6b4982b 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go @@ -37,11 +37,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/yaml" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" bootstrapbuilder "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/builder" "sigs.k8s.io/cluster-api/controllers/clustercache" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/certs" @@ -735,7 +734,7 @@ func TestReconcileIfJoinNodePoolsAndControlPlaneIsReady(t *testing.T) { useCases := []struct { name string - machinePool *expv1.MachinePool + machinePool *clusterv1.MachinePool configName string configBuilder func(string, string) *bootstrapv1.KubeadmConfig }{ @@ -1283,7 +1282,7 @@ func TestBootstrapTokenRotationMachinePool(t *testing.T) { } objects = append(objects, createSecrets(t, cluster, initConfig)...) - myclient := fake.NewClientBuilder().WithObjects(objects...).WithStatusSubresource(&bootstrapv1.KubeadmConfig{}, &expv1.MachinePool{}).Build() + myclient := fake.NewClientBuilder().WithObjects(objects...).WithStatusSubresource(&bootstrapv1.KubeadmConfig{}, &clusterv1.MachinePool{}).Build() remoteClient := fake.NewClientBuilder().Build() k := &KubeadmConfigReconciler{ Client: myclient, @@ -1367,7 +1366,7 @@ func TestBootstrapTokenRotationMachinePool(t *testing.T) { patchHelper, err := patch.NewHelper(workerMachinePool, myclient) g.Expect(err).ShouldNot(HaveOccurred()) - workerMachinePool.Status.Initialization = &expv1.MachinePoolInitializationStatus{InfrastructureProvisioned: true} + workerMachinePool.Status.Initialization = &clusterv1.MachinePoolInitializationStatus{InfrastructureProvisioned: true} g.Expect(patchHelper.Patch(ctx, workerMachinePool, patch.WithStatusObservedGeneration{})).To(Succeed()) result, err = k.Reconcile(ctx, request) @@ -1550,7 +1549,7 @@ func TestBootstrapTokenRefreshIfTokenSecretCleaned(t *testing.T) { } objects = append(objects, createSecrets(t, cluster, initConfig)...) - myclient := fake.NewClientBuilder().WithObjects(objects...).WithStatusSubresource(&bootstrapv1.KubeadmConfig{}, &expv1.MachinePool{}).Build() + myclient := fake.NewClientBuilder().WithObjects(objects...).WithStatusSubresource(&bootstrapv1.KubeadmConfig{}, &clusterv1.MachinePool{}).Build() remoteClient := fake.NewClientBuilder().Build() k := &KubeadmConfigReconciler{ Client: myclient, @@ -2604,7 +2603,7 @@ func newControlPlaneMachine(cluster *clusterv1.Cluster, name string) *clusterv1. } // newMachinePool return a MachinePool object with the passed Cluster information and a basic bootstrap template. -func newMachinePool(cluster *clusterv1.Cluster, name string) *expv1.MachinePool { +func newMachinePool(cluster *clusterv1.Cluster, name string) *clusterv1.MachinePool { m := builder.MachinePool(cluster.Namespace, name). WithClusterName(cluster.Name). WithLabels(map[string]string{clusterv1.ClusterNameLabel: cluster.Name}). @@ -2615,7 +2614,7 @@ func newMachinePool(cluster *clusterv1.Cluster, name string) *expv1.MachinePool } // newWorkerMachinePoolForCluster returns a MachinePool with the passed Cluster's information and a pre-configured name. -func newWorkerMachinePoolForCluster(cluster *clusterv1.Cluster) *expv1.MachinePool { +func newWorkerMachinePoolForCluster(cluster *clusterv1.Cluster) *clusterv1.MachinePool { return newMachinePool(cluster, "worker-machinepool") } @@ -2674,14 +2673,14 @@ func addKubeadmConfigToMachine(config *bootstrapv1.KubeadmConfig, machine *clust } // addKubeadmConfigToMachine adds the config details to the passed MachinePool and adds the Machine to the KubeadmConfig as an ownerReference. -func addKubeadmConfigToMachinePool(config *bootstrapv1.KubeadmConfig, machinePool *expv1.MachinePool) { +func addKubeadmConfigToMachinePool(config *bootstrapv1.KubeadmConfig, machinePool *clusterv1.MachinePool) { if machinePool == nil { panic("no machinePool passed to function") } config.OwnerReferences = []metav1.OwnerReference{ { Kind: "MachinePool", - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Name: machinePool.Name, UID: types.UID(fmt.Sprintf("%s uid", machinePool.Name)), }, diff --git a/bootstrap/kubeadm/internal/controllers/suite_test.go b/bootstrap/kubeadm/internal/controllers/suite_test.go index bbf2d959c786..a0651e37d6f5 100644 --- a/bootstrap/kubeadm/internal/controllers/suite_test.go +++ b/bootstrap/kubeadm/internal/controllers/suite_test.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/test/envtest" ) diff --git a/bootstrap/kubeadm/internal/ignition/clc/clc.go b/bootstrap/kubeadm/internal/ignition/clc/clc.go index 34ae3aaae30f..0dd3f4a15f2c 100644 --- a/bootstrap/kubeadm/internal/ignition/clc/clc.go +++ b/bootstrap/kubeadm/internal/ignition/clc/clc.go @@ -47,7 +47,7 @@ import ( ignitionTypes "github.com/flatcar/ignition/config/v2_3/types" "github.com/pkg/errors" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/cloudinit" ) diff --git a/bootstrap/kubeadm/internal/ignition/clc/clc_test.go b/bootstrap/kubeadm/internal/ignition/clc/clc_test.go index 23ea4dd5230f..11e9202f0297 100644 --- a/bootstrap/kubeadm/internal/ignition/clc/clc_test.go +++ b/bootstrap/kubeadm/internal/ignition/clc/clc_test.go @@ -25,7 +25,7 @@ import ( "github.com/google/go-cmp/cmp" "k8s.io/utils/ptr" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/cloudinit" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/ignition/clc" ) diff --git a/bootstrap/kubeadm/internal/ignition/ignition.go b/bootstrap/kubeadm/internal/ignition/ignition.go index f936563d2def..d1e6a006ec3e 100644 --- a/bootstrap/kubeadm/internal/ignition/ignition.go +++ b/bootstrap/kubeadm/internal/ignition/ignition.go @@ -21,7 +21,7 @@ package ignition import ( "fmt" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/cloudinit" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/ignition/clc" ) diff --git a/bootstrap/kubeadm/internal/ignition/ignition_test.go b/bootstrap/kubeadm/internal/ignition/ignition_test.go index 59cff87987ee..748eeb2f82d3 100644 --- a/bootstrap/kubeadm/internal/ignition/ignition_test.go +++ b/bootstrap/kubeadm/internal/ignition/ignition_test.go @@ -23,7 +23,7 @@ import ( "strings" "testing" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/cloudinit" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/ignition" ) diff --git a/bootstrap/kubeadm/internal/locking/control_plane_init_mutex.go b/bootstrap/kubeadm/internal/locking/control_plane_init_mutex.go index f1e4be36944c..3ce5b89d37ee 100644 --- a/bootstrap/kubeadm/internal/locking/control_plane_init_mutex.go +++ b/bootstrap/kubeadm/internal/locking/control_plane_init_mutex.go @@ -30,7 +30,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const semaphoreInformationKey = "lock-information" 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 a6223f6ae702..5878b8dfb2e6 100644 --- a/bootstrap/kubeadm/internal/locking/control_plane_init_mutex_test.go +++ b/bootstrap/kubeadm/internal/locking/control_plane_init_mutex_test.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( diff --git a/bootstrap/kubeadm/internal/webhooks/kubeadmconfig.go b/bootstrap/kubeadm/internal/webhooks/kubeadmconfig.go index f38ef50bf229..fbd0655dd26c 100644 --- a/bootstrap/kubeadm/internal/webhooks/kubeadmconfig.go +++ b/bootstrap/kubeadm/internal/webhooks/kubeadmconfig.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func (webhook *KubeadmConfig) SetupWebhookWithManager(mgr ctrl.Manager) error { diff --git a/bootstrap/kubeadm/internal/webhooks/kubeadmconfig_test.go b/bootstrap/kubeadm/internal/webhooks/kubeadmconfig_test.go index ce9098254516..13a7db2b084a 100644 --- a/bootstrap/kubeadm/internal/webhooks/kubeadmconfig_test.go +++ b/bootstrap/kubeadm/internal/webhooks/kubeadmconfig_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/webhooks/util" ) diff --git a/bootstrap/kubeadm/internal/webhooks/kubeadmconfigtemplate.go b/bootstrap/kubeadm/internal/webhooks/kubeadmconfigtemplate.go index 5f867f564783..5f9efa867ca9 100644 --- a/bootstrap/kubeadm/internal/webhooks/kubeadmconfigtemplate.go +++ b/bootstrap/kubeadm/internal/webhooks/kubeadmconfigtemplate.go @@ -26,7 +26,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func (webhook *KubeadmConfigTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error { diff --git a/bootstrap/kubeadm/internal/webhooks/kubeadmconfigtemplate_test.go b/bootstrap/kubeadm/internal/webhooks/kubeadmconfigtemplate_test.go index 965b524c0014..49445d651424 100644 --- a/bootstrap/kubeadm/internal/webhooks/kubeadmconfigtemplate_test.go +++ b/bootstrap/kubeadm/internal/webhooks/kubeadmconfigtemplate_test.go @@ -24,8 +24,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/webhooks/util" ) diff --git a/bootstrap/kubeadm/main.go b/bootstrap/kubeadm/main.go index 8fff700b4042..f182230b4e2e 100644 --- a/bootstrap/kubeadm/main.go +++ b/bootstrap/kubeadm/main.go @@ -46,15 +46,14 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/webhook" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1beta1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" kubeadmbootstrapcontrollers "sigs.k8s.io/cluster-api/bootstrap/kubeadm/controllers" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/internal/webhooks" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/crdmigrator" "sigs.k8s.io/cluster-api/controllers/remote" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/feature" bootstrapv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha3" bootstrapv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha4" @@ -101,7 +100,6 @@ func init() { _ = clientgoscheme.AddToScheme(scheme) _ = apiextensionsv1.AddToScheme(scheme) _ = clusterv1.AddToScheme(scheme) - _ = expv1.AddToScheme(scheme) _ = bootstrapv1alpha3.AddToScheme(scheme) _ = bootstrapv1alpha4.AddToScheme(scheme) _ = bootstrapv1beta1.AddToScheme(scheme) diff --git a/bootstrap/kubeadm/types/upstreamv1beta1/conversion.go b/bootstrap/kubeadm/types/upstreamv1beta1/conversion.go index 4e39e6bf11e9..87c7a6a951c2 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta1/conversion.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/conversion.go @@ -20,7 +20,7 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func (src *ClusterConfiguration) ConvertTo(dstRaw conversion.Hub) error { diff --git a/bootstrap/kubeadm/types/upstreamv1beta1/conversion_test.go b/bootstrap/kubeadm/types/upstreamv1beta1/conversion_test.go index 6452409e6264..c53f0d6b512b 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta1/conversion_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/conversion_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/bootstrap/kubeadm/types/upstreamv1beta1/doc.go b/bootstrap/kubeadm/types/upstreamv1beta1/doc.go index d1a326a5ca8b..4c23838d4583 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta1/doc.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/doc.go @@ -19,6 +19,6 @@ limitations under the License. // 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/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2 // +k8s:deepcopy-gen=package package upstreamv1beta1 // import "sigs.k8s.io/cluster-api/bootstrap/kubeadm/kubeadm/v1beta1" diff --git a/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.conversion.go index 82d263c0ff32..7951fab75cd2 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.conversion.go +++ b/bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.conversion.go @@ -28,7 +28,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1beta2 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func init() { diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/conversion.go b/bootstrap/kubeadm/types/upstreamv1beta2/conversion.go index 8090d964dc4c..3ce4b8c30763 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta2/conversion.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/conversion.go @@ -20,7 +20,7 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func (src *ClusterConfiguration) ConvertTo(dstRaw conversion.Hub) error { diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/conversion_test.go b/bootstrap/kubeadm/types/upstreamv1beta2/conversion_test.go index 0b5c567c6bab..57541ee646ae 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta2/conversion_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/conversion_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/doc.go b/bootstrap/kubeadm/types/upstreamv1beta2/doc.go index 61af5aa65e84..050d1c742946 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta2/doc.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/doc.go @@ -19,6 +19,6 @@ limitations under the License. // 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/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2 // +k8s:deepcopy-gen=package package upstreamv1beta2 // import "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta2" diff --git a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go index d631f497b936..bb2971bc1b59 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go +++ b/bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go @@ -28,7 +28,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1beta2 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func init() { diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/conversion.go b/bootstrap/kubeadm/types/upstreamv1beta3/conversion.go index 48acae297b90..10b6cdf3f611 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta3/conversion.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/conversion.go @@ -20,7 +20,7 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func (src *ClusterConfiguration) ConvertTo(dstRaw conversion.Hub) error { diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go b/bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go index 830b654e7cf4..2af79ab34d4b 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/conversion_test.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/doc.go b/bootstrap/kubeadm/types/upstreamv1beta3/doc.go index ffa9270b3094..d075254fe15f 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta3/doc.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/doc.go @@ -19,6 +19,6 @@ limitations under the License. // 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/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2 // +k8s:deepcopy-gen=package package upstreamv1beta3 // import "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta3" diff --git a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go index 7525269ddcfe..67c07e2ce483 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go +++ b/bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go @@ -28,7 +28,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1beta2 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func init() { diff --git a/bootstrap/kubeadm/types/upstreamv1beta4/conversion.go b/bootstrap/kubeadm/types/upstreamv1beta4/conversion.go index 7fe7a05d6826..34e4667d368c 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta4/conversion.go +++ b/bootstrap/kubeadm/types/upstreamv1beta4/conversion.go @@ -23,7 +23,7 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func (src *ClusterConfiguration) ConvertTo(dstRaw conversion.Hub) error { diff --git a/bootstrap/kubeadm/types/upstreamv1beta4/conversion_no_fuzz_test.go b/bootstrap/kubeadm/types/upstreamv1beta4/conversion_no_fuzz_test.go index 4ff89b652ac7..a4d60935a645 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta4/conversion_no_fuzz_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta4/conversion_no_fuzz_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) // This test case has been moved out of conversion_test.go because it should be run with the race detector. diff --git a/bootstrap/kubeadm/types/upstreamv1beta4/conversion_test.go b/bootstrap/kubeadm/types/upstreamv1beta4/conversion_test.go index 0ca0a1fa0254..01eacbf26b34 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta4/conversion_test.go +++ b/bootstrap/kubeadm/types/upstreamv1beta4/conversion_test.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/bootstrap/kubeadm/types/upstreamv1beta4/doc.go b/bootstrap/kubeadm/types/upstreamv1beta4/doc.go index cb9c7512f9dc..94563e23f71f 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta4/doc.go +++ b/bootstrap/kubeadm/types/upstreamv1beta4/doc.go @@ -19,6 +19,6 @@ limitations under the License. // 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/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2 // +k8s:deepcopy-gen=package package upstreamv1beta4 // import "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta4" diff --git a/bootstrap/kubeadm/types/upstreamv1beta4/zz_generated.conversion.go b/bootstrap/kubeadm/types/upstreamv1beta4/zz_generated.conversion.go index 60e92567e21b..c47d38041a09 100644 --- a/bootstrap/kubeadm/types/upstreamv1beta4/zz_generated.conversion.go +++ b/bootstrap/kubeadm/types/upstreamv1beta4/zz_generated.conversion.go @@ -28,7 +28,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1beta2 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" ) func init() { diff --git a/bootstrap/kubeadm/types/utils.go b/bootstrap/kubeadm/types/utils.go index 9f62086e2164..96205ca3661f 100644 --- a/bootstrap/kubeadm/types/utils.go +++ b/bootstrap/kubeadm/types/utils.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/scheme" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta3" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta4" diff --git a/bootstrap/kubeadm/types/utils_test.go b/bootstrap/kubeadm/types/utils_test.go index c72bc56d07bb..3fb04357e851 100644 --- a/bootstrap/kubeadm/types/utils_test.go +++ b/bootstrap/kubeadm/types/utils_test.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta3" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta4" diff --git a/bootstrap/util/configowner.go b/bootstrap/util/configowner.go index 3574dc12a818..68b2d7271a8e 100644 --- a/bootstrap/util/configowner.go +++ b/bootstrap/util/configowner.go @@ -29,9 +29,8 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/feature" ) @@ -148,7 +147,7 @@ func getConfigOwner(ctx context.Context, c client.Client, obj metav1.Object, get if feature.Gates.Enabled(feature.MachinePool) { allowedGKs = append(allowedGKs, schema.GroupKind{ - Group: expv1.GroupVersion.Group, + Group: clusterv1.GroupVersion.Group, Kind: "MachinePool", }) } diff --git a/bootstrap/util/configowner_test.go b/bootstrap/util/configowner_test.go index fe9847c4ed16..8a479c554c95 100644 --- a/bootstrap/util/configowner_test.go +++ b/bootstrap/util/configowner_test.go @@ -30,9 +30,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" ) @@ -93,7 +92,7 @@ func TestGetConfigOwner(t *testing.T) { utilfeature.SetFeatureGateDuringTest(t, feature.Gates, feature.MachinePool, true) g := NewWithT(t) - myPool := &expv1.MachinePool{ + myPool := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "my-machine-pool", Namespace: metav1.NamespaceDefault, @@ -101,7 +100,7 @@ func TestGetConfigOwner(t *testing.T) { clusterv1.MachineControlPlaneLabel: "", }, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: "my-cluster", Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -109,8 +108,8 @@ func TestGetConfigOwner(t *testing.T) { }, }, }, - Status: expv1.MachinePoolStatus{ - Initialization: &expv1.MachinePoolInitializationStatus{ + Status: clusterv1.MachinePoolStatus{ + Initialization: &clusterv1.MachinePoolInitializationStatus{ InfrastructureProvisioned: true, }, }, @@ -122,7 +121,7 @@ func TestGetConfigOwner(t *testing.T) { OwnerReferences: []metav1.OwnerReference{ { Kind: "MachinePool", - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Name: "my-machine-pool", }, }, @@ -242,11 +241,11 @@ func TestHasNodeRefs(t *testing.T) { }) t.Run("should return false if nodes are missing from MachinePool", func(t *testing.T) { g := NewWithT(t) - machinePools := []expv1.MachinePool{ + machinePools := []clusterv1.MachinePool{ { // No replicas specified (default is 1). No nodeRefs either. TypeMeta: metav1.TypeMeta{ - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "MachinePool", }, ObjectMeta: metav1.ObjectMeta{ @@ -257,31 +256,31 @@ func TestHasNodeRefs(t *testing.T) { { // 1 replica but no nodeRefs TypeMeta: metav1.TypeMeta{ - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "MachinePool", }, ObjectMeta: metav1.ObjectMeta{ Namespace: metav1.NamespaceDefault, Name: "machine-pool-name", }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](1), }, }, { // 2 replicas but only 1 nodeRef TypeMeta: metav1.TypeMeta{ - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "MachinePool", }, ObjectMeta: metav1.ObjectMeta{ Namespace: metav1.NamespaceDefault, Name: "machine-pool-name", }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](2), }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ { Kind: "Node", @@ -308,18 +307,18 @@ func TestHasNodeRefs(t *testing.T) { }) t.Run("should return true if MachinePool has nodeRefs for all replicas", func(t *testing.T) { g := NewWithT(t) - machinePools := []expv1.MachinePool{ + machinePools := []clusterv1.MachinePool{ { // 1 replica (default) and 1 nodeRef TypeMeta: metav1.TypeMeta{ - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "MachinePool", }, ObjectMeta: metav1.ObjectMeta{ Namespace: metav1.NamespaceDefault, Name: "machine-pool-name", }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ { Kind: "Node", @@ -332,17 +331,17 @@ func TestHasNodeRefs(t *testing.T) { { // 2 replicas and nodeRefs TypeMeta: metav1.TypeMeta{ - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "MachinePool", }, ObjectMeta: metav1.ObjectMeta{ Namespace: metav1.NamespaceDefault, Name: "machine-pool-name", }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](2), }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ { Kind: "Node", @@ -360,14 +359,14 @@ func TestHasNodeRefs(t *testing.T) { { // 0 replicas and 0 nodeRef TypeMeta: metav1.TypeMeta{ - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "MachinePool", }, ObjectMeta: metav1.ObjectMeta{ Namespace: metav1.NamespaceDefault, Name: "machine-pool-name", }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](0), }, }, diff --git a/cmd/clusterctl/client/alpha/kubeadmcontrolplane.go b/cmd/clusterctl/client/alpha/kubeadmcontrolplane.go index aa0b70d4f308..2bc017be012b 100644 --- a/cmd/clusterctl/client/alpha/kubeadmcontrolplane.go +++ b/cmd/clusterctl/client/alpha/kubeadmcontrolplane.go @@ -25,8 +25,8 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" ) // getKubeadmControlPlane retrieves the KubeadmControlPlane object corresponding to the name and namespace specified. diff --git a/cmd/clusterctl/client/alpha/machinedeployment.go b/cmd/clusterctl/client/alpha/machinedeployment.go index 25c7ccbdaa7d..f5224a8d52de 100644 --- a/cmd/clusterctl/client/alpha/machinedeployment.go +++ b/cmd/clusterctl/client/alpha/machinedeployment.go @@ -31,7 +31,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" ) diff --git a/cmd/clusterctl/client/alpha/rollout_pauser.go b/cmd/clusterctl/client/alpha/rollout_pauser.go index cf8f1d575165..38a31765469d 100644 --- a/cmd/clusterctl/client/alpha/rollout_pauser.go +++ b/cmd/clusterctl/client/alpha/rollout_pauser.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" "sigs.k8s.io/cluster-api/util/annotations" ) diff --git a/cmd/clusterctl/client/alpha/rollout_pauser_test.go b/cmd/clusterctl/client/alpha/rollout_pauser_test.go index 763491396990..8aa7ce84f795 100644 --- a/cmd/clusterctl/client/alpha/rollout_pauser_test.go +++ b/cmd/clusterctl/client/alpha/rollout_pauser_test.go @@ -25,9 +25,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" "sigs.k8s.io/cluster-api/util/annotations" ) diff --git a/cmd/clusterctl/client/alpha/rollout_restarter_test.go b/cmd/clusterctl/client/alpha/rollout_restarter_test.go index 305d216587ca..dea33c953d31 100644 --- a/cmd/clusterctl/client/alpha/rollout_restarter_test.go +++ b/cmd/clusterctl/client/alpha/rollout_restarter_test.go @@ -26,9 +26,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" ) func Test_ObjectRestarter(t *testing.T) { diff --git a/cmd/clusterctl/client/alpha/rollout_resumer.go b/cmd/clusterctl/client/alpha/rollout_resumer.go index cc9e23fac313..25a3e2ea46e4 100644 --- a/cmd/clusterctl/client/alpha/rollout_resumer.go +++ b/cmd/clusterctl/client/alpha/rollout_resumer.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" "sigs.k8s.io/cluster-api/util/annotations" ) diff --git a/cmd/clusterctl/client/alpha/rollout_resumer_test.go b/cmd/clusterctl/client/alpha/rollout_resumer_test.go index bee817c98aba..7f937b997aeb 100644 --- a/cmd/clusterctl/client/alpha/rollout_resumer_test.go +++ b/cmd/clusterctl/client/alpha/rollout_resumer_test.go @@ -25,9 +25,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" "sigs.k8s.io/cluster-api/util/annotations" ) diff --git a/cmd/clusterctl/client/alpha/rollout_rollbacker.go b/cmd/clusterctl/client/alpha/rollout_rollbacker.go index b0210cf3722d..abd24dfdab8e 100644 --- a/cmd/clusterctl/client/alpha/rollout_rollbacker.go +++ b/cmd/clusterctl/client/alpha/rollout_rollbacker.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" "sigs.k8s.io/cluster-api/util/patch" diff --git a/cmd/clusterctl/client/alpha/rollout_rollbacker_test.go b/cmd/clusterctl/client/alpha/rollout_rollbacker_test.go index 218bd2b11c62..45ce89b6e8ff 100644 --- a/cmd/clusterctl/client/alpha/rollout_rollbacker_test.go +++ b/cmd/clusterctl/client/alpha/rollout_rollbacker_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" ) diff --git a/cmd/clusterctl/client/cluster/components.go b/cmd/clusterctl/client/cluster/components.go index 3b23f989d60f..3e6251064923 100644 --- a/cmd/clusterctl/client/cluster/components.go +++ b/cmd/clusterctl/client/cluster/components.go @@ -33,7 +33,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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 9cd94d246847..5acd68253448 100644 --- a/cmd/clusterctl/client/cluster/components_test.go +++ b/cmd/clusterctl/client/cluster/components_test.go @@ -31,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/scheme" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" diff --git a/cmd/clusterctl/client/cluster/internal/dryrun/client.go b/cmd/clusterctl/client/cluster/internal/dryrun/client.go index 4a15b6d6d0a6..d382c3d6449c 100644 --- a/cmd/clusterctl/client/cluster/internal/dryrun/client.go +++ b/cmd/clusterctl/client/cluster/internal/dryrun/client.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/apiutil" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/scheme" ) diff --git a/cmd/clusterctl/client/cluster/inventory.go b/cmd/clusterctl/client/cluster/inventory.go index a7e20443dab6..42110a5d4263 100644 --- a/cmd/clusterctl/client/cluster/inventory.go +++ b/cmd/clusterctl/client/cluster/inventory.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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 73279fd02e81..21765a31f7ca 100644 --- a/cmd/clusterctl/client/cluster/mover.go +++ b/cmd/clusterctl/client/cluster/mover.go @@ -37,7 +37,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/cmd/clusterctl/client/cluster/mover_test.go b/cmd/clusterctl/client/cluster/mover_test.go index 52038bc36605..cf762abe5512 100644 --- a/cmd/clusterctl/client/cluster/mover_test.go +++ b/cmd/clusterctl/client/cluster/mover_test.go @@ -38,7 +38,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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" diff --git a/cmd/clusterctl/client/cluster/objectgraph.go b/cmd/clusterctl/client/cluster/objectgraph.go index 57c9e6fbd607..9569aaefa1d0 100644 --- a/cmd/clusterctl/client/cluster/objectgraph.go +++ b/cmd/clusterctl/client/cluster/objectgraph.go @@ -36,7 +36,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" "sigs.k8s.io/cluster-api/controllers/external" diff --git a/cmd/clusterctl/client/cluster/objectgraph_test.go b/cmd/clusterctl/client/cluster/objectgraph_test.go index 429c9e3bbca3..11418edaaf3b 100644 --- a/cmd/clusterctl/client/cluster/objectgraph_test.go +++ b/cmd/clusterctl/client/cluster/objectgraph_test.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" "sigs.k8s.io/cluster-api/util/test/builder" diff --git a/cmd/clusterctl/client/cluster/ownergraph.go b/cmd/clusterctl/client/cluster/ownergraph.go index f6036560f2d2..af186e43e14d 100644 --- a/cmd/clusterctl/client/cluster/ownergraph.go +++ b/cmd/clusterctl/client/cluster/ownergraph.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" ) diff --git a/cmd/clusterctl/client/cluster/proxy.go b/cmd/clusterctl/client/cluster/proxy.go index cd0d84f30177..d16d72aacc81 100644 --- a/cmd/clusterctl/client/cluster/proxy.go +++ b/cmd/clusterctl/client/cluster/proxy.go @@ -37,7 +37,7 @@ import ( "k8s.io/client-go/tools/clientcmd" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/scheme" "sigs.k8s.io/cluster-api/version" diff --git a/cmd/clusterctl/client/cluster/topology.go b/cmd/clusterctl/client/cluster/topology.go index 34d5a0c439da..070b5340a4b7 100644 --- a/cmd/clusterctl/client/cluster/topology.go +++ b/cmd/clusterctl/client/cluster/topology.go @@ -37,7 +37,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" crwebhook "sigs.k8s.io/controller-runtime/pkg/webhook" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/internal/dryrun" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/scheme" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" diff --git a/cmd/clusterctl/client/cluster/upgrader.go b/cmd/clusterctl/client/cluster/upgrader.go index 0eea2dd863df..386d11b6e92b 100644 --- a/cmd/clusterctl/client/cluster/upgrader.go +++ b/cmd/clusterctl/client/cluster/upgrader.go @@ -32,7 +32,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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 c0f83c99b304..d13138ae3111 100644 --- a/cmd/clusterctl/client/cluster/upgrader_info_test.go +++ b/cmd/clusterctl/client/cluster/upgrader_info_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/version" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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 fbac59c36fb8..ff07e711d344 100644 --- a/cmd/clusterctl/client/cluster/workload_cluster_test.go +++ b/cmd/clusterctl/client/cluster/workload_cluster_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" "sigs.k8s.io/cluster-api/util/secret" ) diff --git a/cmd/clusterctl/client/clusterclass.go b/cmd/clusterctl/client/clusterclass.go index b7933d024114..0da4c4ea88f1 100644 --- a/cmd/clusterctl/client/clusterclass.go +++ b/cmd/clusterctl/client/clusterclass.go @@ -27,8 +27,8 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/repository" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/scheme" diff --git a/cmd/clusterctl/client/clusterclass_test.go b/cmd/clusterctl/client/clusterclass_test.go index 3572d898df1f..8cc8b176b6ca 100644 --- a/cmd/clusterctl/client/clusterclass_test.go +++ b/cmd/clusterctl/client/clusterclass_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/repository" yaml "sigs.k8s.io/cluster-api/cmd/clusterctl/client/yamlprocessor" diff --git a/cmd/clusterctl/client/init_test.go b/cmd/clusterctl/client/init_test.go index b893cf493c71..e91954446330 100644 --- a/cmd/clusterctl/client/init_test.go +++ b/cmd/clusterctl/client/init_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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/client/repository/components.go b/cmd/clusterctl/client/repository/components.go index 8bd2f7f90e2e..510ec70535fd 100644 --- a/cmd/clusterctl/client/repository/components.go +++ b/cmd/clusterctl/client/repository/components.go @@ -30,7 +30,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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 12bc9a940886..1c70f1444038 100644 --- a/cmd/clusterctl/client/repository/components_client_test.go +++ b/cmd/clusterctl/client/repository/components_client_test.go @@ -24,7 +24,7 @@ import ( . "github.com/onsi/gomega" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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 ffa99d2fc140..0035cbac1619 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/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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 bf772a9b04b2..16b828ef34ed 100644 --- a/cmd/clusterctl/client/repository/repository_github.go +++ b/cmd/clusterctl/client/repository/repository_github.go @@ -35,7 +35,7 @@ import ( "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/util/wait" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log" "sigs.k8s.io/cluster-api/internal/goproxy" diff --git a/cmd/clusterctl/client/repository/repository_local.go b/cmd/clusterctl/client/repository/repository_local.go index ad00ebd7a6fa..b77c9c705c64 100644 --- a/cmd/clusterctl/client/repository/repository_local.go +++ b/cmd/clusterctl/client/repository/repository_local.go @@ -27,7 +27,7 @@ import ( "github.com/pkg/errors" "k8s.io/apimachinery/pkg/util/version" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" ) diff --git a/cmd/clusterctl/client/repository/repository_memory.go b/cmd/clusterctl/client/repository/repository_memory.go index 864a2c0d6e27..a772fd130068 100644 --- a/cmd/clusterctl/client/repository/repository_memory.go +++ b/cmd/clusterctl/client/repository/repository_memory.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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 cbed78e29bdb..232c83d9de23 100644 --- a/cmd/clusterctl/client/rollout_test.go +++ b/cmd/clusterctl/client/rollout_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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/client/tree/discovery.go b/cmd/clusterctl/client/tree/discovery.go index f3cf5875c7bd..f25f239fc161 100644 --- a/cmd/clusterctl/client/tree/discovery.go +++ b/cmd/clusterctl/client/tree/discovery.go @@ -26,9 +26,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/util" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) @@ -289,7 +288,7 @@ func addMachineDeploymentToObjectTree(ctx context.Context, c client.Client, clus return nil } -func addMachinePoolsToObjectTree(ctx context.Context, c client.Client, workers *NodeObject, machinePoolList *expv1.MachinePoolList, machinesList *clusterv1.MachineList, tree *ObjectTree, addMachineFunc func(parent client.Object, m *clusterv1.Machine)) { +func addMachinePoolsToObjectTree(ctx context.Context, c client.Client, workers *NodeObject, machinePoolList *clusterv1.MachinePoolList, machinesList *clusterv1.MachineList, tree *ObjectTree, addMachineFunc func(parent client.Object, m *clusterv1.Machine)) { for i := range machinePoolList.Items { mp := &machinePoolList.Items[i] _, visible := tree.Add(workers, mp, GroupingObject(true)) @@ -374,12 +373,12 @@ func getMachineSetsInCluster(ctx context.Context, c client.Client, namespace, na return machineSetList, nil } -func getMachinePoolsInCluster(ctx context.Context, c client.Client, namespace, name string) (*expv1.MachinePoolList, error) { +func getMachinePoolsInCluster(ctx context.Context, c client.Client, namespace, name string) (*clusterv1.MachinePoolList, error) { if name == "" { return nil, nil } - machinePoolList := &expv1.MachinePoolList{} + machinePoolList := &clusterv1.MachinePoolList{} labels := map[string]string{clusterv1.ClusterNameLabel: name} if err := c.List(ctx, machinePoolList, client.InNamespace(namespace), client.MatchingLabels(labels)); err != nil { diff --git a/cmd/clusterctl/client/tree/discovery_test.go b/cmd/clusterctl/client/tree/discovery_test.go index 5a34bb9d1e72..25600870bfe6 100644 --- a/cmd/clusterctl/client/tree/discovery_test.go +++ b/cmd/clusterctl/client/tree/discovery_test.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test" ) diff --git a/cmd/clusterctl/client/tree/node_object.go b/cmd/clusterctl/client/tree/node_object.go index f27ef94b4ae9..e375e43dccdf 100644 --- a/cmd/clusterctl/client/tree/node_object.go +++ b/cmd/clusterctl/client/tree/node_object.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // NodeObject represent a node in the tree which doesn't correspond to Cluster, MachineDeployment, Machine etc. diff --git a/cmd/clusterctl/client/tree/tree.go b/cmd/clusterctl/client/tree/tree.go index 7053cac8bd33..641db306891c 100644 --- a/cmd/clusterctl/client/tree/tree.go +++ b/cmd/clusterctl/client/tree/tree.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" ) diff --git a/cmd/clusterctl/client/tree/tree_test.go b/cmd/clusterctl/client/tree/tree_test.go index 6275018c2379..900ea1f213d7 100644 --- a/cmd/clusterctl/client/tree/tree_test.go +++ b/cmd/clusterctl/client/tree/tree_test.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conditions" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" ) diff --git a/cmd/clusterctl/client/tree/util.go b/cmd/clusterctl/client/tree/util.go index 25b35436c553..e34314529fb1 100644 --- a/cmd/clusterctl/client/tree/util.go +++ b/cmd/clusterctl/client/tree/util.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conditions" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" ) diff --git a/cmd/clusterctl/client/upgrade.go b/cmd/clusterctl/client/upgrade.go index 892a0f4c3f3c..73fe84e1e592 100644 --- a/cmd/clusterctl/client/upgrade.go +++ b/cmd/clusterctl/client/upgrade.go @@ -24,8 +24,8 @@ import ( "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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 6b09f265199a..d5df8f6e1862 100644 --- a/cmd/clusterctl/client/upgrade_test.go +++ b/cmd/clusterctl/client/upgrade_test.go @@ -25,7 +25,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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 629575e892ad..f25f93341dcc 100644 --- a/cmd/clusterctl/cmd/describe_cluster.go +++ b/cmd/clusterctl/cmd/describe_cluster.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client" "sigs.k8s.io/cluster-api/cmd/clusterctl/cmd/internal/templates" cmdtree "sigs.k8s.io/cluster-api/internal/util/tree" diff --git a/cmd/clusterctl/cmd/get_kubeconfig.go b/cmd/clusterctl/cmd/get_kubeconfig.go index 1786ac49d205..9e6c03642d75 100644 --- a/cmd/clusterctl/cmd/get_kubeconfig.go +++ b/cmd/clusterctl/cmd/get_kubeconfig.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client" "sigs.k8s.io/cluster-api/cmd/clusterctl/cmd/internal/templates" ) diff --git a/cmd/clusterctl/cmd/upgrade_plan.go b/cmd/clusterctl/cmd/upgrade_plan.go index bb0fe4b1fd6f..2cf39757f43a 100644 --- a/cmd/clusterctl/cmd/upgrade_plan.go +++ b/cmd/clusterctl/cmd/upgrade_plan.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/cobra" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client" "sigs.k8s.io/cluster-api/cmd/clusterctl/cmd/internal/templates" ) diff --git a/cmd/clusterctl/internal/scheme/scheme.go b/cmd/clusterctl/internal/scheme/scheme.go index b211db3d1a07..6d998970029a 100644 --- a/cmd/clusterctl/internal/scheme/scheme.go +++ b/cmd/clusterctl/internal/scheme/scheme.go @@ -26,11 +26,10 @@ import ( clientgoscheme "k8s.io/client-go/kubernetes/scheme" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" ) var ( @@ -48,6 +47,5 @@ func init() { _ = admissionregistration.AddToScheme(Scheme) _ = admissionregistrationv1beta1.AddToScheme(Scheme) _ = controlplanev1.AddToScheme(Scheme) - _ = expv1.AddToScheme(Scheme) _ = addonsv1.AddToScheme(Scheme) } diff --git a/cmd/clusterctl/internal/test/fake_objects.go b/cmd/clusterctl/internal/test/fake_objects.go index 4d1d615b98f3..f16cf746a545 100644 --- a/cmd/clusterctl/internal/test/fake_objects.go +++ b/cmd/clusterctl/internal/test/fake_objects.go @@ -32,13 +32,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/util" contractutil "sigs.k8s.io/cluster-api/util/contract" @@ -495,10 +494,10 @@ func (f *FakeMachinePool) Objs(cluster *clusterv1.Cluster) []client.Object { bootstrapConfig = NewBootstrapConfigTemplate(machinePoolBootstrap) } - machinePool := &expv1.MachinePool{ + machinePool := &clusterv1.MachinePool{ TypeMeta: metav1.TypeMeta{ Kind: "MachinePool", - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ Name: f.name, @@ -515,7 +514,7 @@ func (f *FakeMachinePool) Objs(cluster *clusterv1.Cluster) []client.Object { clusterv1.ClusterNameLabel: cluster.Name, // Added by the machinePool controller (mirrors machinePoolt.spec.ClusterName) -- RECONCILED }, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{ @@ -904,7 +903,7 @@ func (f *FakeMachine) WithStaticBootstrapConfig() *FakeMachine { return f } -func (f *FakeMachine) Objs(cluster *clusterv1.Cluster, generateCerts bool, machineSet *clusterv1.MachineSet, machinePool *expv1.MachinePool, controlPlane *fakecontrolplane.GenericControlPlane) []client.Object { +func (f *FakeMachine) Objs(cluster *clusterv1.Cluster, generateCerts bool, machineSet *clusterv1.MachineSet, machinePool *clusterv1.MachinePool, controlPlane *fakecontrolplane.GenericControlPlane) []client.Object { machineInfrastructure := &fakeinfrastructure.GenericInfrastructureMachine{ TypeMeta: metav1.TypeMeta{ APIVersion: fakeinfrastructure.GroupVersion.String(), @@ -1473,7 +1472,7 @@ func FakeCRDList() []*apiextensionsv1.CustomResourceDefinition { FakeNamespacedCustomResourceDefinition(clusterv1.GroupVersion.Group, "Machine", version), FakeNamespacedCustomResourceDefinition(clusterv1.GroupVersion.Group, "MachineDeployment", version), FakeNamespacedCustomResourceDefinition(clusterv1.GroupVersion.Group, "MachineSet", version), - FakeNamespacedCustomResourceDefinition(expv1.GroupVersion.Group, "MachinePool", version), + FakeNamespacedCustomResourceDefinition(clusterv1.GroupVersion.Group, "MachinePool", version), FakeNamespacedCustomResourceDefinition(addonsv1.GroupVersion.Group, "ClusterResourceSet", version), FakeNamespacedCustomResourceDefinition(addonsv1.GroupVersion.Group, "ClusterResourceSetBinding", version), FakeNamespacedCustomResourceDefinition(fakecontrolplane.GroupVersion.Group, "GenericControlPlane", version), diff --git a/cmd/clusterctl/internal/test/fake_proxy.go b/cmd/clusterctl/internal/test/fake_proxy.go index 41f9fc112c09..cfd308f38e72 100644 --- a/cmd/clusterctl/internal/test/fake_proxy.go +++ b/cmd/clusterctl/internal/test/fake_proxy.go @@ -31,14 +31,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" ) type FakeProxy struct { @@ -57,7 +56,6 @@ func init() { _ = clusterctlv1.AddToScheme(FakeScheme) _ = clusterv1.AddToScheme(FakeScheme) _ = addonsv1.AddToScheme(FakeScheme) - _ = expv1.AddToScheme(FakeScheme) _ = apiextensionsv1.AddToScheme(FakeScheme) _ = controlplanev1.AddToScheme(FakeScheme) diff --git a/cmd/clusterctl/internal/test/providers/bootstrap/groupversion_info.go b/cmd/clusterctl/internal/test/providers/bootstrap/groupversion_info.go index 46ba2906d081..8a6e7c68c6e4 100644 --- a/cmd/clusterctl/internal/test/providers/bootstrap/groupversion_info.go +++ b/cmd/clusterctl/internal/test/providers/bootstrap/groupversion_info.go @@ -22,7 +22,7 @@ package bootstrap import ( "sigs.k8s.io/controller-runtime/pkg/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/cmd/clusterctl/internal/test/providers/controlplane/groupversion_info.go b/cmd/clusterctl/internal/test/providers/controlplane/groupversion_info.go index f431071f9464..27913d53830e 100644 --- a/cmd/clusterctl/internal/test/providers/controlplane/groupversion_info.go +++ b/cmd/clusterctl/internal/test/providers/controlplane/groupversion_info.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/cmd/clusterctl/internal/test/providers/external/groupversion_info.go b/cmd/clusterctl/internal/test/providers/external/groupversion_info.go index 5071f648963f..3b59ff32a139 100644 --- a/cmd/clusterctl/internal/test/providers/external/groupversion_info.go +++ b/cmd/clusterctl/internal/test/providers/external/groupversion_info.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/controller-runtime/pkg/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/cmd/clusterctl/internal/test/providers/infrastructure/groupversion_info.go b/cmd/clusterctl/internal/test/providers/infrastructure/groupversion_info.go index 0ec5dec7d1b2..dbbc1a4962e4 100644 --- a/cmd/clusterctl/internal/test/providers/infrastructure/groupversion_info.go +++ b/cmd/clusterctl/internal/test/providers/infrastructure/groupversion_info.go @@ -22,7 +22,7 @@ package infrastructure import ( "sigs.k8s.io/controller-runtime/pkg/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml index 29d106244d7c..dcf58e288eb8 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml @@ -2824,8 +2824,9 @@ spec: name: v1beta2 schema: openAPIV3Schema: - description: ClusterClass is a template which can be used to create managed - topologies. + description: |- + ClusterClass is a template which can be used to create managed topologies. + NOTE: This CRD can only be used if the ClusterTopology feature gate is enabled. properties: apiVersion: description: |- diff --git a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml index c92869554dc8..55c4080f11fb 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml @@ -1639,7 +1639,9 @@ spec: name: v1beta2 schema: openAPIV3Schema: - description: MachinePool is the Schema for the machinepools API. + description: |- + MachinePool is the Schema for the machinepools API. + NOTE: This CRD can only be used if the MachinePool feature gate is enabled. properties: apiVersion: description: |- diff --git a/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml b/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml index fff3f9dc6958..b5214960f66b 100644 --- a/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml +++ b/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml @@ -368,7 +368,9 @@ spec: name: v1beta2 schema: openAPIV3Schema: - description: ExtensionConfig is the Schema for the ExtensionConfig API. + description: |- + ExtensionConfig is the Schema for the ExtensionConfig API. + NOTE: This CRD can only be used if the RuntimeSDK feature gate is enabled. properties: apiVersion: description: |- diff --git a/controllers/alias.go b/controllers/alias.go index 9398569598e7..63895489b137 100644 --- a/controllers/alias.go +++ b/controllers/alias.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" clustercontroller "sigs.k8s.io/cluster-api/internal/controllers/cluster" diff --git a/controllers/clustercache/cluster_accessor_test.go b/controllers/clustercache/cluster_accessor_test.go index 54bda7cfa752..dd9eaf64fcdb 100644 --- a/controllers/clustercache/cluster_accessor_test.go +++ b/controllers/clustercache/cluster_accessor_test.go @@ -38,7 +38,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/source" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/util/kubeconfig" ) diff --git a/controllers/clustercache/cluster_cache.go b/controllers/clustercache/cluster_cache.go index 9315a00f70d1..50869683aec2 100644 --- a/controllers/clustercache/cluster_cache.go +++ b/controllers/clustercache/cluster_cache.go @@ -42,7 +42,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/predicates" ) diff --git a/controllers/clustercache/cluster_cache_test.go b/controllers/clustercache/cluster_cache_test.go index 4e9e6fe1941f..7294fdf0bbe5 100644 --- a/controllers/clustercache/cluster_cache_test.go +++ b/controllers/clustercache/cluster_cache_test.go @@ -43,7 +43,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/metrics" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/util/kubeconfig" ) diff --git a/controllers/clustercache/index.go b/controllers/clustercache/index.go index c104d4ef6a57..b60f0a93f87d 100644 --- a/controllers/clustercache/index.go +++ b/controllers/clustercache/index.go @@ -19,7 +19,7 @@ package clustercache import ( corev1 "k8s.io/api/core/v1" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" ) // NodeProviderIDIndex is used to index Nodes by ProviderID. diff --git a/controllers/clustercache/suite_test.go b/controllers/clustercache/suite_test.go index c154ef8f7324..4ba2639c666e 100644 --- a/controllers/clustercache/suite_test.go +++ b/controllers/clustercache/suite_test.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/test/envtest" ) diff --git a/controllers/crdmigrator/crd_migrator.go b/controllers/crdmigrator/crd_migrator.go index 0998e7d3cd04..df6886d13a95 100644 --- a/controllers/crdmigrator/crd_migrator.go +++ b/controllers/crdmigrator/crd_migrator.go @@ -44,7 +44,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/apiutil" "sigs.k8s.io/controller-runtime/pkg/controller" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/cache" "sigs.k8s.io/cluster-api/util/contract" "sigs.k8s.io/cluster-api/util/predicates" diff --git a/controllers/crdmigrator/crd_migrator_test.go b/controllers/crdmigrator/crd_migrator_test.go index a95a9308e2b6..08cfbc188a4c 100644 --- a/controllers/crdmigrator/crd_migrator_test.go +++ b/controllers/crdmigrator/crd_migrator_test.go @@ -50,7 +50,7 @@ import ( metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" t1v1beta1 "sigs.k8s.io/cluster-api/controllers/crdmigrator/test/t1/v1beta1" t2v1beta2 "sigs.k8s.io/cluster-api/controllers/crdmigrator/test/t2/v1beta2" t3v1beta2 "sigs.k8s.io/cluster-api/controllers/crdmigrator/test/t3/v1beta2" diff --git a/controllers/crdmigrator/suite_test.go b/controllers/crdmigrator/suite_test.go index fd153174201f..692573603aee 100644 --- a/controllers/crdmigrator/suite_test.go +++ b/controllers/crdmigrator/suite_test.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/test/envtest" ) diff --git a/controllers/external/tracker_test.go b/controllers/external/tracker_test.go index f6b5000f0a26..e24d69296731 100644 --- a/controllers/external/tracker_test.go +++ b/controllers/external/tracker_test.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/source" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/controllers/external/util.go b/controllers/external/util.go index dff6aa0e5c38..cdb1ba7b9c1f 100644 --- a/controllers/external/util.go +++ b/controllers/external/util.go @@ -28,7 +28,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // Get uses the client and reference to get an external, unstructured object. diff --git a/controllers/external/util_test.go b/controllers/external/util_test.go index 5f56e88ddb10..6246467dbed3 100644 --- a/controllers/external/util_test.go +++ b/controllers/external/util_test.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/controllers/remote/cluster_cache_healthcheck_test.go b/controllers/remote/cluster_cache_healthcheck_test.go index bbc74e550bc5..bdc5ae1b69ee 100644 --- a/controllers/remote/cluster_cache_healthcheck_test.go +++ b/controllers/remote/cluster_cache_healthcheck_test.go @@ -37,7 +37,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/controllers/remote/cluster_cache_reconciler.go b/controllers/remote/cluster_cache_reconciler.go index 8875b8066232..125f5bdbe01f 100644 --- a/controllers/remote/cluster_cache_reconciler.go +++ b/controllers/remote/cluster_cache_reconciler.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/predicates" ) diff --git a/controllers/remote/cluster_cache_reconciler_test.go b/controllers/remote/cluster_cache_reconciler_test.go index 0703369c7f93..95655821373b 100644 --- a/controllers/remote/cluster_cache_reconciler_test.go +++ b/controllers/remote/cluster_cache_reconciler_test.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" ) diff --git a/controllers/remote/cluster_cache_tracker.go b/controllers/remote/cluster_cache_tracker.go index 704890e49d99..414f3fb5cedc 100644 --- a/controllers/remote/cluster_cache_tracker.go +++ b/controllers/remote/cluster_cache_tracker.go @@ -48,7 +48,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/source" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/certs" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/controllers/remote/cluster_cache_tracker_test.go b/controllers/remote/cluster_cache_tracker_test.go index 1d2ba833c54c..7a38a0184f98 100644 --- a/controllers/remote/cluster_cache_tracker_test.go +++ b/controllers/remote/cluster_cache_tracker_test.go @@ -35,7 +35,7 @@ import ( metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/controllers/remote/index.go b/controllers/remote/index.go index d94af1a1ac24..a3fa58ca3e84 100644 --- a/controllers/remote/index.go +++ b/controllers/remote/index.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" ) // Index is a helper to model the info passed to cache.IndexField. diff --git a/controllers/remote/suite_test.go b/controllers/remote/suite_test.go index 74a3ee6a9b38..3c80638fe668 100644 --- a/controllers/remote/suite_test.go +++ b/controllers/remote/suite_test.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/test/envtest" ) 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 e013508033f1..0a1a1a4bc218 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 @@ -3341,8 +3341,9 @@ spec: name: v1beta2 schema: openAPIV3Schema: - description: KubeadmControlPlaneTemplate is the Schema for the kubeadmcontrolplanetemplates - API. + description: |- + KubeadmControlPlaneTemplate is the Schema for the kubeadmcontrolplanetemplates API. + NOTE: This CRD can only be used if the ClusterTopology feature gate is enabled. properties: apiVersion: description: |- diff --git a/controlplane/kubeadm/internal/cluster.go b/controlplane/kubeadm/internal/cluster.go index 854f5ff8de86..8d4116c4da33 100644 --- a/controlplane/kubeadm/internal/cluster.go +++ b/controlplane/kubeadm/internal/cluster.go @@ -29,9 +29,8 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/secret" ) @@ -46,7 +45,7 @@ type ManagementCluster interface { client.Reader GetMachinesForCluster(ctx context.Context, cluster *clusterv1.Cluster, filters ...collections.Func) (collections.Machines, error) - GetMachinePoolsForCluster(ctx context.Context, cluster *clusterv1.Cluster) (*expv1.MachinePoolList, error) + GetMachinePoolsForCluster(ctx context.Context, cluster *clusterv1.Cluster) (*clusterv1.MachinePoolList, error) GetWorkloadCluster(ctx context.Context, clusterKey client.ObjectKey) (WorkloadCluster, error) } @@ -88,14 +87,14 @@ func (m *Management) GetMachinesForCluster(ctx context.Context, cluster *cluster } // GetMachinePoolsForCluster returns a list of machine pools owned by the cluster. -func (m *Management) GetMachinePoolsForCluster(ctx context.Context, cluster *clusterv1.Cluster) (*expv1.MachinePoolList, error) { +func (m *Management) GetMachinePoolsForCluster(ctx context.Context, cluster *clusterv1.Cluster) (*clusterv1.MachinePoolList, error) { selectors := []client.ListOption{ client.InNamespace(cluster.GetNamespace()), client.MatchingLabels{ clusterv1.ClusterNameLabel: cluster.GetName(), }, } - machinePoolList := &expv1.MachinePoolList{} + machinePoolList := &clusterv1.MachinePoolList{} err := m.Client.List(ctx, machinePoolList, selectors...) return machinePoolList, err } diff --git a/controlplane/kubeadm/internal/cluster_labels.go b/controlplane/kubeadm/internal/cluster_labels.go index 0ac043f11e46..f0ff9663b9fd 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/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/labels/format" ) diff --git a/controlplane/kubeadm/internal/cluster_test.go b/controlplane/kubeadm/internal/cluster_test.go index a929ab824b31..2d6028f31f5a 100644 --- a/controlplane/kubeadm/internal/cluster_test.go +++ b/controlplane/kubeadm/internal/cluster_test.go @@ -39,7 +39,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/util/certs" diff --git a/controlplane/kubeadm/internal/control_plane.go b/controlplane/kubeadm/internal/control_plane.go index 723048a5f0ef..20d7e04e6dd3 100644 --- a/controlplane/kubeadm/internal/control_plane.go +++ b/controlplane/kubeadm/internal/control_plane.go @@ -29,10 +29,10 @@ import ( kerrors "k8s.io/apimachinery/pkg/util/errors" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/controlplane/kubeadm/internal/control_plane_test.go b/controlplane/kubeadm/internal/control_plane_test.go index 30a39d455655..cad282cd4943 100644 --- a/controlplane/kubeadm/internal/control_plane_test.go +++ b/controlplane/kubeadm/internal/control_plane_test.go @@ -26,8 +26,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" "sigs.k8s.io/cluster-api/util/collections" ) diff --git a/controlplane/kubeadm/internal/controllers/controller.go b/controlplane/kubeadm/internal/controllers/controller.go index 71682a7d3b93..c562e94c0598 100644 --- a/controlplane/kubeadm/internal/controllers/controller.go +++ b/controlplane/kubeadm/internal/controllers/controller.go @@ -40,12 +40,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/internal/util/ssa" @@ -621,7 +620,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileDelete(ctx context.Context, con return ctrl.Result{}, err } - allMachinePools := &expv1.MachinePoolList{} + allMachinePools := &clusterv1.MachinePoolList{} // Get all machine pools. if feature.Gates.Enabled(feature.MachinePool) { allMachinePools, err = r.managementCluster.GetMachinePoolsForCluster(ctx, controlPlane.Cluster) @@ -708,7 +707,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileDelete(ctx context.Context, con } // objectsPendingDeleteNames return the names of worker Machines and MachinePools pending delete. -func objectsPendingDeleteNames(allMachines collections.Machines, allMachinePools *expv1.MachinePoolList, cluster *clusterv1.Cluster) []string { +func objectsPendingDeleteNames(allMachines collections.Machines, allMachinePools *clusterv1.MachinePoolList, cluster *clusterv1.Cluster) []string { controlPlaneMachines := allMachines.Filter(collections.ControlPlaneMachines(cluster.Name)) workerMachines := allMachines.Difference(controlPlaneMachines) diff --git a/controlplane/kubeadm/internal/controllers/controller_test.go b/controlplane/kubeadm/internal/controllers/controller_test.go index c34405431ee4..b980713da61a 100644 --- a/controlplane/kubeadm/internal/controllers/controller_test.go +++ b/controlplane/kubeadm/internal/controllers/controller_test.go @@ -47,14 +47,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" controlplanev1webhooks "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/webhooks" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/internal/util/ssa" @@ -3596,7 +3595,7 @@ func TestKubeadmControlPlaneReconciler_reconcileDelete(t *testing.T) { initObjs := []client.Object{cluster.DeepCopy(), kcp.DeepCopy()} for i := range 10 { - initObjs = append(initObjs, &expv1.MachinePool{ + initObjs = append(initObjs, &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("mp-%d", i), Namespace: cluster.Namespace, @@ -3709,8 +3708,8 @@ func TestObjectsPendingDelete(t *testing.T) { *machine("w8", withLabels(workerMachineLabels)), }, }) - machinePools := &expv1.MachinePoolList{ - Items: []expv1.MachinePool{ + machinePools := &clusterv1.MachinePoolList{ + Items: []clusterv1.MachinePool{ { ObjectMeta: metav1.ObjectMeta{ Name: "mp1", diff --git a/controlplane/kubeadm/internal/controllers/fakes_test.go b/controlplane/kubeadm/internal/controllers/fakes_test.go index b1947df5dc19..a2ee3f8a2006 100644 --- a/controlplane/kubeadm/internal/controllers/fakes_test.go +++ b/controlplane/kubeadm/internal/controllers/fakes_test.go @@ -24,11 +24,10 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/util/collections" ) @@ -36,7 +35,7 @@ type fakeManagementCluster struct { // TODO: once all client interactions are moved to the Management cluster this can go away Management *internal.Management Machines collections.Machines - MachinePools *expv1.MachinePoolList + MachinePools *clusterv1.MachinePoolList Workload *fakeWorkloadCluster WorkloadErr error Reader client.Reader @@ -61,7 +60,7 @@ func (f *fakeManagementCluster) GetMachinesForCluster(c context.Context, cluster return f.Machines, nil } -func (f *fakeManagementCluster) GetMachinePoolsForCluster(c context.Context, cluster *clusterv1.Cluster) (*expv1.MachinePoolList, error) { +func (f *fakeManagementCluster) GetMachinePoolsForCluster(c context.Context, cluster *clusterv1.Cluster) (*clusterv1.MachinePoolList, error) { if f.Management != nil { return f.Management.GetMachinePoolsForCluster(c, cluster) } diff --git a/controlplane/kubeadm/internal/controllers/helpers.go b/controlplane/kubeadm/internal/controllers/helpers.go index 6937cd1952ae..f10e4720dcd3 100644 --- a/controlplane/kubeadm/internal/controllers/helpers.go +++ b/controlplane/kubeadm/internal/controllers/helpers.go @@ -32,10 +32,10 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" topologynames "sigs.k8s.io/cluster-api/internal/topology/names" "sigs.k8s.io/cluster-api/internal/util/ssa" diff --git a/controlplane/kubeadm/internal/controllers/helpers_test.go b/controlplane/kubeadm/internal/controllers/helpers_test.go index 83182b49b808..02faa9c86ff2 100644 --- a/controlplane/kubeadm/internal/controllers/helpers_test.go +++ b/controlplane/kubeadm/internal/controllers/helpers_test.go @@ -32,10 +32,10 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" "sigs.k8s.io/cluster-api/util/kubeconfig" diff --git a/controlplane/kubeadm/internal/controllers/remediation.go b/controlplane/kubeadm/internal/controllers/remediation.go index a23322a066f0..fab44da4a871 100644 --- a/controlplane/kubeadm/internal/controllers/remediation.go +++ b/controlplane/kubeadm/internal/controllers/remediation.go @@ -31,8 +31,8 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util/annotations" diff --git a/controlplane/kubeadm/internal/controllers/remediation_test.go b/controlplane/kubeadm/internal/controllers/remediation_test.go index 27fd1678fac5..b70ad9692001 100644 --- a/controlplane/kubeadm/internal/controllers/remediation_test.go +++ b/controlplane/kubeadm/internal/controllers/remediation_test.go @@ -33,8 +33,8 @@ import ( utilptr "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util/collections" diff --git a/controlplane/kubeadm/internal/controllers/scale.go b/controlplane/kubeadm/internal/controllers/scale.go index 9ae3d0a7bfed..bc8a7f026a8b 100644 --- a/controlplane/kubeadm/internal/controllers/scale.go +++ b/controlplane/kubeadm/internal/controllers/scale.go @@ -29,8 +29,8 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util/collections" diff --git a/controlplane/kubeadm/internal/controllers/scale_test.go b/controlplane/kubeadm/internal/controllers/scale_test.go index c48aa0c895a0..9d44893810e7 100644 --- a/controlplane/kubeadm/internal/controllers/scale_test.go +++ b/controlplane/kubeadm/internal/controllers/scale_test.go @@ -31,9 +31,9 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util" diff --git a/controlplane/kubeadm/internal/controllers/status.go b/controlplane/kubeadm/internal/controllers/status.go index b397c3fa1463..6147a8a43633 100644 --- a/controlplane/kubeadm/internal/controllers/status.go +++ b/controlplane/kubeadm/internal/controllers/status.go @@ -30,8 +30,8 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" "sigs.k8s.io/cluster-api/util/collections" diff --git a/controlplane/kubeadm/internal/controllers/status_test.go b/controlplane/kubeadm/internal/controllers/status_test.go index a8d8a9843c9e..10d16a16dd16 100644 --- a/controlplane/kubeadm/internal/controllers/status_test.go +++ b/controlplane/kubeadm/internal/controllers/status_test.go @@ -29,9 +29,9 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" controlplanev1webhooks "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/webhooks" diff --git a/controlplane/kubeadm/internal/controllers/suite_test.go b/controlplane/kubeadm/internal/controllers/suite_test.go index 532f7adc45c8..53599e93f4bb 100644 --- a/controlplane/kubeadm/internal/controllers/suite_test.go +++ b/controlplane/kubeadm/internal/controllers/suite_test.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/test/envtest" ) diff --git a/controlplane/kubeadm/internal/controllers/upgrade.go b/controlplane/kubeadm/internal/controllers/upgrade.go index 1575f675bbcc..fa9a4e7a03bd 100644 --- a/controlplane/kubeadm/internal/controllers/upgrade.go +++ b/controlplane/kubeadm/internal/controllers/upgrade.go @@ -24,8 +24,8 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/version" diff --git a/controlplane/kubeadm/internal/controllers/upgrade_test.go b/controlplane/kubeadm/internal/controllers/upgrade_test.go index 446eb00f3a52..6d3f348bc22e 100644 --- a/controlplane/kubeadm/internal/controllers/upgrade_test.go +++ b/controlplane/kubeadm/internal/controllers/upgrade_test.go @@ -31,8 +31,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal" "sigs.k8s.io/cluster-api/internal/util/ssa" "sigs.k8s.io/cluster-api/util" diff --git a/controlplane/kubeadm/internal/filters.go b/controlplane/kubeadm/internal/filters.go index 840a1f299ab6..de38919d9bed 100644 --- a/controlplane/kubeadm/internal/filters.go +++ b/controlplane/kubeadm/internal/filters.go @@ -25,9 +25,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/util/compare" "sigs.k8s.io/cluster-api/util/collections" ) diff --git a/controlplane/kubeadm/internal/filters_test.go b/controlplane/kubeadm/internal/filters_test.go index 7174bb1f93b5..54b9d3939c99 100644 --- a/controlplane/kubeadm/internal/filters_test.go +++ b/controlplane/kubeadm/internal/filters_test.go @@ -27,9 +27,9 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestMatchClusterConfiguration(t *testing.T) { diff --git a/controlplane/kubeadm/internal/suite_test.go b/controlplane/kubeadm/internal/suite_test.go index 1152f94d20af..8a794448a009 100644 --- a/controlplane/kubeadm/internal/suite_test.go +++ b/controlplane/kubeadm/internal/suite_test.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/test/envtest" ) diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go index a809a1d51a33..8a8b7cb10c0a 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go @@ -35,9 +35,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" topologynames "sigs.k8s.io/cluster-api/internal/topology/names" "sigs.k8s.io/cluster-api/internal/util/kubeadm" "sigs.k8s.io/cluster-api/util/container" diff --git a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go index a65421eed6fe..463bfd6eb801 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadm_control_plane_test.go @@ -29,8 +29,8 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/webhooks/util" ) diff --git a/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplanetemplate.go b/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplanetemplate.go index 67e46e73bf3b..aa52aeffb25f 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplanetemplate.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplanetemplate.go @@ -27,8 +27,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/util/compare" ) diff --git a/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplanetemplate_test.go b/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplanetemplate_test.go index 68067b93dff7..ecabd6a313bb 100644 --- a/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplanetemplate_test.go +++ b/controlplane/kubeadm/internal/webhooks/kubeadmcontrolplanetemplate_test.go @@ -25,9 +25,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilfeature "k8s.io/component-base/featuregate/testing" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/webhooks/util" ) diff --git a/controlplane/kubeadm/internal/webhooks/scale.go b/controlplane/kubeadm/internal/webhooks/scale.go index 209935b571a2..fe72e2698826 100644 --- a/controlplane/kubeadm/internal/webhooks/scale.go +++ b/controlplane/kubeadm/internal/webhooks/scale.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" ) func (v *ScaleValidator) SetupWebhookWithManager(mgr ctrl.Manager) error { diff --git a/controlplane/kubeadm/internal/webhooks/scale_test.go b/controlplane/kubeadm/internal/webhooks/scale_test.go index a5ced384162e..9e292c8cd9b6 100644 --- a/controlplane/kubeadm/internal/webhooks/scale_test.go +++ b/controlplane/kubeadm/internal/webhooks/scale_test.go @@ -32,8 +32,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" ) func init() { diff --git a/controlplane/kubeadm/internal/workload_cluster.go b/controlplane/kubeadm/internal/workload_cluster.go index 564ccfb2d78e..7d6f2314bde1 100644 --- a/controlplane/kubeadm/internal/workload_cluster.go +++ b/controlplane/kubeadm/internal/workload_cluster.go @@ -42,10 +42,10 @@ import ( ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" kubeadmtypes "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/proxy" "sigs.k8s.io/cluster-api/internal/util/kubeadm" diff --git a/controlplane/kubeadm/internal/workload_cluster_conditions.go b/controlplane/kubeadm/internal/workload_cluster_conditions.go index 85cd1d419a08..e8c07cdb5d7a 100644 --- a/controlplane/kubeadm/internal/workload_cluster_conditions.go +++ b/controlplane/kubeadm/internal/workload_cluster_conditions.go @@ -33,8 +33,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "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 7cf0d18f3d94..02b9a05cbdd5 100644 --- a/controlplane/kubeadm/internal/workload_cluster_conditions_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_conditions_test.go @@ -34,9 +34,9 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "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 95b1d133b3cd..65e5ebb8acfb 100644 --- a/controlplane/kubeadm/internal/workload_cluster_coredns.go +++ b/controlplane/kubeadm/internal/workload_cluster_coredns.go @@ -33,8 +33,8 @@ import ( "k8s.io/client-go/util/retry" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/internal/util/kubeadm" containerutil "sigs.k8s.io/cluster-api/util/container" "sigs.k8s.io/cluster-api/util/patch" diff --git a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go index 4002ee8194e4..b8fbd44a25c9 100644 --- a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go @@ -30,8 +30,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" utilyaml "sigs.k8s.io/cluster-api/util/yaml" ) diff --git a/controlplane/kubeadm/internal/workload_cluster_etcd.go b/controlplane/kubeadm/internal/workload_cluster_etcd.go index aac4be180bc2..2ca835b942b0 100644 --- a/controlplane/kubeadm/internal/workload_cluster_etcd.go +++ b/controlplane/kubeadm/internal/workload_cluster_etcd.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" kerrors "k8s.io/apimachinery/pkg/util/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "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 65cc6adc43c6..6401f9721959 100644 --- a/controlplane/kubeadm/internal/workload_cluster_etcd_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_etcd_test.go @@ -31,8 +31,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" fake2 "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd/fake" utilyaml "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 0f84a82db8d1..2bca4a1ae736 100644 --- a/controlplane/kubeadm/internal/workload_cluster_test.go +++ b/controlplane/kubeadm/internal/workload_cluster_test.go @@ -32,8 +32,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/yaml" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/util/version" utilyaml "sigs.k8s.io/cluster-api/util/yaml" ) diff --git a/controlplane/kubeadm/main.go b/controlplane/kubeadm/main.go index 28ca169424ef..9ada353b5006 100644 --- a/controlplane/kubeadm/main.go +++ b/controlplane/kubeadm/main.go @@ -49,17 +49,16 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/webhook" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1beta1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta1" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/crdmigrator" "sigs.k8s.io/cluster-api/controllers/remote" - controlplanev1beta1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" kubeadmcontrolplanecontrollers "sigs.k8s.io/cluster-api/controlplane/kubeadm/controllers" "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd" kcpwebhooks "sigs.k8s.io/cluster-api/controlplane/kubeadm/webhooks" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/feature" controlplanev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/controlplane/kubeadm/v1alpha3" controlplanev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/controlplane/kubeadm/v1alpha4" @@ -106,7 +105,6 @@ var ( func init() { _ = clientgoscheme.AddToScheme(scheme) _ = clusterv1.AddToScheme(scheme) - _ = expv1.AddToScheme(scheme) _ = controlplanev1alpha3.AddToScheme(scheme) _ = controlplanev1alpha4.AddToScheme(scheme) _ = controlplanev1beta1.AddToScheme(scheme) diff --git a/docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md b/docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md index 0d8252869a8b..8492f2ecd1f8 100644 --- a/docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md +++ b/docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md @@ -54,8 +54,25 @@ proposal because most of the changes described below are a consequence of the wo ## API Changes +- APIs have been moved to the top-level `api` folder (https://github.com/kubernetes-sigs/cluster-api/pull/12262). + If you keep using `v1alpha` / `v1beta1` APIs, imports have to be adjusted accordingly: + - `sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1` => `sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1` + - `sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1` => `sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta1` + - `sigs.k8s.io/cluster-api/api/v1beta1` => `sigs.k8s.io/cluster-api/api/core/v1beta1` + - `sigs.k8s.io/cluster-api/exp/api/v1beta1` => `sigs.k8s.io/cluster-api/api/core/v1beta1` + - `sigs.k8s.io/cluster-api/exp/ipam/api/v1alpha1` => `sigs.k8s.io/cluster-api/api/ipam/v1alpha1` + - `sigs.k8s.io/cluster-api/exp/ipam/api/v1beta1` => `sigs.k8s.io/cluster-api/api/ipam/v1beta1` + - `sigs.k8s.io/cluster-api/exp/runtime/api/v1alpha1` => `sigs.k8s.io/cluster-api/api/runtime/v1alpha1` + - `sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1` => `sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1` - v1beta1 API version is now deprecated and it will be removed tentatively in August 2026 -- v1beta2 API version has been introduced; see following paragraphs for more details +- v1beta2 API version has been introduced; see following paragraphs for more details. The APIs have + been added in the following packages: + - `sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2` + - `sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2` + - `sigs.k8s.io/cluster-api/api/addons/v1beta2` + - `sigs.k8s.io/cluster-api/api/core/v1beta2` + - `sigs.k8s.io/cluster-api/api/ipam/v1beta2` + - `sigs.k8s.io/cluster-api/api/runtime/v1beta2` - If you are using the `runtime.cluster.x-k8s.io` API group, please be aware that - `ExtensionConfig` v1alpha1 has been deprecated, and it will be removed in a following release. - `ExtensionConfig` v1beta2 has been created (thus aligning with other Cluster API resources) @@ -302,7 +319,7 @@ As documented in [Suggested changes for providers](#suggested-changes-for-provid ```go import ( ... - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) ``` @@ -311,7 +328,7 @@ As documented in [Suggested changes for providers](#suggested-changes-for-provid ```go import ( ... - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) ``` diff --git a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md index 1265600970c6..f07abb9664b2 100644 --- a/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md +++ b/docs/book/src/tasks/experimental-features/runtime-sdk/implement-extensions.md @@ -50,8 +50,8 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/exp/runtime/server" ) @@ -195,7 +195,7 @@ Developers are fully responsible for all other elements of the design of a Runti When using Golang the Runtime Extension developer can benefit from the following packages (provided by the `sigs.k8s.io/cluster-api` module) as shown in the example above: -- `exp/runtime/hooks/api/v1alpha1` contains the Runtime Hook Golang API types, which are also used to generate the +- `api/runtime/hooks/v1alpha1` contains the Runtime Hook Golang API types, which are also used to generate the OpenAPI specification. - `exp/runtime/catalog` provides the `Catalog` object to register Runtime Hook definitions. The `Catalog` is then used by the `server` package to handle requests. `Catalog` is similar to the `runtime.Scheme` of the diff --git a/docs/proposals/20220221-runtime-SDK.md b/docs/proposals/20220221-runtime-SDK.md index b65de8049c2e..1e719bf99968 100644 --- a/docs/proposals/20220221-runtime-SDK.md +++ b/docs/proposals/20220221-runtime-SDK.md @@ -381,11 +381,11 @@ The process of implementing the new Runtime Hooks is intentionally designed in o used to define API types, thus providing a familiar experience to the maintainers/the people used to look at the Cluster API codebase. Most specifically: -- Runtime Hooks versions must be defined under the `/exp/runtime/hooks/api` folder. +- Runtime Hooks versions must be defined under the `/api/runtime/hooks` folder. - There must be one folder per apiVersion, e.g. `/v1alpha1`, `/v1alpha2` etc. ``` -/exp/runtime/hooks/api +/api/runtime/hooks ├── v1alpha1 └── v1alpha2 ``` @@ -396,7 +396,7 @@ Each version folder must - Provide type definitions for the Runtime Hook and its request and response parameters. ``` -/exp/runtime/hooks/api/v1alpha1 +/api/runtime/hooks/v1alpha1 ├── groupversion_info.go └── lifecyclehooks_types.go ``` diff --git a/exp/api/v1beta1/condition_consts.go b/exp/api/v1beta1/condition_consts.go deleted file mode 100644 index b8fa7fd54ca9..000000000000 --- a/exp/api/v1beta1/condition_consts.go +++ /dev/null @@ -1,32 +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 v1beta1 - -import ( - clusterv1beta1 "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 clusterv1beta1.ConditionType = "ReplicasReady" - - // WaitingForReplicasReadyReason (Severity=Info) documents a machinepool waiting for the required replicas - // to be ready. - WaitingForReplicasReadyReason = "WaitingForReplicasReady" -) diff --git a/exp/api/v1beta1/conversion.go b/exp/api/v1beta1/conversion.go deleted file mode 100644 index 6e7c150bfcc9..000000000000 --- a/exp/api/v1beta1/conversion.go +++ /dev/null @@ -1,166 +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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apimachineryconversion "k8s.io/apimachinery/pkg/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" - - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" -) - -func (src *MachinePool) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*expv1.MachinePool) - - if err := Convert_v1beta1_MachinePool_To_v1beta2_MachinePool(src, dst, nil); err != nil { - return err - } - - dst.Spec.Template.Spec.MinReadySeconds = src.Spec.MinReadySeconds - - return nil -} - -func (dst *MachinePool) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*expv1.MachinePool) - - if err := Convert_v1beta2_MachinePool_To_v1beta1_MachinePool(src, dst, nil); err != nil { - return err - } - - dst.Spec.MinReadySeconds = src.Spec.Template.Spec.MinReadySeconds - - return nil -} - -func Convert_v1beta2_MachinePoolStatus_To_v1beta1_MachinePoolStatus(in *expv1.MachinePoolStatus, out *MachinePoolStatus, s apimachineryconversion.Scope) error { - if err := autoConvert_v1beta2_MachinePoolStatus_To_v1beta1_MachinePoolStatus(in, out, s); err != nil { - return err - } - - // Reset conditions from autogenerated conversions - // NOTE: v1beta2 conditions should not be automatically be converted into legacy conditions (v1beta1). - out.Conditions = nil - - // Reset replica counters from autogenerated conversions - // NOTE: replica counters with a new semantic should not be automatically be converted into old replica counters. - out.ReadyReplicas = 0 - out.AvailableReplicas = 0 - - // Retrieve legacy conditions (v1beta1), failureReason, failureMessage and replica counters from the deprecated field. - if in.Deprecated != nil && in.Deprecated.V1Beta1 != nil { - if in.Deprecated.V1Beta1.Conditions != nil { - clusterv1beta1.Convert_v1beta2_Deprecated_V1Beta1_Conditions_To_v1beta1_Conditions(&in.Deprecated.V1Beta1.Conditions, &out.Conditions) - } - out.FailureReason = in.Deprecated.V1Beta1.FailureReason - out.FailureMessage = in.Deprecated.V1Beta1.FailureMessage - out.ReadyReplicas = in.Deprecated.V1Beta1.ReadyReplicas - out.AvailableReplicas = in.Deprecated.V1Beta1.AvailableReplicas - out.UnavailableReplicas = in.Deprecated.V1Beta1.UnavailableReplicas - } - - // Move initialization to old fields - if in.Initialization != nil { - out.BootstrapReady = in.Initialization.BootstrapDataSecretCreated - out.InfrastructureReady = in.Initialization.InfrastructureProvisioned - } - - // Move new conditions (v1beta2) and replica counters to the v1beta2 field. - if in.Conditions == nil && in.ReadyReplicas == nil && in.AvailableReplicas == nil && in.UpToDateReplicas == nil { - return nil - } - out.V1Beta2 = &MachinePoolV1Beta2Status{} - out.V1Beta2.Conditions = in.Conditions - out.V1Beta2.ReadyReplicas = in.ReadyReplicas - out.V1Beta2.AvailableReplicas = in.AvailableReplicas - out.V1Beta2.UpToDateReplicas = in.UpToDateReplicas - return nil -} - -func Convert_v1beta1_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *expv1.MachinePoolStatus, s apimachineryconversion.Scope) error { - if err := autoConvert_v1beta1_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in, out, s); err != nil { - return err - } - - // Reset conditions from autogenerated conversions - // NOTE: v1beta1 conditions should not be automatically be converted into v1beta2 conditions. - out.Conditions = nil - - // Reset replica counters from autogenerated conversions - // NOTE: old replica counters should not be automatically be converted into replica counters with a new semantic. - out.ReadyReplicas = nil - out.AvailableReplicas = nil - - // Retrieve new conditions (v1beta2) and replica counters from the v1beta2 field. - if in.V1Beta2 != nil { - out.Conditions = in.V1Beta2.Conditions - out.ReadyReplicas = in.V1Beta2.ReadyReplicas - out.AvailableReplicas = in.V1Beta2.AvailableReplicas - out.UpToDateReplicas = in.V1Beta2.UpToDateReplicas - } - - // Move BootstrapReady and InfrastructureReady to Initialization - if in.BootstrapReady || in.InfrastructureReady { - if out.Initialization == nil { - out.Initialization = &expv1.MachinePoolInitializationStatus{} - } - out.Initialization.BootstrapDataSecretCreated = in.BootstrapReady - out.Initialization.InfrastructureProvisioned = in.InfrastructureReady - } - - // Move legacy conditions (v1beta1), failureReason, failureMessage and replica counters to the deprecated field. - if out.Deprecated == nil { - out.Deprecated = &expv1.MachinePoolDeprecatedStatus{} - } - if out.Deprecated.V1Beta1 == nil { - out.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} - } - if in.Conditions != nil { - clusterv1beta1.Convert_v1beta1_Conditions_To_v1beta2_Deprecated_V1Beta1_Conditions(&in.Conditions, &out.Deprecated.V1Beta1.Conditions) - } - out.Deprecated.V1Beta1.FailureReason = in.FailureReason - out.Deprecated.V1Beta1.FailureMessage = in.FailureMessage - out.Deprecated.V1Beta1.ReadyReplicas = in.ReadyReplicas - out.Deprecated.V1Beta1.AvailableReplicas = in.AvailableReplicas - out.Deprecated.V1Beta1.UnavailableReplicas = in.UnavailableReplicas - return nil -} - -// Implement local conversion func because conversion-gen is not aware of conversion func in other packages (see https://github.com/kubernetes/code-generator/issues/94) - -func Convert_v1beta1_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(in *clusterv1beta1.MachineTemplateSpec, out *clusterv1.MachineTemplateSpec, s apimachineryconversion.Scope) error { - return clusterv1beta1.Convert_v1beta1_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(in, out, s) -} - -func Convert_v1beta2_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(in *clusterv1.MachineTemplateSpec, out *clusterv1beta1.MachineTemplateSpec, s apimachineryconversion.Scope) error { - return clusterv1beta1.Convert_v1beta2_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(in, out, s) -} - -func Convert_v1_Condition_To_v1beta1_Condition(in *metav1.Condition, out *clusterv1beta1.Condition, s apimachineryconversion.Scope) error { - return clusterv1beta1.Convert_v1_Condition_To_v1beta1_Condition(in, out, s) -} - -func Convert_v1beta1_Condition_To_v1_Condition(in *clusterv1beta1.Condition, out *metav1.Condition, s apimachineryconversion.Scope) error { - return clusterv1beta1.Convert_v1beta1_Condition_To_v1_Condition(in, out, s) -} - -func Convert_v1beta1_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *expv1.MachinePoolSpec, s apimachineryconversion.Scope) error { - return autoConvert_v1beta1_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in, out, s) -} diff --git a/exp/api/v1beta1/conversion_test.go b/exp/api/v1beta1/conversion_test.go deleted file mode 100644 index d06e1fb00f29..000000000000 --- a/exp/api/v1beta1/conversion_test.go +++ /dev/null @@ -1,83 +0,0 @@ -//go:build !race - -/* -Copyright 2025 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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" - - fuzz "github.com/google/gofuzz" - "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" - runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/utils/ptr" - - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" -) - -// Test is disabled when the race detector is enabled (via "//go:build !race" above) because otherwise the fuzz tests would just time out. - -func TestFuzzyConversion(t *testing.T) { - t.Run("for MachinePool", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &expv1.MachinePool{}, - Spoke: &MachinePool{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{MachinePoolFuzzFuncs}, - })) -} - -func MachinePoolFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - hubMachinePoolStatus, - spokeMachinePoolStatus, - } -} - -func hubMachinePoolStatus(in *expv1.MachinePoolStatus, c fuzz.Continue) { - c.FuzzNoCustom(in) - // Always create struct with at least one mandatory fields. - if in.Deprecated == nil { - in.Deprecated = &expv1.MachinePoolDeprecatedStatus{} - } - if in.Deprecated.V1Beta1 == nil { - in.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} - } - - // Drop empty structs with only omit empty fields. - if in.Initialization != nil { - if reflect.DeepEqual(in.Initialization, &expv1.MachinePoolInitializationStatus{}) { - in.Initialization = nil - } - } - - // nil becomes &0 after hub => spoke => hub conversion - // This is acceptable as usually Replicas is set and controllers using older apiVersions are not writing MachineSet status. - if in.Replicas == nil { - in.Replicas = ptr.To(int32(0)) - } -} - -func spokeMachinePoolStatus(in *MachinePoolStatus, c fuzz.Continue) { - c.FuzzNoCustom(in) - // Drop empty structs with only omit empty fields. - if in.V1Beta2 != nil { - if reflect.DeepEqual(in.V1Beta2, &MachinePoolV1Beta2Status{}) { - in.V1Beta2 = nil - } - } -} diff --git a/exp/api/v1beta1/doc.go b/exp/api/v1beta1/doc.go deleted file mode 100644 index 56e8cf01235d..000000000000 --- a/exp/api/v1beta1/doc.go +++ /dev/null @@ -1,23 +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 v1beta1 contains API Schema definitions for the exp v1beta1 API group -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/exp/api/v1beta2 -// +kubebuilder:object:generate=true -// +groupName=cluster.x-k8s.io -// -// Deprecated: This package is deprecated and is going to be removed when support for v1beta1 will be dropped. -package v1beta1 diff --git a/exp/api/v1beta1/groupversion_info.go b/exp/api/v1beta1/groupversion_info.go deleted file mode 100644 index 4c30c7217452..000000000000 --- a/exp/api/v1beta1/groupversion_info.go +++ /dev/null @@ -1,45 +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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -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 = runtime.NewSchemeBuilder(addKnownTypes) - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = schemeBuilder.AddToScheme - - // localSchemeBuilder is used for type conversions. - localSchemeBuilder = schemeBuilder - - objectTypes = []runtime.Object{} -) - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, objectTypes...) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/exp/api/v1beta1/v1beta2_condition_consts.go b/exp/api/v1beta1/v1beta2_condition_consts.go deleted file mode 100644 index 77e66d4bf264..000000000000 --- a/exp/api/v1beta1/v1beta2_condition_consts.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2024 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 - -/* -NOTE: we are commenting const for MachinePool's V1Beta2 conditions and reasons because not yet implemented for the 1.9 CAPI release. -However, we are keeping the v1beta2 struct in the MachinePool struct because the code that will collect conditions and replica -counters at cluster level is already implemented. - -// Conditions that will be used for the MachinePool object in v1Beta2 API version. -const ( - // MachinePoolAvailableV1Beta2Condition is true when InfrastructureReady and available replicas >= desired replicas. - MachinePoolAvailableV1Beta2Condition = clusterv1beta1.AvailableV1Beta2Condition - - // MachinePoolBootstrapConfigReadyV1Beta2Condition mirrors the corresponding condition from the MachinePool's BootstrapConfig resource. - MachinePoolBootstrapConfigReadyV1Beta2Condition = clusterv1beta1.BootstrapConfigReadyV1Beta2Condition - - // MachinePoolInfrastructureReadyV1Beta2Condition mirrors the corresponding condition from the MachinePool's Infrastructure resource. - MachinePoolInfrastructureReadyV1Beta2Condition = clusterv1beta1.InfrastructureReadyV1Beta2Condition - - // MachinePoolMachinesReadyV1Beta2Condition surfaces detail of issues on the controlled machines, if any. - MachinePoolMachinesReadyV1Beta2Condition = clusterv1beta1.MachinesReadyV1Beta2Condition - - // MachinePoolMachinesUpToDateV1Beta2Condition surfaces details of controlled machines not up to date, if any. - MachinePoolMachinesUpToDateV1Beta2Condition = clusterv1beta1.MachinesUpToDateV1Beta2Condition - - // MachinePoolScalingUpV1Beta2Condition is true if available replicas < desired replicas. - MachinePoolScalingUpV1Beta2Condition = clusterv1beta1.ScalingUpV1Beta2Condition - - // MachinePoolScalingDownV1Beta2Condition is true if replicas > desired replicas. - MachinePoolScalingDownV1Beta2Condition = clusterv1beta1.ScalingDownV1Beta2Condition - - // MachinePoolRemediatingV1Beta2Condition surfaces details about ongoing remediation of the controlled machines, if any. - MachinePoolRemediatingV1Beta2Condition = clusterv1beta1.RemediatingV1Beta2Condition - - // MachinePoolDeletingV1Beta2Condition surfaces details about ongoing deletion of the controlled machines. - MachinePoolDeletingV1Beta2Condition = clusterv1beta1.DeletingV1Beta2Condition -). -*/ diff --git a/exp/api/v1beta1/zz_generated.conversion.go b/exp/api/v1beta1/zz_generated.conversion.go deleted file mode 100644 index 61a82b4db79c..000000000000 --- a/exp/api/v1beta1/zz_generated.conversion.go +++ /dev/null @@ -1,269 +0,0 @@ -//go:build !ignore_autogenerated -// +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 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" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - apiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" - v1beta2 "sigs.k8s.io/cluster-api/exp/api/v1beta2" -) - -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((*MachinePool)(nil), (*v1beta2.MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MachinePool_To_v1beta2_MachinePool(a.(*MachinePool), b.(*v1beta2.MachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePool)(nil), (*MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePool_To_v1beta1_MachinePool(a.(*v1beta2.MachinePool), b.(*MachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*MachinePoolList)(nil), (*v1beta2.MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MachinePoolList_To_v1beta2_MachinePoolList(a.(*MachinePoolList), b.(*v1beta2.MachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolList)(nil), (*MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePoolList_To_v1beta1_MachinePoolList(a.(*v1beta2.MachinePoolList), b.(*MachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolSpec)(nil), (*MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec(a.(*v1beta2.MachinePoolSpec), b.(*MachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1.Condition)(nil), (*apiv1beta1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_Condition_To_v1beta1_Condition(a.(*v1.Condition), b.(*apiv1beta1.Condition), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1beta1.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Condition_To_v1_Condition(a.(*apiv1beta1.Condition), b.(*v1.Condition), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*MachinePoolSpec)(nil), (*v1beta2.MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MachinePoolSpec_To_v1beta2_MachinePoolSpec(a.(*MachinePoolSpec), b.(*v1beta2.MachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*MachinePoolStatus)(nil), (*v1beta2.MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MachinePoolStatus_To_v1beta2_MachinePoolStatus(a.(*MachinePoolStatus), b.(*v1beta2.MachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1beta1.MachineTemplateSpec)(nil), (*apiv1beta2.MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(a.(*apiv1beta1.MachineTemplateSpec), b.(*apiv1beta2.MachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta2.MachinePoolStatus)(nil), (*MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePoolStatus_To_v1beta1_MachinePoolStatus(a.(*v1beta2.MachinePoolStatus), b.(*MachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1beta2.MachineTemplateSpec)(nil), (*apiv1beta1.MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(a.(*apiv1beta2.MachineTemplateSpec), b.(*apiv1beta1.MachineTemplateSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *v1beta2.MachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_MachinePoolSpec_To_v1beta2_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_MachinePoolStatus_To_v1beta2_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_MachinePool_To_v1beta2_MachinePool is an autogenerated conversion function. -func Convert_v1beta1_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *v1beta2.MachinePool, s conversion.Scope) error { - return autoConvert_v1beta1_MachinePool_To_v1beta2_MachinePool(in, out, s) -} - -func autoConvert_v1beta2_MachinePool_To_v1beta1_MachinePool(in *v1beta2.MachinePool, out *MachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta2_MachinePoolStatus_To_v1beta1_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta2_MachinePool_To_v1beta1_MachinePool is an autogenerated conversion function. -func Convert_v1beta2_MachinePool_To_v1beta1_MachinePool(in *v1beta2.MachinePool, out *MachinePool, s conversion.Scope) error { - return autoConvert_v1beta2_MachinePool_To_v1beta1_MachinePool(in, out, s) -} - -func autoConvert_v1beta1_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta2.MachinePool, len(*in)) - for i := range *in { - if err := Convert_v1beta1_MachinePool_To_v1beta2_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_MachinePoolList_To_v1beta2_MachinePoolList is an autogenerated conversion function. -func Convert_v1beta1_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { - return autoConvert_v1beta1_MachinePoolList_To_v1beta2_MachinePoolList(in, out, s) -} - -func autoConvert_v1beta2_MachinePoolList_To_v1beta1_MachinePoolList(in *v1beta2.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_v1beta2_MachinePool_To_v1beta1_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta2_MachinePoolList_To_v1beta1_MachinePoolList is an autogenerated conversion function. -func Convert_v1beta2_MachinePoolList_To_v1beta1_MachinePoolList(in *v1beta2.MachinePoolList, out *MachinePoolList, s conversion.Scope) error { - return autoConvert_v1beta2_MachinePoolList_To_v1beta1_MachinePoolList(in, out, s) -} - -func autoConvert_v1beta1_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *v1beta2.MachinePoolSpec, s conversion.Scope) error { - out.ClusterName = in.ClusterName - out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - if err := Convert_v1beta1_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - // WARNING: in.MinReadySeconds requires manual conversion: does not exist in peer-type - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) - return nil -} - -func autoConvert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { - out.ClusterName = in.ClusterName - out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - if err := Convert_v1beta2_MachineTemplateSpec_To_v1beta1_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) - return nil -} - -// Convert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec is an autogenerated conversion function. -func Convert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1beta2_MachinePoolSpec_To_v1beta1_MachinePoolSpec(in, out, s) -} - -func autoConvert_v1beta1_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *v1beta2.MachinePoolStatus, s conversion.Scope) error { - out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) - if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { - return err - } - if err := v1.Convert_int32_To_Pointer_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { - return err - } - if err := v1.Convert_int32_To_Pointer_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { - return err - } - // WARNING: in.UnavailableReplicas requires manual conversion: does not exist in peer-type - // WARNING: in.FailureReason requires manual conversion: does not exist in peer-type - // WARNING: in.FailureMessage requires manual conversion: does not exist in peer-type - out.Phase = in.Phase - // WARNING: in.BootstrapReady requires manual conversion: does not exist in peer-type - // WARNING: in.InfrastructureReady requires manual conversion: does not exist in peer-type - out.ObservedGeneration = in.ObservedGeneration - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - if err := Convert_v1beta1_Condition_To_v1_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - // WARNING: in.V1Beta2 requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta2_MachinePoolStatus_To_v1beta1_MachinePoolStatus(in *v1beta2.MachinePoolStatus, out *MachinePoolStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) - for i := range *in { - if err := Convert_v1_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - // WARNING: in.Initialization requires manual conversion: does not exist in peer-type - out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) - if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int32_To_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int32_To_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { - return err - } - // WARNING: in.UpToDateReplicas requires manual conversion: does not exist in peer-type - out.Phase = in.Phase - out.ObservedGeneration = in.ObservedGeneration - // WARNING: in.Deprecated requires manual conversion: does not exist in peer-type - return nil -} diff --git a/exp/api/v1beta1/zz_generated.deepcopy.go b/exp/api/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index 06bd6b0e9a9b..000000000000 --- a/exp/api/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,203 +0,0 @@ -//go: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" - 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]) - } - } - if in.V1Beta2 != nil { - in, out := &in.V1Beta2, &out.V1Beta2 - *out = new(MachinePoolV1Beta2Status) - (*in).DeepCopyInto(*out) - } -} - -// 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 -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachinePoolV1Beta2Status) DeepCopyInto(out *MachinePoolV1Beta2Status) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ReadyReplicas != nil { - in, out := &in.ReadyReplicas, &out.ReadyReplicas - *out = new(int32) - **out = **in - } - if in.AvailableReplicas != nil { - in, out := &in.AvailableReplicas, &out.AvailableReplicas - *out = new(int32) - **out = **in - } - if in.UpToDateReplicas != nil { - in, out := &in.UpToDateReplicas, &out.UpToDateReplicas - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolV1Beta2Status. -func (in *MachinePoolV1Beta2Status) DeepCopy() *MachinePoolV1Beta2Status { - if in == nil { - return nil - } - out := new(MachinePoolV1Beta2Status) - in.DeepCopyInto(out) - return out -} diff --git a/exp/api/v1beta2/condition_consts.go b/exp/api/v1beta2/condition_consts.go deleted file mode 100644 index 1e2fe4ada93a..000000000000 --- a/exp/api/v1beta2/condition_consts.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2025 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 - -/* -NOTE: we are commenting const for MachinePool's V1Beta2 conditions and reasons because not yet implemented for the 1.9 CAPI release. -However, we are keeping the v1beta2 struct in the MachinePool struct because the code that will collect conditions and replica -counters at cluster level is already implemented. - -// Conditions that will be used for the MachinePool object in v1Beta2 API version. -const ( - // MachinePoolAvailableCondition is true when InfrastructureReady and available replicas >= desired replicas. - MachinePoolAvailableCondition = clusterv1.AvailableCondition - - // MachinePoolBootstrapConfigReadyCondition mirrors the corresponding condition from the MachinePool's BootstrapConfig resource. - MachinePoolBootstrapConfigReadyCondition = clusterv1.BootstrapConfigReadyCondition - - // MachinePoolInfrastructureReadyCondition mirrors the corresponding condition from the MachinePool's Infrastructure resource. - MachinePoolInfrastructureReadyCondition = clusterv1.InfrastructureReadyCondition - - // MachinePoolMachinesReadyCondition surfaces detail of issues on the controlled machines, if any. - MachinePoolMachinesReadyCondition = clusterv1.MachinesReadyCondition - - // MachinePoolMachinesUpToDateCondition surfaces details of controlled machines not up to date, if any. - MachinePoolMachinesUpToDateCondition = clusterv1.MachinesUpToDateCondition - - // MachinePoolScalingUpCondition is true if available replicas < desired replicas. - MachinePoolScalingUpCondition = clusterv1.ScalingUpCondition - - // MachinePoolScalingDownCondition is true if replicas > desired replicas. - MachinePoolScalingDownCondition = clusterv1.ScalingDownCondition - - // MachinePoolRemediatingCondition surfaces details about ongoing remediation of the controlled machines, if any. - MachinePoolRemediatingCondition = clusterv1.RemediatingCondition - - // MachinePoolDeletingCondition surfaces details about ongoing deletion of the controlled machines. - MachinePoolDeletingCondition = clusterv1.DeletingCondition -). -*/ diff --git a/exp/api/v1beta2/conversion.go b/exp/api/v1beta2/conversion.go deleted file mode 100644 index bc27d0e4e5bd..000000000000 --- a/exp/api/v1beta2/conversion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2025 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 - -func (*MachinePool) Hub() {} diff --git a/exp/api/v1beta2/doc.go b/exp/api/v1beta2/doc.go deleted file mode 100644 index ac1fe273ea8f..000000000000 --- a/exp/api/v1beta2/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2025 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 contains API Schema definitions for the exp v1beta2 API group. -// +kubebuilder:object:generate=true -// +groupName=cluster.x-k8s.io -package v1beta2 diff --git a/exp/api/v1beta2/groupversion_info.go b/exp/api/v1beta2/groupversion_info.go deleted file mode 100644 index b4c5972c9bbe..000000000000 --- a/exp/api/v1beta2/groupversion_info.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2025 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "cluster.x-k8s.io", Version: "v1beta2"} - - // schemeBuilder is used to add go types to the GroupVersionKind scheme. - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = schemeBuilder.AddToScheme - - objectTypes = []runtime.Object{} -) - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, objectTypes...) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/exp/api/v1beta2/v1beta1_condition_consts.go b/exp/api/v1beta2/v1beta1_condition_consts.go deleted file mode 100644 index e68b6bf046e1..000000000000 --- a/exp/api/v1beta2/v1beta1_condition_consts.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2025 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - -// Conditions and condition Reasons for the MachinePool object. - -const ( - // ReplicasReadyV1Beta1Condition reports an aggregate of current status of the replicas controlled by the MachinePool. - ReplicasReadyV1Beta1Condition clusterv1.ConditionType = "ReplicasReady" - - // WaitingForReplicasReadyV1Beta1Reason (Severity=Info) documents a machinepool waiting for the required replicas - // to be ready. - WaitingForReplicasReadyV1Beta1Reason = "WaitingForReplicasReady" -) diff --git a/exp/api/v1beta2/zz_generated.deepcopy.go b/exp/api/v1beta2/zz_generated.deepcopy.go deleted file mode 100644 index d9163782e89e..000000000000 --- a/exp/api/v1beta2/zz_generated.deepcopy.go +++ /dev/null @@ -1,243 +0,0 @@ -//go: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 v1beta2 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - apiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" - "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 *MachinePoolDeprecatedStatus) DeepCopyInto(out *MachinePoolDeprecatedStatus) { - *out = *in - if in.V1Beta1 != nil { - in, out := &in.V1Beta1, &out.V1Beta1 - *out = new(MachinePoolV1Beta1DeprecatedStatus) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolDeprecatedStatus. -func (in *MachinePoolDeprecatedStatus) DeepCopy() *MachinePoolDeprecatedStatus { - if in == nil { - return nil - } - out := new(MachinePoolDeprecatedStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachinePoolInitializationStatus) DeepCopyInto(out *MachinePoolInitializationStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolInitializationStatus. -func (in *MachinePoolInitializationStatus) DeepCopy() *MachinePoolInitializationStatus { - if in == nil { - return nil - } - out := new(MachinePoolInitializationStatus) - in.DeepCopyInto(out) - return out -} - -// 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.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.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Initialization != nil { - in, out := &in.Initialization, &out.Initialization - *out = new(MachinePoolInitializationStatus) - **out = **in - } - if in.NodeRefs != nil { - in, out := &in.NodeRefs, &out.NodeRefs - *out = make([]corev1.ObjectReference, len(*in)) - copy(*out, *in) - } - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.ReadyReplicas != nil { - in, out := &in.ReadyReplicas, &out.ReadyReplicas - *out = new(int32) - **out = **in - } - if in.AvailableReplicas != nil { - in, out := &in.AvailableReplicas, &out.AvailableReplicas - *out = new(int32) - **out = **in - } - if in.UpToDateReplicas != nil { - in, out := &in.UpToDateReplicas, &out.UpToDateReplicas - *out = new(int32) - **out = **in - } - if in.Deprecated != nil { - in, out := &in.Deprecated, &out.Deprecated - *out = new(MachinePoolDeprecatedStatus) - (*in).DeepCopyInto(*out) - } -} - -// 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 -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachinePoolV1Beta1DeprecatedStatus) DeepCopyInto(out *MachinePoolV1Beta1DeprecatedStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta2.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - 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 - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolV1Beta1DeprecatedStatus. -func (in *MachinePoolV1Beta1DeprecatedStatus) DeepCopy() *MachinePoolV1Beta1DeprecatedStatus { - if in == nil { - return nil - } - out := new(MachinePoolV1Beta1DeprecatedStatus) - in.DeepCopyInto(out) - return out -} diff --git a/exp/internal/controllers/machinepool_controller.go b/exp/internal/controllers/machinepool_controller.go index 9fe8b9c44fd0..1b3686d1aace 100644 --- a/exp/internal/controllers/machinepool_controller.go +++ b/exp/internal/controllers/machinepool_controller.go @@ -40,11 +40,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/internal/util/ssa" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" @@ -98,7 +97,7 @@ type scope struct { // machinePool is the MachinePool object. It is set at the beginning // of the reconcile function. - machinePool *expv1.MachinePool + machinePool *clusterv1.MachinePool // nodeRefMapResult is a map of providerIDs to Nodes that are associated with the Cluster. // It is set after reconcileInfrastructure is called. @@ -111,13 +110,13 @@ func (r *MachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.M } r.predicateLog = ptr.To(ctrl.LoggerFrom(ctx).WithValues("controller", "machinepool")) - clusterToMachinePools, err := util.ClusterToTypedObjectsMapper(mgr.GetClient(), &expv1.MachinePoolList{}, mgr.GetScheme()) + clusterToMachinePools, err := util.ClusterToTypedObjectsMapper(mgr.GetClient(), &clusterv1.MachinePoolList{}, mgr.GetScheme()) if err != nil { return err } c, err := ctrl.NewControllerManagedBy(mgr). - For(&expv1.MachinePool{}). + For(&clusterv1.MachinePool{}). WithOptions(options). WithEventFilter(predicates.ResourceHasFilterLabel(mgr.GetScheme(), *r.predicateLog, r.WatchFilterValue)). Watches( @@ -154,7 +153,7 @@ func (r *MachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.M func (r *MachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error) { log := ctrl.LoggerFrom(ctx) - mp := &expv1.MachinePool{} + mp := &clusterv1.MachinePool{} if err := r.Client.Get(ctx, req.NamespacedName, mp); err != nil { if apierrors.IsNotFound(err) { // Object not found, return. Created objects are automatically garbage collected. @@ -169,7 +168,7 @@ func (r *MachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Request) ctx = ctrl.LoggerInto(ctx, log) // Add finalizer first if not set to avoid the race condition between init and delete. - if finalizerAdded, err := finalizers.EnsureFinalizer(ctx, r.Client, mp, expv1.MachinePoolFinalizer); err != nil || finalizerAdded { + if finalizerAdded, err := finalizers.EnsureFinalizer(ctx, r.Client, mp, clusterv1.MachinePoolFinalizer); err != nil || finalizerAdded { return ctrl.Result{}, err } @@ -199,7 +198,7 @@ func (r *MachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Request) v1beta1conditions.WithConditions( clusterv1.BootstrapReadyV1Beta1Condition, clusterv1.InfrastructureReadyV1Beta1Condition, - expv1.ReplicasReadyV1Beta1Condition, + clusterv1.ReplicasReadyV1Beta1Condition, ), ) @@ -210,7 +209,7 @@ func (r *MachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Request) clusterv1.ReadyV1Beta1Condition, clusterv1.BootstrapReadyV1Beta1Condition, clusterv1.InfrastructureReadyV1Beta1Condition, - expv1.ReplicasReadyV1Beta1Condition, + clusterv1.ReplicasReadyV1Beta1Condition, }}, patch.WithOwnedConditions{Conditions: []string{ clusterv1.PausedCondition, @@ -278,7 +277,7 @@ func (r *MachinePoolReconciler) reconcile(ctx context.Context, s *scope) (ctrl.R } // reconcileDelete delete machinePool related resources. -func (r *MachinePoolReconciler) reconcileDelete(ctx context.Context, cluster *clusterv1.Cluster, machinePool *expv1.MachinePool) error { +func (r *MachinePoolReconciler) reconcileDelete(ctx context.Context, cluster *clusterv1.Cluster, machinePool *clusterv1.MachinePool) error { if ok, err := r.reconcileDeleteExternal(ctx, machinePool); !ok || err != nil { // Return early and don't remove the finalizer if we got an error or // the external reconciliation deletion isn't ready. @@ -295,12 +294,12 @@ func (r *MachinePoolReconciler) reconcileDelete(ctx context.Context, cluster *cl ctrl.LoggerFrom(ctx).Info("NodeDeleteTimeout passed, skipping Nodes deletion") } - controllerutil.RemoveFinalizer(machinePool, expv1.MachinePoolFinalizer) + controllerutil.RemoveFinalizer(machinePool, clusterv1.MachinePoolFinalizer) return nil } // reconcileDeleteNodes delete the cluster nodes. -func (r *MachinePoolReconciler) reconcileDeleteNodes(ctx context.Context, cluster *clusterv1.Cluster, machinePool *expv1.MachinePool) error { +func (r *MachinePoolReconciler) reconcileDeleteNodes(ctx context.Context, cluster *clusterv1.Cluster, machinePool *clusterv1.MachinePool) error { if len(machinePool.Status.NodeRefs) == 0 { return nil } @@ -314,7 +313,7 @@ func (r *MachinePoolReconciler) reconcileDeleteNodes(ctx context.Context, cluste } // isMachinePoolDeleteTimeoutPassed check the machinePool node delete time out. -func (r *MachinePoolReconciler) isMachinePoolNodeDeleteTimeoutPassed(machinePool *expv1.MachinePool) bool { +func (r *MachinePoolReconciler) isMachinePoolNodeDeleteTimeoutPassed(machinePool *clusterv1.MachinePool) bool { if !machinePool.DeletionTimestamp.IsZero() && machinePool.Spec.Template.Spec.NodeDeletionTimeout != nil { if machinePool.Spec.Template.Spec.NodeDeletionTimeout.Nanoseconds() != 0 { deleteTimePlusDuration := machinePool.DeletionTimestamp.Add(machinePool.Spec.Template.Spec.NodeDeletionTimeout.Duration) @@ -325,7 +324,7 @@ func (r *MachinePoolReconciler) isMachinePoolNodeDeleteTimeoutPassed(machinePool } // reconcileDeleteExternal tries to delete external references, returning true if it cannot find any. -func (r *MachinePoolReconciler) reconcileDeleteExternal(ctx context.Context, machinePool *expv1.MachinePool) (bool, error) { +func (r *MachinePoolReconciler) reconcileDeleteExternal(ctx context.Context, machinePool *clusterv1.MachinePool) (bool, error) { objects := []*unstructured.Unstructured{} references := []*corev1.ObjectReference{ machinePool.Spec.Template.Spec.Bootstrap.ConfigRef, @@ -398,7 +397,7 @@ func (r *MachinePoolReconciler) nodeToMachinePool(ctx context.Context, o client. } // Match by nodeName and status.nodeRef.name. - machinePoolList := &expv1.MachinePoolList{} + machinePoolList := &clusterv1.MachinePoolList{} if err := r.Client.List( ctx, machinePoolList, @@ -416,7 +415,7 @@ func (r *MachinePoolReconciler) nodeToMachinePool(ctx context.Context, o client. if node.Spec.ProviderID == "" { return nil } - machinePoolList = &expv1.MachinePoolList{} + machinePoolList = &clusterv1.MachinePoolList{} if err := r.Client.List( ctx, machinePoolList, diff --git a/exp/internal/controllers/machinepool_controller_noderef.go b/exp/internal/controllers/machinepool_controller_noderef.go index a9ce42d8fe9c..35d37cda44dd 100644 --- a/exp/internal/controllers/machinepool_controller_noderef.go +++ b/exp/internal/controllers/machinepool_controller_noderef.go @@ -30,9 +30,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/noderefutil" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/internal/util/taints" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" @@ -71,7 +70,7 @@ func (r *MachinePoolReconciler) reconcileNodeRefs(ctx context.Context, s *scope) readyReplicas = mp.Status.Deprecated.V1Beta1.ReadyReplicas } if ptr.Deref(mp.Status.Replicas, 0) == readyReplicas && len(mp.Status.NodeRefs) == int(readyReplicas) { - v1beta1conditions.MarkTrue(mp, expv1.ReplicasReadyV1Beta1Condition) + v1beta1conditions.MarkTrue(mp, clusterv1.ReplicasReadyV1Beta1Condition) return ctrl.Result{}, nil } @@ -107,10 +106,10 @@ func (r *MachinePoolReconciler) reconcileNodeRefs(ctx context.Context, s *scope) } if mp.Status.Deprecated == nil { - mp.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{} + mp.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} } if mp.Status.Deprecated.V1Beta1 == nil { - mp.Status.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} + mp.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} } mp.Status.Deprecated.V1Beta1.ReadyReplicas = int32(nodeRefsResult.ready) mp.Status.Deprecated.V1Beta1.AvailableReplicas = int32(nodeRefsResult.available) @@ -128,12 +127,12 @@ func (r *MachinePoolReconciler) reconcileNodeRefs(ctx context.Context, s *scope) if ptr.Deref(mp.Status.Replicas, 0) != mp.Status.Deprecated.V1Beta1.ReadyReplicas || len(nodeRefsResult.references) != int(mp.Status.Deprecated.V1Beta1.ReadyReplicas) { log.Info("Not enough ready replicas or node references", "nodeRefs", len(nodeRefsResult.references), "readyReplicas", mp.Status.ReadyReplicas, "replicas", ptr.Deref(mp.Status.Replicas, 0)) - v1beta1conditions.MarkFalse(mp, expv1.ReplicasReadyV1Beta1Condition, expv1.WaitingForReplicasReadyV1Beta1Reason, clusterv1.ConditionSeverityInfo, "") + v1beta1conditions.MarkFalse(mp, clusterv1.ReplicasReadyV1Beta1Condition, clusterv1.WaitingForReplicasReadyV1Beta1Reason, clusterv1.ConditionSeverityInfo, "") return ctrl.Result{RequeueAfter: 30 * time.Second}, nil } // At this point, the required number of replicas are ready - v1beta1conditions.MarkTrue(mp, expv1.ReplicasReadyV1Beta1Condition) + v1beta1conditions.MarkTrue(mp, clusterv1.ReplicasReadyV1Beta1Condition) return ctrl.Result{}, nil } @@ -206,7 +205,7 @@ func (r *MachinePoolReconciler) getNodeReferences(ctx context.Context, providerI } // patchNodes patches the nodes with the cluster name and cluster namespace annotations. -func (r *MachinePoolReconciler) patchNodes(ctx context.Context, c client.Client, references []corev1.ObjectReference, mp *expv1.MachinePool) error { +func (r *MachinePoolReconciler) patchNodes(ctx context.Context, c client.Client, references []corev1.ObjectReference, mp *clusterv1.MachinePool) error { log := ctrl.LoggerFrom(ctx) for _, nodeRef := range references { node := &corev1.Node{} diff --git a/exp/internal/controllers/machinepool_controller_noderef_test.go b/exp/internal/controllers/machinepool_controller_noderef_test.go index 9452d1344aa5..7065b80865ad 100644 --- a/exp/internal/controllers/machinepool_controller_noderef_test.go +++ b/exp/internal/controllers/machinepool_controller_noderef_test.go @@ -26,8 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestMachinePoolGetNodeReference(t *testing.T) { @@ -384,14 +383,14 @@ func TestMachinePoolPatchNodes(t *testing.T) { testCases := []struct { name string - machinePool *expv1.MachinePool + machinePool *clusterv1.MachinePool nodeRefs []corev1.ObjectReference expectedNodes []corev1.Node err error }{ { name: "Node with uninitialized taint should be patched", - machinePool: &expv1.MachinePool{ + machinePool: &clusterv1.MachinePool{ TypeMeta: metav1.TypeMeta{ Kind: "MachinePool", }, @@ -399,7 +398,7 @@ func TestMachinePoolPatchNodes(t *testing.T) { Name: "machinepool-1", Namespace: "my-namespace", }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: "cluster-1", ProviderIDList: []string{"aws://us-east-1/id-node-1"}, }, @@ -426,7 +425,7 @@ func TestMachinePoolPatchNodes(t *testing.T) { }, { name: "Node with existing annotations and taints should be patched", - machinePool: &expv1.MachinePool{ + machinePool: &clusterv1.MachinePool{ TypeMeta: metav1.TypeMeta{ Kind: "MachinePool", }, @@ -434,7 +433,7 @@ func TestMachinePoolPatchNodes(t *testing.T) { Name: "machinepool-2", Namespace: "my-namespace", }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: "cluster-1", ProviderIDList: []string{"aws://us-west-2/id-node-2"}, }, diff --git a/exp/internal/controllers/machinepool_controller_phases.go b/exp/internal/controllers/machinepool_controller_phases.go index 5d4275bf93fd..297e4d337522 100644 --- a/exp/internal/controllers/machinepool_controller_phases.go +++ b/exp/internal/controllers/machinepool_controller_phases.go @@ -36,10 +36,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" capierrors "sigs.k8s.io/cluster-api/errors" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" utilexp "sigs.k8s.io/cluster-api/exp/util" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/internal/util/ssa" @@ -53,20 +52,20 @@ import ( "sigs.k8s.io/cluster-api/util/predicates" ) -func (r *MachinePoolReconciler) reconcilePhase(mp *expv1.MachinePool) { +func (r *MachinePoolReconciler) reconcilePhase(mp *clusterv1.MachinePool) { // Set the phase to "pending" if nil. if mp.Status.Phase == "" { - mp.Status.SetTypedPhase(expv1.MachinePoolPhasePending) + mp.Status.SetTypedPhase(clusterv1.MachinePoolPhasePending) } // Set the phase to "provisioning" if bootstrap is ready and the infrastructure isn't. if mp.Status.Initialization != nil && mp.Status.Initialization.BootstrapDataSecretCreated && !mp.Status.Initialization.InfrastructureProvisioned { - mp.Status.SetTypedPhase(expv1.MachinePoolPhaseProvisioning) + mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseProvisioning) } // Set the phase to "provisioned" if the infrastructure is ready. if len(mp.Status.NodeRefs) != 0 { - mp.Status.SetTypedPhase(expv1.MachinePoolPhaseProvisioned) + mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseProvisioned) } // Set the phase to "running" if the number of ready replicas is equal to desired replicas. @@ -76,17 +75,17 @@ func (r *MachinePoolReconciler) reconcilePhase(mp *expv1.MachinePool) { readyReplicas = mp.Status.Deprecated.V1Beta1.ReadyReplicas } if mp.Status.Initialization != nil && mp.Status.Initialization.InfrastructureProvisioned && mp.Spec.Replicas != nil && *mp.Spec.Replicas == readyReplicas { - mp.Status.SetTypedPhase(expv1.MachinePoolPhaseRunning) + mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseRunning) } // Set the appropriate phase in response to the MachinePool replica count being greater than the observed infrastructure replicas. if mp.Status.Initialization != nil && mp.Status.Initialization.InfrastructureProvisioned && mp.Spec.Replicas != nil && *mp.Spec.Replicas > readyReplicas { // If we are being managed by an external autoscaler and can't predict scaling direction, set to "Scaling". if annotations.ReplicasManagedByExternalAutoscaler(mp) { - mp.Status.SetTypedPhase(expv1.MachinePoolPhaseScaling) + mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseScaling) } else { // Set the phase to "ScalingUp" if we are actively scaling the infrastructure out. - mp.Status.SetTypedPhase(expv1.MachinePoolPhaseScalingUp) + mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseScalingUp) } } @@ -94,21 +93,21 @@ func (r *MachinePoolReconciler) reconcilePhase(mp *expv1.MachinePool) { if mp.Status.Initialization != nil && mp.Status.Initialization.InfrastructureProvisioned && mp.Spec.Replicas != nil && *mp.Spec.Replicas < readyReplicas { // If we are being managed by an external autoscaler and can't predict scaling direction, set to "Scaling". if annotations.ReplicasManagedByExternalAutoscaler(mp) { - mp.Status.SetTypedPhase(expv1.MachinePoolPhaseScaling) + mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseScaling) } else { // Set the phase to "ScalingDown" if we are actively scaling the infrastructure in. - mp.Status.SetTypedPhase(expv1.MachinePoolPhaseScalingDown) + mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseScalingDown) } } // Set the phase to "deleting" if the deletion timestamp is set. if !mp.DeletionTimestamp.IsZero() { - mp.Status.SetTypedPhase(expv1.MachinePoolPhaseDeleting) + mp.Status.SetTypedPhase(clusterv1.MachinePoolPhaseDeleting) } } // reconcileExternal handles generic unstructured objects referenced by a MachinePool. -func (r *MachinePoolReconciler) reconcileExternal(ctx context.Context, m *expv1.MachinePool, ref *corev1.ObjectReference) (external.ReconcileOutput, error) { +func (r *MachinePoolReconciler) reconcileExternal(ctx context.Context, m *clusterv1.MachinePool, ref *corev1.ObjectReference) (external.ReconcileOutput, error) { log := ctrl.LoggerFrom(ctx) if err := utilconversion.UpdateReferenceAPIContract(ctx, r.Client, ref); err != nil { @@ -125,7 +124,7 @@ func (r *MachinePoolReconciler) reconcileExternal(ctx context.Context, m *expv1. } // Ensure we add a watch to the external object, if there isn't one already. - if err := r.externalTracker.Watch(log, obj, handler.EnqueueRequestForOwner(r.Client.Scheme(), r.Client.RESTMapper(), &expv1.MachinePool{}), predicates.ResourceIsChanged(r.Client.Scheme(), *r.externalTracker.PredicateLogger)); err != nil { + if err := r.externalTracker.Watch(log, obj, handler.EnqueueRequestForOwner(r.Client.Scheme(), r.Client.RESTMapper(), &clusterv1.MachinePool{}), predicates.ResourceIsChanged(r.Client.Scheme(), *r.externalTracker.PredicateLogger)); err != nil { return external.ReconcileOutput{}, err } @@ -161,19 +160,19 @@ func (r *MachinePoolReconciler) reconcileExternal(ctx context.Context, m *expv1. if failureReason != "" { machineStatusFailure := capierrors.MachinePoolStatusFailure(failureReason) if m.Status.Deprecated != nil { - m.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{} + m.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} } if m.Status.Deprecated.V1Beta1 != nil { - m.Status.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} + m.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} } m.Status.Deprecated.V1Beta1.FailureReason = &machineStatusFailure } if failureMessage != "" { if m.Status.Deprecated != nil { - m.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{} + m.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} } if m.Status.Deprecated.V1Beta1 != nil { - m.Status.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} + m.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} } m.Status.Deprecated.V1Beta1.FailureMessage = ptr.To( fmt.Sprintf("Failure detected from referenced resource %v with name %q: %s", @@ -227,7 +226,7 @@ func (r *MachinePoolReconciler) reconcileBootstrap(ctx context.Context, s *scope if !dataSecretCreated { log.Info("Waiting for bootstrap provider to generate data secret and report status.ready", bootstrapConfig.GetKind(), klog.KObj(bootstrapConfig)) if m.Status.Initialization == nil { - m.Status.Initialization = &expv1.MachinePoolInitializationStatus{} + m.Status.Initialization = &clusterv1.MachinePoolInitializationStatus{} } m.Status.Initialization.BootstrapDataSecretCreated = dataSecretCreated return ctrl.Result{}, nil @@ -243,7 +242,7 @@ func (r *MachinePoolReconciler) reconcileBootstrap(ctx context.Context, s *scope m.Spec.Template.Spec.Bootstrap.DataSecretName = secretName if m.Status.Initialization == nil { - m.Status.Initialization = &expv1.MachinePoolInitializationStatus{} + m.Status.Initialization = &clusterv1.MachinePoolInitializationStatus{} } m.Status.Initialization.BootstrapDataSecretCreated = true return ctrl.Result{}, nil @@ -252,7 +251,7 @@ func (r *MachinePoolReconciler) reconcileBootstrap(ctx context.Context, s *scope // If dataSecretName is set without a ConfigRef, this means the user brought their own bootstrap data. if m.Spec.Template.Spec.Bootstrap.DataSecretName != nil { if m.Status.Initialization == nil { - m.Status.Initialization = &expv1.MachinePoolInitializationStatus{} + m.Status.Initialization = &clusterv1.MachinePoolInitializationStatus{} } m.Status.Initialization.BootstrapDataSecretCreated = true v1beta1conditions.MarkTrue(m, clusterv1.BootstrapReadyV1Beta1Condition) @@ -277,10 +276,10 @@ func (r *MachinePoolReconciler) reconcileInfrastructure(ctx context.Context, s * // Infra object went missing after the machine pool was up and running log.Error(err, "infrastructure reference has been deleted after being ready, setting failure state") if mp.Status.Deprecated == nil { - mp.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{} + mp.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} } if mp.Status.Deprecated.V1Beta1 == nil { - mp.Status.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} + mp.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} } mp.Status.Deprecated.V1Beta1.FailureReason = ptr.To(capierrors.InvalidConfigurationMachinePoolError) mp.Status.Deprecated.V1Beta1.FailureMessage = ptr.To(fmt.Sprintf("MachinePool infrastructure resource %v with name %q has been deleted after being ready", @@ -302,7 +301,7 @@ func (r *MachinePoolReconciler) reconcileInfrastructure(ctx context.Context, s * } if mp.Status.Initialization == nil { - mp.Status.Initialization = &expv1.MachinePoolInitializationStatus{} + mp.Status.Initialization = &clusterv1.MachinePoolInitializationStatus{} } mp.Status.Initialization.InfrastructureProvisioned = ready @@ -354,10 +353,10 @@ func (r *MachinePoolReconciler) reconcileInfrastructure(ctx context.Context, s * if !reflect.DeepEqual(mp.Spec.ProviderIDList, providerIDList) { mp.Spec.ProviderIDList = providerIDList if mp.Status.Deprecated == nil { - mp.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{} + mp.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} } if mp.Status.Deprecated.V1Beta1 == nil { - mp.Status.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} + mp.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} } mp.Status.Deprecated.V1Beta1.ReadyReplicas = 0 mp.Status.Deprecated.V1Beta1.AvailableReplicas = 0 @@ -490,7 +489,7 @@ func (r *MachinePoolReconciler) createOrUpdateMachines(ctx context.Context, s *s // computeDesiredMachine constructs the desired Machine for an infraMachine. // If the Machine exists, it ensures the Machine always owned by the MachinePool. -func (r *MachinePoolReconciler) computeDesiredMachine(mp *expv1.MachinePool, infraMachine *unstructured.Unstructured, existingMachine *clusterv1.Machine, existingNode *corev1.Node) *clusterv1.Machine { +func (r *MachinePoolReconciler) computeDesiredMachine(mp *clusterv1.MachinePool, infraMachine *unstructured.Unstructured, existingMachine *clusterv1.Machine, existingNode *corev1.Node) *clusterv1.Machine { infraRef := corev1.ObjectReference{ APIVersion: infraMachine.GetAPIVersion(), Kind: infraMachine.GetKind(), diff --git a/exp/internal/controllers/machinepool_controller_phases_test.go b/exp/internal/controllers/machinepool_controller_phases_test.go index d14cb69dd13e..7496fd4443db 100644 --- a/exp/internal/controllers/machinepool_controller_phases_test.go +++ b/exp/internal/controllers/machinepool_controller_phases_test.go @@ -36,11 +36,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/log" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" externalfake "sigs.k8s.io/cluster-api/controllers/external/fake" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/internal/util/ssa" "sigs.k8s.io/cluster-api/util/kubeconfig" "sigs.k8s.io/cluster-api/util/labels/format" @@ -64,12 +63,12 @@ func TestReconcileMachinePoolPhases(t *testing.T) { }, } - defaultMachinePool := expv1.MachinePool{ + defaultMachinePool := clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool-test", Namespace: metav1.NamespaceDefault, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: defaultCluster.Name, Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ @@ -196,7 +195,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhasePending)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhasePending)) }) t.Run("Should set `Provisioning` when bootstrap is ready", func(t *testing.T) { @@ -236,7 +235,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseProvisioning)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseProvisioning)) }) t.Run("Should set `Running` when bootstrap and infra is ready", func(t *testing.T) { @@ -292,14 +291,14 @@ func TestReconcileMachinePoolPhases(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) // Set ReadyReplicas - machinepool.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + machinepool.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: 1, }, } r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseRunning)) }) t.Run("Should set `Running` when bootstrap, infra, and ready replicas equals spec replicas", func(t *testing.T) { @@ -364,14 +363,14 @@ func TestReconcileMachinePoolPhases(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) // Set ReadyReplicas - machinepool.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + machinepool.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: 1, }, } r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseRunning)) }) t.Run("Should set `Provisioned` when there is a NodeRef but infra is not ready ", func(t *testing.T) { @@ -414,7 +413,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseProvisioned)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseProvisioned)) }) t.Run("Should set `ScalingUp` when infra is scaling up", func(t *testing.T) { @@ -467,8 +466,8 @@ func TestReconcileMachinePoolPhases(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) // Set ReadyReplicas - machinepool.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + machinepool.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: 1, }, } @@ -477,7 +476,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { machinepool.Spec.Replicas = ptr.To[int32](5) r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseScalingUp)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseScalingUp)) }) t.Run("Should set `ScalingDown` when infra is scaling down", func(t *testing.T) { @@ -537,8 +536,8 @@ func TestReconcileMachinePoolPhases(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) // Set ReadyReplicas - machinepool.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + machinepool.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: 4, }, } @@ -547,7 +546,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { machinepool.Spec.Replicas = ptr.To[int32](1) r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseScalingDown)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseScalingDown)) }) t.Run("Should set `Deleting` when MachinePool is being deleted", func(t *testing.T) { @@ -589,7 +588,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { // Set Deletion Timestamp. machinepool.SetDeletionTimestamp(&deletionTimestamp) - machinepool.Finalizers = []string{expv1.MachinePoolFinalizer} + machinepool.Finalizers = []string{clusterv1.MachinePoolFinalizer} fakeClient := fake.NewClientBuilder().WithObjects(defaultCluster, defaultKubeconfigSecret, machinepool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).Build() r := &MachinePoolReconciler{ @@ -613,7 +612,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseDeleting)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseDeleting)) }) t.Run("Should keep `Running` when MachinePool bootstrap config is changed to another ready one", func(t *testing.T) { @@ -658,8 +657,8 @@ func TestReconcileMachinePoolPhases(t *testing.T) { // Set replicas to fully reconciled machinePool.Spec.ProviderIDList = []string{"test://id-1"} - machinePool.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + machinePool.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: 1, }, } @@ -687,7 +686,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) r.reconcilePhase(machinePool) - g.Expect(machinePool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning)) + g.Expect(machinePool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseRunning)) g.Expect(*machinePool.Spec.Template.Spec.Bootstrap.DataSecretName).To(Equal("secret-data")) // Change bootstrap reference. @@ -709,7 +708,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { r.reconcilePhase(machinePool) g.Expect(*machinePool.Spec.Template.Spec.Bootstrap.DataSecretName).To(Equal("secret-data-new")) g.Expect(machinePool.Status.Initialization != nil && machinePool.Status.Initialization.BootstrapDataSecretCreated).To(BeTrue()) - g.Expect(machinePool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning)) + g.Expect(machinePool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseRunning)) }) t.Run("Should keep `Running` when MachinePool bootstrap config is changed to a non-ready one", func(t *testing.T) { @@ -754,8 +753,8 @@ func TestReconcileMachinePoolPhases(t *testing.T) { // Set replicas to fully reconciled machinePool.Spec.ProviderIDList = []string{"test://id-1"} - machinePool.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + machinePool.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: 1, }, } @@ -783,7 +782,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) r.reconcilePhase(machinePool) - g.Expect(machinePool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning)) + g.Expect(machinePool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseRunning)) g.Expect(*machinePool.Spec.Template.Spec.Bootstrap.DataSecretName).To(Equal("secret-data")) // Change bootstrap reference @@ -814,12 +813,12 @@ func TestReconcileMachinePoolPhases(t *testing.T) { // There is no phase defined for "changing to new bootstrap config", so it should still be `Running` the // old configuration - g.Expect(machinePool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning)) + g.Expect(machinePool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseRunning)) }) } func TestReconcileMachinePoolBootstrap(t *testing.T) { - defaultMachinePool := expv1.MachinePool{ + defaultMachinePool := clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool-test", Namespace: metav1.NamespaceDefault, @@ -827,7 +826,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { clusterv1.ClusterNameLabel: clusterName, }, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ @@ -853,10 +852,10 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { testCases := []struct { name string bootstrapConfig map[string]interface{} - machinepool *expv1.MachinePool + machinepool *clusterv1.MachinePool expectError bool expectResult ctrl.Result - expected func(g *WithT, m *expv1.MachinePool) + expected func(g *WithT, m *clusterv1.MachinePool) }{ { name: "new machinepool, bootstrap config ready with data", @@ -876,7 +875,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { }, }, expectError: false, - expected: func(g *WithT, m *expv1.MachinePool) { + expected: func(g *WithT, m *clusterv1.MachinePool) { g.Expect(m.Status.Initialization != nil && m.Status.Initialization.BootstrapDataSecretCreated).To(BeTrue()) g.Expect(m.Spec.Template.Spec.Bootstrap.DataSecretName).ToNot(BeNil()) g.Expect(*m.Spec.Template.Spec.Bootstrap.DataSecretName).To(ContainSubstring("secret-data")) @@ -899,7 +898,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { }, }, expectError: true, - expected: func(g *WithT, m *expv1.MachinePool) { + expected: func(g *WithT, m *clusterv1.MachinePool) { g.Expect(m.Status.Initialization != nil && m.Status.Initialization.BootstrapDataSecretCreated).To(BeFalse()) g.Expect(m.Spec.Template.Spec.Bootstrap.DataSecretName).To(BeNil()) }, @@ -918,7 +917,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { }, expectError: false, expectResult: ctrl.Result{}, - expected: func(g *WithT, m *expv1.MachinePool) { + expected: func(g *WithT, m *clusterv1.MachinePool) { g.Expect(m.Status.Initialization != nil && m.Status.Initialization.BootstrapDataSecretCreated).To(BeFalse()) }, }, @@ -935,7 +934,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { "status": map[string]interface{}{}, }, expectError: true, - expected: func(g *WithT, m *expv1.MachinePool) { + expected: func(g *WithT, m *clusterv1.MachinePool) { g.Expect(m.Status.Initialization != nil && m.Status.Initialization.BootstrapDataSecretCreated).To(BeFalse()) }, }, @@ -970,12 +969,12 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { "dataSecretName": "secret-data", }, }, - machinepool: &expv1.MachinePool{ + machinepool: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "bootstrap-test-existing", Namespace: metav1.NamespaceDefault, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ @@ -990,14 +989,14 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { }, }, }, - Status: expv1.MachinePoolStatus{ - Initialization: &expv1.MachinePoolInitializationStatus{ + Status: clusterv1.MachinePoolStatus{ + Initialization: &clusterv1.MachinePoolInitializationStatus{ BootstrapDataSecretCreated: true, }, }, }, expectError: false, - expected: func(g *WithT, m *expv1.MachinePool) { + expected: func(g *WithT, m *clusterv1.MachinePool) { g.Expect(m.Status.Initialization != nil && m.Status.Initialization.BootstrapDataSecretCreated).To(BeTrue()) g.Expect(*m.Spec.Template.Spec.Bootstrap.DataSecretName).To(Equal("secret-data")) }, @@ -1019,12 +1018,12 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { "dataSecretName": "secret-data", }, }, - machinepool: &expv1.MachinePool{ + machinepool: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "bootstrap-test-existing", Namespace: metav1.NamespaceDefault, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ @@ -1033,14 +1032,14 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { }, }, }, - Status: expv1.MachinePoolStatus{ - Initialization: &expv1.MachinePoolInitializationStatus{ + Status: clusterv1.MachinePoolStatus{ + Initialization: &clusterv1.MachinePoolInitializationStatus{ BootstrapDataSecretCreated: true, }, }, }, expectError: false, - expected: func(g *WithT, m *expv1.MachinePool) { + expected: func(g *WithT, m *clusterv1.MachinePool) { g.Expect(m.Status.Initialization != nil && m.Status.Initialization.BootstrapDataSecretCreated).To(BeTrue()) g.Expect(*m.Spec.Template.Spec.Bootstrap.DataSecretName).To(Equal("data")) }, @@ -1062,12 +1061,12 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { "data": "#!/bin/bash ... data", }, }, - machinepool: &expv1.MachinePool{ + machinepool: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "bootstrap-test-existing", Namespace: metav1.NamespaceDefault, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ @@ -1082,15 +1081,15 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { }, }, }, - Status: expv1.MachinePoolStatus{ - Initialization: &expv1.MachinePoolInitializationStatus{ + Status: clusterv1.MachinePoolStatus{ + Initialization: &clusterv1.MachinePoolInitializationStatus{ BootstrapDataSecretCreated: false, }, }, }, expectError: false, expectResult: ctrl.Result{}, - expected: func(g *WithT, m *expv1.MachinePool) { + expected: func(g *WithT, m *clusterv1.MachinePool) { g.Expect(m.Status.Initialization != nil && m.Status.Initialization.BootstrapDataSecretCreated).To(BeFalse()) }, }, @@ -1136,7 +1135,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) { } func TestReconcileMachinePoolInfrastructure(t *testing.T) { - defaultMachinePool := expv1.MachinePool{ + defaultMachinePool := clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool-test", Namespace: metav1.NamespaceDefault, @@ -1144,7 +1143,7 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { clusterv1.ClusterNameLabel: clusterName, }, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -1178,11 +1177,11 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { name string bootstrapConfig map[string]interface{} infraConfig map[string]interface{} - machinepool *expv1.MachinePool + machinepool *clusterv1.MachinePool expectError bool expectChanged bool expectRequeueAfter bool - expected func(g *WithT, m *expv1.MachinePool) + expected func(g *WithT, m *clusterv1.MachinePool) }{ { name: "new machinepool, infrastructure config ready", @@ -1214,18 +1213,18 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { }, expectError: false, expectChanged: true, - expected: func(g *WithT, m *expv1.MachinePool) { + expected: func(g *WithT, m *clusterv1.MachinePool) { g.Expect(m.Status.Initialization != nil && m.Status.Initialization.InfrastructureProvisioned).To(BeTrue()) }, }, { name: "ready bootstrap, infra, and nodeRef, machinepool is running, replicas 0, providerIDList not set", - machinepool: &expv1.MachinePool{ + machinepool: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool-test", Namespace: metav1.NamespaceDefault, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](0), Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -1246,8 +1245,8 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { }, }, }, - Status: expv1.MachinePoolStatus{ - Initialization: &expv1.MachinePoolInitializationStatus{ + Status: clusterv1.MachinePoolStatus{ + Initialization: &clusterv1.MachinePoolInitializationStatus{ InfrastructureProvisioned: true, BootstrapDataSecretCreated: true, }, @@ -1295,14 +1294,14 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) { }, expectError: false, expectRequeueAfter: false, - expected: func(g *WithT, m *expv1.MachinePool) { + expected: func(g *WithT, m *clusterv1.MachinePool) { g.Expect(m.Status.Initialization != nil && m.Status.Initialization.InfrastructureProvisioned).To(BeTrue()) g.Expect(m.Status.Deprecated.V1Beta1.ReadyReplicas).To(Equal(int32(0))) g.Expect(m.Status.Deprecated.V1Beta1.AvailableReplicas).To(Equal(int32(0))) g.Expect(m.Status.Deprecated.V1Beta1.UnavailableReplicas).To(Equal(int32(0))) g.Expect(m.Status.Deprecated.V1Beta1.FailureMessage).To(BeNil()) g.Expect(m.Status.Deprecated.V1Beta1.FailureReason).To(BeNil()) - g.Expect(m.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning)) + g.Expect(m.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseRunning)) }, }, } @@ -1565,7 +1564,7 @@ func TestReconcileMachinePoolMachines(t *testing.T) { } func TestInfraMachineToMachinePoolMapper(t *testing.T) { - machinePool1 := expv1.MachinePool{ + machinePool1 := clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool-1", Namespace: metav1.NamespaceDefault, @@ -1575,7 +1574,7 @@ func TestInfraMachineToMachinePoolMapper(t *testing.T) { }, } - machinePool2 := expv1.MachinePool{ + machinePool2 := clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool-2", Namespace: "other-namespace", @@ -1585,7 +1584,7 @@ func TestInfraMachineToMachinePoolMapper(t *testing.T) { }, } - machinePool3 := expv1.MachinePool{ + machinePool3 := clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool-3", Namespace: metav1.NamespaceDefault, @@ -1595,7 +1594,7 @@ func TestInfraMachineToMachinePoolMapper(t *testing.T) { }, } - machinePoolLongName := expv1.MachinePool{ + machinePoolLongName := clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long", // Use a name longer than 64 characters to trigger a hash Namespace: metav1.NamespaceDefault, @@ -1653,13 +1652,13 @@ func TestInfraMachineToMachinePoolMapper(t *testing.T) { testCases := []struct { name string infraMachine *unstructured.Unstructured - machinepools []expv1.MachinePool - expectedMachinePool *expv1.MachinePool + machinepools []clusterv1.MachinePool + expectedMachinePool *clusterv1.MachinePool }{ { name: "match machinePool name with label value", infraMachine: &infraMachine1, - machinepools: []expv1.MachinePool{ + machinepools: []clusterv1.MachinePool{ machinePool1, machinePool2, machinePool3, @@ -1670,7 +1669,7 @@ func TestInfraMachineToMachinePoolMapper(t *testing.T) { { name: "match hash of machinePool name with label hash", infraMachine: &infraMachine2, - machinepools: []expv1.MachinePool{ + machinepools: []clusterv1.MachinePool{ machinePool1, machinePool2, machinePool3, @@ -1681,7 +1680,7 @@ func TestInfraMachineToMachinePoolMapper(t *testing.T) { { name: "return nil if no machinePool matches", infraMachine: &infraMachine3, - machinepools: []expv1.MachinePool{ + machinepools: []clusterv1.MachinePool{ machinePool1, machinePool2, machinePool3, @@ -1736,12 +1735,12 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) { g.Expect(env.CleanupAndWait(ctx, do...)).To(Succeed()) }(testCluster) - defaultMachinePool := expv1.MachinePool{ + defaultMachinePool := clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool-test", Namespace: ns.Name, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: testCluster.Name, Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -1762,7 +1761,7 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) { }, }, }, - Status: expv1.MachinePoolStatus{}, + Status: clusterv1.MachinePoolStatus{}, } defaultBootstrap := &unstructured.Unstructured{ @@ -1864,7 +1863,7 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) { r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseScalingDown)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseScalingDown)) delNode := &corev1.Node{} g.Expect(env.Get(ctx, client.ObjectKeyFromObject(node), delNode)).To(Succeed()) @@ -1931,7 +1930,7 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) { g.Expect(res.Requeue).To(BeFalse()) r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseRunning)) delNode := &corev1.Node{} err = env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(node), delNode) @@ -1983,7 +1982,7 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) { r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseRunning)) }) t.Run("Should set `ScalingUp` when scaling from zero to one", func(t *testing.T) { @@ -2030,7 +2029,7 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) { r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseScalingUp)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseScalingUp)) }) t.Run("Should set `Running` when scaled from zero to one", func(t *testing.T) { @@ -2099,7 +2098,7 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) { r.reconcilePhase(machinepool) - g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning)) + g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(clusterv1.MachinePoolPhaseRunning)) delNode := &corev1.Node{} g.Expect(env.Get(ctx, client.ObjectKeyFromObject(node), delNode)).To(Succeed()) @@ -2159,8 +2158,8 @@ func getMachines(replicas int, mpName, clusterName, nsName string) []clusterv1.M return machines } -func getMachinePool(replicas int, mpName, clusterName, nsName string) expv1.MachinePool { - return expv1.MachinePool{ +func getMachinePool(replicas int, mpName, clusterName, nsName string) clusterv1.MachinePool { + return clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: mpName, Namespace: nsName, @@ -2168,7 +2167,7 @@ func getMachinePool(replicas int, mpName, clusterName, nsName string) expv1.Mach clusterv1.ClusterNameLabel: clusterName, }, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: clusterName, Replicas: ptr.To[int32](int32(replicas)), Template: clusterv1.MachineTemplateSpec{ diff --git a/exp/internal/controllers/machinepool_controller_test.go b/exp/internal/controllers/machinepool_controller_test.go index effd5adb99ea..7ea68fc3ed4c 100644 --- a/exp/internal/controllers/machinepool_controller_test.go +++ b/exp/internal/controllers/machinepool_controller_test.go @@ -40,11 +40,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" externalfake "sigs.k8s.io/cluster-api/controllers/external/fake" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/util" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" "sigs.k8s.io/cluster-api/util/test/builder" @@ -59,12 +58,12 @@ func TestMachinePoolFinalizer(t *testing.T) { }, } - machinePoolValidCluster := &expv1.MachinePool{ + machinePoolValidCluster := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinePool1", Namespace: metav1.NamespaceDefault, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -77,13 +76,13 @@ func TestMachinePoolFinalizer(t *testing.T) { }, } - machinePoolWithFinalizer := &expv1.MachinePool{ + machinePoolWithFinalizer := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinePool2", Namespace: metav1.NamespaceDefault, Finalizers: []string{"some-other-finalizer"}, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -99,7 +98,7 @@ func TestMachinePoolFinalizer(t *testing.T) { testCases := []struct { name string request reconcile.Request - m *expv1.MachinePool + m *clusterv1.MachinePool expectedFinalizers []string }{ { @@ -108,7 +107,7 @@ func TestMachinePoolFinalizer(t *testing.T) { NamespacedName: util.ObjectKey(machinePoolValidCluster), }, m: machinePoolValidCluster, - expectedFinalizers: []string{expv1.MachinePoolFinalizer}, + expectedFinalizers: []string{clusterv1.MachinePoolFinalizer}, }, { name: "should append the machinePool finalizer to the machinePool if it already has a finalizer", @@ -116,7 +115,7 @@ func TestMachinePoolFinalizer(t *testing.T) { NamespacedName: util.ObjectKey(machinePoolWithFinalizer), }, m: machinePoolWithFinalizer, - expectedFinalizers: []string{"some-other-finalizer", expv1.MachinePoolFinalizer}, + expectedFinalizers: []string{"some-other-finalizer", clusterv1.MachinePoolFinalizer}, }, } @@ -135,7 +134,7 @@ func TestMachinePoolFinalizer(t *testing.T) { _, _ = mr.Reconcile(ctx, tc.request) key := client.ObjectKey{Namespace: tc.m.Namespace, Name: tc.m.Name} - var actual expv1.MachinePool + var actual clusterv1.MachinePool if len(tc.expectedFinalizers) > 0 { g.Expect(mr.Client.Get(ctx, key, &actual)).To(Succeed()) g.Expect(actual.Finalizers).ToNot(BeEmpty()) @@ -154,16 +153,16 @@ func TestMachinePoolOwnerReference(t *testing.T) { ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "test-cluster"}, } - machinePoolInvalidCluster := &expv1.MachinePool{ + machinePoolInvalidCluster := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinePool1", Namespace: metav1.NamespaceDefault, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](1), ClusterName: "invalid", }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ Conditions: []metav1.Condition{{ Type: clusterv1.PausedCondition, Status: metav1.ConditionFalse, @@ -172,12 +171,12 @@ func TestMachinePoolOwnerReference(t *testing.T) { }, } - machinePoolValidCluster := &expv1.MachinePool{ + machinePoolValidCluster := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinePool2", Namespace: metav1.NamespaceDefault, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -188,7 +187,7 @@ func TestMachinePoolOwnerReference(t *testing.T) { }, ClusterName: "test-cluster", }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ Conditions: []metav1.Condition{{ Type: clusterv1.PausedCondition, Status: metav1.ConditionFalse, @@ -197,7 +196,7 @@ func TestMachinePoolOwnerReference(t *testing.T) { }, } - machinePoolValidMachinePool := &expv1.MachinePool{ + machinePoolValidMachinePool := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinePool3", Namespace: metav1.NamespaceDefault, @@ -205,7 +204,7 @@ func TestMachinePoolOwnerReference(t *testing.T) { clusterv1.ClusterNameLabel: "valid-cluster", }, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -216,7 +215,7 @@ func TestMachinePoolOwnerReference(t *testing.T) { }, ClusterName: "test-cluster", }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ Conditions: []metav1.Condition{{ Type: clusterv1.PausedCondition, Status: metav1.ConditionFalse, @@ -228,7 +227,7 @@ func TestMachinePoolOwnerReference(t *testing.T) { testCases := []struct { name string request reconcile.Request - m *expv1.MachinePool + m *clusterv1.MachinePool expectedOR []metav1.OwnerReference }{ { @@ -257,21 +256,21 @@ func TestMachinePoolOwnerReference(t *testing.T) { machinePoolInvalidCluster, machinePoolValidCluster, machinePoolValidMachinePool, - ).WithStatusSubresource(&expv1.MachinePool{}).Build() + ).WithStatusSubresource(&clusterv1.MachinePool{}).Build() mr := &MachinePoolReconciler{ Client: fakeClient, APIReader: fakeClient, } key := client.ObjectKey{Namespace: tc.m.Namespace, Name: tc.m.Name} - var actual expv1.MachinePool + var actual clusterv1.MachinePool // this first requeue is to add finalizer result, err := mr.Reconcile(ctx, tc.request) g.Expect(err).ToNot(HaveOccurred()) g.Expect(result).To(BeComparableTo(ctrl.Result{})) g.Expect(mr.Client.Get(ctx, key, &actual)).To(Succeed()) - g.Expect(actual.Finalizers).To(ContainElement(expv1.MachinePoolFinalizer)) + g.Expect(actual.Finalizers).To(ContainElement(clusterv1.MachinePoolFinalizer)) _, _ = mr.Reconcile(ctx, tc.request) @@ -335,21 +334,21 @@ func TestReconcileMachinePoolRequest(t *testing.T) { } testCases := []struct { name string - machinePool expv1.MachinePool + machinePool clusterv1.MachinePool nodes []corev1.Node errOnDeleteNode bool expected expected }{ { name: "Successfully reconcile MachinePool", - machinePool: expv1.MachinePool{ + machinePool: clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "created", Namespace: metav1.NamespaceDefault, - Finalizers: []string{expv1.MachinePoolFinalizer}, + Finalizers: []string{clusterv1.MachinePoolFinalizer}, CreationTimestamp: timeNow, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: "test-cluster", ProviderIDList: []string{"test://id-1"}, Replicas: ptr.To[int32](1), @@ -365,10 +364,10 @@ func TestReconcileMachinePoolRequest(t *testing.T) { }, }, }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ Replicas: ptr.To(int32(1)), - Deprecated: &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + Deprecated: &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: 1, }, }, @@ -391,18 +390,18 @@ func TestReconcileMachinePoolRequest(t *testing.T) { }, { name: "Successfully reconcile MachinePool with deletionTimestamp & NodeDeletionTimeout not passed when Nodes can be deleted (MP should go away)", - machinePool: expv1.MachinePool{ + machinePool: clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "deleted", Namespace: metav1.NamespaceDefault, Labels: map[string]string{ clusterv1.MachineControlPlaneLabel: "", }, - Finalizers: []string{expv1.MachinePoolFinalizer}, + Finalizers: []string{clusterv1.MachinePoolFinalizer}, CreationTimestamp: timeNow, DeletionTimestamp: &timeNow, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: "test-cluster", Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ @@ -419,7 +418,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) { }, ProviderIDList: []string{"aws:///us-test-2a/i-013ab00756982217f"}, }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ { APIVersion: "v1", @@ -454,18 +453,18 @@ func TestReconcileMachinePoolRequest(t *testing.T) { }, { name: "Fail reconcile MachinePool with deletionTimestamp & NodeDeletionTimeout not passed when Nodes cannot be deleted (MP should stay around)", - machinePool: expv1.MachinePool{ + machinePool: clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "deleted", Namespace: metav1.NamespaceDefault, Labels: map[string]string{ clusterv1.MachineControlPlaneLabel: "", }, - Finalizers: []string{expv1.MachinePoolFinalizer}, + Finalizers: []string{clusterv1.MachinePoolFinalizer}, CreationTimestamp: timeNow, DeletionTimestamp: &timeNow, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: "test-cluster", Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ @@ -482,7 +481,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) { }, ProviderIDList: []string{"aws:///us-test-2a/i-013ab00756982217f"}, }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ { APIVersion: "v1", @@ -517,18 +516,18 @@ func TestReconcileMachinePoolRequest(t *testing.T) { }, { name: "Successfully reconcile MachinePool with deletionTimestamp & NodeDeletionTimeout passed when Nodes cannot be deleted (MP should go away)", - machinePool: expv1.MachinePool{ + machinePool: clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "deleted", Namespace: metav1.NamespaceDefault, Labels: map[string]string{ clusterv1.MachineControlPlaneLabel: "", }, - Finalizers: []string{expv1.MachinePoolFinalizer}, + Finalizers: []string{clusterv1.MachinePoolFinalizer}, CreationTimestamp: metav1.Time{Time: timeNow.Add(time.Minute * -2)}, DeletionTimestamp: &metav1.Time{Time: timeNow.Add(time.Minute * -1)}, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: "test-cluster", Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ @@ -545,7 +544,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) { }, ProviderIDList: []string{"aws:///us-test-2a/i-013ab00756982217f"}, }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ { APIVersion: "v1", @@ -591,7 +590,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) { bootstrapConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachinePoolCRD, - ).WithStatusSubresource(&expv1.MachinePool{}).Build() + ).WithStatusSubresource(&clusterv1.MachinePool{}).Build() trackerObjects := []client.Object{} for _, node := range tc.nodes { @@ -629,9 +628,9 @@ func TestReconcileMachinePoolRequest(t *testing.T) { // Check machinePool test cases key := client.ObjectKey{Namespace: tc.machinePool.Namespace, Name: tc.machinePool.Name} if tc.expected.mpExist { - g.Expect(r.Client.Get(ctx, key, &expv1.MachinePool{})).To(Succeed()) + g.Expect(r.Client.Get(ctx, key, &clusterv1.MachinePool{})).To(Succeed()) } else { - g.Expect(apierrors.IsNotFound(r.Client.Get(ctx, key, &expv1.MachinePool{}))).To(BeTrue()) + g.Expect(apierrors.IsNotFound(r.Client.Get(ctx, key, &clusterv1.MachinePool{}))).To(BeTrue()) } }) } @@ -641,12 +640,12 @@ func TestMachinePoolNodeDeleteTimeoutPassed(t *testing.T) { timeNow := metav1.Now() testCases := []struct { name string - machinePool *expv1.MachinePool + machinePool *clusterv1.MachinePool want bool }{ { name: "false if deletionTimestamp not set", - machinePool: &expv1.MachinePool{ + machinePool: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool", Namespace: metav1.NamespaceDefault, @@ -656,7 +655,7 @@ func TestMachinePoolNodeDeleteTimeoutPassed(t *testing.T) { }, { name: "false if deletionTimestamp set to now and NodeDeletionTimeout not set", - machinePool: &expv1.MachinePool{ + machinePool: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool", Namespace: metav1.NamespaceDefault, @@ -667,13 +666,13 @@ func TestMachinePoolNodeDeleteTimeoutPassed(t *testing.T) { }, { name: "false if deletionTimestamp set to now and NodeDeletionTimeout set to 0", - machinePool: &expv1.MachinePool{ + machinePool: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool", Namespace: metav1.NamespaceDefault, DeletionTimestamp: &timeNow, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ NodeDeletionTimeout: &metav1.Duration{Duration: 0 * time.Second}, @@ -685,13 +684,13 @@ func TestMachinePoolNodeDeleteTimeoutPassed(t *testing.T) { }, { name: "false if deletionTimestamp set to now and NodeDeletionTimeout set to 1m", - machinePool: &expv1.MachinePool{ + machinePool: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool", Namespace: metav1.NamespaceDefault, DeletionTimestamp: &timeNow, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ NodeDeletionTimeout: &metav1.Duration{Duration: 1 * time.Minute}, @@ -703,13 +702,13 @@ func TestMachinePoolNodeDeleteTimeoutPassed(t *testing.T) { }, { name: "true if deletionTimestamp set to now-1m and NodeDeletionTimeout set to 10s", - machinePool: &expv1.MachinePool{ + machinePool: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "machinepool", Namespace: metav1.NamespaceDefault, DeletionTimestamp: &metav1.Time{Time: timeNow.Add(time.Minute * -1)}, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ NodeDeletionTimeout: &metav1.Duration{Duration: 10 * time.Second}, @@ -758,12 +757,12 @@ func TestReconcileMachinePoolDeleteExternal(t *testing.T) { }, } - machinePool := &expv1.MachinePool{ + machinePool := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "delete", Namespace: metav1.NamespaceDefault, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: "test-cluster", Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ @@ -861,14 +860,14 @@ func TestRemoveMachinePoolFinalizerAfterDeleteReconcile(t *testing.T) { ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "test-cluster"}, } - m := &expv1.MachinePool{ + m := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "delete123", Namespace: metav1.NamespaceDefault, - Finalizers: []string{expv1.MachinePoolFinalizer, "test"}, + Finalizers: []string{clusterv1.MachinePoolFinalizer, "test"}, DeletionTimestamp: &dt, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: "test-cluster", Replicas: ptr.To[int32](1), Template: clusterv1.MachineTemplateSpec{ @@ -883,7 +882,7 @@ func TestRemoveMachinePoolFinalizerAfterDeleteReconcile(t *testing.T) { }, }, }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ Conditions: []metav1.Condition{{ Type: clusterv1.PausedCondition, Status: metav1.ConditionFalse, @@ -892,7 +891,7 @@ func TestRemoveMachinePoolFinalizerAfterDeleteReconcile(t *testing.T) { }, } key := client.ObjectKey{Namespace: m.Namespace, Name: m.Name} - clientFake := fake.NewClientBuilder().WithObjects(testCluster, m).WithStatusSubresource(&expv1.MachinePool{}).Build() + clientFake := fake.NewClientBuilder().WithObjects(testCluster, m).WithStatusSubresource(&clusterv1.MachinePool{}).Build() mr := &MachinePoolReconciler{ Client: clientFake, ClusterCache: clustercache.NewFakeClusterCache(clientFake, client.ObjectKey{Name: testCluster.Name, Namespace: testCluster.Namespace}), @@ -900,7 +899,7 @@ func TestRemoveMachinePoolFinalizerAfterDeleteReconcile(t *testing.T) { _, err := mr.Reconcile(ctx, reconcile.Request{NamespacedName: key}) g.Expect(err).ToNot(HaveOccurred()) - var actual expv1.MachinePool + var actual clusterv1.MachinePool g.Expect(mr.Client.Get(ctx, key, &actual)).To(Succeed()) g.Expect(actual.ObjectMeta.Finalizers).To(Equal([]string{"test"})) } @@ -911,7 +910,6 @@ func TestMachinePoolConditions(t *testing.T) { g.Expect(apiextensionsv1.AddToScheme(scheme)).To(Succeed()) g.Expect(clientgoscheme.AddToScheme(scheme)).To(Succeed()) g.Expect(clusterv1.AddToScheme(scheme)).To(Succeed()) - g.Expect(expv1.AddToScheme(scheme)).To(Succeed()) testCluster := &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "test-cluster"}, @@ -958,13 +956,13 @@ func TestMachinePoolConditions(t *testing.T) { } } - machinePool := &expv1.MachinePool{ + machinePool := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "blah", Namespace: metav1.NamespaceDefault, - Finalizers: []string{expv1.MachinePoolFinalizer}, + Finalizers: []string{clusterv1.MachinePoolFinalizer}, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: "test-cluster", Replicas: ptr.To[int32](2), Template: clusterv1.MachineTemplateSpec{ @@ -986,7 +984,7 @@ func TestMachinePoolConditions(t *testing.T) { }, }, }, - Status: expv1.MachinePoolStatus{ + Status: clusterv1.MachinePoolStatus{ Conditions: []metav1.Condition{{ Type: clusterv1.PausedCondition, Status: metav1.ConditionFalse, @@ -1023,14 +1021,14 @@ func TestMachinePoolConditions(t *testing.T) { dataSecretCreated bool infrastructureReady bool expectError bool - beforeFunc func(bootstrap, infra *unstructured.Unstructured, mp *expv1.MachinePool, nodeList *corev1.NodeList) + beforeFunc func(bootstrap, infra *unstructured.Unstructured, mp *clusterv1.MachinePool, nodeList *corev1.NodeList) conditionAssertFunc func(t *testing.T, getter v1beta1conditions.Getter) }{ { name: "all conditions true", dataSecretCreated: true, infrastructureReady: true, - beforeFunc: func(_, _ *unstructured.Unstructured, mp *expv1.MachinePool, _ *corev1.NodeList) { + beforeFunc: func(_, _ *unstructured.Unstructured, mp *clusterv1.MachinePool, _ *corev1.NodeList) { mp.Spec.ProviderIDList = []string{"azure://westus2/id-node-4", "aws://us-east-1/id-node-1"} mp.Status.NodeRefs = []corev1.ObjectReference{ {Name: "node-1"}, @@ -1038,10 +1036,10 @@ func TestMachinePoolConditions(t *testing.T) { } mp.Status.Replicas = ptr.To(int32(2)) if mp.Status.Deprecated == nil { - mp.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{} + mp.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} } if mp.Status.Deprecated.V1Beta1 == nil { - mp.Status.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} + mp.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} } mp.Status.Deprecated.V1Beta1.ReadyReplicas = 2 }, @@ -1059,7 +1057,7 @@ func TestMachinePoolConditions(t *testing.T) { name: "boostrap not ready", dataSecretCreated: false, infrastructureReady: true, - beforeFunc: func(bootstrap, _ *unstructured.Unstructured, _ *expv1.MachinePool, _ *corev1.NodeList) { + beforeFunc: func(bootstrap, _ *unstructured.Unstructured, _ *clusterv1.MachinePool, _ *corev1.NodeList) { addConditionsToExternal(bootstrap, clusterv1.Conditions{ { Type: clusterv1.ReadyV1Beta1Condition, @@ -1100,7 +1098,7 @@ func TestMachinePoolConditions(t *testing.T) { name: "infrastructure not ready", dataSecretCreated: true, infrastructureReady: false, - beforeFunc: func(_, infra *unstructured.Unstructured, _ *expv1.MachinePool, _ *corev1.NodeList) { + beforeFunc: func(_, infra *unstructured.Unstructured, _ *clusterv1.MachinePool, _ *corev1.NodeList) { addConditionsToExternal(infra, clusterv1.Conditions{ { Type: clusterv1.ReadyV1Beta1Condition, @@ -1142,7 +1140,7 @@ func TestMachinePoolConditions(t *testing.T) { name: "incorrect infrastructure reference", dataSecretCreated: true, expectError: true, - beforeFunc: func(_, _ *unstructured.Unstructured, mp *expv1.MachinePool, _ *corev1.NodeList) { + beforeFunc: func(_, _ *unstructured.Unstructured, mp *clusterv1.MachinePool, _ *corev1.NodeList) { mp.Spec.Template.Spec.InfrastructureRef = corev1.ObjectReference{ APIVersion: builder.InfrastructureGroupVersion.String(), Kind: builder.TestInfrastructureMachineTemplateKind, @@ -1182,7 +1180,7 @@ func TestMachinePoolConditions(t *testing.T) { &nodes.Items[1], builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD, - ).WithStatusSubresource(&expv1.MachinePool{}).Build() + ).WithStatusSubresource(&clusterv1.MachinePool{}).Build() r := &MachinePoolReconciler{ Client: clientFake, @@ -1201,7 +1199,7 @@ func TestMachinePoolConditions(t *testing.T) { g.Expect(err).ToNot(HaveOccurred()) } - m := &expv1.MachinePool{} + m := &clusterv1.MachinePool{} machinePoolKey := client.ObjectKeyFromObject(machinePool) g.Expect(r.Client.Get(ctx, machinePoolKey, m)).ToNot(HaveOccurred()) diff --git a/exp/internal/controllers/suite_test.go b/exp/internal/controllers/suite_test.go index 6bd0c63fbe71..70c597ecaf7b 100644 --- a/exp/internal/controllers/suite_test.go +++ b/exp/internal/controllers/suite_test.go @@ -30,8 +30,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/internal/test/envtest" diff --git a/exp/internal/webhooks/machinepool.go b/exp/internal/webhooks/machinepool.go index ff097ea83236..57c4b4a4d14c 100644 --- a/exp/internal/webhooks/machinepool.go +++ b/exp/internal/webhooks/machinepool.go @@ -34,8 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util/version" ) @@ -48,7 +47,7 @@ func (webhook *MachinePool) SetupWebhookWithManager(mgr ctrl.Manager) error { } return ctrl.NewWebhookManagedBy(mgr). - For(&expv1.MachinePool{}). + For(&clusterv1.MachinePool{}). WithDefaulter(webhook). WithValidator(webhook). Complete() @@ -67,7 +66,7 @@ var _ webhook.CustomDefaulter = &MachinePool{} // Default implements webhook.Defaulter so a webhook will be registered for the type. func (webhook *MachinePool) Default(ctx context.Context, obj runtime.Object) error { - m, ok := obj.(*expv1.MachinePool) + m, ok := obj.(*clusterv1.MachinePool) if !ok { return apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", obj)) } @@ -80,9 +79,9 @@ func (webhook *MachinePool) Default(ctx context.Context, obj runtime.Object) err if req.DryRun != nil { dryRun = *req.DryRun } - var oldMP *expv1.MachinePool + var oldMP *clusterv1.MachinePool if req.Operation == v1.Update { - oldMP = &expv1.MachinePool{} + oldMP = &clusterv1.MachinePool{} if err := webhook.decoder.DecodeRaw(req.OldObject, oldMP); err != nil { return errors.Wrapf(err, "failed to decode oldObject to MachinePool") } @@ -124,7 +123,7 @@ func (webhook *MachinePool) Default(ctx context.Context, obj runtime.Object) err // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. func (webhook *MachinePool) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) { - mp, ok := obj.(*expv1.MachinePool) + mp, ok := obj.(*clusterv1.MachinePool) if !ok { return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", obj)) } @@ -134,11 +133,11 @@ func (webhook *MachinePool) ValidateCreate(_ context.Context, obj runtime.Object // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. func (webhook *MachinePool) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) { - oldMP, ok := oldObj.(*expv1.MachinePool) + oldMP, ok := oldObj.(*clusterv1.MachinePool) if !ok { return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", oldObj)) } - newMP, ok := newObj.(*expv1.MachinePool) + newMP, ok := newObj.(*clusterv1.MachinePool) if !ok { return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", newObj)) } @@ -147,7 +146,7 @@ func (webhook *MachinePool) ValidateUpdate(_ context.Context, oldObj, newObj run // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. func (webhook *MachinePool) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error) { - mp, ok := obj.(*expv1.MachinePool) + mp, ok := obj.(*clusterv1.MachinePool) if !ok { return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", obj)) } @@ -155,7 +154,7 @@ func (webhook *MachinePool) ValidateDelete(_ context.Context, obj runtime.Object return nil, webhook.validate(nil, mp) } -func (webhook *MachinePool) validate(oldObj, newObj *expv1.MachinePool) error { +func (webhook *MachinePool) validate(oldObj, newObj *clusterv1.MachinePool) error { // NOTE: MachinePool is behind MachinePool feature gate flag; the web hook // must prevent creating newObj objects when the feature flag is disabled. specPath := field.NewPath("spec") @@ -222,7 +221,7 @@ func (webhook *MachinePool) validate(oldObj, newObj *expv1.MachinePool) error { return apierrors.NewInvalid(clusterv1.GroupVersion.WithKind("MachinePool").GroupKind(), newObj.Name, allErrs) } -func calculateMachinePoolReplicas(ctx context.Context, oldMP *expv1.MachinePool, newMP *expv1.MachinePool, dryRun bool) (int32, error) { +func calculateMachinePoolReplicas(ctx context.Context, oldMP *clusterv1.MachinePool, newMP *clusterv1.MachinePool, dryRun bool) (int32, error) { // If replicas is already set => Keep the current value. if newMP.Spec.Replicas != nil { return *newMP.Spec.Replicas, nil diff --git a/exp/internal/webhooks/machinepool_test.go b/exp/internal/webhooks/machinepool_test.go index f46f959a8e6a..d9096c737a5e 100644 --- a/exp/internal/webhooks/machinepool_test.go +++ b/exp/internal/webhooks/machinepool_test.go @@ -28,8 +28,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/webhooks/util" ) @@ -38,11 +37,11 @@ var ctx = ctrl.SetupSignalHandler() func TestMachinePoolDefault(t *testing.T) { g := NewWithT(t) - mp := &expv1.MachinePool{ + mp := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Namespace: "foobar", }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ConfigRef: &corev1.ObjectReference{}}, @@ -67,15 +66,15 @@ func TestMachinePoolDefault(t *testing.T) { func TestCalculateMachinePoolReplicas(t *testing.T) { tests := []struct { name string - newMP *expv1.MachinePool - oldMP *expv1.MachinePool + newMP *clusterv1.MachinePool + oldMP *clusterv1.MachinePool expectedReplicas int32 expectErr bool }{ { name: "if new MP has replicas set, keep that value", - newMP: &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + newMP: &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](5), }, }, @@ -83,12 +82,12 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, { name: "if new MP does not have replicas set and no annotations, use 1", - newMP: &expv1.MachinePool{}, + newMP: &clusterv1.MachinePool{}, expectedReplicas: 1, }, { name: "if new MP only has min size annotation, fallback to 1", - newMP: &expv1.MachinePool{ + newMP: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ clusterv1.AutoscalerMinSizeAnnotation: "3", @@ -99,7 +98,7 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, { name: "if new MP only has max size annotation, fallback to 1", - newMP: &expv1.MachinePool{ + newMP: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ clusterv1.AutoscalerMaxSizeAnnotation: "7", @@ -110,7 +109,7 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, { name: "if new MP has min and max size annotation and min size is invalid, fail", - newMP: &expv1.MachinePool{ + newMP: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ clusterv1.AutoscalerMinSizeAnnotation: "abc", @@ -122,7 +121,7 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, { name: "if new MP has min and max size annotation and max size is invalid, fail", - newMP: &expv1.MachinePool{ + newMP: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ clusterv1.AutoscalerMinSizeAnnotation: "3", @@ -134,7 +133,7 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, { name: "if new MP has min and max size annotation and new MP is a new MP, use min size", - newMP: &expv1.MachinePool{ + newMP: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ clusterv1.AutoscalerMinSizeAnnotation: "3", @@ -146,7 +145,7 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, { name: "if new MP has min and max size annotation and old MP doesn't have replicas set, use min size", - newMP: &expv1.MachinePool{ + newMP: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ clusterv1.AutoscalerMinSizeAnnotation: "3", @@ -154,12 +153,12 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, }, }, - oldMP: &expv1.MachinePool{}, + oldMP: &clusterv1.MachinePool{}, expectedReplicas: 3, }, { name: "if new MP has min and max size annotation and old MP replicas is below min size, use min size", - newMP: &expv1.MachinePool{ + newMP: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ clusterv1.AutoscalerMinSizeAnnotation: "3", @@ -167,8 +166,8 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, }, }, - oldMP: &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + oldMP: &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](1), }, }, @@ -176,7 +175,7 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, { name: "if new MP has min and max size annotation and old MP replicas is above max size, use max size", - newMP: &expv1.MachinePool{ + newMP: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ clusterv1.AutoscalerMinSizeAnnotation: "3", @@ -184,8 +183,8 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, }, }, - oldMP: &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + oldMP: &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](15), }, }, @@ -193,7 +192,7 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, { name: "if new MP has min and max size annotation and old MP replicas is between min and max size, use old MP replicas", - newMP: &expv1.MachinePool{ + newMP: &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ clusterv1.AutoscalerMinSizeAnnotation: "3", @@ -201,8 +200,8 @@ func TestCalculateMachinePoolReplicas(t *testing.T) { }, }, }, - oldMP: &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + oldMP: &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ptr.To[int32](4), }, }, @@ -254,8 +253,8 @@ func TestMachinePoolBootstrapValidation(t *testing.T) { t.Run(tt.name, func(t *testing.T) { g := NewWithT(t) webhook := &MachinePool{} - mp := &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + mp := &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ Bootstrap: tt.bootstrap, @@ -326,9 +325,9 @@ func TestMachinePoolNamespaceValidation(t *testing.T) { g := NewWithT(t) webhook := &MachinePool{} - mp := &expv1.MachinePool{ + mp := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{Namespace: tt.namespace}, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ Bootstrap: tt.bootstrap, @@ -382,8 +381,8 @@ func TestMachinePoolClusterNameImmutable(t *testing.T) { t.Run(tt.name, func(t *testing.T) { g := NewWithT(t) - newMP := &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + newMP := &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: tt.newClusterName, Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -393,8 +392,8 @@ func TestMachinePoolClusterNameImmutable(t *testing.T) { }, } - oldMP := &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + oldMP := &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: tt.oldClusterName, Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -449,8 +448,8 @@ func TestMachinePoolVersionValidation(t *testing.T) { t.Run(tt.name, func(t *testing.T) { g := NewWithT(t) - mp := &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + mp := &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ Bootstrap: clusterv1.Bootstrap{ConfigRef: &corev1.ObjectReference{}}, @@ -504,8 +503,8 @@ func TestMachinePoolMetadataValidation(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { g := NewWithT(t) - mp := &expv1.MachinePool{ - Spec: expv1.MachinePoolSpec{ + mp := &clusterv1.MachinePool{ + Spec: clusterv1.MachinePoolSpec{ Template: clusterv1.MachineTemplateSpec{ ObjectMeta: clusterv1.ObjectMeta{ Labels: tt.labels, diff --git a/exp/ipam/internal/webhooks/ipaddress.go b/exp/ipam/internal/webhooks/ipaddress.go index 131de59830dd..bbed23b89db5 100644 --- a/exp/ipam/internal/webhooks/ipaddress.go +++ b/exp/ipam/internal/webhooks/ipaddress.go @@ -32,7 +32,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" "sigs.k8s.io/cluster-api/internal/util/compare" ) diff --git a/exp/ipam/internal/webhooks/ipaddress_test.go b/exp/ipam/internal/webhooks/ipaddress_test.go index 30655c984cb8..a5175f310f88 100644 --- a/exp/ipam/internal/webhooks/ipaddress_test.go +++ b/exp/ipam/internal/webhooks/ipaddress_test.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" ) func TestIPAddressValidateCreate(t *testing.T) { diff --git a/exp/ipam/internal/webhooks/ipaddressclaim.go b/exp/ipam/internal/webhooks/ipaddressclaim.go index c769b357a684..7e9744db2225 100644 --- a/exp/ipam/internal/webhooks/ipaddressclaim.go +++ b/exp/ipam/internal/webhooks/ipaddressclaim.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" "sigs.k8s.io/cluster-api/internal/util/compare" ) diff --git a/exp/ipam/internal/webhooks/ipaddressclaim_test.go b/exp/ipam/internal/webhooks/ipaddressclaim_test.go index 41fb4de4fb40..f39f66e1b60c 100644 --- a/exp/ipam/internal/webhooks/ipaddressclaim_test.go +++ b/exp/ipam/internal/webhooks/ipaddressclaim_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" ) func TestIPAddressClaimValidateCreate(t *testing.T) { diff --git a/exp/runtime/api/.import-restrictions b/exp/runtime/api/.import-restrictions deleted file mode 100644 index f6f10b3ff544..000000000000 --- a/exp/runtime/api/.import-restrictions +++ /dev/null @@ -1,5 +0,0 @@ -rules: - - selectorRegexp: sigs[.]k8s[.]io/controller-runtime - allowedPrefixes: - - "sigs.k8s.io/controller-runtime/pkg/conversion" - forbiddenPrefixes: [] diff --git a/exp/runtime/api/v1beta2/.import-restrictions b/exp/runtime/api/v1beta2/.import-restrictions deleted file mode 100644 index a2e1dfd08133..000000000000 --- a/exp/runtime/api/v1beta2/.import-restrictions +++ /dev/null @@ -1,5 +0,0 @@ -rules: - - selectorRegexp: sigs[.]k8s[.]io/controller-runtime - allowedPrefixes: [] - forbiddenPrefixes: - - "sigs.k8s.io/controller-runtime" diff --git a/exp/runtime/client/client.go b/exp/runtime/client/client.go index 7bc0120cb8a1..3fb39f763414 100644 --- a/exp/runtime/client/client.go +++ b/exp/runtime/client/client.go @@ -22,9 +22,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/util/cache" ) diff --git a/exp/runtime/internal/controllers/extensionconfig_controller.go b/exp/runtime/internal/controllers/extensionconfig_controller.go index 4606b8d51972..d85730c41c7a 100644 --- a/exp/runtime/internal/controllers/extensionconfig_controller.go +++ b/exp/runtime/internal/controllers/extensionconfig_controller.go @@ -36,8 +36,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" "sigs.k8s.io/cluster-api/util/conditions" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" diff --git a/exp/runtime/internal/controllers/extensionconfig_controller_test.go b/exp/runtime/internal/controllers/extensionconfig_controller_test.go index 9066bdefa01a..65a14e107b63 100644 --- a/exp/runtime/internal/controllers/extensionconfig_controller_test.go +++ b/exp/runtime/internal/controllers/extensionconfig_controller_test.go @@ -37,10 +37,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/feature" internalruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client" runtimeregistry "sigs.k8s.io/cluster-api/internal/runtime/registry" diff --git a/exp/runtime/internal/controllers/index.go b/exp/runtime/internal/controllers/index.go index 944375c3208f..34598daeb79a 100644 --- a/exp/runtime/internal/controllers/index.go +++ b/exp/runtime/internal/controllers/index.go @@ -24,7 +24,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" ) const ( diff --git a/exp/runtime/internal/controllers/index_test.go b/exp/runtime/internal/controllers/index_test.go index 9fec2ee2029b..6fcbf2c55e85 100644 --- a/exp/runtime/internal/controllers/index_test.go +++ b/exp/runtime/internal/controllers/index_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" ) func TestExtensionConfigByInjectCAFromSecretName(t *testing.T) { diff --git a/exp/runtime/internal/controllers/suite_test.go b/exp/runtime/internal/controllers/suite_test.go index fd59dddb7107..60cee94f1b5c 100644 --- a/exp/runtime/internal/controllers/suite_test.go +++ b/exp/runtime/internal/controllers/suite_test.go @@ -29,8 +29,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/internal/test/envtest" ) diff --git a/exp/runtime/internal/controllers/warmup.go b/exp/runtime/internal/controllers/warmup.go index 4298c58365d6..a7d090e13511 100644 --- a/exp/runtime/internal/controllers/warmup.go +++ b/exp/runtime/internal/controllers/warmup.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/manager" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" ) diff --git a/exp/runtime/internal/controllers/warmup_test.go b/exp/runtime/internal/controllers/warmup_test.go index d4df2b770dc0..94a76d0f1e98 100644 --- a/exp/runtime/internal/controllers/warmup_test.go +++ b/exp/runtime/internal/controllers/warmup_test.go @@ -27,9 +27,9 @@ import ( "k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts" utilfeature "k8s.io/component-base/featuregate/testing" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/feature" internalruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client" runtimeregistry "sigs.k8s.io/cluster-api/internal/runtime/registry" diff --git a/exp/runtime/server/server.go b/exp/runtime/server/server.go index d9af20b7e680..0663b86a529e 100644 --- a/exp/runtime/server/server.go +++ b/exp/runtime/server/server.go @@ -34,8 +34,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" ) // DefaultPort is the default port that the webhook server serves. diff --git a/exp/runtime/topologymutation/variables.go b/exp/runtime/topologymutation/variables.go index a3e5ec408bba..525835909772 100644 --- a/exp/runtime/topologymutation/variables.go +++ b/exp/runtime/topologymutation/variables.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" patchvariables "sigs.k8s.io/cluster-api/internal/controllers/topology/cluster/patches/variables" ) diff --git a/exp/runtime/topologymutation/variables_test.go b/exp/runtime/topologymutation/variables_test.go index a21f790a9168..cc171de0135d 100644 --- a/exp/runtime/topologymutation/variables_test.go +++ b/exp/runtime/topologymutation/variables_test.go @@ -23,7 +23,7 @@ import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/utils/ptr" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" ) func Test_GetRawTemplateVariable(t *testing.T) { diff --git a/exp/runtime/topologymutation/walker.go b/exp/runtime/topologymutation/walker.go index 3f37d691a284..6cef32db56ab 100644 --- a/exp/runtime/topologymutation/walker.go +++ b/exp/runtime/topologymutation/walker.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ctrl "sigs.k8s.io/controller-runtime" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" ) // WalkTemplatesOption is some configuration that modifies WalkTemplates behavior. diff --git a/exp/runtime/topologymutation/walker_test.go b/exp/runtime/topologymutation/walker_test.go index 613797f63afd..fad450a60ef7 100644 --- a/exp/runtime/topologymutation/walker_test.go +++ b/exp/runtime/topologymutation/walker_test.go @@ -30,9 +30,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/types" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" ) var ( diff --git a/exp/topology/desiredstate/desired_state.go b/exp/topology/desiredstate/desired_state.go index 3f2308a37e1c..97b3cca45a04 100644 --- a/exp/topology/desiredstate/desired_state.go +++ b/exp/topology/desiredstate/desired_state.go @@ -33,14 +33,13 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/contract" @@ -1125,16 +1124,16 @@ func (g *generator) computeMachinePool(_ context.Context, s *scope.Scope, machin return nil, errors.Wrap(err, "failed to generate name for MachinePool") } - desiredMachinePoolObj := &expv1.MachinePool{ + desiredMachinePoolObj := &clusterv1.MachinePool{ TypeMeta: metav1.TypeMeta{ - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), Kind: "MachinePool", }, ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: s.Current.Cluster.Namespace, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: s.Current.Cluster.Name, FailureDomains: failureDomains, Template: clusterv1.MachineTemplateSpec{ diff --git a/exp/topology/desiredstate/desired_state_test.go b/exp/topology/desiredstate/desired_state_test.go index ce0862a97bed..7a229320da41 100644 --- a/exp/topology/desiredstate/desired_state_test.go +++ b/exp/topology/desiredstate/desired_state_test.go @@ -36,11 +36,10 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/contract" @@ -62,7 +61,6 @@ func init() { _ = clientgoscheme.AddToScheme(fakeScheme) _ = clusterv1.AddToScheme(fakeScheme) _ = apiextensionsv1.AddToScheme(fakeScheme) - _ = expv1.AddToScheme(fakeScheme) _ = corev1.AddToScheme(fakeScheme) } @@ -2095,11 +2093,11 @@ func TestComputeMachinePool(t *testing.T) { s.Blueprint = blueprint currentReplicas := int32(3) - currentMp := &expv1.MachinePool{ + currentMp := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "existing-pool-1", }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ Replicas: ¤tReplicas, Template: clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ @@ -2254,11 +2252,11 @@ func TestComputeMachinePool(t *testing.T) { mp := builder.MachinePool("test-namespace", "big-pool-of-machines"). WithReplicas(2). WithVersion(*tt.currentMPVersion). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ ObservedGeneration: 2, Replicas: ptr.To(int32(2)), - Deprecated: &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + Deprecated: &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: 2, AvailableReplicas: 2, }, diff --git a/exp/topology/scope/blueprint.go b/exp/topology/scope/blueprint.go index 502848bd44da..68d5e6fc9c9d 100644 --- a/exp/topology/scope/blueprint.go +++ b/exp/topology/scope/blueprint.go @@ -19,7 +19,7 @@ package scope import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // ClusterBlueprint holds all the objects required for computing the desired state of a managed Cluster topology, diff --git a/exp/topology/scope/blueprint_test.go b/exp/topology/scope/blueprint_test.go index f4f381b3654a..a2a531a3351e 100644 --- a/exp/topology/scope/blueprint_test.go +++ b/exp/topology/scope/blueprint_test.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/exp/topology/scope/hookresponsetracker.go b/exp/topology/scope/hookresponsetracker.go index cf7cb2ca7473..e822961fda60 100644 --- a/exp/topology/scope/hookresponsetracker.go +++ b/exp/topology/scope/hookresponsetracker.go @@ -21,8 +21,8 @@ import ( "strings" "time" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/util" ) diff --git a/exp/topology/scope/hookresponsetracker_test.go b/exp/topology/scope/hookresponsetracker_test.go index 6ced86ba9189..797f0b46c36c 100644 --- a/exp/topology/scope/hookresponsetracker_test.go +++ b/exp/topology/scope/hookresponsetracker_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" ) func TestHookResponseTracker_AggregateRetryAfter(t *testing.T) { diff --git a/exp/topology/scope/scope.go b/exp/topology/scope/scope.go index 1f789e70841a..3e3827e78a42 100644 --- a/exp/topology/scope/scope.go +++ b/exp/topology/scope/scope.go @@ -19,7 +19,7 @@ package scope import ( "strconv" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // Scope holds all the information to process a request in the topology/ClusterReconciler controller. diff --git a/exp/topology/scope/scope_test.go b/exp/topology/scope/scope_test.go index d810a6b68cd7..a10fc9b2b50d 100644 --- a/exp/topology/scope/scope_test.go +++ b/exp/topology/scope/scope_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestNew(t *testing.T) { diff --git a/exp/topology/scope/state.go b/exp/topology/scope/state.go index ad1ce682cf27..e9a2f4e5063d 100644 --- a/exp/topology/scope/state.go +++ b/exp/topology/scope/state.go @@ -23,8 +23,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/topology/check" ) @@ -125,7 +124,7 @@ func (mps MachinePoolsStateMap) Upgrading(ctx context.Context, c client.Reader) // MachinePoolState holds all the objects representing the state of a managed pool. type MachinePoolState struct { // Object holds the MachinePool object. - Object *expv1.MachinePool + Object *clusterv1.MachinePool // BootstrapObject holds the MachinePool bootstrap object. BootstrapObject *unstructured.Unstructured diff --git a/exp/topology/scope/state_test.go b/exp/topology/scope/state_test.go index 36d1a0b30c50..6794f2ab07b5 100644 --- a/exp/topology/scope/state_test.go +++ b/exp/topology/scope/state_test.go @@ -26,8 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) @@ -75,7 +74,7 @@ func TestMDUpgrading(t *testing.T) { func TestMPUpgrading(t *testing.T) { g := NewWithT(t) scheme := runtime.NewScheme() - g.Expect(expv1.AddToScheme(scheme)).To(Succeed()) + g.Expect(clusterv1.AddToScheme(scheme)).To(Succeed()) g.Expect(corev1.AddToScheme(scheme)).To(Succeed()) ctx := context.Background() @@ -84,7 +83,7 @@ func TestMPUpgrading(t *testing.T) { stableMP := builder.MachinePool("ns", "stableMP"). WithClusterName("cluster1"). WithVersion("v1.2.3"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ { Name: "stableMP-node1", @@ -103,7 +102,7 @@ func TestMPUpgrading(t *testing.T) { upgradingMP := builder.MachinePool("ns", "upgradingMP"). WithClusterName("cluster2"). WithVersion("v1.2.3"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ { Name: "upgradingMP-node1", diff --git a/exp/util/suite_test.go b/exp/util/suite_test.go index 5645ebce2eaa..0cdb28e7f389 100644 --- a/exp/util/suite_test.go +++ b/exp/util/suite_test.go @@ -20,7 +20,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( @@ -29,5 +29,5 @@ var ( ) func init() { - _ = expv1.AddToScheme(fakeScheme) + _ = clusterv1.AddToScheme(fakeScheme) } diff --git a/exp/util/util.go b/exp/util/util.go index aaf18487a108..8c3da719eb12 100644 --- a/exp/util/util.go +++ b/exp/util/util.go @@ -29,13 +29,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/labels/format" ) // GetOwnerMachinePool returns the MachinePool objects owning the current resource. -func GetOwnerMachinePool(ctx context.Context, c client.Client, obj metav1.ObjectMeta) (*expv1.MachinePool, error) { +func GetOwnerMachinePool(ctx context.Context, c client.Client, obj metav1.ObjectMeta) (*clusterv1.MachinePool, error) { for _, ref := range obj.GetOwnerReferences() { if ref.Kind != "MachinePool" { continue @@ -44,7 +43,7 @@ func GetOwnerMachinePool(ctx context.Context, c client.Client, obj metav1.Object if err != nil { return nil, errors.WithStack(err) } - if gv.Group == expv1.GroupVersion.Group { + if gv.Group == clusterv1.GroupVersion.Group { return GetMachinePoolByName(ctx, c, obj.Namespace, ref.Name) } } @@ -52,8 +51,8 @@ func GetOwnerMachinePool(ctx context.Context, c client.Client, obj metav1.Object } // GetMachinePoolByName finds and returns a MachinePool object using the specified params. -func GetMachinePoolByName(ctx context.Context, c client.Client, namespace, name string) (*expv1.MachinePool, error) { - m := &expv1.MachinePool{} +func GetMachinePoolByName(ctx context.Context, c client.Client, namespace, name string) (*clusterv1.MachinePool, error) { + m := &clusterv1.MachinePool{} key := client.ObjectKey{Name: name, Namespace: namespace} if err := c.Get(ctx, key, m); err != nil { return nil, err @@ -63,14 +62,14 @@ func GetMachinePoolByName(ctx context.Context, c client.Client, namespace, name // GetMachinePoolByLabels finds and returns a MachinePool object using the value of clusterv1.MachinePoolNameLabel. // This differs from GetMachinePoolByName as the label value can be a hash. -func GetMachinePoolByLabels(ctx context.Context, c client.Client, namespace string, labels map[string]string) (*expv1.MachinePool, error) { +func GetMachinePoolByLabels(ctx context.Context, c client.Client, namespace string, labels map[string]string) (*clusterv1.MachinePool, error) { selector := map[string]string{} if clusterName, ok := labels[clusterv1.ClusterNameLabel]; ok { selector = map[string]string{clusterv1.ClusterNameLabel: clusterName} } if poolNameHash, ok := labels[clusterv1.MachinePoolNameLabel]; ok { - machinePoolList := &expv1.MachinePoolList{} + machinePoolList := &clusterv1.MachinePoolList{} if err := c.List(ctx, machinePoolList, client.InNamespace(namespace), client.MatchingLabels(selector)); err != nil { return nil, errors.Wrapf(err, "failed to list MachinePools using labels %v", selector) } @@ -92,7 +91,7 @@ func GetMachinePoolByLabels(ctx context.Context, c client.Client, namespace stri func MachinePoolToInfrastructureMapFunc(ctx context.Context, gvk schema.GroupVersionKind) handler.MapFunc { log := ctrl.LoggerFrom(ctx) return func(_ context.Context, o client.Object) []reconcile.Request { - m, ok := o.(*expv1.MachinePool) + m, ok := o.(*clusterv1.MachinePool) if !ok { log.V(4).Info("Not a machine pool", "Object", klog.KObj(o)) return nil diff --git a/exp/util/util_test.go b/exp/util/util_test.go index 72d389b36c71..ff2a546d21ee 100644 --- a/exp/util/util_test.go +++ b/exp/util/util_test.go @@ -26,8 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/labels/format" ) @@ -50,13 +49,13 @@ func TestGetMachinePoolByLabels(t *testing.T) { clusterv1.MachinePoolNameLabel: "test-pool", }, machinePools: []client.Object{ - &expv1.MachinePool{ + &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pool", Namespace: "default", }, }, - &expv1.MachinePool{ + &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "other-pool", Namespace: "default", @@ -72,7 +71,7 @@ func TestGetMachinePoolByLabels(t *testing.T) { clusterv1.ClusterNameLabel: "test-cluster", }, machinePools: []client.Object{ - &expv1.MachinePool{ + &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pool", Namespace: "default", @@ -81,7 +80,7 @@ func TestGetMachinePoolByLabels(t *testing.T) { }, }, }, - &expv1.MachinePool{ + &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "other-pool", Namespace: "default", @@ -99,13 +98,13 @@ func TestGetMachinePoolByLabels(t *testing.T) { clusterv1.MachinePoolNameLabel: format.MustFormatValue(longMachinePoolName), }, machinePools: []client.Object{ - &expv1.MachinePool{ + &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: longMachinePoolName, Namespace: "default", }, }, - &expv1.MachinePool{ + &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: "other-pool", Namespace: "default", diff --git a/hack/tools/internal/tilt-prepare/main.go b/hack/tools/internal/tilt-prepare/main.go index b32a98a9bebf..a747a680f3a7 100644 --- a/hack/tools/internal/tilt-prepare/main.go +++ b/hack/tools/internal/tilt-prepare/main.go @@ -51,7 +51,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/kustomize/api/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" 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/hack/tools/runtime-openapi-gen/main.go b/hack/tools/runtime-openapi-gen/main.go index bef883420f13..5313c4433cd5 100644 --- a/hack/tools/runtime-openapi-gen/main.go +++ b/hack/tools/runtime-openapi-gen/main.go @@ -26,10 +26,10 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/yaml" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" ) var ( diff --git a/hack/verify-import-restrictions.sh b/hack/verify-import-restrictions.sh index 9112b924e1ad..a1a3fadf21fe 100755 --- a/hack/verify-import-restrictions.sh +++ b/hack/verify-import-restrictions.sh @@ -30,8 +30,8 @@ sub_packages=( "bootstrap/kubeadm/api" "cmd/clusterctl/api" "controlplane/kubeadm/api" - "exp/ipam/api" - "exp/runtime/api" + "api/ipam" + "api/runtime" "test/infrastructure/docker/api" "test/infrastructure/docker/exp/api" "test/infrastructure/inmemory/api" diff --git a/internal/apis/bootstrap/kubeadm/v1alpha3/conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha3/conversion.go index c27b092ecf55..85ee9ae21143 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha3/conversion.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha3/conversion.go @@ -21,7 +21,7 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" clusterv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" utilconversion "sigs.k8s.io/cluster-api/util/conversion" diff --git a/internal/apis/bootstrap/kubeadm/v1alpha3/conversion_test.go b/internal/apis/bootstrap/kubeadm/v1alpha3/conversion_test.go index d46e5fd451bb..d2cc9db515ef 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha3/conversion_test.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha3/conversion_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/internal/apis/bootstrap/kubeadm/v1alpha3/doc.go b/internal/apis/bootstrap/kubeadm/v1alpha3/doc.go index fba33f1b5ad4..231634076276 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha3/doc.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha3/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2 // // Deprecated: This package will be removed in one of the next releases. package v1alpha3 diff --git a/internal/apis/bootstrap/kubeadm/v1alpha3/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha3/zz_generated.conversion.go index ec8fcf4434d1..dd366c2c1f75 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha3/zz_generated.conversion.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha3/zz_generated.conversion.go @@ -27,7 +27,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1beta2 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" upstreamv1beta1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" corev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" ) diff --git a/internal/apis/bootstrap/kubeadm/v1alpha3/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha3/zz_generated.deepcopy.go index 4e494d3b2207..36e81f1b627c 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha3/zz_generated.deepcopy.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha3/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1alpha3 import ( - "k8s.io/apimachinery/pkg/runtime" + runtime "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" - apiv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" + corev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -280,7 +280,7 @@ func (in *KubeadmConfigStatus) DeepCopyInto(out *KubeadmConfigStatus) { } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) + *out = make(corev1alpha3.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/conversion.go index 2fe01b17013c..211d105d57e5 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha4/conversion.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha4/conversion.go @@ -21,7 +21,7 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" clusterv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/conversion_test.go b/internal/apis/bootstrap/kubeadm/v1alpha4/conversion_test.go index a81927f15730..9b2f792f5fab 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha4/conversion_test.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha4/conversion_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/doc.go b/internal/apis/bootstrap/kubeadm/v1alpha4/doc.go index e51fe3200b17..a629544b0080 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha4/doc.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha4/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1alpha4 contains the v1alpha4 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2 // // Deprecated: This package will be removed in one of the next releases. package v1alpha4 diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go index 7a0a443c8511..32b3077d2dab 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go +++ b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go @@ -28,7 +28,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1beta2 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" corev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" ) diff --git a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go index dbae328d9f50..9f86103b5e22 100644 --- a/internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.deepcopy.go +++ b/internal/apis/bootstrap/kubeadm/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/internal/apis/core/v1alpha4" + corev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" ) // 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(corev1alpha4.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/internal/apis/controlplane/kubeadm/v1alpha3/conversion.go b/internal/apis/controlplane/kubeadm/v1alpha3/conversion.go index aae0a47bad70..f645ad11c559 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha3/conversion.go +++ b/internal/apis/controlplane/kubeadm/v1alpha3/conversion.go @@ -21,8 +21,8 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" bootstrapv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha3" clusterv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" utilconversion "sigs.k8s.io/cluster-api/util/conversion" diff --git a/internal/apis/controlplane/kubeadm/v1alpha3/conversion_test.go b/internal/apis/controlplane/kubeadm/v1alpha3/conversion_test.go index fa098474e533..e7b68ae50a3e 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha3/conversion_test.go +++ b/internal/apis/controlplane/kubeadm/v1alpha3/conversion_test.go @@ -27,9 +27,9 @@ import ( runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/utils/ptr" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" bootstrapv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha3" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/internal/apis/controlplane/kubeadm/v1alpha3/doc.go b/internal/apis/controlplane/kubeadm/v1alpha3/doc.go index 32a0ea198861..8bfc76881db3 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha3/doc.go +++ b/internal/apis/controlplane/kubeadm/v1alpha3/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2 // // Deprecated: This package will be removed in one of the next releases. package v1alpha3 diff --git a/internal/apis/controlplane/kubeadm/v1alpha3/zz_generated.conversion.go b/internal/apis/controlplane/kubeadm/v1alpha3/zz_generated.conversion.go index 21b3648529ac..8e16b2ed50fb 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha3/zz_generated.conversion.go +++ b/internal/apis/controlplane/kubeadm/v1alpha3/zz_generated.conversion.go @@ -28,8 +28,8 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" - apiv1beta2 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - v1beta2 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + kubeadmv1beta2 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" kubeadmv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha3" corev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" ) @@ -91,8 +91,8 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*kubeadmv1alpha3.KubeadmConfigSpec)(nil), (*apiv1beta2.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_KubeadmConfigSpec_To_v1beta2_KubeadmConfigSpec(a.(*kubeadmv1alpha3.KubeadmConfigSpec), b.(*apiv1beta2.KubeadmConfigSpec), scope) + if err := s.AddConversionFunc((*kubeadmv1alpha3.KubeadmConfigSpec)(nil), (*kubeadmv1beta2.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_KubeadmConfigSpec_To_v1beta2_KubeadmConfigSpec(a.(*kubeadmv1alpha3.KubeadmConfigSpec), b.(*kubeadmv1beta2.KubeadmConfigSpec), scope) }); err != nil { return err } @@ -106,8 +106,8 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*apiv1beta2.KubeadmConfigSpec)(nil), (*kubeadmv1alpha3.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(a.(*apiv1beta2.KubeadmConfigSpec), b.(*kubeadmv1alpha3.KubeadmConfigSpec), scope) + if err := s.AddConversionFunc((*kubeadmv1beta2.KubeadmConfigSpec)(nil), (*kubeadmv1alpha3.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_KubeadmConfigSpec_To_v1alpha3_KubeadmConfigSpec(a.(*kubeadmv1beta2.KubeadmConfigSpec), b.(*kubeadmv1alpha3.KubeadmConfigSpec), scope) }); err != nil { return err } diff --git a/internal/apis/controlplane/kubeadm/v1alpha3/zz_generated.deepcopy.go b/internal/apis/controlplane/kubeadm/v1alpha3/zz_generated.deepcopy.go index 01589af55c3b..629a3e745b42 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha3/zz_generated.deepcopy.go +++ b/internal/apis/controlplane/kubeadm/v1alpha3/zz_generated.deepcopy.go @@ -22,9 +22,9 @@ package v1alpha3 import ( "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" + runtime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" - apiv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" + corev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -132,7 +132,7 @@ func (in *KubeadmControlPlaneStatus) DeepCopyInto(out *KubeadmControlPlaneStatus } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) + *out = make(corev1alpha3.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/internal/apis/controlplane/kubeadm/v1alpha4/conversion.go b/internal/apis/controlplane/kubeadm/v1alpha4/conversion.go index d28b9077db92..9c517a318143 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha4/conversion.go +++ b/internal/apis/controlplane/kubeadm/v1alpha4/conversion.go @@ -21,9 +21,9 @@ import ( apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" bootstrapv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha4" clusterv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" utilconversion "sigs.k8s.io/cluster-api/util/conversion" diff --git a/internal/apis/controlplane/kubeadm/v1alpha4/conversion_test.go b/internal/apis/controlplane/kubeadm/v1alpha4/conversion_test.go index ff1e557eef84..346cf4686f4e 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha4/conversion_test.go +++ b/internal/apis/controlplane/kubeadm/v1alpha4/conversion_test.go @@ -28,8 +28,8 @@ import ( runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/utils/ptr" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" bootstrapv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha4" clusterv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" utilconversion "sigs.k8s.io/cluster-api/util/conversion" diff --git a/internal/apis/controlplane/kubeadm/v1alpha4/doc.go b/internal/apis/controlplane/kubeadm/v1alpha4/doc.go index 21c1a244c652..2d2ff0be4d53 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha4/doc.go +++ b/internal/apis/controlplane/kubeadm/v1alpha4/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1alpha4 contains the v1alpha4 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2 // // Deprecated: This package will be removed in one of the next releases. package v1alpha4 diff --git a/internal/apis/controlplane/kubeadm/v1alpha4/zz_generated.conversion.go b/internal/apis/controlplane/kubeadm/v1alpha4/zz_generated.conversion.go index de2778eddbad..ab87335bd7d6 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha4/zz_generated.conversion.go +++ b/internal/apis/controlplane/kubeadm/v1alpha4/zz_generated.conversion.go @@ -28,9 +28,9 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" - clusterapiapiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" - apiv1beta2 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - v1beta2 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + kubeadmv1beta2 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + corev1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" kubeadmv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha4" corev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" ) @@ -137,8 +137,8 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*kubeadmv1alpha4.KubeadmConfigSpec)(nil), (*apiv1beta2.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_KubeadmConfigSpec_To_v1beta2_KubeadmConfigSpec(a.(*kubeadmv1alpha4.KubeadmConfigSpec), b.(*apiv1beta2.KubeadmConfigSpec), scope) + if err := s.AddConversionFunc((*kubeadmv1alpha4.KubeadmConfigSpec)(nil), (*kubeadmv1beta2.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_KubeadmConfigSpec_To_v1beta2_KubeadmConfigSpec(a.(*kubeadmv1alpha4.KubeadmConfigSpec), b.(*kubeadmv1beta2.KubeadmConfigSpec), scope) }); err != nil { return err } @@ -152,13 +152,13 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*corev1alpha4.ObjectMeta)(nil), (*clusterapiapiv1beta2.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ObjectMeta_To_v1beta2_ObjectMeta(a.(*corev1alpha4.ObjectMeta), b.(*clusterapiapiv1beta2.ObjectMeta), scope) + if err := s.AddConversionFunc((*corev1alpha4.ObjectMeta)(nil), (*corev1beta2.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_ObjectMeta_To_v1beta2_ObjectMeta(a.(*corev1alpha4.ObjectMeta), b.(*corev1beta2.ObjectMeta), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*apiv1beta2.KubeadmConfigSpec)(nil), (*kubeadmv1alpha4.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(a.(*apiv1beta2.KubeadmConfigSpec), b.(*kubeadmv1alpha4.KubeadmConfigSpec), scope) + if err := s.AddConversionFunc((*kubeadmv1beta2.KubeadmConfigSpec)(nil), (*kubeadmv1alpha4.KubeadmConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_KubeadmConfigSpec_To_v1alpha4_KubeadmConfigSpec(a.(*kubeadmv1beta2.KubeadmConfigSpec), b.(*kubeadmv1alpha4.KubeadmConfigSpec), scope) }); err != nil { return err } @@ -187,8 +187,8 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddConversionFunc((*clusterapiapiv1beta2.ObjectMeta)(nil), (*corev1alpha4.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_ObjectMeta_To_v1alpha4_ObjectMeta(a.(*clusterapiapiv1beta2.ObjectMeta), b.(*corev1alpha4.ObjectMeta), scope) + if err := s.AddConversionFunc((*corev1beta2.ObjectMeta)(nil), (*corev1alpha4.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ObjectMeta_To_v1alpha4_ObjectMeta(a.(*corev1beta2.ObjectMeta), b.(*corev1alpha4.ObjectMeta), scope) }); err != nil { return err } diff --git a/internal/apis/controlplane/kubeadm/v1alpha4/zz_generated.deepcopy.go b/internal/apis/controlplane/kubeadm/v1alpha4/zz_generated.deepcopy.go index 8053e072b76d..c2630c8d95c3 100644 --- a/internal/apis/controlplane/kubeadm/v1alpha4/zz_generated.deepcopy.go +++ b/internal/apis/controlplane/kubeadm/v1alpha4/zz_generated.deepcopy.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" - apiv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" + corev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -154,7 +154,7 @@ func (in *KubeadmControlPlaneStatus) DeepCopyInto(out *KubeadmControlPlaneStatus } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) + *out = make(corev1alpha4.Conditions, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/internal/apis/core/exp/v1alpha3/condition_consts.go b/internal/apis/core/exp/v1alpha3/condition_consts.go deleted file mode 100644 index 839771c271b3..000000000000 --- a/internal/apis/core/exp/v1alpha3/condition_consts.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -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 v1alpha3 - -import clusterv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" - -// Conditions and condition Reasons for the MachinePool object. - -const ( - // ReplicasReadyCondition reports an aggregate of current status of the replicas controlled by the MachinePool. - ReplicasReadyCondition clusterv1alpha3.ConditionType = "ReplicasReady" - - // WaitingForReplicasReadyReason (Severity=Info) documents a machinepool waiting for the required replicas - // to be ready. - WaitingForReplicasReadyReason = "WaitingForReplicasReady" -) diff --git a/internal/apis/core/exp/v1alpha3/conversion.go b/internal/apis/core/exp/v1alpha3/conversion.go deleted file mode 100644 index b61331a6f4f3..000000000000 --- a/internal/apis/core/exp/v1alpha3/conversion.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -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 v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apimachineryconversion "k8s.io/apimachinery/pkg/conversion" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "sigs.k8s.io/controller-runtime/pkg/conversion" - - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - clusterv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" -) - -// Convert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec is an autogenerated conversion function. -func Convert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *expv1.MachinePoolSpec, s apimachineryconversion.Scope) error { - return autoConvert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in, out, s) -} - -func Convert_v1alpha3_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *expv1.MachinePool, s apimachineryconversion.Scope) error { - if err := autoConvert_v1alpha3_MachinePool_To_v1beta2_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, expv1.MachinePoolFinalizer) - } - - return nil -} - -func Convert_v1beta2_MachinePool_To_v1alpha3_MachinePool(in *expv1.MachinePool, out *MachinePool, s apimachineryconversion.Scope) error { - if err := autoConvert_v1beta2_MachinePool_To_v1alpha3_MachinePool(in, out, s); err != nil { - return err - } - - // Replace v1beta1 finalizer to allow old MachinePools to get deleted. - if controllerutil.ContainsFinalizer(out, expv1.MachinePoolFinalizer) { - controllerutil.RemoveFinalizer(out, expv1.MachinePoolFinalizer) - controllerutil.AddFinalizer(out, MachinePoolFinalizer) - } - - return nil -} - -func (src *MachinePool) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*expv1.MachinePool) - - if err := Convert_v1alpha3_MachinePool_To_v1beta2_MachinePool(src, dst, nil); err != nil { - return err - } - - // Reset conditions from autogenerated conversions - // NOTE: v1alpha4 conditions should not be automatically be converted into v1beta2 conditions. - dst.Status.Conditions = nil - - // Move legacy conditions (v1alpha3), failureReason, failureMessage and replica counters to the deprecated field. - dst.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{} - dst.Status.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} - if src.Status.Conditions != nil { - clusterv1alpha3.Convert_v1alpha3_Conditions_To_v1beta2_Deprecated_V1Beta1_Conditions(&src.Status.Conditions, &dst.Status.Deprecated.V1Beta1.Conditions) - } - dst.Status.Deprecated.V1Beta1.FailureReason = src.Status.FailureReason - dst.Status.Deprecated.V1Beta1.FailureMessage = src.Status.FailureMessage - dst.Status.Deprecated.V1Beta1.ReadyReplicas = src.Status.ReadyReplicas - dst.Status.Deprecated.V1Beta1.AvailableReplicas = src.Status.AvailableReplicas - dst.Status.Deprecated.V1Beta1.UnavailableReplicas = src.Status.UnavailableReplicas - - // Move BootstrapReady and InfrastructureReady to Initialization - if src.Status.BootstrapReady || src.Status.InfrastructureReady { - if dst.Status.Initialization == nil { - dst.Status.Initialization = &expv1.MachinePoolInitializationStatus{} - } - dst.Status.Initialization.BootstrapDataSecretCreated = src.Status.BootstrapReady - dst.Status.Initialization.InfrastructureProvisioned = src.Status.InfrastructureReady - } - - dst.Spec.Template.Spec.MinReadySeconds = src.Spec.MinReadySeconds - - // Manually restore data. - restored := &expv1.MachinePool{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - dst.Spec.Template.Spec.ReadinessGates = restored.Spec.Template.Spec.ReadinessGates - dst.Spec.Template.Spec.NodeDeletionTimeout = restored.Spec.Template.Spec.NodeDeletionTimeout - dst.Spec.Template.Spec.NodeVolumeDetachTimeout = restored.Spec.Template.Spec.NodeVolumeDetachTimeout - dst.Status.Conditions = restored.Status.Conditions - dst.Status.AvailableReplicas = restored.Status.AvailableReplicas - dst.Status.ReadyReplicas = restored.Status.ReadyReplicas - dst.Status.UpToDateReplicas = restored.Status.UpToDateReplicas - - return nil -} - -func (dst *MachinePool) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*expv1.MachinePool) - - if err := Convert_v1beta2_MachinePool_To_v1alpha3_MachinePool(src, dst, nil); err != nil { - return err - } - - // Reset conditions from autogenerated conversions - // NOTE: v1beta2 conditions should not be automatically be converted into legacy conditions (v1alpha3). - dst.Status.Conditions = nil - - // Reset replica counters from autogenerated conversions - // NOTE: replica counters with a new semantic should not be automatically be converted into old replica counters. - dst.Status.ReadyReplicas = 0 - dst.Status.AvailableReplicas = 0 - - // Retrieve legacy conditions (v1alpha3), failureReason, failureMessage and replica counters from the deprecated field. - if src.Status.Deprecated != nil { - if src.Status.Deprecated.V1Beta1 != nil { - if src.Status.Deprecated.V1Beta1.Conditions != nil { - clusterv1alpha3.Convert_v1beta2_Deprecated_V1Beta1_Conditions_To_v1alpha3_Conditions(&src.Status.Deprecated.V1Beta1.Conditions, &dst.Status.Conditions) - } - dst.Status.FailureReason = src.Status.Deprecated.V1Beta1.FailureReason - dst.Status.FailureMessage = src.Status.Deprecated.V1Beta1.FailureMessage - dst.Status.ReadyReplicas = src.Status.Deprecated.V1Beta1.ReadyReplicas - dst.Status.AvailableReplicas = src.Status.Deprecated.V1Beta1.AvailableReplicas - dst.Status.UnavailableReplicas = src.Status.Deprecated.V1Beta1.UnavailableReplicas - } - } - - // Move initialization to old fields - if src.Status.Initialization != nil { - dst.Status.BootstrapReady = src.Status.Initialization.BootstrapDataSecretCreated - dst.Status.InfrastructureReady = src.Status.Initialization.InfrastructureProvisioned - } - - dst.Spec.MinReadySeconds = src.Spec.Template.Spec.MinReadySeconds - - return utilconversion.MarshalData(src, dst) -} - -func Convert_v1alpha3_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(in *clusterv1alpha3.MachineTemplateSpec, out *clusterv1.MachineTemplateSpec, s apimachineryconversion.Scope) error { - return clusterv1alpha3.Convert_v1alpha3_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(in, out, s) -} - -func Convert_v1beta2_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(in *clusterv1.MachineTemplateSpec, out *clusterv1alpha3.MachineTemplateSpec, s apimachineryconversion.Scope) error { - return clusterv1alpha3.Convert_v1beta2_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(in, out, s) -} - -func Convert_v1beta2_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in *expv1.MachinePoolStatus, out *MachinePoolStatus, s apimachineryconversion.Scope) error { - return autoConvert_v1beta2_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in, out, s) -} - -func Convert_v1alpha3_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *expv1.MachinePoolStatus, s apimachineryconversion.Scope) error { - return autoConvert_v1alpha3_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in, out, s) -} - -// Implement local conversion func because conversion-gen is not aware of conversion func in other packages (see https://github.com/kubernetes/code-generator/issues/94) - -func Convert_v1_Condition_To_v1alpha3_Condition(in *metav1.Condition, out *clusterv1alpha3.Condition, s apimachineryconversion.Scope) error { - return clusterv1alpha3.Convert_v1_Condition_To_v1alpha3_Condition(in, out, s) -} - -func Convert_v1alpha3_Condition_To_v1_Condition(in *clusterv1alpha3.Condition, out *metav1.Condition, s apimachineryconversion.Scope) error { - return clusterv1alpha3.Convert_v1alpha3_Condition_To_v1_Condition(in, out, s) -} diff --git a/internal/apis/core/exp/v1alpha3/conversion_test.go b/internal/apis/core/exp/v1alpha3/conversion_test.go deleted file mode 100644 index eaf68cfdb2fc..000000000000 --- a/internal/apis/core/exp/v1alpha3/conversion_test.go +++ /dev/null @@ -1,102 +0,0 @@ -//go:build !race - -/* -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 v1alpha3 - -import ( - "reflect" - "testing" - - fuzz "github.com/google/gofuzz" - "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" - runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/utils/ptr" - - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - clusterv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" -) - -// Test is disabled when the race detector is enabled (via "//go:build !race" above) because otherwise the fuzz tests would just time out. - -func TestFuzzyConversion(t *testing.T) { - t.Run("for MachinePool", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &expv1.MachinePool{}, - Spoke: &MachinePool{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{MachinePoolFuzzFuncs}, - })) -} - -func MachinePoolFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - spokeBootstrap, - spokeObjectMeta, - spokeMachinePoolSpec, - hubMachinePoolStatus, - } -} - -func hubMachinePoolStatus(in *expv1.MachinePoolStatus, c fuzz.Continue) { - c.FuzzNoCustom(in) - // Always create struct with at least one mandatory fields. - if in.Deprecated == nil { - in.Deprecated = &expv1.MachinePoolDeprecatedStatus{} - } - if in.Deprecated.V1Beta1 == nil { - in.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} - } - - // Drop empty structs with only omit empty fields. - if in.Initialization != nil { - if reflect.DeepEqual(in.Initialization, &expv1.MachinePoolInitializationStatus{}) { - in.Initialization = nil - } - } - - // nil becomes &0 after hub => spoke => hub conversion - // This is acceptable as usually Replicas is set and controllers using older apiVersions are not writing MachineSet status. - if in.Replicas == nil { - in.Replicas = ptr.To(int32(0)) - } -} - -func spokeBootstrap(in *clusterv1alpha3.Bootstrap, c fuzz.Continue) { - c.FuzzNoCustom(in) - - // Bootstrap.Data has been removed in v1alpha4, so setting it to nil in order to avoid v1alpha3 --> --> v1alpha3 round trip errors. - in.Data = nil -} - -func spokeObjectMeta(in *clusterv1alpha3.ObjectMeta, c fuzz.Continue) { - c.FuzzNoCustom(in) - - // These fields have been removed in v1beta1 - // data is going to be lost, so we're forcing zero values here. - in.Name = "" - in.GenerateName = "" - in.Namespace = "" - in.OwnerReferences = nil -} - -func spokeMachinePoolSpec(in *MachinePoolSpec, c fuzz.Continue) { - c.FuzzNoCustom(in) - - // These fields have been removed in v1beta1 - // data is going to be lost, so we're forcing zero values here. - in.Strategy = nil -} diff --git a/internal/apis/core/exp/v1alpha3/doc.go b/internal/apis/core/exp/v1alpha3/doc.go deleted file mode 100644 index b5c52ce0eb7b..000000000000 --- a/internal/apis/core/exp/v1alpha3/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -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 v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/exp/api/v1beta2 -// -// Deprecated: This package will be removed in one of the next releases. -package v1alpha3 diff --git a/internal/apis/core/exp/v1alpha3/groupversion_info.go b/internal/apis/core/exp/v1alpha3/groupversion_info.go deleted file mode 100644 index 74d169021329..000000000000 --- a/internal/apis/core/exp/v1alpha3/groupversion_info.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -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 v1alpha3 contains API Schema definitions for the exp v1alpha3 API group -// +kubebuilder:object:generate=true -// +groupName=cluster.x-k8s.io -package v1alpha3 - -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: "v1alpha3"} - - // 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 - - localSchemeBuilder = SchemeBuilder.SchemeBuilder -) diff --git a/internal/apis/core/exp/v1alpha3/zz_generated.conversion.go b/internal/apis/core/exp/v1alpha3/zz_generated.conversion.go deleted file mode 100644 index 6144ef8e4668..000000000000 --- a/internal/apis/core/exp/v1alpha3/zz_generated.conversion.go +++ /dev/null @@ -1,259 +0,0 @@ -//go:build !ignore_autogenerated -// +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 conversion-gen. DO NOT EDIT. - -package v1alpha3 - -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" - apiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" - v1beta2 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - corev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" -) - -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((*MachinePoolList)(nil), (*v1beta2.MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachinePoolList_To_v1beta2_MachinePoolList(a.(*MachinePoolList), b.(*v1beta2.MachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolList)(nil), (*MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePoolList_To_v1alpha3_MachinePoolList(a.(*v1beta2.MachinePoolList), b.(*MachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolSpec)(nil), (*MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(a.(*v1beta2.MachinePoolSpec), b.(*MachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1.Condition)(nil), (*corev1alpha3.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_Condition_To_v1alpha3_Condition(a.(*v1.Condition), b.(*corev1alpha3.Condition), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*corev1alpha3.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Condition_To_v1_Condition(a.(*corev1alpha3.Condition), b.(*v1.Condition), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*MachinePoolSpec)(nil), (*v1beta2.MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec(a.(*MachinePoolSpec), b.(*v1beta2.MachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*MachinePoolStatus)(nil), (*v1beta2.MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachinePoolStatus_To_v1beta2_MachinePoolStatus(a.(*MachinePoolStatus), b.(*v1beta2.MachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*MachinePool)(nil), (*v1beta2.MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachinePool_To_v1beta2_MachinePool(a.(*MachinePool), b.(*v1beta2.MachinePool), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*corev1alpha3.MachineTemplateSpec)(nil), (*apiv1beta2.MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(a.(*corev1alpha3.MachineTemplateSpec), b.(*apiv1beta2.MachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta2.MachinePoolStatus)(nil), (*MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(a.(*v1beta2.MachinePoolStatus), b.(*MachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta2.MachinePool)(nil), (*MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePool_To_v1alpha3_MachinePool(a.(*v1beta2.MachinePool), b.(*MachinePool), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1beta2.MachineTemplateSpec)(nil), (*corev1alpha3.MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(a.(*apiv1beta2.MachineTemplateSpec), b.(*corev1alpha3.MachineTemplateSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha3_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *v1beta2.MachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_MachinePoolStatus_To_v1beta2_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta2_MachinePool_To_v1alpha3_MachinePool(in *v1beta2.MachinePool, out *MachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta2_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha3_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta2.MachinePool, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_MachinePool_To_v1beta2_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_MachinePoolList_To_v1beta2_MachinePoolList is an autogenerated conversion function. -func Convert_v1alpha3_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { - return autoConvert_v1alpha3_MachinePoolList_To_v1beta2_MachinePoolList(in, out, s) -} - -func autoConvert_v1beta2_MachinePoolList_To_v1alpha3_MachinePoolList(in *v1beta2.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_v1beta2_MachinePool_To_v1alpha3_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta2_MachinePoolList_To_v1alpha3_MachinePoolList is an autogenerated conversion function. -func Convert_v1beta2_MachinePoolList_To_v1alpha3_MachinePoolList(in *v1beta2.MachinePoolList, out *MachinePoolList, s conversion.Scope) error { - return autoConvert_v1beta2_MachinePoolList_To_v1alpha3_MachinePoolList(in, out, s) -} - -func autoConvert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *v1beta2.MachinePoolSpec, s conversion.Scope) error { - out.ClusterName = in.ClusterName - out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - if err := Convert_v1alpha3_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - // WARNING: in.Strategy requires manual conversion: does not exist in peer-type - // WARNING: in.MinReadySeconds requires manual conversion: does not exist in peer-type - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) - return nil -} - -func autoConvert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { - out.ClusterName = in.ClusterName - out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - if err := Convert_v1beta2_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) - return nil -} - -// Convert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec is an autogenerated conversion function. -func Convert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in, out, s) -} - -func autoConvert_v1alpha3_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *v1beta2.MachinePoolStatus, s conversion.Scope) error { - out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) - if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { - return err - } - if err := v1.Convert_int32_To_Pointer_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { - return err - } - if err := v1.Convert_int32_To_Pointer_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { - return err - } - // WARNING: in.UnavailableReplicas requires manual conversion: does not exist in peer-type - // WARNING: in.FailureReason requires manual conversion: does not exist in peer-type - // WARNING: in.FailureMessage requires manual conversion: does not exist in peer-type - out.Phase = in.Phase - // WARNING: in.BootstrapReady requires manual conversion: does not exist in peer-type - // WARNING: in.InfrastructureReady requires manual conversion: does not exist in peer-type - out.ObservedGeneration = in.ObservedGeneration - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_Condition_To_v1_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - return nil -} - -func autoConvert_v1beta2_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in *v1beta2.MachinePoolStatus, out *MachinePoolStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(corev1alpha3.Conditions, len(*in)) - for i := range *in { - if err := Convert_v1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - // WARNING: in.Initialization requires manual conversion: does not exist in peer-type - out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) - if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int32_To_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int32_To_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { - return err - } - // WARNING: in.UpToDateReplicas requires manual conversion: does not exist in peer-type - out.Phase = in.Phase - out.ObservedGeneration = in.ObservedGeneration - // WARNING: in.Deprecated requires manual conversion: does not exist in peer-type - return nil -} diff --git a/internal/apis/core/exp/v1alpha3/zz_generated.deepcopy.go b/internal/apis/core/exp/v1alpha3/zz_generated.deepcopy.go deleted file mode 100644 index 388b2a42a9c0..000000000000 --- a/internal/apis/core/exp/v1alpha3/zz_generated.deepcopy.go +++ /dev/null @@ -1,165 +0,0 @@ -//go: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 v1alpha3 - -import ( - "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api/errors" - corev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" -) - -// 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.Strategy != nil { - in, out := &in.Strategy, &out.Strategy - *out = new(corev1alpha3.MachineDeploymentStrategy) - (*in).DeepCopyInto(*out) - } - 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(corev1alpha3.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/internal/apis/core/exp/v1alpha4/condition_consts.go b/internal/apis/core/exp/v1alpha4/condition_consts.go deleted file mode 100644 index 05bb01055c7c..000000000000 --- a/internal/apis/core/exp/v1alpha4/condition_consts.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -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 - -import clusterv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" - -// Conditions and condition Reasons for the MachinePool object. - -const ( - // ReplicasReadyCondition reports an aggregate of current status of the replicas controlled by the MachinePool. - ReplicasReadyCondition clusterv1alpha4.ConditionType = "ReplicasReady" - - // WaitingForReplicasReadyReason (Severity=Info) documents a machinepool waiting for the required replicas - // to be ready. - WaitingForReplicasReadyReason = "WaitingForReplicasReady" -) diff --git a/internal/apis/core/exp/v1alpha4/conversion.go b/internal/apis/core/exp/v1alpha4/conversion.go deleted file mode 100644 index 96f87f5cde5e..000000000000 --- a/internal/apis/core/exp/v1alpha4/conversion.go +++ /dev/null @@ -1,150 +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 v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apimachineryconversion "k8s.io/apimachinery/pkg/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" - - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - clusterv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" -) - -func (src *MachinePool) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*expv1.MachinePool) - - if err := Convert_v1alpha4_MachinePool_To_v1beta2_MachinePool(src, dst, nil); err != nil { - return err - } - - // Reset conditions from autogenerated conversions - // NOTE: v1alpha4 conditions should not be automatically be converted into v1beta2 conditions. - dst.Status.Conditions = nil - - // Move legacy conditions (v1alpha4), failureReason, failureMessage and replica counters to the deprecated field. - dst.Status.Deprecated = &expv1.MachinePoolDeprecatedStatus{} - dst.Status.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} - if src.Status.Conditions != nil { - clusterv1alpha4.Convert_v1alpha4_Conditions_To_v1beta2_Deprecated_V1Beta1_Conditions(&src.Status.Conditions, &dst.Status.Deprecated.V1Beta1.Conditions) - } - dst.Status.Deprecated.V1Beta1.FailureReason = src.Status.FailureReason - dst.Status.Deprecated.V1Beta1.FailureMessage = src.Status.FailureMessage - dst.Status.Deprecated.V1Beta1.ReadyReplicas = src.Status.ReadyReplicas - dst.Status.Deprecated.V1Beta1.AvailableReplicas = src.Status.AvailableReplicas - dst.Status.Deprecated.V1Beta1.UnavailableReplicas = src.Status.UnavailableReplicas - - // Move BootstrapReady and InfrastructureReady to Initialization - if src.Status.BootstrapReady || src.Status.InfrastructureReady { - if dst.Status.Initialization == nil { - dst.Status.Initialization = &expv1.MachinePoolInitializationStatus{} - } - dst.Status.Initialization.BootstrapDataSecretCreated = src.Status.BootstrapReady - dst.Status.Initialization.InfrastructureProvisioned = src.Status.InfrastructureReady - } - dst.Spec.Template.Spec.MinReadySeconds = src.Spec.MinReadySeconds - - // Manually restore data. - restored := &expv1.MachinePool{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - dst.Spec.Template.Spec.ReadinessGates = restored.Spec.Template.Spec.ReadinessGates - dst.Spec.Template.Spec.NodeDeletionTimeout = restored.Spec.Template.Spec.NodeDeletionTimeout - dst.Spec.Template.Spec.NodeVolumeDetachTimeout = restored.Spec.Template.Spec.NodeVolumeDetachTimeout - dst.Status.Conditions = restored.Status.Conditions - dst.Status.AvailableReplicas = restored.Status.AvailableReplicas - dst.Status.ReadyReplicas = restored.Status.ReadyReplicas - dst.Status.UpToDateReplicas = restored.Status.UpToDateReplicas - - return nil -} - -func (dst *MachinePool) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*expv1.MachinePool) - - if err := Convert_v1beta2_MachinePool_To_v1alpha4_MachinePool(src, dst, nil); err != nil { - return err - } - - // Reset conditions from autogenerated conversions - // NOTE: v1beta2 conditions should not be automatically be converted into legacy conditions (v1alpha4). - dst.Status.Conditions = nil - - // Reset replica counters from autogenerated conversions - // NOTE: replica counters with a new semantic should not be automatically be converted into old replica counters. - dst.Status.ReadyReplicas = 0 - dst.Status.AvailableReplicas = 0 - - // Retrieve legacy conditions (v1alpha4), failureReason, failureMessage and replica counters from the deprecated field. - if src.Status.Deprecated != nil { - if src.Status.Deprecated.V1Beta1 != nil { - if src.Status.Deprecated.V1Beta1.Conditions != nil { - clusterv1alpha4.Convert_v1beta2_Deprecated_V1Beta1_Conditions_To_v1alpha4_Conditions(&src.Status.Deprecated.V1Beta1.Conditions, &dst.Status.Conditions) - } - dst.Status.FailureReason = src.Status.Deprecated.V1Beta1.FailureReason - dst.Status.FailureMessage = src.Status.Deprecated.V1Beta1.FailureMessage - dst.Status.ReadyReplicas = src.Status.Deprecated.V1Beta1.ReadyReplicas - dst.Status.AvailableReplicas = src.Status.Deprecated.V1Beta1.AvailableReplicas - dst.Status.UnavailableReplicas = src.Status.Deprecated.V1Beta1.UnavailableReplicas - } - } - - // Move initialization to old fields - if src.Status.Initialization != nil { - dst.Status.BootstrapReady = src.Status.Initialization.BootstrapDataSecretCreated - dst.Status.InfrastructureReady = src.Status.Initialization.InfrastructureProvisioned - } - - dst.Spec.MinReadySeconds = src.Spec.Template.Spec.MinReadySeconds - - // Preserve Hub data on down-conversion except for metadata - return utilconversion.MarshalData(src, dst) -} - -func Convert_v1alpha4_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(in *clusterv1alpha4.MachineTemplateSpec, out *clusterv1.MachineTemplateSpec, s apimachineryconversion.Scope) error { - return clusterv1alpha4.Convert_v1alpha4_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(in, out, s) -} - -func Convert_v1beta2_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(in *clusterv1.MachineTemplateSpec, out *clusterv1alpha4.MachineTemplateSpec, s apimachineryconversion.Scope) error { - return clusterv1alpha4.Convert_v1beta2_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(in, out, s) -} - -func Convert_v1beta2_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in *expv1.MachinePoolStatus, out *MachinePoolStatus, s apimachineryconversion.Scope) error { - // V1Beta2 was added in v1beta1 - return autoConvert_v1beta2_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in, out, s) -} - -func Convert_v1alpha4_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *expv1.MachinePoolStatus, scope apimachineryconversion.Scope) error { - return autoConvert_v1alpha4_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in, out, scope) -} - -// Implement local conversion func because conversion-gen is not aware of conversion func in other packages (see https://github.com/kubernetes/code-generator/issues/94) - -func Convert_v1_Condition_To_v1alpha4_Condition(in *metav1.Condition, out *clusterv1alpha4.Condition, s apimachineryconversion.Scope) error { - return clusterv1alpha4.Convert_v1_Condition_To_v1alpha4_Condition(in, out, s) -} - -func Convert_v1alpha4_Condition_To_v1_Condition(in *clusterv1alpha4.Condition, out *metav1.Condition, s apimachineryconversion.Scope) error { - return clusterv1alpha4.Convert_v1alpha4_Condition_To_v1_Condition(in, out, s) -} - -func Convert_v1alpha4_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *expv1.MachinePoolSpec, s apimachineryconversion.Scope) error { - return autoConvert_v1alpha4_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in, out, s) -} diff --git a/internal/apis/core/exp/v1alpha4/conversion_test.go b/internal/apis/core/exp/v1alpha4/conversion_test.go deleted file mode 100644 index 056a5526b78b..000000000000 --- a/internal/apis/core/exp/v1alpha4/conversion_test.go +++ /dev/null @@ -1,72 +0,0 @@ -//go:build !race - -/* -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 v1alpha4 - -import ( - "reflect" - "testing" - - fuzz "github.com/google/gofuzz" - "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" - runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/utils/ptr" - - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" -) - -// Test is disabled when the race detector is enabled (via "//go:build !race" above) because otherwise the fuzz tests would just time out. - -func TestFuzzyConversion(t *testing.T) { - t.Run("for MachinePool", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &expv1.MachinePool{}, - Spoke: &MachinePool{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{MachinePoolFuzzFuncs}, - })) -} - -func MachinePoolFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - hubMachinePoolStatus, - } -} - -func hubMachinePoolStatus(in *expv1.MachinePoolStatus, c fuzz.Continue) { - c.FuzzNoCustom(in) - // Always create struct with at least one mandatory fields. - if in.Deprecated == nil { - in.Deprecated = &expv1.MachinePoolDeprecatedStatus{} - } - if in.Deprecated.V1Beta1 == nil { - in.Deprecated.V1Beta1 = &expv1.MachinePoolV1Beta1DeprecatedStatus{} - } - - // Drop empty structs with only omit empty fields. - if in.Initialization != nil { - if reflect.DeepEqual(in.Initialization, &expv1.MachinePoolInitializationStatus{}) { - in.Initialization = nil - } - } - - // nil becomes &0 after hub => spoke => hub conversion - // This is acceptable as usually Replicas is set and controllers using older apiVersions are not writing MachineSet status. - if in.Replicas == nil { - in.Replicas = ptr.To(int32(0)) - } -} diff --git a/internal/apis/core/exp/v1alpha4/doc.go b/internal/apis/core/exp/v1alpha4/doc.go deleted file mode 100644 index e72fe7b85633..000000000000 --- a/internal/apis/core/exp/v1alpha4/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -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 the v1alpha4 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/exp/api/v1beta2 -// -// Deprecated: This package will be removed in one of the next releases. -package v1alpha4 diff --git a/internal/apis/core/exp/v1alpha4/groupversion_info.go b/internal/apis/core/exp/v1alpha4/groupversion_info.go deleted file mode 100644 index 37de5e836e53..000000000000 --- a/internal/apis/core/exp/v1alpha4/groupversion_info.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -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 exp v1alpha4 API group -// +kubebuilder:object:generate=true -// +groupName=cluster.x-k8s.io -package v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "cluster.x-k8s.io", Version: "v1alpha4"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme. - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = schemeBuilder.AddToScheme - - objectTypes = []runtime.Object{} - - // localSchemeBuilder is used for type conversions. - localSchemeBuilder = schemeBuilder -) - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, objectTypes...) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/internal/apis/core/exp/v1alpha4/zz_generated.conversion.go b/internal/apis/core/exp/v1alpha4/zz_generated.conversion.go deleted file mode 100644 index 99d8806956db..000000000000 --- a/internal/apis/core/exp/v1alpha4/zz_generated.conversion.go +++ /dev/null @@ -1,268 +0,0 @@ -//go:build !ignore_autogenerated -// +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 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" - apiv1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" - v1beta2 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - corev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/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((*MachinePool)(nil), (*v1beta2.MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachinePool_To_v1beta2_MachinePool(a.(*MachinePool), b.(*v1beta2.MachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePool)(nil), (*MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePool_To_v1alpha4_MachinePool(a.(*v1beta2.MachinePool), b.(*MachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*MachinePoolList)(nil), (*v1beta2.MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachinePoolList_To_v1beta2_MachinePoolList(a.(*MachinePoolList), b.(*v1beta2.MachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolList)(nil), (*MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePoolList_To_v1alpha4_MachinePoolList(a.(*v1beta2.MachinePoolList), b.(*MachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolSpec)(nil), (*MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(a.(*v1beta2.MachinePoolSpec), b.(*MachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1.Condition)(nil), (*corev1alpha4.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_Condition_To_v1alpha4_Condition(a.(*v1.Condition), b.(*corev1alpha4.Condition), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*corev1alpha4.Condition)(nil), (*v1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Condition_To_v1_Condition(a.(*corev1alpha4.Condition), b.(*v1.Condition), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*MachinePoolSpec)(nil), (*v1beta2.MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachinePoolSpec_To_v1beta2_MachinePoolSpec(a.(*MachinePoolSpec), b.(*v1beta2.MachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*MachinePoolStatus)(nil), (*v1beta2.MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachinePoolStatus_To_v1beta2_MachinePoolStatus(a.(*MachinePoolStatus), b.(*v1beta2.MachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*corev1alpha4.MachineTemplateSpec)(nil), (*apiv1beta2.MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(a.(*corev1alpha4.MachineTemplateSpec), b.(*apiv1beta2.MachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta2.MachinePoolStatus)(nil), (*MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(a.(*v1beta2.MachinePoolStatus), b.(*MachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1beta2.MachineTemplateSpec)(nil), (*corev1alpha4.MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta2_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(a.(*apiv1beta2.MachineTemplateSpec), b.(*corev1alpha4.MachineTemplateSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha4_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *v1beta2.MachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_MachinePoolSpec_To_v1beta2_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_MachinePoolStatus_To_v1beta2_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_MachinePool_To_v1beta2_MachinePool is an autogenerated conversion function. -func Convert_v1alpha4_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *v1beta2.MachinePool, s conversion.Scope) error { - return autoConvert_v1alpha4_MachinePool_To_v1beta2_MachinePool(in, out, s) -} - -func autoConvert_v1beta2_MachinePool_To_v1alpha4_MachinePool(in *v1beta2.MachinePool, out *MachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta2_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta2_MachinePool_To_v1alpha4_MachinePool is an autogenerated conversion function. -func Convert_v1beta2_MachinePool_To_v1alpha4_MachinePool(in *v1beta2.MachinePool, out *MachinePool, s conversion.Scope) error { - return autoConvert_v1beta2_MachinePool_To_v1alpha4_MachinePool(in, out, s) -} - -func autoConvert_v1alpha4_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta2.MachinePool, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_MachinePool_To_v1beta2_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_MachinePoolList_To_v1beta2_MachinePoolList is an autogenerated conversion function. -func Convert_v1alpha4_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { - return autoConvert_v1alpha4_MachinePoolList_To_v1beta2_MachinePoolList(in, out, s) -} - -func autoConvert_v1beta2_MachinePoolList_To_v1alpha4_MachinePoolList(in *v1beta2.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_v1beta2_MachinePool_To_v1alpha4_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta2_MachinePoolList_To_v1alpha4_MachinePoolList is an autogenerated conversion function. -func Convert_v1beta2_MachinePoolList_To_v1alpha4_MachinePoolList(in *v1beta2.MachinePoolList, out *MachinePoolList, s conversion.Scope) error { - return autoConvert_v1beta2_MachinePoolList_To_v1alpha4_MachinePoolList(in, out, s) -} - -func autoConvert_v1alpha4_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *v1beta2.MachinePoolSpec, s conversion.Scope) error { - out.ClusterName = in.ClusterName - out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - if err := Convert_v1alpha4_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - // WARNING: in.MinReadySeconds requires manual conversion: does not exist in peer-type - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) - return nil -} - -func autoConvert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { - out.ClusterName = in.ClusterName - out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - if err := Convert_v1beta2_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) - return nil -} - -// Convert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec is an autogenerated conversion function. -func Convert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in, out, s) -} - -func autoConvert_v1alpha4_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *v1beta2.MachinePoolStatus, s conversion.Scope) error { - out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) - if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { - return err - } - if err := v1.Convert_int32_To_Pointer_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { - return err - } - if err := v1.Convert_int32_To_Pointer_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { - return err - } - // WARNING: in.UnavailableReplicas requires manual conversion: does not exist in peer-type - // WARNING: in.FailureReason requires manual conversion: does not exist in peer-type - // WARNING: in.FailureMessage requires manual conversion: does not exist in peer-type - out.Phase = in.Phase - // WARNING: in.BootstrapReady requires manual conversion: does not exist in peer-type - // WARNING: in.InfrastructureReady requires manual conversion: does not exist in peer-type - out.ObservedGeneration = in.ObservedGeneration - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_Condition_To_v1_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - return nil -} - -func autoConvert_v1beta2_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in *v1beta2.MachinePoolStatus, out *MachinePoolStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(corev1alpha4.Conditions, len(*in)) - for i := range *in { - if err := Convert_v1_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - // WARNING: in.Initialization requires manual conversion: does not exist in peer-type - out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) - if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int32_To_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int32_To_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { - return err - } - // WARNING: in.UpToDateReplicas requires manual conversion: does not exist in peer-type - out.Phase = in.Phase - out.ObservedGeneration = in.ObservedGeneration - // WARNING: in.Deprecated requires manual conversion: does not exist in peer-type - return nil -} diff --git a/internal/apis/core/exp/v1alpha4/zz_generated.deepcopy.go b/internal/apis/core/exp/v1alpha4/zz_generated.deepcopy.go deleted file mode 100644 index 6e5f81b99893..000000000000 --- a/internal/apis/core/exp/v1alpha4/zz_generated.deepcopy.go +++ /dev/null @@ -1,160 +0,0 @@ -//go: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 v1alpha4 - -import ( - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api/errors" - corev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" -) - -// 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(corev1alpha4.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/internal/apis/core/v1alpha3/conversion.go b/internal/apis/core/v1alpha3/conversion.go index f65a7d417112..ba163234e4f5 100644 --- a/internal/apis/core/v1alpha3/conversion.go +++ b/internal/apis/core/v1alpha3/conversion.go @@ -22,9 +22,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" apimachineryconversion "k8s.io/apimachinery/pkg/conversion" "k8s.io/utils/ptr" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) @@ -441,6 +442,98 @@ func (dst *MachineHealthCheck) ConvertFrom(srcRaw conversion.Hub) error { return nil } +func (src *MachinePool) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*clusterv1.MachinePool) + + if err := Convert_v1alpha3_MachinePool_To_v1beta2_MachinePool(src, dst, nil); err != nil { + return err + } + + // Reset conditions from autogenerated conversions + // NOTE: v1alpha4 conditions should not be automatically be converted into v1beta2 conditions. + dst.Status.Conditions = nil + + // Move legacy conditions (v1alpha3), failureReason, failureMessage and replica counters to the deprecated field. + dst.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} + dst.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} + if src.Status.Conditions != nil { + Convert_v1alpha3_Conditions_To_v1beta2_Deprecated_V1Beta1_Conditions(&src.Status.Conditions, &dst.Status.Deprecated.V1Beta1.Conditions) + } + dst.Status.Deprecated.V1Beta1.FailureReason = src.Status.FailureReason + dst.Status.Deprecated.V1Beta1.FailureMessage = src.Status.FailureMessage + dst.Status.Deprecated.V1Beta1.ReadyReplicas = src.Status.ReadyReplicas + dst.Status.Deprecated.V1Beta1.AvailableReplicas = src.Status.AvailableReplicas + dst.Status.Deprecated.V1Beta1.UnavailableReplicas = src.Status.UnavailableReplicas + + // Move BootstrapReady and InfrastructureReady to Initialization + if src.Status.BootstrapReady || src.Status.InfrastructureReady { + if dst.Status.Initialization == nil { + dst.Status.Initialization = &clusterv1.MachinePoolInitializationStatus{} + } + dst.Status.Initialization.BootstrapDataSecretCreated = src.Status.BootstrapReady + dst.Status.Initialization.InfrastructureProvisioned = src.Status.InfrastructureReady + } + + dst.Spec.Template.Spec.MinReadySeconds = src.Spec.MinReadySeconds + + // Manually restore data. + restored := &clusterv1.MachinePool{} + if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + return err + } + + dst.Spec.Template.Spec.ReadinessGates = restored.Spec.Template.Spec.ReadinessGates + dst.Spec.Template.Spec.NodeDeletionTimeout = restored.Spec.Template.Spec.NodeDeletionTimeout + dst.Spec.Template.Spec.NodeVolumeDetachTimeout = restored.Spec.Template.Spec.NodeVolumeDetachTimeout + dst.Status.Conditions = restored.Status.Conditions + dst.Status.AvailableReplicas = restored.Status.AvailableReplicas + dst.Status.ReadyReplicas = restored.Status.ReadyReplicas + dst.Status.UpToDateReplicas = restored.Status.UpToDateReplicas + + return nil +} + +func (dst *MachinePool) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*clusterv1.MachinePool) + + if err := Convert_v1beta2_MachinePool_To_v1alpha3_MachinePool(src, dst, nil); err != nil { + return err + } + + // Reset conditions from autogenerated conversions + // NOTE: v1beta2 conditions should not be automatically be converted into legacy conditions (v1alpha3). + dst.Status.Conditions = nil + + // Reset replica counters from autogenerated conversions + // NOTE: replica counters with a new semantic should not be automatically be converted into old replica counters. + dst.Status.ReadyReplicas = 0 + dst.Status.AvailableReplicas = 0 + + // Retrieve legacy conditions (v1alpha3), failureReason, failureMessage and replica counters from the deprecated field. + if src.Status.Deprecated != nil { + if src.Status.Deprecated.V1Beta1 != nil { + if src.Status.Deprecated.V1Beta1.Conditions != nil { + Convert_v1beta2_Deprecated_V1Beta1_Conditions_To_v1alpha3_Conditions(&src.Status.Deprecated.V1Beta1.Conditions, &dst.Status.Conditions) + } + dst.Status.FailureReason = src.Status.Deprecated.V1Beta1.FailureReason + dst.Status.FailureMessage = src.Status.Deprecated.V1Beta1.FailureMessage + dst.Status.ReadyReplicas = src.Status.Deprecated.V1Beta1.ReadyReplicas + dst.Status.AvailableReplicas = src.Status.Deprecated.V1Beta1.AvailableReplicas + dst.Status.UnavailableReplicas = src.Status.Deprecated.V1Beta1.UnavailableReplicas + } + } + + // Move initialization to old fields + if src.Status.Initialization != nil { + dst.Status.BootstrapReady = src.Status.Initialization.BootstrapDataSecretCreated + dst.Status.InfrastructureReady = src.Status.Initialization.InfrastructureProvisioned + } + + dst.Spec.MinReadySeconds = src.Spec.Template.Spec.MinReadySeconds + + return utilconversion.MarshalData(src, dst) +} + func Convert_v1beta2_MachineSetStatus_To_v1alpha3_MachineSetStatus(in *clusterv1.MachineSetStatus, out *MachineSetStatus, _ apimachineryconversion.Scope) 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 // V1Beta2 was added in v1beta1. @@ -585,3 +678,44 @@ func Convert_v1alpha3_Conditions_To_v1beta2_Deprecated_V1Beta1_Conditions(in *Co func Convert_v1alpha3_MachineSetSpec_To_v1beta2_MachineSetSpec(in *MachineSetSpec, out *clusterv1.MachineSetSpec, s apimachineryconversion.Scope) error { return autoConvert_v1alpha3_MachineSetSpec_To_v1beta2_MachineSetSpec(in, out, s) } + +// Convert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec is an autogenerated conversion function. +func Convert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *clusterv1.MachinePoolSpec, s apimachineryconversion.Scope) error { + return autoConvert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in, out, s) +} + +func Convert_v1alpha3_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *clusterv1.MachinePool, s apimachineryconversion.Scope) error { + if err := autoConvert_v1alpha3_MachinePool_To_v1beta2_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, clusterv1.MachinePoolFinalizer) + } + + return nil +} + +func Convert_v1beta2_MachinePool_To_v1alpha3_MachinePool(in *clusterv1.MachinePool, out *MachinePool, s apimachineryconversion.Scope) error { + if err := autoConvert_v1beta2_MachinePool_To_v1alpha3_MachinePool(in, out, s); err != nil { + return err + } + + // Replace v1beta1 finalizer to allow old MachinePools to get deleted. + if controllerutil.ContainsFinalizer(out, clusterv1.MachinePoolFinalizer) { + controllerutil.RemoveFinalizer(out, clusterv1.MachinePoolFinalizer) + controllerutil.AddFinalizer(out, MachinePoolFinalizer) + } + + return nil +} + +func Convert_v1beta2_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in *clusterv1.MachinePoolStatus, out *MachinePoolStatus, s apimachineryconversion.Scope) error { + return autoConvert_v1beta2_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in, out, s) +} + +func Convert_v1alpha3_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *clusterv1.MachinePoolStatus, s apimachineryconversion.Scope) error { + return autoConvert_v1alpha3_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in, out, s) +} diff --git a/internal/apis/core/v1alpha3/conversion_test.go b/internal/apis/core/v1alpha3/conversion_test.go index b2a1e0163cfb..2d53aa3f99ee 100644 --- a/internal/apis/core/v1alpha3/conversion_test.go +++ b/internal/apis/core/v1alpha3/conversion_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) @@ -66,6 +66,12 @@ func TestFuzzyConversion(t *testing.T) { Spoke: &MachineHealthCheck{}, FuzzerFuncs: []fuzzer.FuzzerFuncs{MachineHealthCheckFuzzFunc}, })) + + t.Run("for MachinePool", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ + Hub: &clusterv1.MachinePool{}, + Spoke: &MachinePool{}, + FuzzerFuncs: []fuzzer.FuzzerFuncs{MachinePoolFuzzFuncs}, + })) } func MachineFuzzFunc(_ runtimeserializer.CodecFactory) []interface{} { @@ -243,3 +249,44 @@ func hubMachineHealthCheckStatus(in *clusterv1.MachineHealthCheckStatus, c fuzz. } } } + +func MachinePoolFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} { + return []interface{}{ + spokeBootstrap, + spokeObjectMeta, + spokeMachinePoolSpec, + hubMachinePoolStatus, + } +} + +func hubMachinePoolStatus(in *clusterv1.MachinePoolStatus, c fuzz.Continue) { + c.FuzzNoCustom(in) + // Always create struct with at least one mandatory fields. + if in.Deprecated == nil { + in.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} + } + if in.Deprecated.V1Beta1 == nil { + in.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} + } + + // Drop empty structs with only omit empty fields. + if in.Initialization != nil { + if reflect.DeepEqual(in.Initialization, &clusterv1.MachinePoolInitializationStatus{}) { + in.Initialization = nil + } + } + + // nil becomes &0 after hub => spoke => hub conversion + // This is acceptable as usually Replicas is set and controllers using older apiVersions are not writing MachineSet status. + if in.Replicas == nil { + in.Replicas = ptr.To(int32(0)) + } +} + +func spokeMachinePoolSpec(in *MachinePoolSpec, c fuzz.Continue) { + c.FuzzNoCustom(in) + + // These fields have been removed in v1beta1 + // data is going to be lost, so we're forcing zero values here. + in.Strategy = nil +} diff --git a/internal/apis/core/v1alpha3/doc.go b/internal/apis/core/v1alpha3/doc.go index fd30ef55930d..dd72c172e6d0 100644 --- a/internal/apis/core/v1alpha3/doc.go +++ b/internal/apis/core/v1alpha3/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1alpha3 contains the v1alpha3 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/core/v1beta2 // // Deprecated: This package will be removed in one of the next releases. package v1alpha3 diff --git a/internal/apis/core/exp/v1alpha3/machinepool_types.go b/internal/apis/core/v1alpha3/machinepool_types.go similarity index 95% rename from internal/apis/core/exp/v1alpha3/machinepool_types.go rename to internal/apis/core/v1alpha3/machinepool_types.go index f2842ab7048e..35a156000505 100644 --- a/internal/apis/core/exp/v1alpha3/machinepool_types.go +++ b/internal/apis/core/v1alpha3/machinepool_types.go @@ -21,7 +21,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" capierrors "sigs.k8s.io/cluster-api/errors" - clusterv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" ) const ( @@ -42,12 +41,12 @@ type MachinePoolSpec struct { Replicas *int32 `json:"replicas,omitempty"` // template describes the machines that will be created. - Template clusterv1alpha3.MachineTemplateSpec `json:"template"` + Template MachineTemplateSpec `json:"template"` // strategy is the deployment strategy to use to replace existing machine instances with // new ones. // +optional - Strategy *clusterv1alpha3.MachineDeploymentStrategy `json:"strategy,omitempty"` + Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"` // minReadySeconds is the minimum number of seconds for which a newly created machine instances should // be ready. @@ -124,7 +123,7 @@ type MachinePoolStatus struct { // conditions define the current service state of the MachinePool. // +optional - Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` + Conditions Conditions `json:"conditions,omitempty"` } // ANCHOR_END: MachinePoolStatus @@ -230,12 +229,12 @@ type MachinePool struct { } // GetConditions returns the set of conditions for this object. -func (m *MachinePool) GetConditions() clusterv1alpha3.Conditions { +func (m *MachinePool) GetConditions() Conditions { return m.Status.Conditions } // SetConditions sets the conditions on this object. -func (m *MachinePool) SetConditions(conditions clusterv1alpha3.Conditions) { +func (m *MachinePool) SetConditions(conditions Conditions) { m.Status.Conditions = conditions } diff --git a/internal/apis/core/v1alpha3/zz_generated.conversion.go b/internal/apis/core/v1alpha3/zz_generated.conversion.go index 4792b8a30f9a..33e8606cb481 100644 --- a/internal/apis/core/v1alpha3/zz_generated.conversion.go +++ b/internal/apis/core/v1alpha3/zz_generated.conversion.go @@ -29,7 +29,7 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" - v1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func init() { @@ -189,6 +189,21 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*MachinePoolList)(nil), (*v1beta2.MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachinePoolList_To_v1beta2_MachinePoolList(a.(*MachinePoolList), b.(*v1beta2.MachinePoolList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolList)(nil), (*MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePoolList_To_v1alpha3_MachinePoolList(a.(*v1beta2.MachinePoolList), b.(*MachinePoolList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolSpec)(nil), (*MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(a.(*v1beta2.MachinePoolSpec), b.(*MachinePoolSpec), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*MachineRollingUpdateDeployment)(nil), (*v1beta2.MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha3_MachineRollingUpdateDeployment_To_v1beta2_MachineRollingUpdateDeployment(a.(*MachineRollingUpdateDeployment), b.(*v1beta2.MachineRollingUpdateDeployment), scope) }); err != nil { @@ -279,6 +294,21 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*MachinePoolSpec)(nil), (*v1beta2.MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec(a.(*MachinePoolSpec), b.(*v1beta2.MachinePoolSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*MachinePoolStatus)(nil), (*v1beta2.MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachinePoolStatus_To_v1beta2_MachinePoolStatus(a.(*MachinePoolStatus), b.(*v1beta2.MachinePoolStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*MachinePool)(nil), (*v1beta2.MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_MachinePool_To_v1beta2_MachinePool(a.(*MachinePool), b.(*v1beta2.MachinePool), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*MachineSetSpec)(nil), (*v1beta2.MachineSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha3_MachineSetSpec_To_v1beta2_MachineSetSpec(a.(*MachineSetSpec), b.(*v1beta2.MachineSetSpec), scope) }); err != nil { @@ -334,6 +364,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*v1beta2.MachinePoolStatus)(nil), (*MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(a.(*v1beta2.MachinePoolStatus), b.(*MachinePoolStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta2.MachinePool)(nil), (*MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePool_To_v1alpha3_MachinePool(a.(*v1beta2.MachinePool), b.(*MachinePool), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*v1beta2.MachineRollingUpdateDeployment)(nil), (*MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta2_MachineRollingUpdateDeployment_To_v1alpha3_MachineRollingUpdateDeployment(a.(*v1beta2.MachineRollingUpdateDeployment), b.(*MachineRollingUpdateDeployment), scope) }); err != nil { @@ -1056,6 +1096,161 @@ func Convert_v1beta2_MachineList_To_v1alpha3_MachineList(in *v1beta2.MachineList return autoConvert_v1beta2_MachineList_To_v1alpha3_MachineList(in, out, s) } +func autoConvert_v1alpha3_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *v1beta2.MachinePool, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_MachinePoolStatus_To_v1beta2_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta2_MachinePool_To_v1alpha3_MachinePool(in *v1beta2.MachinePool, out *MachinePool, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta2_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha3_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta2.MachinePool, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_MachinePool_To_v1beta2_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_MachinePoolList_To_v1beta2_MachinePoolList is an autogenerated conversion function. +func Convert_v1alpha3_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { + return autoConvert_v1alpha3_MachinePoolList_To_v1beta2_MachinePoolList(in, out, s) +} + +func autoConvert_v1beta2_MachinePoolList_To_v1alpha3_MachinePoolList(in *v1beta2.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_v1beta2_MachinePool_To_v1alpha3_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta2_MachinePoolList_To_v1alpha3_MachinePoolList is an autogenerated conversion function. +func Convert_v1beta2_MachinePoolList_To_v1alpha3_MachinePoolList(in *v1beta2.MachinePoolList, out *MachinePoolList, s conversion.Scope) error { + return autoConvert_v1beta2_MachinePoolList_To_v1alpha3_MachinePoolList(in, out, s) +} + +func autoConvert_v1alpha3_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *v1beta2.MachinePoolSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + if err := Convert_v1alpha3_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + // WARNING: in.Strategy requires manual conversion: does not exist in peer-type + // WARNING: in.MinReadySeconds requires manual conversion: does not exist in peer-type + out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) + out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) + return nil +} + +func autoConvert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + if err := Convert_v1beta2_MachineTemplateSpec_To_v1alpha3_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) + out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) + return nil +} + +// Convert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec is an autogenerated conversion function. +func Convert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { + return autoConvert_v1beta2_MachinePoolSpec_To_v1alpha3_MachinePoolSpec(in, out, s) +} + +func autoConvert_v1alpha3_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *v1beta2.MachinePoolStatus, s conversion.Scope) error { + out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) + if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { + return err + } + if err := v1.Convert_int32_To_Pointer_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { + return err + } + if err := v1.Convert_int32_To_Pointer_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { + return err + } + // WARNING: in.UnavailableReplicas requires manual conversion: does not exist in peer-type + // WARNING: in.FailureReason requires manual conversion: does not exist in peer-type + // WARNING: in.FailureMessage requires manual conversion: does not exist in peer-type + out.Phase = in.Phase + // WARNING: in.BootstrapReady requires manual conversion: does not exist in peer-type + // WARNING: in.InfrastructureReady requires manual conversion: does not exist in peer-type + out.ObservedGeneration = in.ObservedGeneration + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_Condition_To_v1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +func autoConvert_v1beta2_MachinePoolStatus_To_v1alpha3_MachinePoolStatus(in *v1beta2.MachinePoolStatus, out *MachinePoolStatus, s conversion.Scope) error { + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(Conditions, len(*in)) + for i := range *in { + if err := Convert_v1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + // WARNING: in.Initialization requires manual conversion: does not exist in peer-type + out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) + if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { + return err + } + if err := v1.Convert_Pointer_int32_To_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { + return err + } + if err := v1.Convert_Pointer_int32_To_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { + return err + } + // WARNING: in.UpToDateReplicas requires manual conversion: does not exist in peer-type + out.Phase = in.Phase + out.ObservedGeneration = in.ObservedGeneration + // WARNING: in.Deprecated requires manual conversion: does not exist in peer-type + return nil +} + func autoConvert_v1alpha3_MachineRollingUpdateDeployment_To_v1beta2_MachineRollingUpdateDeployment(in *MachineRollingUpdateDeployment, out *v1beta2.MachineRollingUpdateDeployment, s conversion.Scope) error { out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) diff --git a/internal/apis/core/v1alpha3/zz_generated.deepcopy.go b/internal/apis/core/v1alpha3/zz_generated.deepcopy.go index c57800e70d4e..ac0ffaa9f4c5 100644 --- a/internal/apis/core/v1alpha3/zz_generated.deepcopy.go +++ b/internal/apis/core/v1alpha3/zz_generated.deepcopy.go @@ -663,6 +663,143 @@ func (in *MachineList) DeepCopyObject() runtime.Object { return nil } +// 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.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.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(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 +} + // 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 diff --git a/internal/apis/core/v1alpha4/conversion.go b/internal/apis/core/v1alpha4/conversion.go index 6b457a274ffa..210a116c1ad3 100644 --- a/internal/apis/core/v1alpha4/conversion.go +++ b/internal/apis/core/v1alpha4/conversion.go @@ -24,7 +24,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) @@ -523,6 +523,97 @@ func (dst *MachineHealthCheck) ConvertFrom(srcRaw conversion.Hub) error { return utilconversion.MarshalData(src, dst) } +func (src *MachinePool) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*clusterv1.MachinePool) + + if err := Convert_v1alpha4_MachinePool_To_v1beta2_MachinePool(src, dst, nil); err != nil { + return err + } + + // Reset conditions from autogenerated conversions + // NOTE: v1alpha4 conditions should not be automatically be converted into v1beta2 conditions. + dst.Status.Conditions = nil + + // Move legacy conditions (v1alpha4), failureReason, failureMessage and replica counters to the deprecated field. + dst.Status.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} + dst.Status.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} + if src.Status.Conditions != nil { + Convert_v1alpha4_Conditions_To_v1beta2_Deprecated_V1Beta1_Conditions(&src.Status.Conditions, &dst.Status.Deprecated.V1Beta1.Conditions) + } + dst.Status.Deprecated.V1Beta1.FailureReason = src.Status.FailureReason + dst.Status.Deprecated.V1Beta1.FailureMessage = src.Status.FailureMessage + dst.Status.Deprecated.V1Beta1.ReadyReplicas = src.Status.ReadyReplicas + dst.Status.Deprecated.V1Beta1.AvailableReplicas = src.Status.AvailableReplicas + dst.Status.Deprecated.V1Beta1.UnavailableReplicas = src.Status.UnavailableReplicas + + // Move BootstrapReady and InfrastructureReady to Initialization + if src.Status.BootstrapReady || src.Status.InfrastructureReady { + if dst.Status.Initialization == nil { + dst.Status.Initialization = &clusterv1.MachinePoolInitializationStatus{} + } + dst.Status.Initialization.BootstrapDataSecretCreated = src.Status.BootstrapReady + dst.Status.Initialization.InfrastructureProvisioned = src.Status.InfrastructureReady + } + dst.Spec.Template.Spec.MinReadySeconds = src.Spec.MinReadySeconds + + // Manually restore data. + restored := &clusterv1.MachinePool{} + if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + return err + } + dst.Spec.Template.Spec.ReadinessGates = restored.Spec.Template.Spec.ReadinessGates + dst.Spec.Template.Spec.NodeDeletionTimeout = restored.Spec.Template.Spec.NodeDeletionTimeout + dst.Spec.Template.Spec.NodeVolumeDetachTimeout = restored.Spec.Template.Spec.NodeVolumeDetachTimeout + dst.Status.Conditions = restored.Status.Conditions + dst.Status.AvailableReplicas = restored.Status.AvailableReplicas + dst.Status.ReadyReplicas = restored.Status.ReadyReplicas + dst.Status.UpToDateReplicas = restored.Status.UpToDateReplicas + + return nil +} + +func (dst *MachinePool) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*clusterv1.MachinePool) + + if err := Convert_v1beta2_MachinePool_To_v1alpha4_MachinePool(src, dst, nil); err != nil { + return err + } + + // Reset conditions from autogenerated conversions + // NOTE: v1beta2 conditions should not be automatically be converted into legacy conditions (v1alpha4). + dst.Status.Conditions = nil + + // Reset replica counters from autogenerated conversions + // NOTE: replica counters with a new semantic should not be automatically be converted into old replica counters. + dst.Status.ReadyReplicas = 0 + dst.Status.AvailableReplicas = 0 + + // Retrieve legacy conditions (v1alpha4), failureReason, failureMessage and replica counters from the deprecated field. + if src.Status.Deprecated != nil { + if src.Status.Deprecated.V1Beta1 != nil { + if src.Status.Deprecated.V1Beta1.Conditions != nil { + Convert_v1beta2_Deprecated_V1Beta1_Conditions_To_v1alpha4_Conditions(&src.Status.Deprecated.V1Beta1.Conditions, &dst.Status.Conditions) + } + dst.Status.FailureReason = src.Status.Deprecated.V1Beta1.FailureReason + dst.Status.FailureMessage = src.Status.Deprecated.V1Beta1.FailureMessage + dst.Status.ReadyReplicas = src.Status.Deprecated.V1Beta1.ReadyReplicas + dst.Status.AvailableReplicas = src.Status.Deprecated.V1Beta1.AvailableReplicas + dst.Status.UnavailableReplicas = src.Status.Deprecated.V1Beta1.UnavailableReplicas + } + } + + // Move initialization to old fields + if src.Status.Initialization != nil { + dst.Status.BootstrapReady = src.Status.Initialization.BootstrapDataSecretCreated + dst.Status.InfrastructureReady = src.Status.Initialization.InfrastructureProvisioned + } + + dst.Spec.MinReadySeconds = src.Spec.Template.Spec.MinReadySeconds + + // Preserve Hub data on down-conversion except for metadata + return utilconversion.MarshalData(src, dst) +} + func Convert_v1alpha4_MachineStatus_To_v1beta2_MachineStatus(in *MachineStatus, out *clusterv1.MachineStatus, s apimachineryconversion.Scope) error { // Status.version has been removed in v1beta1, thus requiring custom conversion function. the information will be dropped. return autoConvert_v1alpha4_MachineStatus_To_v1beta2_MachineStatus(in, out, s) @@ -729,3 +820,18 @@ func Convert_v1alpha4_Conditions_To_v1beta2_Deprecated_V1Beta1_Conditions(in *Co func Convert_v1alpha4_MachineSetSpec_To_v1beta2_MachineSetSpec(in *MachineSetSpec, out *clusterv1.MachineSetSpec, s apimachineryconversion.Scope) error { return autoConvert_v1alpha4_MachineSetSpec_To_v1beta2_MachineSetSpec(in, out, s) } + +func Convert_v1beta2_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in *clusterv1.MachinePoolStatus, out *MachinePoolStatus, s apimachineryconversion.Scope) error { + // V1Beta2 was added in v1beta1 + return autoConvert_v1beta2_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in, out, s) +} + +func Convert_v1alpha4_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *clusterv1.MachinePoolStatus, scope apimachineryconversion.Scope) error { + return autoConvert_v1alpha4_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in, out, scope) +} + +// Implement local conversion func because conversion-gen is not aware of conversion func in other packages (see https://github.com/kubernetes/code-generator/issues/94) + +func Convert_v1alpha4_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *clusterv1.MachinePoolSpec, s apimachineryconversion.Scope) error { + return autoConvert_v1alpha4_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in, out, s) +} diff --git a/internal/apis/core/v1alpha4/conversion_test.go b/internal/apis/core/v1alpha4/conversion_test.go index ecb7d53790ff..494cf5dd37e3 100644 --- a/internal/apis/core/v1alpha4/conversion_test.go +++ b/internal/apis/core/v1alpha4/conversion_test.go @@ -29,7 +29,7 @@ import ( runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" utilconversion "sigs.k8s.io/cluster-api/util/conversion" ) @@ -66,6 +66,11 @@ func TestFuzzyConversion(t *testing.T) { Spoke: &MachineHealthCheck{}, FuzzerFuncs: []fuzzer.FuzzerFuncs{MachineHealthCheckFuzzFunc}, })) + t.Run("for MachinePool", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ + Hub: &clusterv1.MachinePool{}, + Spoke: &MachinePool{}, + FuzzerFuncs: []fuzzer.FuzzerFuncs{MachinePoolFuzzFuncs}, + })) } func MachineFuzzFunc(_ runtimeserializer.CodecFactory) []interface{} { @@ -255,3 +260,33 @@ func hubMachineHealthCheckStatus(in *clusterv1.MachineHealthCheckStatus, c fuzz. } } } + +func MachinePoolFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} { + return []interface{}{ + hubMachinePoolStatus, + } +} + +func hubMachinePoolStatus(in *clusterv1.MachinePoolStatus, c fuzz.Continue) { + c.FuzzNoCustom(in) + // Always create struct with at least one mandatory fields. + if in.Deprecated == nil { + in.Deprecated = &clusterv1.MachinePoolDeprecatedStatus{} + } + if in.Deprecated.V1Beta1 == nil { + in.Deprecated.V1Beta1 = &clusterv1.MachinePoolV1Beta1DeprecatedStatus{} + } + + // Drop empty structs with only omit empty fields. + if in.Initialization != nil { + if reflect.DeepEqual(in.Initialization, &clusterv1.MachinePoolInitializationStatus{}) { + in.Initialization = nil + } + } + + // nil becomes &0 after hub => spoke => hub conversion + // This is acceptable as usually Replicas is set and controllers using older apiVersions are not writing MachineSet status. + if in.Replicas == nil { + in.Replicas = ptr.To(int32(0)) + } +} diff --git a/internal/apis/core/v1alpha4/doc.go b/internal/apis/core/v1alpha4/doc.go index 11f045b5bf8d..308cc702e13c 100644 --- a/internal/apis/core/v1alpha4/doc.go +++ b/internal/apis/core/v1alpha4/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package v1alpha4 contains the v1alpha4 API implementation. -// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1beta2 +// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/core/v1beta2 // // Deprecated: This package will be removed in one of the next releases. package v1alpha4 diff --git a/internal/apis/core/exp/v1alpha4/machinepool_types.go b/internal/apis/core/v1alpha4/machinepool_types.go similarity index 96% rename from internal/apis/core/exp/v1alpha4/machinepool_types.go rename to internal/apis/core/v1alpha4/machinepool_types.go index f83866718622..ce9c6f3a3b62 100644 --- a/internal/apis/core/exp/v1alpha4/machinepool_types.go +++ b/internal/apis/core/v1alpha4/machinepool_types.go @@ -21,7 +21,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" capierrors "sigs.k8s.io/cluster-api/errors" - clusterv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" ) const ( @@ -42,7 +41,7 @@ type MachinePoolSpec struct { Replicas *int32 `json:"replicas,omitempty"` // template describes the machines that will be created. - Template clusterv1alpha4.MachineTemplateSpec `json:"template"` + Template MachineTemplateSpec `json:"template"` // minReadySeconds is the minimum number of seconds for which a newly created machine instances should // be ready. @@ -119,7 +118,7 @@ type MachinePoolStatus struct { // conditions define the current service state of the MachinePool. // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` + Conditions Conditions `json:"conditions,omitempty"` } // ANCHOR_END: MachinePoolStatus @@ -226,12 +225,12 @@ type MachinePool struct { } // GetConditions returns the set of conditions for this object. -func (m *MachinePool) GetConditions() clusterv1alpha4.Conditions { +func (m *MachinePool) GetConditions() Conditions { return m.Status.Conditions } // SetConditions sets the conditions on this object. -func (m *MachinePool) SetConditions(conditions clusterv1alpha4.Conditions) { +func (m *MachinePool) SetConditions(conditions Conditions) { m.Status.Conditions = conditions } diff --git a/internal/apis/core/v1alpha4/zz_generated.conversion.go b/internal/apis/core/v1alpha4/zz_generated.conversion.go index 063aaf5e2049..c0f65ccb1f75 100644 --- a/internal/apis/core/v1alpha4/zz_generated.conversion.go +++ b/internal/apis/core/v1alpha4/zz_generated.conversion.go @@ -29,7 +29,7 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" - v1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func init() { @@ -254,6 +254,31 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*MachinePool)(nil), (*v1beta2.MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachinePool_To_v1beta2_MachinePool(a.(*MachinePool), b.(*v1beta2.MachinePool), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePool)(nil), (*MachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePool_To_v1alpha4_MachinePool(a.(*v1beta2.MachinePool), b.(*MachinePool), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*MachinePoolList)(nil), (*v1beta2.MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachinePoolList_To_v1beta2_MachinePoolList(a.(*MachinePoolList), b.(*v1beta2.MachinePoolList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolList)(nil), (*MachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePoolList_To_v1alpha4_MachinePoolList(a.(*v1beta2.MachinePoolList), b.(*MachinePoolList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.MachinePoolSpec)(nil), (*MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(a.(*v1beta2.MachinePoolSpec), b.(*MachinePoolSpec), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*MachineRollingUpdateDeployment)(nil), (*v1beta2.MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta2_MachineRollingUpdateDeployment(a.(*MachineRollingUpdateDeployment), b.(*v1beta2.MachineRollingUpdateDeployment), scope) }); err != nil { @@ -364,6 +389,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*MachinePoolSpec)(nil), (*v1beta2.MachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachinePoolSpec_To_v1beta2_MachinePoolSpec(a.(*MachinePoolSpec), b.(*v1beta2.MachinePoolSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*MachinePoolStatus)(nil), (*v1beta2.MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_MachinePoolStatus_To_v1beta2_MachinePoolStatus(a.(*MachinePoolStatus), b.(*v1beta2.MachinePoolStatus), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*MachineSetSpec)(nil), (*v1beta2.MachineSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha4_MachineSetSpec_To_v1beta2_MachineSetSpec(a.(*MachineSetSpec), b.(*v1beta2.MachineSetSpec), scope) }); err != nil { @@ -454,6 +489,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*v1beta2.MachinePoolStatus)(nil), (*MachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(a.(*v1beta2.MachinePoolStatus), b.(*MachinePoolStatus), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*v1beta2.MachineSetSpec)(nil), (*MachineSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta2_MachineSetSpec_To_v1alpha4_MachineSetSpec(a.(*v1beta2.MachineSetSpec), b.(*MachineSetSpec), scope) }); err != nil { @@ -1490,6 +1530,170 @@ func Convert_v1beta2_MachineList_To_v1alpha4_MachineList(in *v1beta2.MachineList return autoConvert_v1beta2_MachineList_To_v1alpha4_MachineList(in, out, s) } +func autoConvert_v1alpha4_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *v1beta2.MachinePool, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_MachinePoolSpec_To_v1beta2_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_MachinePoolStatus_To_v1beta2_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_MachinePool_To_v1beta2_MachinePool is an autogenerated conversion function. +func Convert_v1alpha4_MachinePool_To_v1beta2_MachinePool(in *MachinePool, out *v1beta2.MachinePool, s conversion.Scope) error { + return autoConvert_v1alpha4_MachinePool_To_v1beta2_MachinePool(in, out, s) +} + +func autoConvert_v1beta2_MachinePool_To_v1alpha4_MachinePool(in *v1beta2.MachinePool, out *MachinePool, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta2_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_MachinePool_To_v1alpha4_MachinePool is an autogenerated conversion function. +func Convert_v1beta2_MachinePool_To_v1alpha4_MachinePool(in *v1beta2.MachinePool, out *MachinePool, s conversion.Scope) error { + return autoConvert_v1beta2_MachinePool_To_v1alpha4_MachinePool(in, out, s) +} + +func autoConvert_v1alpha4_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta2.MachinePool, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_MachinePool_To_v1beta2_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_MachinePoolList_To_v1beta2_MachinePoolList is an autogenerated conversion function. +func Convert_v1alpha4_MachinePoolList_To_v1beta2_MachinePoolList(in *MachinePoolList, out *v1beta2.MachinePoolList, s conversion.Scope) error { + return autoConvert_v1alpha4_MachinePoolList_To_v1beta2_MachinePoolList(in, out, s) +} + +func autoConvert_v1beta2_MachinePoolList_To_v1alpha4_MachinePoolList(in *v1beta2.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_v1beta2_MachinePool_To_v1alpha4_MachinePool(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta2_MachinePoolList_To_v1alpha4_MachinePoolList is an autogenerated conversion function. +func Convert_v1beta2_MachinePoolList_To_v1alpha4_MachinePoolList(in *v1beta2.MachinePoolList, out *MachinePoolList, s conversion.Scope) error { + return autoConvert_v1beta2_MachinePoolList_To_v1alpha4_MachinePoolList(in, out, s) +} + +func autoConvert_v1alpha4_MachinePoolSpec_To_v1beta2_MachinePoolSpec(in *MachinePoolSpec, out *v1beta2.MachinePoolSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + if err := Convert_v1alpha4_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + // WARNING: in.MinReadySeconds requires manual conversion: does not exist in peer-type + out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) + out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) + return nil +} + +func autoConvert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { + out.ClusterName = in.ClusterName + out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + if err := Convert_v1beta2_MachineTemplateSpec_To_v1alpha4_MachineTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) + out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains)) + return nil +} + +// Convert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec is an autogenerated conversion function. +func Convert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in *v1beta2.MachinePoolSpec, out *MachinePoolSpec, s conversion.Scope) error { + return autoConvert_v1beta2_MachinePoolSpec_To_v1alpha4_MachinePoolSpec(in, out, s) +} + +func autoConvert_v1alpha4_MachinePoolStatus_To_v1beta2_MachinePoolStatus(in *MachinePoolStatus, out *v1beta2.MachinePoolStatus, s conversion.Scope) error { + out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) + if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { + return err + } + if err := v1.Convert_int32_To_Pointer_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { + return err + } + if err := v1.Convert_int32_To_Pointer_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { + return err + } + // WARNING: in.UnavailableReplicas requires manual conversion: does not exist in peer-type + // WARNING: in.FailureReason requires manual conversion: does not exist in peer-type + // WARNING: in.FailureMessage requires manual conversion: does not exist in peer-type + out.Phase = in.Phase + // WARNING: in.BootstrapReady requires manual conversion: does not exist in peer-type + // WARNING: in.InfrastructureReady requires manual conversion: does not exist in peer-type + out.ObservedGeneration = in.ObservedGeneration + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_Condition_To_v1_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + return nil +} + +func autoConvert_v1beta2_MachinePoolStatus_To_v1alpha4_MachinePoolStatus(in *v1beta2.MachinePoolStatus, out *MachinePoolStatus, s conversion.Scope) error { + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(Conditions, len(*in)) + for i := range *in { + if err := Convert_v1_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + // WARNING: in.Initialization requires manual conversion: does not exist in peer-type + out.NodeRefs = *(*[]corev1.ObjectReference)(unsafe.Pointer(&in.NodeRefs)) + if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { + return err + } + if err := v1.Convert_Pointer_int32_To_int32(&in.ReadyReplicas, &out.ReadyReplicas, s); err != nil { + return err + } + if err := v1.Convert_Pointer_int32_To_int32(&in.AvailableReplicas, &out.AvailableReplicas, s); err != nil { + return err + } + // WARNING: in.UpToDateReplicas requires manual conversion: does not exist in peer-type + out.Phase = in.Phase + out.ObservedGeneration = in.ObservedGeneration + // WARNING: in.Deprecated requires manual conversion: does not exist in peer-type + return nil +} + func autoConvert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta2_MachineRollingUpdateDeployment(in *MachineRollingUpdateDeployment, out *v1beta2.MachineRollingUpdateDeployment, s conversion.Scope) error { out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) diff --git a/internal/apis/core/v1alpha4/zz_generated.deepcopy.go b/internal/apis/core/v1alpha4/zz_generated.deepcopy.go index ac1ae21e3332..827211bb8e95 100644 --- a/internal/apis/core/v1alpha4/zz_generated.deepcopy.go +++ b/internal/apis/core/v1alpha4/zz_generated.deepcopy.go @@ -869,6 +869,138 @@ func (in *MachineList) DeepCopyObject() runtime.Object { return nil } +// 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(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 +} + // 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 diff --git a/internal/contract/controlplane.go b/internal/contract/controlplane.go index 84a9eb0529a6..a0d9c8c31669 100644 --- a/internal/contract/controlplane.go +++ b/internal/contract/controlplane.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/version" ) diff --git a/internal/contract/controlplane_test.go b/internal/contract/controlplane_test.go index a1c973c08d85..dbe83daca8e2 100644 --- a/internal/contract/controlplane_test.go +++ b/internal/contract/controlplane_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestControlPlane(t *testing.T) { diff --git a/internal/contract/infrastructure_cluster.go b/internal/contract/infrastructure_cluster.go index 7fba2ee52553..a418b2b24045 100644 --- a/internal/contract/infrastructure_cluster.go +++ b/internal/contract/infrastructure_cluster.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // InfrastructureClusterContract encodes information about the Cluster API contract for InfrastructureCluster objects diff --git a/internal/contract/infrastructure_cluster_test.go b/internal/contract/infrastructure_cluster_test.go index 1aafd1d1a01c..f4d4f33d3d6d 100644 --- a/internal/contract/infrastructure_cluster_test.go +++ b/internal/contract/infrastructure_cluster_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/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestInfrastructureCluster(t *testing.T) { diff --git a/internal/contract/infrastructure_machine.go b/internal/contract/infrastructure_machine.go index 9f2992c1ce59..afd58482d1fe 100644 --- a/internal/contract/infrastructure_machine.go +++ b/internal/contract/infrastructure_machine.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // InfrastructureMachineContract encodes information about the Cluster API contract for InfrastructureMachine objects diff --git a/internal/contract/infrastructure_machine_test.go b/internal/contract/infrastructure_machine_test.go index c3b8f47f3ac8..24e761a91646 100644 --- a/internal/contract/infrastructure_machine_test.go +++ b/internal/contract/infrastructure_machine_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/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestInfrastructureMachine(t *testing.T) { diff --git a/internal/contract/metadata.go b/internal/contract/metadata.go index 38e48a39ffdc..70bfc44c9394 100644 --- a/internal/contract/metadata.go +++ b/internal/contract/metadata.go @@ -20,7 +20,7 @@ import ( "github.com/pkg/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // Metadata provides a helper struct for working with Metadata. diff --git a/internal/contract/metadata_test.go b/internal/contract/metadata_test.go index 82e3043e5ecd..20b92773d509 100644 --- a/internal/contract/metadata_test.go +++ b/internal/contract/metadata_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/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestMetadata(t *testing.T) { diff --git a/internal/contract/version.go b/internal/contract/version.go index 79c025f6d62d..b4ab7d1deb4b 100644 --- a/internal/contract/version.go +++ b/internal/contract/version.go @@ -19,7 +19,7 @@ package contract import ( "k8s.io/apimachinery/pkg/util/sets" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/internal/controllers/cluster/cluster_controller.go b/internal/controllers/cluster/cluster_controller.go index ddbbc6533448..4e22f91028db 100644 --- a/internal/controllers/cluster/cluster_controller.go +++ b/internal/controllers/cluster/cluster_controller.go @@ -43,10 +43,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/hooks" "sigs.k8s.io/cluster-api/util" @@ -113,7 +112,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, opt ) if feature.Gates.Enabled(feature.MachinePool) { b = b.Watches( - &expv1.MachinePool{}, + &clusterv1.MachinePool{}, handler.EnqueueRequestsFromMapFunc(r.machinePoolToCluster), builder.WithPredicates(predicates.ResourceIsChanged(mgr.GetScheme(), predicateLog)), ) @@ -532,7 +531,7 @@ type clusterDescendants struct { workerMachines collections.Machines machinesToBeRemediated collections.Machines unhealthyMachines collections.Machines - machinePools expv1.MachinePoolList + machinePools clusterv1.MachinePoolList } // objectsPendingDeleteCount returns the number of descendants pending delete. @@ -790,7 +789,7 @@ func (r *Reconciler) machineDeploymentToCluster(_ context.Context, o client.Obje // machinePoolToCluster is a handler.ToRequestsFunc to be used to enqueue requests for reconciliation // for Cluster to update when one of its own MachinePools gets updated. func (r *Reconciler) machinePoolToCluster(_ context.Context, o client.Object) []ctrl.Request { - mp, ok := o.(*expv1.MachinePool) + mp, ok := o.(*clusterv1.MachinePool) if !ok { panic(fmt.Sprintf("Expected a MachinePool but got a %T", o)) } diff --git a/internal/controllers/cluster/cluster_controller_phases.go b/internal/controllers/cluster/cluster_controller_phases.go index 50f443f3c9a3..6f16880f71ab 100644 --- a/internal/controllers/cluster/cluster_controller_phases.go +++ b/internal/controllers/cluster/cluster_controller_phases.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" capierrors "sigs.k8s.io/cluster-api/errors" "sigs.k8s.io/cluster-api/internal/contract" diff --git a/internal/controllers/cluster/cluster_controller_phases_test.go b/internal/controllers/cluster/cluster_controller_phases_test.go index 239d45865c2f..bee21b65829b 100644 --- a/internal/controllers/cluster/cluster_controller_phases_test.go +++ b/internal/controllers/cluster/cluster_controller_phases_test.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/log" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" externalfake "sigs.k8s.io/cluster-api/controllers/external/fake" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" diff --git a/internal/controllers/cluster/cluster_controller_status.go b/internal/controllers/cluster/cluster_controller_status.go index e2ec14014e23..01386d9aba0e 100644 --- a/internal/controllers/cluster/cluster_controller_status.go +++ b/internal/controllers/cluster/cluster_controller_status.go @@ -31,8 +31,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/collections" @@ -71,20 +70,20 @@ func (r *Reconciler) updateStatus(ctx context.Context, s *scope) error { // replica counters setControlPlaneReplicas(ctx, s.cluster, s.controlPlane, controlPlaneContractVersion, s.descendants.controlPlaneMachines, s.controlPlaneIsNotFound, s.getDescendantsSucceeded) - setWorkersReplicas(ctx, s.cluster, expv1.MachinePoolList{}, s.descendants.machineDeployments, s.descendants.machineSets, workerMachines, s.getDescendantsSucceeded) + setWorkersReplicas(ctx, s.cluster, clusterv1.MachinePoolList{}, s.descendants.machineDeployments, s.descendants.machineSets, workerMachines, s.getDescendantsSucceeded) // conditions setInfrastructureReadyCondition(ctx, s.cluster, s.infraCluster, s.infraClusterIsNotFound) setControlPlaneAvailableCondition(ctx, s.cluster, s.controlPlane, s.controlPlaneIsNotFound) setControlPlaneInitializedCondition(ctx, s.cluster, s.controlPlane, controlPlaneContractVersion, s.descendants.controlPlaneMachines, s.infraClusterIsNotFound, s.getDescendantsSucceeded) - setWorkersAvailableCondition(ctx, s.cluster, expv1.MachinePoolList{}, s.descendants.machineDeployments, s.getDescendantsSucceeded) + setWorkersAvailableCondition(ctx, s.cluster, clusterv1.MachinePoolList{}, s.descendants.machineDeployments, s.getDescendantsSucceeded) setControlPlaneMachinesReadyCondition(ctx, s.cluster, controlPlaneMachines, s.getDescendantsSucceeded) setWorkerMachinesReadyCondition(ctx, s.cluster, workerMachines, s.getDescendantsSucceeded) setControlPlaneMachinesUpToDateCondition(ctx, s.cluster, controlPlaneMachines, s.getDescendantsSucceeded) setWorkerMachinesUpToDateCondition(ctx, s.cluster, workerMachines, s.getDescendantsSucceeded) - setRollingOutCondition(ctx, s.cluster, s.controlPlane, expv1.MachinePoolList{}, s.descendants.machineDeployments, s.controlPlaneIsNotFound, s.getDescendantsSucceeded) - setScalingUpCondition(ctx, s.cluster, s.controlPlane, expv1.MachinePoolList{}, s.descendants.machineDeployments, s.descendants.machineSets, s.controlPlaneIsNotFound, s.getDescendantsSucceeded) - setScalingDownCondition(ctx, s.cluster, s.controlPlane, expv1.MachinePoolList{}, s.descendants.machineDeployments, s.descendants.machineSets, s.controlPlaneIsNotFound, s.getDescendantsSucceeded) + setRollingOutCondition(ctx, s.cluster, s.controlPlane, clusterv1.MachinePoolList{}, s.descendants.machineDeployments, s.controlPlaneIsNotFound, s.getDescendantsSucceeded) + setScalingUpCondition(ctx, s.cluster, s.controlPlane, clusterv1.MachinePoolList{}, s.descendants.machineDeployments, s.descendants.machineSets, s.controlPlaneIsNotFound, s.getDescendantsSucceeded) + setScalingDownCondition(ctx, s.cluster, s.controlPlane, clusterv1.MachinePoolList{}, s.descendants.machineDeployments, s.descendants.machineSets, s.controlPlaneIsNotFound, s.getDescendantsSucceeded) setRemediatingCondition(ctx, s.cluster, machinesToBeRemediated, unhealthyMachines, s.getDescendantsSucceeded) setDeletingCondition(ctx, s.cluster, s.deletingReason, s.deletingMessage) setAvailableCondition(ctx, s.cluster, s.clusterClass) @@ -196,7 +195,7 @@ func setControlPlaneReplicas(_ context.Context, cluster *clusterv1.Cluster, cont cluster.Status.ControlPlane.DesiredReplicas = replicas } -func setWorkersReplicas(_ context.Context, cluster *clusterv1.Cluster, machinePools expv1.MachinePoolList, machineDeployments clusterv1.MachineDeploymentList, machineSets clusterv1.MachineSetList, workerMachines collections.Machines, getDescendantsSucceeded bool) { +func setWorkersReplicas(_ context.Context, cluster *clusterv1.Cluster, machinePools clusterv1.MachinePoolList, machineDeployments clusterv1.MachineDeploymentList, machineSets clusterv1.MachineSetList, workerMachines collections.Machines, getDescendantsSucceeded bool) { if cluster.Status.Workers == nil { cluster.Status.Workers = &clusterv1.WorkersStatus{} } @@ -602,7 +601,7 @@ func setControlPlaneInitializedCondition(ctx context.Context, cluster *clusterv1 }) } -func setWorkersAvailableCondition(ctx context.Context, cluster *clusterv1.Cluster, machinePools expv1.MachinePoolList, machineDeployments clusterv1.MachineDeploymentList, getDescendantsSucceeded bool) { +func setWorkersAvailableCondition(ctx context.Context, cluster *clusterv1.Cluster, machinePools clusterv1.MachinePoolList, machineDeployments clusterv1.MachineDeploymentList, getDescendantsSucceeded bool) { log := ctrl.LoggerFrom(ctx) // If there was some unexpected errors in listing descendants (this should never happen), surface it. @@ -833,7 +832,7 @@ func setRemediatingCondition(ctx context.Context, cluster *clusterv1.Cluster, ma }) } -func setRollingOutCondition(ctx context.Context, cluster *clusterv1.Cluster, controlPlane *unstructured.Unstructured, machinePools expv1.MachinePoolList, machineDeployments clusterv1.MachineDeploymentList, controlPlaneIsNotFound bool, getDescendantsSucceeded bool) { +func setRollingOutCondition(ctx context.Context, cluster *clusterv1.Cluster, controlPlane *unstructured.Unstructured, machinePools clusterv1.MachinePoolList, machineDeployments clusterv1.MachineDeploymentList, controlPlaneIsNotFound bool, getDescendantsSucceeded bool) { log := ctrl.LoggerFrom(ctx) // If there was some unexpected errors in getting control plane or listing descendants (this should never happen), surface it. @@ -904,7 +903,7 @@ func setRollingOutCondition(ctx context.Context, cluster *clusterv1.Cluster, con conditions.Set(cluster, *rollingOutCondition) } -func setScalingUpCondition(ctx context.Context, cluster *clusterv1.Cluster, controlPlane *unstructured.Unstructured, machinePools expv1.MachinePoolList, machineDeployments clusterv1.MachineDeploymentList, machineSets clusterv1.MachineSetList, controlPlaneIsNotFound bool, getDescendantsSucceeded bool) { +func setScalingUpCondition(ctx context.Context, cluster *clusterv1.Cluster, controlPlane *unstructured.Unstructured, machinePools clusterv1.MachinePoolList, machineDeployments clusterv1.MachineDeploymentList, machineSets clusterv1.MachineSetList, controlPlaneIsNotFound bool, getDescendantsSucceeded bool) { log := ctrl.LoggerFrom(ctx) // If there was some unexpected errors in getting control plane or listing descendants (this should never happen), surface it. @@ -981,7 +980,7 @@ func setScalingUpCondition(ctx context.Context, cluster *clusterv1.Cluster, cont conditions.Set(cluster, *scalingUpCondition) } -func setScalingDownCondition(ctx context.Context, cluster *clusterv1.Cluster, controlPlane *unstructured.Unstructured, machinePools expv1.MachinePoolList, machineDeployments clusterv1.MachineDeploymentList, machineSets clusterv1.MachineSetList, controlPlaneIsNotFound bool, getDescendantsSucceeded bool) { +func setScalingDownCondition(ctx context.Context, cluster *clusterv1.Cluster, controlPlane *unstructured.Unstructured, machinePools clusterv1.MachinePoolList, machineDeployments clusterv1.MachineDeploymentList, machineSets clusterv1.MachineSetList, controlPlaneIsNotFound bool, getDescendantsSucceeded bool) { log := ctrl.LoggerFrom(ctx) // If there was some unexpected errors in getting control plane or listing descendants (this should never happen), surface it. @@ -1219,7 +1218,7 @@ func aggregateUnhealthyMachines(machines collections.Machines) string { type aggregationWrapper struct { cp *unstructured.Unstructured - mp *expv1.MachinePool + mp *clusterv1.MachinePool md *clusterv1.MachineDeployment ms *clusterv1.MachineSet } diff --git a/internal/controllers/cluster/cluster_controller_status_test.go b/internal/controllers/cluster/cluster_controller_status_test.go index d7ee3d71a1fb..e09b65e6e4b8 100644 --- a/internal/controllers/cluster/cluster_controller_status_test.go +++ b/internal/controllers/cluster/cluster_controller_status_test.go @@ -26,8 +26,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" @@ -240,7 +239,7 @@ func TestSetWorkersReplicas(t *testing.T) { tests := []struct { name string cluster *clusterv1.Cluster - machinePools expv1.MachinePoolList + machinePools clusterv1.MachinePoolList machineDeployments clusterv1.MachineDeploymentList machineSets clusterv1.MachineSetList workerMachines collections.Machines @@ -264,7 +263,7 @@ func TestSetWorkersReplicas(t *testing.T) { { name: "counter should be nil if descendants are not reporting counters", cluster: fakeCluster("c", controlPlaneRef{}), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1"), }}, machineDeployments: clusterv1.MachineDeploymentList{Items: []clusterv1.MachineDeployment{ @@ -283,7 +282,7 @@ func TestSetWorkersReplicas(t *testing.T) { { name: "should count workers from different objects", cluster: fakeCluster("c", controlPlaneRef{}), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", desiredReplicas(1), currentReplicas(2), readyReplicas(3), availableReplicas(4), upToDateReplicas(5)), }}, machineDeployments: clusterv1.MachineDeploymentList{Items: []clusterv1.MachineDeployment{ @@ -795,7 +794,7 @@ func TestSetWorkersAvailableCondition(t *testing.T) { tests := []struct { name string cluster *clusterv1.Cluster - machinePools expv1.MachinePoolList + machinePools clusterv1.MachinePoolList machineDeployments clusterv1.MachineDeploymentList getDescendantsSucceeded bool expectCondition metav1.Condition @@ -824,7 +823,7 @@ func TestSetWorkersAvailableCondition(t *testing.T) { { name: "descendants do not report available", cluster: fakeCluster("c", controlPlaneRef{}), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1"), }}, machineDeployments: clusterv1.MachineDeploymentList{Items: []clusterv1.MachineDeployment{ @@ -842,7 +841,7 @@ func TestSetWorkersAvailableCondition(t *testing.T) { { name: "descendants report available", cluster: fakeCluster("c", controlPlaneRef{}), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", condition{ Type: clusterv1.MachineDeploymentAvailableCondition, Status: metav1.ConditionFalse, @@ -1440,7 +1439,7 @@ func TestSetRollingOutCondition(t *testing.T) { cluster *clusterv1.Cluster controlPlane *unstructured.Unstructured controlPlaneIsNotFound bool - machinePools expv1.MachinePoolList + machinePools clusterv1.MachinePoolList machineDeployments clusterv1.MachineDeploymentList getDescendantsSucceeded bool expectCondition metav1.Condition @@ -1486,7 +1485,7 @@ func TestSetRollingOutCondition(t *testing.T) { name: "cluster with controlplane, control plane & descendants do not report rolling out", cluster: fakeCluster("c", controlPlaneRef{}), controlPlane: fakeControlPlane("cp1"), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1"), }}, machineDeployments: clusterv1.MachineDeploymentList{Items: []clusterv1.MachineDeployment{ @@ -1510,7 +1509,7 @@ func TestSetRollingOutCondition(t *testing.T) { Reason: clusterv1.RollingOutReason, Message: "Rolling out 3 not up-to-date replicas", }), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", condition{ Type: clusterv1.RollingOutCondition, Status: metav1.ConditionTrue, @@ -1540,7 +1539,7 @@ func TestSetRollingOutCondition(t *testing.T) { name: "cluster with controlplane, control plane not reporting conditions, descendants report rolling out", cluster: fakeCluster("c", controlPlaneRef{}), controlPlane: fakeControlPlane("cp1"), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", condition{ Type: clusterv1.RollingOutCondition, Status: metav1.ConditionTrue, @@ -1590,7 +1589,7 @@ func TestSetRollingOutCondition(t *testing.T) { { name: "cluster without controlplane, descendants report rolling out", cluster: fakeCluster("c"), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", condition{ Type: clusterv1.RollingOutCondition, Status: metav1.ConditionTrue, @@ -1635,7 +1634,7 @@ func TestSetScalingUpCondition(t *testing.T) { cluster *clusterv1.Cluster controlPlane *unstructured.Unstructured controlPlaneIsNotFound bool - machinePools expv1.MachinePoolList + machinePools clusterv1.MachinePoolList machineDeployments clusterv1.MachineDeploymentList machineSets clusterv1.MachineSetList getDescendantsSucceeded bool @@ -1682,7 +1681,7 @@ func TestSetScalingUpCondition(t *testing.T) { name: "cluster with controlplane, control plane & descendants do not report scaling up", cluster: fakeCluster("c", controlPlaneRef{}), controlPlane: fakeControlPlane("cp1"), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1"), }}, machineDeployments: clusterv1.MachineDeploymentList{Items: []clusterv1.MachineDeployment{ @@ -1716,7 +1715,7 @@ func TestSetScalingUpCondition(t *testing.T) { Reason: clusterv1.ScalingUpReason, Message: "Scaling up from 0 to 3 replicas", }), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", condition{ Type: clusterv1.ScalingUpCondition, Status: metav1.ConditionTrue, @@ -1761,7 +1760,7 @@ func TestSetScalingUpCondition(t *testing.T) { name: "cluster with controlplane, control plane not reporting conditions, descendants report scaling up", cluster: fakeCluster("c", controlPlaneRef{}), controlPlane: fakeControlPlane("cp1"), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", condition{ Type: clusterv1.ScalingUpCondition, Status: metav1.ConditionTrue, @@ -1826,7 +1825,7 @@ func TestSetScalingUpCondition(t *testing.T) { { name: "cluster without controlplane, descendants report scaling up", cluster: fakeCluster("c"), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", condition{ Type: clusterv1.ScalingUpCondition, Status: metav1.ConditionTrue, @@ -1886,7 +1885,7 @@ func TestSetScalingDownCondition(t *testing.T) { cluster *clusterv1.Cluster controlPlane *unstructured.Unstructured controlPlaneIsNotFound bool - machinePools expv1.MachinePoolList + machinePools clusterv1.MachinePoolList machineDeployments clusterv1.MachineDeploymentList machineSets clusterv1.MachineSetList getDescendantsSucceeded bool @@ -1933,7 +1932,7 @@ func TestSetScalingDownCondition(t *testing.T) { name: "cluster with controlplane, control plane & descendants do not report scaling down", cluster: fakeCluster("c", controlPlaneRef{}), controlPlane: fakeControlPlane("cp1"), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1"), }}, machineDeployments: clusterv1.MachineDeploymentList{Items: []clusterv1.MachineDeployment{ @@ -1967,7 +1966,7 @@ func TestSetScalingDownCondition(t *testing.T) { Reason: "Foo", Message: "Scaling down from 0 to 3 replicas", }), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", condition{ Type: clusterv1.ClusterScalingDownCondition, Status: metav1.ConditionTrue, @@ -2012,7 +2011,7 @@ func TestSetScalingDownCondition(t *testing.T) { name: "cluster with controlplane, control plane not reporting conditions, descendants report scaling down", cluster: fakeCluster("c", controlPlaneRef{}), controlPlane: fakeControlPlane("cp1"), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", condition{ Type: clusterv1.ClusterScalingDownCondition, Status: metav1.ConditionTrue, @@ -2077,7 +2076,7 @@ func TestSetScalingDownCondition(t *testing.T) { { name: "cluster without controlplane, descendants report scaling down", cluster: fakeCluster("c"), - machinePools: expv1.MachinePoolList{Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{Items: []clusterv1.MachinePool{ *fakeMachinePool("mp1", condition{ Type: clusterv1.ClusterScalingDownCondition, Status: metav1.ConditionTrue, @@ -2959,11 +2958,11 @@ func fakeInfraCluster(name string, options ...fakeInfraClusterOption) *unstructu } type fakeMachinePoolOption interface { - ApplyToMachinePool(mp *expv1.MachinePool) + ApplyToMachinePool(mp *clusterv1.MachinePool) } -func fakeMachinePool(name string, options ...fakeMachinePoolOption) *expv1.MachinePool { - mp := &expv1.MachinePool{ +func fakeMachinePool(name string, options ...fakeMachinePoolOption) *clusterv1.MachinePool { + mp := &clusterv1.MachinePool{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, @@ -3058,7 +3057,7 @@ func (r desiredReplicas) ApplyToControlPlane(cp *unstructured.Unstructured) { _ = contract.ControlPlane().Replicas().Set(cp, int32(r)) } -func (r desiredReplicas) ApplyToMachinePool(mp *expv1.MachinePool) { +func (r desiredReplicas) ApplyToMachinePool(mp *clusterv1.MachinePool) { mp.Spec.Replicas = ptr.To(int32(r)) } @@ -3076,7 +3075,7 @@ func (r currentReplicas) ApplyToControlPlane(cp *unstructured.Unstructured) { _ = contract.ControlPlane().StatusReplicas().Set(cp, int32(r)) } -func (r currentReplicas) ApplyToMachinePool(mp *expv1.MachinePool) { +func (r currentReplicas) ApplyToMachinePool(mp *clusterv1.MachinePool) { mp.Status.Replicas = ptr.To(int32(r)) } @@ -3094,7 +3093,7 @@ func (r readyReplicas) ApplyToControlPlane(cp *unstructured.Unstructured) { _ = contract.ControlPlane().ReadyReplicas().Set(cp, int32(r)) } -func (r readyReplicas) ApplyToMachinePool(mp *expv1.MachinePool) { +func (r readyReplicas) ApplyToMachinePool(mp *clusterv1.MachinePool) { mp.Status.ReadyReplicas = ptr.To(int32(r)) } @@ -3112,7 +3111,7 @@ func (r availableReplicas) ApplyToControlPlane(cp *unstructured.Unstructured) { _ = contract.ControlPlane().AvailableReplicas().Set(cp, int32(r)) } -func (r availableReplicas) ApplyToMachinePool(mp *expv1.MachinePool) { +func (r availableReplicas) ApplyToMachinePool(mp *clusterv1.MachinePool) { mp.Status.AvailableReplicas = ptr.To(int32(r)) } @@ -3130,7 +3129,7 @@ func (r upToDateReplicas) ApplyToControlPlane(cp *unstructured.Unstructured) { _ = contract.ControlPlane().UpToDateReplicas(contract.Version).Set(cp, int32(r)) } -func (r upToDateReplicas) ApplyToMachinePool(mp *expv1.MachinePool) { +func (r upToDateReplicas) ApplyToMachinePool(mp *clusterv1.MachinePool) { mp.Status.UpToDateReplicas = ptr.To(int32(r)) } @@ -3158,7 +3157,7 @@ func (c condition) ApplyToCluster(cluster *clusterv1.Cluster) { conditions.Set(cluster, metav1.Condition(c)) } -func (c condition) ApplyToMachinePool(mp *expv1.MachinePool) { +func (c condition) ApplyToMachinePool(mp *clusterv1.MachinePool) { conditions.Set(mp, metav1.Condition(c)) } diff --git a/internal/controllers/cluster/cluster_controller_test.go b/internal/controllers/cluster/cluster_controller_test.go index b09df8cea213..c4a58630bba9 100644 --- a/internal/controllers/cluster/cluster_controller_test.go +++ b/internal/controllers/cluster/cluster_controller_test.go @@ -30,9 +30,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/collections" @@ -704,7 +703,7 @@ func (b *machineBuilder) build() clusterv1.Machine { } type machinePoolBuilder struct { - mp expv1.MachinePool + mp clusterv1.MachinePool } func newMachinePoolBuilder() *machinePoolBuilder { @@ -725,7 +724,7 @@ func (b *machinePoolBuilder) ownedBy(c *clusterv1.Cluster) *machinePoolBuilder { return b } -func (b *machinePoolBuilder) build() expv1.MachinePool { +func (b *machinePoolBuilder) build() clusterv1.MachinePool { return b.mp } @@ -795,8 +794,8 @@ func TestFilterOwnedDescendants(t *testing.T) { m5OwnedByCluster, }, }), - machinePools: expv1.MachinePoolList{ - Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{ + Items: []clusterv1.MachinePool{ mp1NotOwnedByCluster, mp2OwnedByCluster, mp3NotOwnedByCluster, @@ -883,8 +882,8 @@ func TestObjectsPendingDelete(t *testing.T) { newMachineBuilder().named("w7").build(), }, }), - machinePools: expv1.MachinePoolList{ - Items: []expv1.MachinePool{ + machinePools: clusterv1.MachinePoolList{ + Items: []clusterv1.MachinePool{ newMachinePoolBuilder().named("mp2").build(), newMachinePoolBuilder().named("mp1").build(), }, diff --git a/internal/controllers/cluster/suite_test.go b/internal/controllers/cluster/suite_test.go index 70a4ea255e33..3f5de63038a7 100644 --- a/internal/controllers/cluster/suite_test.go +++ b/internal/controllers/cluster/suite_test.go @@ -35,8 +35,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" machinecontroller "sigs.k8s.io/cluster-api/internal/controllers/machine" diff --git a/internal/controllers/clusterclass/clusterclass_controller.go b/internal/controllers/clusterclass/clusterclass_controller.go index 3086dba0ecae..84f27ff962c0 100644 --- a/internal/controllers/clusterclass/clusterclass_controller.go +++ b/internal/controllers/clusterclass/clusterclass_controller.go @@ -41,12 +41,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/feature" internalruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client" "sigs.k8s.io/cluster-api/internal/topology/variables" diff --git a/internal/controllers/clusterclass/clusterclass_controller_status.go b/internal/controllers/clusterclass/clusterclass_controller_status.go index 6169bc8b9c7c..3436b3dd723a 100644 --- a/internal/controllers/clusterclass/clusterclass_controller_status.go +++ b/internal/controllers/clusterclass/clusterclass_controller_status.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conditions" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" ) diff --git a/internal/controllers/clusterclass/clusterclass_controller_status_test.go b/internal/controllers/clusterclass/clusterclass_controller_status_test.go index 17d5d95e8a84..7ca6a3a2c908 100644 --- a/internal/controllers/clusterclass/clusterclass_controller_status_test.go +++ b/internal/controllers/clusterclass/clusterclass_controller_status_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/internal/controllers/clusterclass/clusterclass_controller_test.go b/internal/controllers/clusterclass/clusterclass_controller_test.go index f385b2a7e3f5..a1160bdca0af 100644 --- a/internal/controllers/clusterclass/clusterclass_controller_test.go +++ b/internal/controllers/clusterclass/clusterclass_controller_test.go @@ -39,12 +39,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/feature" fakeruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client/fake" "sigs.k8s.io/cluster-api/util/cache" diff --git a/internal/controllers/clusterclass/suite_test.go b/internal/controllers/clusterclass/suite_test.go index 2162ded9e101..a228c00e0f31 100644 --- a/internal/controllers/clusterclass/suite_test.go +++ b/internal/controllers/clusterclass/suite_test.go @@ -38,8 +38,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/feature" fakeruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client/fake" "sigs.k8s.io/cluster-api/internal/test/envtest" diff --git a/internal/controllers/clusterresourceset/clusterresourceset_controller.go b/internal/controllers/clusterresourceset/clusterresourceset_controller.go index 340b2d16f860..6f2b442f780d 100644 --- a/internal/controllers/clusterresourceset/clusterresourceset_controller.go +++ b/internal/controllers/clusterresourceset/clusterresourceset_controller.go @@ -41,7 +41,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/source" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" resourcepredicates "sigs.k8s.io/cluster-api/internal/controllers/clusterresourceset/predicates" "sigs.k8s.io/cluster-api/util" diff --git a/internal/controllers/clusterresourceset/clusterresourceset_controller_test.go b/internal/controllers/clusterresourceset/clusterresourceset_controller_test.go index bf20243f113b..a1db05501761 100644 --- a/internal/controllers/clusterresourceset/clusterresourceset_controller_test.go +++ b/internal/controllers/clusterresourceset/clusterresourceset_controller_test.go @@ -32,7 +32,7 @@ import ( "sigs.k8s.io/yaml" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/test/envtest" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/internal/controllers/clusterresourceset/clusterresourceset_helpers.go b/internal/controllers/clusterresourceset/clusterresourceset_helpers.go index b66b93ea64be..b7a4dd28a24a 100644 --- a/internal/controllers/clusterresourceset/clusterresourceset_helpers.go +++ b/internal/controllers/clusterresourceset/clusterresourceset_helpers.go @@ -38,7 +38,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" utilresource "sigs.k8s.io/cluster-api/util/resource" utilyaml "sigs.k8s.io/cluster-api/util/yaml" ) diff --git a/internal/controllers/clusterresourceset/clusterresourceset_helpers_test.go b/internal/controllers/clusterresourceset/clusterresourceset_helpers_test.go index 26b2d73037f1..0d2e5e102512 100644 --- a/internal/controllers/clusterresourceset/clusterresourceset_helpers_test.go +++ b/internal/controllers/clusterresourceset/clusterresourceset_helpers_test.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( diff --git a/internal/controllers/clusterresourceset/suite_test.go b/internal/controllers/clusterresourceset/suite_test.go index e93d95db9257..a8e6abb1bde4 100644 --- a/internal/controllers/clusterresourceset/suite_test.go +++ b/internal/controllers/clusterresourceset/suite_test.go @@ -34,8 +34,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/internal/controllers/clusterresourcesetbinding" diff --git a/internal/controllers/clusterresourcesetbinding/clusterresourcesetbinding_controller.go b/internal/controllers/clusterresourcesetbinding/clusterresourcesetbinding_controller.go index 4ac1da80464c..888b5fe72ca1 100644 --- a/internal/controllers/clusterresourcesetbinding/clusterresourcesetbinding_controller.go +++ b/internal/controllers/clusterresourcesetbinding/clusterresourcesetbinding_controller.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/hooks" "sigs.k8s.io/cluster-api/util" diff --git a/internal/controllers/machine/drain/drain.go b/internal/controllers/machine/drain/drain.go index 29d1d7820a60..2b3c9dfa9b9d 100644 --- a/internal/controllers/machine/drain/drain.go +++ b/internal/controllers/machine/drain/drain.go @@ -38,7 +38,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/webhooks" clog "sigs.k8s.io/cluster-api/util/log" ) diff --git a/internal/controllers/machine/drain/drain_test.go b/internal/controllers/machine/drain/drain_test.go index adfedec9a158..7f745e993c65 100644 --- a/internal/controllers/machine/drain/drain_test.go +++ b/internal/controllers/machine/drain/drain_test.go @@ -35,7 +35,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/client/interceptor" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestRunCordonOrUncordon(t *testing.T) { diff --git a/internal/controllers/machine/drain/filters.go b/internal/controllers/machine/drain/filters.go index fc90618c53ec..794d3d9547cc 100644 --- a/internal/controllers/machine/drain/filters.go +++ b/internal/controllers/machine/drain/filters.go @@ -32,7 +32,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // Note: This file is still mostly kept in sync with: https://github.com/kubernetes/kubernetes/blob/v1.31.0/staging/src/k8s.io/kubectl/pkg/drain/filters.go diff --git a/internal/controllers/machine/drain/filters_test.go b/internal/controllers/machine/drain/filters_test.go index bb79ab1c2798..6532485b278c 100644 --- a/internal/controllers/machine/drain/filters_test.go +++ b/internal/controllers/machine/drain/filters_test.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestSkipDeletedFilter(t *testing.T) { diff --git a/internal/controllers/machine/machine_controller.go b/internal/controllers/machine/machine_controller.go index a396b5ec2d65..074604b27683 100644 --- a/internal/controllers/machine/machine_controller.go +++ b/internal/controllers/machine/machine_controller.go @@ -47,8 +47,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/controllers/noderefutil" diff --git a/internal/controllers/machine/machine_controller_noderef.go b/internal/controllers/machine/machine_controller_noderef.go index ebf251b3aa23..3a72320bfbd8 100644 --- a/internal/controllers/machine/machine_controller_noderef.go +++ b/internal/controllers/machine/machine_controller_noderef.go @@ -32,8 +32,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/internal/controllers/machinedeployment/mdutil" "sigs.k8s.io/cluster-api/internal/util/taints" "sigs.k8s.io/cluster-api/util" diff --git a/internal/controllers/machine/machine_controller_noderef_test.go b/internal/controllers/machine/machine_controller_noderef_test.go index 14f5e69d01bb..ff14ac0b5b14 100644 --- a/internal/controllers/machine/machine_controller_noderef_test.go +++ b/internal/controllers/machine/machine_controller_noderef_test.go @@ -35,8 +35,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/internal/topology/ownerrefs" diff --git a/internal/controllers/machine/machine_controller_phases.go b/internal/controllers/machine/machine_controller_phases.go index f7e1c8916194..0af99119eef1 100644 --- a/internal/controllers/machine/machine_controller_phases.go +++ b/internal/controllers/machine/machine_controller_phases.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" capierrors "sigs.k8s.io/cluster-api/errors" "sigs.k8s.io/cluster-api/internal/contract" diff --git a/internal/controllers/machine/machine_controller_phases_test.go b/internal/controllers/machine/machine_controller_phases_test.go index e8c7f23ed330..d6b3f4d03c4f 100644 --- a/internal/controllers/machine/machine_controller_phases_test.go +++ b/internal/controllers/machine/machine_controller_phases_test.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/log" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" externalfake "sigs.k8s.io/cluster-api/controllers/external/fake" "sigs.k8s.io/cluster-api/util/test/builder" diff --git a/internal/controllers/machine/machine_controller_status.go b/internal/controllers/machine/machine_controller_status.go index 9ab7588ca2da..6fb0ca0309fb 100644 --- a/internal/controllers/machine/machine_controller_status.go +++ b/internal/controllers/machine/machine_controller_status.go @@ -31,7 +31,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/internal/controllers/machine/machine_controller_status_test.go b/internal/controllers/machine/machine_controller_status_test.go index 49365be75e60..7bf4efbd23ce 100644 --- a/internal/controllers/machine/machine_controller_status_test.go +++ b/internal/controllers/machine/machine_controller_status_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/internal/controllers/machine/machine_controller_test.go b/internal/controllers/machine/machine_controller_test.go index 01540035be76..9f72b1d29431 100644 --- a/internal/controllers/machine/machine_controller_test.go +++ b/internal/controllers/machine/machine_controller_test.go @@ -43,8 +43,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" externalfake "sigs.k8s.io/cluster-api/controllers/external/fake" diff --git a/internal/controllers/machine/suite_test.go b/internal/controllers/machine/suite_test.go index 4c8c1ea43a41..b37fc2a11bd7 100644 --- a/internal/controllers/machine/suite_test.go +++ b/internal/controllers/machine/suite_test.go @@ -35,8 +35,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" "sigs.k8s.io/cluster-api/internal/test/envtest" diff --git a/internal/controllers/machinedeployment/machinedeployment_controller.go b/internal/controllers/machinedeployment/machinedeployment_controller.go index edc7b69553cf..abb49972eed4 100644 --- a/internal/controllers/machinedeployment/machinedeployment_controller.go +++ b/internal/controllers/machinedeployment/machinedeployment_controller.go @@ -36,7 +36,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/internal/util/ssa" "sigs.k8s.io/cluster-api/util" diff --git a/internal/controllers/machinedeployment/machinedeployment_controller_test.go b/internal/controllers/machinedeployment/machinedeployment_controller_test.go index 7243658abecd..78f014b35779 100644 --- a/internal/controllers/machinedeployment/machinedeployment_controller_test.go +++ b/internal/controllers/machinedeployment/machinedeployment_controller_test.go @@ -32,7 +32,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/internal/util/ssa" "sigs.k8s.io/cluster-api/util" diff --git a/internal/controllers/machinedeployment/machinedeployment_rolling.go b/internal/controllers/machinedeployment/machinedeployment_rolling.go index c832cbe9f661..2e4a4cac9c94 100644 --- a/internal/controllers/machinedeployment/machinedeployment_rolling.go +++ b/internal/controllers/machinedeployment/machinedeployment_rolling.go @@ -26,7 +26,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/controllers/machinedeployment/mdutil" "sigs.k8s.io/cluster-api/util/patch" ) diff --git a/internal/controllers/machinedeployment/machinedeployment_rolling_test.go b/internal/controllers/machinedeployment/machinedeployment_rolling_test.go index 57c408d985ad..285b0680c67e 100644 --- a/internal/controllers/machinedeployment/machinedeployment_rolling_test.go +++ b/internal/controllers/machinedeployment/machinedeployment_rolling_test.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/controllers/machinedeployment/mdutil" ) diff --git a/internal/controllers/machinedeployment/machinedeployment_rollout_ondelete.go b/internal/controllers/machinedeployment/machinedeployment_rollout_ondelete.go index 73f770f76c0c..dc147e9e8ac1 100644 --- a/internal/controllers/machinedeployment/machinedeployment_rollout_ondelete.go +++ b/internal/controllers/machinedeployment/machinedeployment_rollout_ondelete.go @@ -26,7 +26,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/controllers/machinedeployment/mdutil" "sigs.k8s.io/cluster-api/util/patch" ) diff --git a/internal/controllers/machinedeployment/machinedeployment_status.go b/internal/controllers/machinedeployment/machinedeployment_status.go index da8d54835237..d625ee83b041 100644 --- a/internal/controllers/machinedeployment/machinedeployment_status.go +++ b/internal/controllers/machinedeployment/machinedeployment_status.go @@ -31,7 +31,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/controllers/machinedeployment/mdutil" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/internal/controllers/machinedeployment/machinedeployment_status_test.go b/internal/controllers/machinedeployment/machinedeployment_status_test.go index 91a7df4cd248..0131656f8563 100644 --- a/internal/controllers/machinedeployment/machinedeployment_status_test.go +++ b/internal/controllers/machinedeployment/machinedeployment_status_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/internal/controllers/machinedeployment/machinedeployment_sync.go b/internal/controllers/machinedeployment/machinedeployment_sync.go index 966c34579faa..4cc118e72506 100644 --- a/internal/controllers/machinedeployment/machinedeployment_sync.go +++ b/internal/controllers/machinedeployment/machinedeployment_sync.go @@ -35,7 +35,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/controllers/machinedeployment/mdutil" "sigs.k8s.io/cluster-api/internal/util/hash" "sigs.k8s.io/cluster-api/internal/util/ssa" diff --git a/internal/controllers/machinedeployment/machinedeployment_sync_test.go b/internal/controllers/machinedeployment/machinedeployment_sync_test.go index a781362bc843..1ecd8efdb83f 100644 --- a/internal/controllers/machinedeployment/machinedeployment_sync_test.go +++ b/internal/controllers/machinedeployment/machinedeployment_sync_test.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/controllers/machinedeployment/mdutil" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" ) diff --git a/internal/controllers/machinedeployment/mdutil/util.go b/internal/controllers/machinedeployment/mdutil/util.go index a630e44ecb9d..be26c1ac4d67 100644 --- a/internal/controllers/machinedeployment/mdutil/util.go +++ b/internal/controllers/machinedeployment/mdutil/util.go @@ -38,7 +38,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/internal/controllers/machinedeployment/mdutil/util_test.go b/internal/controllers/machinedeployment/mdutil/util_test.go index 208a38f1346f..f3c8554ad5b9 100644 --- a/internal/controllers/machinedeployment/mdutil/util_test.go +++ b/internal/controllers/machinedeployment/mdutil/util_test.go @@ -33,7 +33,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/internal/controllers/machinedeployment/suite_test.go b/internal/controllers/machinedeployment/suite_test.go index b1b6d3db2e93..f6ce389ccad4 100644 --- a/internal/controllers/machinedeployment/suite_test.go +++ b/internal/controllers/machinedeployment/suite_test.go @@ -40,8 +40,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" machinecontroller "sigs.k8s.io/cluster-api/internal/controllers/machine" diff --git a/internal/controllers/machinehealthcheck/machinehealthcheck_controller.go b/internal/controllers/machinehealthcheck/machinehealthcheck_controller.go index 60cc929a9e89..25da8ef1dc5b 100644 --- a/internal/controllers/machinehealthcheck/machinehealthcheck_controller.go +++ b/internal/controllers/machinehealthcheck/machinehealthcheck_controller.go @@ -44,8 +44,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/internal/controllers/machine" diff --git a/internal/controllers/machinehealthcheck/machinehealthcheck_controller_test.go b/internal/controllers/machinehealthcheck/machinehealthcheck_controller_test.go index 095893ff422e..19eaad11c2db 100644 --- a/internal/controllers/machinehealthcheck/machinehealthcheck_controller_test.go +++ b/internal/controllers/machinehealthcheck/machinehealthcheck_controller_test.go @@ -41,8 +41,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/internal/webhooks" "sigs.k8s.io/cluster-api/util" diff --git a/internal/controllers/machinehealthcheck/machinehealthcheck_status_matcher_test.go b/internal/controllers/machinehealthcheck/machinehealthcheck_status_matcher_test.go index c5e96f10c07d..939321699d12 100644 --- a/internal/controllers/machinehealthcheck/machinehealthcheck_status_matcher_test.go +++ b/internal/controllers/machinehealthcheck/machinehealthcheck_status_matcher_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" "github.com/onsi/gomega/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" ) diff --git a/internal/controllers/machinehealthcheck/machinehealthcheck_targets.go b/internal/controllers/machinehealthcheck/machinehealthcheck_targets.go index b7f6f5e32f7f..3ad6d6790d8d 100644 --- a/internal/controllers/machinehealthcheck/machinehealthcheck_targets.go +++ b/internal/controllers/machinehealthcheck/machinehealthcheck_targets.go @@ -30,7 +30,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/internal/controllers/machinehealthcheck/machinehealthcheck_targets_test.go b/internal/controllers/machinehealthcheck/machinehealthcheck_targets_test.go index 810f6478a028..f6c6939fdfe0 100644 --- a/internal/controllers/machinehealthcheck/machinehealthcheck_targets_test.go +++ b/internal/controllers/machinehealthcheck/machinehealthcheck_targets_test.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conditions" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" "sigs.k8s.io/cluster-api/util/patch" diff --git a/internal/controllers/machinehealthcheck/suite_test.go b/internal/controllers/machinehealthcheck/suite_test.go index 5c4abf96e4cc..e55e63f4c5c5 100644 --- a/internal/controllers/machinehealthcheck/suite_test.go +++ b/internal/controllers/machinehealthcheck/suite_test.go @@ -32,8 +32,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" machinecontroller "sigs.k8s.io/cluster-api/internal/controllers/machine" diff --git a/internal/controllers/machineset/machineset_controller.go b/internal/controllers/machineset/machineset_controller.go index fd2876ea25ad..62ff012075f9 100644 --- a/internal/controllers/machineset/machineset_controller.go +++ b/internal/controllers/machineset/machineset_controller.go @@ -44,7 +44,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/controllers/noderefutil" diff --git a/internal/controllers/machineset/machineset_controller_status.go b/internal/controllers/machineset/machineset_controller_status.go index 5e031503d514..b10f22d23911 100644 --- a/internal/controllers/machineset/machineset_controller_status.go +++ b/internal/controllers/machineset/machineset_controller_status.go @@ -30,7 +30,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" clog "sigs.k8s.io/cluster-api/util/log" diff --git a/internal/controllers/machineset/machineset_controller_status_test.go b/internal/controllers/machineset/machineset_controller_status_test.go index 012864095aed..4504277cad75 100644 --- a/internal/controllers/machineset/machineset_controller_status_test.go +++ b/internal/controllers/machineset/machineset_controller_status_test.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/internal/controllers/machineset/machineset_controller_test.go b/internal/controllers/machineset/machineset_controller_test.go index d36610fc056d..5dc3c033e075 100644 --- a/internal/controllers/machineset/machineset_controller_test.go +++ b/internal/controllers/machineset/machineset_controller_test.go @@ -42,7 +42,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/internal/util/ssa" diff --git a/internal/controllers/machineset/machineset_delete_policy.go b/internal/controllers/machineset/machineset_delete_policy.go index e5d06017f1b1..5c3eba3777b7 100644 --- a/internal/controllers/machineset/machineset_delete_policy.go +++ b/internal/controllers/machineset/machineset_delete_policy.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/internal/controllers/machineset/machineset_delete_policy_test.go b/internal/controllers/machineset/machineset_delete_policy_test.go index 5b83dc16d2cb..58df2c142b32 100644 --- a/internal/controllers/machineset/machineset_delete_policy_test.go +++ b/internal/controllers/machineset/machineset_delete_policy_test.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/rand" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestMachineToDelete(t *testing.T) { diff --git a/internal/controllers/machineset/machineset_preflight.go b/internal/controllers/machineset/machineset_preflight.go index 81986b33f76e..5dcc2f876d26 100644 --- a/internal/controllers/machineset/machineset_preflight.go +++ b/internal/controllers/machineset/machineset_preflight.go @@ -32,8 +32,8 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/contract" diff --git a/internal/controllers/machineset/machineset_preflight_test.go b/internal/controllers/machineset/machineset_preflight_test.go index 8d3916fef408..7b4f36dab22f 100644 --- a/internal/controllers/machineset/machineset_preflight_test.go +++ b/internal/controllers/machineset/machineset_preflight_test.go @@ -29,8 +29,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/util/test/builder" diff --git a/internal/controllers/machineset/suite_test.go b/internal/controllers/machineset/suite_test.go index ef92cd8a5707..3d5a19eabb2b 100644 --- a/internal/controllers/machineset/suite_test.go +++ b/internal/controllers/machineset/suite_test.go @@ -39,8 +39,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" machinecontroller "sigs.k8s.io/cluster-api/internal/controllers/machine" diff --git a/internal/controllers/topology/cluster/blueprint.go b/internal/controllers/topology/cluster/blueprint.go index 84fb9efe9df0..92465a9e3f9a 100644 --- a/internal/controllers/topology/cluster/blueprint.go +++ b/internal/controllers/topology/cluster/blueprint.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "k8s.io/klog/v2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/exp/topology/scope" ) diff --git a/internal/controllers/topology/cluster/blueprint_test.go b/internal/controllers/topology/cluster/blueprint_test.go index 4d37d5f73481..8b0f650e30bb 100644 --- a/internal/controllers/topology/cluster/blueprint_test.go +++ b/internal/controllers/topology/cluster/blueprint_test.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" . "sigs.k8s.io/controller-runtime/pkg/envtest/komega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/internal/controllers/topology/cluster/cluster_controller.go b/internal/controllers/topology/cluster/cluster_controller.go index e98af75762dd..aef1b601826a 100644 --- a/internal/controllers/topology/cluster/cluster_controller.go +++ b/internal/controllers/topology/cluster/cluster_controller.go @@ -43,16 +43,15 @@ import ( "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/external" externalfake "sigs.k8s.io/cluster-api/controllers/external/fake" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/exp/topology/desiredstate" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/feature" @@ -136,7 +135,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, opt )), ). Watches( - &expv1.MachinePool{}, + &clusterv1.MachinePool{}, handler.EnqueueRequestsFromMapFunc(r.machinePoolToCluster), // Only trigger Cluster reconciliation if the MachinePool is topology owned, the resource is changed. builder.WithPredicates(predicates.All(mgr.GetScheme(), predicateLog, @@ -519,7 +518,7 @@ func (r *Reconciler) machineDeploymentToCluster(_ context.Context, o client.Obje // machinePoolToCluster is a handler.ToRequestsFunc to be used to enqueue requests for reconciliation // for Cluster to update when one of its own MachinePools gets updated. func (r *Reconciler) machinePoolToCluster(_ context.Context, o client.Object) []ctrl.Request { - mp, ok := o.(*expv1.MachinePool) + mp, ok := o.(*clusterv1.MachinePool) if !ok { panic(fmt.Sprintf("Expected a MachinePool but got a %T", o)) } diff --git a/internal/controllers/topology/cluster/cluster_controller_test.go b/internal/controllers/topology/cluster/cluster_controller_test.go index e508cab1655e..6af6c6614db7 100644 --- a/internal/controllers/topology/cluster/cluster_controller_test.go +++ b/internal/controllers/topology/cluster/cluster_controller_test.go @@ -33,11 +33,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/contract" @@ -1114,13 +1113,13 @@ func assertMachineDeploymentsReconcile(cluster *clusterv1.Cluster) error { // 4) Have the correct Kind/APIVersion and Labels/Annotations for BoostrapRef and InfrastructureRef templates. func assertMachinePoolsReconcile(cluster *clusterv1.Cluster) error { // List all created machine pools to assert the expected numbers are created. - machinePools := &expv1.MachinePoolList{} + machinePools := &clusterv1.MachinePoolList{} if err := env.List(ctx, machinePools, client.InNamespace(cluster.Namespace)); err != nil { return err } // clusterMPs will hold the MachinePools that have labels associating them with the cluster. - clusterMPs := []expv1.MachinePool{} + clusterMPs := []clusterv1.MachinePool{} // Run through all machine pools and add only those with the TopologyOwnedLabel and the correct // ClusterNameLabel to the items for further testing. diff --git a/internal/controllers/topology/cluster/conditions.go b/internal/controllers/topology/cluster/conditions.go index 19198aa4f8d0..db731907812b 100644 --- a/internal/controllers/topology/cluster/conditions.go +++ b/internal/controllers/topology/cluster/conditions.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/util/annotations" diff --git a/internal/controllers/topology/cluster/conditions_test.go b/internal/controllers/topology/cluster/conditions_test.go index d56a21f23a5c..4dbdaf1e95b2 100644 --- a/internal/controllers/topology/cluster/conditions_test.go +++ b/internal/controllers/topology/cluster/conditions_test.go @@ -30,9 +30,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util/conditions" @@ -44,7 +43,6 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) { g := NewWithT(t) scheme := runtime.NewScheme() g.Expect(clusterv1.AddToScheme(scheme)).To(Succeed()) - g.Expect(expv1.AddToScheme(scheme)).To(Succeed()) deletionTime := metav1.Unix(0, 0) tests := []struct { @@ -323,10 +321,10 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) { "mp0": &scope.MachinePoolState{ Object: builder.MachinePool("ns1", "mp0-abc123"). WithReplicas(2). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ Replicas: ptr.To(int32(1)), - Deprecated: &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + Deprecated: &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: int32(1), AvailableReplicas: int32(1), UnavailableReplicas: int32(0), @@ -422,10 +420,10 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) { "mp0": &scope.MachinePoolState{ Object: builder.MachinePool("ns1", "mp0-abc123"). WithReplicas(2). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ Replicas: ptr.To(int32(2)), - Deprecated: &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + Deprecated: &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: int32(2), AvailableReplicas: int32(2), UnavailableReplicas: int32(0), @@ -620,11 +618,11 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) { Object: builder.MachinePool("ns1", "mp0-abc123"). WithReplicas(2). WithVersion("v1.22.0"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ // mp is not ready because we don't have 2 updated, ready and available replicas. Replicas: ptr.To(int32(2)), - Deprecated: &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + Deprecated: &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: int32(1), AvailableReplicas: int32(1), UnavailableReplicas: int32(0), @@ -637,10 +635,10 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) { Object: builder.MachinePool("ns1", "mp1-abc123"). WithReplicas(2). WithVersion("v1.21.2"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ Replicas: ptr.To(int32(2)), - Deprecated: &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + Deprecated: &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: int32(2), AvailableReplicas: int32(2), UnavailableReplicas: int32(0), @@ -760,10 +758,10 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) { Object: builder.MachinePool("ns1", "mp0-abc123"). WithReplicas(2). WithVersion("v1.22.0"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ Replicas: ptr.To(int32(2)), - Deprecated: &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + Deprecated: &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: int32(2), AvailableReplicas: int32(2), UnavailableReplicas: int32(0), @@ -776,10 +774,10 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) { Object: builder.MachinePool("ns1", "mp1-abc123"). WithReplicas(2). WithVersion("v1.21.2"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ Replicas: ptr.To(int32(2)), - Deprecated: &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + Deprecated: &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: int32(2), AvailableReplicas: int32(2), UnavailableReplicas: int32(0), @@ -854,10 +852,10 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) { Object: builder.MachinePool("ns1", "mp0-abc123"). WithReplicas(2). WithVersion("v1.22.0"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ Replicas: ptr.To(int32(1)), - Deprecated: &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + Deprecated: &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: int32(1), AvailableReplicas: int32(1), UnavailableReplicas: int32(0), @@ -870,10 +868,10 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) { Object: builder.MachinePool("ns1", "mp1-abc123"). WithReplicas(2). WithVersion("v1.22.0"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ Replicas: ptr.To(int32(2)), - Deprecated: &expv1.MachinePoolDeprecatedStatus{ - V1Beta1: &expv1.MachinePoolV1Beta1DeprecatedStatus{ + Deprecated: &clusterv1.MachinePoolDeprecatedStatus{ + V1Beta1: &clusterv1.MachinePoolV1Beta1DeprecatedStatus{ ReadyReplicas: int32(2), AvailableReplicas: int32(2), UnavailableReplicas: int32(0), diff --git a/internal/controllers/topology/cluster/current_state.go b/internal/controllers/topology/cluster/current_state.go index fbb024537ce5..d7c31ae346ef 100644 --- a/internal/controllers/topology/cluster/current_state.go +++ b/internal/controllers/topology/cluster/current_state.go @@ -28,8 +28,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/util/labels" @@ -298,7 +297,7 @@ func (r *Reconciler) getCurrentMachinePoolState(ctx context.Context, blueprintMa // Note: This is a cached list call. We ensure in reconcile_state that the cache is up-to-date // after we create/update a MachinePool and we double-check if an MP already exists before // we create it. - mp := &expv1.MachinePoolList{} + mp := &clusterv1.MachinePoolList{} err := r.Client.List(ctx, mp, client.MatchingLabels{ clusterv1.ClusterNameLabel: cluster.Name, diff --git a/internal/controllers/topology/cluster/current_state_test.go b/internal/controllers/topology/cluster/current_state_test.go index 26d63e024694..eea71a182e3c 100644 --- a/internal/controllers/topology/cluster/current_state_test.go +++ b/internal/controllers/topology/cluster/current_state_test.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" . "sigs.k8s.io/controller-runtime/pkg/envtest/komega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/internal/topology/selectors" "sigs.k8s.io/cluster-api/util/test/builder" diff --git a/internal/controllers/topology/cluster/patches/api/interface.go b/internal/controllers/topology/cluster/patches/api/interface.go index b1cbfba42a76..21d0b3e3ea49 100644 --- a/internal/controllers/topology/cluster/patches/api/interface.go +++ b/internal/controllers/topology/cluster/patches/api/interface.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" ) // Generator defines a component that can generate patches for ClusterClass templates. diff --git a/internal/controllers/topology/cluster/patches/engine.go b/internal/controllers/topology/cluster/patches/engine.go index 12b83221417c..4588c71ddf2b 100644 --- a/internal/controllers/topology/cluster/patches/engine.go +++ b/internal/controllers/topology/cluster/patches/engine.go @@ -29,10 +29,9 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/contract" @@ -243,7 +242,7 @@ func getMDTopologyFromMD(blueprint *scope.ClusterBlueprint, md *clusterv1.Machin return mdTopology, nil } -func getMPTopologyFromMP(blueprint *scope.ClusterBlueprint, mp *expv1.MachinePool) (*clusterv1.MachinePoolTopology, error) { +func getMPTopologyFromMP(blueprint *scope.ClusterBlueprint, mp *clusterv1.MachinePool) (*clusterv1.MachinePoolTopology, error) { topologyName, ok := mp.Labels[clusterv1.ClusterTopologyMachinePoolNameLabel] if !ok { return nil, errors.Errorf("failed to get topology name for %s", klog.KObj(mp)) @@ -358,7 +357,7 @@ func createRequest(blueprint *scope.ClusterBlueprint, desired *scope.ClusterStat // Add the BootstrapTemplate. t, err := newRequestItemBuilder(mpClass.BootstrapTemplate). - WithHolder(mp.Object, expv1.GroupVersion.WithKind("MachinePool"), "spec.template.spec.bootstrap.configRef"). + WithHolder(mp.Object, clusterv1.GroupVersion.WithKind("MachinePool"), "spec.template.spec.bootstrap.configRef"). Build() if err != nil { return nil, errors.Wrapf(err, "failed to prepare %s %s for MachinePool topology %s for patching", @@ -368,7 +367,7 @@ func createRequest(blueprint *scope.ClusterBlueprint, desired *scope.ClusterStat // Add the InfrastructureMachineTemplate. t, err = newRequestItemBuilder(mpClass.InfrastructureMachinePoolTemplate). - WithHolder(mp.Object, expv1.GroupVersion.WithKind("MachinePool"), "spec.template.spec.infrastructureRef"). + WithHolder(mp.Object, clusterv1.GroupVersion.WithKind("MachinePool"), "spec.template.spec.infrastructureRef"). Build() if err != nil { return nil, errors.Wrapf(err, "failed to prepare %s %s for MachinePool topology %s for patching", diff --git a/internal/controllers/topology/cluster/patches/engine_test.go b/internal/controllers/topology/cluster/patches/engine_test.go index 2394dbde9ba4..c098d27572b8 100644 --- a/internal/controllers/topology/cluster/patches/engine_test.go +++ b/internal/controllers/topology/cluster/patches/engine_test.go @@ -33,9 +33,9 @@ import ( "k8s.io/utils/ptr" . "sigs.k8s.io/controller-runtime/pkg/envtest/komega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/feature" fakeruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client/fake" diff --git a/internal/controllers/topology/cluster/patches/external/external_patch_generator.go b/internal/controllers/topology/cluster/patches/external/external_patch_generator.go index dec38228b20a..6090cfcf0fcf 100644 --- a/internal/controllers/topology/cluster/patches/external/external_patch_generator.go +++ b/internal/controllers/topology/cluster/patches/external/external_patch_generator.go @@ -23,9 +23,9 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/controllers/topology/cluster/patches/api" ) diff --git a/internal/controllers/topology/cluster/patches/external/external_patch_generator_test.go b/internal/controllers/topology/cluster/patches/external/external_patch_generator_test.go index 200fa8f27857..25cc8380511b 100644 --- a/internal/controllers/topology/cluster/patches/external/external_patch_generator_test.go +++ b/internal/controllers/topology/cluster/patches/external/external_patch_generator_test.go @@ -25,11 +25,11 @@ import ( utilfeature "k8s.io/component-base/featuregate/testing" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/feature" ) diff --git a/internal/controllers/topology/cluster/patches/external/external_validator.go b/internal/controllers/topology/cluster/patches/external/external_validator.go index 7a491289f584..2d0aec4b3621 100644 --- a/internal/controllers/topology/cluster/patches/external/external_validator.go +++ b/internal/controllers/topology/cluster/patches/external/external_validator.go @@ -23,9 +23,9 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/controllers/topology/cluster/patches/api" ) diff --git a/internal/controllers/topology/cluster/patches/inline/json_patch_generator.go b/internal/controllers/topology/cluster/patches/inline/json_patch_generator.go index 2ad88d0d5c72..c9b4848df89c 100644 --- a/internal/controllers/topology/cluster/patches/inline/json_patch_generator.go +++ b/internal/controllers/topology/cluster/patches/inline/json_patch_generator.go @@ -32,8 +32,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" "sigs.k8s.io/cluster-api/exp/runtime/topologymutation" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/internal/controllers/topology/cluster/patches/api" diff --git a/internal/controllers/topology/cluster/patches/inline/json_patch_generator_test.go b/internal/controllers/topology/cluster/patches/inline/json_patch_generator_test.go index 028663efde30..1fd7b0844edc 100644 --- a/internal/controllers/topology/cluster/patches/inline/json_patch_generator_test.go +++ b/internal/controllers/topology/cluster/patches/inline/json_patch_generator_test.go @@ -29,8 +29,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" ) func TestGenerate(t *testing.T) { diff --git a/internal/controllers/topology/cluster/patches/template.go b/internal/controllers/topology/cluster/patches/template.go index 2029aa818c62..d11bdea68d88 100644 --- a/internal/controllers/topology/cluster/patches/template.go +++ b/internal/controllers/topology/cluster/patches/template.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" "sigs.k8s.io/controller-runtime/pkg/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" "sigs.k8s.io/cluster-api/internal/controllers/topology/cluster/patches/variables" ) diff --git a/internal/controllers/topology/cluster/patches/variables/variables.go b/internal/controllers/topology/cluster/patches/variables/variables.go index 2c3f2b384143..05dab59a0762 100644 --- a/internal/controllers/topology/cluster/patches/variables/variables.go +++ b/internal/controllers/topology/cluster/patches/variables/variables.go @@ -25,10 +25,9 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/utils/ptr" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" "sigs.k8s.io/cluster-api/internal/contract" ) @@ -222,7 +221,7 @@ func MachineDeployment(mdTopology *clusterv1.MachineDeploymentTopology, md *clus } // MachinePool returns variables that apply to templates belonging to a MachinePool. -func MachinePool(mpTopology *clusterv1.MachinePoolTopology, mp *expv1.MachinePool, mpBootstrapObject, mpInfrastructureMachinePool *unstructured.Unstructured, patchVariableDefinitions map[string]bool) ([]runtimehooksv1.Variable, error) { +func MachinePool(mpTopology *clusterv1.MachinePoolTopology, mp *clusterv1.MachinePool, mpBootstrapObject, mpInfrastructureMachinePool *unstructured.Unstructured, patchVariableDefinitions map[string]bool) ([]runtimehooksv1.Variable, error) { variables := []runtimehooksv1.Variable{} // Add variables overrides for the MachinePool. diff --git a/internal/controllers/topology/cluster/patches/variables/variables_test.go b/internal/controllers/topology/cluster/patches/variables/variables_test.go index 0b407643b9d3..e933728342bd 100644 --- a/internal/controllers/topology/cluster/patches/variables/variables_test.go +++ b/internal/controllers/topology/cluster/patches/variables/variables_test.go @@ -28,9 +28,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" "sigs.k8s.io/cluster-api/util/test/builder" ) @@ -1013,7 +1012,7 @@ func TestMachinePool(t *testing.T) { name string mpTopology *clusterv1.MachinePoolTopology variableDefinitionsForPatch map[string]bool - mp *expv1.MachinePool + mp *clusterv1.MachinePool mpBootstrapConfig *unstructured.Unstructured mpInfrastructureMachinePool *unstructured.Unstructured want []runtimehooksv1.Variable diff --git a/internal/controllers/topology/cluster/reconcile_state.go b/internal/controllers/topology/cluster/reconcile_state.go index 2e09ba3d29e5..9300e86d1ce8 100644 --- a/internal/controllers/topology/cluster/reconcile_state.go +++ b/internal/controllers/topology/cluster/reconcile_state.go @@ -36,10 +36,9 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/contract" @@ -890,7 +889,7 @@ func (r *Reconciler) reconcileMachinePools(ctx context.Context, s *scope.Scope) func (r *Reconciler) getCurrentMachinePools(ctx context.Context, s *scope.Scope) (sets.Set[string], error) { // TODO: We should consider using PartialObjectMetadataList here. Currently this doesn't work as our // implementation for topology dryrun doesn't support PartialObjectMetadataList. - mpList := &expv1.MachinePoolList{} + mpList := &clusterv1.MachinePoolList{} err := r.APIReader.List(ctx, mpList, client.MatchingLabels{ clusterv1.ClusterNameLabel: s.Current.Cluster.Name, @@ -996,7 +995,7 @@ func (r *Reconciler) createMachinePool(ctx context.Context, s *scope.Scope, mp * // miss a newly created MachinePool (because the cache might be stale). err = wait.PollUntilContextTimeout(ctx, 5*time.Millisecond, 5*time.Second, true, func(ctx context.Context) (bool, error) { key := client.ObjectKey{Namespace: mp.Object.Namespace, Name: mp.Object.Name} - if err := r.Client.Get(ctx, key, &expv1.MachinePool{}); err != nil { + if err := r.Client.Get(ctx, key, &clusterv1.MachinePool{}); err != nil { if apierrors.IsNotFound(err) { return false, nil } @@ -1071,7 +1070,7 @@ func (r *Reconciler) updateMachinePool(ctx context.Context, s *scope.Scope, mpTo // version here guarantees that we see the changes of our own update. err = wait.PollUntilContextTimeout(ctx, 5*time.Millisecond, 5*time.Second, true, func(ctx context.Context) (bool, error) { key := client.ObjectKey{Namespace: currentMP.Object.GetNamespace(), Name: currentMP.Object.GetName()} - cachedMP := &expv1.MachinePool{} + cachedMP := &clusterv1.MachinePool{} if err := r.Client.Get(ctx, key, cachedMP); err != nil { return false, err } @@ -1085,7 +1084,7 @@ func (r *Reconciler) updateMachinePool(ctx context.Context, s *scope.Scope, mpTo return nil } -func logMachinePoolVersionChange(current, desired *expv1.MachinePool) string { +func logMachinePoolVersionChange(current, desired *clusterv1.MachinePool) string { if current.Spec.Template.Spec.Version == nil || desired.Spec.Template.Spec.Version == nil { return "" } diff --git a/internal/controllers/topology/cluster/reconcile_state_test.go b/internal/controllers/topology/cluster/reconcile_state_test.go index 24ef9ab17f09..00ce08d65354 100644 --- a/internal/controllers/topology/cluster/reconcile_state_test.go +++ b/internal/controllers/topology/cluster/reconcile_state_test.go @@ -39,11 +39,10 @@ import ( . "sigs.k8s.io/controller-runtime/pkg/envtest/komega" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/exp/topology/desiredstate" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/internal/contract" @@ -2644,7 +2643,7 @@ func TestReconcileMachinePools(t *testing.T) { } g.Expect(err).ToNot(HaveOccurred()) - var gotMachinePoolList expv1.MachinePoolList + var gotMachinePoolList clusterv1.MachinePoolList g.Expect(env.GetAPIReader().List(ctx, &gotMachinePoolList, &client.ListOptions{Namespace: namespace.GetName()})).To(Succeed()) g.Expect(gotMachinePoolList.Items).To(HaveLen(len(tt.want))) diff --git a/internal/controllers/topology/cluster/structuredmerge/dryrun.go b/internal/controllers/topology/cluster/structuredmerge/dryrun.go index 97a2b3c95968..3e1231b14b97 100644 --- a/internal/controllers/topology/cluster/structuredmerge/dryrun.go +++ b/internal/controllers/topology/cluster/structuredmerge/dryrun.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/internal/util/ssa" "sigs.k8s.io/cluster-api/util/conversion" diff --git a/internal/controllers/topology/cluster/structuredmerge/dryrun_test.go b/internal/controllers/topology/cluster/structuredmerge/dryrun_test.go index a2ecb69bbfde..d4e36ec1e080 100644 --- a/internal/controllers/topology/cluster/structuredmerge/dryrun_test.go +++ b/internal/controllers/topology/cluster/structuredmerge/dryrun_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conversion" ) diff --git a/internal/controllers/topology/cluster/structuredmerge/options.go b/internal/controllers/topology/cluster/structuredmerge/options.go index 0db49c326152..0b94c8c1948b 100644 --- a/internal/controllers/topology/cluster/structuredmerge/options.go +++ b/internal/controllers/topology/cluster/structuredmerge/options.go @@ -19,7 +19,7 @@ package structuredmerge import ( "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/internal/util/ssa" ) diff --git a/internal/controllers/topology/cluster/structuredmerge/serversidepathhelper_test.go b/internal/controllers/topology/cluster/structuredmerge/serversidepathhelper_test.go index 1c52d8155d9b..ad998d9f483e 100644 --- a/internal/controllers/topology/cluster/structuredmerge/serversidepathhelper_test.go +++ b/internal/controllers/topology/cluster/structuredmerge/serversidepathhelper_test.go @@ -39,8 +39,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/util/ssa" "sigs.k8s.io/cluster-api/util/patch" "sigs.k8s.io/cluster-api/util/test/builder" diff --git a/internal/controllers/topology/cluster/structuredmerge/suite_test.go b/internal/controllers/topology/cluster/structuredmerge/suite_test.go index 876ae1ce7850..7db311e82b97 100644 --- a/internal/controllers/topology/cluster/structuredmerge/suite_test.go +++ b/internal/controllers/topology/cluster/structuredmerge/suite_test.go @@ -32,7 +32,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/test/envtest" ) diff --git a/internal/controllers/topology/cluster/suite_test.go b/internal/controllers/topology/cluster/suite_test.go index cd20c783a0d5..15111a4c01b4 100644 --- a/internal/controllers/topology/cluster/suite_test.go +++ b/internal/controllers/topology/cluster/suite_test.go @@ -35,11 +35,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/remote" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/internal/controllers/clusterclass" fakeruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client/fake" "sigs.k8s.io/cluster-api/internal/test/envtest" @@ -55,7 +54,6 @@ func init() { _ = clientgoscheme.AddToScheme(fakeScheme) _ = clusterv1.AddToScheme(fakeScheme) _ = apiextensionsv1.AddToScheme(fakeScheme) - _ = expv1.AddToScheme(fakeScheme) _ = corev1.AddToScheme(fakeScheme) } func TestMain(m *testing.M) { diff --git a/internal/controllers/topology/cluster/util_test.go b/internal/controllers/topology/cluster/util_test.go index 0a63fe703de0..5be4323d6aef 100644 --- a/internal/controllers/topology/cluster/util_test.go +++ b/internal/controllers/topology/cluster/util_test.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" . "sigs.k8s.io/controller-runtime/pkg/envtest/komega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/internal/controllers/topology/machinedeployment/machinedeployment_controller.go b/internal/controllers/topology/machinedeployment/machinedeployment_controller.go index 6c4a11058f5d..62014e8417b3 100644 --- a/internal/controllers/topology/machinedeployment/machinedeployment_controller.go +++ b/internal/controllers/topology/machinedeployment/machinedeployment_controller.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/controllers/topology/machineset" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" diff --git a/internal/controllers/topology/machinedeployment/machinedeployment_controller_test.go b/internal/controllers/topology/machinedeployment/machinedeployment_controller_test.go index dff21bea2b50..d6e9a77e3981 100644 --- a/internal/controllers/topology/machinedeployment/machinedeployment_controller_test.go +++ b/internal/controllers/topology/machinedeployment/machinedeployment_controller_test.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/internal/controllers/topology/machinedeployment/suite_test.go b/internal/controllers/topology/machinedeployment/suite_test.go index 5ecfa123ced9..a54da7412274 100644 --- a/internal/controllers/topology/machinedeployment/suite_test.go +++ b/internal/controllers/topology/machinedeployment/suite_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/internal/controllers/topology/machineset/machineset_controller.go b/internal/controllers/topology/machineset/machineset_controller.go index 7578fdd0c5ea..f2788dbf7ff2 100644 --- a/internal/controllers/topology/machineset/machineset_controller.go +++ b/internal/controllers/topology/machineset/machineset_controller.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/finalizers" diff --git a/internal/controllers/topology/machineset/machineset_controller_test.go b/internal/controllers/topology/machineset/machineset_controller_test.go index 3511bc11f52d..e6dd83dec39a 100644 --- a/internal/controllers/topology/machineset/machineset_controller_test.go +++ b/internal/controllers/topology/machineset/machineset_controller_test.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/internal/controllers/topology/machineset/suite_test.go b/internal/controllers/topology/machineset/suite_test.go index f9908becb13a..6453de9c7297 100644 --- a/internal/controllers/topology/machineset/suite_test.go +++ b/internal/controllers/topology/machineset/suite_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/internal/controllers/topology/machineset/util.go b/internal/controllers/topology/machineset/util.go index 9c5a31a5b170..030e85bcb4ba 100644 --- a/internal/controllers/topology/machineset/util.go +++ b/internal/controllers/topology/machineset/util.go @@ -29,7 +29,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" ) diff --git a/internal/controllers/topology/machineset/util_test.go b/internal/controllers/topology/machineset/util_test.go index 4068f0b19155..f108188ed461 100644 --- a/internal/controllers/topology/machineset/util_test.go +++ b/internal/controllers/topology/machineset/util_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/internal/hooks/tracking.go b/internal/hooks/tracking.go index 6a02ce1c31df..f32ddd90fa0f 100644 --- a/internal/hooks/tracking.go +++ b/internal/hooks/tracking.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" "sigs.k8s.io/cluster-api/util/patch" ) diff --git a/internal/hooks/tracking_test.go b/internal/hooks/tracking_test.go index 3f2170e37d62..2538459f9cb2 100644 --- a/internal/hooks/tracking_test.go +++ b/internal/hooks/tracking_test.go @@ -26,9 +26,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" ) func TestIsPending(t *testing.T) { diff --git a/internal/runtime/client/client.go b/internal/runtime/client/client.go index a2e4eed78781..22401c8fe18c 100644 --- a/internal/runtime/client/client.go +++ b/internal/runtime/client/client.go @@ -45,10 +45,10 @@ import ( ctrl "sigs.k8s.io/controller-runtime" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" runtimemetrics "sigs.k8s.io/cluster-api/internal/runtime/metrics" runtimeregistry "sigs.k8s.io/cluster-api/internal/runtime/registry" "sigs.k8s.io/cluster-api/util" diff --git a/internal/runtime/client/client_test.go b/internal/runtime/client/client_test.go index 9e7687c35af5..a592818af9aa 100644 --- a/internal/runtime/client/client_test.go +++ b/internal/runtime/client/client_test.go @@ -37,11 +37,11 @@ import ( ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" runtimeregistry "sigs.k8s.io/cluster-api/internal/runtime/registry" fakev1alpha1 "sigs.k8s.io/cluster-api/internal/runtime/test/v1alpha1" fakev1alpha2 "sigs.k8s.io/cluster-api/internal/runtime/test/v1alpha2" diff --git a/internal/runtime/client/fake/fake_client.go b/internal/runtime/client/fake/fake_client.go index c8e7273e438d..c22b95e4f634 100644 --- a/internal/runtime/client/fake/fake_client.go +++ b/internal/runtime/client/fake/fake_client.go @@ -24,10 +24,10 @@ import ( "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" ) // RuntimeClientBuilder is used to build a fake runtime client. diff --git a/internal/runtime/metrics/metrics.go b/internal/runtime/metrics/metrics.go index e7fd72373c9f..46382f41f29d 100644 --- a/internal/runtime/metrics/metrics.go +++ b/internal/runtime/metrics/metrics.go @@ -27,8 +27,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrlmetrics "sigs.k8s.io/controller-runtime/pkg/metrics" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" ) func init() { diff --git a/internal/runtime/registry/registry.go b/internal/runtime/registry/registry.go index a04826d7161c..f66ec0b33752 100644 --- a/internal/runtime/registry/registry.go +++ b/internal/runtime/registry/registry.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" kerrors "k8s.io/apimachinery/pkg/util/errors" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" ) diff --git a/internal/runtime/registry/registry_test.go b/internal/runtime/registry/registry_test.go index ca5d659c090a..f9b0b3ea379d 100644 --- a/internal/runtime/registry/registry_test.go +++ b/internal/runtime/registry/registry_test.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" ) diff --git a/internal/runtime/test/v1alpha1/conversion_test.go b/internal/runtime/test/v1alpha1/conversion_test.go index d0cc48d7f0aa..7ca041c0d76f 100644 --- a/internal/runtime/test/v1alpha1/conversion_test.go +++ b/internal/runtime/test/v1alpha1/conversion_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" "sigs.k8s.io/cluster-api/internal/runtime/test/v1alpha2" ) diff --git a/internal/runtime/test/v1alpha1/fake_types.go b/internal/runtime/test/v1alpha1/fake_types.go index 55d27c4b5b22..7c5feedefd20 100644 --- a/internal/runtime/test/v1alpha1/fake_types.go +++ b/internal/runtime/test/v1alpha1/fake_types.go @@ -19,9 +19,9 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" ) // FakeRequest is a response for testing diff --git a/internal/runtime/test/v1alpha2/fake_types.go b/internal/runtime/test/v1alpha2/fake_types.go index 6e07345803d6..75411b10196b 100644 --- a/internal/runtime/test/v1alpha2/fake_types.go +++ b/internal/runtime/test/v1alpha2/fake_types.go @@ -19,9 +19,9 @@ package v1alpha2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" ) // FakeRequest is a response for testing diff --git a/internal/test/envtest/environment.go b/internal/test/envtest/environment.go index d45031855033..4e8887313c59 100644 --- a/internal/test/envtest/environment.go +++ b/internal/test/envtest/environment.go @@ -59,16 +59,15 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" bootstrapwebhooks "sigs.k8s.io/cluster-api/bootstrap/kubeadm/webhooks" "sigs.k8s.io/cluster-api/cmd/clusterctl/log" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" controlplanewebhooks "sigs.k8s.io/cluster-api/controlplane/kubeadm/webhooks" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" expipamwebhooks "sigs.k8s.io/cluster-api/exp/ipam/webhooks" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" expapiwebhooks "sigs.k8s.io/cluster-api/exp/webhooks" "sigs.k8s.io/cluster-api/feature" internalwebhooks "sigs.k8s.io/cluster-api/internal/webhooks" @@ -119,7 +118,6 @@ func registerSchemes(s *runtime.Scheme) { utilruntime.Must(bootstrapv1.AddToScheme(s)) utilruntime.Must(clusterv1.AddToScheme(s)) utilruntime.Must(controlplanev1.AddToScheme(s)) - utilruntime.Must(expv1.AddToScheme(s)) utilruntime.Must(ipamv1.AddToScheme(s)) utilruntime.Must(runtimev1.AddToScheme(s)) } diff --git a/internal/topology/check/compatibility.go b/internal/topology/check/compatibility.go index 6cf58a511f62..0a5f0f296113 100644 --- a/internal/topology/check/compatibility.go +++ b/internal/topology/check/compatibility.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // ObjectsAreStrictlyCompatible checks if two referenced objects are strictly compatible, meaning that diff --git a/internal/topology/check/compatibility_test.go b/internal/topology/check/compatibility_test.go index 9b38f5613069..1f2f40838a7f 100644 --- a/internal/topology/check/compatibility_test.go +++ b/internal/topology/check/compatibility_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/util/validation/field" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/internal/topology/check/upgrade.go b/internal/topology/check/upgrade.go index 96e9ebe990eb..74c542c5e3a0 100644 --- a/internal/topology/check/upgrade.go +++ b/internal/topology/check/upgrade.go @@ -25,8 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // IsMachineDeploymentUpgrading determines if the MachineDeployment is upgrading. @@ -63,7 +62,7 @@ func IsMachineDeploymentUpgrading(ctx context.Context, c client.Reader, md *clus // IsMachinePoolUpgrading determines if the MachinePool is upgrading. // A machine pool is considered upgrading if at least one of the Machines of this // MachinePool has a different version. -func IsMachinePoolUpgrading(ctx context.Context, c client.Reader, mp *expv1.MachinePool) (bool, error) { +func IsMachinePoolUpgrading(ctx context.Context, c client.Reader, mp *clusterv1.MachinePool) (bool, error) { // If the MachinePool has no version there is no definitive way to check if it is upgrading. Therefore, return false. // Note: This case should not happen. if mp.Spec.Template.Spec.Version == nil { diff --git a/internal/topology/check/upgrade_test.go b/internal/topology/check/upgrade_test.go index 1af5091cca79..148f510496ea 100644 --- a/internal/topology/check/upgrade_test.go +++ b/internal/topology/check/upgrade_test.go @@ -27,8 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) @@ -124,7 +123,7 @@ func TestIsMachinePoolUpgrading(t *testing.T) { tests := []struct { name string - mp *expv1.MachinePool + mp *clusterv1.MachinePool nodes []*corev1.Node want bool wantErr bool @@ -134,7 +133,7 @@ func TestIsMachinePoolUpgrading(t *testing.T) { mp: builder.MachinePool("ns", "mp1"). WithClusterName("cluster1"). WithVersion("v1.2.3"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ {Name: "node1"}, {Name: "node2"}, @@ -163,7 +162,7 @@ func TestIsMachinePoolUpgrading(t *testing.T) { mp: builder.MachinePool("ns", "mp1"). WithClusterName("cluster1"). WithVersion("v1.2.3"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{ {Name: "node1"}, {Name: "node2"}, @@ -192,7 +191,7 @@ func TestIsMachinePoolUpgrading(t *testing.T) { mp: builder.MachinePool("ns", "mp1"). WithClusterName("cluster1"). WithVersion("v1.2.3"). - WithStatus(expv1.MachinePoolStatus{ + WithStatus(clusterv1.MachinePoolStatus{ NodeRefs: []corev1.ObjectReference{}, }). Build(), diff --git a/internal/topology/clustershim/clustershim.go b/internal/topology/clustershim/clustershim.go index 61d1d8cada92..d75a7af6f13b 100644 --- a/internal/topology/clustershim/clustershim.go +++ b/internal/topology/clustershim/clustershim.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/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/topology/ownerrefs" ) diff --git a/internal/topology/selectors/selectors.go b/internal/topology/selectors/selectors.go index 69231165d3ee..510257a9391d 100644 --- a/internal/topology/selectors/selectors.go +++ b/internal/topology/selectors/selectors.go @@ -20,7 +20,7 @@ package selectors import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // ForMachineDeploymentMHC generates a selector for MachineDeployment MHCs. diff --git a/internal/topology/variables/cluster_variable_defaulting.go b/internal/topology/variables/cluster_variable_defaulting.go index 2144721a7331..5b2690ce00a1 100644 --- a/internal/topology/variables/cluster_variable_defaulting.go +++ b/internal/topology/variables/cluster_variable_defaulting.go @@ -26,7 +26,7 @@ import ( structuraldefaulting "k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting" "k8s.io/apimachinery/pkg/util/validation/field" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DefaultClusterVariables defaults ClusterVariables. diff --git a/internal/topology/variables/cluster_variable_defaulting_test.go b/internal/topology/variables/cluster_variable_defaulting_test.go index 514d65581ecb..206ab3ed1242 100644 --- a/internal/topology/variables/cluster_variable_defaulting_test.go +++ b/internal/topology/variables/cluster_variable_defaulting_test.go @@ -23,7 +23,7 @@ import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/util/validation/field" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func Test_DefaultClusterVariables(t *testing.T) { diff --git a/internal/topology/variables/cluster_variable_validation.go b/internal/topology/variables/cluster_variable_validation.go index 01703dcbcc63..bebd6acc5a9c 100644 --- a/internal/topology/variables/cluster_variable_validation.go +++ b/internal/topology/variables/cluster_variable_validation.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" celconfig "k8s.io/apiserver/pkg/apis/cel" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // ValidateClusterVariables validates ClusterVariables based on the definitions in ClusterClass `.status.variables`. diff --git a/internal/topology/variables/cluster_variable_validation_test.go b/internal/topology/variables/cluster_variable_validation_test.go index 86abc6d41d47..356e67a95e41 100644 --- a/internal/topology/variables/cluster_variable_validation_test.go +++ b/internal/topology/variables/cluster_variable_validation_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ctx = ctrl.SetupSignalHandler() diff --git a/internal/topology/variables/clusterclass_variable_validation.go b/internal/topology/variables/clusterclass_variable_validation.go index 52e37a1badf4..a1af19e42c7a 100644 --- a/internal/topology/variables/clusterclass_variable_validation.go +++ b/internal/topology/variables/clusterclass_variable_validation.go @@ -38,7 +38,7 @@ import ( apiservercel "k8s.io/apiserver/pkg/cel" "k8s.io/apiserver/pkg/cel/environment" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( diff --git a/internal/topology/variables/clusterclass_variable_validation_test.go b/internal/topology/variables/clusterclass_variable_validation_test.go index 2f579c721fcf..e8931fb0266a 100644 --- a/internal/topology/variables/clusterclass_variable_validation_test.go +++ b/internal/topology/variables/clusterclass_variable_validation_test.go @@ -29,7 +29,7 @@ import ( utilversion "k8s.io/component-base/version" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func Test_ValidateClusterClassVariables(t *testing.T) { diff --git a/internal/topology/variables/schema.go b/internal/topology/variables/schema.go index 24a9fdda8dcf..ea9f64af5676 100644 --- a/internal/topology/variables/schema.go +++ b/internal/topology/variables/schema.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // convertToAPIExtensionsJSONSchemaProps converts a clusterv1.JSONSchemaProps to apiextensions.JSONSchemaProp. diff --git a/internal/topology/variables/schema_test.go b/internal/topology/variables/schema_test.go index 2a80b535d1ca..879befc7a9a1 100644 --- a/internal/topology/variables/schema_test.go +++ b/internal/topology/variables/schema_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func Test_convertToAPIExtensionsJSONSchemaProps(t *testing.T) { diff --git a/internal/topology/variables/utils.go b/internal/topology/variables/utils.go index bfaf09a36162..bda5fc648ece 100644 --- a/internal/topology/variables/utils.go +++ b/internal/topology/variables/utils.go @@ -24,7 +24,7 @@ import ( kerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/validation/field" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // newValuesIndex returns a map of ClusterVariable per name. diff --git a/internal/util/compare/equal_test.go b/internal/util/compare/equal_test.go index a881b14ab371..6e86756829c6 100644 --- a/internal/util/compare/equal_test.go +++ b/internal/util/compare/equal_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/gomega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestDiff(t *testing.T) { diff --git a/internal/util/ssa/patch_test.go b/internal/util/ssa/patch_test.go index f37ab6fe8af2..bf61dc0e2edd 100644 --- a/internal/util/ssa/patch_test.go +++ b/internal/util/ssa/patch_test.go @@ -27,7 +27,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/internal/util/ssa/suite_test.go b/internal/util/ssa/suite_test.go index 1b3071cd30be..66812dbd046f 100644 --- a/internal/util/ssa/suite_test.go +++ b/internal/util/ssa/suite_test.go @@ -25,7 +25,7 @@ import ( clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/test/envtest" ) diff --git a/internal/util/tree/tree.go b/internal/util/tree/tree.go index 9cc960e57ac4..0524bb9288e4 100644 --- a/internal/util/tree/tree.go +++ b/internal/util/tree/tree.go @@ -36,7 +36,7 @@ import ( "k8s.io/utils/ptr" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/tree" "sigs.k8s.io/cluster-api/internal/contract" ) diff --git a/internal/util/tree/tree_test.go b/internal/util/tree/tree_test.go index 95a9f50972cf..226e5874db5d 100644 --- a/internal/util/tree/tree_test.go +++ b/internal/util/tree/tree_test.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/types" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/tree" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" ) diff --git a/internal/webhooks/cluster.go b/internal/webhooks/cluster.go index fc8418d34559..69a4c36bc4ee 100644 --- a/internal/webhooks/cluster.go +++ b/internal/webhooks/cluster.go @@ -37,9 +37,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/internal/topology/check" @@ -611,7 +610,7 @@ func validateTopologyMachineDeploymentVersions(ctx context.Context, ctrlClient c func validateTopologyMachinePoolVersions(ctx context.Context, ctrlClient client.Reader, clusterCacheReader ClusterCacheReader, oldCluster *clusterv1.Cluster, oldVersion semver.Version) error { // List all the machine pools in the current cluster and in a managed topology. // FROM: current_state.go getCurrentMachinePoolState - mps := &expv1.MachinePoolList{} + mps := &clusterv1.MachinePoolList{} err := ctrlClient.List(ctx, mps, client.MatchingLabels{ clusterv1.ClusterNameLabel: oldCluster.Name, diff --git a/internal/webhooks/cluster_test.go b/internal/webhooks/cluster_test.go index 1a84490701c1..04b270b5203c 100644 --- a/internal/webhooks/cluster_test.go +++ b/internal/webhooks/cluster_test.go @@ -39,8 +39,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/interceptor" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/webhooks/util" "sigs.k8s.io/cluster-api/util/conditions" @@ -3626,7 +3625,7 @@ func Test_validateTopologyMachinePoolVersions(t *testing.T) { clusterv1.ClusterNameLabel: "cluster1", clusterv1.ClusterTopologyOwnedLabel: "", clusterv1.ClusterTopologyMachinePoolNameLabel: "pool1", - }).WithVersion("v1.19.1").WithStatus(expv1.MachinePoolStatus{NodeRefs: []corev1.ObjectReference{{Name: "mp-node-1"}}}).Build(), + }).WithVersion("v1.19.1").WithStatus(clusterv1.MachinePoolStatus{NodeRefs: []corev1.ObjectReference{{Name: "mp-node-1"}}}).Build(), }, workloadObjects: []client.Object{ &corev1.Node{ @@ -3653,7 +3652,7 @@ func Test_validateTopologyMachinePoolVersions(t *testing.T) { clusterv1.ClusterNameLabel: "cluster1", clusterv1.ClusterTopologyOwnedLabel: "", clusterv1.ClusterTopologyMachinePoolNameLabel: "pool1", - }).WithVersion("v1.19.1").WithStatus(expv1.MachinePoolStatus{NodeRefs: []corev1.ObjectReference{{Name: "mp-node-1"}}}).Build(), + }).WithVersion("v1.19.1").WithStatus(clusterv1.MachinePoolStatus{NodeRefs: []corev1.ObjectReference{{Name: "mp-node-1"}}}).Build(), }, workloadObjects: []client.Object{}, }, diff --git a/internal/webhooks/clusterclass.go b/internal/webhooks/clusterclass.go index 6404c4db8ef1..888c2b6c6621 100644 --- a/internal/webhooks/clusterclass.go +++ b/internal/webhooks/clusterclass.go @@ -35,8 +35,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/topology/check" topologynames "sigs.k8s.io/cluster-api/internal/topology/names" diff --git a/internal/webhooks/clusterclass_test.go b/internal/webhooks/clusterclass_test.go index 44d657a1ddcb..61393134ed6d 100644 --- a/internal/webhooks/clusterclass_test.go +++ b/internal/webhooks/clusterclass_test.go @@ -34,9 +34,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/webhooks/util" "sigs.k8s.io/cluster-api/util/test/builder" @@ -49,7 +48,6 @@ var ( func init() { _ = clusterv1.AddToScheme(fakeScheme) - _ = expv1.AddToScheme(fakeScheme) } func TestClusterClassDefaultNamespaces(t *testing.T) { diff --git a/internal/webhooks/machine.go b/internal/webhooks/machine.go index e3f16658283b..d055d9737288 100644 --- a/internal/webhooks/machine.go +++ b/internal/webhooks/machine.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/labels" "sigs.k8s.io/cluster-api/util/version" ) diff --git a/internal/webhooks/machine_test.go b/internal/webhooks/machine_test.go index 730c47ea85a3..02329a3c66fc 100644 --- a/internal/webhooks/machine_test.go +++ b/internal/webhooks/machine_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/webhooks/util" ) diff --git a/internal/webhooks/machinedeployment.go b/internal/webhooks/machinedeployment.go index e1b1fd39c922..3b5e5858340b 100644 --- a/internal/webhooks/machinedeployment.go +++ b/internal/webhooks/machinedeployment.go @@ -36,7 +36,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" topologynames "sigs.k8s.io/cluster-api/internal/topology/names" "sigs.k8s.io/cluster-api/util/version" diff --git a/internal/webhooks/machinedeployment_test.go b/internal/webhooks/machinedeployment_test.go index 9555053f35c2..8c1ec1660bcc 100644 --- a/internal/webhooks/machinedeployment_test.go +++ b/internal/webhooks/machinedeployment_test.go @@ -30,7 +30,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/webhooks/util" ) diff --git a/internal/webhooks/machinedrainrules.go b/internal/webhooks/machinedrainrules.go index 646ade698c4a..d2914ec133e7 100644 --- a/internal/webhooks/machinedrainrules.go +++ b/internal/webhooks/machinedrainrules.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func (webhook *MachineDrainRule) SetupWebhookWithManager(mgr ctrl.Manager) error { diff --git a/internal/webhooks/machinehealthcheck.go b/internal/webhooks/machinehealthcheck.go index 34dadb2f02de..a5166636b374 100644 --- a/internal/webhooks/machinehealthcheck.go +++ b/internal/webhooks/machinehealthcheck.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/internal/webhooks/machinehealthcheck_test.go b/internal/webhooks/machinehealthcheck_test.go index d6e0e0ce9f99..f7df68b28c89 100644 --- a/internal/webhooks/machinehealthcheck_test.go +++ b/internal/webhooks/machinehealthcheck_test.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/webhooks/util" ) diff --git a/internal/webhooks/machineset.go b/internal/webhooks/machineset.go index a43d35b4969b..2b4074bd714e 100644 --- a/internal/webhooks/machineset.go +++ b/internal/webhooks/machineset.go @@ -37,7 +37,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" topologynames "sigs.k8s.io/cluster-api/internal/topology/names" "sigs.k8s.io/cluster-api/util/labels/format" diff --git a/internal/webhooks/machineset_test.go b/internal/webhooks/machineset_test.go index 9bd259a07982..8f545b16db0f 100644 --- a/internal/webhooks/machineset_test.go +++ b/internal/webhooks/machineset_test.go @@ -27,7 +27,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/webhooks/util" ) diff --git a/internal/webhooks/patch_validation.go b/internal/webhooks/patch_validation.go index 32c4e85323fd..91cb27360a6b 100644 --- a/internal/webhooks/patch_validation.go +++ b/internal/webhooks/patch_validation.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" ) diff --git a/internal/webhooks/patch_validation_test.go b/internal/webhooks/patch_validation_test.go index d0caf46a6579..3cb107e8b2e8 100644 --- a/internal/webhooks/patch_validation_test.go +++ b/internal/webhooks/patch_validation_test.go @@ -27,7 +27,7 @@ import ( utilfeature "k8s.io/component-base/featuregate/testing" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/internal/webhooks/runtime/extensionconfig_webhook.go b/internal/webhooks/runtime/extensionconfig_webhook.go index e5a59e6d3609..f1c372e917e3 100644 --- a/internal/webhooks/runtime/extensionconfig_webhook.go +++ b/internal/webhooks/runtime/extensionconfig_webhook.go @@ -32,7 +32,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" "sigs.k8s.io/cluster-api/feature" ) diff --git a/internal/webhooks/runtime/extensionconfig_webhook_test.go b/internal/webhooks/runtime/extensionconfig_webhook_test.go index 101eda6dbfa4..6d625eaa2346 100644 --- a/internal/webhooks/runtime/extensionconfig_webhook_test.go +++ b/internal/webhooks/runtime/extensionconfig_webhook_test.go @@ -27,7 +27,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/webhooks/util" ) diff --git a/internal/webhooks/test/clusterclass_test.go b/internal/webhooks/test/clusterclass_test.go index 4348db699543..091c02c20aec 100644 --- a/internal/webhooks/test/clusterclass_test.go +++ b/internal/webhooks/test/clusterclass_test.go @@ -25,7 +25,7 @@ import ( utilfeature "k8s.io/component-base/featuregate/testing" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/internal/webhooks/test/machinedrainrules_test.go b/internal/webhooks/test/machinedrainrules_test.go index f44f7d096622..318045ef716a 100644 --- a/internal/webhooks/test/machinedrainrules_test.go +++ b/internal/webhooks/test/machinedrainrules_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func Test_validate(t *testing.T) { diff --git a/internal/webhooks/test/suite_test.go b/internal/webhooks/test/suite_test.go index 67769fb39731..2082873c4a53 100644 --- a/internal/webhooks/test/suite_test.go +++ b/internal/webhooks/test/suite_test.go @@ -26,7 +26,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/controller" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/internal/controllers/clusterclass" fakeruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client/fake" diff --git a/main.go b/main.go index c4d4c830696c..fb2759af13e8 100644 --- a/main.go +++ b/main.go @@ -55,32 +55,28 @@ import ( addonsv1beta1 "sigs.k8s.io/cluster-api/api/addons/v1beta1" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - "sigs.k8s.io/cluster-api/api/v1beta2/index" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2/index" + ipamv1alpha1 "sigs.k8s.io/cluster-api/api/ipam/v1alpha1" + ipamv1beta1 "sigs.k8s.io/cluster-api/api/ipam/v1beta1" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1alpha1 "sigs.k8s.io/cluster-api/api/runtime/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" "sigs.k8s.io/cluster-api/controllers" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/crdmigrator" "sigs.k8s.io/cluster-api/controllers/remote" - expv1beta1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" expcontrollers "sigs.k8s.io/cluster-api/exp/controllers" - ipamv1alpha1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1alpha1" - ipamv1beta1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta1" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" expipamwebhooks "sigs.k8s.io/cluster-api/exp/ipam/webhooks" - runtimev1alpha1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1alpha1" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" runtimecontrollers "sigs.k8s.io/cluster-api/exp/runtime/controllers" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" expwebhooks "sigs.k8s.io/cluster-api/exp/webhooks" "sigs.k8s.io/cluster-api/feature" addonsv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/addons/v1alpha3" addonsv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/addons/v1alpha4" - expv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/exp/v1alpha3" - expv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/exp/v1alpha4" clusterv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" clusterv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" internalruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client" @@ -154,11 +150,6 @@ func init() { _ = addonsv1beta1.AddToScheme(scheme) _ = addonsv1.AddToScheme(scheme) - _ = expv1alpha3.AddToScheme(scheme) - _ = expv1alpha4.AddToScheme(scheme) - _ = expv1beta1.AddToScheme(scheme) - _ = expv1.AddToScheme(scheme) - _ = runtimev1alpha1.AddToScheme(scheme) _ = runtimev1.AddToScheme(scheme) @@ -521,7 +512,7 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager, watchNamespaces map crdMigratorConfig[&runtimev1.ExtensionConfig{}] = crdmigrator.ByObjectConfig{UseCache: true, UseStatusForStorageVersionMigration: true} } if feature.Gates.Enabled(feature.MachinePool) { - crdMigratorConfig[&expv1.MachinePool{}] = crdmigrator.ByObjectConfig{UseCache: true, UseStatusForStorageVersionMigration: true} + crdMigratorConfig[&clusterv1.MachinePool{}] = crdmigrator.ByObjectConfig{UseCache: true, UseStatusForStorageVersionMigration: true} } crdMigratorSkipPhases := []crdmigrator.Phase{} for _, p := range skipCRDMigrationPhases { diff --git a/test/e2e/autoscaler.go b/test/e2e/autoscaler.go index 6af237d4d30e..7269edf8367a 100644 --- a/test/e2e/autoscaler.go +++ b/test/e2e/autoscaler.go @@ -28,7 +28,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "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/cluster_deletion.go b/test/e2e/cluster_deletion.go index a7afff605329..1a1abcabc621 100644 --- a/test/e2e/cluster_deletion.go +++ b/test/e2e/cluster_deletion.go @@ -38,7 +38,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlcluster "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" "sigs.k8s.io/cluster-api/test/e2e/internal/log" "sigs.k8s.io/cluster-api/test/framework" diff --git a/test/e2e/cluster_upgrade_runtimesdk.go b/test/e2e/cluster_upgrade_runtimesdk.go index 2d047628be63..afa973034d9a 100644 --- a/test/e2e/cluster_upgrade_runtimesdk.go +++ b/test/e2e/cluster_upgrade_runtimesdk.go @@ -36,8 +36,8 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" "sigs.k8s.io/cluster-api/test/e2e/internal/log" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" diff --git a/test/e2e/cluster_upgrade_test.go b/test/e2e/cluster_upgrade_test.go index 5f03bb4272c6..b101ba72e17c 100644 --- a/test/e2e/cluster_upgrade_test.go +++ b/test/e2e/cluster_upgrade_test.go @@ -30,7 +30,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/e2e/internal/log" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/test/e2e/clusterclass_changes.go b/test/e2e/clusterclass_changes.go index 5b015c5db792..c779bab2a583 100644 --- a/test/e2e/clusterclass_changes.go +++ b/test/e2e/clusterclass_changes.go @@ -32,9 +32,8 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/test/e2e/internal/log" "sigs.k8s.io/cluster-api/test/framework" @@ -612,7 +611,7 @@ func modifyMachinePoolViaClusterClassAndWait(ctx context.Context, input modifyMa log.Logf("Waiting for MachinePool rollout for MachinePoolTopology %q (class %q) to complete.", mpTopology.Name, mpTopology.Class) Eventually(func(g Gomega) error { // Get MachinePool for the current MachinePoolTopology. - mpList := &expv1.MachinePoolList{} + mpList := &clusterv1.MachinePoolList{} g.Expect(mgmtClient.List(ctx, mpList, client.InNamespace(input.Cluster.Namespace), client.MatchingLabels{ clusterv1.ClusterTopologyMachinePoolNameLabel: mpTopology.Name, })).To(Succeed()) @@ -699,7 +698,7 @@ func assertMachineDeploymentTopologyFields(g Gomega, md clusterv1.MachineDeploym // assertMachinePoolTopologyFields asserts that all fields set in the MachinePoolTopology have been set on the MachinePool. // Note: We intentionally focus on the fields set in the MachinePoolTopology and ignore the ones set through ClusterClass // as we want to validate that the fields of the MachinePoolTopology have been propagated correctly. -func assertMachinePoolTopologyFields(g Gomega, mp expv1.MachinePool, mpTopology clusterv1.MachinePoolTopology) { +func assertMachinePoolTopologyFields(g Gomega, mp clusterv1.MachinePool, mpTopology clusterv1.MachinePoolTopology) { // Note: We only verify that all labels and annotations from the Cluster topology exist to keep it simple here. // This is fully covered by the ClusterClass rollout test. for k, v := range mpTopology.Metadata.Labels { diff --git a/test/e2e/clusterclass_rollout.go b/test/e2e/clusterclass_rollout.go index d40bd3804933..7133a32eba7f 100644 --- a/test/e2e/clusterclass_rollout.go +++ b/test/e2e/clusterclass_rollout.go @@ -36,10 +36,9 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/internal/controllers/topology/machineset" "sigs.k8s.io/cluster-api/test/e2e/internal/log" @@ -957,7 +956,7 @@ func getMDTopology(cluster *clusterv1.Cluster, md *clusterv1.MachineDeployment) } // getMPClass looks up the MachinePoolClass for a MachinePool in the ClusterClass. -func getMPClass(cluster *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass, mp *expv1.MachinePool) *clusterv1.MachinePoolClass { +func getMPClass(cluster *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass, mp *clusterv1.MachinePool) *clusterv1.MachinePoolClass { mpTopology := getMPTopology(cluster, mp) for _, mdClass := range clusterClass.Spec.Workers.MachinePools { @@ -970,7 +969,7 @@ func getMPClass(cluster *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass } // getMPTopology looks up the MachinePoolTopology for a mp in the Cluster. -func getMPTopology(cluster *clusterv1.Cluster, mp *expv1.MachinePool) *clusterv1.MachinePoolTopology { +func getMPTopology(cluster *clusterv1.Cluster, mp *clusterv1.MachinePool) *clusterv1.MachinePoolTopology { for _, mpTopology := range cluster.Spec.Topology.Workers.MachinePools { if mpTopology.Name == mp.Labels[clusterv1.ClusterTopologyMachinePoolNameLabel] { return &mpTopology @@ -1088,7 +1087,7 @@ type clusterObjects struct { MachinesByMachineSet map[string][]*clusterv1.Machine NodesByMachine map[string]*corev1.Node - MachinePools []*expv1.MachinePool + MachinePools []*clusterv1.MachinePool InfrastructureMachineTemplateByMachineDeployment map[string]*unstructured.Unstructured BootstrapConfigTemplateByMachineDeployment map[string]*unstructured.Unstructured @@ -1184,7 +1183,7 @@ func getClusterObjects(ctx context.Context, g Gomega, clusterProxy framework.Clu // MachinePools. for _, mpTopology := range cluster.Spec.Topology.Workers.MachinePools { // Get MachinePool for the current MachinePoolTopology. - mpList := &expv1.MachinePoolList{} + mpList := &clusterv1.MachinePoolList{} g.Expect(mgmtClient.List(ctx, mpList, client.InNamespace(cluster.Namespace), client.MatchingLabels{ clusterv1.ClusterTopologyMachinePoolNameLabel: mpTopology.Name, })).To(Succeed()) @@ -1338,7 +1337,7 @@ func modifyMachinePoolViaClusterAndWait(ctx context.Context, input modifyMachine log.Logf("Waiting for MachinePool rollout for MachinePoolTopology %q to complete.", mpTopology.Name) Eventually(func(g Gomega) { // Get MachinePool for the current MachinePoolTopology. - mpList := &expv1.MachinePoolList{} + mpList := &clusterv1.MachinePoolList{} g.Expect(mgmtClient.List(ctx, mpList, client.InNamespace(input.Cluster.Namespace), client.MatchingLabels{ clusterv1.ClusterTopologyMachinePoolNameLabel: mpTopology.Name, })).To(Succeed()) diff --git a/test/e2e/clusterctl_upgrade.go b/test/e2e/clusterctl_upgrade.go index 86b936ae2d25..0ff0e0b1bada 100644 --- a/test/e2e/clusterctl_upgrade.go +++ b/test/e2e/clusterctl_upgrade.go @@ -45,11 +45,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/test/e2e/internal/log" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/bootstrap" @@ -528,7 +527,7 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg ); err == nil { for _, m := range machinePoolList.Items { phase, found, err := unstructured.NestedString(m.Object, "status", "phase") - if err != nil || !found || phase != string(expv1.MachinePoolPhaseRunning) { + if err != nil || !found || phase != string(clusterv1.MachinePoolPhaseRunning) { continue } diff --git a/test/e2e/clusterctl_upgrade_test.go b/test/e2e/clusterctl_upgrade_test.go index 6072e96a385a..a6198867d17c 100644 --- a/test/e2e/clusterctl_upgrade_test.go +++ b/test/e2e/clusterctl_upgrade_test.go @@ -28,7 +28,7 @@ import ( . "github.com/onsi/gomega" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlcluster "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/kubernetesversions" diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index e5a61646e28b..d063e181b0cc 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -37,7 +37,7 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "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 dddb656efab1..06c37ec75f2e 100644 --- a/test/e2e/kcp_adoption.go +++ b/test/e2e/kcp_adoption.go @@ -32,9 +32,9 @@ import ( "k8s.io/utils/ptr" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "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/kcp_remediations.go b/test/e2e/kcp_remediations.go index de4c8a354656..b8d62d3360db 100644 --- a/test/e2e/kcp_remediations.go +++ b/test/e2e/kcp_remediations.go @@ -34,7 +34,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/e2e/internal/log" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" diff --git a/test/e2e/node_drain.go b/test/e2e/node_drain.go index 6cfb124ad61a..ba2a5da2eb55 100644 --- a/test/e2e/node_drain.go +++ b/test/e2e/node_drain.go @@ -33,7 +33,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "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_test.go b/test/e2e/node_drain_test.go index acd942a7a9f9..141ad061ec89 100644 --- a/test/e2e/node_drain_test.go +++ b/test/e2e/node_drain_test.go @@ -30,7 +30,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/framework" ) diff --git a/test/e2e/scale.go b/test/e2e/scale.go index 24dda0084445..8f25acb0d454 100644 --- a/test/e2e/scale.go +++ b/test/e2e/scale.go @@ -42,9 +42,9 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/e2e/internal/log" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" diff --git a/test/e2e/self_hosted.go b/test/e2e/self_hosted.go index d580050d0f2b..2717531d532e 100644 --- a/test/e2e/self_hosted.go +++ b/test/e2e/self_hosted.go @@ -31,7 +31,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" "sigs.k8s.io/cluster-api/test/e2e/internal/log" "sigs.k8s.io/cluster-api/test/framework" diff --git a/test/extension/handlers/lifecycle/handlers.go b/test/extension/handlers/lifecycle/handlers.go index 8a3281ec29d6..bdebc784a4f7 100644 --- a/test/extension/handlers/lifecycle/handlers.go +++ b/test/extension/handlers/lifecycle/handlers.go @@ -18,7 +18,7 @@ limitations under the License. // // The implementation of the handlers is specifically designed for Cluster API E2E tests use cases. // When implementing custom RuntimeExtension, it is only required to expose HandlerFunc with the -// signature defined in sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1. +// signature defined in sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1. package lifecycle import ( @@ -35,8 +35,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" ) const ( @@ -47,7 +47,7 @@ const ( // because in Cluster API's E2E tests all of them are using a controller runtime client and the same set of func // to work with the config map where preloaded answers for lifecycle hooks are stored. // NOTE: it is not mandatory to use a ExtensionHandlers in custom RuntimeExtension, what is important -// is to expose HandlerFunc with the signature defined in sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1. +// is to expose HandlerFunc with the signature defined in sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1. type ExtensionHandlers struct { client client.Client } diff --git a/test/extension/handlers/topologymutation/handler.go b/test/extension/handlers/topologymutation/handler.go index 1851d8660f14..a88bbb3a2e08 100644 --- a/test/extension/handlers/topologymutation/handler.go +++ b/test/extension/handlers/topologymutation/handler.go @@ -18,7 +18,7 @@ limitations under the License. // // The implementation of the handlers is specifically designed for Cluster API E2E tests use cases. // When implementing custom RuntimeExtension, it is only required to expose HandlerFunc with the -// signature defined in sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1. +// signature defined in sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1. package topologymutation import ( @@ -33,10 +33,10 @@ import ( intstrutil "k8s.io/apimachinery/pkg/util/intstr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" "sigs.k8s.io/cluster-api/exp/runtime/topologymutation" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" infraexpv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1" @@ -55,7 +55,7 @@ var ( // this is convenient because in Cluster API's E2E tests all of them are using a decoder for working with typed // API objects, which makes code easier to read and less error prone than using unstructured or working with raw json/yaml. // NOTE: it is not mandatory to use a ExtensionHandlers in custom RuntimeExtension, what is important -// is to expose HandlerFunc with the signature defined in sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1. +// is to expose HandlerFunc with the signature defined in sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1. type ExtensionHandlers struct { decoder runtime.Decoder } diff --git a/test/extension/handlers/topologymutation/handler_integration_test.go b/test/extension/handlers/topologymutation/handler_integration_test.go index a6ba0e460c97..d86a1bde436f 100644 --- a/test/extension/handlers/topologymutation/handler_integration_test.go +++ b/test/extension/handlers/topologymutation/handler_integration_test.go @@ -46,12 +46,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/yaml" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" "sigs.k8s.io/cluster-api/controllers" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/exp/topology/desiredstate" "sigs.k8s.io/cluster-api/exp/topology/scope" "sigs.k8s.io/cluster-api/feature" diff --git a/test/extension/handlers/topologymutation/handler_test.go b/test/extension/handlers/topologymutation/handler_test.go index 57fecb51399e..aebffa9039f3 100644 --- a/test/extension/handlers/topologymutation/handler_test.go +++ b/test/extension/handlers/topologymutation/handler_test.go @@ -30,9 +30,9 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" . "sigs.k8s.io/controller-runtime/pkg/envtest/komega" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" infraexpv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1" ) diff --git a/test/extension/main.go b/test/extension/main.go index f773e2eafbab..506e167840fb 100644 --- a/test/extension/main.go +++ b/test/extension/main.go @@ -45,9 +45,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/config" + runtimehooksv1 "sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1" "sigs.k8s.io/cluster-api/controllers/remote" runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog" - runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" "sigs.k8s.io/cluster-api/exp/runtime/server" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/test/extension/handlers/lifecycle" @@ -279,7 +279,7 @@ func main() { func setupTopologyMutationHookHandlers(runtimeExtensionWebhookServer *server.Server) { // Create the ExtensionHandlers for the Topology Mutation Hooks. // NOTE: it is not mandatory to group all the ExtensionHandlers using a struct, what is important - // is to have HandlerFunc with the signature defined in sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1. + // is to have HandlerFunc with the signature defined in sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1. topologyMutationExtensionHandlers := topologymutation.NewExtensionHandlers(scheme) if err := runtimeExtensionWebhookServer.AddExtensionHandler(server.ExtensionHandler{ @@ -314,7 +314,7 @@ func setupTopologyMutationHookHandlers(runtimeExtensionWebhookServer *server.Ser func setupLifecycleHookHandlers(mgr ctrl.Manager, runtimeExtensionWebhookServer *server.Server) { // Create the ExtensionHandlers for the lifecycle hooks // NOTE: it is not mandatory to group all the ExtensionHandlers using a struct, what is important - // is to have HandlerFunc with the signature defined in sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1. + // is to have HandlerFunc with the signature defined in sigs.k8s.io/cluster-api/api/runtime/hooks/v1alpha1. lifecycleExtensionHandlers := lifecycle.NewExtensionHandlers(mgr.GetClient()) if err := runtimeExtensionWebhookServer.AddExtensionHandler(server.ExtensionHandler{ diff --git a/test/framework/alltypes_helpers.go b/test/framework/alltypes_helpers.go index e00982d7ff74..e07ab9c83647 100644 --- a/test/framework/alltypes_helpers.go +++ b/test/framework/alltypes_helpers.go @@ -40,7 +40,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" . "sigs.k8s.io/cluster-api/test/framework/ginkgoextensions" ) diff --git a/test/framework/autoscaler_helpers.go b/test/framework/autoscaler_helpers.go index ffafcaf7e5a3..57a0ed394281 100644 --- a/test/framework/autoscaler_helpers.go +++ b/test/framework/autoscaler_helpers.go @@ -38,7 +38,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlclient "sigs.k8s.io/cluster-api/cmd/clusterctl/client" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util/patch" diff --git a/test/framework/cluster_helpers.go b/test/framework/cluster_helpers.go index fe55754c9755..d4c79f0a898f 100644 --- a/test/framework/cluster_helpers.go +++ b/test/framework/cluster_helpers.go @@ -30,7 +30,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlclient "sigs.k8s.io/cluster-api/cmd/clusterctl/client" cmdtree "sigs.k8s.io/cluster-api/internal/util/tree" . "sigs.k8s.io/cluster-api/test/framework/ginkgoextensions" diff --git a/test/framework/cluster_proxy.go b/test/framework/cluster_proxy.go index 61d1e18561ab..0fd828293a22 100644 --- a/test/framework/cluster_proxy.go +++ b/test/framework/cluster_proxy.go @@ -45,8 +45,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/test/infrastructure/container" "sigs.k8s.io/cluster-api/util/yaml" @@ -142,7 +141,7 @@ type ClusterLogCollector interface { // CollectMachineLog collects log from a machine. // TODO: describe output folder struct CollectMachineLog(ctx context.Context, managementClusterClient client.Client, m *clusterv1.Machine, outputPath string) error - CollectMachinePoolLog(ctx context.Context, managementClusterClient client.Client, m *expv1.MachinePool, outputPath string) error + CollectMachinePoolLog(ctx context.Context, managementClusterClient client.Client, m *clusterv1.MachinePool, outputPath string) error // CollectInfrastructureLogs collects log from the infrastructure. CollectInfrastructureLogs(ctx context.Context, managementClusterClient client.Client, c *clusterv1.Cluster, outputPath string) error } @@ -423,7 +422,7 @@ func (p *clusterProxy) CollectWorkloadClusterLogs(ctx context.Context, namespace } } - var machinePools *expv1.MachinePoolList + var machinePools *clusterv1.MachinePoolList Eventually(func() error { var err error machinePools, err = getMachinePoolsInCluster(ctx, p.GetClient(), namespace, name) @@ -471,12 +470,12 @@ func getMachinesInCluster(ctx context.Context, c client.Client, namespace, name return machineList, nil } -func getMachinePoolsInCluster(ctx context.Context, c client.Client, namespace, name string) (*expv1.MachinePoolList, error) { +func getMachinePoolsInCluster(ctx context.Context, c client.Client, namespace, name string) (*clusterv1.MachinePoolList, error) { if name == "" { return nil, errors.New("cluster name should not be empty") } - machinePoolList := &expv1.MachinePoolList{} + machinePoolList := &clusterv1.MachinePoolList{} labels := map[string]string{clusterv1.ClusterNameLabel: name} if err := c.List(ctx, machinePoolList, client.InNamespace(namespace), client.MatchingLabels(labels)); err != nil { return nil, err diff --git a/test/framework/cluster_topology_helpers.go b/test/framework/cluster_topology_helpers.go index 357fc669cfcd..11f7f386c884 100644 --- a/test/framework/cluster_topology_helpers.go +++ b/test/framework/cluster_topology_helpers.go @@ -26,9 +26,8 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util/patch" ) @@ -66,7 +65,7 @@ type UpgradeClusterTopologyAndWaitForUpgradeInput struct { EtcdImageTag string DNSImageTag string MachineDeployments []*clusterv1.MachineDeployment - MachinePools []*expv1.MachinePool + MachinePools []*clusterv1.MachinePool KubernetesUpgradeVersion string WaitForMachinesToBeUpgraded []interface{} WaitForMachinePoolToBeUpgraded []interface{} diff --git a/test/framework/clusterctl/ca_injection.go b/test/framework/clusterctl/ca_injection.go index 5db618d4dcba..9638a150d840 100644 --- a/test/framework/clusterctl/ca_injection.go +++ b/test/framework/clusterctl/ca_injection.go @@ -30,7 +30,7 @@ import ( kerrors "k8s.io/apimachinery/pkg/util/errors" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const certManagerCAAnnotation = "cert-manager.io/inject-ca-from" diff --git a/test/framework/clusterctl/clusterctl_helpers.go b/test/framework/clusterctl/clusterctl_helpers.go index 85a7158427a9..cb8e164b4160 100644 --- a/test/framework/clusterctl/clusterctl_helpers.go +++ b/test/framework/clusterctl/clusterctl_helpers.go @@ -28,10 +28,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog/v2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/cmd/clusterctl/client/config" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/internal/log" ) @@ -282,7 +281,7 @@ type ApplyClusterTemplateAndWaitResult struct { Cluster *clusterv1.Cluster ControlPlane *controlplanev1.KubeadmControlPlane MachineDeployments []*clusterv1.MachineDeployment - MachinePools []*expv1.MachinePool + MachinePools []*clusterv1.MachinePool } // ExpectedWorkerNodes returns the expected number of worker nodes that will @@ -403,7 +402,7 @@ type ApplyCustomClusterTemplateAndWaitResult struct { Cluster *clusterv1.Cluster ControlPlane *controlplanev1.KubeadmControlPlane MachineDeployments []*clusterv1.MachineDeployment - MachinePools []*expv1.MachinePool + MachinePools []*clusterv1.MachinePool } func ApplyCustomClusterTemplateAndWait(ctx context.Context, input ApplyCustomClusterTemplateAndWaitInput, result *ApplyCustomClusterTemplateAndWaitResult) { diff --git a/test/framework/clusterresourceset_helpers.go b/test/framework/clusterresourceset_helpers.go index f9873e18d428..e9c98d7f37f1 100644 --- a/test/framework/clusterresourceset_helpers.go +++ b/test/framework/clusterresourceset_helpers.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // GetClusterResourceSetsInput is the input for GetClusterResourceSets. diff --git a/test/framework/control_plane.go b/test/framework/control_plane.go index 4edcae3dd2af..8416bc541253 100644 --- a/test/framework/control_plane.go +++ b/test/framework/control_plane.go @@ -24,7 +24,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" ) // WaitForControlPlaneToBeUpToDateInput is the input for WaitForControlPlaneToBeUpToDate. diff --git a/test/framework/controlplane_helpers.go b/test/framework/controlplane_helpers.go index 03a4f881d217..16f2606e6f87 100644 --- a/test/framework/controlplane_helpers.go +++ b/test/framework/controlplane_helpers.go @@ -30,9 +30,9 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util/patch" ) diff --git a/test/framework/convenience.go b/test/framework/convenience.go index c7c24f98bc57..357d2f4002b0 100644 --- a/test/framework/convenience.go +++ b/test/framework/convenience.go @@ -30,13 +30,12 @@ import ( "k8s.io/apimachinery/pkg/runtime" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" + ipamv1 "sigs.k8s.io/cluster-api/api/ipam/v1beta2" + runtimev1 "sigs.k8s.io/cluster-api/api/runtime/v1beta2" clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" - ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2" - runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1beta2" ) // TryAddDefaultSchemes tries to add the following schemes: @@ -57,9 +56,6 @@ func TryAddDefaultSchemes(scheme *runtime.Scheme) { // Add the core CAPI scheme. _ = clusterv1.AddToScheme(scheme) - // Add the CAPI experiments scheme. - _ = expv1.AddToScheme(scheme) - // ADD the addons scheme. _ = addonsv1.AddToScheme(scheme) diff --git a/test/framework/crdmigration_helpers.go b/test/framework/crdmigration_helpers.go index b100dff36942..7701bf4d1e9f 100644 --- a/test/framework/crdmigration_helpers.go +++ b/test/framework/crdmigration_helpers.go @@ -33,7 +33,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlcluster "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" ) diff --git a/test/framework/deployment_helpers.go b/test/framework/deployment_helpers.go index 270bcbe7c3d1..11b12cafe565 100644 --- a/test/framework/deployment_helpers.go +++ b/test/framework/deployment_helpers.go @@ -49,8 +49,8 @@ import ( toolscache "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" . "sigs.k8s.io/cluster-api/test/framework/ginkgoextensions" "sigs.k8s.io/cluster-api/test/framework/internal/log" ) diff --git a/test/framework/docker_logcollector.go b/test/framework/docker_logcollector.go index ddc7ae6ad826..9e71bf59722f 100644 --- a/test/framework/docker_logcollector.go +++ b/test/framework/docker_logcollector.go @@ -29,8 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/kind/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/infrastructure/container" ) @@ -66,7 +65,7 @@ func (k DockerLogCollector) CollectMachineLog(ctx context.Context, _ client.Clie return k.collectLogsFromNode(ctx, outputPath, containerName) } -func (k DockerLogCollector) CollectMachinePoolLog(ctx context.Context, _ client.Client, m *expv1.MachinePool, outputPath string) error { +func (k DockerLogCollector) CollectMachinePoolLog(ctx context.Context, _ client.Client, m *clusterv1.MachinePool, outputPath string) error { containerRuntime, err := container.NewDockerClient() if err != nil { return err diff --git a/test/framework/finalizers_helpers.go b/test/framework/finalizers_helpers.go index d66b8e5b5c5c..3786b48c9588 100644 --- a/test/framework/finalizers_helpers.go +++ b/test/framework/finalizers_helpers.go @@ -31,10 +31,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlcluster "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" infraexpv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util/patch" @@ -66,7 +65,7 @@ var CoreFinalizersAssertionWithClassyClusters = func() map[string]func(types.Nam // ExpFinalizersAssertion maps experimental resource types to their expected finalizers. var ExpFinalizersAssertion = map[string]func(types.NamespacedName) []string{ clusterResourceSetKind: func(_ types.NamespacedName) []string { return []string{addonsv1.ClusterResourceSetFinalizer} }, - machinePoolKind: func(_ types.NamespacedName) []string { return []string{expv1.MachinePoolFinalizer} }, + machinePoolKind: func(_ types.NamespacedName) []string { return []string{clusterv1.MachinePoolFinalizer} }, } // DockerInfraFinalizersAssertion maps docker infrastructure resource types to their expected finalizers. diff --git a/test/framework/machine_helpers.go b/test/framework/machine_helpers.go index 939654dddff2..7307903ed193 100644 --- a/test/framework/machine_helpers.go +++ b/test/framework/machine_helpers.go @@ -26,7 +26,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" . "sigs.k8s.io/cluster-api/test/framework/ginkgoextensions" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/test/framework/machinedeployment_helpers.go b/test/framework/machinedeployment_helpers.go index db9d79d68d74..5356026e3fee 100644 --- a/test/framework/machinedeployment_helpers.go +++ b/test/framework/machinedeployment_helpers.go @@ -33,8 +33,8 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/controllers/topology/machineset" . "sigs.k8s.io/cluster-api/test/framework/ginkgoextensions" "sigs.k8s.io/cluster-api/test/framework/internal/log" diff --git a/test/framework/machinehealthcheck_helpers.go b/test/framework/machinehealthcheck_helpers.go index 43e52f5a013f..235a0bae0d22 100644 --- a/test/framework/machinehealthcheck_helpers.go +++ b/test/framework/machinehealthcheck_helpers.go @@ -29,7 +29,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DiscoverMachineHealthCheckAndWaitForRemediationInput is the input for DiscoverMachineHealthCheckAndWait. diff --git a/test/framework/machinepool_helpers.go b/test/framework/machinepool_helpers.go index 9a7ebfe33b16..2b4dba97fcd3 100644 --- a/test/framework/machinepool_helpers.go +++ b/test/framework/machinepool_helpers.go @@ -30,8 +30,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util/patch" ) @@ -46,18 +45,18 @@ type GetMachinePoolsByClusterInput struct { // GetMachinePoolsByCluster returns the MachinePools objects for a cluster. // Important! this method relies on labels that are created by the CAPI controllers during the first reconciliation, so // it is necessary to ensure this is already happened before calling it. -func GetMachinePoolsByCluster(ctx context.Context, input GetMachinePoolsByClusterInput) []*expv1.MachinePool { +func GetMachinePoolsByCluster(ctx context.Context, input GetMachinePoolsByClusterInput) []*clusterv1.MachinePool { Expect(ctx).NotTo(BeNil(), "ctx is required for GetMachinePoolsByCluster") Expect(input.Lister).ToNot(BeNil(), "Invalid argument. input.Lister can't be nil when calling GetMachinePoolsByCluster") Expect(input.Namespace).ToNot(BeEmpty(), "Invalid argument. input.Namespace can't be empty when calling GetMachinePoolsByCluster") Expect(input.ClusterName).ToNot(BeEmpty(), "Invalid argument. input.ClusterName can't be empty when calling GetMachinePoolsByCluster") - mpList := &expv1.MachinePoolList{} + mpList := &clusterv1.MachinePoolList{} Eventually(func() error { return input.Lister.List(ctx, mpList, byClusterOptions(input.ClusterName, input.Namespace)...) }, retryableOperationTimeout, retryableOperationInterval).Should(Succeed(), "Failed to list MachinePools object for Cluster %s", klog.KRef(input.Namespace, input.ClusterName)) - mps := make([]*expv1.MachinePool, len(mpList.Items)) + mps := make([]*clusterv1.MachinePool, len(mpList.Items)) for i := range mpList.Items { mps[i] = &mpList.Items[i] } @@ -67,7 +66,7 @@ func GetMachinePoolsByCluster(ctx context.Context, input GetMachinePoolsByCluste // WaitForMachinePoolNodesToExistInput is the input for WaitForMachinePoolNodesToExist. type WaitForMachinePoolNodesToExistInput struct { Getter Getter - MachinePool *expv1.MachinePool + MachinePool *clusterv1.MachinePool } // WaitForMachinePoolNodesToExist waits until all nodes associated with a machine pool exist. @@ -104,7 +103,7 @@ type DiscoveryAndWaitForMachinePoolsInput struct { } // DiscoveryAndWaitForMachinePools discovers the MachinePools existing in a cluster and waits for them to be ready (all the machines provisioned). -func DiscoveryAndWaitForMachinePools(ctx context.Context, input DiscoveryAndWaitForMachinePoolsInput, intervals ...interface{}) []*expv1.MachinePool { +func DiscoveryAndWaitForMachinePools(ctx context.Context, input DiscoveryAndWaitForMachinePoolsInput, intervals ...interface{}) []*clusterv1.MachinePool { Expect(ctx).NotTo(BeNil(), "ctx is required for DiscoveryAndWaitForMachinePools") Expect(input.Lister).ToNot(BeNil(), "Invalid argument. input.Lister can't be nil when calling DiscoveryAndWaitForMachinePools") Expect(input.Cluster).ToNot(BeNil(), "Invalid argument. input.Cluster can't be nil when calling DiscoveryAndWaitForMachinePools") @@ -130,7 +129,7 @@ type UpgradeMachinePoolAndWaitInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster UpgradeVersion string - MachinePools []*expv1.MachinePool + MachinePools []*clusterv1.MachinePool WaitForMachinePoolToBeUpgraded []interface{} } @@ -176,7 +175,7 @@ type ScaleMachinePoolAndWaitInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster Replicas int32 - MachinePools []*expv1.MachinePool + MachinePools []*clusterv1.MachinePool WaitForMachinePoolToScale []interface{} } @@ -238,8 +237,8 @@ func ScaleMachinePoolTopologyAndWait(ctx context.Context, input ScaleMachinePool }, retryableOperationTimeout, retryableOperationInterval).Should(Succeed(), "Failed to scale machine pool topology %s", mpTopology.Name) log.Logf("Waiting for correct number of replicas to exist and have correct number for .spec.replicas") - mpList := &expv1.MachinePoolList{} - mp := expv1.MachinePool{} + mpList := &clusterv1.MachinePoolList{} + mp := clusterv1.MachinePool{} Eventually(func(g Gomega) int32 { g.Expect(input.ClusterProxy.GetClient().List(ctx, mpList, client.InNamespace(input.Cluster.Namespace), @@ -266,7 +265,7 @@ type WaitForMachinePoolInstancesToBeUpgradedInput struct { Cluster *clusterv1.Cluster KubernetesUpgradeVersion string MachineCount int - MachinePool *expv1.MachinePool + MachinePool *clusterv1.MachinePool } // WaitForMachinePoolInstancesToBeUpgraded waits until all instances belonging to a MachinePool are upgraded to the correct kubernetes version. @@ -312,7 +311,7 @@ func WaitForMachinePoolInstancesToBeUpgraded(ctx context.Context, input WaitForM type GetMachinesPoolInstancesInput struct { WorkloadClusterGetter Getter Namespace string - MachinePool *expv1.MachinePool + MachinePool *clusterv1.MachinePool } // getMachinePoolInstanceVersions returns the Kubernetes versions of the machine pool instances. @@ -350,7 +349,7 @@ func getMachinePoolInstanceVersions(ctx context.Context, input GetMachinesPoolIn type AssertMachinePoolReplicasInput struct { Getter Getter - MachinePool *expv1.MachinePool + MachinePool *clusterv1.MachinePool Replicas int32 WaitForMachinePool []interface{} } @@ -362,7 +361,7 @@ func AssertMachinePoolReplicas(ctx context.Context, input AssertMachinePoolRepli Eventually(func(g Gomega) { // Get the MachinePool - mp := &expv1.MachinePool{} + mp := &clusterv1.MachinePool{} key := client.ObjectKey{ Namespace: input.MachinePool.Namespace, Name: input.MachinePool.Name, diff --git a/test/framework/machines.go b/test/framework/machines.go index 84be66fa8c7f..4d4d2cca4b0e 100644 --- a/test/framework/machines.go +++ b/test/framework/machines.go @@ -25,7 +25,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" ) diff --git a/test/framework/machineset_helpers.go b/test/framework/machineset_helpers.go index 474d9a8f1082..81486f44d73b 100644 --- a/test/framework/machineset_helpers.go +++ b/test/framework/machineset_helpers.go @@ -23,7 +23,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // GetMachineSetsByDeploymentInput is the input for GetMachineSetsByDeployment. diff --git a/test/framework/ownerreference_helpers.go b/test/framework/ownerreference_helpers.go index f028e0c7c6b7..7c12e89e1ba9 100644 --- a/test/framework/ownerreference_helpers.go +++ b/test/framework/ownerreference_helpers.go @@ -35,11 +35,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" clusterctlcluster "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" infraexpv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1" "sigs.k8s.io/cluster-api/util/patch" ) @@ -199,7 +198,7 @@ var ( clusterResourceSetBindingKind = "ClusterResourceSetBinding" machinePoolKind = "MachinePool" - machinePoolController = metav1.OwnerReference{Kind: machinePoolKind, APIVersion: expv1.GroupVersion.String(), Controller: ptr.To(true)} + machinePoolController = metav1.OwnerReference{Kind: machinePoolKind, APIVersion: clusterv1.GroupVersion.String(), Controller: ptr.To(true)} clusterResourceSetOwner = metav1.OwnerReference{Kind: clusterResourceSetKind, APIVersion: addonsv1.GroupVersion.String()} ) diff --git a/test/framework/spec_helpers.go b/test/framework/spec_helpers.go index eab1e0754338..ea86c170a8a5 100644 --- a/test/framework/spec_helpers.go +++ b/test/framework/spec_helpers.go @@ -27,7 +27,7 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util" ) diff --git a/test/infrastructure/container/interface.go b/test/infrastructure/container/interface.go index 2a840ade5b52..a0eef8a08a05 100644 --- a/test/infrastructure/container/interface.go +++ b/test/infrastructure/container/interface.go @@ -25,7 +25,7 @@ import ( dockercontainer "github.com/docker/docker/api/types/container" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/infrastructure/kind" ) diff --git a/test/infrastructure/container/interface_test.go b/test/infrastructure/container/interface_test.go index ae1cb89d4c29..55d660f3f89d 100644 --- a/test/infrastructure/container/interface_test.go +++ b/test/infrastructure/container/interface_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestFilterBuildKeyValue(t *testing.T) { diff --git a/test/infrastructure/docker/api/v1alpha3/zz_generated.conversion.go b/test/infrastructure/docker/api/v1alpha3/zz_generated.conversion.go index e7b040334a0d..90fdf151dd41 100644 --- a/test/infrastructure/docker/api/v1alpha3/zz_generated.conversion.go +++ b/test/infrastructure/docker/api/v1alpha3/zz_generated.conversion.go @@ -26,8 +26,8 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - v1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" corev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" v1beta1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) @@ -282,7 +282,7 @@ func autoConvert_v1alpha3_DockerClusterSpec_To_v1beta1_DockerClusterSpec(in *Doc if err := Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { return err } - out.FailureDomains = *(*apiv1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) + out.FailureDomains = *(*corev1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) return nil } @@ -302,7 +302,7 @@ func autoConvert_v1beta1_DockerClusterSpec_To_v1alpha3_DockerClusterSpec(in *v1b func autoConvert_v1alpha3_DockerClusterStatus_To_v1beta1_DockerClusterStatus(in *DockerClusterStatus, out *v1beta1.DockerClusterStatus, s conversion.Scope) error { out.Ready = in.Ready - out.FailureDomains = *(*apiv1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) + out.FailureDomains = *(*corev1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) out.Conditions = *(*v1beta2.Conditions)(unsafe.Pointer(&in.Conditions)) return nil } diff --git a/test/infrastructure/docker/api/v1alpha4/condition_consts.go b/test/infrastructure/docker/api/v1alpha4/condition_consts.go index a3722c23035c..f96710650741 100644 --- a/test/infrastructure/docker/api/v1alpha4/condition_consts.go +++ b/test/infrastructure/docker/api/v1alpha4/condition_consts.go @@ -17,7 +17,7 @@ limitations under the License. package v1alpha4 import ( - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // Conditions and condition Reasons for the DockerMachine object. diff --git a/test/infrastructure/docker/api/v1alpha4/zz_generated.conversion.go b/test/infrastructure/docker/api/v1alpha4/zz_generated.conversion.go index 2028271f2db6..04cc2b809fdf 100644 --- a/test/infrastructure/docker/api/v1alpha4/zz_generated.conversion.go +++ b/test/infrastructure/docker/api/v1alpha4/zz_generated.conversion.go @@ -26,8 +26,8 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - v1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + v1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" corev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" v1beta1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) @@ -342,7 +342,7 @@ func autoConvert_v1alpha4_DockerClusterSpec_To_v1beta1_DockerClusterSpec(in *Doc if err := Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { return err } - out.FailureDomains = *(*apiv1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) + out.FailureDomains = *(*corev1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) if err := Convert_v1alpha4_DockerLoadBalancer_To_v1beta1_DockerLoadBalancer(&in.LoadBalancer, &out.LoadBalancer, s); err != nil { return err } @@ -372,7 +372,7 @@ func Convert_v1beta1_DockerClusterSpec_To_v1alpha4_DockerClusterSpec(in *v1beta1 func autoConvert_v1alpha4_DockerClusterStatus_To_v1beta1_DockerClusterStatus(in *DockerClusterStatus, out *v1beta1.DockerClusterStatus, s conversion.Scope) error { out.Ready = in.Ready - out.FailureDomains = *(*apiv1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) + out.FailureDomains = *(*corev1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) out.Conditions = *(*v1beta2.Conditions)(unsafe.Pointer(&in.Conditions)) return nil } diff --git a/test/infrastructure/docker/api/v1beta1/condition_consts.go b/test/infrastructure/docker/api/v1beta1/condition_consts.go index f84664f4bb63..6e34c219daf1 100644 --- a/test/infrastructure/docker/api/v1beta1/condition_consts.go +++ b/test/infrastructure/docker/api/v1beta1/condition_consts.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // Conditions and condition Reasons for the DockerMachine object. diff --git a/test/infrastructure/docker/api/v1beta1/devcluster_types.go b/test/infrastructure/docker/api/v1beta1/devcluster_types.go index ddb7a5b945a2..5f60abbcd8d0 100644 --- a/test/infrastructure/docker/api/v1beta1/devcluster_types.go +++ b/test/infrastructure/docker/api/v1beta1/devcluster_types.go @@ -19,8 +19,8 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( diff --git a/test/infrastructure/docker/api/v1beta1/devclustertemplate_types.go b/test/infrastructure/docker/api/v1beta1/devclustertemplate_types.go index e6808e5ef356..4d7a70b6835e 100644 --- a/test/infrastructure/docker/api/v1beta1/devclustertemplate_types.go +++ b/test/infrastructure/docker/api/v1beta1/devclustertemplate_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DevClusterTemplateSpec defines the desired state of DevClusterTemplate. diff --git a/test/infrastructure/docker/api/v1beta1/devmachine_types.go b/test/infrastructure/docker/api/v1beta1/devmachine_types.go index fd50475783f9..29cebe68a9e4 100644 --- a/test/infrastructure/docker/api/v1beta1/devmachine_types.go +++ b/test/infrastructure/docker/api/v1beta1/devmachine_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( diff --git a/test/infrastructure/docker/api/v1beta1/devmachinetemplate_types.go b/test/infrastructure/docker/api/v1beta1/devmachinetemplate_types.go index f334c35305f8..c39219b27c6a 100644 --- a/test/infrastructure/docker/api/v1beta1/devmachinetemplate_types.go +++ b/test/infrastructure/docker/api/v1beta1/devmachinetemplate_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DevMachineTemplateSpec defines the desired state of DevMachineTemplate. diff --git a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go index 96bd2f3b39c9..62f64417253e 100644 --- a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go +++ b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go @@ -20,8 +20,8 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( diff --git a/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_types.go b/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_types.go index fee0d5a92ca6..f66512e1e614 100644 --- a/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_types.go +++ b/test/infrastructure/docker/api/v1beta1/dockerclustertemplate_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DockerClusterTemplateSpec defines the desired state of DockerClusterTemplate. diff --git a/test/infrastructure/docker/api/v1beta1/dockermachine_types.go b/test/infrastructure/docker/api/v1beta1/dockermachine_types.go index cd21f5cf2499..d7fc1f723250 100644 --- a/test/infrastructure/docker/api/v1beta1/dockermachine_types.go +++ b/test/infrastructure/docker/api/v1beta1/dockermachine_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) const ( diff --git a/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_types.go b/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_types.go index a911937fa8e2..30b50fe85f1c 100644 --- a/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_types.go +++ b/test/infrastructure/docker/api/v1beta1/dockermachinetemplate_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DockerMachineTemplateSpec defines the desired state of DockerMachineTemplate. diff --git a/test/infrastructure/docker/api/v1beta1/v1beta2_condition_consts.go b/test/infrastructure/docker/api/v1beta1/v1beta2_condition_consts.go index 6da6a00558d1..e22f1cace297 100644 --- a/test/infrastructure/docker/api/v1beta1/v1beta2_condition_consts.go +++ b/test/infrastructure/docker/api/v1beta1/v1beta2_condition_consts.go @@ -16,7 +16,7 @@ limitations under the License. package v1beta1 -import clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" +import clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" // Conditions that will be used for the DockerCluster object in v1Beta2 API version. const ( diff --git a/test/infrastructure/docker/api/v1beta1/zz_generated.deepcopy.go b/test/infrastructure/docker/api/v1beta1/zz_generated.deepcopy.go index 575d1a5124a2..7ca00261bedc 100644 --- a/test/infrastructure/docker/api/v1beta1/zz_generated.deepcopy.go +++ b/test/infrastructure/docker/api/v1beta1/zz_generated.deepcopy.go @@ -24,8 +24,8 @@ 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" - "sigs.k8s.io/cluster-api/api/v1beta2" + corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -165,7 +165,7 @@ func (in *DevClusterStatus) DeepCopyInto(out *DevClusterStatus) { *out = *in if in.FailureDomains != nil { in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1beta1.FailureDomains, len(*in)) + *out = make(corev1beta1.FailureDomains, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } @@ -614,7 +614,7 @@ func (in *DockerClusterBackendSpec) DeepCopyInto(out *DockerClusterBackendSpec) *out = *in if in.FailureDomains != nil { in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1beta1.FailureDomains, len(*in)) + *out = make(corev1beta1.FailureDomains, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } @@ -670,7 +670,7 @@ func (in *DockerClusterSpec) DeepCopyInto(out *DockerClusterSpec) { out.ControlPlaneEndpoint = in.ControlPlaneEndpoint if in.FailureDomains != nil { in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1beta1.FailureDomains, len(*in)) + *out = make(corev1beta1.FailureDomains, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } @@ -693,7 +693,7 @@ func (in *DockerClusterStatus) DeepCopyInto(out *DockerClusterStatus) { *out = *in if in.FailureDomains != nil { in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1beta1.FailureDomains, len(*in)) + *out = make(corev1beta1.FailureDomains, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } 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 43dcc188e773..0666b767a98b 100644 --- a/test/infrastructure/docker/exp/api/v1alpha3/zz_generated.conversion.go +++ b/test/infrastructure/docker/exp/api/v1alpha3/zz_generated.conversion.go @@ -26,7 +26,7 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" corev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha3" apiv1alpha3 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha3" apiv1beta1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" diff --git a/test/infrastructure/docker/exp/api/v1alpha4/zz_generated.conversion.go b/test/infrastructure/docker/exp/api/v1alpha4/zz_generated.conversion.go index 454281185ac1..025e28e6408b 100644 --- a/test/infrastructure/docker/exp/api/v1alpha4/zz_generated.conversion.go +++ b/test/infrastructure/docker/exp/api/v1alpha4/zz_generated.conversion.go @@ -26,7 +26,7 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1beta2 "sigs.k8s.io/cluster-api/api/v1beta2" + v1beta2 "sigs.k8s.io/cluster-api/api/core/v1beta2" corev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/core/v1alpha4" apiv1alpha4 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4" apiv1beta1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" diff --git a/test/infrastructure/docker/exp/api/v1beta1/dockermachinepool_types.go b/test/infrastructure/docker/exp/api/v1beta1/dockermachinepool_types.go index 2fa3ee1c28ab..0f725d9d6576 100644 --- a/test/infrastructure/docker/exp/api/v1beta1/dockermachinepool_types.go +++ b/test/infrastructure/docker/exp/api/v1beta1/dockermachinepool_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) diff --git a/test/infrastructure/docker/exp/api/v1beta1/dockermachinepooltemplate_types.go b/test/infrastructure/docker/exp/api/v1beta1/dockermachinepooltemplate_types.go index 01cceb08f0e9..8fc7b09be037 100644 --- a/test/infrastructure/docker/exp/api/v1beta1/dockermachinepooltemplate_types.go +++ b/test/infrastructure/docker/exp/api/v1beta1/dockermachinepooltemplate_types.go @@ -19,7 +19,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DockerMachinePoolTemplateSpec defines the desired state of DockerMachinePoolTemplate. diff --git a/test/infrastructure/docker/exp/api/v1beta1/zz_generated.deepcopy.go b/test/infrastructure/docker/exp/api/v1beta1/zz_generated.deepcopy.go index faec2ac1ae9e..9d29738c1a8c 100644 --- a/test/infrastructure/docker/exp/api/v1beta1/zz_generated.deepcopy.go +++ b/test/infrastructure/docker/exp/api/v1beta1/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ package v1beta1 import ( "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api/api/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2" apiv1beta1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) diff --git a/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller.go b/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller.go index 2dff5f74a7e3..8fee43824d25 100644 --- a/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller.go +++ b/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller.go @@ -37,9 +37,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" utilexp "sigs.k8s.io/cluster-api/exp/util" "sigs.k8s.io/cluster-api/internal/util/ssa" "sigs.k8s.io/cluster-api/test/infrastructure/container" @@ -170,7 +169,7 @@ func (r *DockerMachinePoolReconciler) SetupWithManager(ctx context.Context, mgr WithOptions(options). WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(mgr.GetScheme(), predicateLog, r.WatchFilterValue)). Watches( - &expv1.MachinePool{}, + &clusterv1.MachinePool{}, handler.EnqueueRequestsFromMapFunc(utilexp.MachinePoolToInfrastructureMapFunc(ctx, infraexpv1.GroupVersion.WithKind("DockerMachinePool"))), builder.WithPredicates(predicates.ResourceIsChanged(mgr.GetScheme(), predicateLog)), @@ -205,7 +204,7 @@ func (r *DockerMachinePoolReconciler) SetupWithManager(ctx context.Context, mgr return nil } -func (r *DockerMachinePoolReconciler) reconcileDelete(ctx context.Context, cluster *clusterv1.Cluster, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) error { +func (r *DockerMachinePoolReconciler) reconcileDelete(ctx context.Context, cluster *clusterv1.Cluster, machinePool *clusterv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) error { log := ctrl.LoggerFrom(ctx) dockerMachineList, err := getDockerMachines(ctx, r.Client, *cluster, *machinePool, *dockerMachinePool) @@ -261,7 +260,7 @@ func (r *DockerMachinePoolReconciler) reconcileDelete(ctx context.Context, clust return nil } -func (r *DockerMachinePoolReconciler) reconcileNormal(ctx context.Context, cluster *clusterv1.Cluster, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) (ctrl.Result, error) { +func (r *DockerMachinePoolReconciler) reconcileNormal(ctx context.Context, cluster *clusterv1.Cluster, machinePool *clusterv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) (ctrl.Result, error) { log := ctrl.LoggerFrom(ctx) // Make sure bootstrap data is available and populated. @@ -316,7 +315,7 @@ func (r *DockerMachinePoolReconciler) reconcileNormal(ctx context.Context, clust if len(dockerMachinePool.Spec.ProviderIDList) == int(*machinePool.Spec.Replicas) && len(dockerMachineList.Items) == int(*machinePool.Spec.Replicas) { dockerMachinePool.Status.Ready = true - v1beta1conditions.MarkTrue(dockerMachinePool, expv1.ReplicasReadyV1Beta1Condition) + v1beta1conditions.MarkTrue(dockerMachinePool, clusterv1.ReplicasReadyV1Beta1Condition) return ctrl.Result{}, nil } @@ -324,7 +323,7 @@ func (r *DockerMachinePoolReconciler) reconcileNormal(ctx context.Context, clust return r.updateStatus(ctx, cluster, machinePool, dockerMachinePool, dockerMachineList.Items) } -func getDockerMachines(ctx context.Context, c client.Client, cluster clusterv1.Cluster, machinePool expv1.MachinePool, dockerMachinePool infraexpv1.DockerMachinePool) (*infrav1.DockerMachineList, error) { +func getDockerMachines(ctx context.Context, c client.Client, cluster clusterv1.Cluster, machinePool clusterv1.MachinePool, dockerMachinePool infraexpv1.DockerMachinePool) (*infrav1.DockerMachineList, error) { dockerMachineList := &infrav1.DockerMachineList{} labels := map[string]string{ clusterv1.ClusterNameLabel: cluster.Name, @@ -381,7 +380,7 @@ func dockerMachineToDockerMachinePool(_ context.Context, o client.Object) []ctrl // updateStatus updates the Status field for the MachinePool object. // It checks for the current state of the replicas and updates the Status of the MachinePool. -func (r *DockerMachinePoolReconciler) updateStatus(ctx context.Context, cluster *clusterv1.Cluster, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool, dockerMachines []infrav1.DockerMachine) (ctrl.Result, error) { +func (r *DockerMachinePoolReconciler) updateStatus(ctx context.Context, cluster *clusterv1.Cluster, machinePool *clusterv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool, dockerMachines []infrav1.DockerMachine) (ctrl.Result, error) { log := ctrl.LoggerFrom(ctx) // List the Docker containers. This corresponds to an InfraMachinePool instance for providers. @@ -432,7 +431,7 @@ func (r *DockerMachinePoolReconciler) updateStatus(ctx context.Context, cluster // Aggregate the operational state of all the machines; while aggregating we are adding the // source ref (reason@machine/name) so the problem can be easily tracked down to its source machine. - v1beta1conditions.SetAggregate(dockerMachinePool, expv1.ReplicasReadyV1Beta1Condition, getters, v1beta1conditions.AddSourceRef()) + v1beta1conditions.SetAggregate(dockerMachinePool, clusterv1.ReplicasReadyV1Beta1Condition, getters, v1beta1conditions.AddSourceRef()) return ctrl.Result{}, nil } @@ -440,7 +439,7 @@ func (r *DockerMachinePoolReconciler) updateStatus(ctx context.Context, cluster func patchDockerMachinePool(ctx context.Context, patchHelper *patch.Helper, dockerMachinePool *infraexpv1.DockerMachinePool) error { v1beta1conditions.SetSummary(dockerMachinePool, v1beta1conditions.WithConditions( - expv1.ReplicasReadyV1Beta1Condition, + clusterv1.ReplicasReadyV1Beta1Condition, ), ) @@ -450,7 +449,7 @@ func patchDockerMachinePool(ctx context.Context, patchHelper *patch.Helper, dock dockerMachinePool, patch.WithOwnedV1Beta1Conditions{Conditions: []clusterv1.ConditionType{ clusterv1.ReadyV1Beta1Condition, - expv1.ReplicasReadyV1Beta1Condition, + clusterv1.ReplicasReadyV1Beta1Condition, }}, ) } diff --git a/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller_phases.go b/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller_phases.go index 02fe0d941859..4e70f8a87778 100644 --- a/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller_phases.go +++ b/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller_phases.go @@ -31,8 +31,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/kind/pkg/cluster/constants" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/util/ssa" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" infraexpv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1" @@ -48,7 +47,7 @@ import ( // - Does not delete any containers as that must be triggered in reconcileDockerMachines to ensure node cordon/drain. // // Providers should similarly create their infrastructure instances and reconcile any additional logic. -func (r *DockerMachinePoolReconciler) reconcileDockerContainers(ctx context.Context, cluster *clusterv1.Cluster, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) error { +func (r *DockerMachinePoolReconciler) reconcileDockerContainers(ctx context.Context, cluster *clusterv1.Cluster, machinePool *clusterv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) error { log := ctrl.LoggerFrom(ctx) log.V(2).Info("Reconciling Docker containers", "DockerMachinePool", klog.KObj(dockerMachinePool)) @@ -74,7 +73,7 @@ func (r *DockerMachinePoolReconciler) reconcileDockerContainers(ctx context.Cont } // createDockerContainer creates a Docker container to serve as a replica for the MachinePool. -func createDockerContainer(ctx context.Context, name string, cluster *clusterv1.Cluster, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) error { +func createDockerContainer(ctx context.Context, name string, cluster *clusterv1.Cluster, machinePool *clusterv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) error { log := ctrl.LoggerFrom(ctx) labelFilters := map[string]string{dockerMachinePoolLabel: dockerMachinePool.Name} externalMachine, err := docker.NewMachine(ctx, cluster, name, labelFilters) @@ -112,7 +111,7 @@ func createDockerContainer(ctx context.Context, name string, cluster *clusterv1. // - Deleting DockerMachines referencing a container whose Kubernetes version or custom image no longer matches the spec. // - Deleting DockerMachines that correspond to a deleted/non-existent Docker container. // - Deleting DockerMachines when scaling down such that DockerMachines whose owner Machine has the clusterv1.DeleteMachineAnnotation is given priority. -func (r *DockerMachinePoolReconciler) reconcileDockerMachines(ctx context.Context, cluster *clusterv1.Cluster, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) error { +func (r *DockerMachinePoolReconciler) reconcileDockerMachines(ctx context.Context, cluster *clusterv1.Cluster, machinePool *clusterv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) error { log := ctrl.LoggerFrom(ctx) log.V(2).Info("Reconciling DockerMachines", "DockerMachinePool", klog.KObj(dockerMachinePool)) @@ -246,7 +245,7 @@ func (r *DockerMachinePoolReconciler) reconcileDockerMachines(ctx context.Contex // computeDesiredDockerMachine creates a DockerMachine to represent a Docker container in a DockerMachinePool. // These DockerMachines have the clusterv1.ClusterNameLabel and clusterv1.MachinePoolNameLabel to support MachinePool Machines. -func computeDesiredDockerMachine(name string, cluster *clusterv1.Cluster, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool, existingDockerMachine *infrav1.DockerMachine) *infrav1.DockerMachine { +func computeDesiredDockerMachine(name string, cluster *clusterv1.Cluster, machinePool *clusterv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool, existingDockerMachine *infrav1.DockerMachine) *infrav1.DockerMachine { dockerMachine := &infrav1.DockerMachine{ ObjectMeta: metav1.ObjectMeta{ Namespace: dockerMachinePool.Namespace, @@ -350,7 +349,7 @@ func orderByDeleteMachineAnnotation(machines []infrav1.DockerMachine) []infrav1. } // isMachineMatchingInfrastructureSpec returns true if the Docker container image matches the custom image in the DockerMachinePool spec. -func isMachineMatchingInfrastructureSpec(_ context.Context, machine *docker.Machine, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) bool { +func isMachineMatchingInfrastructureSpec(_ context.Context, machine *docker.Machine, machinePool *clusterv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) bool { // NOTE: With the current implementation we are checking if the machine is using a kindest/node image for the expected version, // but not checking if the machine has the expected extra.mounts or pre.loaded images. @@ -366,7 +365,7 @@ func isMachineMatchingInfrastructureSpec(_ context.Context, machine *docker.Mach } // machinesMatchingInfrastructureSpec returns the Docker containers matching the custom image in the DockerMachinePool spec. -func machinesMatchingInfrastructureSpec(ctx context.Context, machines []*docker.Machine, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) []*docker.Machine { +func machinesMatchingInfrastructureSpec(ctx context.Context, machines []*docker.Machine, machinePool *clusterv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) []*docker.Machine { var matchingMachines []*docker.Machine for _, machine := range machines { if isMachineMatchingInfrastructureSpec(ctx, machine, machinePool, dockerMachinePool) { @@ -378,7 +377,7 @@ func machinesMatchingInfrastructureSpec(ctx context.Context, machines []*docker. } // getDeletionCandidates returns the DockerMachines for a MachinePool that do not match the infrastructure spec followed by any DockerMachines that are ready and up to date, i.e. matching the infrastructure spec. -func (r *DockerMachinePoolReconciler) getDeletionCandidates(ctx context.Context, dockerMachines []infrav1.DockerMachine, externalMachineSet map[string]*docker.Machine, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) (outdatedMachines []infrav1.DockerMachine, readyMatchingMachines []infrav1.DockerMachine, err error) { +func (r *DockerMachinePoolReconciler) getDeletionCandidates(ctx context.Context, dockerMachines []infrav1.DockerMachine, externalMachineSet map[string]*docker.Machine, machinePool *clusterv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool) (outdatedMachines []infrav1.DockerMachine, readyMatchingMachines []infrav1.DockerMachine, err error) { for i := range dockerMachines { dockerMachine := dockerMachines[i] externalMachine, ok := externalMachineSet[dockerMachine.Name] diff --git a/test/infrastructure/docker/internal/controllers/backends/cluster.go b/test/infrastructure/docker/internal/controllers/backends/cluster.go index a6fe26994e07..e71acb062a59 100644 --- a/test/infrastructure/docker/internal/controllers/backends/cluster.go +++ b/test/infrastructure/docker/internal/controllers/backends/cluster.go @@ -21,7 +21,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "sigs.k8s.io/cluster-api/util/patch" ) diff --git a/test/infrastructure/docker/internal/controllers/backends/docker/dockercluster_backend.go b/test/infrastructure/docker/internal/controllers/backends/docker/dockercluster_backend.go index d142f1a1eef4..12a7668f26ae 100644 --- a/test/infrastructure/docker/internal/controllers/backends/docker/dockercluster_backend.go +++ b/test/infrastructure/docker/internal/controllers/backends/docker/dockercluster_backend.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/infrastructure/container" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/docker/internal/docker" diff --git a/test/infrastructure/docker/internal/controllers/backends/docker/dockermachine_backend.go b/test/infrastructure/docker/internal/controllers/backends/docker/dockermachine_backend.go index e93609d5d75b..80190a888223 100644 --- a/test/infrastructure/docker/internal/controllers/backends/docker/dockermachine_backend.go +++ b/test/infrastructure/docker/internal/controllers/backends/docker/dockermachine_backend.go @@ -32,8 +32,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/kind/pkg/cluster/constants" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" utilexp "sigs.k8s.io/cluster-api/exp/util" "sigs.k8s.io/cluster-api/test/infrastructure/container" diff --git a/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorycluster_backend.go b/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorycluster_backend.go index 8f75092878d7..140a0e78fc6a 100644 --- a/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorycluster_backend.go +++ b/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorycluster_backend.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" inmemoryruntime "sigs.k8s.io/cluster-api/test/infrastructure/inmemory/pkg/runtime" inmemoryserver "sigs.k8s.io/cluster-api/test/infrastructure/inmemory/pkg/server" diff --git a/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorymachine_backend.go b/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorymachine_backend.go index 82855c93d050..cccfdc721bf5 100644 --- a/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorymachine_backend.go +++ b/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorymachine_backend.go @@ -38,7 +38,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" cloudv1 "sigs.k8s.io/cluster-api/test/infrastructure/inmemory/pkg/cloud/api/v1alpha1" inmemoryruntime "sigs.k8s.io/cluster-api/test/infrastructure/inmemory/pkg/runtime" diff --git a/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorymachine_controller_test.go b/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorymachine_controller_test.go index a546195d1948..b042393808b7 100644 --- a/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorymachine_controller_test.go +++ b/test/infrastructure/docker/internal/controllers/backends/inmemory/inmemorymachine_controller_test.go @@ -38,7 +38,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" cloudv1 "sigs.k8s.io/cluster-api/test/infrastructure/inmemory/pkg/cloud/api/v1alpha1" inmemoryruntime "sigs.k8s.io/cluster-api/test/infrastructure/inmemory/pkg/runtime" diff --git a/test/infrastructure/docker/internal/controllers/backends/machine.go b/test/infrastructure/docker/internal/controllers/backends/machine.go index 902d1653feab..6d20547638a2 100644 --- a/test/infrastructure/docker/internal/controllers/backends/machine.go +++ b/test/infrastructure/docker/internal/controllers/backends/machine.go @@ -21,7 +21,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "sigs.k8s.io/cluster-api/util/patch" ) diff --git a/test/infrastructure/docker/internal/controllers/devcluster_controller.go b/test/infrastructure/docker/internal/controllers/devcluster_controller.go index 764cee67c3df..da80dff43c41 100644 --- a/test/infrastructure/docker/internal/controllers/devcluster_controller.go +++ b/test/infrastructure/docker/internal/controllers/devcluster_controller.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/infrastructure/container" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" "sigs.k8s.io/cluster-api/test/infrastructure/docker/internal/controllers/backends" diff --git a/test/infrastructure/docker/internal/controllers/devmachine_controller.go b/test/infrastructure/docker/internal/controllers/devmachine_controller.go index 1451398e364c..c0e37a8f2dfd 100644 --- a/test/infrastructure/docker/internal/controllers/devmachine_controller.go +++ b/test/infrastructure/docker/internal/controllers/devmachine_controller.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/test/infrastructure/container" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" diff --git a/test/infrastructure/docker/internal/controllers/dockercluster_controller.go b/test/infrastructure/docker/internal/controllers/dockercluster_controller.go index 2381800730bc..7235d07022a5 100644 --- a/test/infrastructure/docker/internal/controllers/dockercluster_controller.go +++ b/test/infrastructure/docker/internal/controllers/dockercluster_controller.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/infrastructure/container" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" dockerbackend "sigs.k8s.io/cluster-api/test/infrastructure/docker/internal/controllers/backends/docker" diff --git a/test/infrastructure/docker/internal/controllers/dockermachine_controller.go b/test/infrastructure/docker/internal/controllers/dockermachine_controller.go index da4361cef88c..a365097739f3 100644 --- a/test/infrastructure/docker/internal/controllers/dockermachine_controller.go +++ b/test/infrastructure/docker/internal/controllers/dockermachine_controller.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/test/infrastructure/container" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" diff --git a/test/infrastructure/docker/internal/controllers/dockermachine_controller_test.go b/test/infrastructure/docker/internal/controllers/dockermachine_controller_test.go index 375bd6485d1f..b10d3856012c 100644 --- a/test/infrastructure/docker/internal/controllers/dockermachine_controller_test.go +++ b/test/infrastructure/docker/internal/controllers/dockermachine_controller_test.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) diff --git a/test/infrastructure/docker/internal/controllers/suite_test.go b/test/infrastructure/docker/internal/controllers/suite_test.go index 9eb8f7a5d7a0..1bbc18a4ec7b 100644 --- a/test/infrastructure/docker/internal/controllers/suite_test.go +++ b/test/infrastructure/docker/internal/controllers/suite_test.go @@ -20,7 +20,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) diff --git a/test/infrastructure/docker/internal/docker/loadbalancer.go b/test/infrastructure/docker/internal/docker/loadbalancer.go index c94b3b277892..6885e4c00dfe 100644 --- a/test/infrastructure/docker/internal/docker/loadbalancer.go +++ b/test/infrastructure/docker/internal/docker/loadbalancer.go @@ -24,7 +24,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/kind/pkg/cluster/constants" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/test/infrastructure/container" "sigs.k8s.io/cluster-api/test/infrastructure/docker/internal/docker/types" "sigs.k8s.io/cluster-api/test/infrastructure/docker/internal/loadbalancer" diff --git a/test/infrastructure/docker/internal/docker/machine.go b/test/infrastructure/docker/internal/docker/machine.go index 481e060ab9f2..8dfc6993d632 100644 --- a/test/infrastructure/docker/internal/docker/machine.go +++ b/test/infrastructure/docker/internal/docker/machine.go @@ -37,8 +37,8 @@ import ( "sigs.k8s.io/kind/pkg/apis/config/v1alpha4" "sigs.k8s.io/kind/pkg/cluster/constants" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/util/taints" "sigs.k8s.io/cluster-api/test/infrastructure/container" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" diff --git a/test/infrastructure/docker/internal/provisioning/cloudinit/writefiles.go b/test/infrastructure/docker/internal/provisioning/cloudinit/writefiles.go index d5473be6b2cf..e80e1f1d1bf2 100644 --- a/test/infrastructure/docker/internal/provisioning/cloudinit/writefiles.go +++ b/test/infrastructure/docker/internal/provisioning/cloudinit/writefiles.go @@ -29,7 +29,7 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" kubeadmtypes "sigs.k8s.io/cluster-api/bootstrap/kubeadm/types" "sigs.k8s.io/cluster-api/test/infrastructure/docker/internal/provisioning" "sigs.k8s.io/cluster-api/test/infrastructure/kind" diff --git a/test/infrastructure/docker/internal/webhooks/devclustertemplate_webhook_test.go b/test/infrastructure/docker/internal/webhooks/devclustertemplate_webhook_test.go index 54bd3ec599c7..f8406360acbb 100644 --- a/test/infrastructure/docker/internal/webhooks/devclustertemplate_webhook_test.go +++ b/test/infrastructure/docker/internal/webhooks/devclustertemplate_webhook_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilfeature "k8s.io/component-base/featuregate/testing" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/feature" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) diff --git a/test/infrastructure/docker/internal/webhooks/devmachinetemplate_webhook_test.go b/test/infrastructure/docker/internal/webhooks/devmachinetemplate_webhook_test.go index 265cb8eec4f3..bb53d94e72d7 100644 --- a/test/infrastructure/docker/internal/webhooks/devmachinetemplate_webhook_test.go +++ b/test/infrastructure/docker/internal/webhooks/devmachinetemplate_webhook_test.go @@ -27,8 +27,8 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) diff --git a/test/infrastructure/docker/internal/webhooks/dockerclustertemplate_webhook_test.go b/test/infrastructure/docker/internal/webhooks/dockerclustertemplate_webhook_test.go index e0ce5050d89a..731eb87759dc 100644 --- a/test/infrastructure/docker/internal/webhooks/dockerclustertemplate_webhook_test.go +++ b/test/infrastructure/docker/internal/webhooks/dockerclustertemplate_webhook_test.go @@ -25,7 +25,7 @@ import ( utilfeature "k8s.io/component-base/featuregate/testing" ctrl "sigs.k8s.io/controller-runtime" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/feature" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) diff --git a/test/infrastructure/docker/internal/webhooks/dockermachinetemplate_webhook_test.go b/test/infrastructure/docker/internal/webhooks/dockermachinetemplate_webhook_test.go index 04eea81ee493..05095ce91fb2 100644 --- a/test/infrastructure/docker/internal/webhooks/dockermachinetemplate_webhook_test.go +++ b/test/infrastructure/docker/internal/webhooks/dockermachinetemplate_webhook_test.go @@ -27,8 +27,8 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1" ) diff --git a/test/infrastructure/docker/main.go b/test/infrastructure/docker/main.go index f92b3650f1cb..dac285114356 100644 --- a/test/infrastructure/docker/main.go +++ b/test/infrastructure/docker/main.go @@ -49,11 +49,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/webhook" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/clustercache" "sigs.k8s.io/cluster-api/controllers/crdmigrator" "sigs.k8s.io/cluster-api/controllers/remote" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/test/infrastructure/container" infrav1alpha3 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha3" @@ -116,7 +115,6 @@ func init() { _ = infraexpv1alpha4.AddToScheme(scheme) _ = infraexpv1.AddToScheme(scheme) _ = clusterv1.AddToScheme(scheme) - _ = expv1.AddToScheme(scheme) // scheme used for operating on the cloud resource. _ = cloudv1.AddToScheme(inmemoryScheme) diff --git a/util/annotations/helpers.go b/util/annotations/helpers.go index 422596cd7cae..df11f0abd234 100644 --- a/util/annotations/helpers.go +++ b/util/annotations/helpers.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // IsPaused returns true if the Cluster is paused or the object has the `paused` annotation. diff --git a/util/annotations/helpers_test.go b/util/annotations/helpers_test.go index cc562d64d76f..fd09f0aa1775 100644 --- a/util/annotations/helpers_test.go +++ b/util/annotations/helpers_test.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/util/apiwarnings/handler.go b/util/apiwarnings/handler.go index a2356cc40a63..cd82c04fadb8 100644 --- a/util/apiwarnings/handler.go +++ b/util/apiwarnings/handler.go @@ -22,7 +22,7 @@ import ( "github.com/go-logr/logr" "k8s.io/client-go/rest" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DiscardMatchingHandler is a handler that discards API server warnings diff --git a/util/cache/cache_test.go b/util/cache/cache_test.go index be68fe9850b5..8ef9bcf7fba1 100644 --- a/util/cache/cache_test.go +++ b/util/cache/cache_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestCache(t *testing.T) { diff --git a/util/collections/helpers.go b/util/collections/helpers.go index 23c6517b6807..e84908da224f 100644 --- a/util/collections/helpers.go +++ b/util/collections/helpers.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // GetFilteredMachinesForCluster returns a list of machines that can be filtered or not. diff --git a/util/collections/machine_collection.go b/util/collections/machine_collection.go index e512dec32cb3..a090521cdf70 100644 --- a/util/collections/machine_collection.go +++ b/util/collections/machine_collection.go @@ -32,7 +32,7 @@ import ( "github.com/blang/semver/v4" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" "sigs.k8s.io/cluster-api/util/version" ) diff --git a/util/collections/machine_collection_test.go b/util/collections/machine_collection_test.go index 8ba407aee78c..e6bd0e0770b4 100644 --- a/util/collections/machine_collection_test.go +++ b/util/collections/machine_collection_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/collections" ) diff --git a/util/collections/machine_filters.go b/util/collections/machine_filters.go index 0e0409225a72..e185e25cd3bd 100644 --- a/util/collections/machine_filters.go +++ b/util/collections/machine_filters.go @@ -25,8 +25,8 @@ import ( "k8s.io/apimachinery/pkg/selection" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/util/collections/machine_filters_test.go b/util/collections/machine_filters_test.go index 4fcaaa8fe40b..d6cc80363d7d 100644 --- a/util/collections/machine_filters_test.go +++ b/util/collections/machine_filters_test.go @@ -26,8 +26,8 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta2" + controlplanev1 "sigs.k8s.io/cluster-api/api/controlplane/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/collections" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/util/conditions/aggregate_test.go b/util/conditions/aggregate_test.go index 6f8ffc31392f..92235c9e3824 100644 --- a/util/conditions/aggregate_test.go +++ b/util/conditions/aggregate_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/util/conditions/deprecated/v1beta1/getter.go b/util/conditions/deprecated/v1beta1/getter.go index 738c8a789dbe..9d945d4dfacc 100644 --- a/util/conditions/deprecated/v1beta1/getter.go +++ b/util/conditions/deprecated/v1beta1/getter.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // Getter interface defines methods that a Cluster API object should implement in order to diff --git a/util/conditions/deprecated/v1beta1/getter_test.go b/util/conditions/deprecated/v1beta1/getter_test.go index 81e7fc9af353..31ec190f5df5 100644 --- a/util/conditions/deprecated/v1beta1/getter_test.go +++ b/util/conditions/deprecated/v1beta1/getter_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/util/sets" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/util/conditions/deprecated/v1beta1/matcher.go b/util/conditions/deprecated/v1beta1/matcher.go index 49679245de7e..d92e06736f50 100644 --- a/util/conditions/deprecated/v1beta1/matcher.go +++ b/util/conditions/deprecated/v1beta1/matcher.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega" "github.com/onsi/gomega/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // MatchConditions returns a custom matcher to check equality of clusterv1.Conditions. diff --git a/util/conditions/deprecated/v1beta1/matcher_test.go b/util/conditions/deprecated/v1beta1/matcher_test.go index e6536ff1dac2..b5a7a2197f04 100644 --- a/util/conditions/deprecated/v1beta1/matcher_test.go +++ b/util/conditions/deprecated/v1beta1/matcher_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/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestMatchConditions(t *testing.T) { diff --git a/util/conditions/deprecated/v1beta1/matchers.go b/util/conditions/deprecated/v1beta1/matchers.go index ba1392046d33..3c3adb464743 100644 --- a/util/conditions/deprecated/v1beta1/matchers.go +++ b/util/conditions/deprecated/v1beta1/matchers.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega/format" "github.com/onsi/gomega/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // HaveSameStateOf matches a condition to have the same state of another. diff --git a/util/conditions/deprecated/v1beta1/merge.go b/util/conditions/deprecated/v1beta1/merge.go index c27823adb8f6..262c3672fc81 100644 --- a/util/conditions/deprecated/v1beta1/merge.go +++ b/util/conditions/deprecated/v1beta1/merge.go @@ -21,7 +21,7 @@ import ( corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) type conditionPolarity string diff --git a/util/conditions/deprecated/v1beta1/merge_strategies.go b/util/conditions/deprecated/v1beta1/merge_strategies.go index 0aca7a3ba2eb..ee9374d6bd02 100644 --- a/util/conditions/deprecated/v1beta1/merge_strategies.go +++ b/util/conditions/deprecated/v1beta1/merge_strategies.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // mergeOptions allows to set strategies for merging a set of conditions into a single condition, diff --git a/util/conditions/deprecated/v1beta1/merge_strategies_test.go b/util/conditions/deprecated/v1beta1/merge_strategies_test.go index 3e24e50c095b..4d9ea302b7d9 100644 --- a/util/conditions/deprecated/v1beta1/merge_strategies_test.go +++ b/util/conditions/deprecated/v1beta1/merge_strategies_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestGetStepCounterMessage(t *testing.T) { diff --git a/util/conditions/deprecated/v1beta1/merge_test.go b/util/conditions/deprecated/v1beta1/merge_test.go index 5ce7c6bae44e..76a0176ea386 100644 --- a/util/conditions/deprecated/v1beta1/merge_test.go +++ b/util/conditions/deprecated/v1beta1/merge_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestNewConditionsGroup(t *testing.T) { diff --git a/util/conditions/deprecated/v1beta1/patch.go b/util/conditions/deprecated/v1beta1/patch.go index 8fd2f6989bc0..c805d193b316 100644 --- a/util/conditions/deprecated/v1beta1/patch.go +++ b/util/conditions/deprecated/v1beta1/patch.go @@ -22,7 +22,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" ) diff --git a/util/conditions/deprecated/v1beta1/patch_test.go b/util/conditions/deprecated/v1beta1/patch_test.go index 088aec4f81cd..bd20e75ba088 100644 --- a/util/conditions/deprecated/v1beta1/patch_test.go +++ b/util/conditions/deprecated/v1beta1/patch_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestNewPatch(t *testing.T) { diff --git a/util/conditions/deprecated/v1beta1/setter.go b/util/conditions/deprecated/v1beta1/setter.go index c65dca28e4b5..33797137f0e6 100644 --- a/util/conditions/deprecated/v1beta1/setter.go +++ b/util/conditions/deprecated/v1beta1/setter.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // Setter interface defines methods that a Cluster API object should implement in order to diff --git a/util/conditions/deprecated/v1beta1/setter_test.go b/util/conditions/deprecated/v1beta1/setter_test.go index 32b05a5c06df..972007a674f7 100644 --- a/util/conditions/deprecated/v1beta1/setter_test.go +++ b/util/conditions/deprecated/v1beta1/setter_test.go @@ -27,7 +27,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestHasSameState(t *testing.T) { diff --git a/util/conditions/deprecated/v1beta1/suite_test.go b/util/conditions/deprecated/v1beta1/suite_test.go index 57ea7d91f7d3..8619482999f3 100644 --- a/util/conditions/deprecated/v1beta1/suite_test.go +++ b/util/conditions/deprecated/v1beta1/suite_test.go @@ -20,7 +20,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func init() { diff --git a/util/conditions/deprecated/v1beta1/unstructured.go b/util/conditions/deprecated/v1beta1/unstructured.go index aa3fc9e6ef0e..b752f31d09af 100644 --- a/util/conditions/deprecated/v1beta1/unstructured.go +++ b/util/conditions/deprecated/v1beta1/unstructured.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/log" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" ) diff --git a/util/conditions/deprecated/v1beta1/unstructured_test.go b/util/conditions/deprecated/v1beta1/unstructured_test.go index 820037d871ad..80e1eac923a3 100644 --- a/util/conditions/deprecated/v1beta1/unstructured_test.go +++ b/util/conditions/deprecated/v1beta1/unstructured_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestUnstructuredGetConditions(t *testing.T) { diff --git a/util/conditions/getter_test.go b/util/conditions/getter_test.go index 001a1437dc2f..b6d0472707ae 100644 --- a/util/conditions/getter_test.go +++ b/util/conditions/getter_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/util/conditions/merge_strategies.go b/util/conditions/merge_strategies.go index 06eb7af9709c..c61701bef0cd 100644 --- a/util/conditions/merge_strategies.go +++ b/util/conditions/merge_strategies.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // ConditionWithOwnerInfo is a wrapper around metav1.Condition with additional ConditionOwnerInfo. diff --git a/util/conditions/setter_test.go b/util/conditions/setter_test.go index a9be74137e9e..0f9076780ea8 100644 --- a/util/conditions/setter_test.go +++ b/util/conditions/setter_test.go @@ -25,7 +25,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/util/conditions/sort.go b/util/conditions/sort.go index ef827b866f0f..d0be13af9e30 100644 --- a/util/conditions/sort.go +++ b/util/conditions/sort.go @@ -19,7 +19,7 @@ package conditions import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var orderMap = map[string]int{} diff --git a/util/conditions/sort_test.go b/util/conditions/sort_test.go index 60b720adb658..9b95c7e458c7 100644 --- a/util/conditions/sort_test.go +++ b/util/conditions/sort_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestDefaultSortLessFunc(t *testing.T) { diff --git a/util/conditions/summary_test.go b/util/conditions/summary_test.go index 349c4da9a578..1e0b312e1d20 100644 --- a/util/conditions/summary_test.go +++ b/util/conditions/summary_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/util/conversion/conversion.go b/util/conversion/conversion.go index fd2598b16e0b..40fd7bac6e5d 100644 --- a/util/conversion/conversion.go +++ b/util/conversion/conversion.go @@ -42,7 +42,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/conversion" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/contract" "sigs.k8s.io/cluster-api/util" ) diff --git a/util/conversion/conversion_test.go b/util/conversion/conversion_test.go index dd84438fb065..6473de34d4ce 100644 --- a/util/conversion/conversion_test.go +++ b/util/conversion/conversion_test.go @@ -27,7 +27,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/contract" ) diff --git a/util/deprecated/v1beta1/conditions/getter.go b/util/deprecated/v1beta1/conditions/getter.go index 47f07088b757..05aa81b0a1aa 100644 --- a/util/deprecated/v1beta1/conditions/getter.go +++ b/util/deprecated/v1beta1/conditions/getter.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // Getter interface defines methods that a Cluster API object should implement in order to diff --git a/util/deprecated/v1beta1/conditions/getter_test.go b/util/deprecated/v1beta1/conditions/getter_test.go index 7b3e0e807d1c..6d8ec5d805c2 100644 --- a/util/deprecated/v1beta1/conditions/getter_test.go +++ b/util/deprecated/v1beta1/conditions/getter_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/util/sets" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) var ( diff --git a/util/deprecated/v1beta1/conditions/matcher.go b/util/deprecated/v1beta1/conditions/matcher.go index 97fa86d35b88..37593cab7d34 100644 --- a/util/deprecated/v1beta1/conditions/matcher.go +++ b/util/deprecated/v1beta1/conditions/matcher.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega" "github.com/onsi/gomega/types" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // MatchConditions returns a custom matcher to check equality of clusterv1.Conditions. diff --git a/util/deprecated/v1beta1/conditions/matcher_test.go b/util/deprecated/v1beta1/conditions/matcher_test.go index 19b66b91d75f..b38265167289 100644 --- a/util/deprecated/v1beta1/conditions/matcher_test.go +++ b/util/deprecated/v1beta1/conditions/matcher_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/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) func TestMatchConditions(t *testing.T) { diff --git a/util/deprecated/v1beta1/conditions/matchers.go b/util/deprecated/v1beta1/conditions/matchers.go index dfac4bb25614..d654bf53e94f 100644 --- a/util/deprecated/v1beta1/conditions/matchers.go +++ b/util/deprecated/v1beta1/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/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // HaveSameStateOf matches a condition to have the same state of another. diff --git a/util/deprecated/v1beta1/conditions/merge.go b/util/deprecated/v1beta1/conditions/merge.go index cf88621415fc..471aa72d017f 100644 --- a/util/deprecated/v1beta1/conditions/merge.go +++ b/util/deprecated/v1beta1/conditions/merge.go @@ -21,7 +21,7 @@ import ( corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) type conditionPolarity string diff --git a/util/deprecated/v1beta1/conditions/merge_strategies.go b/util/deprecated/v1beta1/conditions/merge_strategies.go index f4d038ff039f..2af8b4410514 100644 --- a/util/deprecated/v1beta1/conditions/merge_strategies.go +++ b/util/deprecated/v1beta1/conditions/merge_strategies.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // mergeOptions allows to set strategies for merging a set of conditions into a single condition, diff --git a/util/deprecated/v1beta1/conditions/merge_strategies_test.go b/util/deprecated/v1beta1/conditions/merge_strategies_test.go index 516f1a45c628..b198d0a83821 100644 --- a/util/deprecated/v1beta1/conditions/merge_strategies_test.go +++ b/util/deprecated/v1beta1/conditions/merge_strategies_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) func TestGetStepCounterMessage(t *testing.T) { diff --git a/util/deprecated/v1beta1/conditions/merge_test.go b/util/deprecated/v1beta1/conditions/merge_test.go index 36ebecaac614..41f38b6609c9 100644 --- a/util/deprecated/v1beta1/conditions/merge_test.go +++ b/util/deprecated/v1beta1/conditions/merge_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) func TestNewConditionsGroup(t *testing.T) { diff --git a/util/deprecated/v1beta1/conditions/patch.go b/util/deprecated/v1beta1/conditions/patch.go index 46eb0abda67f..ec59a8e48c8e 100644 --- a/util/deprecated/v1beta1/conditions/patch.go +++ b/util/deprecated/v1beta1/conditions/patch.go @@ -22,7 +22,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/pkg/errors" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/util" ) diff --git a/util/deprecated/v1beta1/conditions/patch_test.go b/util/deprecated/v1beta1/conditions/patch_test.go index eda543bef3ef..eb2420f01339 100644 --- a/util/deprecated/v1beta1/conditions/patch_test.go +++ b/util/deprecated/v1beta1/conditions/patch_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) func TestNewPatch(t *testing.T) { diff --git a/util/deprecated/v1beta1/conditions/setter.go b/util/deprecated/v1beta1/conditions/setter.go index 8cea760581e5..c3330f335f3a 100644 --- a/util/deprecated/v1beta1/conditions/setter.go +++ b/util/deprecated/v1beta1/conditions/setter.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // Setter interface defines methods that a Cluster API object should implement in order to diff --git a/util/deprecated/v1beta1/conditions/setter_test.go b/util/deprecated/v1beta1/conditions/setter_test.go index 65f9ac5d5d97..34704e953845 100644 --- a/util/deprecated/v1beta1/conditions/setter_test.go +++ b/util/deprecated/v1beta1/conditions/setter_test.go @@ -27,7 +27,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) func TestHasSameState(t *testing.T) { diff --git a/util/deprecated/v1beta1/conditions/suite_test.go b/util/deprecated/v1beta1/conditions/suite_test.go index a03ec411fe3b..a8ad1b37f230 100644 --- a/util/deprecated/v1beta1/conditions/suite_test.go +++ b/util/deprecated/v1beta1/conditions/suite_test.go @@ -20,7 +20,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) func init() { diff --git a/util/deprecated/v1beta1/conditions/unstructured.go b/util/deprecated/v1beta1/conditions/unstructured.go index 3bc3bc7dda55..3f8fb505251d 100644 --- a/util/deprecated/v1beta1/conditions/unstructured.go +++ b/util/deprecated/v1beta1/conditions/unstructured.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/log" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/util" ) diff --git a/util/deprecated/v1beta1/conditions/unstructured_test.go b/util/deprecated/v1beta1/conditions/unstructured_test.go index acaca1230475..970b1fb3926a 100644 --- a/util/deprecated/v1beta1/conditions/unstructured_test.go +++ b/util/deprecated/v1beta1/conditions/unstructured_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-go/kubernetes/scheme" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) func TestUnstructuredGetConditions(t *testing.T) { diff --git a/util/deprecated/v1beta1/conditions/v1beta2/aggregate_test.go b/util/deprecated/v1beta1/conditions/v1beta2/aggregate_test.go index 2ca2ac281605..af727d80e649 100644 --- a/util/deprecated/v1beta1/conditions/v1beta2/aggregate_test.go +++ b/util/deprecated/v1beta1/conditions/v1beta2/aggregate_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/test/builder" ) diff --git a/util/deprecated/v1beta1/conditions/v1beta2/getter_test.go b/util/deprecated/v1beta1/conditions/v1beta2/getter_test.go index 56f13c0c09b5..33fbf42c225e 100644 --- a/util/deprecated/v1beta1/conditions/v1beta2/getter_test.go +++ b/util/deprecated/v1beta1/conditions/v1beta2/getter_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/test/builder" ) diff --git a/util/deprecated/v1beta1/conditions/v1beta2/merge_strategies.go b/util/deprecated/v1beta1/conditions/v1beta2/merge_strategies.go index 1d45e6c271ca..8180916534d6 100644 --- a/util/deprecated/v1beta1/conditions/v1beta2/merge_strategies.go +++ b/util/deprecated/v1beta1/conditions/v1beta2/merge_strategies.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // ConditionWithOwnerInfo is a wrapper around metav1.Condition with additional ConditionOwnerInfo. diff --git a/util/deprecated/v1beta1/conditions/v1beta2/setter_test.go b/util/deprecated/v1beta1/conditions/v1beta2/setter_test.go index 21c2fea303e6..0b6564b5e102 100644 --- a/util/deprecated/v1beta1/conditions/v1beta2/setter_test.go +++ b/util/deprecated/v1beta1/conditions/v1beta2/setter_test.go @@ -25,7 +25,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/test/builder" ) diff --git a/util/deprecated/v1beta1/conditions/v1beta2/sort.go b/util/deprecated/v1beta1/conditions/v1beta2/sort.go index f48a03b8983d..cdaa8b16d3dd 100644 --- a/util/deprecated/v1beta1/conditions/v1beta2/sort.go +++ b/util/deprecated/v1beta1/conditions/v1beta2/sort.go @@ -19,7 +19,7 @@ package v1beta2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) var orderMap = map[string]int{} diff --git a/util/deprecated/v1beta1/conditions/v1beta2/sort_test.go b/util/deprecated/v1beta1/conditions/v1beta2/sort_test.go index 2badfcd5313e..40aa769fca99 100644 --- a/util/deprecated/v1beta1/conditions/v1beta2/sort_test.go +++ b/util/deprecated/v1beta1/conditions/v1beta2/sort_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) func TestDefaultSortLessFunc(t *testing.T) { diff --git a/util/deprecated/v1beta1/conditions/v1beta2/summary_test.go b/util/deprecated/v1beta1/conditions/v1beta2/summary_test.go index 1d9bd0486dd4..e16d6f4093eb 100644 --- a/util/deprecated/v1beta1/conditions/v1beta2/summary_test.go +++ b/util/deprecated/v1beta1/conditions/v1beta2/summary_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/test/builder" ) diff --git a/util/deprecated/v1beta1/patch/options.go b/util/deprecated/v1beta1/patch/options.go index ba185c6dfc94..87987e29d093 100644 --- a/util/deprecated/v1beta1/patch/options.go +++ b/util/deprecated/v1beta1/patch/options.go @@ -16,7 +16,7 @@ limitations under the License. package patch -import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" +import clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" // Option is some configuration that modifies options for a patch request. type Option interface { diff --git a/util/deprecated/v1beta1/patch/patch.go b/util/deprecated/v1beta1/patch/patch.go index 968c104c2a32..73b32d20bb7e 100644 --- a/util/deprecated/v1beta1/patch/patch.go +++ b/util/deprecated/v1beta1/patch/patch.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions" v1beta2conditions "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions/v1beta2" diff --git a/util/deprecated/v1beta1/patch/patch_test.go b/util/deprecated/v1beta1/patch/patch_test.go index 7def0c395b70..0a7f01f853a0 100644 --- a/util/deprecated/v1beta1/patch/patch_test.go +++ b/util/deprecated/v1beta1/patch/patch_test.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions" diff --git a/util/deprecated/v1beta1/patch/suite_test.go b/util/deprecated/v1beta1/patch/suite_test.go index 4c817b8a9690..3c51b977ba65 100644 --- a/util/deprecated/v1beta1/patch/suite_test.go +++ b/util/deprecated/v1beta1/patch/suite_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/internal/test/envtest" "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/test/builder" ) diff --git a/util/deprecated/v1beta1/patch/utils.go b/util/deprecated/v1beta1/patch/utils.go index d16fa9734841..09b11fe2377d 100644 --- a/util/deprecated/v1beta1/patch/utils.go +++ b/util/deprecated/v1beta1/patch/utils.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) type patchType string diff --git a/util/deprecated/v1beta1/patch/utils_test.go b/util/deprecated/v1beta1/patch/utils_test.go index de0ae1be39c0..f89d59710b19 100644 --- a/util/deprecated/v1beta1/patch/utils_test.go +++ b/util/deprecated/v1beta1/patch/utils_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/test/builder" ) diff --git a/util/deprecated/v1beta1/paused/paused.go b/util/deprecated/v1beta1/paused/paused.go index 4e81aaa8b19e..747896ac7bed 100644 --- a/util/deprecated/v1beta1/paused/paused.go +++ b/util/deprecated/v1beta1/paused/paused.go @@ -28,8 +28,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/annotations" v1beta2conditions "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions/v1beta2" "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch" diff --git a/util/deprecated/v1beta1/paused/paused_test.go b/util/deprecated/v1beta1/paused/paused_test.go index 7a9802b6f074..97bacafa17b5 100644 --- a/util/deprecated/v1beta1/paused/paused_test.go +++ b/util/deprecated/v1beta1/paused/paused_test.go @@ -27,8 +27,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" v1beta2conditions "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions/v1beta2" "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/test/builder" ) diff --git a/util/deprecated/v1beta1/test/builder/v1beta2_transition.go b/util/deprecated/v1beta1/test/builder/v1beta2_transition.go index af9f918c7ff3..ae66456f76e1 100644 --- a/util/deprecated/v1beta1/test/builder/v1beta2_transition.go +++ b/util/deprecated/v1beta1/test/builder/v1beta2_transition.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // This files provide types to validate transition from clusterv1.Conditions in v1Beta1 API to the metav1.Conditions in the v1Beta2 API. diff --git a/util/deprecated/v1beta1/test/builder/zz_generated.deepcopy.go b/util/deprecated/v1beta1/test/builder/zz_generated.deepcopy.go index 25d326cff603..ab1990d8483b 100644 --- a/util/deprecated/v1beta1/test/builder/zz_generated.deepcopy.go +++ b/util/deprecated/v1beta1/test/builder/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package builder import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/cluster-api/api/core/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/util/failuredomains/failure_domains.go b/util/failuredomains/failure_domains.go index 171bb140715c..f5e6c40d40e6 100644 --- a/util/failuredomains/failure_domains.go +++ b/util/failuredomains/failure_domains.go @@ -25,7 +25,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/collections" ) diff --git a/util/failuredomains/failure_domains_test.go b/util/failuredomains/failure_domains_test.go index 8c6a219e92c5..a4ac87f01ef5 100644 --- a/util/failuredomains/failure_domains_test.go +++ b/util/failuredomains/failure_domains_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/collections" ) diff --git a/util/finalizers/finalizers_test.go b/util/finalizers/finalizers_test.go index 1c96ced2b1f1..a43aea7d1ff5 100644 --- a/util/finalizers/finalizers_test.go +++ b/util/finalizers/finalizers_test.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/util/kubeconfig/kubeconfig.go b/util/kubeconfig/kubeconfig.go index b6fa617d3b33..b93c07d03af9 100644 --- a/util/kubeconfig/kubeconfig.go +++ b/util/kubeconfig/kubeconfig.go @@ -33,7 +33,7 @@ import ( "k8s.io/client-go/tools/clientcmd/api" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "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 221b82ebd487..a014d213f318 100644 --- a/util/kubeconfig/kubeconfig_test.go +++ b/util/kubeconfig/kubeconfig_test.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "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 c59f4d505408..11c1eb989a4a 100644 --- a/util/kubeconfig/testing.go +++ b/util/kubeconfig/testing.go @@ -23,7 +23,7 @@ import ( "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd/api" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // 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 af70f2bbf511..73cdc0c9d298 100644 --- a/util/labels/helpers.go +++ b/util/labels/helpers.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // 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 fa72340e741a..fc7d42de4dbb 100644 --- a/util/labels/helpers_test.go +++ b/util/labels/helpers_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestHasWatchLabel(t *testing.T) { diff --git a/util/log/log.go b/util/log/log.go index e4662daecaab..7397ddc4c7c7 100644 --- a/util/log/log.go +++ b/util/log/log.go @@ -31,7 +31,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // AddOwners adds the owners of an Object based on OwnerReferences as k/v pairs to the logger in ctx. diff --git a/util/log/log_test.go b/util/log/log_test.go index 2a477fa10013..265ea5394bb8 100644 --- a/util/log/log_test.go +++ b/util/log/log_test.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/log" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func Test_AddObjectHierarchy(t *testing.T) { diff --git a/util/patch/options.go b/util/patch/options.go index 2f01218e3b14..6d7ef5e188e9 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/v1beta2" +import clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" // 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 2cbf82c35309..1c994e3b88e1 100644 --- a/util/patch/patch.go +++ b/util/patch/patch.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" v1beta1conditions "sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1" diff --git a/util/patch/patch_test.go b/util/patch/patch_test.go index bee0372c3e91..80c3055b66ca 100644 --- a/util/patch/patch_test.go +++ b/util/patch/patch_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/controllers/external" "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/conditions" diff --git a/util/patch/utils.go b/util/patch/utils.go index 255c6b5b7c25..460b95a3c669 100644 --- a/util/patch/utils.go +++ b/util/patch/utils.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) type patchType string diff --git a/util/patch/utils_test.go b/util/patch/utils_test.go index faed1e031da3..2433b6779a6e 100644 --- a/util/patch/utils_test.go +++ b/util/patch/utils_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/util/paused/paused.go b/util/paused/paused.go index f1eb353e5bbb..5383f0bf8b13 100644 --- a/util/paused/paused.go +++ b/util/paused/paused.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/patch" diff --git a/util/paused/paused_test.go b/util/paused/paused_test.go index b36b351c736f..1f3a62ab45f4 100644 --- a/util/paused/paused_test.go +++ b/util/paused/paused_test.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/test/builder" ) diff --git a/util/predicates/cluster_predicates.go b/util/predicates/cluster_predicates.go index 5c27f20f01c1..af80ed932792 100644 --- a/util/predicates/cluster_predicates.go +++ b/util/predicates/cluster_predicates.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/predicate" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conditions" ) diff --git a/util/predicates/cluster_predicates_test.go b/util/predicates/cluster_predicates_test.go index b3d87c76c59a..f18ca493f0af 100644 --- a/util/predicates/cluster_predicates_test.go +++ b/util/predicates/cluster_predicates_test.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/log" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/conditions" "sigs.k8s.io/cluster-api/util/predicates" ) diff --git a/util/secret/certificates.go b/util/secret/certificates.go index 17c56751a120..5e00d8f1bdc2 100644 --- a/util/secret/certificates.go +++ b/util/secret/certificates.go @@ -37,8 +37,8 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/certs" ) diff --git a/util/secret/certificates_test.go b/util/secret/certificates_test.go index 4ca8a4e68e12..2ec1a96d7b96 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/v1beta2" + bootstrapv1 "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2" "sigs.k8s.io/cluster-api/util/secret" ) diff --git a/util/suite_test.go b/util/suite_test.go index 98b0550be1be..2d9cb9b3920d 100644 --- a/util/suite_test.go +++ b/util/suite_test.go @@ -21,7 +21,7 @@ import ( "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/util/test/builder/bootstrap.go b/util/test/builder/bootstrap.go index 1ec1936115b8..f76dc0d8ce32 100644 --- a/util/test/builder/bootstrap.go +++ b/util/test/builder/bootstrap.go @@ -20,7 +20,7 @@ import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/util/test/builder/builders.go b/util/test/builder/builders.go index 1e074cc00e5d..c1110c30bb6f 100644 --- a/util/test/builder/builders.go +++ b/util/test/builder/builders.go @@ -25,8 +25,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/util/intstr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" - expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // ClusterBuilder holds the variables and objects required to build a clusterv1.Cluster. @@ -1594,7 +1593,7 @@ type MachinePoolBuilder struct { replicas *int32 labels map[string]string annotations map[string]string - status *expv1.MachinePoolStatus + status *clusterv1.MachinePoolStatus minReadySeconds *int32 } @@ -1649,7 +1648,7 @@ func (m *MachinePoolBuilder) WithReplicas(replicas int32) *MachinePoolBuilder { } // WithStatus sets the passed status object as the status of the MachinePool object. -func (m *MachinePoolBuilder) WithStatus(status expv1.MachinePoolStatus) *MachinePoolBuilder { +func (m *MachinePoolBuilder) WithStatus(status clusterv1.MachinePoolStatus) *MachinePoolBuilder { m.status = &status return m } @@ -1661,11 +1660,11 @@ func (m *MachinePoolBuilder) WithMinReadySeconds(minReadySeconds int32) *Machine } // Build creates a new MachinePool with the variables and objects passed to the MachinePoolBuilder. -func (m *MachinePoolBuilder) Build() *expv1.MachinePool { - obj := &expv1.MachinePool{ +func (m *MachinePoolBuilder) Build() *clusterv1.MachinePool { + obj := &clusterv1.MachinePool{ TypeMeta: metav1.TypeMeta{ Kind: "MachinePool", - APIVersion: expv1.GroupVersion.String(), + APIVersion: clusterv1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ Name: m.name, @@ -1673,7 +1672,7 @@ func (m *MachinePoolBuilder) Build() *expv1.MachinePool { Labels: m.labels, Annotations: m.annotations, }, - Spec: expv1.MachinePoolSpec{ + Spec: clusterv1.MachinePoolSpec{ ClusterName: m.clusterName, Replicas: m.replicas, Template: clusterv1.MachineTemplateSpec{ diff --git a/util/test/builder/controlplane.go b/util/test/builder/controlplane.go index c58f695c1902..cbfe2f3fe288 100644 --- a/util/test/builder/controlplane.go +++ b/util/test/builder/controlplane.go @@ -20,7 +20,7 @@ import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/util/test/builder/crds.go b/util/test/builder/crds.go index 78c707165772..627414d9bc92 100644 --- a/util/test/builder/crds.go +++ b/util/test/builder/crds.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/utils/ptr" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/contract" ) diff --git a/util/test/builder/infrastructure.go b/util/test/builder/infrastructure.go index 7ae8f8c35f22..71a010e6ba9f 100644 --- a/util/test/builder/infrastructure.go +++ b/util/test/builder/infrastructure.go @@ -20,7 +20,7 @@ import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/util/test/builder/remediation.go b/util/test/builder/remediation.go index 0e5260722417..d6c4e1d3063c 100644 --- a/util/test/builder/remediation.go +++ b/util/test/builder/remediation.go @@ -19,7 +19,7 @@ package builder import ( "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) var ( diff --git a/util/test/builder/v1beta2_transition.go b/util/test/builder/v1beta2_transition.go index 14b4c400ca46..7430ec5dc9a2 100644 --- a/util/test/builder/v1beta2_transition.go +++ b/util/test/builder/v1beta2_transition.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // This files provide types to validate transition from clusterv1.Conditions in v1Beta1 API to the metav1.Conditions in the v1Beta2 API. diff --git a/util/test/builder/zz_generated.deepcopy.go b/util/test/builder/zz_generated.deepcopy.go index 1b441716bb30..410c0fafb3b4 100644 --- a/util/test/builder/zz_generated.deepcopy.go +++ b/util/test/builder/zz_generated.deepcopy.go @@ -24,8 +24,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" - "sigs.k8s.io/cluster-api/api/v1beta2" - apiv1beta2 "sigs.k8s.io/cluster-api/exp/api/v1beta2" + "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -683,7 +682,7 @@ func (in *MachinePoolBuilder) DeepCopyInto(out *MachinePoolBuilder) { } if in.status != nil { in, out := &in.status, &out.status - *out = new(apiv1beta2.MachinePoolStatus) + *out = new(v1beta2.MachinePoolStatus) (*in).DeepCopyInto(*out) } if in.minReadySeconds != nil { diff --git a/util/topology/topology.go b/util/topology/topology.go index c3e832764c8e..b566bde04d4e 100644 --- a/util/topology/topology.go +++ b/util/topology/topology.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) // ShouldSkipImmutabilityChecks returns true if it is a dry-run request and the object has the diff --git a/util/topology/topology_test.go b/util/topology/topology_test.go index 68b04b33353b..af118063e187 100644 --- a/util/topology/topology_test.go +++ b/util/topology/topology_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" ) func TestShouldSkipImmutabilityChecks(t *testing.T) { diff --git a/util/util.go b/util/util.go index 97b9467bf9d4..ffdaffe580b5 100644 --- a/util/util.go +++ b/util/util.go @@ -46,7 +46,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/contract" "sigs.k8s.io/cluster-api/util/labels/format" diff --git a/util/util_test.go b/util/util_test.go index aee30f3edc13..cfc1a82db11f 100644 --- a/util/util_test.go +++ b/util/util_test.go @@ -35,7 +35,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util/labels/format" ) diff --git a/util/yaml/yaml.go b/util/yaml/yaml.go index 11c4b2c9ed51..f79ba7d42fc8 100644 --- a/util/yaml/yaml.go +++ b/util/yaml/yaml.go @@ -35,7 +35,7 @@ import ( "k8s.io/client-go/kubernetes/scheme" "sigs.k8s.io/yaml" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/util" ) diff --git a/webhooks/alias.go b/webhooks/alias.go index bb79ea000b51..24637be90d28 100644 --- a/webhooks/alias.go +++ b/webhooks/alias.go @@ -23,7 +23,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" "sigs.k8s.io/cluster-api/internal/webhooks" )