Skip to content

Commit 8473f86

Browse files
logand22joshw123davidcollom
authored
Update selector labels for Deployment and Service (#141)
Co-authored-by: Joshua Wright <[email protected]> Co-authored-by: David Collom <[email protected]>
1 parent 895d12a commit 8473f86

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

deploy/charts/version-checker/templates/_helpers.tpl

+8
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
2525
{{- end }}
2626
app.kubernetes.io/managed-by: {{ .Release.Service }}
2727
{{- end -}}
28+
29+
{{/*
30+
Common selector
31+
*/}}
32+
{{- define "version-checker.selector" -}}
33+
app.kubernetes.io/name: {{ include "version-checker.name" . }}
34+
app.kubernetes.io/instance: {{ .Release.Name }}
35+
{{- end -}}

deploy/charts/version-checker/templates/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
replicas: {{ .Values.replicaCount }}
1414
selector:
1515
matchLabels:
16-
{{- include "version-checker.labels" . | nindent 6 }}
16+
{{- include "version-checker.selector" . | nindent 6 }}
1717
template:
1818
metadata:
1919
labels:

deploy/charts/version-checker/templates/service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ spec:
1919
protocol: TCP
2020
name: web
2121
selector:
22-
{{ include "version-checker.labels" . | nindent 4 }}
22+
{{- include "version-checker.selector" . | nindent 4 }}

0 commit comments

Comments
 (0)