From 1b11ef35d676a95f50baaafb925835e9f309cd1a Mon Sep 17 00:00:00 2001 From: Shane Starcher Date: Wed, 18 Apr 2018 15:35:59 -0400 Subject: [PATCH] fix prometheus cluster ip and support pod labels (#4915) * fix prometheus cluster ip and support pod labels * bump chart version --- stable/prometheus/Chart.yaml | 2 +- .../templates/kube-state-metrics-deployment.yaml | 3 +++ stable/prometheus/values.yaml | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index f84e049fcf..3ef09c9d14 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus -version: 6.2.0 +version: 6.2.1 appVersion: 2.2.1 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/stable/prometheus/templates/kube-state-metrics-deployment.yaml b/stable/prometheus/templates/kube-state-metrics-deployment.yaml index d270b0b41c..15139e4ccf 100644 --- a/stable/prometheus/templates/kube-state-metrics-deployment.yaml +++ b/stable/prometheus/templates/kube-state-metrics-deployment.yaml @@ -21,6 +21,9 @@ spec: app: {{ template "prometheus.name" . }} component: "{{ .Values.kubeStateMetrics.name }}" release: {{ .Release.Name }} +{{- if .Values.kubeStateMetrics.pod.labels }} +{{ toYaml .Values.kubeStateMetrics.pod.labels | indent 8 }} +{{- end }} spec: serviceAccountName: {{ template "prometheus.serviceAccountName.kubeStateMetrics" . }} containers: diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index e1803c0bac..2842f459a5 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -278,6 +278,9 @@ kubeStateMetrics: ## podAnnotations: {} + pod: + labels: {} + replicaCount: 1 ## kube-state-metrics resource requests and limits @@ -296,7 +299,7 @@ kubeStateMetrics: prometheus.io/scrape: "true" labels: {} - clusterIP: None + clusterIP: "" ## List of IP addresses at which the kube-state-metrics service is available ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips @@ -386,7 +389,7 @@ nodeExporter: prometheus.io/scrape: "true" labels: {} - clusterIP: None + clusterIP: "" ## List of IP addresses at which the node-exporter service is available ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips