[stable/prometheus] Add custom pod labels for prom server (#14819)

* Add custom pod labels to prometheus server component.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Bump chart version.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Update README.md

Signed-off-by: Maor Friedman <maor.friedman@redhat.com>

* Update Chart.yaml

Signed-off-by: Maor Friedman <maor.friedman@redhat.com>

* Only parse custom labels if they are set.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Make indentation the same as server labels.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
This commit is contained in:
Kevin Hellemun
2019-07-08 02:14:35 -07:00
committed by Kubernetes Prow Robot
parent 387ba84b55
commit 58bcffcc09
5 changed files with 19 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: prometheus
version: 8.14.0
version: 8.14.1
appVersion: 2.11.1
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
+4 -2
View File
@@ -275,10 +275,12 @@ Parameter | Description | Default
`server.persistentVolume.subPath` | Subdirectory of Prometheus server data Persistent Volume to mount | `""`
`server.emptyDir.sizeLimit` | emptyDir sizeLimit if a Persistent Volume is not used | `""`
`server.podAnnotations` | annotations to be added to Prometheus server pods | `{}`
`server.deploymentAnnotations` | annotations to be added to Prometheus server deployment | `{}'
`server.podLabels` | labels to be added to Prometheus server pods | `{}`
`server.deploymentAnnotations` | annotations to be added to Prometheus server deployment | `{}`
`server.replicaCount` | desired number of Prometheus server pods | `1`
`server.statefulSet.enabled` | If true, use a statefulset instead of a deployment for pod management | `false`
`server.statefulSet.annotations` | annotations to be added to Prometheus server stateful set | `{}'
`server.statefulSet.annotations` | annotations to be added to Prometheus server stateful set | `{}`
`server.statefulSet.labels` | labels to be added to Prometheus server stateful set | `{}`
`server.statefulSet.podManagementPolicy` | podManagementPolicy of server pods | `OrderedReady`
`server.statefulSet.headless.annotations` | annotations for Prometheus server headless service | `{}`
`server.statefulSet.headless.labels` | labels for Prometheus server headless service | `{}`
@@ -26,6 +26,9 @@ spec:
{{- end }}
labels:
{{- include "prometheus.server.labels" . | nindent 8 }}
{{- if .Values.server.podLabels}}
{{ toYaml .Values.server.podLabels | nindent 8 }}
{{- end}}
spec:
{{- if .Values.server.priorityClassName }}
priorityClassName: "{{ .Values.server.priorityClassName }}"
@@ -8,6 +8,9 @@ metadata:
{{- end }}
labels:
{{- include "prometheus.server.labels" . | nindent 4 }}
{{- if .Values.server.statefulSet.labels}}
{{ toYaml .Values.server.statefulSet.labels | nindent 4 }}
{{- end}}
name: {{ template "prometheus.server.fullname" . }}
spec:
serviceName: {{ template "prometheus.server.fullname" . }}-headless
@@ -24,6 +27,9 @@ spec:
{{- end }}
labels:
{{- include "prometheus.server.labels" . | nindent 8 }}
{{- if .Values.server.statefulSet.labels}}
{{ toYaml .Values.server.statefulSet.labels | nindent 8 }}
{{- end}}
spec:
{{- if .Values.server.affinity }}
affinity:
+5
View File
@@ -733,6 +733,10 @@ server:
podAnnotations: {}
# iam.amazonaws.com/role: prometheus
## Labels to be added to Prometheus server pods
##
podLabels: {}
## Use a StatefulSet if replicaCount needs to be greater than 1 (see below)
##
replicaCount: 1
@@ -744,6 +748,7 @@ server:
enabled: false
annotations: {}
labels: {}
podManagementPolicy: OrderedReady
## Alertmanager headless service to use for the statefulset