From a565473c9720348ac2a3dc0ea701c5297be2a9cc Mon Sep 17 00:00:00 2001 From: "jeremy.hulick" Date: Tue, 26 Nov 2024 12:47:04 -0700 Subject: [PATCH 1/2] add common version label to daemonset pods Signed-off-by: jeremy.hulick --- charts/promtail/templates/_helpers.tpl | 10 ++++++++++ charts/promtail/templates/_pod.tpl | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) 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 }} From 6d45c9965928c80ff4d89747428034601de62e81 Mon Sep 17 00:00:00 2001 From: "jeremy.hulick" Date: Mon, 9 Dec 2024 12:01:19 -0700 Subject: [PATCH 2/2] bump chart point version for kubernetes name lablel addition to pods Signed-off-by: jeremy.hulick --- charts/promtail/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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