Skip to content

Commit

Permalink
Fix truncated descriptions in CRD api-docs (open-telemetry#2563)
Browse files Browse the repository at this point in the history
* Fix truncated descriptions in the documentation

Signed-off-by: Israel Blancas <[email protected]>

* Add other generated files

Signed-off-by: Israel Blancas <[email protected]>

* Undo change in version

Signed-off-by: Israel Blancas <[email protected]>

* Add changelog

Signed-off-by: Israel Blancas <[email protected]>

* Revert changes in manifest CRDs. Add a way to generate the long descriptions in the MD

Signed-off-by: Israel Blancas <[email protected]>

* Fix changelog

Signed-off-by: Israel Blancas <[email protected]>

---------

Signed-off-by: Israel Blancas <[email protected]>
  • Loading branch information
iblancasa authored and rubenvp8510 committed May 7, 2024
1 parent c0ad2f5 commit f3155f2
Show file tree
Hide file tree
Showing 3 changed files with 3,143 additions and 677 deletions.
16 changes: 16 additions & 0 deletions .chloggen/fix-truncated-description-crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: documentation

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: The description for some fields was truncated in the documentation.

# One or more tracking issues related to the change
issues: [2563]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ release-artifacts: set-image-controller
# Generate manifests e.g. CRD, RBAC etc.
.PHONY: manifests
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=$(MANIFEST_DIR)

# Run tests
# setup-envtest uses KUBEBUILDER_ASSETS which points to a directory with binaries (api-server, etcd and kubectl)
Expand Down Expand Up @@ -475,8 +475,11 @@ bundle-push:
api-docs: crdoc kustomize
@{ \
set -e ;\
TMP_MANIFEST_DIR=$$(mktemp -d) ; \
cp -r config/crd/* $$TMP_MANIFEST_DIR; \
$(MAKE) CRD_OPTIONS=$(CRD_OPTIONS),maxDescLen=1200 MANIFEST_DIR=$$TMP_MANIFEST_DIR/bases manifests ;\
TMP_DIR=$$(mktemp -d) ; \
$(KUSTOMIZE) build config/crd -o $$TMP_DIR/crd-output.yaml ;\
$(KUSTOMIZE) build $$TMP_MANIFEST_DIR -o $$TMP_DIR/crd-output.yaml ;\
$(CRDOC) --resources $$TMP_DIR/crd-output.yaml --output docs/api.md ;\
}

Expand Down
Loading

0 comments on commit f3155f2

Please sign in to comment.