From f9a74f50610698284048375aaaf7b2bf17446dc4 Mon Sep 17 00:00:00 2001 From: vac Date: Sat, 22 Jul 2023 22:49:07 +0800 Subject: [PATCH] fix: invalid syntax in ServiceMonitor helm template --- charts/kubelet-csr-approver/templates/servicemonitor.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/kubelet-csr-approver/templates/servicemonitor.yaml b/charts/kubelet-csr-approver/templates/servicemonitor.yaml index 23926ce..ac52319 100644 --- a/charts/kubelet-csr-approver/templates/servicemonitor.yaml +++ b/charts/kubelet-csr-approver/templates/servicemonitor.yaml @@ -9,8 +9,8 @@ metadata: {{- with .Values.metrics.serviceMonitor.additionalLabels }} {{- toYaml . | nindent 4 }} {{- end }} - annotations: {{- with .Values.metrics.annotations }} + annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: @@ -19,9 +19,10 @@ spec: matchNames: - {{ .Release.Namespace }} selector: - {{- include "kubelet-csr-approver.selectorLabels" . | nindent 4 }} + matchLabels: + {{- include "kubelet-csr-approver.selectorLabels" . | nindent 6 }} endpoints: - - port: {{ .Values.metrics.port }} + - port: metrics path: /metrics scheme: http {{- with .Values.metrics.serviceMonitor.interval }}