1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-08 01:54:03 +00:00

Merge pull request #1592 from grnhse/allow-setting-prometheus-pod-annotations

Add ability to specify pod metadata
This commit is contained in:
Frederic Branczyk 2018-07-20 13:25:31 +02:00 committed by GitHub
commit 4d9a8af878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 2 deletions

View file

@ -7,4 +7,4 @@ maintainers:
name: kube-prometheus
sources:
- https://github.com/coreos/prometheus-operator
version: 0.0.97
version: 0.0.99

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

@ -128,6 +128,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: {}