mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-19 19:16:17 +00:00
a3006ab407
Co-authored-by: houseme <housemecn@gmail.com>
64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
{{- if .Values.mode.distributed.enabled }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "rustfs.fullname" . }}-headless
|
|
labels:
|
|
{{- include "rustfs.labels" . | nindent 4 }}
|
|
spec:
|
|
clusterIP: None
|
|
publishNotReadyAddresses: true
|
|
ports:
|
|
{{- if .Values.ingress.enabled }}
|
|
- port: 9000
|
|
{{- else }}
|
|
- port: {{ .Values.service.ep_port }}
|
|
{{- end }}
|
|
targetPort: {{ .Values.service.ep_port }}
|
|
protocol: TCP
|
|
name: endpoint
|
|
- port: {{ .Values.service.console_port }}
|
|
targetPort: 9001
|
|
protocol: TCP
|
|
name: console
|
|
selector:
|
|
app: {{ include "rustfs.name" . }}
|
|
{{- end }}
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "rustfs.fullname" . }}-svc
|
|
{{- if .Values.mode.distributed.enabled }}
|
|
{{- if eq .Values.ingress.className "traefik" }}
|
|
{{- with .Values.ingress.traefikAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "rustfs.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if .Values.ingress.enabled }}
|
|
type: ClusterIP
|
|
{{- else }}
|
|
type: {{ .Values.service.type }}
|
|
sessionAffinity: ClientIP
|
|
sessionAffinityConfig:
|
|
clientIP:
|
|
timeoutSeconds: 10800
|
|
{{- end }}
|
|
ports:
|
|
- port: {{ .Values.service.ep_port }}
|
|
targetPort: {{ .Values.service.ep_port }}
|
|
protocol: TCP
|
|
name: endpoint
|
|
- port: {{ .Values.service.console_port }}
|
|
targetPort: {{ .Values.service.console_port }}
|
|
protocol: TCP
|
|
name: console
|
|
selector:
|
|
app: {{ include "rustfs.name" . }}
|