From e16050fc3664f37db1c19eb55acfffe58ef62567 Mon Sep 17 00:00:00 2001 From: Anton Osmond Date: Sun, 1 Apr 2018 09:59:02 +0100 Subject: [PATCH] [stable/prometheus] Add extraArgs and extraConfigmapMounts for config-reload (#4511) * [stable/prometheus] Add extraArgs and extraConfigmapMounts for config-reload container * Use full version in appVersion --- stable/prometheus/Chart.yaml | 4 ++-- stable/prometheus/README.md | 2 ++ .../templates/server-deployment.yaml | 22 +++++++++++++++++-- stable/prometheus/values.yaml | 13 +++++++++++ 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index 29bcf62652..ca7ed75b38 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,6 +1,6 @@ name: prometheus -version: 6.0.0 -appVersion: 2.2 +version: 6.1.0 +appVersion: 2.2.1 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/README.md b/stable/prometheus/README.md index 673cc75ec3..428ef186c6 100644 --- a/stable/prometheus/README.md +++ b/stable/prometheus/README.md @@ -131,6 +131,8 @@ Parameter | Description | Default `configmapReload.image.repository` | configmap-reload container image repository | `jimmidyson/configmap-reload` `configmapReload.image.tag` | configmap-reload container image tag | `v0.1` `configmapReload.image.pullPolicy` | configmap-reload container image pull policy | `IfNotPresent` +`configmapReload.extraArgs` | Additional configmap-reload container arguments | `{}` +`configmapReload.extraConfigmapMounts` | Additional configmap-reload configMap mounts | `[]` `configmapReload.resources` | configmap-reload pod resource requests & limits | `{}` `initChownData.enabled` | If false, don't reset data ownership at startup | true `initChownData.name` | init-chown-data container name | `init-chown-data` diff --git a/stable/prometheus/templates/server-deployment.yaml b/stable/prometheus/templates/server-deployment.yaml index 6cd9c98202..022f8829d4 100644 --- a/stable/prometheus/templates/server-deployment.yaml +++ b/stable/prometheus/templates/server-deployment.yaml @@ -47,12 +47,20 @@ spec: args: - --volume-dir=/etc/config - --webhook-url=http://localhost:9090{{ .Values.server.prefixURL }}/-/reload + {{- range $key, $value := .Values.configmapReload.extraArgs }} + - --{{ $key }}={{ $value }} + {{- end }} resources: {{ toYaml .Values.configmapReload.resources | indent 12 }} volumeMounts: - name: config-volume mountPath: /etc/config readOnly: true + {{- range .Values.configmapReload.extraConfigmapMounts }} + - name: {{ $.Values.configmapReload.name }}-{{ .name }} + mountPath: {{ .mountPath }} + readOnly: {{ .readOnly }} + {{- end }} - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }} image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}" @@ -100,7 +108,7 @@ spec: readOnly: {{ .readOnly }} {{- end }} {{- range .Values.server.extraConfigmapMounts }} - - name: {{ .name }} + - name: {{ $.Values.server.name }}-{{ .name }} mountPath: {{ .mountPath }} readOnly: {{ .readOnly }} {{- end }} @@ -138,8 +146,13 @@ spec: hostPath: path: {{ .hostPath }} {{- end }} + {{- range .Values.configmapReload.extraConfigmapMounts }} + - name: {{ $.Values.configmapReload.name }}-{{ .name }} + configMap: + name: {{ .configMap }} + {{- end }} {{- range .Values.server.extraConfigmapMounts }} - - name: {{ .name }} + - name: {{ $.Values.server.name }}-{{ .name }} configMap: name: {{ .configMap }} {{- end }} @@ -148,3 +161,8 @@ spec: secret: secretName: {{ .secretName }} {{- end }} + {{- range .Values.configmapReload.extraConfigmapMounts }} + - name: {{ .name }} + configMap: + name: {{ .configMap }} + {{- end }} diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index 19484a2811..c3774477a1 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -184,6 +184,19 @@ configmapReload: tag: v0.1 pullPolicy: IfNotPresent + ## Additional configmap-reload container arguments + ## + extraArgs: {} + + ## Additional configmap-reload mounts + ## + extraConfigmapMounts: [] + # - name: prometheus-alerts + # mountPath: /etc/alerts.d + # configMap: prometheus-alerts + # readOnly: true + + ## configmap-reload resource requests and limits ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ ##