Skip to content

Commit cbe3743

Browse files
committed
chore: regenerate crds
1 parent e6b7970 commit cbe3743

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/crdgen.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,8 @@ jobs:
3232
- name: Regenerate OverlayExtensionConfig CRD
3333
run: make -C crd/overlayextensionconfig
3434
- name: Fail if the tree is dirty
35-
run: test -z "$(git status --porcelain)"
35+
run: |
36+
if [ -n "$(git status --porcelain)" ]; then
37+
echo "Changes detected. Please run 'make regenerate-crd' locally to regenerate crds."
38+
exit 1
39+
fi

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,11 @@ dockerfiles: renderkit ## Render all Dockerfile templates with current state of
943943
@make -f build/images.mk render PATH=cns
944944
@make -f build/images.mk render PATH=cni
945945

946+
regenerate-crd: controller-gen ## Regenerate CRDs
947+
@for makefile in $$(find ./crd/ -name "Makefile" -type f); do \
948+
make -f $$makefile all; \
949+
done
950+
946951

947952
$(REPO_ROOT)/.git/hooks/pre-push:
948953
@ln -s $(REPO_ROOT)/.hooks/pre-push $(REPO_ROOT)/.git/hooks/
@@ -961,11 +966,14 @@ setup: install-hooks gitconfig ## performs common required repo setup
961966

962967
##@ Tools
963968

964-
tools: renderkit
969+
tools: renderkit controller-gen
965970

966971
renderkit: ## Install renderkit for rendering Dockerfile templates
967972
@go install -modfile=$(TOOLS_GO_MOD) github.com/orellazri/renderkit
968973

974+
controller-gen: ## Install renderkit for rendering Dockerfile templates
975+
@go install -modfile=$(TOOLS_GO_MOD) -mod=readonly sigs.k8s.io/controller-tools/cmd/controller-gen
976+
969977
##@ Help
970978

971979
help: ## Display this help

0 commit comments

Comments
 (0)