@@ -155,6 +155,7 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen-$(CONTROLLER_TOOLS_VERSION)
155155ENVTEST ?= $(LOCALBIN ) /setup-envtest-$(ENVTEST_VERSION )
156156GOVULNCHECK ?= $(LOCALBIN ) /govulncheck-$(GOVULNCHECK_VERSION )
157157GOLANGCI_LINT ?= $(LOCALBIN ) /golangci-lint-$(GOLANGCI_LINT_VERSION )
158+ HELM_DOCS ?= $(LOCALBIN ) /helm-docs-$(HELM_DOCS_VERSION )
158159
159160# # Tool Versions
160161KUSTOMIZE_VERSION ?= v5.4.3
@@ -164,6 +165,7 @@ ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -
164165ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-% d.% d", $$2, $$3}')
165166GOVULNCHECK_VERSION ?= latest
166167GOLANGCI_LINT_VERSION ?= v2.1.6
168+ HELM_DOCS_VERSION ?= v1.14.2
167169
168170.PHONY : kustomize
169171kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary.
@@ -191,6 +193,11 @@ $(GOLANGCI_LINT): $(LOCALBIN)
191193 wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(LOCALBIN ) $(GOLANGCI_LINT_VERSION )
192194 mv $(LOCALBIN ) /golangci-lint $(GOLANGCI_LINT )
193195
196+ .PHONY : helm-docs-bin
197+ helm-docs-bin : $(HELM_DOCS ) # # Download helm-docs locally if necessary.
198+ $(HELM_DOCS ) : $(LOCALBIN )
199+ $(call go-install-tool,$(HELM_DOCS ) ,github.com/norwoodj/helm-docs/cmd/helm-docs,$(HELM_DOCS_VERSION ) )
200+
194201.PHONY : operator-sdk
195202OPERATOR_SDK ?= $(LOCALBIN ) /operator-sdk
196203operator-sdk : # # Download operator-sdk locally if necessary.
@@ -212,14 +219,17 @@ endif
212219
213220.PHONY : install-dev
214221install-dev : # # Install binaries for development environment.
215- go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
216222 go install github.com/go-delve/delve/cmd/dlv@latest
217223 go install sigs.k8s.io/kind@latest
218224 go install sigs.k8s.io/cloud-provider-kind@latest
219225
220226.PHONY : helm-validate
221227helm-validate : helm-dependency-update helm-lint # # Validate Helm charts.
222228
229+ .PHONY : helm-docs
230+ helm-docs : helm-docs-bin # # Run helm-docs.
231+ $(HELM_DOCS ) --chart-search-root=helm
232+
223233.PHONY : helm-lint
224234helm-lint : # # Lint Helm charts.
225235 find " helm/" -depth -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0r -n1 helm lint --strict
0 commit comments