Skip to content

Commit 689abdb

Browse files
đź“– docs:samples:cronjob: change makefile to generate the CRD without description to allow apply CRDs (#4075)
docs:samples:cronjob: fix makefile to generate the CRD with less description
1 parent 3fce982 commit 689abdb

File tree

3 files changed

+36
-4907
lines changed

3 files changed

+36
-4907
lines changed

‎docs/book/src/cronjob-tutorial/testdata/project/Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ help: ## Display this help.
4545

4646
.PHONY: manifests
4747
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
48-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
48+
# Note that the option maxDescLen=0 was added in the default scaffold in order to sort out the issue
49+
# Too long: must have at most 262144 bytes. By using kubectl apply to create / update resources an annotation
50+
# is created by K8s API to store the latest version of the resource ( kubectl.kubernetes.io/last-applied-configuration).
51+
# However, it has a size limit and if the CRD is too big with so many long descriptions as this one it will cause the failure.
52+
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:maxDescLen=0 webhook paths="./..." output:crd:artifacts:config=config/crd/bases
4953

5054
.PHONY: generate
5155
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.

0 commit comments

Comments
 (0)