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