From ad46bab225b1f0ec2d72fb466cf9e91ffbfdc198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Can=C3=A9vet?= Date: Fri, 11 Oct 2019 17:43:42 +0200 Subject: [PATCH] Allow to configure Prometheus annotations (#17897) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mickaël Canévet --- stable/prometheus-operator/Chart.yaml | 2 +- stable/prometheus-operator/README.md | 1 + .../prometheus-operator/templates/prometheus/prometheus.yaml | 4 ++++ stable/prometheus-operator/values.yaml | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml index 1c3d6c2ce2..23cf7b11f2 100644 --- a/stable/prometheus-operator/Chart.yaml +++ b/stable/prometheus-operator/Chart.yaml @@ -10,7 +10,7 @@ name: prometheus-operator sources: - https://github.com/coreos/prometheus-operator - https://coreos.com/operators/prometheus -version: 6.16.2 +version: 6.17.0 appVersion: 0.32.0 home: https://github.com/coreos/prometheus-operator keywords: diff --git a/stable/prometheus-operator/README.md b/stable/prometheus-operator/README.md index 464ac5fa5e..af78f4ca62 100644 --- a/stable/prometheus-operator/README.md +++ b/stable/prometheus-operator/README.md @@ -217,6 +217,7 @@ The following tables list the configurable parameters of the prometheus-operator | ----- | ----------- | ------ | | `prometheus.additionalServiceMonitors` | List of `ServiceMonitor` objects to create. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitorspec | `[]` | | `prometheus.enabled` | Deploy prometheus | `true` | +| `prometheus.annotations` | Prometheus annotations | `{}` | | `prometheus.ingress.annotations` | Prometheus Ingress annotations | `{}` | | `prometheus.ingress.enabled` | If true, Prometheus Ingress will be created | `false` | | `prometheus.ingress.hosts` | Prometheus Ingress hostnames | `[]` | diff --git a/stable/prometheus-operator/templates/prometheus/prometheus.yaml b/stable/prometheus-operator/templates/prometheus/prometheus.yaml index 5466db3d5f..cbfd98526a 100644 --- a/stable/prometheus-operator/templates/prometheus/prometheus.yaml +++ b/stable/prometheus-operator/templates/prometheus/prometheus.yaml @@ -7,6 +7,10 @@ metadata: labels: app: {{ template "prometheus-operator.name" . }}-prometheus {{ include "prometheus-operator.labels" . | indent 4 }} +{{- if .Values.prometheus.annotations }} + annotations: +{{ toYaml .Values.prometheus.annotations | indent 4 }} +{{- end }} spec: alerting: alertmanagers: diff --git a/stable/prometheus-operator/values.yaml b/stable/prometheus-operator/values.yaml index ecfb62a3d5..4c5fe3a0c6 100644 --- a/stable/prometheus-operator/values.yaml +++ b/stable/prometheus-operator/values.yaml @@ -1153,6 +1153,10 @@ prometheus: enabled: true + ## Annotations for Prometheus + ## + annotations: {} + ## Service account for Prometheuses to use. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ ##