From b3753fb5fc0a87066e632f7b576b03c60af4b762 Mon Sep 17 00:00:00 2001 From: Philippe <58422473+pburgisser-c2c@users.noreply.github.com> Date: Tue, 16 Jun 2020 02:17:57 +0200 Subject: [PATCH] Added supports of ServiceAccount annotation in alertmanager (#22725) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Bürgisser (Camptocamp) Co-authored-by: Scott Rigby --- stable/prometheus-operator/Chart.yaml | 2 +- stable/prometheus-operator/README.md | 1 + .../templates/alertmanager/serviceaccount.yaml | 4 ++++ stable/prometheus-operator/values.yaml | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml index c6fb7225c4ae..ea46ac672130 100644 --- a/stable/prometheus-operator/Chart.yaml +++ b/stable/prometheus-operator/Chart.yaml @@ -12,7 +12,7 @@ sources: - https://github.com/coreos/kube-prometheus - https://github.com/coreos/prometheus-operator - https://coreos.com/operators/prometheus -version: 8.14.1 +version: 8.15.0 appVersion: 0.38.1 tillerVersion: ">=2.12.0" home: https://github.com/coreos/prometheus-operator diff --git a/stable/prometheus-operator/README.md b/stable/prometheus-operator/README.md index 393dfa310d0c..2f902cf63565 100644 --- a/stable/prometheus-operator/README.md +++ b/stable/prometheus-operator/README.md @@ -430,6 +430,7 @@ The following tables list the configurable parameters of the prometheus-operator | `alertmanager.servicePerReplica.type` | Alertmanager per replica Service type | `ClusterIP` | | `alertmanager.serviceAccount.create` | Create a `serviceAccount` for alertmanager | `true` | | `alertmanager.serviceAccount.name` | Name for Alertmanager service account | `""` | +| `alertmanager.serviceAccount.annotations` | Annotations to add to the serviceaccount | `""` | | `alertmanager.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` | | `alertmanager.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the alertmanager instance. | `` | | `alertmanager.serviceMonitor.relabelings` | The `relabel_configs` for scraping the alertmanager instance. | `` | diff --git a/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml b/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml index d0fe2d61af70..1b3e55cf7408 100644 --- a/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml +++ b/stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml @@ -7,6 +7,10 @@ metadata: labels: app: {{ template "prometheus-operator.name" . }}-alertmanager {{ include "prometheus-operator.labels" . | indent 4 }} +{{- if .Values.alertmanager.serviceAccount.annotations }} + annotations: +{{ toYaml .Values.alertmanager.serviceAccount.annotations | indent 4 }} +{{- end }} imagePullSecrets: {{ toYaml .Values.global.imagePullSecrets | indent 2 }} {{- end }} diff --git a/stable/prometheus-operator/values.yaml b/stable/prometheus-operator/values.yaml index b49777415a33..6ddd48163330 100644 --- a/stable/prometheus-operator/values.yaml +++ b/stable/prometheus-operator/values.yaml @@ -106,6 +106,7 @@ alertmanager: serviceAccount: create: true name: "" + annotations: {} ## Configure pod disruption budgets for Alertmanager ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget