diff --git a/charts/promtail/Chart.yaml b/charts/promtail/Chart.yaml index bd862703f2..0fc69ae51a 100644 --- a/charts/promtail/Chart.yaml +++ b/charts/promtail/Chart.yaml @@ -3,7 +3,7 @@ name: promtail description: Promtail is an agent which ships the contents of local logs to a Loki instance type: application appVersion: 3.0.0 -version: 6.16.6 +version: 6.16.7 home: https://grafana.com/loki sources: - https://github.com/grafana/loki diff --git a/charts/promtail/templates/_helpers.tpl b/charts/promtail/templates/_helpers.tpl index 8892e518c2..5e0d9da3e2 100644 --- a/charts/promtail/templates/_helpers.tpl +++ b/charts/promtail/templates/_helpers.tpl @@ -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 */}} diff --git a/charts/promtail/templates/_pod.tpl b/charts/promtail/templates/_pod.tpl index 6c75908bad..93f9d46aa9 100644 --- a/charts/promtail/templates/_pod.tpl +++ b/charts/promtail/templates/_pod.tpl @@ -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 }}