diff --git a/charts/plex/Chart.yaml b/charts/plex/Chart.yaml index f3e6efc6..33982bba 100644 --- a/charts/plex/Chart.yaml +++ b/charts/plex/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 1.19.1.2645-ccb6eb67e description: Plex Media Server name: plex -version: 1.0.0 +version: 1.1.0 keywords: - plex home: https://plex.tv/ diff --git a/charts/plex/templates/_helpers.tpl b/charts/plex/templates/_helpers.tpl index 42591267..18ddff7f 100644 --- a/charts/plex/templates/_helpers.tpl +++ b/charts/plex/templates/_helpers.tpl @@ -61,3 +61,21 @@ Create the name of the service account to use {{ default "default" .Values.serviceAccount.name }} {{- end -}} {{- end -}} + +{{/* +abstract: | + Joins a list of values into a comma separated string +values: | + test: + - foo + - bar +usage: | + {{ include "joinListWithComma" .Values.test }} +return: | + foo,bar +*/}} + +{{- define "joinListWithComma" -}} +{{- $local := dict "first" true -}} +{{- range $k, $v := . -}}{{- if not $local.first -}},{{- end -}}{{- $v -}}{{- $_ := set $local "first" false -}}{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/plex/templates/deployment.yaml b/charts/plex/templates/deployment.yaml index 2d182707..b299790e 100644 --- a/charts/plex/templates/deployment.yaml +++ b/charts/plex/templates/deployment.yaml @@ -95,6 +95,31 @@ spec: value: "{{.Values.proxy.noproxy}}" {{- end }} {{- end }} + {{- if .Values.advertiseIp }} + - name: "ADVERTISE_IP" + value: "{{.Values.advertiseIp}}" +{{- end }} +{{- if .Values.changeConfigDirOwnership }} + - name: "CHANGE_CONFIG_DIR_OWNERSHIP" + value: "{{.Values.changeConfigDirOwnership}}" +{{- end }} +{{- if .Values.allowedNetworks }} + - name: "ALLOWED_NETWORKS" + value: "{{include "joinListWithComma" .Values.allowedNetworks}}" +{{- end }} +{{- if .Values.plexUid }} + - name: "PLEX_UID" + value: "{{.Values.plexUid}}" +{{- end }} +{{- if .Values.plexGid }} + - name: "PLEX_GID" + value: "{{.Values.plexGid}}" +{{- end }} +# Extra ENV Values supplied by user +{{- range $key, $value := .Values.extraEnv }} + - name: {{ $key }} + value: {{ $value }} +{{- end }} readinessProbe: httpGet: path: /identity diff --git a/charts/plex/values.yaml b/charts/plex/values.yaml index cc80ca8a..c03687f5 100644 --- a/charts/plex/values.yaml +++ b/charts/plex/values.yaml @@ -1,14 +1,50 @@ +# Default values +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. image: repository: plexinc/pms-docker tag: 1.19.1.2645-ccb6eb67e pullPolicy: IfNotPresent +##### START --> Official PLEX container environment variables # Override this with the plex claim token from plex.tv/claim claimToken: "" # Set the timezone of the plex server timezone: "UTC" +# add your pod network subnet to the `List of IP addresses and networks that are allowed without auth` +# This will override the manual settings, so only use this if you will not need to change it manually. +# This list will be automatically converted to a command seperated string when passed to the container. +# You would specify this when using helm CLI with --set allowedNetworks="{127.0.0.1,10.54.2.0/24}" +# allowedNetworks: +# - 127.0.0.1 +# - 10.54.2.0/24 + +# Instruct the Plex Media Server Container to Change the Configuration Directory Ownership +# Default is true, you would only need to set this if you want to disable it. +# changeConfigDirOwnership: true + +# advertiseIp This variable defines the additional IPs on which the server may be be found. +# For example: http://10.1.1.23:32400. +# This adds to the list where the server advertises that it can be found. +# See https://hub.docker.com/r/plexinc/pms-docker/ for details +# advertiseIp: "http://10.1.1.23:32400" + +# Set The user id of the plex user created inside the container. +# See https://hub.docker.com/r/plexinc/pms-docker/ for details +# plexUid: 1000 + +# Set The group id of the plex group created inside the container +# See https://hub.docker.com/r/plexinc/pms-docker/ for details +# plexGid: 1000 + +##### END --> Official PLEX container environment variables +# You can add as many Additional ENV variables here +# The following is the same as --set extraEnv.TMPDIR="/transcode" +# extraEnv: +# TMPDIR: /transcode + # upgrade strategy type (e.g. Recreate or RollingUpdate) strategyType: Recreate