From c848b9805346d0dffae92198879c67bf850ebf49 Mon Sep 17 00:00:00 2001 From: Sylvain Boily Date: Tue, 13 Feb 2018 18:17:50 -0500 Subject: [PATCH] exposing the init container image in the config to allow the user from overriding it (#3698) --- stable/prometheus/Chart.yaml | 2 +- stable/prometheus/README.md | 5 +++++ .../prometheus/templates/server-deployment.yaml | 7 +++++-- stable/prometheus/values.yaml | 17 +++++++++++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index cde16cd5f4..40470fcdef 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus -version: 5.1.4 +version: 5.1.5 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 2b15862e90..331e992d71 100644 --- a/stable/prometheus/README.md +++ b/stable/prometheus/README.md @@ -132,6 +132,11 @@ Parameter | Description | Default `configmapReload.image.tag` | configmap-reload container image tag | `v0.1` `configmapReload.image.pullPolicy` | configmap-reload container image pull policy | `IfNotPresent` `configmapReload.resources` | configmap-reload pod resource requests & limits | `{}` +`initChownData.name` | init-chown-data container name | `init-chown-data` +`initChownData.image.repository` | init-chown-data container image repository | `busybox` +`initChownData.image.tag` | init-chown-data container image tag | `latest` +`initChownData.image.pullPolicy` | init-chown-data container image pull policy | `IfNotPresent` +`initChownData.resources` | init-chown-data pod resource requests & limits | `{}` `kubeStateMetrics.enabled` | If true, create kube-state-metrics | `true` `kubeStateMetrics.name` | kube-state-metrics container name | `kube-state-metrics` `kubeStateMetrics.image.repository` | kube-state-metrics container image repository| `k8s.gcr.io/kube-state-metrics` diff --git a/stable/prometheus/templates/server-deployment.yaml b/stable/prometheus/templates/server-deployment.yaml index 9972daa758..978241351d 100644 --- a/stable/prometheus/templates/server-deployment.yaml +++ b/stable/prometheus/templates/server-deployment.yaml @@ -27,8 +27,11 @@ spec: spec: serviceAccountName: {{ if .Values.rbac.create }}{{ template "prometheus.server.fullname" . }}{{ else }}"{{ .Values.server.serviceAccountName }}"{{ end }} initContainers: - - name: "init-chown-data" - image: "busybox" + - name: "{{ .Values.initChownData.name }}" + image: "{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}" + imagePullPolicy: "{{ .Values.initChownData.image.pullPolicy }}" + resources: +{{ toYaml .Values.initChownData.resources | indent 12 }} # 65534 is the nobody user that prometheus uses. command: ["chown", "-R", "65534:65534", "{{ .Values.server.persistentVolume.mountPath }}"] volumeMounts: diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index 0fddee8d37..2f6d43bae9 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -188,6 +188,23 @@ configmapReload: ## resources: {} +initChownData: + ## initChownData container name + ## + name: init-chown-data + + ## initChownData container image + ## + image: + repository: busybox + tag: latest + pullPolicy: IfNotPresent + + ## initChownData resource requests and limits + ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + kubeStateMetrics: ## If false, kube-state-metrics will not be installed ##