Commit 01d9bc43 authored by Geoff Simmons's avatar Geoff Simmons

Use make variables to specify the Varnish image for helm deployment.

make VARNISH=klarlack ... # for the klarlack image, otherwise varnish
make TEST=local ...       # for the local docker registry
make TEST=ci ...          # for the gitlab registry (CI pipeline)

If TEST is unset, pull the "official" images from dockerhub.
parent c3e8a98a
......@@ -29,6 +29,31 @@
mkpath := $(abspath $(lastword $(MAKEFILE_LIST)))
mkdir := $(dir $(mkpath))
# For the klarlack image: make VARNISH=klarlack ...
ifndef VARNISH
VARNISH=varnish
endif
CI_REPO_PFX=registry.gitlab.com/uplex/varnish/k8s-ingress/varnish-ingress
# For tests using the local docker registry: make TEST=local ...
# For tests using images from the CI pipeline: make TEST=ci ...
ifeq ($(TEST),local)
VARNISH_IMAGE=varnish-ingress/$(VARNISH)
VARNISH_TAG=latest
else ifeq ($(TEST),ci)
VARNISH_IMAGE=$(CI_REPO_PFX)/$(VARNISH)
VARNISH_TAG=master
endif
# If not specified, pull the latest "official" images from dockerhub.
ifndef VARNISH_IMAGE
VARNISH_IMAGE=uplex/viking-$(VARNISH)
endif
ifndef VARNISH_TAG
VARNISH_TAG=0.0.2
endif
ifndef WAIT_TIMEOUT
WAIT_TIMEOUT=2m
endif
......@@ -41,7 +66,9 @@ deploy-controller-helm:
deploy-service-helm:
@helm install viking-service $(mkdir)/../charts/viking-service \
--values values-varnish.yaml
--values values-varnish.yaml \
--set vikingService.varnish.image.repository=$(VARNISH_IMAGE) \
--set vikingService.varnish.image.tag=$(VARNISH_TAG)
# TESTOPTS are passed to varnishtest, e.g.: make TESTOPTS=-v verify
verify:
......
......@@ -2,10 +2,6 @@ nameOverride: varnish-ingress
fullnameOverride: varnish-ingress
vikingService:
varnish:
image:
repository: varnish-ingress/varnish
tag: "latest"
extraArgs: []
haproxy:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment