From db62a6c595bbd9904014083edd0faa14de4096b2 Mon Sep 17 00:00:00 2001 From: Aaron Mell Date: Thu, 22 Aug 2019 10:26:34 -0500 Subject: [PATCH] [stable/prometheus-adapter] Added pod annotations to chart. (#16446) * [stable/prometheus-adapter] Added pod annotations to chart. Upgraded chart to latest version of image Signed-off-by: Aaron Mell * [stable/prometheus-adapter] Added pod annotations to chart. Upgraded chart to latest version of image Signed-off-by: Aaron Mell * Fixing code review issues Signed-off-by: Aaron Mell * Removed v from chart.yaml, changed indent to nindent. Added trim to prevent extra line after annotation. Signed-off-by: Aaron Mell * Signed-off-by: Aaron Mell --- stable/prometheus-adapter/Chart.yaml | 2 +- stable/prometheus-adapter/README.md | 1 + .../templates/custom-metrics-apiserver-deployment.yaml | 3 +++ stable/prometheus-adapter/values.yaml | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/stable/prometheus-adapter/Chart.yaml b/stable/prometheus-adapter/Chart.yaml index 4532289401..bae683b0ba 100644 --- a/stable/prometheus-adapter/Chart.yaml +++ b/stable/prometheus-adapter/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: prometheus-adapter -version: 1.2.0 +version: 1.3.0 appVersion: v0.5.0 description: A Helm chart for k8s prometheus adapter home: https://github.com/DirectXMan12/k8s-prometheus-adapter diff --git a/stable/prometheus-adapter/README.md b/stable/prometheus-adapter/README.md index 46edfd1911..e466f4b2ca 100644 --- a/stable/prometheus-adapter/README.md +++ b/stable/prometheus-adapter/README.md @@ -114,6 +114,7 @@ The following table lists the configurable parameters of the Prometheus Adapter | `logLevel` | Log level | `4` | | `metricsRelistInterval` | Interval at which to re-list the set of all available metrics from Prometheus | `1m` | | `nodeSelector` | Node labels for pod assignment | `{}` | +| `podAnnotations` | Annotations to add to the pod | `{}` | | `priorityClassName` | Pod priority | `` | | `prometheus.url` | Url of where we can find the Prometheus service | `http://prometheus.default.svc` | | `prometheus.port` | Port of where we can find the Prometheus service, zero to omit this option | `9090` | diff --git a/stable/prometheus-adapter/templates/custom-metrics-apiserver-deployment.yaml b/stable/prometheus-adapter/templates/custom-metrics-apiserver-deployment.yaml index ea123b3384..5cf068e241 100644 --- a/stable/prometheus-adapter/templates/custom-metrics-apiserver-deployment.yaml +++ b/stable/prometheus-adapter/templates/custom-metrics-apiserver-deployment.yaml @@ -23,6 +23,9 @@ spec: name: {{ template "k8s-prometheus-adapter.name" . }} annotations: checksum/config: {{ include (print $.Template.BasePath "/custom-metrics-configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | trim | nindent 8 }} + {{- end }} spec: serviceAccountName: {{ template "k8s-prometheus-adapter.serviceAccountName" . }} containers: diff --git a/stable/prometheus-adapter/values.yaml b/stable/prometheus-adapter/values.yaml index 79942e4623..1370ae01f6 100644 --- a/stable/prometheus-adapter/values.yaml +++ b/stable/prometheus-adapter/values.yaml @@ -103,3 +103,6 @@ tls: # Public key of the APIService tolerations: [] + +# Annotations added to the pod +podAnnotations: {}