From ef7618975bcfb0557835bb44e77eb2431e2e56e4 Mon Sep 17 00:00:00 2001 From: Igor Churmeev Date: Sat, 30 Nov 2019 17:17:02 +0200 Subject: [PATCH] [stable/prometheus-operator] Add option configSecret for prometheus-operator (#19159) * Add option configSecret for prometheus-operator Signed-off-by: Igor Churmeev * Bump version Signed-off-by: Igor Churmeev * Added variabled in README.md Signed-off-by: Igor Churmeev * Commented configSecret options and bump versin Signed-off-by: Igor Churmeev --- stable/prometheus-operator/Chart.yaml | 2 +- stable/prometheus-operator/README.md | 1 + stable/prometheus-operator/crds/crd-alertmanager.yaml | 6 ++++++ .../templates/alertmanager/alertmanager.yaml | 3 +++ stable/prometheus-operator/values.yaml | 5 +++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml index 7d9bdab708..5dc532bcbb 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.2.4 +version: 8.3.0 appVersion: 0.34.0 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 2c8cd0c865..9065465617 100644 --- a/stable/prometheus-operator/README.md +++ b/stable/prometheus-operator/README.md @@ -341,6 +341,7 @@ The following tables list the configurable parameters of the prometheus-operator | `alertmanager.alertmanagerSpec.additionalPeers` | AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster. | `[]` | | `alertmanager.alertmanagerSpec.affinity` | Assign custom affinity rules to the alertmanager instance https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | `{}` | | `alertmanager.alertmanagerSpec.configMaps` | ConfigMaps is a list of ConfigMaps in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. The ConfigMaps are mounted into /etc/alertmanager/configmaps/ | `[]` | +| `alertmanager.alertmanagerSpec.`configSecret | ConfigSecret is the name of a Kubernetes Secret in the same namespace as the Alertmanager object, which contains configuration for this Alertmanager instance. Defaults to 'alertmanager-' The secret is mounted into /etc/alertmanager/config. | `""` | | `alertmanager.alertmanagerSpec.containers` | Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. | `[]` | | `alertmanager.alertmanagerSpec.externalUrl` | The external URL the Alertmanager instances will be available under. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name. | `""` | | `alertmanager.alertmanagerSpec.image.repository` | Base image that is used to deploy pods, without tag. | `quay.io/prometheus/alertmanager` | diff --git a/stable/prometheus-operator/crds/crd-alertmanager.yaml b/stable/prometheus-operator/crds/crd-alertmanager.yaml index 5d14636e41..fd5d0e85ff 100644 --- a/stable/prometheus-operator/crds/crd-alertmanager.yaml +++ b/stable/prometheus-operator/crds/crd-alertmanager.yaml @@ -598,6 +598,12 @@ spec: baseImage: description: Base image that is used to deploy pods, without tag. type: string + configSecret: + description: ConfigSecret is the name of a Kubernetes Secret in the same + namespace as the Alertmanager object, which contains configuration for + this Alertmanager instance. Defaults to 'alertmanager-' The secret is + mounted into /etc/alertmanager/config. + type: string configMaps: description: ConfigMaps is a list of ConfigMaps in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager diff --git a/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml b/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml index e2c6ff3928..19ae3cb463 100644 --- a/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml +++ b/stable/prometheus-operator/templates/alertmanager/alertmanager.yaml @@ -34,6 +34,9 @@ spec: secrets: {{ toYaml .Values.alertmanager.alertmanagerSpec.secrets | indent 4 }} {{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.configSecret }} + configSecret: {{ .Values.alertmanager.alertmanagerSpec.configSecret }} +{{- end }} {{- if .Values.alertmanager.alertmanagerSpec.configMaps }} configMaps: {{ toYaml .Values.alertmanager.alertmanagerSpec.configMaps | indent 4 }} diff --git a/stable/prometheus-operator/values.yaml b/stable/prometheus-operator/values.yaml index 28f82de5cf..ece0de5067 100644 --- a/stable/prometheus-operator/values.yaml +++ b/stable/prometheus-operator/values.yaml @@ -254,6 +254,11 @@ alertmanager: ## configMaps: [] + ## ConfigSecret is the name of a Kubernetes Secret in the same namespace as the Alertmanager object, which contains configuration for + ## this Alertmanager instance. Defaults to 'alertmanager-' The secret is mounted into /etc/alertmanager/config. + ## + # configSecret: + ## Define Log Format # Use logfmt (default) or json-formatted logging logFormat: logfmt