Skip to content

Commit

Permalink
[alertmanager] Add alertmanager extraSecretMounts (prometheus-communi…
Browse files Browse the repository at this point in the history
…ty#1772)

Signed-off-by: heriet <[email protected]>
  • Loading branch information
heriet authored Feb 7, 2022
1 parent c778eb7 commit f8b1024
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/alertmanager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/a
sources:
- https://github.com/prometheus/alertmanager
type: application
version: 0.14.0
version: 0.15.0
appVersion: v0.23.0
maintainers:
- name: monotek
Expand Down
18 changes: 16 additions & 2 deletions charts/alertmanager/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,28 @@ spec:
- name: config
mountPath: /etc/alertmanager
{{- end }}
{{- range .Values.extraSecretMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath }}
readOnly: {{ .readOnly }}
{{- end }}
- name: storage
mountPath: /alertmanager
{{- if .Values.config }}
volumes:
{{- if .Values.config }}
- name: config
configMap:
name: {{ include "alertmanager.fullname" . }}
{{- end }}
{{- end }}
{{- range .Values.extraSecretMounts }}
- name: {{ .name }}
secret:
secretName: {{ .secretName }}
{{- with .optional }}
optional: {{ . }}
{{- end }}
{{- end }}
{{- if .Values.persistence.enabled }}
volumeClaimTemplates:
- metadata:
Expand Down
9 changes: 9 additions & 0 deletions charts/alertmanager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ image:

extraArgs: {}

## 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

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down

0 comments on commit f8b1024

Please sign in to comment.