Files
charts/bitnami/postgresql/templates/servicemonitor.yaml
bbaudelet c4c408257c [bitnami/postgresql, zookeeper] Modify extravolumes and integrate sidecars (#7555)
* Update servicemonitor.yaml

Add template render for .Values.metrics.serviceMonitor.additionalLabels

* [bitnami/postgresql]

add template render for .Values.primary.extraVolumes

* [bitnami/postgresql]

Add template render for .Values.readReplicas.extraVolumes

* [bitnami/postgresql]

Update documentation about new value evaluated as a template (primary.extraVolumes, readReplicas.extraVolumes and metrics.serviceMonitor.additionalLabels).

* [bitnami/postgres]

Bump chart version

* [bitnami/zookeeper] Update ExtraVolumes as template render, add sidecar to POD and ZOO_LOG4J_PROP environment variables

* [bitnami/postgresql] Remove information (value evaluated as a template) from README.md

* [bitnami/zookeeper] Remove information to Readme, empty space at end of the line 294 bitnami/zookeeper/templates/statefulset.yaml and move comment on values

* [bitnami/zookeeper] Bump zookeeper chart version

* [bitnbami/zookeeper] Fix missnaming and nexw line on values and Fix README

* [bitnbami/postgresql] Fix README

* [bitnbami/postgresql] Fix README

* [bitnbami/postgresql] Bump postgresql version

* Update Chart.yaml

Include new line at the end of the file

Co-authored-by: baudelet <bbaudelet.soprasteria@lfdj.com>
Co-authored-by: alvneiayu <alvaron@vmware.com>
2021-09-24 13:44:58 +02:00

40 lines
1.7 KiB
YAML

{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "common.names.fullname" . }}
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
{{- end }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: http-metrics
{{- if .Values.metrics.serviceMonitor.interval }}
interval: {{ .Values.metrics.serviceMonitor.interval }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.relabelings }}
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "common.labels.matchLabels" . | nindent 6 }}
{{- end }}