Skip to content

Commit 4644ca4

Browse files
committed
Use crd:maxDescLen=0 only when required
The workaround is required when applying CRDs in the cluster but not during other operations like make manifests, bundle, test etc. Related: openstack-k8s-operators#55
1 parent a78d338 commit 4644ca4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ help: ## Display this help.
8888

8989
.PHONY: manifests
9090
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
91-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:maxDescLen=0 webhook paths="./..." output:crd:artifacts:config=config/crd/bases && \
91+
$(CONTROLLER_GEN) rbac:roleName=manager-role crd$(CRDDESC_OVERRIDE) webhook paths="./..." output:crd:artifacts:config=config/crd/bases && \
9292
rm -f apis/bases/* && cp -a config/crd/bases apis/
9393

9494
.PHONY: generate
@@ -134,6 +134,7 @@ ifndef ignore-not-found
134134
endif
135135

136136
.PHONY: install
137+
install: CRDDESC_OVERRIDE=:maxDescLen=0
137138
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
138139
$(KUSTOMIZE) build config/crd | kubectl apply -f -
139140

@@ -142,6 +143,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
142143
$(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
143144

144145
.PHONY: deploy
146+
install: CRDDESC_OVERRIDE=:maxDescLen=0
145147
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
146148
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
147149
$(KUSTOMIZE) build config/default | kubectl apply -f -

0 commit comments

Comments
 (0)