Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ ifndef ignore-not-found
ignore-not-found = false
endif

.PHONY: docs
docs: crd-ref-docs ## Generate docs
$(CRD_REF_DOCS) --renderer=markdown --config=./docs/crd-ref-docs-config.yaml --source-path=./api --output-path=./docs --output-mode=group
.PHONY: create-cluster
create-cluster: kind ## Create local Kubernetes cluster
$(KIND) create cluster
Expand Down Expand Up @@ -165,13 +168,15 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest
GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
KIND ?= $(LOCALBIN)/kind
CRD_REF_DOCS ?= $(LOCALBIN)/crd-ref-docs

## Tool Versions
KUSTOMIZE_VERSION ?= v5.4.3
CONTROLLER_TOOLS_VERSION ?= v0.16.1
ENVTEST_VERSION ?= release-0.19
GOLANGCI_LINT_VERSION ?= v1.59.1
KIND_VERSION ?= v0.31.0
CRD_REF_DOCS_VERSION ?= v0.2.0

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
Expand All @@ -197,6 +202,11 @@ $(GOLANGCI_LINT): $(LOCALBIN)
kind: ## Build kind locally if necessary.
./scripts/configure-kind.sh $(KIND_VERSION) ## Build kind locally if necessary.

.PHONY: crd-ref-docs
crd-ref-docs: $(CRD_REF_DOCS) ## Download crd-ref-docs locally if necessary.
$(CRD_REF_DOCS): $(LOCALBIN)
$(call go-install-tool,$(CRD_REF_DOCS),github.com/elastic/crd-ref-docs,$(CRD_REF_DOCS_VERSION))

# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
# $1 - target path with name of binary
# $2 - package url which can be installed
Expand Down
9 changes: 9 additions & 0 deletions docs/crd-ref-docs-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
processor:
ignoreTypes:
- "(.*)List$"
ignoreFields:
- "status$"
- "TypeMeta$"

render:
kubernetesVersion: 1.35
Loading
Loading