fix serviceMonitor unknown field error

pull/2496/head
GGGitBoy 2023-03-22 09:39:14 +08:00
parent 114d0fdab8
commit a893cae3bb
1 changed files with 6 additions and 6 deletions

View File

@ -14,13 +14,13 @@ spec:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecureSkipVerify: true
serverName: rancher
{{ if .Values.global.cattle.clusterId }}
metricRelabelings:
- sourceLabels: [__address__]
targetLabel: cluster_id
replacement: {{ .Values.global.cattle.clusterId }}
{{- end }}
jobLabel: rancher
{{ if .Values.global.cattle.clusterId }}
metricRelabelings:
- sourceLabels: [__address__]
targetLabel: cluster_id
replacement: {{ .Values.global.cattle.clusterId }}
{{- end }}
{{- if .Values.rancherMonitoring.namespaceSelector }}
namespaceSelector: {{ .Values.rancherMonitoring.namespaceSelector | toYaml | nindent 4 }}
{{- end }}