Skip to content

Commit

Permalink
Fix CRD docs (#1757)
Browse files Browse the repository at this point in the history
ExternalClientCertSecrets type broke the CRD doc format since it was introduced.
Kubernetes 1.21 links are not available, upgraded to point to 1.23

Signed-off-by: pjuarezd <[email protected]>
  • Loading branch information
pjuarezd authored Sep 6, 2023
1 parent a4692a6 commit 8385948
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 52 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ regen-crd:
@sed 's#namespace: minio-operator#namespace: {{ .Release.Namespace }}#g' resources/base/crds/sts.min.io_policybindings.yaml > $(HELM_TEMPLATES)/sts.min.io_policybindings.yaml

regen-crd-docs:
@which crd-ref-docs 1>/dev/null || (echo "Installing crd-ref-docs" && GO111MODULE=on go install -v github.com/elastic/crd-ref-docs@latest)
@echo "Installing crd-ref-docs" && GO111MODULE=on go install -v github.com/elastic/crd-ref-docs@latest
@${GOPATH}/bin/crd-ref-docs --source-path=./pkg/apis/minio.min.io/v2 --config=docs/templates/config.yaml --renderer=asciidoctor --output-path=docs/tenant_crd.adoc --templates-dir=docs/templates/asciidoctor/
@${GOPATH}/bin/crd-ref-docs --source-path=./pkg/apis/sts.min.io/v1alpha1 --config=docs/templates/config.yaml --renderer=asciidoctor --output-path=docs/policybinding_crd.adoc --templates-dir=docs/templates/asciidoctor/

Expand Down
2 changes: 1 addition & 1 deletion docs/policybinding_crd.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ PolicyBinding is a https://kubernetes.io/docs/concepts/overview/working-with-obj
|===
| Field | Description

|*`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#objectmeta-v1-meta[$$ObjectMeta$$]__
|*`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#objectmeta-v1-meta[$$ObjectMeta$$]__
|Refer to Kubernetes API documentation for fields of `metadata`.


Expand Down
2 changes: 1 addition & 1 deletion docs/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ processor:
- "TypeMeta$"
render:
# Version of Kubernetes to use when generating links to Kubernetes API documentation.
kubernetesVersion: 1.21
kubernetesVersion: 1.23
Loading

0 comments on commit 8385948

Please sign in to comment.