Skip to content

Commit 75d807b

Browse files
authored
fix roles generation in manifests-* targets (#1178)
Signed-off-by: apedriza <[email protected]>
1 parent adb526e commit 75d807b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,27 @@ help: ## Display this help.
6666
.PHONY: manifests-bootstrap manifests-controlplane manifests-infrastructure manifests-k0smotron
6767
manifests-bootstrap: $(CONTROLLER_GEN) ## Generate CRDs for bootstrap.cluster.x-k8s.io
6868
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook \
69-
paths="./api/bootstrap/..." \
69+
paths="./..." \
7070
output:crd:artifacts:config=config/crd/bases/bootstrap
71+
find ./config/crd/bases/bootstrap -type f ! -name "bootstrap*" ! -name "kustomization.yaml" -print0 | xargs -0 rm
7172

7273
manifests-controlplane: $(CONTROLLER_GEN) ## Generate CRDs for controlplane.cluster.x-k8s.io
7374
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook \
74-
paths="./api/controlplane/..." \
75+
paths="./..." \
7576
output:crd:artifacts:config=config/crd/bases/controlplane
77+
find ./config/crd/bases/controlplane -type f ! -name "controlplane*" ! -name "kustomization.yaml" -print0 | xargs -0 rm
7678

7779
manifests-infrastructure: $(CONTROLLER_GEN) ## Generate CRDs for infrastructure.cluster.x-k8s.io
7880
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook \
79-
paths="./api/infrastructure/..." \
81+
paths="./..." \
8082
output:crd:artifacts:config=config/crd/bases/infrastructure
83+
find ./config/crd/bases/infrastructure -type f ! -name "infrastructure*" ! -name "kustomization.yaml" -print0 | xargs -0 rm
8184

8285
manifests-k0smotron: $(CONTROLLER_GEN) ## Generate CRDs for k0smotron.io
8386
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook \
84-
paths="./api/k0smotron.io/..." \
87+
paths="./..." \
8588
output:crd:artifacts:config=config/crd/bases/k0smotron.io
89+
find ./config/crd/bases/k0smotron.io -type f ! -name "k0smotron.io*" ! -name "kustomization.yaml" -print0 | xargs -0 rm
8690

8791
.PHONY: manifests
8892
manifests: manifests-bootstrap manifests-controlplane manifests-infrastructure manifests-k0smotron ## Generate all CRD YAMLs per group

0 commit comments

Comments
 (0)