diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index 0b4d31e2bf..22b6525625 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: prometheus -version: 8.13.1 +version: 8.13.2 appVersion: 2.11.1 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/stable/prometheus/README.md b/stable/prometheus/README.md index 702a66f65f..b05cc67874 100644 --- a/stable/prometheus/README.md +++ b/stable/prometheus/README.md @@ -100,6 +100,7 @@ Parameter | Description | Default `alertmanager.prefixURL` | The prefix slug at which the server can be accessed | `` `alertmanager.baseURL` | The external url at which the server can be accessed | `/` `alertmanager.extraArgs` | Additional alertmanager container arguments | `{}` +`alertmanager.extraSecretMounts` | Additional alertmanager Secret mounts | `[]` `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` diff --git a/stable/prometheus/templates/alertmanager-deployment.yaml b/stable/prometheus/templates/alertmanager-deployment.yaml index 12a0d571d2..ab04373495 100644 --- a/stable/prometheus/templates/alertmanager-deployment.yaml +++ b/stable/prometheus/templates/alertmanager-deployment.yaml @@ -71,6 +71,12 @@ spec: - name: storage-volume mountPath: "{{ .Values.alertmanager.persistentVolume.mountPath }}" subPath: "{{ .Values.alertmanager.persistentVolume.subPath }}" + {{- range .Values.alertmanager.extraSecretMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + subPath: {{ .subPath }} + readOnly: {{ .readOnly }} + {{- end }} - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }}-{{ .Values.configmapReload.name }} image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}" @@ -113,6 +119,11 @@ spec: secret: secretName: {{ .Values.alertmanager.configFromSecret }} {{- end }} + {{- range .Values.alertmanager.extraSecretMounts }} + - name: {{ .name }} + secret: + secretName: {{ .secretName }} + {{- end }} - name: storage-volume {{- if .Values.alertmanager.persistentVolume.enabled }} persistentVolumeClaim: diff --git a/stable/prometheus/templates/alertmanager-statefulset.yaml b/stable/prometheus/templates/alertmanager-statefulset.yaml index 8429ab1226..811d6783ca 100644 --- a/stable/prometheus/templates/alertmanager-statefulset.yaml +++ b/stable/prometheus/templates/alertmanager-statefulset.yaml @@ -79,6 +79,12 @@ spec: - name: storage-volume mountPath: "{{ .Values.alertmanager.persistentVolume.mountPath }}" subPath: "{{ .Values.alertmanager.persistentVolume.subPath }}" + {{- range .Values.alertmanager.extraSecretMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + subPath: {{ .subPath }} + readOnly: {{ .readOnly }} + {{- end }} - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }}-{{ .Values.configmapReload.name }} image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}" imagePullPolicy: "{{ .Values.configmapReload.image.pullPolicy }}" @@ -111,6 +117,11 @@ spec: - name: config-volume configMap: name: {{ if .Values.alertmanager.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.alertmanager.configMapOverrideName }}{{- else }}{{ template "prometheus.alertmanager.fullname" . }}{{- end }} + {{- range .Values.alertmanager.extraSecretMounts }} + - name: {{ .name }} + secret: + secretName: {{ .secretName }} + {{- end }} {{- if .Values.alertmanager.persistentVolume.enabled }} volumeClaimTemplates: - metadata: diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index 3fd241c89e..14d7562291 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -61,6 +61,15 @@ alertmanager: ## extraEnv: {} + ## Additional alertmanager Secret mounts + # Defines additional mounts with secrets. Secrets must be manually created in the namespace. + extraSecretMounts: [] + # - name: secret-files + # mountPath: /etc/secrets + # subPath: "" + # secretName: alertmanager-secret-files + # readOnly: true + ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.alertmanager.configMapOverrideName}} ## Defining configMapOverrideName will cause templates/alertmanager-configmap.yaml ## to NOT generate a ConfigMap resource