From 285a67d14463074fbcd6dc72820c2ba3e2513fa2 Mon Sep 17 00:00:00 2001 From: Tom Kennes Date: Tue, 9 May 2023 12:59:34 +0200 Subject: [PATCH] fixing annotations style for svcms Signed-off-by: Tom Kennes --- keda/templates/17-keda-podmonitor.yaml | 4 +++- keda/templates/17-keda-servicemonitor.yaml | 4 +++- keda/templates/26-metrics-podmonitor.yaml | 4 +++- keda/templates/27-metrics-servicemonitor.yaml | 4 +++- keda/templates/33-webhooks-servicemonitor.yaml | 4 +++- keda/values.yaml | 5 +++++ 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/keda/templates/17-keda-podmonitor.yaml b/keda/templates/17-keda-podmonitor.yaml index 30986ae6..3abe1784 100644 --- a/keda/templates/17-keda-podmonitor.yaml +++ b/keda/templates/17-keda-podmonitor.yaml @@ -3,8 +3,10 @@ apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: name: {{ .Values.operator.name }} + {{- with .Values.prometheus.operator.podMonitor.annotations }} annotations: - {{- toYaml .Values.additionalAnnotations | nindent 4 }} + {{- toYaml . | nindent 4 }} + {{- end }} labels: app.kubernetes.io/name: {{ .Values.operator.name }} {{- include "keda.labels" . | indent 4 }} diff --git a/keda/templates/17-keda-servicemonitor.yaml b/keda/templates/17-keda-servicemonitor.yaml index 579b1475..08ce17c6 100644 --- a/keda/templates/17-keda-servicemonitor.yaml +++ b/keda/templates/17-keda-servicemonitor.yaml @@ -3,8 +3,10 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ .Values.operator.name }} + {{- with .Values.prometheus.operator.serviceMonitor.annotations }} annotations: - {{- toYaml .Values.prometheus.operator.serviceMonitor.additionalAnnotations | nindent 4 }} + {{- toYaml . | nindent 4 }} + {{- end }} labels: app.kubernetes.io/name: {{ .Values.operator.name }} {{- include "keda.labels" . | indent 4 }} diff --git a/keda/templates/26-metrics-podmonitor.yaml b/keda/templates/26-metrics-podmonitor.yaml index bfcbfb06..41290fdd 100644 --- a/keda/templates/26-metrics-podmonitor.yaml +++ b/keda/templates/26-metrics-podmonitor.yaml @@ -3,8 +3,10 @@ apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: name: {{ .Values.operator.name }}-metrics-apiserver + {{- with .Values.prometheus.metricServer.podMonitor.annotations }} annotations: - {{- toYaml .Values.additionalAnnotations | nindent 4 }} + {{- toYaml . | nindent 4 }} + {{- end }} labels: app.kubernetes.io/name: {{ .Values.operator.name }} {{- include "keda.labels" . | indent 4 }} diff --git a/keda/templates/27-metrics-servicemonitor.yaml b/keda/templates/27-metrics-servicemonitor.yaml index e02d493b..dda3f2d5 100644 --- a/keda/templates/27-metrics-servicemonitor.yaml +++ b/keda/templates/27-metrics-servicemonitor.yaml @@ -3,8 +3,10 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ .Values.operator.name }}-metrics-apiserver + {{- with .Values.prometheus.metricServer.serviceMonitor.annotations }} annotations: - {{- toYaml .Values.prometheus.metricServer.serviceMonitor.additionalAnnotations | nindent 4 }} + {{- toYaml . | nindent 4 }} + {{- end }} labels: app.kubernetes.io/name: {{ .Values.operator.name }} {{- include "keda.labels" . | indent 4 }} diff --git a/keda/templates/33-webhooks-servicemonitor.yaml b/keda/templates/33-webhooks-servicemonitor.yaml index f5a99aba..c9e68df5 100644 --- a/keda/templates/33-webhooks-servicemonitor.yaml +++ b/keda/templates/33-webhooks-servicemonitor.yaml @@ -4,8 +4,10 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ .Values.webhooks.name }} + {{- with .Values.prometheus.webhooks.serviceMonitor.annotations }} annotations: - {{- toYaml .Values.prometheus.webhooks.serviceMonitor.additionalAnnotations | nindent 4 }} + {{- toYaml . | nindent 4 }} + {{- end }} labels: app.kubernetes.io/name: {{ .Values.webhooks.name }} {{- include "keda.labels" . | indent 4 }} diff --git a/keda/values.yaml b/keda/values.yaml index 4e96febb..96486255 100644 --- a/keda/values.yaml +++ b/keda/values.yaml @@ -369,6 +369,7 @@ prometheus: serviceMonitor: # Enables ServiceMonitor creation for the Prometheus Operator enabled: false + annotations: {} jobLabel: targetLabels: [] podTargetLabels: [] @@ -381,6 +382,7 @@ prometheus: podMonitor: # Enables PodMonitor creation for the Prometheus Operator enabled: false + annotations: {} interval: scrapeTimeout: namespace: @@ -392,6 +394,7 @@ prometheus: serviceMonitor: # Enables ServiceMonitor creation for the Prometheus Operator enabled: false + annotations: {} jobLabel: targetLabels: [] podTargetLabels: [] @@ -404,6 +407,7 @@ prometheus: podMonitor: # Enables PodMonitor creation for the Prometheus Operator enabled: false + annotations: {} interval: scrapeTimeout: namespace: @@ -429,6 +433,7 @@ prometheus: serviceMonitor: # Enables ServiceMonitor creation for the Prometheus webhooks enabled: false + annotations: {} jobLabel: targetLabels: [] podTargetLabels: []