From 7d8b0c83ccbd1336015750bc8f6a5977a3b62720 Mon Sep 17 00:00:00 2001 From: Sverre Boschman <s.r.boschman@gmail.com> Date: Wed, 24 Apr 2019 16:24:55 +0200 Subject: [PATCH] allow additional pod labels (#509) --- production/helm/loki/templates/deployment.yaml | 3 +++ production/helm/loki/values.yaml | 3 +++ production/helm/promtail/templates/daemonset.yaml | 3 +++ production/helm/promtail/values.yaml | 3 +++ 4 files changed, 12 insertions(+) diff --git a/production/helm/loki/templates/deployment.yaml b/production/helm/loki/templates/deployment.yaml index 86e46c01..80eaa6f7 100644 --- a/production/helm/loki/templates/deployment.yaml +++ b/production/helm/loki/templates/deployment.yaml @@ -27,6 +27,9 @@ spec: app: {{ template "loki.name" . }} name: {{ template "loki.name" . }} release: {{ .Release.Name }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} annotations: checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 94e3d7e2..c4450402 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -91,6 +91,9 @@ persistence: # subPath: "" # existingClaim: +## Pod Labels +podLabels: {} + ## Pod Annotations podAnnotations: {} # prometheus.io/scrape: "true" diff --git a/production/helm/promtail/templates/daemonset.yaml b/production/helm/promtail/templates/daemonset.yaml index 4a04c713..8664ce8e 100644 --- a/production/helm/promtail/templates/daemonset.yaml +++ b/production/helm/promtail/templates/daemonset.yaml @@ -24,6 +24,9 @@ spec: labels: app: {{ template "promtail.name" . }} release: {{ .Release.Name }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} annotations: {{ toYaml .Values.podAnnotations | nindent 8 }} spec: diff --git a/production/helm/promtail/values.yaml b/production/helm/promtail/values.yaml index e6cb8f62..c58c23ac 100644 --- a/production/helm/promtail/values.yaml +++ b/production/helm/promtail/values.yaml @@ -25,6 +25,9 @@ nameOverride: promtail ## ref: https://kubernetes.io/docs/user-guide/node-selection/ nodeSelector: {} +## Pod Labels +podLabels: {} + podAnnotations: {} # prometheus.io/scrape: "true" # prometheus.io/port: "http-metrics" -- GitLab