Last active
January 12, 2018 18:25
-
-
Save limscoder/5980a3f85fea8c3efb71af1f1c9bb172 to your computer and use it in GitHub Desktop.
secret initialization via init-container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initContainers: | |
- name: init-config | |
image: quay.io/prometheus/alertmanager:v0.12.0 | |
env: | |
- name: SMTP_AUTH_USERNAME | |
valueFrom: | |
secretKeyRef: | |
name: alert-email-secret | |
key: username | |
- name: SMTP_AUTH_PASSWORD | |
valueFrom: | |
secretKeyRef: | |
name: alert-email-secret | |
key: password | |
command: | |
- sh | |
- -c | |
- sed -i -e "s/{{SMTP_AUTH_USERNAME}}/$(SMTP_AUTH_USERNAME)/g" /etc/alertmanager/alertmanager.yml && sed -i -e "s/{{SMTP_AUTH_PASSWORD}}/$(SMTP_AUTH_PASSWORD)/g" /etc/alertmanager/alertmanager.yml | |
volumeMounts: | |
- name: config-volume | |
mountPath: /etc/alertmanager |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment