From 9a8b204a7e8e9715192d8fd90c7c9c45a0636329 Mon Sep 17 00:00:00 2001 From: slimes28 <126927741+slimes28@users.noreply.github.com> Date: Thu, 20 Aug 2026 00:21:36 +0300 Subject: [PATCH] Add monitoring label to filer servicemonitor (#10835) * Add monitoring label to filer servicemonitor * helm: label the headless filer service, not the client one The ServiceMonitor takes its job label from the service name, and the bundled dashboard queries job="seaweedfs-filer". Selecting the client service would have renamed the job and blanked those panels. The headless service also publishes not-ready addresses, so it keeps reporting while a filer is starting up or shutting down. --------- Co-authored-by: Chris Lu --- k8s/charts/seaweedfs/templates/filer/filer-service-client.yaml | 3 --- k8s/charts/seaweedfs/templates/filer/filer-service.yaml | 3 +++ k8s/charts/seaweedfs/templates/filer/filer-servicemonitor.yaml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/k8s/charts/seaweedfs/templates/filer/filer-service-client.yaml b/k8s/charts/seaweedfs/templates/filer/filer-service-client.yaml index d3d585bfb..ae0a1a740 100644 --- a/k8s/charts/seaweedfs/templates/filer/filer-service-client.yaml +++ b/k8s/charts/seaweedfs/templates/filer/filer-service-client.yaml @@ -10,9 +10,6 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: filer -{{- if .Values.filer.metricsPort }} - monitoring: "true" -{{- end }} {{- if .Values.filer.annotations }} annotations: {{- toYaml .Values.filer.annotations | nindent 4 }} diff --git a/k8s/charts/seaweedfs/templates/filer/filer-service.yaml b/k8s/charts/seaweedfs/templates/filer/filer-service.yaml index f7ceaf8a2..1141927eb 100644 --- a/k8s/charts/seaweedfs/templates/filer/filer-service.yaml +++ b/k8s/charts/seaweedfs/templates/filer/filer-service.yaml @@ -10,6 +10,9 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: filer +{{- if .Values.filer.metricsPort }} + monitoring: "true" +{{- end }} annotations: service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" {{- if .Values.filer.annotations }} diff --git a/k8s/charts/seaweedfs/templates/filer/filer-servicemonitor.yaml b/k8s/charts/seaweedfs/templates/filer/filer-servicemonitor.yaml index 258757266..f2552ce68 100644 --- a/k8s/charts/seaweedfs/templates/filer/filer-servicemonitor.yaml +++ b/k8s/charts/seaweedfs/templates/filer/filer-servicemonitor.yaml @@ -30,6 +30,7 @@ spec: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: filer + monitoring: "true" {{- end }} {{- end }} {{- end }}