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