Service Monitor: Reorder namespace selector.
This commit is contained in:
parent
66ca9d7a2d
commit
4570afd113
1 changed files with 7 additions and 7 deletions
|
@ -18,6 +18,13 @@ metadata:
|
||||||
annotations: {{ toYaml .Values.controller.metrics.serviceMonitor.annotations | nindent 4 }}
|
annotations: {{ toYaml .Values.controller.metrics.serviceMonitor.annotations | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
|
{{- if .Values.controller.metrics.serviceMonitor.namespaceSelector }}
|
||||||
|
namespaceSelector: {{ toYaml .Values.controller.metrics.serviceMonitor.namespaceSelector | nindent 4 }}
|
||||||
|
{{- else }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ include "ingress-nginx.namespace" . }}
|
||||||
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
|
{{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
|
||||||
|
@ -37,13 +44,6 @@ spec:
|
||||||
{{- if .Values.controller.metrics.serviceMonitor.jobLabel }}
|
{{- if .Values.controller.metrics.serviceMonitor.jobLabel }}
|
||||||
jobLabel: {{ .Values.controller.metrics.serviceMonitor.jobLabel | quote }}
|
jobLabel: {{ .Values.controller.metrics.serviceMonitor.jobLabel | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.controller.metrics.serviceMonitor.namespaceSelector }}
|
|
||||||
namespaceSelector: {{ toYaml .Values.controller.metrics.serviceMonitor.namespaceSelector | nindent 4 }}
|
|
||||||
{{- else }}
|
|
||||||
namespaceSelector:
|
|
||||||
matchNames:
|
|
||||||
- {{ include "ingress-nginx.namespace" . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.controller.metrics.serviceMonitor.targetLabels }}
|
{{- if .Values.controller.metrics.serviceMonitor.targetLabels }}
|
||||||
targetLabels: {{ toYaml .Values.controller.metrics.serviceMonitor.targetLabels | nindent 2 }}
|
targetLabels: {{ toYaml .Values.controller.metrics.serviceMonitor.targetLabels | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue