feat(k8s): added possibility to specify service.type for multiple ser… (#8372)

* feat(k8s): added possibility to specify service.type for multiple services in helm chart

* fix(k8s): removed headless (clusterIP: None) from services

* fix(k8s): keep master and filer services headless for StatefulSet compatibility

Master and filer services must remain headless (clusterIP: None) because
their StatefulSets reference them via serviceName for stable pod DNS.
Revert the service.type change for these two services and remove their
unused service config from values.yaml. S3 and SFTP remain configurable.

---------

Co-authored-by: Andreas Røste <andreas2101@gmail.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Chris Lu <chris.lu@gmail.com>
This commit is contained in:
Andreas Røste
2026-03-25 19:30:14 +01:00
committed by GitHub
parent e47054a7e7
commit 79f4a4579f
3 changed files with 11 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ metadata:
{{- toYaml .Values.s3.annotations | nindent 4 }} {{- toYaml .Values.s3.annotations | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
type: {{ .Values.s3.service.type }}
internalTrafficPolicy: {{ .Values.s3.internalTrafficPolicy | default "Cluster" }} internalTrafficPolicy: {{ .Values.s3.internalTrafficPolicy | default "Cluster" }}
{{- $td := .Values.s3.trafficDistribution | default .Values.filer.s3.trafficDistribution }} {{- $td := .Values.s3.trafficDistribution | default .Values.filer.s3.trafficDistribution }}
{{- if and (semverCompare ">=1.31-0" .Capabilities.KubeVersion.GitVersion) $td }} {{- if and (semverCompare ">=1.31-0" .Capabilities.KubeVersion.GitVersion) $td }}

View File

@@ -15,6 +15,7 @@ metadata:
{{- toYaml .Values.sftp.annotations | nindent 4 }} {{- toYaml .Values.sftp.annotations | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
type: {{ .Values.sftp.service.type }}
internalTrafficPolicy: {{ .Values.sftp.internalTrafficPolicy | default "Cluster" }} internalTrafficPolicy: {{ .Values.sftp.internalTrafficPolicy | default "Cluster" }}
ports: ports:
- name: "swfs-sftp" - name: "swfs-sftp"
@@ -31,4 +32,4 @@ spec:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: sftp app.kubernetes.io/component: sftp
{{- end }} {{- end }}

View File

@@ -1104,6 +1104,10 @@ s3:
annotations: {} annotations: {}
tls: [] tls: []
# Service settings
service:
type: ClusterIP
icebergIngress: icebergIngress:
enabled: false enabled: false
className: "" className: ""
@@ -1185,6 +1189,10 @@ sftp:
failureThreshold: 100 failureThreshold: 100
timeoutSeconds: 10 timeoutSeconds: 10
# Service settings
service:
type: ClusterIP
admin: admin:
enabled: false enabled: false
imageOverride: null imageOverride: null