Allow custom helm values files to be supplied to make ko-deploy-certmanager

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
This commit is contained in:
Richard Wall 2023-01-03 17:21:21 +00:00
parent abfc9b7da8
commit 33ba0f3ae7

View File

@ -6,7 +6,7 @@
## make ko-images-push KO_REGISTRY=<my-oci-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=<my-oci-registry>
## make ko-deploy-certmanager KO_REGISTRY=<my-oci-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)" \