From 75a0908397f01f1da93b820c661ffcf7ece2ec51 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Tue, 17 Dec 2019 15:53:59 +0000 Subject: [PATCH] [prometheus-node-exporter] - add podAnnotations value (#17740) Signed-off-by: Alex Williams --- stable/prometheus-node-exporter/Chart.yaml | 2 +- stable/prometheus-node-exporter/README.md | 1 + stable/prometheus-node-exporter/templates/daemonset.yaml | 4 ++++ stable/prometheus-node-exporter/values.yaml | 6 ++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/stable/prometheus-node-exporter/Chart.yaml b/stable/prometheus-node-exporter/Chart.yaml index 348a020cfb..0cc97a22dd 100644 --- a/stable/prometheus-node-exporter/Chart.yaml +++ b/stable/prometheus-node-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 0.18.1 description: A Helm chart for prometheus node-exporter name: prometheus-node-exporter -version: 1.8.0 +version: 1.8.1 home: https://github.com/prometheus/node_exporter/ sources: - https://github.com/prometheus/node_exporter/ diff --git a/stable/prometheus-node-exporter/README.md b/stable/prometheus-node-exporter/README.md index 2ebf97775e..dfb2ed1f41 100644 --- a/stable/prometheus-node-exporter/README.md +++ b/stable/prometheus-node-exporter/README.md @@ -43,6 +43,7 @@ The following table lists the configurable parameters of the Node Exporter chart | `image.pullPolicy` | Image pull policy | `IfNotPresent` | | | `extraArgs` | Additional container arguments | `[]` | | | `extraHostVolumeMounts` | Additional host volume mounts | `[]` | | +| `podAnnotations` | Annotations to be added to node exporter pods | `{}` | | | `podLabels` | Additional labels to be added to pods | `{}` | | | `rbac.create` | If true, create & use RBAC resources | `true` | | | `rbac.pspEnabled` | Specifies whether a PodSecurityPolicy should be created. | `true` | | diff --git a/stable/prometheus-node-exporter/templates/daemonset.yaml b/stable/prometheus-node-exporter/templates/daemonset.yaml index 56306a641a..1ef1277ecf 100644 --- a/stable/prometheus-node-exporter/templates/daemonset.yaml +++ b/stable/prometheus-node-exporter/templates/daemonset.yaml @@ -16,6 +16,10 @@ spec: template: metadata: labels: {{ include "prometheus-node-exporter.labels" . | indent 8 }} + {{- if .Values.podAnnotations }} + annotations: + {{- toYaml .Values.podAnnotations | nindent 8 }} + {{- end }} spec: {{- if and .Values.rbac.create .Values.serviceAccount.create }} serviceAccountName: {{ template "prometheus-node-exporter.serviceAccountName" . }} diff --git a/stable/prometheus-node-exporter/values.yaml b/stable/prometheus-node-exporter/values.yaml index cf7936735f..bdac990645 100644 --- a/stable/prometheus-node-exporter/values.yaml +++ b/stable/prometheus-node-exporter/values.yaml @@ -73,6 +73,12 @@ affinity: {} # values: # - target-host-name +# Annotations to be added to node exporter pods +podAnnotations: {} + +# Extra labels to be added to node exporter pods +podLabels: {} + ## Assign a nodeSelector if operating a hybrid cluster ## nodeSelector: {}