From 33ba0f3ae7508fb0c9744f544cdac1f241b5deb9 Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Tue, 3 Jan 2023 17:21:21 +0000 Subject: [PATCH] Allow custom helm values files to be supplied to make ko-deploy-certmanager Signed-off-by: Richard Wall --- make/ko.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/make/ko.mk b/make/ko.mk index b6d48537e..c1d157f29 100644 --- a/make/ko.mk +++ b/make/ko.mk @@ -6,7 +6,7 @@ ## make ko-images-push KO_REGISTRY= ## ## # Build and Push images to an OCI registry and deploy cert-manager to the current cluster in KUBECONFIG -## make ko-deploy-certmanager KO_REGISTRY= +## make ko-deploy-certmanager KO_REGISTRY= [KO_HELM_VALUES_FILES=path/to/values.yaml] ## ## @category Experimental/ko @@ -28,6 +28,11 @@ KO_PLATFORM ?= linux/amd64 ## @category Experimental/ko KO_BINS ?= controller acmesolver cainjector webhook ctl +## (optional) Paths of Helm values files which will be supplied to `helm install +## --values` flag by make ko-deploy-certmanager. +## @category Experimental/ko +KO_HELM_VALUES_FILES ?= + export KOCACHE = $(BINDIR)/scratch/ko/cache KO_IMAGE_REFS = $(foreach bin,$(KO_BINS),_bin/scratch/ko/$(bin).yaml) @@ -56,6 +61,7 @@ ko-deploy-certmanager: $(BINDIR)/cert-manager.tgz $(KO_IMAGE_REFS) --create-namespace \ --wait \ --namespace cert-manager \ + $(and $(KO_HELM_VALUES_FILES),--values $(KO_HELM_VALUES_FILES)) \ --set image.repository="$(shell $(YQ) .repository $(BINDIR)/scratch/ko/controller.yaml)" \ --set image.digest="$(shell $(YQ) .digest $(BINDIR)/scratch/ko/controller.yaml)" \ --set cainjector.image.repository="$(shell $(YQ) .repository $(BINDIR)/scratch/ko/cainjector.yaml)" \