Update catalog information

This commit is contained in:
sonicaj
2023-03-24 21:21:05 +00:00
parent 302f349f5f
commit 9066d7c8f4
16 changed files with 634 additions and 4 deletions

View File

@@ -68,10 +68,10 @@
"healthy": true,
"healthy_error": null,
"location": "/__w/charts/charts/charts/plex",
"latest_version": "1.7.32",
"latest_version": "1.7.33",
"latest_app_version": "1.31.2.6810",
"latest_human_version": "1.31.2.6810_1.7.32",
"last_update": "2023-03-15 12:30:32",
"latest_human_version": "1.31.2.6810_1.7.33",
"last_update": "2023-03-24 21:20:22",
"name": "plex",
"recommended": false,
"title": "Plex",
@@ -163,7 +163,7 @@
"latest_version": "1.2.7",
"latest_app_version": "21.11.4.1.1",
"latest_human_version": "21.11.4.1.1_1.2.7",
"last_update": "2023-03-24 21:18:22",
"last_update": "2023-03-24 21:19:04",
"name": "collabora",
"recommended": false,
"title": "Collabora",

View File

@@ -0,0 +1,24 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS

View File

@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: file://../../../common/2207.0.0
version: 2207.0.0
digest: sha256:a301ba0f99ec1e08a60a7f0a0320aa02d225993572f2f056f09520f06df88b37
generated: "2023-03-21T16:48:15.265115312+02:00"

View File

@@ -0,0 +1,23 @@
name: plex
description: Plex Media Server
annotations:
title: Plex
type: application
version: 1.7.33
apiVersion: v2
appVersion: '1.31.2.6810'
kubeVersion: '>=1.16.0-0'
maintainers:
- name: truenas
url: https://www.truenas.com/
dependencies:
- name: common
repository: file://../../../common/2207.0.0
version: 2207.0.0
home: https://plex.tv/
icon: https://www.plex.tv/wp-content/uploads/2018/01/pmp-icon-1.png
sources:
- https://hub.docker.com/r/plexinc/pms-docker/
- https://github.com/k8s-at-home/charts/tree/master/charts/plex
keywords:
- plex

View File

@@ -0,0 +1,5 @@
# Plex Media Server helm chart
## Configuration
Please refer to questions.yaml for a detailed overview on supported configurable items.

View File

@@ -0,0 +1,3 @@
# Plex
Plex chart is a chart designed to deploy plex in a TrueNAS SCALE kubernetes cluster.

Binary file not shown.

View File

@@ -0,0 +1,32 @@
appVolumeMounts:
config:
emptyDir: true
mountPath: /config
data:
emptyDir: true
mountPath: /data
shared:
emptyDir: true
mountPath: shared
shared-logs:
emptyDir: true
mountPath: /config/Library/Application Support/Plex Media Server/Logs
transcode:
emptyDir: true
mountPath: /transcode
claimToken: ''
dnsConfig:
options: []
emptyDirVolumes: true
enablePlexPass: false
environmentVariables: []
extraAppVolumeMounts:
- hostPath: /mnt/extras/hello
mountPath: /mnt/extras
readOnly: true
gpuConfiguration: {}
hostNetwork: false
plexServiceTCP:
port: 32400
timezone: Etc/UTC
updateStrategy: Recreate

View File

@@ -0,0 +1,8 @@
image:
pullPolicy: IfNotPresent
repository: plexinc/pms-docker
tag: 1.31.2.6810-a607d384f
plexpassImage:
pullPolicy: IfNotPresent
repository: plexinc/pms-docker
tag: plexpass

View File

@@ -0,0 +1,34 @@
#!/usr/bin/python3
import json
import os
import sys
def migrate(values):
values.update({
'appVolumeMounts': {
'transcode': {
'hostPathEnabled': values['transcodeHostPathEnabled'],
**({'hostPath': values['transcodeHostPath']} if values.get('transcodeHostPath') else {})
},
'config': {
'hostPathEnabled': values['configHostPathEnabled'],
**({'hostPath': values['configHostPath']} if values.get('configHostPath') else {})
},
'data': {
'hostPathEnabled': values['dataHostPathEnabled'],
**({'hostPath': values['dataHostPath']} if values.get('dataHostPath') else {})
},
},
'updateStrategy': values.get('strategyType', 'Recreate'),
})
return values
if __name__ == '__main__':
if len(sys.argv) != 2:
exit(1)
if os.path.exists(sys.argv[1]):
with open(sys.argv[1], 'r') as f:
print(json.dumps(migrate(json.loads(f.read()))))

View File

@@ -0,0 +1,361 @@
groups:
- name: "Plex Configuration"
description: "Configure plex deployment"
- name: "Networking"
description: "Configure networking for container"
- name: "Storage"
description: "Persist and share data that is separate from the lifecycle of the container"
- name: "Workload Details"
description: "Configure how workload should be deployed"
- name: "Scaling/Upgrade Policy"
description: "Configure how pods are replaced when configuration is upgraded"
- name: "Restart Policy"
description: "Configure when pod should be restarted in case of failure"
- name: "Resource Reservation"
description: "Specify resources to be allocated to workload"
- name: "Advanced DNS Settings"
description: "Configure DNS settings"
- name: "Resource Limits"
description: "Set CPU/memory limits for Kubernetes Pod"
portals:
web_portal:
protocols:
- "http"
host:
- "$node_ip"
ports:
- "$variable-plexServiceTCP.port"
path: "/web"
questions:
- variable: enablePlexPass
label: "Use PlexPass"
group: "Plex Configuration"
schema:
type: boolean
default: false
- variable: dnsConfig
label: "DNS Configuration"
group: "Advanced DNS Settings"
schema:
type: dict
attrs:
- variable: options
label: "DNS Options"
schema:
type: list
items:
- variable: optionsEntry
label: "Option Entry Configuration"
schema:
type: dict
attrs:
- variable: name
label: "Option Name"
schema:
type: string
required: true
- variable: value
label: "Option Value"
schema:
type: string
required: true
- variable: claimToken
label: "Plex Claim Token"
group: "Plex Configuration"
description: "The claim token for the server to obtain a real server token. If not provided, server is will not be automatically logged in. If server is already logged in, this parameter is ignored. You can obtain a claim token to login your server to your plex account by visiting https://www.plex.tv/claim."
schema:
type: string
default: ""
- variable: hostNetwork
label: "Configure Host Network"
group: "Networking"
schema:
type: boolean
default: false
- variable: environmentVariables
label: "Environment Variables for Plex"
group: "Plex Configuration"
schema:
type: list
default: []
items:
- variable: environmentVariable
label: "Environment Variable"
schema:
type: dict
attrs:
- variable: name
label: "Name"
schema:
type: string
- variable: value
label: "Value"
schema:
type: string
- variable: timezone
label: "Plex container timezone"
group: "Plex Configuration"
schema:
type: string
default: "Etc/UTC"
$ref:
- "definitions/timezone"
# Update strategy
- variable: updateStrategy
description: "Upgrade Policy"
label: "Update Strategy"
group: "Scaling/Upgrade Policy"
schema:
type: string
default: "Recreate"
enum:
- value: "RollingUpdate"
description: "Create new pods and then kill old ones"
- value: "Recreate"
description: "Kill existing pods before creating new ones"
# Port configuration
- variable: plexServiceTCP
label: "Configure Plex TCP Service"
group: "Networking"
schema:
type: dict
attrs:
- variable: port
label: "Port to expose for Plex UI"
schema:
type: int
min: 9000
max: 65535
default: 32400
# Specify GPU configuration
- variable: gpuConfiguration
label: "GPU Configuration"
group: "Resource Reservation"
schema:
type: dict
$ref:
- "definitions/gpuConfiguration"
attrs: []
- variable: appVolumeMounts
label: "Plex Storage"
group: "Storage"
schema:
type: dict
attrs:
- variable: transcode
label: "Transcode Volume"
schema:
type: dict
attrs:
- variable: datasetName
label: "Plex Transcode Volume Name"
schema:
type: string
$ref:
- "normalize/ixVolume"
show_if: [["hostPathEnabled", "=", false]]
default: "ix-plex_transcode"
hidden: true
editable: false
- variable: mountPath
label: "Plex Transcode Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
hidden: true
editable: false
default: "/transcode"
- variable: hostPathEnabled
label: "Enable Host Path for Plex Transcode Volume"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostPath
label: "Host Path for Plex Transcode Volume"
schema:
type: hostpath
required: true
$ref:
- "validations/lockedHostPath"
- variable: data
label: "Data Volume"
schema:
type: dict
attrs:
- variable: datasetName
label: "Plex Data Volume Name"
schema:
type: string
$ref:
- "normalize/ixVolume"
show_if: [["hostPathEnabled", "=", false]]
default: "ix-plex_data"
editable: false
hidden: true
- variable: mountPath
label: "Plex Data Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
hidden: true
editable: false
default: "/data"
- variable: hostPathEnabled
label: "Enable Host Path for Plex Data Volume"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostPath
label: "Host Path for Plex Data Volume"
schema:
type: hostpath
required: true
$ref:
- "validations/lockedHostPath"
- variable: config
label: "Config Volume"
schema:
type: dict
attrs:
- variable: datasetName
label: "Plex Config Volume Name"
schema:
type: string
$ref:
- "normalize/ixVolume"
show_if: [["hostPathEnabled", "=", false]]
default: "ix-plex_config"
editable: false
hidden: true
- variable: mountPath
label: "Plex Config Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
editable: false
hidden: true
default: "/config"
- variable: hostPathEnabled
label: "Enable Host Path for Plex Config Volume"
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: hostPath
label: "Host Path for Plex Config Volume"
schema:
type: hostpath
required: true
$ref:
- "validations/lockedHostPath"
- variable: shared
label: "Shared Volume"
schema:
type: dict
hidden: true
attrs:
- variable: emptyDir
label: "Temporary Volume"
schema:
type: boolean
default: true
editable: false
- variable: mountPath
label: "Plex Shared Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
editable: false
default: "/shared"
- variable: shared-logs
label: "Shared Logs Volume"
schema:
type: dict
hidden: true
attrs:
- variable: emptyDir
label: "Temporary Volume"
schema:
type: boolean
default: true
editable: false
- variable: mountPath
label: "Plex Shared Logs Mount Path"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
editable: false
default: "/config/Library/Application Support/Plex Media Server/Logs"
- variable: extraAppVolumeMounts
label: "Plex Extra Host Path Volumes"
group: "Storage"
schema:
type: list
items:
- variable: extraAppVolume
label: "Plex Host Path Volume"
description: "Add an extra host path volume for plex application"
schema:
type: dict
attrs:
- variable: mountPath
label: "Mount Path in Pod"
description: "Path where the volume will be mounted inside the pod"
schema:
type: path
required: true
- variable: hostPath
label: "Host Path"
description: "Host path"
schema:
type: hostpath
required: true
$ref:
- "validations/lockedHostPath"
- variable: readOnly
label: "Read Only"
description: "Mount hostpath in read-only mode"
schema:
type: boolean
default: false
- variable: enableResourceLimits
label: "Enable Pod resource limits"
group: "Resource Limits"
schema:
type: boolean
default: false
- variable: cpuLimit
label: "CPU Limresource limitsit"
description: "CPU resource limit allow plain integer values with suffix m(milli) e.g 1000m, 100."
group: "Resource Limits"
schema:
type: string
show_if: [["enableResourceLimits", "=", true]]
valid_chars: "^\\d+(?:\\.\\d+(?!.*m$)|m?$)"
default: "4000m"
- variable: memLimit
label: "Memory Limit"
group: "Resource Limits"
description: "Memory limits is specified by number of bytes. Followed by quantity suffix like E,P,T,G,M,k and Ei,Pi,Ti,Mi,Gi,Ki can also be used. e.g 129e6, 129M, 128974848000m, 123Mi"
schema:
type: string
show_if: [["enableResourceLimits", "=", true]]
valid_chars: "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
default: "8Gi"

View File

@@ -0,0 +1,3 @@
1. Get the application URL by running these commands:
http://$node_ip:{{ .Values.plexServiceTCP.port }}/

View File

@@ -0,0 +1,103 @@
{{ include "common.storage.hostPathValidate" .Values }}
{{ include "common.deployment.common_config" . | nindent 0 }}
spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
template: {{ include "common.deployment.pod.metadata" . | nindent 4 }}
spec:
hostNetwork: {{ .Values.hostNetwork }}
{{- if .Values.hostNetwork }}
dnsPolicy: ClusterFirstWithHostNet
{{- end }}
hostname: {{ template "common.names.fullname" . }}
containers:
- name: {{ .Chart.Name }}
{{ include "common.resources.limitation" . | nindent 10 }}
{{ if .Values.enablePlexPass }}
{{ include "common.containers.imageConfig" .Values.plexpassImage | nindent 10 }}
{{ else }}
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
{{ end }}
volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
{{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- name: extrappvolume-{{ $index }}
mountPath: {{ $hostPathConfiguration.mountPath }}
{{ if $hostPathConfiguration.readOnly }}
readOnly: {{ $hostPathConfiguration.readOnly }}
{{ end }}
{{ end }}
ports:
- name: pms
protocol: TCP
containerPort: 32400
{{- if .Values.hostNetwork }}
hostPort: {{ .Values.plexServiceTCP.port }}
{{- end }}
- name: plex-dlna
protocol: TCP
containerPort: 32469
- name: plex-dlna-udp
protocol: UDP
containerPort: 1900
- name: plex-gdm1
protocol: UDP
containerPort: 32410
- name: plex-gdm2
protocol: UDP
containerPort: 32412
- name: plex-gdm3
protocol: UDP
containerPort: 32413
- name: plex-gdm4
protocol: UDP
containerPort: 32414
env:
- name: KUBE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
{{ $envList := (default list .Values.environmentVariables) }}
{{ if and .Values.gpuConfiguration (hasKey .Values.gpuConfiguration "nvidia.com/gpu") (gt (get .Values.gpuConfiguration "nvidia.com/gpu" | toDecimal) 0) }}
{{ $envList = mustAppend $envList (dict "name" "NVIDIA_DRIVER_CAPABILITIES" "value" "all") }}
{{ end }}
{{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }}
{{ $envList = mustAppend $envList (dict "name" "PLEX_CLAIM" "value" .Values.claimToken) }}
{{ $envList = mustAppend $envList (dict "name" "PMS_INTERNAL_ADDRESS" "value" (printf "http://%s:32400" (include "common.names.fullname" .))) }}
{{ $envList = mustAppend $envList (dict "name" "PMS_IMAGE" "value" (printf "%s:%s" .Values.image.repository .Values.image.tag))}}
{{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
readinessProbe:
httpGet:
path: /identity
port: 32400
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 2
livenessProbe:
httpGet:
path: /identity
port: 32400
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 1
startupProbe:
httpGet:
path: /identity
port: 32400
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 60
successThreshold: 1
{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
{{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- name: extrappvolume-{{ $index }}
hostPath:
path: {{ $hostPathConfiguration.hostPath }}
{{ end }}

View File

@@ -0,0 +1,16 @@
{{ $svc := .Values.plexServiceTCP }}
{{ $ports := list }}
{{ $ports = mustAppend $ports (dict "name" "pms" "port" $svc.port "nodePort" $svc.port "targetPort" "pms") }}
{{ $ports = mustAppend $ports (dict "name" "http" "port" 80 "targetPort" "pms") }}
{{ $ports = mustAppend $ports (dict "name" "https" "port" 443 "targetPort" "pms") }}
{{ $ports = mustAppend $ports (dict "name" "plex-dlna" "port" 1900 "targetPort" "plex-dlna") }}
{{ $params := . }}
{{ $_ := set $params "commonService" (dict "ports" $ports ) }}
{{ if .Values.hostNetwork }}
{{ $_ := set $params.commonService "nameSuffix" "tcp-cluster-ip" }}
{{ $_1 := set $params.commonService "type" "ClusterIP" }}
{{ else }}
{{ $_ := set $params.commonService "nameSuffix" "tcp" }}
{{ $_1 := set $params.commonService "type" "NodePort" }}
{{ end }}
{{ include "common.classes.service" $params }}

View File

@@ -0,0 +1,9 @@
{{ $ports := list }}
{{ $ports = mustAppend $ports (dict "name" "plex-dlna-udp" "port" 1900 "protocol" "UDP" "targetPort" "plex-dlna-udp") }}
{{ $ports = mustAppend $ports (dict "name" "plex-gdm1" "port" 32410 "protocol" "UDP" "targetPort" "plex-gdm1") }}
{{ $ports = mustAppend $ports (dict "name" "plex-gdm2" "port" 32412 "protocol" "UDP" "targetPort" "plex-gdm2") }}
{{ $ports = mustAppend $ports (dict "name" "plex-gdm3" "port" 32413 "protocol" "UDP" "targetPort" "plex-gdm3") }}
{{ $ports = mustAppend $ports (dict "name" "plex-gdm4" "port" 32414 "protocol" "UDP" "targetPort" "plex-gdm4") }}
{{ $params := . }}
{{ $_ := set $params "commonService" (dict "type" "ClusterIP" "ports" $ports "nameSuffix" "udp" ) }}
{{ include "common.classes.service" $params }}

3
charts/plex/item.yaml Normal file
View File

@@ -0,0 +1,3 @@
categories:
- entertainment
icon_url: https://www.plex.tv/wp-content/uploads/2018/01/pmp-icon-1.png