mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-16 17:20:33 +00:00
add custom nodeport support (#1217)
This commit is contained in:
@@ -28,12 +28,10 @@ spec:
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls.enabled }}
|
||||
tls:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- {{ .host | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
secretName: {{ $secretName }}
|
||||
{{- end }}
|
||||
rules:
|
||||
|
||||
@@ -13,15 +13,16 @@ spec:
|
||||
clusterIP: None
|
||||
publishNotReadyAddresses: true
|
||||
ports:
|
||||
- port: {{ .Values.service.ep_port }}
|
||||
name: endpoint
|
||||
- port: {{ .Values.service.console_port }}
|
||||
name: console
|
||||
- name: endpoint
|
||||
port: {{ .Values.service.endpoint.port }}
|
||||
- name: console
|
||||
port: {{ .Values.service.console.port }}
|
||||
selector:
|
||||
{{- include "rustfs.selectorLabels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
{{- $serviceType := .Values.service.type }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
@@ -40,19 +41,27 @@ metadata:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- if eq $serviceType "ClusterIP" }}
|
||||
type: ClusterIP
|
||||
{{- else }}
|
||||
type: {{ .Values.service.type }}
|
||||
{{- else if eq $serviceType "NodePort" }}
|
||||
type: NodePort
|
||||
sessionAffinity: ClientIP
|
||||
sessionAffinityConfig:
|
||||
clientIP:
|
||||
timeoutSeconds: 10800
|
||||
{{- end }}
|
||||
ports:
|
||||
- port: {{ .Values.service.ep_port }}
|
||||
name: endpoint
|
||||
- port: {{ .Values.service.console_port }}
|
||||
name: console
|
||||
- name: endpoint
|
||||
port: {{ .Values.service.endpoint.port }}
|
||||
targetPort: {{ .Values.service.endpoint.port }}
|
||||
{{- if eq $serviceType "NodePort" }}
|
||||
nodePort: {{ .Values.service.endpoint.nodePort }}
|
||||
{{- end }}
|
||||
- name: console
|
||||
port: {{ .Values.service.console.port }}
|
||||
targetPort: {{ .Values.service.console.port }}
|
||||
{{- if eq $serviceType "NodePort" }}
|
||||
nodePort: {{ .Values.service.console.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "rustfs.selectorLabels" . | nindent 4 }}
|
||||
|
||||
@@ -90,9 +90,13 @@ containerSecurityContext:
|
||||
runAsNonRoot: true
|
||||
|
||||
service:
|
||||
type: NodePort
|
||||
ep_port: 9000
|
||||
console_port: 9001
|
||||
type: ClusterIP
|
||||
endpoint:
|
||||
port: 9000
|
||||
nodePort: 32000
|
||||
console:
|
||||
port: 9001
|
||||
nodePort: 32001
|
||||
|
||||
# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
|
||||
ingress:
|
||||
|
||||
Reference in New Issue
Block a user