Skip to content

Commit

Permalink
⚠️ Prepare for v1beta1
Browse files Browse the repository at this point in the history
Signed-off-by: Vince Prignano <[email protected]>
  • Loading branch information
vincepri committed Sep 16, 2021
1 parent 59ccc97 commit 868e086
Show file tree
Hide file tree
Showing 476 changed files with 27,608 additions and 5,293 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ hack/tools/bin
# E2E test templates
test/e2e/data/infrastructure-docker/v1alpha3/cluster-template*.yaml
test/e2e/data/infrastructure-docker/v1alpha4/cluster-template*.yaml
test/e2e/data/infrastructure-docker/v1beta1/cluster-template*.yaml

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
Expand Down
37 changes: 26 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,16 @@ ALL_GENERATE_MODULES = core cabpk kcp

.PHONY: generate
generate: ## Generate code
$(MAKE) generate-manifests generate-go
$(MAKE) generate-manifests generate-go generate-go-conversions
$(MAKE) -C $(CAPD_DIR) generate

.PHONY: generate-go
generate-go: ## Runs Go related generate targets
$(MAKE) $(addprefix generate-go-,$(ALL_GENERATE_MODULES)) $(addprefix generate-go-conversions-,$(ALL_GENERATE_MODULES))
$(MAKE) $(addprefix generate-go-,$(ALL_GENERATE_MODULES))

.PHONY: generate-go-conversions
generate-go-conversions: ## Runs Go related generate targets for conversions
$(MAKE) $(addprefix generate-go-conversions-,$(ALL_GENERATE_MODULES))

.PHONY: generate-go-core
generate-go-core: $(CONTROLLER_GEN)
Expand All @@ -272,15 +276,20 @@ generate-go-core: $(CONTROLLER_GEN)
.PHONY: generate-go-conversions-core
generate-go-conversions-core: $(CONVERSION_GEN)
$(MAKE) clean-generated-conversions SRC_DIRS="./api/v1alpha3,./$(EXP_DIR)/api/v1alpha3,./$(EXP_DIR)/addons/api/v1alpha3"
$(MAKE) clean-generated-conversions SRC_DIRS="./api/v1alpha4,./$(EXP_DIR)/api/v1alpha4,./$(EXP_DIR)/addons/api/v1alpha4"
$(CONVERSION_GEN) \
--input-dirs=./api/v1alpha3 \
--build-tag=ignore_autogenerated_core_v1alpha3 \
--input-dirs=./api/v1alpha4 \
--build-tag=ignore_autogenerated_core \
--output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
$(CONVERSION_GEN) \
--input-dirs=./$(EXP_DIR)/api/v1alpha3 \
--input-dirs=./$(EXP_DIR)/api/v1alpha4 \
--input-dirs=./$(EXP_DIR)/addons/api/v1alpha3 \
--input-dirs=./$(EXP_DIR)/addons/api/v1alpha4 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha4 \
--output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt

Expand All @@ -296,16 +305,18 @@ generate-go-conversions-cabpk: $(CONVERSION_GEN)
$(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/api"
$(CONVERSION_GEN) \
--input-dirs=./bootstrap/kubeadm/api/v1alpha3 \
--build-tag=ignore_autogenerated_kubeadm_bootstrap_v1alpha3 \
--input-dirs=./bootstrap/kubeadm/api/v1alpha4 \
--build-tag=ignore_autogenerated_kubeadm_bootstrap \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha4 \
--output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
$(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/types/v1beta1,./bootstrap/kubeadm/types/v1beta2,./bootstrap/kubeadm/types/v1beta3"
$(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/types/upstreamv1beta1,./bootstrap/kubeadm/types/upstreamv1beta2,./bootstrap/kubeadm/types/upstreamv1beta3"
$(CONVERSION_GEN) \
--input-dirs=./bootstrap/kubeadm/types/v1beta1 \
--input-dirs=./bootstrap/kubeadm/types/v1beta2 \
--input-dirs=./bootstrap/kubeadm/types/v1beta3 \
--build-tag=ignore_autogenerated_kubeadm_bootstrap_v1alpha3 \
--input-dirs=./bootstrap/kubeadm/types/upstreamv1beta1 \
--input-dirs=./bootstrap/kubeadm/types/upstreamv1beta2 \
--input-dirs=./bootstrap/kubeadm/types/upstreamv1beta3 \
--build-tag=ignore_autogenerated_kubeadm_types \
--output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt

Expand All @@ -320,8 +331,12 @@ generate-go-conversions-kcp: $(CONVERSION_GEN)
$(MAKE) clean-generated-conversions SRC_DIRS="./controlplane/kubeadm/api"
$(CONVERSION_GEN) \
--input-dirs=./controlplane/kubeadm/api/v1alpha3 \
--build-tag=ignore_autogenerated_kubeadm_controlplane_v1alpha3 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3,sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3 \
--input-dirs=./controlplane/kubeadm/api/v1alpha4 \
--build-tag=ignore_autogenerated_kubeadm_controlplane \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha4 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4 \
--output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt

Expand Down
15 changes: 15 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,19 @@ resources:
- group: cluster
kind: MachineDeployment
version: v1alpha4
- group: cluster
kind: ClusterClass
version: v1beta1
- group: cluster
kind: Cluster
version: v1beta1
- group: cluster
kind: Machine
version: v1beta1
- group: cluster
kind: MachineSet
version: v1beta1
- group: cluster
kind: MachineDeployment
version: v1beta1
version: "2"
Loading

0 comments on commit 868e086

Please sign in to comment.