feat(plex): Pre-fill ADVERTISE_IP with the server ip and ingress (#3464)

* feat(plex): Pre-fill ADVERTISE_IP with the server ip

* slight change

* update values

* remove

* url with port

* update description

* move non-env values to another dict

* fix reference
This commit is contained in:
Stavros Kois
2022-08-18 23:12:25 +03:00
committed by GitHub
parent 933a774d06
commit 741f0425fe
3 changed files with 34 additions and 9 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/plex
- https://github.com/k8s-at-home/container-images/pkgs/container/plex
type: application
version: 10.0.34
version: 10.1.0
annotations:
truecharts.org/catagories: |
- media
+22 -7
View File
@@ -13,6 +13,28 @@ questions:
# Include{recreate}
# Include{controllerExpert}
# Include{controllerExpertExtraArgs}
- variable: plex
group: "Container Configuration"
label: "Plex Configuration"
schema:
additional_attrs: true
type: dict
attrs:
- variable: serverIP
label: "Server IP"
description: "Set to the IP-Address used to reach Plex."
schema:
type: string
required: true
$ref:
- "definitions/nodeIP"
- variable: additionalAdvertiseURL
label: "Addition Advertise URLs"
description: "URLs to advertise to Plex, format http(s)://IPorDNS:3200. By default your serverIP and ingress URL is added"
schema:
type: string
valid_chars: '^$|^(http(s)?:\/\/([a-zA-Z0-9.-]*)(:\d{0,5})?,?)*$'
default: ""
- variable: env
group: "Container Configuration"
label: "Image Environment"
@@ -20,13 +42,6 @@ questions:
additional_attrs: true
type: dict
attrs:
- variable: ADVERTISE_IP
label: "Advertise IP"
description: "IP to advertise to Plex, Change SERVER_IP to your actual server IP"
schema:
type: string
valid_chars: '^$|^(http(s)?:\/\/([a-zA-Z0-9.-]*)(:\d{0,5})?,?)*$'
default: "http://SERVER_IP:32400"
- variable: ALLOWED_NETWORKS
label: "Allowed Networks"
description: "Networks allowed to connect to plex. Add your local network IP to this list"
+11 -1
View File
@@ -7,6 +7,7 @@ service:
main:
ports:
main:
protocol: HTTP
port: 32400
targetPort: 32400
@@ -15,9 +16,18 @@ persistence:
enabled: true
mountPath: "/config"
plex:
serverURL: "{{ .Values.service.main.ports.main.protocol | lower }}://{{ .Values.plex.serverIP }}:{{ .Values.service.main.ports.main.port }}"
serverIngressURL: "{{ if .Values.ingress.main.enabled }}{{ with (first .Values.ingress.main.hosts) }},https://{{ .host }}{{ end }}{{ end }}"
serverIngressURLPort: "{{ if .Values.ingress.main.enabled }}{{ with (first .Values.ingress.main.hosts) }},https://{{ .host }}:{{ .Values.service.main.ports.main.port }}{{ end }}{{ end }}"
# User Defined
serverIP: "127.0.0.1"
additionalAdvertiseURL: ""
env:
ADVERTISE_IP: "{{ tpl (.Values.plex.serverURL) .}}{{ tpl (.Values.plex.serverIngressURL) . }}{{ tpl (.Values.plex.serverIngressURLPort) . }}{{ with .Values.plex.additionalAdvertiseURL }},{{ . }}{{ end }}"
# User Defined
ALLOWED_NETWORKS: "172.16.0.0/12,10.0.0.0/8,192.168.0.0/16"
ADVERTISE_IP: ""
PLEX_CLAIM: ""
portal: