Allow using host network for plex
This commit is contained in:
parent
4524d88bf6
commit
db0ffe9d78
|
@ -85,6 +85,9 @@ spec:
|
|||
- name: pms
|
||||
protocol: TCP
|
||||
containerPort: 32400
|
||||
{{- if .Values.hostNetwork }}
|
||||
hostPort: {{ .Values.serviceTCP.port }}
|
||||
{{- end }}
|
||||
- name: plex-dlna
|
||||
protocol: TCP
|
||||
containerPort: 32469
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{- if eq .Values.hostNetwork false }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
|
@ -12,38 +13,13 @@ metadata:
|
|||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if (or (eq .Values.serviceTCP.type "ClusterIP") (empty .Values.serviceTCP.type)) }}
|
||||
type: ClusterIP
|
||||
{{- if .Values.serviceTCP.clusterIP }}
|
||||
clusterIP: {{ .Values.serviceTCP.clusterIP }}
|
||||
{{end}}
|
||||
{{- else if eq .Values.serviceTCP.type "LoadBalancer" }}
|
||||
type: {{ .Values.serviceTCP.type }}
|
||||
{{- if .Values.serviceTCP.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.serviceTCP.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceTCP.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml .Values.serviceTCP.loadBalancerSourceRanges | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- else }}
|
||||
type: {{ .Values.serviceTCP.type }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceTCP.externalIPs }}
|
||||
externalIPs:
|
||||
{{ toYaml .Values.serviceTCP.externalIPs | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceTCP.externalTrafficPolicy }}
|
||||
externalTrafficPolicy: {{ .Values.serviceTCP.externalTrafficPolicy }}
|
||||
{{- end }}
|
||||
type: NodePort
|
||||
ports:
|
||||
- name: pms
|
||||
port: {{ .Values.serviceTCP.port }}
|
||||
protocol: TCP
|
||||
targetPort: pms
|
||||
{{ if (and (eq .Values.serviceTCP.type "NodePort") (not (empty .Values.serviceTCP.nodePort))) }}
|
||||
nodePort: {{.Values.serviceTCP.nodePort}}
|
||||
{{ end }}
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: pms
|
||||
|
@ -55,3 +31,4 @@ spec:
|
|||
targetPort: plex-dlna
|
||||
selector:
|
||||
{{- include "plex.selectorLabels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -68,7 +68,6 @@ securityContext: {}
|
|||
# runAsUser: 1000
|
||||
|
||||
serviceTCP:
|
||||
enabled: true
|
||||
type: NodePort
|
||||
port: 32400
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
|
|
Loading…
Reference in New Issue