Skip to content

Commit

Permalink
Replaces imports with v1alpha4 types
Browse files Browse the repository at this point in the history
- 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 <muchhals@vmware.com>
Co-authored-by: Vince Prignano <vince@vincepri.com>
  • Loading branch information
srm09 and vincepri committed Oct 21, 2020
1 parent 46d59bd commit e73e3d9
Show file tree
Hide file tree
Showing 203 changed files with 448 additions and 8,080 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ generate-go-core: $(CONTROLLER_GEN) $(CONVERSION_GEN)
paths=./$(EXP_DIR)/api/... \
paths=./$(EXP_DIR)/addons/api/... \
paths=./cmd/clusterctl/...
$(MAKE) clean-generated-conversions SRC_DIRS="./api/v1alpha3,./$(EXP_DIR)/api/v1alpha3,./$(EXP_DIR)/addons/api/v1alpha3"
$(CONVERSION_GEN) \
--input-dirs=./api/v1alpha2 \
--input-dirs=./api/v1alpha3 \
--input-dirs=./$(EXP_DIR)/api/v1alpha3 \
--input-dirs=./$(EXP_DIR)/addons/api/v1alpha3 \
Expand All @@ -246,8 +246,8 @@ generate-go-kubeadm-bootstrap: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs Go re
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \
paths=./bootstrap/kubeadm/api/... \
paths=./bootstrap/kubeadm/types/...
$(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/api"
$(CONVERSION_GEN) \
--input-dirs=./bootstrap/kubeadm/api/v1alpha2 \
--input-dirs=./bootstrap/kubeadm/api/v1alpha3 \
--build-tag=ignore_autogenerated_kubeadm_bootstrap_v1alpha3 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \
Expand All @@ -259,6 +259,7 @@ generate-go-kubeadm-control-plane: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs G
$(CONTROLLER_GEN) \
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \
paths=./controlplane/kubeadm/api/...
$(MAKE) clean-generated-conversions SRC_DIRS="./controlplane/kubeadm/api"
$(CONVERSION_GEN) \
--input-dirs=./controlplane/kubeadm/api/v1alpha3 \
--build-tag=ignore_autogenerated_kubeadm_controlplane_v1alpha3 \
Expand Down Expand Up @@ -626,3 +627,6 @@ diagrams: ## Build proposal diagrams
serve-book: ## Build and serve the book with live-reloading enabled
$(MAKE) -C docs/book serve

.PHONY: clean-generated-conversions
clean-generated-conversions: ## Remove files generated by conversion-gen from the mentioned dirs
(IFS=','; for i in $(SRC_DIRS); do find $$i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done)
12 changes: 0 additions & 12 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@ version: "2"
domain: x-k8s.io
repo: sigs.k8s.io/cluster-api
resources:
- group: cluster
version: v1alpha2
kind: Cluster
- group: cluster
version: v1alpha2
kind: Machine
- group: cluster
version: v1alpha2
kind: MachineSet
- group: cluster
version: v1alpha2
kind: MachineDeployment
- group: cluster
version: v1alpha3
kind: Cluster
Expand Down
55 changes: 0 additions & 55 deletions api/v1alpha2/cluster_phase_types.go

This file was deleted.

172 changes: 0 additions & 172 deletions api/v1alpha2/cluster_types.go

This file was deleted.

31 changes: 0 additions & 31 deletions api/v1alpha2/cluster_webhook.go

This file was deleted.

31 changes: 0 additions & 31 deletions api/v1alpha2/clusterlist_webhook.go

This file was deleted.

Loading

0 comments on commit e73e3d9

Please sign in to comment.