From 17bd29c09f3ecabe97e8ea6acd50e31b6c5c6986 Mon Sep 17 00:00:00 2001 From: dd di cesare Date: Fri, 17 May 2024 12:23:35 +0200 Subject: [PATCH] [make] Building helm chart templates (manifests) --- config/helm/kustomization.yaml | 2 ++ make/helm.mk | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 config/helm/kustomization.yaml create mode 100644 make/helm.mk diff --git a/config/helm/kustomization.yaml b/config/helm/kustomization.yaml new file mode 100644 index 00000000..ecbcca00 --- /dev/null +++ b/config/helm/kustomization.yaml @@ -0,0 +1,2 @@ +resources: +- ../default diff --git a/make/helm.mk b/make/helm.mk new file mode 100644 index 00000000..8c9b7a3a --- /dev/null +++ b/make/helm.mk @@ -0,0 +1,12 @@ +##@ Helm Charts + +.PHONY: helm-build +helm-build: ## Builds the helm chart from kustomize manifests + # Generate kustomize manifests out of code notations + $(OPERATOR_SDK) generate kustomize manifests -q + # Set desired operator image and related limitador image + V="$(RELATED_IMAGE_LIMITADOR)" $(YQ) eval '(select(.kind == "Deployment").spec.template.spec.containers[].env[] | select(.name == "RELATED_IMAGE_LIMITADOR").value) = strenv(V)' -i config/manager/manager.yaml + # Replace the controller image + cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) + # Build the helm chart templates from kustomize manifests + $(KUSTOMIZE) build config/helm > charts/limitador-operator/templates/manifests.yaml