Skip to content

Commit

Permalink
adding selector labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Larson committed Sep 25, 2024
1 parent ca70924 commit 478db4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 10 additions & 0 deletions stable/k8s-event-logger/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,13 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}



{{/*
Selector labels
*/}}
{{- define "k8s-event-logger.selectorLabels" -}}
app.kubernetes.io/name: {{ include "k8s-event-logger.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
5 changes: 2 additions & 3 deletions stable/k8s-event-logger/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: {{ include "k8s-event-logger.name" . }}
{{- include "k8s-event-logger.labels" . | nindent 6 }}
{{- include "k8s-event-logger.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
Expand All @@ -22,7 +21,7 @@ spec:
{{- end }}
labels:
app.kubernetes.io/name: {{ include "k8s-event-logger.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "k8s-event-logger.labels" . | nindent 8 }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | indent 8 }}
{{- end }}
Expand Down

0 comments on commit 478db4c

Please sign in to comment.