* improve perfs & fix rclone & refactoring Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com> * improve perfs on download + add seaweedfs all-in-one deployment Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com> * use helper for topologySpreadConstraints and fix create home dir of sftp users Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com> * fix helm lint Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com> * add missing ctx param Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com> --------- Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>
83 lines
2.6 KiB
YAML
83 lines
2.6 KiB
YAML
{{- if .Values.allInOne.enabled }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "seaweedfs.name" . }}-all-in-one
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
|
|
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/component: seaweedfs-all-in-one
|
|
{{- if .Values.allInOne.service.annotations }}
|
|
annotations:
|
|
{{- toYaml .Values.allInOne.service.annotations | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
internalTrafficPolicy: {{ .Values.allInOne.service.internalTrafficPolicy | default "Cluster" }}
|
|
ports:
|
|
# Master ports
|
|
- name: "swfs-master"
|
|
port: {{ .Values.master.port }}
|
|
targetPort: {{ .Values.master.port }}
|
|
protocol: TCP
|
|
- name: "swfs-master-grpc"
|
|
port: {{ .Values.master.grpcPort }}
|
|
targetPort: {{ .Values.master.grpcPort }}
|
|
protocol: TCP
|
|
|
|
# Volume ports
|
|
- name: "swfs-volume"
|
|
port: {{ .Values.volume.port }}
|
|
targetPort: {{ .Values.volume.port }}
|
|
protocol: TCP
|
|
- name: "swfs-volume-grpc"
|
|
port: {{ .Values.volume.grpcPort }}
|
|
targetPort: {{ .Values.volume.grpcPort }}
|
|
protocol: TCP
|
|
|
|
# Filer ports
|
|
- name: "swfs-filer"
|
|
port: {{ .Values.filer.port }}
|
|
targetPort: {{ .Values.filer.port }}
|
|
protocol: TCP
|
|
- name: "swfs-filer-grpc"
|
|
port: {{ .Values.filer.grpcPort }}
|
|
targetPort: {{ .Values.filer.grpcPort }}
|
|
protocol: TCP
|
|
|
|
# S3 ports (if enabled)
|
|
{{- if .Values.allInOne.s3.enabled }}
|
|
- name: "swfs-s3"
|
|
port: {{ if .Values.allInOne.s3.enabled }}{{ .Values.s3.port }}{{ else }}{{ .Values.filer.s3.port }}{{ end }}
|
|
targetPort: {{ if .Values.allInOne.s3.enabled }}{{ .Values.s3.port }}{{ else }}{{ .Values.filer.s3.port }}{{ end }}
|
|
protocol: TCP
|
|
{{- if and .Values.allInOne.s3.enabled .Values.s3.httpsPort }}
|
|
- name: "swfs-s3-tls"
|
|
port: {{ .Values.s3.httpsPort }}
|
|
targetPort: {{ .Values.s3.httpsPort }}
|
|
protocol: TCP
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
# SFTP ports (if enabled)
|
|
{{- if .Values.allInOne.sftp.enabled }}
|
|
- name: "swfs-sftp"
|
|
port: {{ .Values.sftp.port }}
|
|
targetPort: {{ .Values.sftp.port }}
|
|
protocol: TCP
|
|
{{- end }}
|
|
|
|
# Server metrics port (single metrics endpoint for all services)
|
|
{{- if .Values.allInOne.metricsPort }}
|
|
- name: "server-metrics"
|
|
port: {{ .Values.allInOne.metricsPort }}
|
|
targetPort: {{ .Values.allInOne.metricsPort }}
|
|
protocol: TCP
|
|
{{- end }}
|
|
|
|
selector:
|
|
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
|
|
app.kubernetes.io/component: seaweedfs-all-in-one
|
|
{{- end }} |