ignore ServiceMonitor when monitoring is disabled

This commit is contained in:
Janikio 2021-10-03 18:35:04 +02:00
parent 1d2dfe593c
commit ca04c59ac9
No known key found for this signature in database
GPG key ID: 12FB1516BA8637D0
3 changed files with 6 additions and 0 deletions

View file

@ -1,4 +1,5 @@
{{- if .Values.filer.metricsPort }}
{{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
@ -16,3 +17,4 @@ spec:
app: {{ template "seaweedfs.name" . }}
component: filer
{{- end }}
{{- end }}

View file

@ -1,4 +1,5 @@
{{- if .Values.s3.metricsPort }}
{{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
@ -16,3 +17,4 @@ spec:
app: {{ template "seaweedfs.name" . }}
component: s3
{{- end }}
{{- end }}

View file

@ -1,4 +1,5 @@
{{- if .Values.volume.metricsPort }}
{{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
@ -16,3 +17,4 @@ spec:
app: {{ template "seaweedfs.name" . }}
component: volume
{{- end }}
{{- end }}