Skip to content

Commit 74ca907

Browse files
committed
feat: stage podMonitor Changes
1 parent 1f407b5 commit 74ca907

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

charts/ext-postgres-operator/templates/service-monitor.yaml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
1-
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") ( .Values.serviceMonitor ) }}
1+
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") ( .Values.podMonitor ) }}
22
apiVersion: monitoring.coreos.com/v1
3-
kind: ServiceMonitor
3+
kind: PodMonitor
44
metadata:
55
annotations:
6-
meta.helm.sh/release-name: {{ .Release.Name }}
7-
meta.helm.sh/release-namespace: {{ .Release.Namespace }}
8-
{{- with .Values.serviceMonitor.additionalAnnotations }}
6+
{{- with .Values.podMonitor.additionalAnnotations }}
97
{{- toYaml . | nindent 4 }}
108
{{- end }}
119
labels:
1210
{{- include "chart.labels" . | nindent 4 }}
13-
{{- with .Values.serviceMonitor.additonalLabels }}
11+
{{- with .Values.podMonitor.additonalLabels }}
1412
{{- toYaml . | nindent 4 }}
1513
{{- end }}
1614
name: {{ include "chart.fullname" . }}
1715
namespace: {{ .Release.Namespace }}
1816
spec:
19-
endpoints:
20-
- port: "metrics"
21-
path: "/metrics"
22-
interval: {{ .Values.serviceMonitor.interval | default "30s" }}
23-
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout | default "10s" }}
24-
scheme: http
25-
{{- if .Values.serviceMonitor.relabelings }}
26-
relabelings:
27-
{{- tpl (toYaml .Values.serviceMonitor.relabelings) . | nindent 6 }}
28-
{{- end }}
2917
namespaceSelector:
3018
matchNames:
31-
- {{ .Release.Namespace }}
19+
- {{ .Release.Namespace }}
20+
podMetricsEndpoints:
21+
- interval: 30s
22+
path: /metrics
23+
port: metrics
24+
{{- if .Values.podMonitor.relabelings }}
25+
relabelings:
26+
{{- tpl (toYaml .Values.podMonitor.relabelings) . | nindent 6 }}
27+
{{- end }}
3228
selector:
3329
matchLabels:
3430
{{- include "chart.selectorLabels" . | nindent 6 }}

0 commit comments

Comments
 (0)