Skip to content

Commit

Permalink
chore: move the individual pms env variables to a generic global vara…
Browse files Browse the repository at this point in the history
…ibles value
  • Loading branch information
MarshallAsch committed Jun 21, 2023
1 parent 2b9980f commit 3338719
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 62 deletions.
9 changes: 1 addition & 8 deletions charts/plex-media-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ The following table lists the configurable parameters of the Pms-chart chart and
| `ingress.ingressClassName` | | `"ingress-nginx"` |
| `ingress.url` | The url that will be used for the ingress, this should be manually configured as the app URL in PMS. | `""` |
| `ingress.annotations` | Extra annotations to add to the ingress. | `{}` |
| `pms.claim` | The optional PMS claim token that can be used when started a PMS server for the first time | `""` |
| `pms.name` | The optional name that will be given to the PMS | `"PlexServer"` |
| `pms.timeZone` | The timezone to use for the PMS container | `"Etc/UTC"` |
| `pms.updateChannel` | The number to use to specify the release channel to check for new PMS versions. | `null` |
| `pms.uid` | The user ID that PMS will run as | `null` |
| `pms.gid` | The group ID that PMS will run as | `null` |
| `pms.allowedNetworks` | An optional list of network CIDRs that are allowed to access PMS without authentication | `null` |
| `pms.advertiseIp` | An optional list of additional IPs that PMS will advertise that it can be found at | `null` |
| `pms.storageClassName` | The storage class that will be used for the PMS configuration directory, if not specified the default will be used | `null` |
| `pms.configStorage` | The amount of storage space that is allocated to the config volume, this will probably need to be much higher if thumbnails are enabled. | `"2Gi"` |
| `pms.resources` | | `{}` |
Expand Down Expand Up @@ -124,6 +116,7 @@ The following table lists the configurable parameters of the Pms-chart chart and
| `tolerations` | | `[]` |
| `affinity` | | `{}` |
| `commonLabels` | Labels that will be added to all resources created by the chart | `{}` |
| `extraEnv` | Environment variables that will be added to the PMS container | `{}` |
| `extraVolumeMounts` | Additional volume mount configuration blocks for the pms container | `[]` |
| `extraVolumes` | Extra volume configurations | `[]` |
| `extraContainers` | Extra contain configuration blocks that will be run alongside the PMS container _after_ the init container finishes | `[]` |
Expand Down
30 changes: 6 additions & 24 deletions charts/plex-media-server/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,31 +85,13 @@ spec:
- containerPort: 32400
name: pms
env:
- name: PLEX_CLAIM
value: {{ .Values.pms.claim }}
- name: HOSTNAME
value: {{ .Values.pms.name}}
- name: TZ
value: {{ .Values.pms.timeZone }}
{{- if .Values.pms.updateChannel }}
- name: PLEX_UPDATE_CHANNEL
value: {{ .Values.pms.updateChannel }}
{{- end }}
{{- if .Values.pms.uid }}
- name: PLEX_UID
value: {{ .Values.pms.uid }}
{{- end }}
{{- if .Values.pms.gid }}
- name: PLEX_GID
value: {{ .Values.pms.gid }}
{{- end }}
{{- if .Values.pms.allowedNetworks }}
- name: ALLOWED_NETWORKS
value: {{ .Values.pms.allowedNetworks }}
{{- end }}
{{- if .Values.pms.advertiseIp }}
{{- if .Values.ingress.enabled }}
- name: ADVERTISE_IP
value: {{ .Values.pms.advertiseIp }}
value: {{ trimPrefix "https://" .Values.ingress.url }}
{{- end }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key }}
value: {{ $value }}
{{- end }}
{{- with .Values.pms.resources }}
resources:
Expand Down
44 changes: 14 additions & 30 deletions charts/plex-media-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,6 @@ ingress:
annotations: {}

pms:
# This claim is optional, and is only used for the first startup of PMS
# The claim is obtained from https://www.plex.tv/claim/ is is only valid for a few minutes
claim: ""

# the name to use for the plex server
# this is only used for the first startup of PMS
name: "PlexServer"

# The timezone to use in the container
timeZone: "Etc/UTC"

# the optional update channel to use for the server
updateChannel: null

# the plex user id to use inside the container
# this is only used for the first startup of PMS
uid: null

# the plex user group id to use inside the container
# this is only used for the first startup of PMS
gid: null

# a list of CIDRs that can use the server without authentication
# this is only used for the first startup of PMS
allowedNetworks: null

# additional ips to advertise that the server can be found, optional
# this is only used for the first startup of PMS
advertiseIp: null

# The storage class to use when provisioning the pms config volume
# this needs to be created manually, null will use the default
storageClassName: null
Expand Down Expand Up @@ -193,6 +163,20 @@ affinity: {}
# Common Labels for all resources created by this chart.
commonLabels: {}

extraEnv: {}
# extraEnv:
# This claim is optional, and is only used for the first startup of PMS
# The claim is obtained from https://www.plex.tv/claim/ is is only valid for a few minutes
# PLEX_CLAIM: "claim"
# HOSTNAME: "PlexServer"
# TZ: "Etc/UTC"
# PLEX_UPDATE_CHANNEL: "5"
# PLEX_UID: "uid of plex user"
# PLEX_GID: "group id of plex user"
# a list of CIDRs that can use the server without authentication
# this is only used for the first startup of PMS
# ALLOWED_NETWORKS: "0.0.0.0/0"


# Optionally specify additional volume mounts for the PMS and init containers.
extraVolumeMounts: []
Expand Down

0 comments on commit 3338719

Please sign in to comment.