Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ Prepare for v1beta1 #5248

Merged
merged 14 commits into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.42.0
version: v1.42.1
working-directory: ${{matrix.working-directory}}
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
18 changes: 18 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
domain: x-k8s.io
repo: sigs.k8s.io/cluster-api
resources:
# v1alpha3 types
- group: cluster
kind: Cluster
version: v1alpha3
Expand All @@ -13,6 +14,7 @@ resources:
- group: cluster
kind: MachineDeployment
version: v1alpha3
# v1alpha4 types
- group: cluster
kind: ClusterClass
version: v1alpha4
Expand All @@ -28,4 +30,20 @@ resources:
- group: cluster
kind: MachineDeployment
version: v1alpha4
# v1beta1 types
- group: cluster
vincepri marked this conversation as resolved.
Show resolved Hide resolved
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