Browse Source

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>
pull/8772/head
Andreas Røste 1 day ago
committed by GitHub
parent
commit
79f4a4579f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      k8s/charts/seaweedfs/templates/s3/s3-service.yaml
  2. 3
      k8s/charts/seaweedfs/templates/sftp/sftp-service.yaml
  3. 8
      k8s/charts/seaweedfs/values.yaml

1
k8s/charts/seaweedfs/templates/s3/s3-service.yaml

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

3
k8s/charts/seaweedfs/templates/sftp/sftp-service.yaml

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

8
k8s/charts/seaweedfs/values.yaml

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

Loading…
Cancel
Save