1
0
mirror of https://github.com/coreos/prometheus-operator.git synced 2026-02-05 06:45:27 +01:00

Add ability to specify pod metadata

This commit is contained in:
Valentyn Boginskey
2018-07-05 14:29:34 -04:00
parent a9fbdd9fb3
commit 1a2c6324c0
3 changed files with 22 additions and 2 deletions

View File

@@ -7,5 +7,5 @@ maintainers:
name: prometheus
sources:
- https://github.com/coreos/prometheus-operator
version: 0.0.49
version: 0.0.50

View File

@@ -16,11 +16,22 @@ metadata:
{{- end }}
name: {{ template "prometheus.fullname" . }}
spec:
{{- if .Values.labels }}
{{- if or .Values.podMetadata.annotations .Values.podMetadata.labels .Values.labels }}
podMetadata:
{{- if .Values.podMetadata.annotations }}
annotations:
{{ toYaml .Values.podMetadata.annotations | indent 6 }}
{{- end }}
{{- if or .Values.podMetadata.labels .Values.labels }}
labels:
{{- if .Values.labels }}
{{ toYaml .Values.labels | indent 6 }}
{{- end }}
{{- if .Values.podMetadata.labels }}
{{ toYaml .Values.podMetadata.labels | indent 6 }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.alertingEndpoints }}
alerting:
alertmanagers:

View File

@@ -127,6 +127,15 @@ logLevel: info
## The value "" will disable pod anti-affinity so that no anti-affinity rules will be configured.
podAntiAffinity: "soft"
podMetadata:
## Annotations to be added to Prometheus pods
##
annotations: {}
## Labels to be added to Prometheus pods
##
labels: {}
## The remote_read spec configuration for Prometheus.
## Ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#remotereadspec
remoteRead: {}