Skip to content

Commit

Permalink
Make Ignorenamespaces better manageable
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Zapf authored and traefiker committed Sep 25, 2019
1 parent 8e2f1dd commit 74a1946
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 10 additions & 1 deletion helm/chart/maesh/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@ Define the Chart version Label
{{- define "maesh.chartLabel" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version -}}
{{- end -}}

{{/*
Define the templated image with tag
*/}}
{{- define "maesh.controllerImage" -}}
{{- printf "%s:%s" .Values.controller.image.name ( .Values.controller.image.tag | default .Chart.AppVersion ) -}}
{{- end -}}
{{/*
Define the ignoreNamespaces List
*/}}
{{- define "maesh.controllerIgnoreNamespaces" -}}
--ignoreNamespaces=
{{- range $idx, $ns := .Values.controller.ignoreNamespaces }}
{{- if $idx }},{{ end }}
{{- $ns }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ spec:
- "--smi"
{{- end }}
- "--namespace=$(POD_NAMESPACE)"
- "--ignorenamespaces={{- .Values.controller.ignoreNamespaces }}"
{{- if .Values.controller.ignoreNamespaces }}
- {{ include "maesh.controllerIgnoreNamespaces" . | quote }}
{{- end }}
env:
- name: POD_IP
valueFrom:
Expand Down

0 comments on commit 74a1946

Please sign in to comment.