diff --git a/k8s/charts/seaweedfs/templates/s3/s3-servicemonitor.yaml b/k8s/charts/seaweedfs/templates/s3/s3-servicemonitor.yaml index 4ceee0f1e..8ba8f687c 100644 --- a/k8s/charts/seaweedfs/templates/s3/s3-servicemonitor.yaml +++ b/k8s/charts/seaweedfs/templates/s3/s3-servicemonitor.yaml @@ -1,7 +1,10 @@ {{- include "seaweedfs.compat" . -}} -{{- if or .Values.s3.enabled .Values.filer.s3.enabled }} -{{- if .Values.s3.metricsPort }} -{{- if .Values.global.seaweedfs.monitoring.enabled }} +{{- /* + The seaweedfs-s3 Service only gains a "metrics" port when the standalone S3 + gateway is enabled. With only the embedded filer S3 gateway, metrics live on + the filer process and are already scraped by the filer ServiceMonitor. +*/ -}} +{{- if and .Values.s3.enabled .Values.s3.metricsPort .Values.global.seaweedfs.monitoring.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: @@ -31,5 +34,3 @@ spec: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: s3 {{- end }} -{{- end }} -{{- end }}