From 4c4b79987ae574b8ef08f686bf31ef4992915083 Mon Sep 17 00:00:00 2001 From: Joost Hofman Date: Thu, 6 Jul 2017 00:19:47 +0200 Subject: [PATCH] [stable/prometheus] extra environment variable for alert manager (#1237) * Added a map of extra environment variable for the alertmanager, this is needed to add the http_proxy so alert manager can connect to external applications if behind a proxy * Update Chart.yaml --- stable/prometheus/Chart.yaml | 2 +- stable/prometheus/templates/alertmanager-deployment.yaml | 5 +++++ stable/prometheus/values.yaml | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index c430e1390774..ad429f613e93 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus -version: 3.0.2 +version: 3.0.3 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png diff --git a/stable/prometheus/templates/alertmanager-deployment.yaml b/stable/prometheus/templates/alertmanager-deployment.yaml index 7ee93daeb0be..30ee9ba37da8 100644 --- a/stable/prometheus/templates/alertmanager-deployment.yaml +++ b/stable/prometheus/templates/alertmanager-deployment.yaml @@ -26,6 +26,11 @@ spec: - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }} image: "{{ .Values.alertmanager.image.repository }}:{{ .Values.alertmanager.image.tag }}" imagePullPolicy: "{{ .Values.alertmanager.image.pullPolicy }}" + env: + {{- range $key, $value := .Values.alertmanager.extraEnv }} + - name: {{ $key }} + value: {{ $value }} + {{- end }} args: - --config.file=/etc/config/alertmanager.yml - --storage.path={{ .Values.alertmanager.persistentVolume.mountPath }} diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index d8458571e64a..18592d2cbfa5 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -18,6 +18,11 @@ alertmanager: ## extraArgs: {} + ## Additional alertmanager container environment variable + ## For instance to add a http_proxy + ## + extraEnv: {} + ingress: ## If true, alertmanager Ingress will be created ##