To automate Helm chart generation within an Operator-SDK or Kubebuilder project, modify your Makefile to include Helmify in the helm target.
For Operator-SDK < v1.23.0
Add these lines to your Makefile:
HELMIFY = $(shell pwd)/bin/helmify
helmify:
$(call go-get-tool,$(HELMIFY),github.com/arttor/helmify/cmd/helmify@v0.3.7)
helm: manifests kustomize helmify
$(KUSTOMIZE) build config/default | $(HELMIFY)
For Operator-SDK >= v1.23.0
Add these lines to your Makefile:
HELMIFY ?= $(LOCALBIN)/helmify
.PHONY: helmify
helmify: $(HELMIFY) ## Download helmify locally if necessary.
$(HELMIFY): $(LOCALBIN)
test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/arttor/helmify/cmd/helmify@latest
helm: manifests kustomize helmify
$(KUSTOMIZE) build config/default | $(HELMIFY)
After updating the Makefile, run make helm in the project root. This will generate a Helm chart named chart in the chart directory.