Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Helm: Allow adding additional labels to the service monitors (#5593)

Gregor Tudan262fe2c72392
diff --git a/k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml b/k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml
index d0aa6c8b81..76c981c1ac 100644
--- a/k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml
+++ b/k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml
@@ -12,6 +12,9 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
+ {{- with .Values.global.monitoring.additionalLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
endpoints:
- interval: 30s
diff --git a/k8s/charts/seaweedfs/templates/master-servicemonitor.yaml b/k8s/charts/seaweedfs/templates/master-servicemonitor.yaml
index 93715f0317..81cade2ef2 100644
--- a/k8s/charts/seaweedfs/templates/master-servicemonitor.yaml
+++ b/k8s/charts/seaweedfs/templates/master-servicemonitor.yaml
@@ -12,6 +12,9 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: master
+ {{- with .Values.global.monitoring.additionalLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
endpoints:
- interval: 30s
diff --git a/k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml b/k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml
index 7caf1a1677..b47ba8ee62 100644
--- a/k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml
+++ b/k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml
@@ -12,6 +12,9 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: s3
+ {{- with .Values.global.monitoring.additionalLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
endpoints:
- interval: 30s
diff --git a/k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml b/k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml
index c23e4dec08..4aeacc4163 100644
--- a/k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml
+++ b/k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml
@@ -12,6 +12,9 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: volume
+ {{- with .Values.global.monitoring.additionalLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
endpoints:
- interval: 30s
diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yaml
index c382371caa..8b8c0d33df 100644
--- a/k8s/charts/seaweedfs/values.yaml
+++ b/k8s/charts/seaweedfs/values.yaml
@@ -25,6 +25,7 @@ global:
enabled: false
gatewayHost: null
gatewayPort: null
+ additionalLabels: {}
# if enabled will use global.replicationPlacment and override master & filer defaultReplicaPlacement config
enableReplication: false
# replication type is XYZ: