mirror of
https://github.com/kubereboot/kured.git
synced 2026-08-23 21:36:33 +00:00
split matchLabels template
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
This commit is contained in:
@@ -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 }}
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
jobLabel: "{{ .Release.Name }}"
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "kured.labels" . | nindent 6 }}
|
||||
{{- include "kured.matchLabels" . | nindent 6 }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
|
||||
Reference in New Issue
Block a user