Skip to content

Commit d168f47

Browse files
committed
Merge branch 'main' into fix-makefile
2 parents 49b147b + e8988e4 commit d168f47

20 files changed

+774
-862
lines changed

Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,22 @@ cluster-api/tilt-settings.json: hack/tilt-settings.json cluster-api
248248
## --------------------------------------
249249

250250
export KUBEBUILDER_ASSETS=$(TOOLS_BIN_DIR)
251+
DEEPCOPY_GEN_TARGETS_TEST=$(shell find test/fakes -type d -name "fakes" -exec echo {}\/zz_generated.deepcopy.go \;)
252+
DEEPCOPY_GEN_INPUTS_TEST=$(shell find test/fakes/* -name "*zz_generated*" -prune -o -type f -print)
253+
.PHONY: generate-deepcopy-test
254+
generate-deepcopy-test: $(DEEPCOPY_GEN_TARGETS_TEST) ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
255+
test/fakes/zz_generated.deepcopy.go: $(CONTROLLER_GEN) $(DEEPCOPY_GEN_INPUTS_TEST)
256+
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
257+
258+
MANIFEST_GEN_INPUTS_TEST=$(shell find test/fakes/* -name "*zz_generated*" -prune -o -type f -print)
259+
.PHONY: generate-manifest-test
260+
generate-manifest-test: config/.flag-test.mk ## Generates crd, webhook, rbac, and other configuration manifests from kubebuilder instructions in go comments.
261+
config/.flag-test.mk: $(CONTROLLER_GEN) $(MANIFEST_GEN_INPUTS_TEST)
262+
$(CONTROLLER_GEN) crd:crdVersions=v1 rbac:roleName=manager-role webhook paths="./test/fakes" output:crd:artifacts:config=test/fakes
263+
@touch config/.flag-test.mk
264+
251265
.PHONY: test
252-
test: generate-mocks lint $(GINKGO_V2) $(KUBECTL) $(API_SERVER) $(ETCD) ## Run tests. At the moment this is only unit tests.
266+
test: generate-deepcopy-test generate-manifest-test generate-mocks lint $(GINKGO_V2) $(KUBECTL) $(API_SERVER) $(ETCD) ## Run tests. At the moment this is only unit tests.
253267
@./hack/testing_ginkgo_recover_statements.sh --add # Add ginkgo.GinkgoRecover() statements to controllers.
254268
@# The following is a slightly funky way to make sure the ginkgo statements are removed regardless the test results.
255269
@$(GINKGO_V2) --label-filter="!integ" --cover -coverprofile cover.out --covermode=atomic -v ./api/... ./controllers/... ./pkg/...; EXIT_STATUS=$$?;\

api/v1beta2/cloudstackmachinetemplate_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type CloudStackMachineTemplateResource struct {
2424
// Standard object's metadata.
2525
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
2626
// +optional
27+
// +nullable
2728
ObjectMeta metav1.ObjectMeta `json:"metadata,omitempty"`
2829
Spec CloudStackMachineSpec `json:"spec"`
2930
}

0 commit comments

Comments
 (0)