mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 03:27:08 +00:00
chore: Update service configuration to support NodePort and LoadBalancer types
This commit is contained in:
@@ -6,7 +6,10 @@ metadata:
|
|||||||
app.kubernetes.io/name: {{ .Chart.Name }}
|
app.kubernetes.io/name: {{ .Chart.Name }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) .Values.service.externalTrafficPolicy }}
|
||||||
|
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
|
||||||
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
app: {{ .Release.Name }}
|
app: {{ .Release.Name }}
|
||||||
ports:
|
ports:
|
||||||
@@ -14,15 +17,27 @@ spec:
|
|||||||
port: {{ .Values.webuiPort }}
|
port: {{ .Values.webuiPort }}
|
||||||
targetPort: {{ .Values.webuiPort }}
|
targetPort: {{ .Values.webuiPort }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) .Values.service.nodePorts.webui }}
|
||||||
|
nodePort: {{ .Values.service.nodePorts.webui }}
|
||||||
|
{{- end }}
|
||||||
- name: rpc
|
- name: rpc
|
||||||
port: {{ .Values.rpcPort }}
|
port: {{ .Values.rpcPort }}
|
||||||
targetPort: {{ .Values.rpcPort }}
|
targetPort: {{ .Values.rpcPort }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) .Values.service.nodePorts.rpc }}
|
||||||
|
nodePort: {{ .Values.service.nodePorts.rpc }}
|
||||||
|
{{- end }}
|
||||||
- name: torrent-tcp
|
- name: torrent-tcp
|
||||||
port: {{ .Values.torrentPort }}
|
port: {{ .Values.torrentPort }}
|
||||||
targetPort: {{ .Values.torrentPort }}
|
targetPort: {{ .Values.torrentPort }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) .Values.service.nodePorts.torrentTcp }}
|
||||||
|
nodePort: {{ .Values.service.nodePorts.torrentTcp }}
|
||||||
|
{{- end }}
|
||||||
- name: torrent-udp
|
- name: torrent-udp
|
||||||
port: {{ .Values.torrentPort }}
|
port: {{ .Values.torrentPort }}
|
||||||
targetPort: {{ .Values.torrentPort }}
|
targetPort: {{ .Values.torrentPort }}
|
||||||
protocol: UDP
|
protocol: UDP
|
||||||
|
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) .Values.service.nodePorts.torrentUdp }}
|
||||||
|
nodePort: {{ .Values.service.nodePorts.torrentUdp }}
|
||||||
|
{{- end }}
|
||||||
|
|||||||
@@ -7,6 +7,15 @@ webuiPort: 3000
|
|||||||
rpcPort: 5000
|
rpcPort: 5000
|
||||||
torrentPort: 50000
|
torrentPort: 50000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
externalTrafficPolicy: ""
|
||||||
|
nodePorts:
|
||||||
|
webui: null
|
||||||
|
rpc: null
|
||||||
|
torrentTcp: null
|
||||||
|
torrentUdp: null
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PUID: "1001"
|
PUID: "1001"
|
||||||
PGID: "1001"
|
PGID: "1001"
|
||||||
|
|||||||
Reference in New Issue
Block a user