Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update selector labels for Deployment and Service #141

Merged
merged 9 commits into from
Mar 7, 2024
8 changes: 8 additions & 0 deletions deploy/charts/version-checker/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

{{/*
Common selector
*/}}
{{- define "version-checker.selector" -}}
app.kubernetes.io/name: {{ include "version-checker.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
2 changes: 1 addition & 1 deletion deploy/charts/version-checker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "version-checker.labels" . | nindent 6 }}
{{- include "version-checker.selector" . | nindent 6 }}
template:
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/version-checker/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ spec:
protocol: TCP
name: web
selector:
{{ include "version-checker.labels" . | nindent 4 }}
{{- include "version-checker.selector" . | nindent 4 }}
Loading