Skip to content

Commit

Permalink
📖 docs:samples:cronjob: change makefile to generate the CRD without d…
Browse files Browse the repository at this point in the history
…escription to allow apply CRDs (kubernetes-sigs#4075)

docs:samples:cronjob: fix makefile to generate the CRD with less description
  • Loading branch information
camilamacedo86 authored Aug 13, 2024
1 parent 3fce982 commit 689abdb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4,907 deletions.
6 changes: 5 additions & 1 deletion docs/book/src/cronjob-tutorial/testdata/project/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ help: ## Display this help.

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
# Note that the option maxDescLen=0 was added in the default scaffold in order to sort out the issue
# Too long: must have at most 262144 bytes. By using kubectl apply to create / update resources an annotation
# is created by K8s API to store the latest version of the resource ( kubectl.kubernetes.io/last-applied-configuration).
# 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.
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:maxDescLen=0 webhook paths="./..." output:crd:artifacts:config=config/crd/bases

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand Down
Loading

0 comments on commit 689abdb

Please sign in to comment.