mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 11:33:17 +00:00
44 lines
1.8 KiB
YAML
44 lines
1.8 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ .Chart.Name }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
spec:
|
|
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:
|
|
app: {{ .Release.Name }}
|
|
ports:
|
|
- name: webui
|
|
port: {{ .Values.webuiPort }}
|
|
targetPort: {{ .Values.webuiPort }}
|
|
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
|
|
port: {{ .Values.rpcPort }}
|
|
targetPort: {{ .Values.rpcPort }}
|
|
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
|
|
port: {{ .Values.torrentPort }}
|
|
targetPort: {{ .Values.torrentPort }}
|
|
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
|
|
port: {{ .Values.torrentPort }}
|
|
targetPort: {{ .Values.torrentPort }}
|
|
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 }}
|