Service Monitor: Indent metadata.

This commit is contained in:
Marco Ebert 2024-10-29 22:18:36 +01:00 committed by k8s-infra-cherrypick-robot
parent 9f7da69b5d
commit 0a61419edc

View file

@ -3,17 +3,17 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor kind: ServiceMonitor
metadata: metadata:
name: {{ include "ingress-nginx.controller.fullname" . }} name: {{ include "ingress-nginx.controller.fullname" . }}
{{- if .Values.controller.metrics.serviceMonitor.namespace }} {{- if .Values.controller.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.controller.metrics.serviceMonitor.namespace }} namespace: {{ .Values.controller.metrics.serviceMonitor.namespace }}
{{- else }} {{- else }}
namespace: {{ include "ingress-nginx.namespace" . }} namespace: {{ include "ingress-nginx.namespace" . }}
{{- end }} {{- end }}
labels: labels:
{{- include "ingress-nginx.labels" . | nindent 4 }} {{- include "ingress-nginx.labels" . | nindent 4 }}
app.kubernetes.io/component: controller app.kubernetes.io/component: controller
{{- if .Values.controller.metrics.serviceMonitor.additionalLabels }} {{- if .Values.controller.metrics.serviceMonitor.additionalLabels }}
{{- toYaml .Values.controller.metrics.serviceMonitor.additionalLabels | nindent 4 }} {{- toYaml .Values.controller.metrics.serviceMonitor.additionalLabels | nindent 4 }}
{{- end }} {{- end }}
{{- if .Values.controller.metrics.serviceMonitor.annotations }} {{- if .Values.controller.metrics.serviceMonitor.annotations }}
annotations: {{ toYaml .Values.controller.metrics.serviceMonitor.annotations | nindent 4 }} annotations: {{ toYaml .Values.controller.metrics.serviceMonitor.annotations | nindent 4 }}
{{- end }} {{- end }}