Skip to content

Commit

Permalink
Remove v1alpha3 and v1alpha4
Browse files Browse the repository at this point in the history
Signed-off-by: killianmuldoon <[email protected]>
  • Loading branch information
killianmuldoon committed Oct 4, 2023
1 parent 631d738 commit c614888
Show file tree
Hide file tree
Showing 73 changed files with 15 additions and 15,345 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ _releasenotes
*~
*.tmp
.DS_Store

# Ginkgo logs from test runs
*ginkgo-log.txt
28 changes: 1 addition & 27 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ linters-settings:
# CAPV
- pkg: sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1
alias: infrav1
- pkg: sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3
alias: infrav1alpha3
- pkg: sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha4
alias: infrav1alpha4
- pkg: sigs.k8s.io/cluster-api-provider-vsphere/apis/vmware/v1beta1
alias: vmwarev1
# VMware Operator
Expand Down Expand Up @@ -260,26 +256,4 @@ issues:
- linters:
- stylecheck
text: "ST1016: methods on the same type should have the same receiver name"
path: ^apis\/.*\/.*conversion.*\.go$
# missing comments on v1alpha3 and v1alpha4 packages. These rules should be removed when those packages are removed.
- linters:
- revive
text: "package-comments"
path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$
- linters:
- stylecheck
text: "ST1000"
path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$
- linters:
- revive
text: exported (.*) should have comment (.*)or be unexported
path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$
# wrong comment
- linters:
- revive
text: comment on exported (.*) should be of the form (.*)
path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$
- linters:
- stylecheck
text: ST1021|ST1020
path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$
path: ^apis\/.*\/.*conversion.*\.go$
23 changes: 6 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,12 @@ help: # Display this help

.PHONY: generate
generate: ## Run all generate targets
$(MAKE) generate-modules generate-manifests generate-go-deepcopy generate-go-conversions generate-flavors
$(MAKE) generate-modules generate-manifests generate-go-deepcopy generate-flavors

.PHONY: generate-manifests
generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc.
$(MAKE) clean-generated-yaml SRC_DIRS="$(CRD_ROOT),$(SUPERVISOR_CRD_ROOT),$(VMOP_CRD_ROOT)"
$(CONTROLLER_GEN) \
paths=./apis/v1alpha3 \
paths=./apis/v1alpha4 \
paths=./apis/v1beta1 \
paths=./internal/webhooks \
crd:crdVersions=v1 \
Expand Down Expand Up @@ -277,16 +275,6 @@ generate-go-deepcopy: $(CONTROLLER_GEN) ## Generate deepcopy go code for core
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \
paths=./apis/...

.PHONY: generate-go-conversions
generate-go-conversions: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs Go related generate targets
$(MAKE) clean-generated-conversions SRC_DIRS="./apis/v1alpha3,./apis/v1alpha4"
$(CONVERSION_GEN) \
--input-dirs=./apis/v1alpha3 \
--input-dirs=./apis/v1alpha4 \
--build-tag=ignore_autogenerated \
--output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt

.PHONY: generate-modules
generate-modules: ## Run go mod tidy to ensure modules are up to date
go mod tidy
Expand Down Expand Up @@ -343,7 +331,8 @@ APIDIFF_OLD_COMMIT ?= $(shell git rev-parse origin/main)
apidiff: $(GO_APIDIFF) ## Check for API differences
$(GO_APIDIFF) $(APIDIFF_OLD_COMMIT) --print-compatible

ALL_VERIFY_CHECKS = licenses boilerplate shellcheck modules gen conversions doctoc flavors import-restrictions
ALL_VERIFY_CHECKS = licenses boilerplate shellcheck modules gen doctoc flavors import-restrictions
ALL_VERIFY_CHECKS = licenses boilerplate shellcheck modules gen doctoc flavors import-restrictions

.PHONY: verify
verify: $(addprefix verify-,$(ALL_VERIFY_CHECKS)) ## Run all verify-* targets
Expand Down Expand Up @@ -716,15 +705,15 @@ clean-release-git: ## Restores the git files usually modified during a release
git restore ./*manager_image_patch.yaml ./*manager_pull_policy.yaml

.PHONY: clean-generated-yaml
clean-generated-yaml: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1alpha4"
clean-generated-yaml: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1beta1"
(IFS=','; for i in $(SRC_DIRS); do find $$i -type f -name '*.yaml' -exec rm -f {} \;; done)

.PHONY: clean-generated-deepcopy
clean-generated-deepcopy: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1alpha4"
clean-generated-deepcopy: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1beta1"
(IFS=','; for i in $(SRC_DIRS); do find $$i -type f -name 'zz_generated.deepcopy*' -exec rm -f {} \;; done)

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

## --------------------------------------
Expand Down
268 changes: 0 additions & 268 deletions apis/v1alpha3/cloudprovider_encoding.go

This file was deleted.

Loading

0 comments on commit c614888

Please sign in to comment.