Skip to content

Commit

Permalink
add common version label to daemonset pods
Browse files Browse the repository at this point in the history
  • Loading branch information
jhulick committed Nov 26, 2024
1 parent 8103201 commit 5b9d867
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions charts/promtail/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ app.kubernetes.io/name: {{ include "promtail.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Pod labels
*/}}
{{- define "promtail.podLabels" -}}
{{ include "promtail.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
{{- end }}

{{/*
Create the name of the namespace
*/}}
Expand Down
2 changes: 1 addition & 1 deletion charts/promtail/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Pod template used in Daemonset and Deployment
{{- define "promtail.podTemplate" -}}
metadata:
labels:
{{- include "promtail.selectorLabels" . | nindent 4 }}
{{- include "promtail.podLabels" . | nindent 4 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down

0 comments on commit 5b9d867

Please sign in to comment.