Skip to content

Commit 8d14579

Browse files
committed
Split CRD documentation into separate files
The CRD API doc became unmanagably large with the addition of TargetAllocators, and can't even be rendered by Github's markdown viewer . Split it into separate files per CRD.
1 parent 3c8f286 commit 8d14579

7 files changed

+68708
-68658
lines changed

Makefile

+7-2
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,13 @@ api-docs: crdoc kustomize
625625
cp -r config/crd/* $$TMP_MANIFEST_DIR; \
626626
$(MAKE) CRD_OPTIONS=$(CRD_OPTIONS),maxDescLen=1200 MANIFEST_DIR=$$TMP_MANIFEST_DIR/bases manifests ;\
627627
TMP_DIR=$$(mktemp -d) ; \
628-
$(KUSTOMIZE) build $$TMP_MANIFEST_DIR -o $$TMP_DIR/crd-output.yaml ;\
629-
$(CRDOC) --resources $$TMP_DIR/crd-output.yaml --output docs/api.md ;\
628+
$(KUSTOMIZE) build $$TMP_MANIFEST_DIR -o $$TMP_DIR ;\
629+
mkdir -p docs/api ;\
630+
for crdmanifest in $$TMP_DIR/*; do \
631+
filename="$$(basename -s .opentelemetry.io.yaml $$crdmanifest)" ;\
632+
filename="$${filename#apiextensions.k8s.io_v1_customresourcedefinition_}" ;\
633+
$(CRDOC) --resources $$crdmanifest --output docs/api/$$filename.md ;\
634+
done;\
630635
}
631636

632637

0 commit comments

Comments
 (0)