mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/prometheus] Alertmanager config from Secret (#9317)
* Allowing configuration filename customization. Eases migration from/to https://github.com/coreos/prometheus-operator/tree/master/helm/alertmanager Signed-off-by: Marcos Estevez <marcos.estevez@ic-consult.com> * Allows loading configuration from external Secret file. Signed-off-by: Marcos Estevez <marcos.estevez@ic-consult.com> * Version bump and documentation Signed-off-by: Marcos Estevez <marcos.estevez@ic-consult.com> * Typo fix Signed-off-by: Marcos Estevez <marcos.estevez@ic-consult.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
ec50b6265a
commit
83170d109d
@@ -1,5 +1,5 @@
|
||||
name: prometheus
|
||||
version: 8.4.2
|
||||
version: 8.4.3
|
||||
appVersion: 2.6.0
|
||||
description: Prometheus is a monitoring system and time series database.
|
||||
home: https://prometheus.io/
|
||||
|
||||
@@ -101,6 +101,8 @@ Parameter | Description | Default
|
||||
`alertmanager.baseURL` | The external url at which the server can be accessed | `/`
|
||||
`alertmanager.extraArgs` | Additional alertmanager container arguments | `{}`
|
||||
`alertmanager.configMapOverrideName` | Prometheus alertmanager ConfigMap override where full-name is `{{.Release.Name}}-{{.Values.alertmanager.configMapOverrideName}}` and setting this value will prevent the default alertmanager ConfigMap from being generated | `""`
|
||||
`alertmanager.configFromSecret` | The name of a secret in the same kubernetes namespace which contains the Alertmanager config, setting this value will prevent the default alertmanager ConfigMap from being generated | `""`
|
||||
`alertmanager.configFileName` | The configuration file name to be loaded to alertmanager. Must match the key within configuration loaded from ConfigMap/Secret. | `alertmanager.yml`
|
||||
`alertmanager.ingress.enabled` | If true, alertmanager Ingress will be created | `false`
|
||||
`alertmanager.ingress.annotations` | alertmanager Ingress annotations | `{}`
|
||||
`alertmanager.ingress.extraLabels` | alertmanager Ingress additional labels | `{}`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- if and .Values.alertmanager.enabled (empty .Values.alertmanager.configMapOverrideName) -}}
|
||||
{{- if and .Values.alertmanager.enabled (and (empty .Values.alertmanager.configMapOverrideName) (empty .Values.alertmanager.configFromSecret)) -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
|
||||
@@ -49,7 +49,7 @@ spec:
|
||||
apiVersion: v1
|
||||
fieldPath: status.podIP
|
||||
args:
|
||||
- --config.file=/etc/config/alertmanager.yml
|
||||
- --config.file=/etc/config/{{ .Values.alertmanager.configFileName }}
|
||||
- --storage.path={{ .Values.alertmanager.persistentVolume.mountPath }}
|
||||
- --cluster.advertise-address=$(POD_IP):6783
|
||||
{{- range $key, $value := .Values.alertmanager.extraArgs }}
|
||||
@@ -110,8 +110,13 @@ spec:
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: config-volume
|
||||
{{- if empty .Values.alertmanager.configFromSecret }}
|
||||
configMap:
|
||||
name: {{ if .Values.alertmanager.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.alertmanager.configMapOverrideName }}{{- else }}{{ template "prometheus.alertmanager.fullname" . }}{{- end }}
|
||||
{{- else }}
|
||||
secret:
|
||||
secretName: {{ .Values.alertmanager.configFromSecret }}
|
||||
{{- end }}
|
||||
- name: storage-volume
|
||||
{{- if .Values.alertmanager.persistentVolume.enabled }}
|
||||
persistentVolumeClaim:
|
||||
|
||||
@@ -67,6 +67,17 @@ alertmanager:
|
||||
##
|
||||
configMapOverrideName: ""
|
||||
|
||||
## The name of a secret in the same kubernetes namespace which contains the Alertmanager config
|
||||
## Defining configFromSecret will cause templates/alertmanager-configmap.yaml
|
||||
## to NOT generate a ConfigMap resource
|
||||
##
|
||||
configFromSecret: ""
|
||||
|
||||
## The configuration file name to be loaded to alertmanager
|
||||
## Must match the key within configuration loaded from ConfigMap/Secret
|
||||
##
|
||||
configFileName: alertmanager.yml
|
||||
|
||||
ingress:
|
||||
## If true, alertmanager Ingress will be created
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user