Skip to content

Commit de57ebf

Browse files
srm09vincepri
andcommitted
Replaces imports with v1alpha4 types
- Replace v1alpha3 imports with v1alpha4 ones - Removes v1alpha2 types Updates PROJECT files for core and bootstrap Update the manifests to remove v1alpha2 types Remove refs of v1alpha2 from Makefile - Removes v1alpha3 webhooks from manager - Updates code-gen Makefile targets Before running the conversion-gen, we delete the existing generated files to ensure clean generation of API conversion code. Signed-off-by: Sagar Muchhal <[email protected]> Co-authored-by: Vince Prignano <[email protected]>
1 parent f73448a commit de57ebf

File tree

202 files changed

+366
-7998
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+366
-7998
lines changed

Makefile

+6-2
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ generate-go-core: $(CONTROLLER_GEN) $(CONVERSION_GEN)
231231
paths=./$(EXP_DIR)/api/... \
232232
paths=./$(EXP_DIR)/addons/api/... \
233233
paths=./cmd/clusterctl/...
234+
$(MAKE) clean-generated-conversions SRC_DIRS="./api/v1alpha3,./$(EXP_DIR)/api/v1alpha3,./$(EXP_DIR)/addons/api/v1alpha3"
234235
$(CONVERSION_GEN) \
235-
--input-dirs=./api/v1alpha2 \
236236
--input-dirs=./api/v1alpha3 \
237237
--input-dirs=./$(EXP_DIR)/api/v1alpha3 \
238238
--input-dirs=./$(EXP_DIR)/addons/api/v1alpha3 \
@@ -246,8 +246,8 @@ generate-go-kubeadm-bootstrap: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs Go re
246246
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \
247247
paths=./bootstrap/kubeadm/api/... \
248248
paths=./bootstrap/kubeadm/types/...
249+
$(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/api"
249250
$(CONVERSION_GEN) \
250-
--input-dirs=./bootstrap/kubeadm/api/v1alpha2 \
251251
--input-dirs=./bootstrap/kubeadm/api/v1alpha3 \
252252
--build-tag=ignore_autogenerated_kubeadm_bootstrap_v1alpha3 \
253253
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \
@@ -259,6 +259,7 @@ generate-go-kubeadm-control-plane: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs G
259259
$(CONTROLLER_GEN) \
260260
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \
261261
paths=./controlplane/kubeadm/api/...
262+
$(MAKE) clean-generated-conversions SRC_DIRS="./controlplane/kubeadm/api"
262263
$(CONVERSION_GEN) \
263264
--input-dirs=./controlplane/kubeadm/api/v1alpha3 \
264265
--build-tag=ignore_autogenerated_kubeadm_controlplane_v1alpha3 \
@@ -626,3 +627,6 @@ diagrams: ## Build proposal diagrams
626627
serve-book: ## Build and serve the book with live-reloading enabled
627628
$(MAKE) -C docs/book serve
628629

630+
.PHONY: clean-generated-conversions
631+
clean-generated-conversions: ## Remove files generated by conversion-gen from the mentioned dirs
632+
(IFS=','; for i in $(SRC_DIRS); do find $$i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done)

PROJECT

-12
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@ version: "2"
22
domain: x-k8s.io
33
repo: sigs.k8s.io/cluster-api
44
resources:
5-
- group: cluster
6-
version: v1alpha2
7-
kind: Cluster
8-
- group: cluster
9-
version: v1alpha2
10-
kind: Machine
11-
- group: cluster
12-
version: v1alpha2
13-
kind: MachineSet
14-
- group: cluster
15-
version: v1alpha2
16-
kind: MachineDeployment
175
- group: cluster
186
version: v1alpha3
197
kind: Cluster

api/v1alpha2/cluster_phase_types.go

-55
This file was deleted.

api/v1alpha2/cluster_types.go

-172
This file was deleted.

api/v1alpha2/cluster_webhook.go

-31
This file was deleted.

api/v1alpha2/clusterlist_webhook.go

-31
This file was deleted.

0 commit comments

Comments
 (0)