Commit 36cef41c authored by Christian Kotzbauer's avatar Christian Kotzbauer
Browse files

split matchLabels template



Signed-off-by: default avatarChristian Kotzbauer <christian.kotzbauer@gmail.com>
parent eb617adc
......@@ -62,3 +62,11 @@ chart: {{ template "kured.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- end -}}
{{/*
Returns a set of matchLabels applied.
*/}}
{{- define "kured.matchLabels" -}}
app: {{ template "kured.name" . }}
release: {{ .Release.Name }}
{{- end -}}
......@@ -10,7 +10,7 @@ spec:
type: {{ .Values.updateStrategy }}
selector:
matchLabels:
{{- include "kured.labels" . | nindent 6 }}
{{- include "kured.matchLabels" . | nindent 6 }}
template:
metadata:
labels:
......
......@@ -18,5 +18,5 @@ spec:
port: {{ .Values.service.port }}
targetPort: 8080
selector:
{{- include "kured.labels" . | nindent 4 }}
{{- include "kured.matchLabels" . | nindent 4 }}
{{- end }}
\ No newline at end of file
......@@ -24,7 +24,7 @@ spec:
jobLabel: "{{ .Release.Name }}"
selector:
matchLabels:
{{- include "kured.labels" . | nindent 6 }}
{{- include "kured.matchLabels" . | nindent 6 }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
......
Supports Markdown
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