From 2f057a10505eede088d02e47614f0509de4ae62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20L=C3=B6nnegren?= Date: Wed, 23 Oct 2019 16:18:05 +0200 Subject: [PATCH] Add tag from values, default to v2.0 --- helm/chart/maesh/templates/_helpers.tpl | 7 +++++++ helm/chart/maesh/templates/mesh/mesh-daemonset.yaml | 2 +- helm/chart/maesh/values.yaml | 4 ++-- integration/integration_test.go | 2 +- integration/resources/values.yaml | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/helm/chart/maesh/templates/_helpers.tpl b/helm/chart/maesh/templates/_helpers.tpl index 0231fbdcf..b1ec8af7e 100644 --- a/helm/chart/maesh/templates/_helpers.tpl +++ b/helm/chart/maesh/templates/_helpers.tpl @@ -14,6 +14,13 @@ Define the templated image with tag {{- printf "%s:%s" .Values.controller.image.name ( .Values.controller.image.tag | default .Chart.AppVersion ) -}} {{- end -}} +{{/* +Define the templated mesh image with tag +*/}} +{{- define "maesh.meshImage" -}} + {{- printf "%s:%s" .Values.mesh.image.name ( .Values.mesh.image.tag | default "v2.0" ) -}} +{{- end -}} + {{/* Define the ignoreNamespaces List */}} diff --git a/helm/chart/maesh/templates/mesh/mesh-daemonset.yaml b/helm/chart/maesh/templates/mesh/mesh-daemonset.yaml index d7c3a845d..a6af29904 100644 --- a/helm/chart/maesh/templates/mesh/mesh-daemonset.yaml +++ b/helm/chart/maesh/templates/mesh/mesh-daemonset.yaml @@ -55,7 +55,7 @@ spec: {{- end }} containers: - name: maesh-mesh - image: {{ .Values.mesh.image.name | quote }} + image: {{ include "maesh.meshImage" . | quote }} imagePullPolicy: {{ .Values.mesh.image.pullPolicy | default "IfNotPresent" }} args: - "--entryPoints.readiness.address=:1081" diff --git a/helm/chart/maesh/values.yaml b/helm/chart/maesh/values.yaml index 74f5bfa91..7e1d2974c 100644 --- a/helm/chart/maesh/values.yaml +++ b/helm/chart/maesh/values.yaml @@ -27,11 +27,11 @@ kubedns: false mesh: image: - name: traefik:v2.0 + name: traefik # (Optional) # pullPolicy: IfNotPresent # (Optional) - # tag: v0.0.1 + # tag: v2.0 # (Optional) # pullSecret: xxx resources: diff --git a/integration/integration_test.go b/integration/integration_test.go index c1a82bd3a..b05a7631b 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -51,7 +51,7 @@ func Test(t *testing.T) { images = append(images, image{"gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.7", true}) images = append(images, image{"gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.7", true}) images = append(images, image{"gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.7", true}) - images = append(images, image{"traefik:v2.0.0", true}) + images = append(images, image{"traefik:v2.0.2", true}) for _, image := range images { if image.pull { diff --git a/integration/resources/values.yaml b/integration/resources/values.yaml index 902ffa623..c69a250ec 100644 --- a/integration/resources/values.yaml +++ b/integration/resources/values.yaml @@ -21,11 +21,11 @@ controller: mesh: image: - name: traefik:v2.0.0 + name: traefik # (Optional) # pullPolicy: IfNotPresent # (Optional) - # tag: v0.0.1 + tag: v2.0.2 # (Optional) # pullSecret: xxx resources: