Skip to content

Commit

Permalink
Add tag from values, default to v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
frelon authored and traefiker committed Oct 23, 2019
1 parent 789c740 commit 2f057a1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions helm/chart/maesh/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/}}
Expand Down
2 changes: 1 addition & 1 deletion helm/chart/maesh/templates/mesh/mesh-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions helm/chart/maesh/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions integration/resources/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2f057a1

Please sign in to comment.